]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
arm64: dts: freescale: imx8mp-toradex-smarc: add gpio expander
authorEmanuele Ghidoli <emanuele.ghidoli@toradex.com>
Wed, 30 Apr 2025 09:41:49 +0000 (11:41 +0200)
committerShawn Guo <shawnguo@kernel.org>
Fri, 9 May 2025 14:41:35 +0000 (22:41 +0800)
Add gpio expander node to the device tree and the related nodes.

Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
arch/arm64/boot/dts/freescale/imx8mp-toradex-smarc.dtsi

index c4ca01ce60d083c6c79d0bf1c0ef9e6e2cdb7b20..0cd04c3c96bb62d82fd01d281c8213a46622a989 100644 (file)
                        wakeup-source;
                        linux,code = <KEY_SLEEP>;
                };
+
+               smarc_switch_lid: switch-lid {
+                       gpios = <&som_ec_gpio_expander 2 GPIO_ACTIVE_LOW>;
+                       label = "SMARC_LID#";
+                       linux,code = <SW_LID>;
+                       linux,input-type = <EV_SW>;
+               };
        };
 
        reg_usb0_vbus: regulator-usb0-vbus {
                reg = <0x28>;
        };
 
+       som_ec_gpio_expander: gpio@29 {
+               compatible = "toradex,ecgpiol16", "nxp,pcal6416";
+               reg = <0x29>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_mcu_int>;
+               #interrupt-cells = <2>;
+               interrupt-controller;
+               interrupt-parent = <&gpio3>;
+               interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
+               #gpio-cells = <2>;
+               gpio-controller;
+               gpio-line-names =
+                       "SMARC_CHARGER_PRSNT#",
+                       "SMARC_CHARGING#",
+                       "SMARC_LID#",
+                       "SMARC_BATLOW#";
+       };
+
        rtc_i2c: rtc@32 {
                compatible = "epson,rx8130";
                reg = <0x32>;