1 From 731b26a6ac17f24057c559361c6d0cb7cb79baed Mon Sep 17 00:00:00 2001
2 From: Linus Walleij <linus.walleij@linaro.org>
3 Date: Thu, 6 Oct 2016 13:15:02 +0200
4 Subject: [PATCH] ARM: bcm2835: Add names for the Raspberry Pi GPIO lines
6 The idea is to give useful names to GPIO lines that an implementer
7 will be using from userspace, e.g. for maker type projects. These are
8 user-visible using tools/gpio/lsgpio.c
10 v2: Major rewrite by anholt: Flatten each GPIO line to a line in the
11 file for better diffing, prefix all expansion header pins with
12 "P<number>" or "P5HEADER_P<number>" and drop the mostly-unused
13 GPIO_GEN<smallnumber> names in favor of GPIO<socgpionumber>, fix
14 extra '[]' on a couple of lines, fix locations of SD_CARD_DETECT,
15 CAM_GPIO and STATUS_LED, fix HDMI_HPD polarities, rewrite A+ using
16 unreleased schematics.
18 v3: More changes by anholt: Drop P<number> / P5HEADER<number>
19 prefixes. I had been skeptical about adding them, and was
20 convinced to drop them by Gottfried (who probably has more
21 experience with GPIOs in educational contexts than the rest of
22 us). Also drop [] brackets for "is pinmuxed", which didn't seem
23 to clarify, and were ambiguous for things like the SPI_*-labeled
24 pins which may or may not actually be pinmuxed to SPI.
26 v4: Rename B+'s SDA0/SCL0 to match the other boards, despite the
27 naming on its schematic.
29 Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
30 Signed-off-by: Eric Anholt <eric@anholt.net>
32 arch/arm/boot/dts/bcm2835-rpi-a-plus.dts | 65 +++++++++++++++++++++++++++++++
33 arch/arm/boot/dts/bcm2835-rpi-a.dts | 67 ++++++++++++++++++++++++++++++++
34 arch/arm/boot/dts/bcm2835-rpi-b-plus.dts | 66 +++++++++++++++++++++++++++++++
35 arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts | 66 +++++++++++++++++++++++++++++++
36 arch/arm/boot/dts/bcm2835-rpi-b.dts | 67 ++++++++++++++++++++++++++++++++
37 5 files changed, 331 insertions(+)
39 --- a/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts
40 +++ b/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts
46 + * This is based on the unreleased schematic for the Model A+.
49 + * "NC" = not connected (no rail from the SoC)
50 + * "FOO" = GPIO line named "FOO" on the schematic
51 + * "FOO_N" = GPIO line named "FOO" on schematic, active low
53 + gpio-line-names = "SDA0",
89 + "PWR_LOW_N", /* GPIO35 */
94 + "PWM0_OUT", /* GPIO40 */
95 + "CAM_GPIO0", /* GPIO41 */
99 + "PWM1_OUT", /* GPIO45 */
102 + /* Used by SD Card */
110 pinctrl-0 = <&gpioout &alt0 &i2s_alt0>;
113 --- a/arch/arm/boot/dts/bcm2835-rpi-a.dts
114 +++ b/arch/arm/boot/dts/bcm2835-rpi-a.dts
120 + * Taken from Raspberry-Pi-Rev-1.0-Model-AB-Schematics.pdf
121 + * RPI00021 sheet 02
124 + * "NC" = not connected (no rail from the SoC)
125 + * "FOO" = GPIO line named "FOO" on the schematic
126 + * "FOO_N" = GPIO line named "FOO" on schematic, active low
128 + gpio-line-names = "SDA0",
157 + /* Binary number representing build/revision */
178 + /* Used by SD Card */
186 pinctrl-0 = <&gpioout &alt0 &i2s_alt2>;
189 --- a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
190 +++ b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
196 + * Taken from Raspberry-Pi-B-Plus-V1.2-Schematics.pdf
197 + * RPI-BPLUS sheet 1
200 + * "NC" = not connected (no rail from the SoC)
201 + * "FOO" = GPIO line named "FOO" on the schematic
202 + * "FOO_N" = GPIO line named "FOO" on schematic, active low
204 + gpio-line-names = "SDA0",
236 + "LAN_RUN", /* GPIO31 */
237 + "CAM_GPIO1", /* GPIO32 */
240 + "PWR_LOW_N", /* GPIO35 */
245 + "PWM0_OUT", /* GPIO40 */
246 + "CAM_GPIO0", /* GPIO41 */
249 + "ETHCLK", /* GPIO44 */
250 + "PWM1_OUT", /* GPIO45 */
253 + /* Used by SD Card */
261 pinctrl-0 = <&gpioout &alt0 &i2s_alt0>;
264 --- a/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
265 +++ b/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
271 + * Taken from Raspberry-Pi-Rev-2.0-Model-AB-Schematics.pdf
272 + * RPI00022 sheet 02
275 + * "NC" = not connected (no rail from the SoC)
276 + * "FOO" = GPIO line named "FOO" on the schematic
277 + * "FOO_N" = GPIO line named "FOO" on schematic, active low
279 + gpio-line-names = "SDA0",
328 + /* Used by SD Card */
336 pinctrl-0 = <&gpioout &alt0 &i2s_alt2>;
339 --- a/arch/arm/boot/dts/bcm2835-rpi-b.dts
340 +++ b/arch/arm/boot/dts/bcm2835-rpi-b.dts
346 + * Taken from Raspberry-Pi-Rev-1.0-Model-AB-Schematics.pdf
347 + * RPI00021 sheet 02
350 + * "NC" = not connected (no rail from the SoC)
351 + * "FOO" = GPIO line named "FOO" on the schematic
352 + * "FOO_N" = GPIO line named "FOO" on schematic, active low
354 + gpio-line-names = "SDA0",
383 + /* Binary number representing build/revision */
404 + /* Used by SD Card */
412 pinctrl-0 = <&gpioout &alt0>;