Skip to content

Commit

Permalink
ARM: dts: Standardise downstream Pi GPIO pin names
Browse files Browse the repository at this point in the history
Standardise the names of the pins on the 40-pin GPIO header. This makes
it easier to use libgpiod (and the gpiod tools) for cross-platform GPIO
manipulation.

Signed-off-by: Phil Elwell <[email protected]>
  • Loading branch information
pelwell authored and popcornmix committed Mar 5, 2024
1 parent 0c9ea16 commit bd9542b
Show file tree
Hide file tree
Showing 12 changed files with 252 additions and 137 deletions.
21 changes: 10 additions & 11 deletions arch/arm/boot/dts/broadcom/bcm2708-rpi-b-plus.dts
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,20 @@
*/
gpio-line-names = "ID_SDA",
"ID_SCL",
"SDA1",
"SCL1",
"GPIO_GCLK",
"GPIO2",
"GPIO3",
"GPIO4",
"GPIO5",
"GPIO6",
"SPI_CE1_N",
"SPI_CE0_N",
"SPI_MISO",
"SPI_MOSI",
"SPI_SCLK",
"GPIO7",
"GPIO8",
"GPIO9",
"GPIO10",
"GPIO11",
"GPIO12",
"GPIO13",
/* Serial port */
"TXD0",
"RXD0",
"GPIO14",
"GPIO15",
"GPIO16",
"GPIO17",
"GPIO18",
Expand Down
21 changes: 10 additions & 11 deletions arch/arm/boot/dts/broadcom/bcm2708-rpi-zero-w.dts
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,20 @@
*/
gpio-line-names = "ID_SDA",
"ID_SCL",
"SDA1",
"SCL1",
"GPIO_GCLK",
"GPIO2",
"GPIO3",
"GPIO4",
"GPIO5",
"GPIO6",
"SPI_CE1_N",
"SPI_CE0_N",
"SPI_MISO",
"SPI_MOSI",
"SPI_SCLK",
"GPIO7",
"GPIO8",
"GPIO9",
"GPIO10",
"GPIO11",
"GPIO12",
"GPIO13",
/* Serial port */
"TXD1",
"RXD1",
"GPIO14",
"GPIO15",
"GPIO16",
"GPIO17",
"GPIO18",
Expand Down
21 changes: 10 additions & 11 deletions arch/arm/boot/dts/broadcom/bcm2708-rpi-zero.dts
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,20 @@
*/
gpio-line-names = "ID_SDA",
"ID_SCL",
"SDA1",
"SCL1",
"GPIO_GCLK",
"GPIO2",
"GPIO3",
"GPIO4",
"GPIO5",
"GPIO6",
"SPI_CE1_N",
"SPI_CE0_N",
"SPI_MISO",
"SPI_MOSI",
"SPI_SCLK",
"GPIO7",
"GPIO8",
"GPIO9",
"GPIO10",
"GPIO11",
"GPIO12",
"GPIO13",
/* Serial port */
"TXD0",
"RXD0",
"GPIO14",
"GPIO15",
"GPIO16",
"GPIO17",
"GPIO18",
Expand Down
21 changes: 10 additions & 11 deletions arch/arm/boot/dts/broadcom/bcm2709-rpi-2-b.dts
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,20 @@
*/
gpio-line-names = "ID_SDA",
"ID_SCL",
"SDA1",
"SCL1",
"GPIO_GCLK",
"GPIO2",
"GPIO3",
"GPIO4",
"GPIO5",
"GPIO6",
"SPI_CE1_N",
"SPI_CE0_N",
"SPI_MISO",
"SPI_MOSI",
"SPI_SCLK",
"GPIO7",
"GPIO8",
"GPIO9",
"GPIO10",
"GPIO11",
"GPIO12",
"GPIO13",
/* Serial port */
"TXD0",
"RXD0",
"GPIO14",
"GPIO15",
"GPIO16",
"GPIO17",
"GPIO18",
Expand Down
21 changes: 10 additions & 11 deletions arch/arm/boot/dts/broadcom/bcm2710-rpi-2-b.dts
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,20 @@
*/
gpio-line-names = "ID_SDA",
"ID_SCL",
"SDA1",
"SCL1",
"GPIO_GCLK",
"GPIO2",
"GPIO3",
"GPIO4",
"GPIO5",
"GPIO6",
"SPI_CE1_N",
"SPI_CE0_N",
"SPI_MISO",
"SPI_MOSI",
"SPI_SCLK",
"GPIO7",
"GPIO8",
"GPIO9",
"GPIO10",
"GPIO11",
"GPIO12",
"GPIO13",
/* Serial port */
"TXD0",
"RXD0",
"GPIO14",
"GPIO15",
"GPIO16",
"GPIO17",
"GPIO18",
Expand Down
21 changes: 10 additions & 11 deletions arch/arm/boot/dts/broadcom/bcm2710-rpi-3-b-plus.dts
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,20 @@
*/
gpio-line-names = "ID_SDA",
"ID_SCL",
"SDA1",
"SCL1",
"GPIO_GCLK",
"GPIO2",
"GPIO3",
"GPIO4",
"GPIO5",
"GPIO6",
"SPI_CE1_N",
"SPI_CE0_N",
"SPI_MISO",
"SPI_MOSI",
"SPI_SCLK",
"GPIO7",
"GPIO8",
"GPIO9",
"GPIO10",
"GPIO11",
"GPIO12",
"GPIO13",
/* Serial port */
"TXD1",
"RXD1",
"GPIO14",
"GPIO15",
"GPIO16",
"GPIO17",
"GPIO18",
Expand Down
21 changes: 10 additions & 11 deletions arch/arm/boot/dts/broadcom/bcm2710-rpi-3-b.dts
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,20 @@
*/
gpio-line-names = "ID_SDA",
"ID_SCL",
"SDA1",
"SCL1",
"GPIO_GCLK",
"GPIO2",
"GPIO3",
"GPIO4",
"GPIO5",
"GPIO6",
"SPI_CE1_N",
"SPI_CE0_N",
"SPI_MISO",
"SPI_MOSI",
"SPI_SCLK",
"GPIO7",
"GPIO8",
"GPIO9",
"GPIO10",
"GPIO11",
"GPIO12",
"GPIO13",
/* Serial port */
"TXD1",
"RXD1",
"GPIO14",
"GPIO15",
"GPIO16",
"GPIO17",
"GPIO18",
Expand Down
21 changes: 10 additions & 11 deletions arch/arm/boot/dts/broadcom/bcm2710-rpi-zero-2-w.dts
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,20 @@
*/
gpio-line-names = "ID_SDA",
"ID_SCL",
"SDA1",
"SCL1",
"GPIO_GCLK",
"GPIO2",
"GPIO3",
"GPIO4",
"GPIO5",
"GPIO6",
"SPI_CE1_N",
"SPI_CE0_N",
"SPI_MISO",
"SPI_MOSI",
"SPI_SCLK",
"GPIO7",
"GPIO8",
"GPIO9",
"GPIO10",
"GPIO11",
"GPIO12",
"GPIO13",
/* Serial port */
"TXD1",
"RXD1",
"GPIO14",
"GPIO15",
"GPIO16",
"GPIO17",
"GPIO18",
Expand Down
82 changes: 72 additions & 10 deletions arch/arm/boot/dts/broadcom/bcm2711-rpi-4-b.dts
Original file line number Diff line number Diff line change
Expand Up @@ -80,21 +80,21 @@
*/
gpio-line-names = "ID_SDA", /* 0 */
"ID_SCL",
"SDA1",
"SCL1",
"GPIO_GCLK",
"GPIO2",
"GPIO3",
"GPIO4",
"GPIO5", /* 5 */
"GPIO6",
"SPI_CE1_N",
"SPI_CE0_N",
"SPI_MISO",
"SPI_MOSI", /* 10 */
"SPI_SCLK",
"GPIO7",
"GPIO8",
"GPIO9",
"GPIO10", /* 10 */
"GPIO11",
"GPIO12",
"GPIO13",
/* Serial port */
"TXD1",
"RXD1", /* 15 */
"GPIO14",
"GPIO15", /* 15 */
"GPIO16",
"GPIO17",
"GPIO18",
Expand Down Expand Up @@ -311,6 +311,68 @@
};

&gpio {
gpio-line-names = "ID_SDA",
"ID_SCL",
"GPIO2",
"GPIO3",
"GPIO4",
"GPIO5",
"GPIO6",
"GPIO7",
"GPIO8",
"GPIO9",
"GPIO10",
"GPIO11",
"GPIO12",
"GPIO13",
"GPIO14",
"GPIO15",
"GPIO16",
"GPIO17",
"GPIO18",
"GPIO19",
"GPIO20",
"GPIO21",
"GPIO22",
"GPIO23",
"GPIO24",
"GPIO25",
"GPIO26",
"GPIO27",
"RGMII_MDIO",
"RGMIO_MDC",
/* Used by BT module */
"CTS0", /* 30 */
"RTS0",
"TXD0",
"RXD0",
/* Used by Wifi */
"SD1_CLK",
"SD1_CMD", /* 35 */
"SD1_DATA0",
"SD1_DATA1",
"SD1_DATA2",
"SD1_DATA3",
/* Shared with SPI flash */
"PWM0_MISO", /* 40 */
"PWM1_MOSI",
"STATUS_LED_G_CLK",
"SPIFLASH_CE_N",
"SDA0",
"SCL0", /* 45 */
"RGMII_RXCLK",
"RGMII_RXCTL",
"RGMII_RXD0",
"RGMII_RXD1",
"RGMII_RXD2", /* 50 */
"RGMII_RXD3",
"RGMII_TXCLK",
"RGMII_TXCTL",
"RGMII_TXD0",
"RGMII_TXD1", /* 55 */
"RGMII_TXD2",
"RGMII_TXD3";

bt_pins: bt_pins {
brcm,pins = "-"; // non-empty to keep btuart happy, //4 = 0
// to fool pinctrl
Expand Down
Loading

0 comments on commit bd9542b

Please sign in to comment.