Commit 33468b56 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull pin control fixes from Linus Walleij:
 "Two small driver fixes for the Airhoa driver:

   - Correct a PHY LED mux value so the PHY LED will blink as it should

   - Fix the MDIO function bitmasks, working around a HW bug to
     force-enable the MDIO pins"

* tag 'pinctrl-v6.17-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
  pinctrl: airoha: fix wrong MDIO function bitmaks
  pinctrl: airoha: fix wrong PHY LED mux value for LED1 GPIO46
parents 07e27ad1 a061e739
Loading
Loading
Loading
Loading
+17 −14
Original line number Diff line number Diff line
@@ -108,6 +108,9 @@
#define JTAG_UDI_EN_MASK			BIT(4)
#define JTAG_DFD_EN_MASK			BIT(3)

#define REG_FORCE_GPIO_EN			0x0228
#define FORCE_GPIO_EN(n)			BIT(n)

/* LED MAP */
#define REG_LAN_LED0_MAPPING			0x027c
#define REG_LAN_LED1_MAPPING			0x0280
@@ -718,17 +721,17 @@ static const struct airoha_pinctrl_func_group mdio_func_group[] = {
	{
		.name = "mdio",
		.regmap[0] = {
			AIROHA_FUNC_MUX,
			REG_GPIO_PON_MODE,
			GPIO_SGMII_MDIO_MODE_MASK,
			GPIO_SGMII_MDIO_MODE_MASK
		},
		.regmap[1] = {
			AIROHA_FUNC_MUX,
			REG_GPIO_2ND_I2C_MODE,
			GPIO_MDC_IO_MASTER_MODE_MODE,
			GPIO_MDC_IO_MASTER_MODE_MODE
		},
		.regmap[1] = {
			AIROHA_FUNC_MUX,
			REG_FORCE_GPIO_EN,
			FORCE_GPIO_EN(1) | FORCE_GPIO_EN(2),
			FORCE_GPIO_EN(1) | FORCE_GPIO_EN(2)
		},
		.regmap_size = 2,
	},
};
@@ -1752,8 +1755,8 @@ static const struct airoha_pinctrl_func_group phy1_led1_func_group[] = {
		.regmap[0] = {
			AIROHA_FUNC_MUX,
			REG_GPIO_2ND_I2C_MODE,
			GPIO_LAN3_LED0_MODE_MASK,
			GPIO_LAN3_LED0_MODE_MASK
			GPIO_LAN3_LED1_MODE_MASK,
			GPIO_LAN3_LED1_MODE_MASK
		},
		.regmap[1] = {
			AIROHA_FUNC_MUX,
@@ -1816,8 +1819,8 @@ static const struct airoha_pinctrl_func_group phy2_led1_func_group[] = {
		.regmap[0] = {
			AIROHA_FUNC_MUX,
			REG_GPIO_2ND_I2C_MODE,
			GPIO_LAN3_LED0_MODE_MASK,
			GPIO_LAN3_LED0_MODE_MASK
			GPIO_LAN3_LED1_MODE_MASK,
			GPIO_LAN3_LED1_MODE_MASK
		},
		.regmap[1] = {
			AIROHA_FUNC_MUX,
@@ -1880,8 +1883,8 @@ static const struct airoha_pinctrl_func_group phy3_led1_func_group[] = {
		.regmap[0] = {
			AIROHA_FUNC_MUX,
			REG_GPIO_2ND_I2C_MODE,
			GPIO_LAN3_LED0_MODE_MASK,
			GPIO_LAN3_LED0_MODE_MASK
			GPIO_LAN3_LED1_MODE_MASK,
			GPIO_LAN3_LED1_MODE_MASK
		},
		.regmap[1] = {
			AIROHA_FUNC_MUX,
@@ -1944,8 +1947,8 @@ static const struct airoha_pinctrl_func_group phy4_led1_func_group[] = {
		.regmap[0] = {
			AIROHA_FUNC_MUX,
			REG_GPIO_2ND_I2C_MODE,
			GPIO_LAN3_LED0_MODE_MASK,
			GPIO_LAN3_LED0_MODE_MASK
			GPIO_LAN3_LED1_MODE_MASK,
			GPIO_LAN3_LED1_MODE_MASK
		},
		.regmap[1] = {
			AIROHA_FUNC_MUX,