ARM: dts: imx6sx-sdb: add gpio key support
Subsystems (2)
PATCH 1/1 ARM: dts: imx6sx-sdb: add gpio key support
This patch adds support for imx6sx-sdb board's gpio keys:
SW4(FUNC1): KEY_VOLUMEUP
SW5(FUNC2): KEY_VOLUMEDOWN
Signed-off-by Anson Huang <[email protected]>
--- arch/arm/boot/dts/imx6sx-sdb.dts | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+)
arch/arm/boot/dts/imx6sx-sdb.dts +27 -0
@@ -8,6 +8,8 @@ /dts-v1/; +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/input/input.h> #include "imx6sx.dtsi" / {
@@ -18,6 +20,24 @@ stdout-path = &uart1; }; + gpio-keys { + compatible = "gpio-keys"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_gpio_keys>; + + volume-up { + label = "Volume Up"; + gpios = <&gpio1 18 GPIO_ACTIVE_LOW>; + linux,code = <KEY_VOLUMEUP>; + }; + + volume-down { + label = "Volume Down"; + gpios = <&gpio1 19 GPIO_ACTIVE_LOW>; + linux,code = <KEY_VOLUMEDOWN>; + }; + }; + memory { reg = <0x80000000 0x40000000>; };
@@ -114,6 +134,13 @@ >; }; + pinctrl_gpio_keys: gpio_keysgrp { + fsl,pins = < + MX6SX_PAD_CSI_DATA04__GPIO1_IO_18 0x17059 + MX6SX_PAD_CSI_DATA05__GPIO1_IO_19 0x17059 + >; + }; + pinctrl_vcc_sd3: vccsd3grp { fsl,pins = < MX6SX_PAD_KEY_COL1__GPIO2_IO_11 0x17059
Signature · 1 line
1.7.9.5
PATCH 1/1 ARM: dts: imx6sx-sdb: add gpio key support
Quoted 38 lines · Anson Huang
This patch adds support for imx6sx-sdb board's gpio keys:
SW4(FUNC1):
KEY_VOLUMEUP
SW5(FUNC2):KEY_VOLUMEDOWNSigned-off-by Anson Huang <[email protected]>--- arch/arm/boot/dts/imx6sx-sdb.dts | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+)arch/arm/boot/dts/imx6sx-sdb.dts +13
-0@@ -8,6 +8,8 @@ /dts-v1/; +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/input/input.h> #include "imx6sx.dtsi" / {@@ -18,6 +20,24 @@ stdout-path = &uart1; }; + gpio-keys { + compatible = "gpio-keys"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_gpio_keys>; + + volume-up { + label = "Volume Up"; + gpios = <&gpio1 18 GPIO_ACTIVE_LOW>; + linux,code = <KEY_VOLUMEUP>; + }; +
arch/arm/boot/dts/imx6sx-sdb.dts line 43
Quoted 10 lines
arch/arm/boot/dts/imx6sx-sdb.dts +7
-0+ volume-down { + label = "Volume Down"; + gpios = <&gpio1 19 GPIO_ACTIVE_LOW>; + linux,code = <KEY_VOLUMEDOWN>; + }; + }; + memory { reg = <0x80000000 0x40000000>; };
We generally have 'chosen' and 'memory' at the top of the board dts. So I applied the patch after switching the order between 'gpio-keys' and 'memory'.
Shawn
Quoted 17 lines
arch/arm/boot/dts/imx6sx-sdb.dts +7
-0@@ -114,6 +134,13 @@ >; }; + pinctrl_gpio_keys: gpio_keysgrp { + fsl,pins = < + MX6SX_PAD_CSI_DATA04__GPIO1_IO_18 0x17059 + MX6SX_PAD_CSI_DATA05__GPIO1_IO_19 0x17059 + >; + }; + pinctrl_vcc_sd3: vccsd3grp { fsl,pins = < MX6SX_PAD_KEY_COL1__GPIO2_IO_11 0x17059Signature · 1 line
1.7.9.5