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_part2 tree and these were tested on am33xx devices according to added functionality.
Change log:
- Rebased on for_3.8/dts_part2
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 RESEND 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 RESEND 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 RESEND 2/10 ARM: dts: AM33XX: Add matrix keypad device tree data to am335x-evm
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"A" == AnilKumar Ch <[email protected]> writes:
A> Add matrix keypad device tree data to am335x-evm by adding all A> the necessary parameters like keymap, row & column gpios and etc.
A> Signed-off-by: AnilKumar Ch <[email protected]> A> ---
A> arch/arm/boot/dts/am335x-evm.dts | 20 ++++++++++++++++++++
A> 1 file changed, 20 insertions(+)
A> diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts A> index 9199456..8076e66 100644
A> --- a/arch/arm/boot/dts/am335x-evm.dts
A> +++ b/arch/arm/boot/dts/am335x-evm.dts
A> @@ -110,6 +110,26 @@
A> regulator-name = "lis3_reg"; A> regulator-boot-on; A> };
A> +
A> + matrix_keypad: matrix_keypad at 0 {
A> + compatible = "gpio-matrix-keypad";
A> + debounce-delay-ms = <5>;
A> + col-scan-delay-us = <2>;
A> +
A> + row-gpios = <&gpio2 25 0 /* Bank1, pin25 */
A> + &gpio2 26 0 /* Bank1, pin26 */
A> + &gpio2 27 0>; /* Bank1, pin27 */
Sigh, can we PLEASE change am33xx.dtsi to use zero based index like the TRM and get rid of this madness?
Signature · 1 line
Bye, Peter Korsgaard
PATCH RESEND 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 RESEND 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 RESEND 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 RESEND 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
@@ -53,6 +53,36 @@ }; }; + + 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 RESEND 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 RESEND 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 RESEND 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 RESEND 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 ChHi Anil,
Quoted 9 lines · AnilKumar Ch
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 5 lines
These patches are based on linux-omap-dt:for_3.8/dts_part2 tree and these were tested on am33xx devices according to added functionality.
Change log:
- Rebased on for_3.8/dts_part2
Thanks for the update. Applied in for_3.8/dts_part2.
BTW, I've just noticed that am335x-evmsk is not built with make dtbs. The target was missing from the arch/arm/boot/dts/Makefile.
Please find below the patch to add it.
Thanks,
Benoit
---
Quoted 1 line
From
6990451aca80a5107206688308302241f799057aMon Sep 17 00:00:00 2001
From: Benoit Cousson <[email protected]>
Date: Tue, 6 Nov 2012 15:52:23 +0100
Subject: [PATCH] ARM: dts: Makefile: Add the am335x-evmsk target in dtbs list
The EVMSK was not built with the 'make dtbs' command. Add the missing antry in the dts Makefile.
--- arch/arm/boot/dts/Makefile | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/boot/dts/Makefile +1 -0
@@ -73,6 +73,7 @@ dtb-$(CONFIG_ARCH_OMAP2PLUS) += omap2420-h4.dtb \ omap4-sdp.dtb \ omap5-evm.dtb \ am335x-evm.dtb \ + am335x-evmsk.dtb \ am335x-bone.dtb dtb-$(CONFIG_ARCH_PRIMA2) += prima2-evb.dtb dtb-$(CONFIG_ARCH_U8500) += snowball.dtb
Signature · 1 line
1.7.0.4
cover ARM: dts: AM33XX: Add device tree data
Quoted 15 lines · Benoit
Hi Anil,
Quoted 12 lines · AnilKumar Ch
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_part2 tree and these were tested on am33xx devices according to added functionality.
Quoted 8 lines
Quoted 2 lines
Change log:
- Rebased on for_3.8/dts_part2Thanks for the update. Applied in for_3.8/dts_part2.
BTW, I've just noticed that am335x-evmsk is not built with make dtbs. The target was missing from the
arch/arm/boot/dts/Makefile.Please find below the patch to add it.
Hi Benoit,
Thanks for addition. Below change is missed from evmsk patch.
Thanks
AnilKumar
Quoted 30 lines
---
From6990451aca80a5107206688308302241f799057aMon Sep 17 00:00:00 2001
From: Benoit Cousson <[email protected]>
Date: Tue, 6 Nov 2012 15:52:23 +0100
Subject: [PATCH] ARM: dts:Makefile: Add the am335x-evmsk target in dtbs listThe EVMSK was not built with the 'make dtbs' command. Add the missing antry in the dts
Makefile.Signed-off-by Benoit Cousson <[email protected]>--- arch/arm/boot/dts/Makefile | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)arch/arm/boot/dts/Makefile +1
-0@@ -73,6 +73,7 @@ dtb-$(CONFIG_ARCH_OMAP2PLUS) += omap2420-h4.dtb \ omap4-sdp.dtb \ omap5-evm.dtb \ am335x-evm.dtb \ + am335x-evmsk.dtb \ am335x-bone.dtb dtb-$(CONFIG_ARCH_PRIMA2) += prima2-evb.dtb dtb-$(CONFIG_ARCH_U8500) += snowball.dtbSignature · 1 line
1.7.0.4