linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2 0/2] ARM: bcm2835: Fix names for the Raspberry Pi GPIO lines
@ 2016-11-16 17:52 Stefan Wahren
  2016-11-16 17:52 ` [PATCH V2 1/2] " Stefan Wahren
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Stefan Wahren @ 2016-11-16 17:52 UTC (permalink / raw)
  To: Stephen Warren, Eric Anholt, Lee Jones, Linus Walleij
  Cc: Gottfried Haider, linux-kernel, bcm-kernel-feedback-list,
	linux-arm-kernel, linux-rpi-kernel, Stefan Wahren

This patch series should fix and extend the patch V4 "ARM: bcm2835: Add names
for the Raspberry Pi GPIO lines" from Linus Walleij and Eric Anholt.

Changes in V2:
  - fix URL to firmware DT blob
  - drop dtsi file since Model A+ and Zero aren't identical

Stefan Wahren (2):
  ARM: bcm2835: Fix names for the Raspberry Pi GPIO lines
  ARM: bcm2835: Add names for the RPi Zero GPIO lines

 arch/arm/boot/dts/bcm2835-rpi-a-plus.dts |    4 +-
 arch/arm/boot/dts/bcm2835-rpi-a.dts      |    4 +-
 arch/arm/boot/dts/bcm2835-rpi-b-plus.dts |    2 +-
 arch/arm/boot/dts/bcm2835-rpi-b.dts      |    4 +-
 arch/arm/boot/dts/bcm2835-rpi-zero.dts   |   65 ++++++++++++++++++++++++++++++
 5 files changed, 72 insertions(+), 7 deletions(-)

-- 
1.7.9.5

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH V2 1/2] ARM: bcm2835: Fix names for the Raspberry Pi GPIO lines
  2016-11-16 17:52 [PATCH V2 0/2] ARM: bcm2835: Fix names for the Raspberry Pi GPIO lines Stefan Wahren
@ 2016-11-16 17:52 ` Stefan Wahren
  2016-11-16 17:52 ` [PATCH V2 2/2] ARM: bcm2835: Add names for the RPi Zero " Stefan Wahren
  2016-11-16 21:57 ` [PATCH V2 0/2] ARM: bcm2835: Fix names for the Raspberry Pi " Eric Anholt
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Wahren @ 2016-11-16 17:52 UTC (permalink / raw)
  To: Stephen Warren, Eric Anholt, Lee Jones, Linus Walleij
  Cc: Gottfried Haider, linux-kernel, bcm-kernel-feedback-list,
	linux-arm-kernel, linux-rpi-kernel, Stefan Wahren

There are some differences between the schematics and the official firmware
DTS [1]. So based on these additional information the following has been
changed:

* use consistent "CAM_GPIO1" for camera LED
* use consistent "CAM_GPIO0" for camera shutdown
* add "USB_LIMIT" for USB current limit (0=600mA, 1=1200mA)

[1] - https://github.com/raspberrypi/firmware/blob/master/extra/dt-blob.dts

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 arch/arm/boot/dts/bcm2835-rpi-a-plus.dts |    4 ++--
 arch/arm/boot/dts/bcm2835-rpi-a.dts      |    4 ++--
 arch/arm/boot/dts/bcm2835-rpi-b-plus.dts |    2 +-
 arch/arm/boot/dts/bcm2835-rpi-b.dts      |    4 ++--
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts b/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts
index 5a22c79..d070454 100644
--- a/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts
+++ b/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts
@@ -63,13 +63,13 @@
 			  "SCL0",
 			  "NC", /* GPIO30 */
 			  "NC", /* GPIO31 */
-			  "NC", /* GPIO32 */
+			  "CAM_GPIO1", /* GPIO32 */
 			  "NC", /* GPIO33 */
 			  "NC", /* GPIO34 */
 			  "PWR_LOW_N", /* GPIO35 */
 			  "NC", /* GPIO36 */
 			  "NC", /* GPIO37 */
-			  "NC", /* GPIO38 */
+			  "USB_LIMIT", /* GPIO38 */
 			  "NC", /* GPIO39 */
 			  "PWM0_OUT", /* GPIO40 */
 			  "CAM_GPIO0", /* GPIO41 */
diff --git a/arch/arm/boot/dts/bcm2835-rpi-a.dts b/arch/arm/boot/dts/bcm2835-rpi-a.dts
index 54f98c5..46d078e 100644
--- a/arch/arm/boot/dts/bcm2835-rpi-a.dts
+++ b/arch/arm/boot/dts/bcm2835-rpi-a.dts
@@ -29,7 +29,7 @@
 			  "SDA1",
 			  "SCL1",
 			  "GPIO_GCLK",
-			  "CAM_CLK",
+			  "CAM_GPIO1",
 			  "LAN_RUN",
 			  "SPI_CE1_N",
 			  "SPI_CE0_N",
@@ -52,7 +52,7 @@
 			  "GPIO24",
 			  "GPIO25",
 			  "NC", /* GPIO26 */
-			  "CAM_GPIO",
+			  "CAM_GPIO0",
 			  /* Binary number representing build/revision */
 			  "CONFIG0",
 			  "CONFIG1",
diff --git a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
index b67587e..432088e 100644
--- a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
+++ b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
@@ -71,7 +71,7 @@
 			  "PWR_LOW_N", /* GPIO35 */
 			  "NC", /* GPIO36 */
 			  "NC", /* GPIO37 */
-			  "NC", /* GPIO38 */
+			  "USB_LIMIT", /* GPIO38 */
 			  "NC", /* GPIO39 */
 			  "PWM0_OUT", /* GPIO40 */
 			  "CAM_GPIO0", /* GPIO41 */
diff --git a/arch/arm/boot/dts/bcm2835-rpi-b.dts b/arch/arm/boot/dts/bcm2835-rpi-b.dts
index 71f50e1..4d56fe3 100644
--- a/arch/arm/boot/dts/bcm2835-rpi-b.dts
+++ b/arch/arm/boot/dts/bcm2835-rpi-b.dts
@@ -30,7 +30,7 @@
 			  "SDA1",
 			  "SCL1",
 			  "GPIO_GCLK",
-			  "CAM_CLK",
+			  "CAM_GPIO1",
 			  "LAN_RUN",
 			  "SPI_CE1_N",
 			  "SPI_CE0_N",
@@ -53,7 +53,7 @@
 			  "GPIO24",
 			  "GPIO25",
 			  "NC", /* GPIO26 */
-			  "CAM_GPIO",
+			  "CAM_GPIO0",
 			  /* Binary number representing build/revision */
 			  "CONFIG0",
 			  "CONFIG1",
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH V2 2/2] ARM: bcm2835: Add names for the RPi Zero GPIO lines
  2016-11-16 17:52 [PATCH V2 0/2] ARM: bcm2835: Fix names for the Raspberry Pi GPIO lines Stefan Wahren
  2016-11-16 17:52 ` [PATCH V2 1/2] " Stefan Wahren
@ 2016-11-16 17:52 ` Stefan Wahren
  2016-11-16 21:57 ` [PATCH V2 0/2] ARM: bcm2835: Fix names for the Raspberry Pi " Eric Anholt
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Wahren @ 2016-11-16 17:52 UTC (permalink / raw)
  To: Stephen Warren, Eric Anholt, Lee Jones, Linus Walleij
  Cc: Gottfried Haider, linux-kernel, bcm-kernel-feedback-list,
	linux-arm-kernel, linux-rpi-kernel, Stefan Wahren

This adds the GPIO names for the Raspberry Pi Zero. The GPIO lines
of the RPi Zero are almost identical to the Model A+ except:

* GPIO 35, 38, 40 and 45 are not connected
* Status LED is active low

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 arch/arm/boot/dts/bcm2835-rpi-zero.dts |   65 ++++++++++++++++++++++++++++++++
 1 file changed, 65 insertions(+)

diff --git a/arch/arm/boot/dts/bcm2835-rpi-zero.dts b/arch/arm/boot/dts/bcm2835-rpi-zero.dts
index 7c1c180..fa7997a 100644
--- a/arch/arm/boot/dts/bcm2835-rpi-zero.dts
+++ b/arch/arm/boot/dts/bcm2835-rpi-zero.dts
@@ -26,6 +26,71 @@
 };
 
 &gpio {
+	/*
+	 * This is based on the official GPU firmware DT blob.
+	 *
+	 * Legend:
+	 * "NC" = not connected (no rail from the SoC)
+	 * "FOO" = GPIO line named "FOO" on the schematic
+	 * "FOO_N" = GPIO line named "FOO" on schematic, active low
+	 */
+	gpio-line-names = "SDA0",
+			  "SCL0",
+			  "SDA1",
+			  "SCL1",
+			  "GPIO_GCLK",
+			  "GPIO5",
+			  "GPIO6",
+			  "SPI_CE1_N",
+			  "SPI_CE0_N",
+			  "SPI_MISO",
+			  "SPI_MOSI",
+			  "SPI_SCLK",
+			  "GPIO12",
+			  "GPIO13",
+			  /* Serial port */
+			  "TXD0",
+			  "RXD0",
+			  "GPIO16",
+			  "GPIO17",
+			  "GPIO18",
+			  "GPIO19",
+			  "GPIO20",
+			  "GPIO21",
+			  "GPIO22",
+			  "GPIO23",
+			  "GPIO24",
+			  "GPIO25",
+			  "GPIO26",
+			  "GPIO27",
+			  "SDA0",
+			  "SCL0",
+			  "NC", /* GPIO30 */
+			  "NC", /* GPIO31 */
+			  "CAM_GPIO1", /* GPIO32 */
+			  "NC", /* GPIO33 */
+			  "NC", /* GPIO34 */
+			  "NC", /* GPIO35 */
+			  "NC", /* GPIO36 */
+			  "NC", /* GPIO37 */
+			  "NC", /* GPIO38 */
+			  "NC", /* GPIO39 */
+			  "NC", /* GPIO40 */
+			  "CAM_GPIO0", /* GPIO41 */
+			  "NC", /* GPIO42 */
+			  "NC", /* GPIO43 */
+			  "NC", /* GPIO44 */
+			  "NC", /* GPIO45 */
+			  "HDMI_HPD_N",
+			  "STATUS_LED_N",
+			  /* Used by SD Card */
+			  "SD_CLK_R",
+			  "SD_CMD_R",
+			  "SD_DATA0_R",
+			  "SD_DATA1_R",
+			  "SD_DATA2_R",
+			  "SD_DATA3_R";
+
 	pinctrl-0 = <&gpioout &alt0 &i2s_alt0>;
 
 	/* I2S interface */
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH V2 0/2] ARM: bcm2835: Fix names for the Raspberry Pi GPIO lines
  2016-11-16 17:52 [PATCH V2 0/2] ARM: bcm2835: Fix names for the Raspberry Pi GPIO lines Stefan Wahren
  2016-11-16 17:52 ` [PATCH V2 1/2] " Stefan Wahren
  2016-11-16 17:52 ` [PATCH V2 2/2] ARM: bcm2835: Add names for the RPi Zero " Stefan Wahren
@ 2016-11-16 21:57 ` Eric Anholt
  2 siblings, 0 replies; 4+ messages in thread
From: Eric Anholt @ 2016-11-16 21:57 UTC (permalink / raw)
  To: Stefan Wahren, Stephen Warren, Lee Jones, Linus Walleij
  Cc: Gottfried Haider, linux-kernel, bcm-kernel-feedback-list,
	linux-arm-kernel, linux-rpi-kernel, Stefan Wahren

[-- Attachment #1: Type: text/plain, Size: 332 bytes --]

Stefan Wahren <stefan.wahren@i2se.com> writes:

> This patch series should fix and extend the patch V4 "ARM: bcm2835: Add names
> for the Raspberry Pi GPIO lines" from Linus Walleij and Eric Anholt.
>
> Changes in V2:
>   - fix URL to firmware DT blob
>   - drop dtsi file since Model A+ and Zero aren't identical

Pulled.  Thanks!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 800 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-11-16 21:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-16 17:52 [PATCH V2 0/2] ARM: bcm2835: Fix names for the Raspberry Pi GPIO lines Stefan Wahren
2016-11-16 17:52 ` [PATCH V2 1/2] " Stefan Wahren
2016-11-16 17:52 ` [PATCH V2 2/2] ARM: bcm2835: Add names for the RPi Zero " Stefan Wahren
2016-11-16 21:57 ` [PATCH V2 0/2] ARM: bcm2835: Fix names for the Raspberry Pi " Eric Anholt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).