1 From 21ff843931b2e5a9b628ac56fd0f2e4355890096 Mon Sep 17 00:00:00 2001
2 From: Eric Anholt <eric@anholt.net>
3 Date: Mon, 19 Sep 2016 10:43:18 +0200
4 Subject: [PATCH] ARM: dts: bcm283x: Define standard pinctrl groups in the gpio
7 The BCM2835-ARM-Peripherals.pdf documentation specifies what the
8 function selects do for the pins, and there are a bunch of obvious
9 groupings to be made. With these created, we'll be able to replace
10 bcm2835-rpi.dtsi's main "set all of these pins to alt0" with
11 references to specific groups we want enabled.
13 Also add pinctrl groups for emmc and sdhost.
15 Based on patches by Eric Anholt, with fixups by Gerd Hoffmann.
17 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
18 Signed-off-by: Eric Anholt <eric@anholt.net>
19 Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
21 arch/arm/boot/dts/bcm283x.dtsi | 203 +++++++++++++++++++++++++++++++++++++++++
22 1 file changed, 203 insertions(+)
24 --- a/arch/arm/boot/dts/bcm283x.dtsi
25 +++ b/arch/arm/boot/dts/bcm283x.dtsi
29 #interrupt-cells = <2>;
31 + /* Defines pin muxing groups according to
32 + * BCM2835-ARM-Peripherals.pdf page 102.
34 + * While each pin can have its mux selected
35 + * for various functions individually, some
36 + * groups only make sense to switch to a
37 + * particular function together.
39 + dpi_gpio0: dpi_gpio0 {
40 + brcm,pins = <0 1 2 3 4 5 6 7 8 9 10 11
41 + 12 13 14 15 16 17 18 19
42 + 20 21 22 23 24 25 26 27>;
43 + brcm,function = <BCM2835_FSEL_ALT2>;
45 + emmc_gpio22: emmc_gpio22 {
46 + brcm,pins = <22 23 24 25 26 27>;
47 + brcm,function = <BCM2835_FSEL_ALT3>;
49 + emmc_gpio34: emmc_gpio34 {
50 + brcm,pins = <34 35 36 37 38 39>;
51 + brcm,function = <BCM2835_FSEL_ALT3>;
52 + brcm,pull = <BCM2835_PUD_OFF
59 + emmc_gpio48: emmc_gpio48 {
60 + brcm,pins = <48 49 50 51 52 53>;
61 + brcm,function = <BCM2835_FSEL_ALT3>;
64 + gpclk0_gpio4: gpclk0_gpio4 {
66 + brcm,function = <BCM2835_FSEL_ALT0>;
68 + gpclk1_gpio5: gpclk1_gpio5 {
70 + brcm,function = <BCM2835_FSEL_ALT0>;
72 + gpclk1_gpio42: gpclk1_gpio42 {
74 + brcm,function = <BCM2835_FSEL_ALT0>;
76 + gpclk1_gpio44: gpclk1_gpio44 {
78 + brcm,function = <BCM2835_FSEL_ALT0>;
80 + gpclk2_gpio6: gpclk2_gpio6 {
82 + brcm,function = <BCM2835_FSEL_ALT0>;
84 + gpclk2_gpio43: gpclk2_gpio43 {
86 + brcm,function = <BCM2835_FSEL_ALT0>;
89 + i2c0_gpio0: i2c0_gpio0 {
91 + brcm,function = <BCM2835_FSEL_ALT0>;
93 + i2c0_gpio32: i2c0_gpio32 {
94 + brcm,pins = <32 34>;
95 + brcm,function = <BCM2835_FSEL_ALT0>;
97 + i2c0_gpio44: i2c0_gpio44 {
98 + brcm,pins = <44 45>;
99 + brcm,function = <BCM2835_FSEL_ALT1>;
101 + i2c1_gpio2: i2c1_gpio2 {
103 + brcm,function = <BCM2835_FSEL_ALT0>;
105 + i2c1_gpio44: i2c1_gpio44 {
106 + brcm,pins = <44 45>;
107 + brcm,function = <BCM2835_FSEL_ALT2>;
109 + i2c_slave_gpio18: i2c_slave_gpio18 {
110 + brcm,pins = <18 19 20 21>;
111 + brcm,function = <BCM2835_FSEL_ALT3>;
114 + jtag_gpio4: jtag_gpio4 {
115 + brcm,pins = <4 5 6 12 13>;
116 + brcm,function = <BCM2835_FSEL_ALT4>;
118 + jtag_gpio22: jtag_gpio22 {
119 + brcm,pins = <22 23 24 25 26 27>;
120 + brcm,function = <BCM2835_FSEL_ALT4>;
123 + pcm_gpio18: pcm_gpio18 {
124 + brcm,pins = <18 19 20 21>;
125 + brcm,function = <BCM2835_FSEL_ALT0>;
127 + pcm_gpio28: pcm_gpio28 {
128 + brcm,pins = <28 29 30 31>;
129 + brcm,function = <BCM2835_FSEL_ALT2>;
132 + pwm0_gpio12: pwm0_gpio12 {
134 + brcm,function = <BCM2835_FSEL_ALT0>;
136 + pwm0_gpio18: pwm0_gpio18 {
138 + brcm,function = <BCM2835_FSEL_ALT5>;
140 + pwm0_gpio40: pwm0_gpio40 {
142 + brcm,function = <BCM2835_FSEL_ALT0>;
144 + pwm1_gpio13: pwm1_gpio13 {
146 + brcm,function = <BCM2835_FSEL_ALT0>;
148 + pwm1_gpio19: pwm1_gpio19 {
150 + brcm,function = <BCM2835_FSEL_ALT5>;
152 + pwm1_gpio41: pwm1_gpio41 {
154 + brcm,function = <BCM2835_FSEL_ALT0>;
156 + pwm1_gpio45: pwm1_gpio45 {
158 + brcm,function = <BCM2835_FSEL_ALT0>;
161 + sdhost_gpio48: sdhost_gpio48 {
162 + brcm,pins = <48 49 50 51 52 53>;
163 + brcm,function = <BCM2835_FSEL_ALT0>;
166 + spi0_gpio7: spi0_gpio7 {
167 + brcm,pins = <7 8 9 10 11>;
168 + brcm,function = <BCM2835_FSEL_ALT0>;
170 + spi0_gpio35: spi0_gpio35 {
171 + brcm,pins = <35 36 37 38 39>;
172 + brcm,function = <BCM2835_FSEL_ALT0>;
174 + spi1_gpio16: spi1_gpio16 {
175 + brcm,pins = <16 17 18 19 20 21>;
176 + brcm,function = <BCM2835_FSEL_ALT4>;
178 + spi2_gpio40: spi2_gpio40 {
179 + brcm,pins = <40 41 42 43 44 45>;
180 + brcm,function = <BCM2835_FSEL_ALT4>;
183 + uart0_gpio14: uart0_gpio14 {
184 + brcm,pins = <14 15>;
185 + brcm,function = <BCM2835_FSEL_ALT0>;
187 + /* Separate from the uart0_gpio14 group
188 + * because it conflicts with spi1_gpio16, and
189 + * people often run uart0 on the two pins
190 + * without flow contrl.
192 + uart0_ctsrts_gpio16: uart0_ctsrts_gpio16 {
193 + brcm,pins = <16 17>;
194 + brcm,function = <BCM2835_FSEL_ALT3>;
196 + uart0_gpio30: uart0_gpio30 {
197 + brcm,pins = <30 31>;
198 + brcm,function = <BCM2835_FSEL_ALT3>;
200 + uart0_ctsrts_gpio32: uart0_ctsrts_gpio32 {
201 + brcm,pins = <32 33>;
202 + brcm,function = <BCM2835_FSEL_ALT3>;
205 + uart1_gpio14: uart1_gpio14 {
206 + brcm,pins = <14 15>;
207 + brcm,function = <BCM2835_FSEL_ALT5>;
209 + uart1_ctsrts_gpio16: uart1_ctsrts_gpio16 {
210 + brcm,pins = <16 17>;
211 + brcm,function = <BCM2835_FSEL_ALT5>;
213 + uart1_gpio32: uart1_gpio32 {
214 + brcm,pins = <32 33>;
215 + brcm,function = <BCM2835_FSEL_ALT5>;
217 + uart1_ctsrts_gpio30: uart1_ctsrts_gpio30 {
218 + brcm,pins = <30 31>;
219 + brcm,function = <BCM2835_FSEL_ALT5>;
221 + uart1_gpio36: uart1_gpio36 {
222 + brcm,pins = <36 37 38 39>;
223 + brcm,function = <BCM2835_FSEL_ALT2>;
225 + uart1_gpio40: uart1_gpio40 {
226 + brcm,pins = <40 41>;
227 + brcm,function = <BCM2835_FSEL_ALT5>;
229 + uart1_ctsrts_gpio42: uart1_ctsrts_gpio42 {
230 + brcm,pins = <42 43>;
231 + brcm,function = <BCM2835_FSEL_ALT5>;
235 uart0: serial@7e201000 {