ARM: dts: AM33XX: Add device tree data
cover ARM: dts: AM33XX: Add device tree data
Add device tree date for GPIO based various drivers matrix keypad, volume keys, push buttons and use leds accross three AM33XX devices viz EVM, BeagleBone and Starter Kit.
To make it functional this series also adds pinctrl data for all the GPIOs used by various drivers. In this series only default state pinmux/conf settings are added because of sleep/idle state pinctrl values are not available.
These patches are based on linux-omap-dt:for_3.8/dts tree and these were tested on am33xx devices according to added functionality.
AnilKumar Ch (10):
ARM: dts: AM33XX: Add pinmux configuration for matrix keypad to EVM
ARM: dts: AM33XX: Add matrix keypad device tree data to am335x-evm
ARM: dts: AM33XX: Add pinmux configuration for volume-keys to EVM
ARM: dts: AM33XX: Add volume-keys device tree data to am335x-evm
ARM: dts: AM33XX: Add pinmux configuration for user-leds to BONE
ARM: dts: AM33XX: Add user-leds device tree data to am335x-bone
ARM: dts: AM33XX: Add pinmux configuration for gpio-leds to EVMSK
ARM: dts: AM33XX: Add user-leds device tree data to am335x-evmsk
ARM: dts: AM33XX: Add pinmux configuration for gpio-keys to EVMSK
ARM: dts: AM33XX: Add push-buttons device tree data to am335x-evmsk
arch/arm/boot/dts/am335x-bone.dts | 44 +++++++++++++++++++ arch/arm/boot/dts/am335x-evm.dts | 63 +++++++++++++++++++++++++++ arch/arm/boot/dts/am335x-evmsk.dts | 84 ++++++++++++++++++++++++++++++++++++ 3 files changed, 191 insertions(+)
Signature · 1 line
1.7.9.5
PATCH 1/10 ARM: dts: AM33XX: Add pinmux configuration for matrix keypad to EVM
Add pinmux configurations for gpio matrix keypad. In this patch, only single named mode/state is added and these pins are configured during pinctrl driver initialization.
Default mode is nothing but the values required for the module during active state. With this configurations module is functional as expected.
--- arch/arm/boot/dts/am335x-evm.dts | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
arch/arm/boot/dts/am335x-evm.dts +15 -0
@@ -24,6 +24,21 @@ reg = <0x80000000 0x10000000>; /* 256 MB */ }; + am33xx_pinmux: pinmux at 44e10800 { + pinctrl-names = "default"; + pinctrl-0 = <&matrix_keypad_s0>; + + matrix_keypad_s0: matrix_keypad_s0 { + pinctrl-single,pins = < + 0x54 0x7 /* gpmc_a5.gpio1_21, OUTPUT | MODE7 */ + 0x58 0x7 /* gpmc_a6.gpio1_22, OUTPUT | MODE7 */ + 0x64 0x27 /* gpmc_a9.gpio1_25, INPUT | MODE7 */ + 0x68 0x27 /* gpmc_a10.gpio1_26, INPUT | MODE7 */ + 0x6c 0x27 /* gpmc_a11.gpio1_27, INPUT | MODE7 */ + >; + }; + }; + ocp { uart1: serial at 44e09000 { status = "okay";
Signature · 1 line
1.7.9.5
PATCH 2/10 ARM: dts: AM33XX: Add matrix keypad device tree data to am335x-evm
In reply to AnilKumar ChAdd matrix keypad device tree data to am335x-evm by adding all the necessary parameters like keymap, row & column gpios and etc.
--- arch/arm/boot/dts/am335x-evm.dts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
arch/arm/boot/dts/am335x-evm.dts +20 -0
@@ -110,6 +110,26 @@ regulator-name = "lis3_reg"; regulator-boot-on; }; + + matrix_keypad: matrix_keypad at 0 { + compatible = "gpio-matrix-keypad"; + debounce-delay-ms = <5>; + col-scan-delay-us = <2>; + + row-gpios = <&gpio2 25 0 /* Bank1, pin25 */ + &gpio2 26 0 /* Bank1, pin26 */ + &gpio2 27 0>; /* Bank1, pin27 */ + + col-gpios = <&gpio2 21 0 /* Bank1, pin21 */ + &gpio2 22 0>; /* Bank1, pin22 */ + + linux,keymap = <0x0000008b /* MENU */ + 0x0100009e /* BACK */ + 0x02000069 /* LEFT */ + 0x0001006a /* RIGHT */ + 0x0101001c /* ENTER */ + 0x0201006c>; /* DOWN */ + }; }; /include/ "tps65910.dtsi"
Signature · 1 line
1.7.9.5
PATCH 3/10 ARM: dts: AM33XX: Add pinmux configuration for volume-keys to EVM
In reply to AnilKumar ChAdd pinmux configurations for gpio volume keys. In this patch, only single named mode/state is added and these pins are configured during pinctrl driver initialization.
Default mode is nothing but the values required for the module during active state. With this configurations module is functional as expected.
--- arch/arm/boot/dts/am335x-evm.dts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
arch/arm/boot/dts/am335x-evm.dts +8 -1
@@ -26,7 +26,7 @@ am33xx_pinmux: pinmux at 44e10800 { pinctrl-names = "default"; - pinctrl-0 = <&matrix_keypad_s0>; + pinctrl-0 = <&matrix_keypad_s0 &volume_keys_s0>; matrix_keypad_s0: matrix_keypad_s0 { pinctrl-single,pins = <
@@ -37,6 +37,13 @@ 0x6c 0x27 /* gpmc_a11.gpio1_27, INPUT | MODE7 */ >; }; + + volume_keys_s0: volume_keys_s0 { + pinctrl-single,pins = < + 0x150 0x27 /* spi0_sclk.gpio0_2, INPUT | MODE7 */ + 0x154 0x27 /* spi0_d0.gpio0_3, INPUT | MODE7 */ + >; + }; }; ocp {
Signature · 1 line
1.7.9.5
PATCH 4/10 ARM: dts: AM33XX: Add volume-keys device tree data to am335x-evm
In reply to AnilKumar ChAdd gpio based volume keys device tree data to am335x-evm by adding all the required parameters like keycode, gpios and etc.
--- arch/arm/boot/dts/am335x-evm.dts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
arch/arm/boot/dts/am335x-evm.dts +21 -0
@@ -137,6 +137,27 @@ 0x0101001c /* ENTER */ 0x0201006c>; /* DOWN */ }; + + gpio_keys: volume_keys at 0 { + compatible = "gpio-keys"; + #address-cells = <1>; + #size-cells = <0>; + autorepeat; + + switch at 9 { + label = "volume-up"; + linux,code = <115>; + gpios = <&gpio1 2 1>; + gpio-key,wakeup; + }; + + switch at 10 { + label = "volume-down"; + linux,code = <114>; + gpios = <&gpio1 3 1>; + gpio-key,wakeup; + }; + }; }; /include/ "tps65910.dtsi"
Signature · 1 line
1.7.9.5
PATCH 5/10 ARM: dts: AM33XX: Add pinmux configuration for user-leds to BONE
In reply to AnilKumar ChAdd pinmux configurations for gpio based user-keys to am335x-bone. In this patch, only single named mode/state is added and these pins are configured during pinctrl driver initialization.
Default mode is nothing but the values required for the module during active state. With this configurations module is functional as expected.
--- arch/arm/boot/dts/am335x-bone.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
arch/arm/boot/dts/am335x-bone.dts +14 -0
@@ -24,6 +24,20 @@ reg = <0x80000000 0x10000000>; /* 256 MB */ }; + am33xx_pinmux: pinmux at 44e10800 { + pinctrl-names = "default"; + pinctrl-0 = <&user_leds_s0>; + + user_leds_s0: user_leds_s0 { + pinctrl-single,pins = < + 0x54 0x7 /* gpmc_a5.gpio1_21, OUTPUT | MODE7 */ + 0x58 0x17 /* gpmc_a6.gpio1_22, OUTPUT_PULLUP | MODE7 */ + 0x5c 0x7 /* gpmc_a7.gpio1_23, OUTPUT | MODE7 */ + 0x60 0x17 /* gpmc_a8.gpio1_24, OUTPUT_PULLUP | MODE7 */ + >; + }; + }; + ocp { uart1: serial at 44e09000 { status = "okay";
Signature · 1 line
1.7.9.5
PATCH 6/10 ARM: dts: AM33XX: Add user-leds device tree data to am335x-bone
In reply to AnilKumar ChAdd gpio-leds device tree data to am335x-bone device to enable gpio based user-leds (USR0, USR1, USR2 and USR3) present on BeagleBone.
--- arch/arm/boot/dts/am335x-bone.dts | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)
arch/arm/boot/dts/am335x-bone.dts +30 -0
@@ -57,6 +57,36 @@ ti,system-power-controller; }; }; + + leds { + compatible = "gpio-leds"; + + led at 2 { + label = "beaglebone:green:heartbeat"; + gpios = <&gpio2 21 0>; + linux,default-trigger = "heartbeat"; + default-state = "off"; + }; + + led at 3 { + label = "beaglebone:green:mmc0"; + gpios = <&gpio2 22 0>; + linux,default-trigger = "mmc0"; + default-state = "off"; + }; + + led at 4 { + label = "beaglebone:green:usr2"; + gpios = <&gpio2 23 0>; + default-state = "off"; + }; + + led at 5 { + label = "beaglebone:green:usr3"; + gpios = <&gpio2 24 0>; + default-state = "off"; + }; + }; }; /include/ "tps65217.dtsi"
Signature · 1 line
1.7.9.5
PATCH 7/10 ARM: dts: AM33XX: Add pinmux configuration for gpio-leds to EVMSK
In reply to AnilKumar ChAdd pinmux configurations for gpio based volume keys to am335x-evmsk. In this patch, only single named mode/state is added and these pins are configured during pinctrl driver initialization.
Default mode is nothing but the values required for the module during active state. With this configurations module is functional as expected.
--- arch/arm/boot/dts/am335x-evmsk.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
arch/arm/boot/dts/am335x-evmsk.dts +14 -0
@@ -30,6 +30,20 @@ reg = <0x80000000 0x10000000>; /* 256 MB */ }; + am33xx_pinmux: pinmux at 44e10800 { + pinctrl-names = "default"; + pinctrl-0 = <&user_leds_s0>; + + user_leds_s0: user_leds_s0 { + pinctrl-single,pins = < + 0x10 0x7 /* gpmc_ad4.gpio1_4, OUTPUT | MODE7 */ + 0x14 0x7 /* gpmc_ad5.gpio1_5, OUTPUT | MODE7 */ + 0x18 0x7 /* gpmc_ad6.gpio1_6, OUTPUT | MODE7 */ + 0x1c 0x7 /* gpmc_ad7.gpio1_7, OUTPUT | MODE7 */ + >; + }; + }; + ocp { uart1: serial at 44e09000 { status = "okay";
Signature · 1 line
1.7.9.5
PATCH 8/10 ARM: dts: AM33XX: Add user-leds device tree data to am335x-evmsk
In reply to AnilKumar ChAdd gpio-leds device tree data to am335x-evmsk device to enable gpio based user-leds (USR0, USR1, USR2 and USR3) present on am335x starter kit.
--- arch/arm/boot/dts/am335x-evmsk.dts | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)
arch/arm/boot/dts/am335x-evmsk.dts +30 -0
@@ -100,6 +100,36 @@ regulator-name = "lis3_reg"; regulator-boot-on; }; + + leds { + compatible = "gpio-leds"; + + led at 1 { + label = "evmsk:green:usr0"; + gpios = <&gpio2 4 0>; + default-state = "off"; + }; + + led at 2 { + label = "evmsk:green:usr1"; + gpios = <&gpio2 5 0>; + default-state = "off"; + }; + + led at 3 { + label = "evmsk:green:mmc0"; + gpios = <&gpio2 6 0>; + linux,default-trigger = "mmc0"; + default-state = "off"; + }; + + led at 4 { + label = "evmsk:green:heartbeat"; + gpios = <&gpio2 7 0>; + linux,default-trigger = "heartbeat"; + default-state = "off"; + }; + }; }; /include/ "tps65910.dtsi"
Signature · 1 line
1.7.9.5
PATCH 9/10 ARM: dts: AM33XX: Add pinmux configuration for gpio-keys to EVMSK
In reply to AnilKumar ChAdd pinmux configurations for gpio based keys to am335x-evmsk. In this patch, only single named mode/state is added and these pins are configured during pinctrl driver initialization.
Default mode is nothing but the values required for the module during active state. With this configurations module is functional as expected.
--- arch/arm/boot/dts/am335x-evmsk.dts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
arch/arm/boot/dts/am335x-evmsk.dts +10 -1
@@ -32,7 +32,7 @@ am33xx_pinmux: pinmux at 44e10800 { pinctrl-names = "default"; - pinctrl-0 = <&user_leds_s0>; + pinctrl-0 = <&user_leds_s0 &gpio_keys_s0>; user_leds_s0: user_leds_s0 { pinctrl-single,pins = <
@@ -42,6 +42,15 @@ 0x1c 0x7 /* gpmc_ad7.gpio1_7, OUTPUT | MODE7 */ >; }; + + gpio_keys_s0: gpio_keys_s0 { + pinctrl-single,pins = < + 0x94 0x27 /* gpmc_oen_ren.gpio2_3, INPUT | MODE7 */ + 0x90 0x27 /* gpmc_advn_ale.gpio2_2, INPUT | MODE7 */ + 0x70 0x27 /* gpmc_wait0.gpio0_30, INPUT | MODE7 */ + 0x9c 0x27 /* gpmc_ben0_cle.gpio2_5, INPUT | MODE7 */ + >; + }; }; ocp {
Signature · 1 line
1.7.9.5
PATCH 10/10 ARM: dts: AM33XX: Add push-buttons device tree data to am335x-evmsk
In reply to AnilKumar ChAdd gpio based push buttons device tree data to am335x-evmsk device by adding all the necessary parameters like key-code, gpios and etc.
--- arch/arm/boot/dts/am335x-evmsk.dts | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+)
arch/arm/boot/dts/am335x-evmsk.dts +31 -0
@@ -139,6 +139,37 @@ default-state = "off"; }; }; + + gpio_buttons: gpio_buttons at 0 { + compatible = "gpio-keys"; + #address-cells = <1>; + #size-cells = <0>; + + switch at 1 { + label = "button0"; + linux,code = <0x100>; + gpios = <&gpio3 3 0>; + }; + + switch at 2 { + label = "button1"; + linux,code = <0x101>; + gpios = <&gpio3 2 0>; + }; + + switch at 3 { + label = "button2"; + linux,code = <0x102>; + gpios = <&gpio1 30 0>; + gpio-key,wakeup; + }; + + switch at 4 { + label = "button3"; + linux,code = <0x103>; + gpios = <&gpio3 5 0>; + }; + }; }; /include/ "tps65910.dtsi"
Signature · 1 line
1.7.9.5
cover ARM: dts: AM33XX: Add device tree data
In reply to AnilKumar ChQuoted 10 lines · Chimata
Add device tree date for GPIO based various drivers matrix keypad, volume keys, push buttons and use leds accross three AM33XX devices viz EVM, BeagleBone and Starter Kit.
To make it functional this series also adds pinctrl data for all the GPIOs used by various drivers. In this series only default state pinmux/conf settings are added because of sleep/idle state pinctrl values are not available.
These patches are based on linux-omap-dt:for_3.8/dts tree and these
My bad, small correction in this statement, these patches apply cleanly on linux-omap-dt:for_3.8/dts tree with the below two patches.
http://www.spinics.net/lists/arm-kernel/msg204872.html
http://www.spinics.net/lists/arm-kernel/msg204873.html
Thanks
AnilKumar
Quoted 23 lines
were tested on am33xx devices according to added functionality.
AnilKumar Ch (10):
ARM: dts: AM33XX: Add pinmux configuration for matrix keypad to EVM
ARM: dts: AM33XX: Add matrix keypad device tree data to am335x-evm
ARM: dts: AM33XX: Add pinmux configuration for volume-keys to EVM
ARM: dts: AM33XX: Add volume-keys device tree data to am335x-evm
ARM: dts: AM33XX: Add pinmux configuration for user-leds to BONE
ARM: dts: AM33XX: Add user-leds device tree data to am335x-bone
ARM: dts: AM33XX: Add pinmux configuration for gpio-leds to EVMSK
ARM: dts: AM33XX: Add user-leds device tree data to am335x-evmsk
ARM: dts: AM33XX: Add pinmux configuration for gpio-keys to EVMSK
ARM: dts: AM33XX: Add push-buttons device tree data to am335x-evmskarch/arm/boot/dts/am335x-bone.dts | 44 +++++++++++++++++++ arch/arm/boot/dts/am335x-evm.dts | 63 +++++++++++++++++++++++++++ arch/arm/boot/dts/am335x-evmsk.dts | 84 ++++++++++++++++++++++++++++++++++++ 3 files changed, 191 insertions(+)Signature · 1 line
1.7.9.5
cover ARM: dts: AM33XX: Add device tree data
Hi Anil,
Quoted 10 lines · Chimata
Quoted 9 lines · Chimata
Add device tree date for GPIO based various drivers matrix keypad, volume keys, push buttons and use leds accross three AM33XX devices viz EVM, BeagleBone and Starter Kit.
To make it functional this series also adds pinctrl data for all the GPIOs used by various drivers. In this series only default state pinmux/conf settings are added because of sleep/idle state pinctrl values are not available.
Quoted 6 lines
Quoted 1 line
These patches are based on linux-omap-dt:for_3.8/dts tree and these
My bad, small correction in this statement, these patches apply cleanly on linux-omap-dt:for_3.8/dts tree with the below two patches.
http://www.spinics.net/lists/arm-kernel/msg204872.html
http://www.spinics.net/lists/arm-kernel/msg204873.html
Mmm, this 2 patches do have dependency on some driver changes that might not be accepted for 3.8. And in fact I do have some comment on the RTC one :-)
Don't you prefer to change the order to allow me to pull these ones first?
Thanks,
Benoit
cover ARM: dts: AM33XX: Add device tree data
Quoted 20 lines · Benoit
Hi Anil,
Quoted 10 lines · Chimata
Quoted 9 lines · Chimata
Add device tree date for GPIO based various drivers matrix keypad, volume keys, push buttons and use leds accross three AM33XX devices viz EVM, BeagleBone and Starter Kit.
To make it functional this series also adds pinctrl data for all the GPIOs used by various drivers. In this series only default state pinmux/conf settings are added because of sleep/idle state pinctrl values are not available.
Quoted 6 lines
Quoted 1 line
These patches are based on linux-omap-dt:for_3.8/dts tree and these
My bad, small correction in this statement, these patches apply cleanly on linux-omap-dt:for_3.8/dts tree with the below two patches.
http://www.spinics.net/lists/arm-kernel/msg204872.html
http://www.spinics.net/lists/arm-kernel/msg204873.html
Quoted 5 lines
Mmm, this 2 patches do have dependency on some driver changes that might not be accepted for 3.8. And in fact I do have some comment on the RTC one :-)
Don't you prefer to change the order to allow me to pull these ones first?
Today I will resend the patches by removing this dependency.
Thanks
AnilKumar