mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
pinctrl: airoha: fix I2C pin mux config for AN7583
On AN7583 both I2C busses have a pin sharing with GPIO. Also the pin mux setting is done in REG_GPIO_PON_MODE instead of REG_GPIO_2ND_I2C_MODE. Add dedicated I2C pin groups and function groups for AN7583. The new groups must support i2c0 and i2c1. Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Signed-off-by: Linus Walleij <linusw@kernel.org>
This commit is contained in:
parent
bc662fe067
commit
0562b05f4a
|
|
@ -896,6 +896,7 @@ static const char *const uart_groups[] = { "uart2", "uart2_cts_rts", "hsuart",
|
|||
"hsuart_cts_rts", "uart4",
|
||||
"uart5" };
|
||||
static const char *const i2c_groups[] = { "i2c1" };
|
||||
static const char *const an7583_i2c_groups[] = { "i2c0", "i2c1" };
|
||||
static const char *const jtag_groups[] = { "jtag_udi", "jtag_dfd" };
|
||||
static const char *const pcm_groups[] = { "pcm1", "pcm2" };
|
||||
static const char *const spi_groups[] = { "spi_quad", "spi_cs1" };
|
||||
|
|
@ -1165,6 +1166,28 @@ static const struct airoha_pinctrl_func_group i2c_func_group[] = {
|
|||
},
|
||||
};
|
||||
|
||||
static const struct airoha_pinctrl_func_group an7583_i2c_func_group[] = {
|
||||
{
|
||||
.name = "i2c0",
|
||||
.regmap[0] = {
|
||||
AIROHA_FUNC_MUX,
|
||||
REG_GPIO_PON_MODE,
|
||||
AN7583_I2C0_SCL_GPIO_MODE_MASK | AN7583_I2C0_SDA_GPIO_MODE_MASK,
|
||||
0
|
||||
},
|
||||
.regmap_size = 1,
|
||||
}, {
|
||||
.name = "i2c1",
|
||||
.regmap[0] = {
|
||||
AIROHA_FUNC_MUX,
|
||||
REG_GPIO_PON_MODE,
|
||||
AN7583_I2C1_SCL_GPIO_MODE_MASK | AN7583_I2C1_SDA_GPIO_MODE_MASK,
|
||||
0
|
||||
},
|
||||
.regmap_size = 1,
|
||||
},
|
||||
};
|
||||
|
||||
static const struct airoha_pinctrl_func_group jtag_func_group[] = {
|
||||
{
|
||||
.name = "jtag_udi",
|
||||
|
|
@ -1966,7 +1989,7 @@ static const struct airoha_pinctrl_func an7583_pinctrl_funcs[] = {
|
|||
PINCTRL_FUNC_DESC("sipo", sipo),
|
||||
PINCTRL_FUNC_DESC("mdio", an7583_mdio),
|
||||
PINCTRL_FUNC_DESC("uart", uart),
|
||||
PINCTRL_FUNC_DESC("i2c", i2c),
|
||||
PINCTRL_FUNC_DESC("i2c", an7583_i2c),
|
||||
PINCTRL_FUNC_DESC("jtag", jtag),
|
||||
PINCTRL_FUNC_DESC("pcm", pcm),
|
||||
PINCTRL_FUNC_DESC("spi", spi),
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user