Skip to content

Commit 8161827

Browse files
eghidoliShawn Guo
authored andcommitted
arm64: dts: freescale: imx8mp-toradex-smarc: add gpio expander
Add gpio expander node to the device tree and the related nodes. Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Emanuele Ghidoli <[email protected]> Signed-off-by: Francesco Dolcini <[email protected]> Signed-off-by: Shawn Guo <[email protected]>
1 parent e40201b commit 8161827

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

arch/arm64/boot/dts/freescale/imx8mp-toradex-smarc.dtsi

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,13 @@
5454
wakeup-source;
5555
linux,code = <KEY_SLEEP>;
5656
};
57+
58+
smarc_switch_lid: switch-lid {
59+
gpios = <&som_ec_gpio_expander 2 GPIO_ACTIVE_LOW>;
60+
label = "SMARC_LID#";
61+
linux,code = <SW_LID>;
62+
linux,input-type = <EV_SW>;
63+
};
5764
};
5865

5966
reg_usb0_vbus: regulator-usb0-vbus {
@@ -539,6 +546,24 @@
539546
reg = <0x28>;
540547
};
541548

549+
som_ec_gpio_expander: gpio@29 {
550+
compatible = "toradex,ecgpiol16", "nxp,pcal6416";
551+
reg = <0x29>;
552+
pinctrl-names = "default";
553+
pinctrl-0 = <&pinctrl_mcu_int>;
554+
#interrupt-cells = <2>;
555+
interrupt-controller;
556+
interrupt-parent = <&gpio3>;
557+
interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
558+
#gpio-cells = <2>;
559+
gpio-controller;
560+
gpio-line-names =
561+
"SMARC_CHARGER_PRSNT#",
562+
"SMARC_CHARGING#",
563+
"SMARC_LID#",
564+
"SMARC_BATLOW#";
565+
};
566+
542567
rtc_i2c: rtc@32 {
543568
compatible = "epson,rx8130";
544569
reg = <0x32>;

0 commit comments

Comments
 (0)