diff options
author | Florian Vaussard <florian.vaussard@epfl.ch> | 2013-06-03 10:12:25 -0400 |
---|---|---|
committer | Benoit Cousson <benoit.cousson@linaro.org> | 2013-06-18 19:53:43 -0400 |
commit | 6a8a6b6548216fafb2db6e24a39b728707422bfb (patch) | |
tree | 46134f828fb97d3b1704170c6b7996dce981de26 | |
parent | 3f2d1658a759692af19a0867100bd777a3d93184 (diff) |
ARM: dts: AM33XX: Use pinctrl constants
Using constants for pinctrl allows a better readability, and removes
redundancy with comments.
Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch>
Tested-by: Afzal Mohammed <afzal@ti.com>
Signed-off-by: Benoit Cousson <benoit.cousson@linaro.org>
-rw-r--r-- | arch/arm/boot/dts/am335x-bone.dts | 18 | ||||
-rw-r--r-- | arch/arm/boot/dts/am335x-evm.dts | 58 | ||||
-rw-r--r-- | arch/arm/boot/dts/am335x-evmsk.dts | 26 | ||||
-rw-r--r-- | arch/arm/boot/dts/am33xx.dtsi | 1 |
4 files changed, 52 insertions, 51 deletions
diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts index 5bfb7dd640c2..fd48173dae09 100644 --- a/arch/arm/boot/dts/am335x-bone.dts +++ b/arch/arm/boot/dts/am335x-bone.dts | |||
@@ -30,30 +30,30 @@ | |||
30 | 30 | ||
31 | user_leds_s0: user_leds_s0 { | 31 | user_leds_s0: user_leds_s0 { |
32 | pinctrl-single,pins = < | 32 | pinctrl-single,pins = < |
33 | 0x54 0x7 /* gpmc_a5.gpio1_21, OUTPUT | MODE7 */ | 33 | 0x54 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a5.gpio1_21 */ |
34 | 0x58 0x17 /* gpmc_a6.gpio1_22, OUTPUT_PULLUP | MODE7 */ | 34 | 0x58 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* gpmc_a6.gpio1_22 */ |
35 | 0x5c 0x7 /* gpmc_a7.gpio1_23, OUTPUT | MODE7 */ | 35 | 0x5c (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a7.gpio1_23 */ |
36 | 0x60 0x17 /* gpmc_a8.gpio1_24, OUTPUT_PULLUP | MODE7 */ | 36 | 0x60 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* gpmc_a8.gpio1_24 */ |
37 | >; | 37 | >; |
38 | }; | 38 | }; |
39 | 39 | ||
40 | i2c0_pins: pinmux_i2c0_pins { | 40 | i2c0_pins: pinmux_i2c0_pins { |
41 | pinctrl-single,pins = < | 41 | pinctrl-single,pins = < |
42 | 0x188 0x30 /* i2c0_sda.i2c0_sda PULLUP | INPUTENABLE | MODE0 */ | 42 | 0x188 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_sda.i2c0_sda */ |
43 | 0x18c 0x30 /* i2c0_scl.i2c0_scl PULLUP | INPUTENABLE | MODE0 */ | 43 | 0x18c (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_scl.i2c0_scl */ |
44 | >; | 44 | >; |
45 | }; | 45 | }; |
46 | 46 | ||
47 | uart0_pins: pinmux_uart0_pins { | 47 | uart0_pins: pinmux_uart0_pins { |
48 | pinctrl-single,pins = < | 48 | pinctrl-single,pins = < |
49 | 0x170 0x30 /* uart0_rxd.uart0_rxd PULLUP | INPUTENABLE | MODE0 */ | 49 | 0x170 (PIN_INPUT_PULLUP | MUX_MODE0) /* uart0_rxd.uart0_rxd */ |
50 | 0x174 0x00 /* uart0_txd.uart0_txd PULLDOWN | MODE0 */ | 50 | 0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */ |
51 | >; | 51 | >; |
52 | }; | 52 | }; |
53 | 53 | ||
54 | clkout2_pin: pinmux_clkout2_pin { | 54 | clkout2_pin: pinmux_clkout2_pin { |
55 | pinctrl-single,pins = < | 55 | pinctrl-single,pins = < |
56 | 0x1b4 0x03 /* xdma_event_intr1.clkout2 OMAP_MUX_MODE3 | AM33XX_PIN_OUTPUT */ | 56 | 0x1b4 (PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr1.clkout2 */ |
57 | >; | 57 | >; |
58 | }; | 58 | }; |
59 | }; | 59 | }; |
diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts index b74dbdf9253b..2c5324703c7b 100644 --- a/arch/arm/boot/dts/am335x-evm.dts +++ b/arch/arm/boot/dts/am335x-evm.dts | |||
@@ -30,65 +30,65 @@ | |||
30 | 30 | ||
31 | matrix_keypad_s0: matrix_keypad_s0 { | 31 | matrix_keypad_s0: matrix_keypad_s0 { |
32 | pinctrl-single,pins = < | 32 | pinctrl-single,pins = < |
33 | 0x54 0x7 /* gpmc_a5.gpio1_21, OUTPUT | MODE7 */ | 33 | 0x54 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a5.gpio1_21 */ |
34 | 0x58 0x7 /* gpmc_a6.gpio1_22, OUTPUT | MODE7 */ | 34 | 0x58 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a6.gpio1_22 */ |
35 | 0x64 0x27 /* gpmc_a9.gpio1_25, INPUT | MODE7 */ | 35 | 0x64 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_a9.gpio1_25 */ |
36 | 0x68 0x27 /* gpmc_a10.gpio1_26, INPUT | MODE7 */ | 36 | 0x68 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_a10.gpio1_26 */ |
37 | 0x6c 0x27 /* gpmc_a11.gpio1_27, INPUT | MODE7 */ | 37 | 0x6c (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_a11.gpio1_27 */ |
38 | >; | 38 | >; |
39 | }; | 39 | }; |
40 | 40 | ||
41 | volume_keys_s0: volume_keys_s0 { | 41 | volume_keys_s0: volume_keys_s0 { |
42 | pinctrl-single,pins = < | 42 | pinctrl-single,pins = < |
43 | 0x150 0x27 /* spi0_sclk.gpio0_2, INPUT | MODE7 */ | 43 | 0x150 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* spi0_sclk.gpio0_2 */ |
44 | 0x154 0x27 /* spi0_d0.gpio0_3, INPUT | MODE7 */ | 44 | 0x154 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* spi0_d0.gpio0_3 */ |
45 | >; | 45 | >; |
46 | }; | 46 | }; |
47 | 47 | ||
48 | i2c0_pins: pinmux_i2c0_pins { | 48 | i2c0_pins: pinmux_i2c0_pins { |
49 | pinctrl-single,pins = < | 49 | pinctrl-single,pins = < |
50 | 0x188 0x30 /* i2c0_sda.i2c0_sda PULLUP | INPUTENABLE | MODE0 */ | 50 | 0x188 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_sda.i2c0_sda */ |
51 | 0x18c 0x30 /* i2c0_scl.i2c0_scl PULLUP | INPUTENABLE | MODE0 */ | 51 | 0x18c (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_scl.i2c0_scl */ |
52 | >; | 52 | >; |
53 | }; | 53 | }; |
54 | 54 | ||
55 | i2c1_pins: pinmux_i2c1_pins { | 55 | i2c1_pins: pinmux_i2c1_pins { |
56 | pinctrl-single,pins = < | 56 | pinctrl-single,pins = < |
57 | 0x158 0x32 /* spi0_d1.i2c1_sda PULLUP | INPUTENABLE | MODE2 */ | 57 | 0x158 (PIN_INPUT_PULLUP | MUX_MODE2) /* spi0_d1.i2c1_sda */ |
58 | 0x15c 0x32 /* spi0_cs0.i2c1_scl PULLUP | INPUTENABLE | MODE2 */ | 58 | 0x15c (PIN_INPUT_PULLUP | MUX_MODE2) /* spi0_cs0.i2c1_scl */ |
59 | >; | 59 | >; |
60 | }; | 60 | }; |
61 | 61 | ||
62 | uart0_pins: pinmux_uart0_pins { | 62 | uart0_pins: pinmux_uart0_pins { |
63 | pinctrl-single,pins = < | 63 | pinctrl-single,pins = < |
64 | 0x170 0x30 /* uart0_rxd.uart0_rxd PULLUP | INPUTENABLE | MODE0 */ | 64 | 0x170 (PIN_INPUT_PULLUP | MUX_MODE0) /* uart0_rxd.uart0_rxd */ |
65 | 0x174 0x00 /* uart0_txd.uart0_txd PULLDOWN | MODE0 */ | 65 | 0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */ |
66 | >; | 66 | >; |
67 | }; | 67 | }; |
68 | 68 | ||
69 | clkout2_pin: pinmux_clkout2_pin { | 69 | clkout2_pin: pinmux_clkout2_pin { |
70 | pinctrl-single,pins = < | 70 | pinctrl-single,pins = < |
71 | 0x1b4 0x03 /* xdma_event_intr1.clkout2 OMAP_MUX_MODE3 | AM33XX_PIN_OUTPUT */ | 71 | 0x1b4 (PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr1.clkout2 */ |
72 | >; | 72 | >; |
73 | }; | 73 | }; |
74 | 74 | ||
75 | nandflash_pins_s0: nandflash_pins_s0 { | 75 | nandflash_pins_s0: nandflash_pins_s0 { |
76 | pinctrl-single,pins = < | 76 | pinctrl-single,pins = < |
77 | 0x0 0x30 /* gpmc_ad0.gpmc_ad0, INPUT | PULLUP | MODE0 */ | 77 | 0x0 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad0.gpmc_ad0 */ |
78 | 0x4 0x30 /* gpmc_ad1.gpmc_ad1, INPUT | PULLUP | MODE0 */ | 78 | 0x4 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad1.gpmc_ad1 */ |
79 | 0x8 0x30 /* gpmc_ad2.gpmc_ad2, INPUT | PULLUP | MODE0 */ | 79 | 0x8 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad2.gpmc_ad2 */ |
80 | 0xc 0x30 /* gpmc_ad3.gpmc_ad3, INPUT | PULLUP | MODE0 */ | 80 | 0xc (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad3.gpmc_ad3 */ |
81 | 0x10 0x30 /* gpmc_ad4.gpmc_ad4, INPUT | PULLUP | MODE0 */ | 81 | 0x10 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad4.gpmc_ad4 */ |
82 | 0x14 0x30 /* gpmc_ad5.gpmc_ad5, INPUT | PULLUP | MODE0 */ | 82 | 0x14 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad5.gpmc_ad5 */ |
83 | 0x18 0x30 /* gpmc_ad6.gpmc_ad6, INPUT | PULLUP | MODE0 */ | 83 | 0x18 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad6.gpmc_ad6 */ |
84 | 0x1c 0x30 /* gpmc_ad7.gpmc_ad7, INPUT | PULLUP | MODE0 */ | 84 | 0x1c (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad7.gpmc_ad7 */ |
85 | 0x70 0x30 /* gpmc_wait0.gpmc_wait0, INPUT | PULLUP | MODE0 */ | 85 | 0x70 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_wait0.gpmc_wait0 */ |
86 | 0x74 0x37 /* gpmc_wpn.gpio0_30, INPUT | PULLUP | MODE7 */ | 86 | 0x74 (PIN_INPUT_PULLUP | MUX_MODE7) /* gpmc_wpn.gpio0_30 */ |
87 | 0x7c 0x8 /* gpmc_csn0.gpmc_csn0, PULL DISA */ | 87 | 0x7c (PIN_OUTPUT | MUX_MODE0) /* gpmc_csn0.gpmc_csn0 */ |
88 | 0x90 0x8 /* gpmc_advn_ale.gpmc_advn_ale, PULL DISA */ | 88 | 0x90 (PIN_OUTPUT | MUX_MODE0) /* gpmc_advn_ale.gpmc_advn_ale */ |
89 | 0x94 0x8 /* gpmc_oen_ren.gpmc_oen_ren, PULL DISA */ | 89 | 0x94 (PIN_OUTPUT | MUX_MODE0) /* gpmc_oen_ren.gpmc_oen_ren */ |
90 | 0x98 0x8 /* gpmc_wen.gpmc_wen, PULL DISA */ | 90 | 0x98 (PIN_OUTPUT | MUX_MODE0) /* gpmc_wen.gpmc_wen */ |
91 | 0x9c 0x8 /* gpmc_be0n_cle.gpmc_be0n_cle, PULL DISA */ | 91 | 0x9c (PIN_OUTPUT | MUX_MODE0) /* gpmc_be0n_cle.gpmc_be0n_cle */ |
92 | >; | 92 | >; |
93 | }; | 93 | }; |
94 | }; | 94 | }; |
diff --git a/arch/arm/boot/dts/am335x-evmsk.dts b/arch/arm/boot/dts/am335x-evmsk.dts index 16d17d6f4d7f..338b68188349 100644 --- a/arch/arm/boot/dts/am335x-evmsk.dts +++ b/arch/arm/boot/dts/am335x-evmsk.dts | |||
@@ -36,39 +36,39 @@ | |||
36 | 36 | ||
37 | user_leds_s0: user_leds_s0 { | 37 | user_leds_s0: user_leds_s0 { |
38 | pinctrl-single,pins = < | 38 | pinctrl-single,pins = < |
39 | 0x10 0x7 /* gpmc_ad4.gpio1_4, OUTPUT | MODE7 */ | 39 | 0x10 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad4.gpio1_4 */ |
40 | 0x14 0x7 /* gpmc_ad5.gpio1_5, OUTPUT | MODE7 */ | 40 | 0x14 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad5.gpio1_5 */ |
41 | 0x18 0x7 /* gpmc_ad6.gpio1_6, OUTPUT | MODE7 */ | 41 | 0x18 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad6.gpio1_6 */ |
42 | 0x1c 0x7 /* gpmc_ad7.gpio1_7, OUTPUT | MODE7 */ | 42 | 0x1c (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad7.gpio1_7 */ |
43 | >; | 43 | >; |
44 | }; | 44 | }; |
45 | 45 | ||
46 | gpio_keys_s0: gpio_keys_s0 { | 46 | gpio_keys_s0: gpio_keys_s0 { |
47 | pinctrl-single,pins = < | 47 | pinctrl-single,pins = < |
48 | 0x94 0x27 /* gpmc_oen_ren.gpio2_3, INPUT | MODE7 */ | 48 | 0x94 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_oen_ren.gpio2_3 */ |
49 | 0x90 0x27 /* gpmc_advn_ale.gpio2_2, INPUT | MODE7 */ | 49 | 0x90 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_advn_ale.gpio2_2 */ |
50 | 0x70 0x27 /* gpmc_wait0.gpio0_30, INPUT | MODE7 */ | 50 | 0x70 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_wait0.gpio0_30 */ |
51 | 0x9c 0x27 /* gpmc_ben0_cle.gpio2_5, INPUT | MODE7 */ | 51 | 0x9c (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ben0_cle.gpio2_5 */ |
52 | >; | 52 | >; |
53 | }; | 53 | }; |
54 | 54 | ||
55 | i2c0_pins: pinmux_i2c0_pins { | 55 | i2c0_pins: pinmux_i2c0_pins { |
56 | pinctrl-single,pins = < | 56 | pinctrl-single,pins = < |
57 | 0x188 0x30 /* i2c0_sda.i2c0_sda PULLUP | INPUTENABLE | MODE0 */ | 57 | 0x188 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_sda.i2c0_sda */ |
58 | 0x18c 0x30 /* i2c0_scl.i2c0_scl PULLUP | INPUTENABLE | MODE0 */ | 58 | 0x18c (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_scl.i2c0_scl */ |
59 | >; | 59 | >; |
60 | }; | 60 | }; |
61 | 61 | ||
62 | uart0_pins: pinmux_uart0_pins { | 62 | uart0_pins: pinmux_uart0_pins { |
63 | pinctrl-single,pins = < | 63 | pinctrl-single,pins = < |
64 | 0x170 0x30 /* uart0_rxd.uart0_rxd PULLUP | INPUTENABLE | MODE0 */ | 64 | 0x170 (PIN_INPUT_PULLUP | MUX_MODE0) /* uart0_rxd.uart0_rxd */ |
65 | 0x174 0x00 /* uart0_txd.uart0_txd PULLDOWN | MODE0 */ | 65 | 0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */ |
66 | >; | 66 | >; |
67 | }; | 67 | }; |
68 | 68 | ||
69 | clkout2_pin: pinmux_clkout2_pin { | 69 | clkout2_pin: pinmux_clkout2_pin { |
70 | pinctrl-single,pins = < | 70 | pinctrl-single,pins = < |
71 | 0x1b4 0x03 /* xdma_event_intr1.clkout2 OMAP_MUX_MODE3 | AM33XX_PIN_OUTPUT */ | 71 | 0x1b4 (PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr1.clkout2 */ |
72 | >; | 72 | >; |
73 | }; | 73 | }; |
74 | }; | 74 | }; |
diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi index d62feb2db350..7334642fd74d 100644 --- a/arch/arm/boot/dts/am33xx.dtsi +++ b/arch/arm/boot/dts/am33xx.dtsi | |||
@@ -9,6 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <dt-bindings/gpio/gpio.h> | 11 | #include <dt-bindings/gpio/gpio.h> |
12 | #include <dt-bindings/pinctrl/am33xx.h> | ||
12 | 13 | ||
13 | #include "skeleton.dtsi" | 14 | #include "skeleton.dtsi" |
14 | 15 | ||