From bd9542b8271ccb251490c814e9237ed94d7ceb56 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 26 Jan 2024 17:03:35 +0000 Subject: [PATCH 0870/1085] ARM: dts: Standardise downstream Pi GPIO pin names 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 --- .../boot/dts/broadcom/bcm2708-rpi-b-plus.dts | 21 +++-- .../boot/dts/broadcom/bcm2708-rpi-zero-w.dts | 21 +++-- .../boot/dts/broadcom/bcm2708-rpi-zero.dts | 21 +++-- .../arm/boot/dts/broadcom/bcm2709-rpi-2-b.dts | 21 +++-- .../arm/boot/dts/broadcom/bcm2710-rpi-2-b.dts | 21 +++-- .../dts/broadcom/bcm2710-rpi-3-b-plus.dts | 21 +++-- .../arm/boot/dts/broadcom/bcm2710-rpi-3-b.dts | 21 +++-- .../dts/broadcom/bcm2710-rpi-zero-2-w.dts | 21 +++-- .../arm/boot/dts/broadcom/bcm2711-rpi-4-b.dts | 82 ++++++++++++++++--- .../arm/boot/dts/broadcom/bcm2711-rpi-cm4.dts | 62 ++++++++++++++ .../boot/dts/broadcom/bcm2711-rpi-cm4s.dts | 21 +++-- .../arm/boot/dts/broadcom/bcm2712-rpi-5-b.dts | 56 ++++++------- 12 files changed, 252 insertions(+), 137 deletions(-) --- a/arch/arm/boot/dts/broadcom/bcm2708-rpi-b-plus.dts +++ b/arch/arm/boot/dts/broadcom/bcm2708-rpi-b-plus.dts @@ -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", --- a/arch/arm/boot/dts/broadcom/bcm2708-rpi-zero-w.dts +++ b/arch/arm/boot/dts/broadcom/bcm2708-rpi-zero-w.dts @@ -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", --- a/arch/arm/boot/dts/broadcom/bcm2708-rpi-zero.dts +++ b/arch/arm/boot/dts/broadcom/bcm2708-rpi-zero.dts @@ -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", --- a/arch/arm/boot/dts/broadcom/bcm2709-rpi-2-b.dts +++ b/arch/arm/boot/dts/broadcom/bcm2709-rpi-2-b.dts @@ -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", --- a/arch/arm/boot/dts/broadcom/bcm2710-rpi-2-b.dts +++ b/arch/arm/boot/dts/broadcom/bcm2710-rpi-2-b.dts @@ -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", --- a/arch/arm/boot/dts/broadcom/bcm2710-rpi-3-b-plus.dts +++ b/arch/arm/boot/dts/broadcom/bcm2710-rpi-3-b-plus.dts @@ -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", --- a/arch/arm/boot/dts/broadcom/bcm2710-rpi-3-b.dts +++ b/arch/arm/boot/dts/broadcom/bcm2710-rpi-3-b.dts @@ -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", --- a/arch/arm/boot/dts/broadcom/bcm2710-rpi-zero-2-w.dts +++ b/arch/arm/boot/dts/broadcom/bcm2710-rpi-zero-2-w.dts @@ -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", --- a/arch/arm/boot/dts/broadcom/bcm2711-rpi-4-b.dts +++ b/arch/arm/boot/dts/broadcom/bcm2711-rpi-4-b.dts @@ -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", @@ -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 --- a/arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4.dts +++ b/arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4.dts @@ -320,6 +320,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", + "RTS0", + "TXD0", + "RXD0", + /* Used by Wifi */ + "SD1_CLK", + "SD1_CMD", + "SD1_DATA0", + "SD1_DATA1", + "SD1_DATA2", + "SD1_DATA3", + /* Shared with SPI flash */ + "PWM0_MISO", + "PWM1_MOSI", + "STATUS_LED_G_CLK", + "SPIFLASH_CE_N", + "SDA0", + "SCL0", + "RGMII_RXCLK", + "RGMII_RXCTL", + "RGMII_RXD0", + "RGMII_RXD1", + "RGMII_RXD2", + "RGMII_RXD3", + "RGMII_TXCLK", + "RGMII_TXCTL", + "RGMII_TXD0", + "RGMII_TXD1", + "RGMII_TXD2", + "RGMII_TXD3"; + bt_pins: bt_pins { brcm,pins = "-"; // non-empty to keep btuart happy, //4 = 0 // to fool pinctrl --- a/arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4s.dts +++ b/arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4s.dts @@ -31,21 +31,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", --- a/arch/arm/boot/dts/broadcom/bcm2712-rpi-5-b.dts +++ b/arch/arm/boot/dts/broadcom/bcm2712-rpi-5-b.dts @@ -678,34 +678,34 @@ spi10_cs_pins: &spi10_cs_gpio1 {}; &rp1_gpio { gpio-line-names = - "ID_SD", // GPIO0 - "ID_SC", // GPIO1 - "PIN3", // GPIO2 - "PIN5", // GPIO3 - "PIN7", // GPIO4 - "PIN29", // GPIO5 - "PIN31", // GPIO6 - "PIN26", // GPIO7 - "PIN24", // GPIO8 - "PIN21", // GPIO9 - "PIN19", // GPIO10 - "PIN23", // GPIO11 - "PIN32", // GPIO12 - "PIN33", // GPIO13 - "PIN8", // GPIO14 - "PIN10", // GPIO15 - "PIN36", // GPIO16 - "PIN11", // GPIO17 - "PIN12", // GPIO18 - "PIN35", // GPIO19 - "PIN38", // GPIO20 - "PIN40", // GPIO21 - "PIN15", // GPIO22 - "PIN16", // GPIO23 - "PIN18", // GPIO24 - "PIN22", // GPIO25 - "PIN37", // GPIO26 - "PIN13", // GPIO27 + "ID_SDA", // GPIO0 + "ID_SCL", // GPIO1 + "GPIO2", // GPIO2 + "GPIO3", // GPIO3 + "GPIO4", // GPIO4 + "GPIO5", // GPIO5 + "GPIO6", // GPIO6 + "GPIO7", // GPIO7 + "GPIO8", // GPIO8 + "GPIO9", // GPIO9 + "GPIO10", // GPIO10 + "GPIO11", // GPIO11 + "GPIO12", // GPIO12 + "GPIO13", // GPIO13 + "GPIO14", // GPIO14 + "GPIO15", // GPIO15 + "GPIO16", // GPIO16 + "GPIO17", // GPIO17 + "GPIO18", // GPIO18 + "GPIO19", // GPIO19 + "GPIO20", // GPIO20 + "GPIO21", // GPIO21 + "GPIO22", // GPIO22 + "GPIO23", // GPIO23 + "GPIO24", // GPIO24 + "GPIO25", // GPIO25 + "GPIO26", // GPIO26 + "GPIO27", // GPIO27 "PCIE_RP1_WAKE", // GPIO28 "FAN_TACH", // GPIO29