From 1a3830290c3e98547610fe01d4b6d1c0f98f5008 Mon Sep 17 00:00:00 2001 From: Qianggui Song Date: Fri, 8 Mar 2019 15:52:57 +0800 Subject: [PATCH] pinctrl: add extra pins for sm1 base on g12b [1/1] PD#SWPL-5405 Problem: sm1 add some new pins base on g12b, pinmux need update. Solution: update extra pins to g12b pinmux. Verify: pxp Change-Id: Idbdddb1e64ffb4e5a63ee3a69b5fc40e7ecfcc44 Signed-off-by: Qianggui Song --- drivers/amlogic/pinctrl/pinctrl-meson-g12a.c | 99 ++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) diff --git a/drivers/amlogic/pinctrl/pinctrl-meson-g12a.c b/drivers/amlogic/pinctrl/pinctrl-meson-g12a.c index d4c207b..7a905c2 100644 --- a/drivers/amlogic/pinctrl/pinctrl-meson-g12a.c +++ b/drivers/amlogic/pinctrl/pinctrl-meson-g12a.c @@ -489,6 +489,53 @@ static const unsigned int clk12_24_z_pins[] = {GPIOZ_13}; static const unsigned int clk12_24_ao_pins[] = {GPIOAO_10}; static const unsigned int clk12_24_e_pins[] = {GPIOE_2}; + +/* introduce extra ee pin-groups for SM1 based on G12B */ + +/*sdcard x groupe*/ +static const unsigned int sdcard_d0_x_pins[] = {GPIOX_0}; +static const unsigned int sdcard_d1_x_pins[] = {GPIOX_1}; +static const unsigned int sdcard_d2_x_pins[] = {GPIOX_2}; +static const unsigned int sdcard_d3_x_pins[] = {GPIOX_3}; +static const unsigned int sdcard_clk_x_pins[] = {GPIOX_4}; +static const unsigned int sdcard_cmd_x_pins[] = {GPIOX_5}; + +/*i2c1 */ +static const unsigned int i2c1_sda_z0_pins[] = {GPIOZ_0}; +static const unsigned int i2c1_sck_z1_pins[] = {GPIOZ_1}; + +/* i2c2 */ +static const unsigned int i2c2_sda_z10_pins[] = {GPIOZ_10}; +static const unsigned int i2c2_sck_z11_pins[] = {GPIOZ_11}; + +/*tdmb*/ +static const unsigned int tdmb_dout4_a_pins[] = {GPIOA_7}; +static const unsigned int tdmb_dout5_a_pins[] = {GPIOA_8}; +static const unsigned int tdmb_dout6_a_pins[] = {GPIOA_9}; +static const unsigned int tdmb_dout7_a0_pins[] = {GPIOA_0}; +static const unsigned int tdmb_dout7_a14_pins[] = {GPIOA_14}; + +/*tdmc*/ +static const unsigned int tdmc_dout4_z_pins[] = {GPIOZ_9}; +static const unsigned int tdmc_dout4_a_pins[] = {GPIOA_6}; +static const unsigned int tdmc_dout5_z_pins[] = {GPIOZ_12}; +static const unsigned int tdmc_dout5_a_pins[] = {GPIOA_5}; + +/*clk_32k*/ +static const unsigned int clk_32k_pins[] = {GPIOAO_4}; + +/*clk_25ee*/ +static const unsigned int clk_25ee_pins[] = {GPIOE_2}; + +/*world sync */ +static const unsigned int world_sync_c_pins[] = {GPIOC_7}; +static const unsigned int world_sync_a_pins[] = {GPIOA_14}; + +/*remote input */ +static const unsigned int remote_input_a_pins[] = {GPIOA_15}; + +/*end of SM1*/ + static struct meson_pmx_group meson_g12a_periphs_groups[] = { GPIO_GROUP(GPIOV_0), GPIO_GROUP(GPIOZ_0), @@ -683,6 +730,12 @@ static struct meson_pmx_group meson_g12a_periphs_groups[] = { GROUP(pwm_f_z, 5), GROUP(clk12_24_z, 2), GROUP(gen_clk_ee_z, 7), + GROUP(i2c1_sda_z0, 6), + GROUP(i2c1_sck_z1, 6), + GROUP(i2c2_sda_z10, 4), + GROUP(i2c2_sck_z11, 4), + GROUP(tdmc_dout4_z, 4), + GROUP(tdmc_dout5_z, 4), /* bank GPIOX */ GROUP(sdio_d0, 1), @@ -739,6 +792,12 @@ static struct meson_pmx_group meson_g12a_periphs_groups[] = { GROUP(tdma_dout1, 1), GROUP(mclk1_x, 2), GROUP(gen_clk_ee_x, 7), + GROUP(sdcard_d0_x, 5), + GROUP(sdcard_d1_x, 5), + GROUP(sdcard_d2_x, 5), + GROUP(sdcard_d3_x, 5), + GROUP(sdcard_clk_x, 5), + GROUP(sdcard_cmd_x, 5), /* bank GPIOC */ GROUP(sdcard_d0_c, 1), @@ -767,6 +826,7 @@ static struct meson_pmx_group meson_g12a_periphs_groups[] = { GROUP(pdm_din2_c, 4), GROUP(pdm_din3_c, 4), GROUP(pdm_dclk_c, 4), + GROUP(world_sync_c, 2), /* bank GPIOH */ GROUP(spi1_mosi, 3), @@ -838,6 +898,15 @@ static struct meson_pmx_group meson_g12a_periphs_groups[] = { GROUP(mclk1_a, 2), GROUP(pwm_d_a4, 3), GROUP(pwm_f_a11, 3), + GROUP(tdmb_dout4_a, 7), + GROUP(tdmb_dout5_a, 7), + GROUP(tdmb_dout6_a, 7), + GROUP(tdmb_dout7_a0, 2), + GROUP(tdmb_dout7_a14, 7), + GROUP(tdmc_dout4_a, 7), + GROUP(tdmc_dout5_a, 7), + GROUP(world_sync_a, 1), + GROUP(remote_input_a, 1), /* bank GPIOV */ GROUP(sdio_dummy, 1), @@ -1017,6 +1086,8 @@ static struct meson_pmx_group meson_g12a_aobus_groups[] = { GROUP(clk12_24_e, 2), GROUP(gen_clk_ee_ao, 4), GROUP(gen_clk_ao, 5), + GROUP(clk_32k, 2), + GROUP(clk_25ee, 2), }; static const char * const gpio_periphs_groups[] = { @@ -1080,6 +1151,8 @@ static const char * const sdcard_groups[] = { "sdcard_clk_c", "sdcard_cmd_c", "sdcard_d0_z", "sdcard_d1_z", "sdcard_d2_z", "sdcard_d3_z", "sdcard_clk_z", "sdcard_cmd_z", + "sdcard_d0_x", "sdcard_d1_x", "sdcard_d2_x", "sdcard_d3_x", + "sdcard_clk_x", "sdcard_cmd_x", }; static const char * const spi0_groups[] = { @@ -1101,11 +1174,13 @@ static const char * const i2c1_groups[] = { "i2c1_sda_x", "i2c1_sck_x", "i2c1_sda_h2", "i2c1_sck_h3", "i2c1_sda_h6", "i2c1_sck_h7", + "i2c1_sda_z0", "i2c1_sck_z1", }; static const char * const i2c2_groups[] = { "i2c2_sda_x", "i2c2_sck_x", "i2c2_sda_z", "i2c2_sck_z", + "i2c2_sda_z10", "i2c2_sck_z11", }; static const char * const i2c3_groups[] = { @@ -1250,6 +1325,9 @@ static const char * const tdmb_out_groups[] = { "tdmb_sclk", "tdmb_fs", "tdmb_dout0", "tdmb_dout1", "tdmb_dout2", "tdmb_dout3_a", "tdmb_dout3_h", "tdmb_slv_sclk", "tdmb_slv_fs", + "tdmb_dout4_a", "tdmb_dout5_a", "tdmb_dout6_a", + "tdmb_dout7_a0", "tdmb_dout7_a14", + }; static const char * const tdmc_in_groups[] = { @@ -1264,6 +1342,7 @@ static const char * const tdmc_out_groups[] = { "tdmc_dout2_a", "tdmc_dout3_a", "tdmc_slv_sclk_a", "tdmc_slv_fs_a", "tdmc_sclk_z", "tdmc_fs_z", "tdmc_dout0_z", "tdmc_dout1_z", "tdmc_dout2_z", "tdmc_dout3_z", "tdmc_slv_sclk_z", "tdmc_slv_fs_z", + "tdmc_dout4_z", "tdmc_dout4_a", "tdmc_dout5_a", "tdmc_dout5_z", }; static const char * const remote_out_groups[] = { @@ -1377,6 +1456,22 @@ static const char * const gen_clk_ao_groups[] = { "gen_clk_ao", }; +static const char * const clk_32k_groups[] = { + "clk_32k", +}; + +static const char * const clk_25ee_groups[] = { + "clk_25ee", +}; + +static const char * const world_sync_groups[] = { + "world_sync", +}; + +static const char * const remote_input_groups[] = { + "remote_input_a", +}; + static struct meson_pmx_func meson_g12a_periphs_functions[] = { FUNCTION(gpio_periphs), FUNCTION(emmc), @@ -1422,6 +1517,8 @@ static struct meson_pmx_func meson_g12a_periphs_functions[] = { FUNCTION(remote_out), FUNCTION(clk12_24_ee), FUNCTION(gen_clk_ee), + FUNCTION(world_sync), + FUNCTION(remote_input), }; static struct meson_pmx_func meson_g12a_aobus_functions[] = { @@ -1447,6 +1544,8 @@ static struct meson_pmx_func meson_g12a_aobus_functions[] = { FUNCTION(clk12_24_ao), FUNCTION(gen_clk_ee_ao), FUNCTION(gen_clk_ao), + FUNCTION(clk_32k), + FUNCTION(clk_25ee), }; static struct meson_bank meson_g12a_periphs_banks[] = { -- 2.7.4