pinctrl: meson-gxbb: add a bunch more pins
Subsystems (3)
Kevin Hilman
maintainerv2 cover pinctrl: meson-gxbb: add a bunch more pins
Add support for several more devices, both in the EE domain and in the AO domain. Also, add the pins to the corresponding DTS files.
Tested on odroid-c2 and Amlogic P200 boards, and verified with working ethernet.
Changes since v1:
- dropped the rename of uart_ao -> uart_ao_a (will be done as follow-up)
- rebased on linus/master
- dropped DT from series (will be merged through arm-soc)
Kevin
Kevin Hilman (4):
pinctrl: amlogic: gxbb: add UART_AO_B, I2C
pinctrl: amlogic: gxbb: add EMMC and SD pins
pinctrl: amlogic: gxbb: add more UART pins
pinctrl: amlogic: gxbb: add ethernet pins
drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 163 ++++++++++++++++++++++++++++- 1 file changed, 162 insertions(+), 1 deletion(-)
Signature · 1 line
2.7.4
Kevin Hilman
maintainerPATCH v2 1/4 pinctrl: amlogic: gxbb: add UART_AO_B, I2C
Add pins for some more AO domain devices: UART_AO_B and I2C master & slave.
--- drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 35 +++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-)
drivers/pinctrl/meson/pinctrl-meson-gxbb.c +34 -1
@@ -168,6 +168,16 @@ static const unsigned int uart_tx_ao_a_pins[] = { PIN(GPIOAO_0, 0) };static const unsigned int uart_rx_ao_a_pins[] = {PIN (GPIOAO_1 ,0 ) };static const unsigned int uart_cts_ao_a_pins[] = {PIN (GPIOAO_2 ,0 ) };static const unsigned int uart_rts_ao_a_pins[] = {PIN (GPIOAO_3 ,0 ) }; +static const unsigned int uart_tx_ao_b_pins[] = {PIN (GPIOAO_0 ,0 ) }; +static const unsigned int uart_rx_ao_b_pins[] = {PIN (GPIOAO_1 ,0 ), +PIN (GPIOAO_5 ,0 ) }; +static const unsigned int uart_cts_ao_b_pins[] = {PIN (GPIOAO_2 ,0 ) }; +static const unsigned int uart_rts_ao_b_pins[] = {PIN (GPIOAO_3 ,0 ) }; + +static const unsigned int i2c_sck_ao_pins[] = {PIN (GPIOAO_4 ,0 ) }; +static const unsigned int i2c_sda_ao_pins[] = {PIN (GPIOAO_5 ,0 ) }; +static const unsigned int i2c_slave_sck_ao_pins[] = {PIN (GPIOAO_4 ,0 ) }; +static const unsigned int i2c_slave_sda_ao_pins[] = {PIN (GPIOAO_5 ,0 ) };static struct meson_pmx_group meson_gxbb_periphs_groups[] = {GPIO_GROUP (GPIOZ_0 ,EE_OFF ),
@@ -316,10 +326,18 @@ static struct meson_pmx_group meson_gxbb_aobus_groups[] = {GPIO_GROUP (GPIOAO_13 ,0 ),/* bank AO */ +GROUP (uart_tx_ao_b,0 ,26 ), +GROUP (uart_rx_ao_b,0 ,25 ),GROUP (uart_tx_ao_a,0 ,12 ),GROUP (uart_rx_ao_a,0 ,11 ),GROUP (uart_cts_ao_a,0 ,10 ),GROUP (uart_rts_ao_a,0 ,9 ), +GROUP (uart_cts_ao_b,0 ,8 ), +GROUP (uart_rts_ao_b,0 ,7 ), +GROUP (i2c_sck_ao,0 ,6 ), +GROUP (i2c_sda_ao,0 ,5 ), +GROUP (i2c_slave_sck_ao,0 ,2 ), + GROUP(i2c_slave_sda_ao, 0, 1), }; static const char * const gpio_periphs_groups[] = {
@@ -366,7 +384,19 @@ static const char * const gpio_aobus_groups[] = { };static const char *const uart_ao_groups[] = { -"uart_tx_ao_a" ,"uart_rx_ao_a" ,"uart_cts_ao_a" ,"uart_rts_ao_a" +"uart_tx_ao_a" ,"uart_rx_ao_a" ,"uart_cts_ao_a" ,"uart_rts_ao_a" , +}; + +static const char *const uart_ao_b_groups[] = { +"uart_tx_ao_b" ,"uart_rx_ao_b" ,"uart_cts_ao_b" ,"uart_rts_ao_b" , +}; + +static const char *const i2c_ao_groups[] = { +"i2c_sdk_ao" ,"i2c_sda_ao" , +}; + +static const char *const i2c_slave_ao_groups[] = { +"i2c_slave_sdk_ao" ,"i2c_slave_sda_ao" , };static struct meson_pmx_func meson_gxbb_periphs_functions[] = {
@@ -376,6 +406,9 @@ static struct meson_pmx_func meson_gxbb_periphs_functions[] = {static struct meson_pmx_func meson_gxbb_aobus_functions[] = {FUNCTION (gpio_aobus),FUNCTION (uart_ao), +FUNCTION (uart_ao_b), +FUNCTION (i2c_ao), +FUNCTION (i2c_slave_ao), };static struct meson_bank meson_gxbb_periphs_banks[] = {
Signature · 1 line
2.7.4
PATCH v2 1/4 pinctrl: amlogic: gxbb: add UART_AO_B, I2C
Quoted 5 lines · Kevin Hilman
Add pins for some more AO domain devices:
UART_AO_Band I2C master & slave.Acked-by Carlo Caione <[email protected]>Signed-off-by Kevin Hilman <[email protected]>
Patch applied.
Yours,
Linus Walleij
Kevin Hilman
maintainerPATCH v2 2/4 pinctrl: amlogic: gxbb: add EMMC and SD pins
In reply to Kevin HilmanAdd EE domain pins for eMMC and SD card.
--- drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 41 ++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+)
drivers/pinctrl/meson/pinctrl-meson-gxbb.c +41 -0
@@ -147,6 +147,22 @@ static const struct pinctrl_pin_desc meson_gxbb_periphs_pins[] = { MESON_PIN(GPIO_TEST_N, EE_OFF), }; +static const unsigned int emmc_nand_d07_pins[] = { +PIN (BOOT_0 ,EE_OFF ),PIN (BOOT_1 ,EE_OFF ),PIN (BOOT_2 ,EE_OFF ), +PIN (BOOT_3 ,EE_OFF ),PIN (BOOT_4 ,EE_OFF ),PIN (BOOT_5 ,EE_OFF ), +PIN (BOOT_6 ,EE_OFF ),PIN (BOOT_7 ,EE_OFF ), +}; +static const unsigned int emmc_clk_pins[] = {PIN (BOOT_8 ,EE_OFF ) }; +static const unsigned int emmc_cmd_pins[] = {PIN (BOOT_10 ,EE_OFF ) }; +static const unsigned int emmc_ds_pins[] = {PIN (BOOT_15 ,EE_OFF ) }; + +static const unsigned int sdcard_d0_pins[] = {PIN (CARD_1 ,EE_OFF ) }; +static const unsigned int sdcard_d1_pins[] = {PIN (CARD_0 ,EE_OFF ) }; +static const unsigned int sdcard_d2_pins[] = {PIN (CARD_5 ,EE_OFF ) }; +static const unsigned int sdcard_d3_pins[] = {PIN (CARD_4 ,EE_OFF ) }; +static const unsigned int sdcard_cmd_pins[] = {PIN (CARD_3 ,EE_OFF ) }; +static const unsigned int sdcard_clk_pins[] = {PIN (CARD_2 ,EE_OFF ) }; +static const struct pinctrl_pin_desc meson_gxbb_aobus_pins[] = {MESON_PIN (GPIOAO_0 ,0 ),MESON_PIN (GPIOAO_1 ,0 ),
@@ -307,6 +323,20 @@ static struct meson_pmx_group meson_gxbb_periphs_groups[] = {GPIO_GROUP (GPIOCLK_3 ,EE_OFF ),GPIO_GROUP (GPIO_TEST_N ,EE_OFF ), + +/* Bank BOOT */ +GROUP (emmc_nand_d07,4 ,30 ), +GROUP (emmc_clk,4 ,18 ), +GROUP (emmc_cmd,4 ,19 ), +GROUP (emmc_ds,4 ,31 ), + +/* Bank CARD */ +GROUP (sdcard_d1,2 ,14 ), +GROUP (sdcard_d0,2 ,15 ), +GROUP (sdcard_d3,2 ,12 ), +GROUP (sdcard_d2,2 ,13 ), +GROUP (sdcard_cmd,2 ,10 ), + GROUP(sdcard_clk, 2, 11), }; static struct meson_pmx_group meson_gxbb_aobus_groups[] = {
@@ -377,6 +407,15 @@ static const char * const gpio_periphs_groups[] = { "GPIO_TEST_N", }; +static const char *const emmc_groups[] = { +"emmc_nand_d07" ,"emmc_clk" ,"emmc_cmd" ,"emmc_ds" , +}; + +static const char *const sdcard_groups[] = { +"sdcard_d0" ,"sdcard_d1" ,"sdcard_d2" ,"sdcard_d3" , +"sdcard_cmd" ,"sdcard_clk" , +}; +static const char *const gpio_aobus_groups[] = {"GPIOAO_0" ,"GPIOAO_1" ,"GPIOAO_2" ,"GPIOAO_3" ,"GPIOAO_4" ,"GPIOAO_5" ,"GPIOAO_6" ,"GPIOAO_7" ,"GPIOAO_8" ,"GPIOAO_9" ,
@@ -401,6 +440,8 @@ static const char * const i2c_slave_ao_groups[] = {static struct meson_pmx_func meson_gxbb_periphs_functions[] = {FUNCTION (gpio_periphs), +FUNCTION (emmc), +FUNCTION (sdcard), };static struct meson_pmx_func meson_gxbb_aobus_functions[] = {
Signature · 1 line
2.7.4
PATCH v2 2/4 pinctrl: amlogic: gxbb: add EMMC and SD pins
Quoted 4 lines · Kevin Hilman
Add EE domain pins for eMMC and SD card.
Acked-by Carlo Caione <[email protected]>Signed-off-by Kevin Hilman <[email protected]>
Patch applied.
Yours,
Linus Walleij
Kevin Hilman
maintainerPATCH v2 3/4 pinctrl: amlogic: gxbb: add more UART pins
In reply to Kevin HilmanAdd EE domain pins for UART A, B & C.
--- drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 48 ++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+)
drivers/pinctrl/meson/pinctrl-meson-gxbb.c +48 -0
@@ -163,6 +163,21 @@ static const unsigned int sdcard_d3_pins[] = { PIN(CARD_4, EE_OFF) };static const unsigned int sdcard_cmd_pins[] = {PIN (CARD_3 ,EE_OFF ) };static const unsigned int sdcard_clk_pins[] = {PIN (CARD_2 ,EE_OFF ) }; +static const unsigned int uart_tx_a_pins[] = {PIN (GPIOX_12 ,EE_OFF ) }; +static const unsigned int uart_rx_a_pins[] = {PIN (GPIOX_13 ,EE_OFF ) }; +static const unsigned int uart_cts_a_pins[] = {PIN (GPIOX_14 ,EE_OFF ) }; +static const unsigned int uart_rts_a_pins[] = {PIN (GPIOX_15 ,EE_OFF ) }; + +static const unsigned int uart_tx_b_pins[] = {PIN (GPIODV_24 ,EE_OFF ) }; +static const unsigned int uart_rx_b_pins[] = {PIN (GPIODV_25 ,EE_OFF ) }; +static const unsigned int uart_cts_b_pins[] = {PIN (GPIODV_26 ,EE_OFF ) }; +static const unsigned int uart_rts_b_pins[] = {PIN (GPIODV_27 ,EE_OFF ) }; + +static const unsigned int uart_tx_c_pins[] = {PIN (GPIOY_13 ,EE_OFF ) }; +static const unsigned int uart_rx_c_pins[] = {PIN (GPIOY_14 ,EE_OFF ) }; +static const unsigned int uart_cts_c_pins[] = {PIN (GPIOX_11 ,EE_OFF ) }; +static const unsigned int uart_rts_c_pins[] = {PIN (GPIOX_12 ,EE_OFF ) }; +static const struct pinctrl_pin_desc meson_gxbb_aobus_pins[] = {MESON_PIN (GPIOAO_0 ,0 ),MESON_PIN (GPIOAO_1 ,0 ),
@@ -324,6 +339,24 @@ static struct meson_pmx_group meson_gxbb_periphs_groups[] = {GPIO_GROUP (GPIO_TEST_N ,EE_OFF ), +/* Bank X */ +GROUP (uart_tx_a,4 ,13 ), +GROUP (uart_rx_a,4 ,12 ), +GROUP (uart_cts_a,4 ,11 ), +GROUP (uart_rts_a,4 ,10 ), + +/* Bank Y */ +GROUP (uart_cts_c,1 ,19 ), +GROUP (uart_rts_c,1 ,18 ), +GROUP (uart_tx_c,1 ,17 ), +GROUP (uart_rx_c,1 ,16 ), + +/* Bank DV */ +GROUP (uart_tx_b,2 ,29 ), +GROUP (uart_rx_b,2 ,28 ), +GROUP (uart_cts_b,2 ,27 ), +GROUP (uart_rts_b,2 ,26 ), +/* Bank BOOT */ GROUP (emmc_nand_d07,4 ,30 ), GROUP(emmc_clk, 4, 18),
@@ -416,6 +449,18 @@ static const char * const sdcard_groups[] = { "sdcard_cmd", "sdcard_clk", }; +static const char *const uart_a_groups[] = { +"uart_tx_a" ,"uart_rx_a" ,"uart_cts_a" ,"uart_rts_a" , +}; + +static const char *const uart_b_groups[] = { +"uart_tx_b" ,"uart_rx_b" ,"uart_cts_b" ,"uart_rts_b" , +}; + +static const char *const uart_c_groups[] = { +"uart_tx_c" ,"uart_rx_c" ,"uart_cts_c" ,"uart_rts_c" , +}; +static const char *const gpio_aobus_groups[] = {"GPIOAO_0" ,"GPIOAO_1" ,"GPIOAO_2" ,"GPIOAO_3" ,"GPIOAO_4" ,"GPIOAO_5" ,"GPIOAO_6" ,"GPIOAO_7" ,"GPIOAO_8" ,"GPIOAO_9" ,
@@ -442,6 +487,9 @@ static struct meson_pmx_func meson_gxbb_periphs_functions[] = {FUNCTION (gpio_periphs),FUNCTION (emmc ),FUNCTION (sdcard ), +FUNCTION (uart_a ), +FUNCTION (uart_b ), + FUNCTION(uart_c), };static struct meson_pmx_func meson_gxbb_aobus_functions[] = {
Signature · 1 line
2.7.4
PATCH v2 3/4 pinctrl: amlogic: gxbb: add more UART pins
Quoted 4 lines · Kevin Hilman
Add EE domain pins for UART A, B & C.
Acked-by Carlo Caione <[email protected]>Signed-off-by Kevin Hilman <[email protected]>
Patch applied.
Yours,
Linus Walleij
Kevin Hilman
maintainerPATCH v2 4/4 pinctrl: amlogic: gxbb: add ethernet pins
In reply to Kevin HilmanAdd EE domain pins for ethernet interface.
--- drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 39 ++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+)
drivers/pinctrl/meson/pinctrl-meson-gxbb.c +39 -0
@@ -178,6 +178,21 @@ static const unsigned int uart_rx_c_pins[] = { PIN(GPIOY_14, EE_OFF) };static const unsigned int uart_cts_c_pins[] = {PIN (GPIOX_11 ,EE_OFF ) };static const unsigned int uart_rts_c_pins[] = {PIN (GPIOX_12 ,EE_OFF ) }; +static const unsigned int eth_mdio_pins[] = {PIN (GPIOZ_0 ,EE_OFF ) }; +static const unsigned int eth_mdc_pins[] = {PIN (GPIOZ_1 ,EE_OFF ) }; +static const unsigned int eth_clk_rx_clk_pins[] = {PIN (GPIOZ_2 ,EE_OFF ) }; +static const unsigned int eth_rx_dv_pins[] = {PIN (GPIOZ_3 ,EE_OFF ) }; +static const unsigned int eth_rxd0_pins[] = {PIN (GPIOZ_4 ,EE_OFF ) }; +static const unsigned int eth_rxd1_pins[] = {PIN (GPIOZ_5 ,EE_OFF ) }; +static const unsigned int eth_rxd2_pins[] = {PIN (GPIOZ_6 ,EE_OFF ) }; +static const unsigned int eth_rxd3_pins[] = {PIN (GPIOZ_7 ,EE_OFF ) }; +static const unsigned int eth_rgmii_tx_clk_pins[] = {PIN (GPIOZ_8 ,EE_OFF ) }; +static const unsigned int eth_tx_en_pins[] = {PIN (GPIOZ_9 ,EE_OFF ) }; +static const unsigned int eth_txd0_pins[] = {PIN (GPIOZ_10 ,EE_OFF ) }; +static const unsigned int eth_txd1_pins[] = {PIN (GPIOZ_11 ,EE_OFF ) }; +static const unsigned int eth_txd2_pins[] = {PIN (GPIOZ_12 ,EE_OFF ) }; +static const unsigned int eth_txd3_pins[] = {PIN (GPIOZ_13 ,EE_OFF ) }; +static const struct pinctrl_pin_desc meson_gxbb_aobus_pins[] = {MESON_PIN (GPIOAO_0 ,0 ),MESON_PIN (GPIOAO_1 ,0 ),
@@ -351,6 +366,22 @@ static struct meson_pmx_group meson_gxbb_periphs_groups[] = {GROUP (uart_tx_c,1 ,17 ),GROUP (uart_rx_c,1 ,16 ), +/* Bank Z */ +GROUP (eth_mdio,6 ,1 ), +GROUP (eth_mdc,6 ,0 ), +GROUP (eth_clk_rx_clk,6 ,13 ), +GROUP (eth_rx_dv,6 ,12 ), +GROUP (eth_rxd0,6 ,11 ), +GROUP (eth_rxd1,6 ,10 ), +GROUP (eth_rxd2,6 ,9 ), +GROUP (eth_rxd3,6 ,8 ), +GROUP (eth_rgmii_tx_clk,6 ,7 ), +GROUP (eth_tx_en,6 ,6 ), +GROUP (eth_txd0,6 ,5 ), +GROUP (eth_txd1,6 ,4 ), +GROUP (eth_txd2,6 ,3 ), +GROUP (eth_txd3,6 ,2 ), +/* Bank DV */ GROUP (uart_tx_b,2 ,29 ), GROUP(uart_rx_b, 2, 28),
@@ -461,6 +492,13 @@ static const char * const uart_c_groups[] = { "uart_tx_c", "uart_rx_c", "uart_cts_c", "uart_rts_c", }; +static const char *const eth_groups[] = { +"eth_mdio" ,"eth_mdc" ,"eth_clk_rx_clk" ,"eth_rx_dv" , +"eth_rxd0" ,"eth_rxd1" ,"eth_rxd2" ,"eth_rxd3" , +"eth_rgmii_tx_clk" ,"eth_tx_en" , +"eth_txd0" ,"eth_txd1" ,"eth_txd2" ,"eth_txd3" , +}; +static const char *const gpio_aobus_groups[] = {"GPIOAO_0" ,"GPIOAO_1" ,"GPIOAO_2" ,"GPIOAO_3" ,"GPIOAO_4" ,"GPIOAO_5" ,"GPIOAO_6" ,"GPIOAO_7" ,"GPIOAO_8" ,"GPIOAO_9" ,
@@ -490,6 +528,7 @@ static struct meson_pmx_func meson_gxbb_periphs_functions[] = {FUNCTION (uart_a),FUNCTION (uart_b ),FUNCTION (uart_c ), + FUNCTION(eth), };static struct meson_pmx_func meson_gxbb_aobus_functions[] = {
Signature · 1 line
2.7.4
PATCH v2 4/4 pinctrl: amlogic: gxbb: add ethernet pins
Quoted 4 lines · Kevin Hilman
Add EE domain pins for ethernet interface.
Acked-by Carlo Caione <[email protected]>Signed-off-by Kevin Hilman <[email protected]>
Patch applied.
Yours,
Linus Walleij