mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2025-11-01 23:48:45 +00:00
Refresh patches 6.12 for airoha and econet Fixes:122135b964("airoha: an7581: add support for kernel 6.12") Fixes:73d0f92460("kernel: Add new platform EcoNet MIPS") Signed-off-by: Leo Barsky <leobrsky@proton.me> Link: https://github.com/openwrt/openwrt/pull/20073 Signed-off-by: Robert Marko <robimarko@gmail.com>
59 lines
1.8 KiB
Diff
59 lines
1.8 KiB
Diff
From 110930eb12699b92f767fc599c7ab467dd42358a Mon Sep 17 00:00:00 2001
|
|
From: Christian Marangi <ansuelsmth@gmail.com>
|
|
Date: Tue, 8 Jul 2025 14:49:56 +0200
|
|
Subject: [PATCH 2/2] pinctrl: airoha: fix wrong MDIO function bitmaks
|
|
|
|
With further testing with an attached Aeonsemi it was discovered that
|
|
the pinctrl MDIO function applied the wrong bitmask. The error was
|
|
probably caused by the confusing documentation related to these bits.
|
|
|
|
Inspecting what the bootloader actually configure, the SGMII_MDIO_MODE
|
|
is never actually set but instead it's set force enable to the 2 GPIO
|
|
(gpio 1-2) for MDC and MDIO pin.
|
|
|
|
Applying this configuration permits correct functionality of any
|
|
externally attached PHY.
|
|
|
|
Cc: stable@vger.kernel.org
|
|
Fixes: 1c8ace2d0725 ("pinctrl: airoha: Add support for EN7581 SoC")
|
|
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
|
---
|
|
drivers/pinctrl/mediatek/pinctrl-airoha.c | 15 +++++++++------
|
|
1 file changed, 9 insertions(+), 6 deletions(-)
|
|
|
|
--- a/drivers/pinctrl/mediatek/pinctrl-airoha.c
|
|
+++ b/drivers/pinctrl/mediatek/pinctrl-airoha.c
|
|
@@ -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
|
|
@@ -719,16 +722,16 @@ static const struct airoha_pinctrl_func_
|
|
.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,
|
|
},
|
|
};
|