Skip to contentSkip to conversation

imx: iomux-v3: provide MX7D_PAD_ENET1_RX_CLK__ENET1_RGMII_RXC

PATCH New Sebastian Andrzej Siewior 3 participants 4 messages Nov 16, 2016 – Nov 18, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 imx: iomux-v3: provide MX7D_PAD_ENET1_RX_CLK__ENET1_RGMII_RXC

MX7D_PAD_ENET1_RX_CLK__ENET1_RX_CLK is in its currently RGMII_RXC. Fix this by providing RX_CLK with properly setting the DAISY value and MX7D_PAD_ENET1_RX_CLK__ENET1_RGMII_RXC which did the "previous" setting. There should be no fallout because there no in tree users of MX7D_PAD_ENET1_RX_CLK__ENET1_RX_CLK.

---
 arch/arm/dts/imx7d-pinfunc.h              | 3 ++-
 arch/arm/include/asm/arch-mx7/mx7d_pins.h | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
arch/arm/dts/imx7d-pinfunc.h +2 -1
index 32d2464b417d..7bc1dee0f7ff 100644
@@ -1123,7 +1123,8 @@
 #define MX7D_PAD_ENET1_TX_CLK__GPIO7_IO12                         0x025C 0x04CC 0x0000 0x5 0x0
 #define MX7D_PAD_ENET1_TX_CLK__CCM_EXT_CLK1                       0x025C 0x04CC 0x04E4 0x6 0x2
 #define MX7D_PAD_ENET1_TX_CLK__CSU_ALARM_AUT0                     0x025C 0x04CC 0x0000 0x7 0x0
-#define MX7D_PAD_ENET1_RX_CLK__ENET1_RX_CLK                       0x0260 0x04D0 0x056C 0x0 0x0
+#define MX7D_PAD_ENET1_RX_CLK__ENET1_RGMII_RXC                    0x0260 0x04D0 0x056C 0x0 0x0
+#define MX7D_PAD_ENET1_RX_CLK__ENET1_RX_CLK                       0x0260 0x04D0 0x056C 0x0 0x1
 #define MX7D_PAD_ENET1_RX_CLK__WDOG2_WDOG_B                       0x0260 0x04D0 0x0000 0x1 0x0
 #define MX7D_PAD_ENET1_RX_CLK__SAI1_TX_BCLK                       0x0260 0x04D0 0x06A8 0x2 0x1
 #define MX7D_PAD_ENET1_RX_CLK__GPT2_CLK                           0x0260 0x04D0 0x0000 0x3 0x0
arch/arm/include/asm/arch-mx7/mx7d_pins.h +2 -1
index 0ab1246de852..55375f5aa0dc 100644
@@ -1278,7 +1278,8 @@ enum {
 	MX7D_PAD_ENET1_TX_CLK__CCM_EXT_CLK1                      = IOMUX_PAD(0x04CC, 0x025C, 6, 0x04E4, 2, 0),
 	MX7D_PAD_ENET1_TX_CLK__CSU_ALARM_AUT0                    = IOMUX_PAD(0x04CC, 0x025C, 7, 0x0000, 0, 0),
 
-	MX7D_PAD_ENET1_RX_CLK__ENET1_RX_CLK                      = IOMUX_PAD(0x04D0, 0x0260, 0, 0x056C, 0, 0),
+	MX7D_PAD_ENET1_RX_CLK__ENET1_RGMII_RXC                   = IOMUX_PAD(0x04D0, 0x0260, 0, 0x056C, 0, 0),
+	MX7D_PAD_ENET1_RX_CLK__ENET1_RX_CLK                      = IOMUX_PAD(0x04D0, 0x0260, 0, 0x056C, 1, 0),
 	MX7D_PAD_ENET1_RX_CLK__WDOG2_WDOG_B                      = IOMUX_PAD(0x04D0, 0x0260, 1, 0x0000, 0, 0),
 	MX7D_PAD_ENET1_RX_CLK__SAI1_TX_BCLK                      = IOMUX_PAD(0x04D0, 0x0260, 2, 0x06A8, 1, 0),
 	MX7D_PAD_ENET1_RX_CLK__GPT2_CLK                          = IOMUX_PAD(0x04D0, 0x0260, 3, 0x0000, 0, 0),
Signature · 1 line
2.10.2
#1 lore raw

PATCH 1/1 imx: iomux-v3: provide MX7D_PAD_ENET1_RX_CLK__ENET1_RGMII_RXC

Quoted 5 lines · Sebastian Andrzej Siewior

MX7D_PAD_ENET1_RX_CLK__ENET1_RX_CLK is in its currently RGMII_RXC. Fix this by providing RX_CLK with properly setting the DAISY value and MX7D_PAD_ENET1_RX_CLK__ENET1_RGMII_RXC which did the "previous" setting. There should be no fallout because there no in tree users of MX7D_PAD_ENET1_RX_CLK__ENET1_RX_CLK.

Are you sure this is correct? According to my data sheet Rev 0.1, 08/2016, 0x240 is ALT0_ENET1_RGMII_RXC... 0x260 only mentions ALT0_ENET1_RX_CLK. I don't think that muxing 0x0260 to 0 and 0x056C (daisy chain) to 0 is a sensible configuration.

The daisy chaining seems wrong, though, for both pinmux, but this should lead to a fix like this:

(shortened a bit so that it fits into 80 characters):

-#de MX7D_PAD_ENET1_RGMII_RXC__ENET1_RGMII_RXC 0x0240 0x04B0 0x0000 0x0 0x0
+#de MX7D_PAD_ENET1_RGMII_RXC__ENET1_RGMII_RXC 0x0240 0x04B0 0x056C 0x0 0x0

-#de MX7D_PAD_ENET1_RX_CLK__ENET1_RX_CLK 0x0260 0x04D0 0x056C 0x0
0x0
+#de MX7D_PAD_ENET1_RX_CLK__ENET1_RX_CLK 0x0260 0x04D0 0x056C 0x0
0x1

--
Stefan

Quoted 53 lines
---
 arch/arm/dts/imx7d-pinfunc.h              | 3 ++-
 arch/arm/include/asm/arch-mx7/mx7d_pins.h | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
arch/arm/dts/imx7d-pinfunc.h +0 -0
index 32d2464b417d..7bc1dee0f7ff 100644
@@ -1123,7 +1123,8 @@
 #define MX7D_PAD_ENET1_TX_CLK__GPIO7_IO12                        

0x025C 0x04CC 0x0000 0x5 0x0
#define MX7D_PAD_ENET1_TX_CLK__CCM_EXT_CLK1
0x025C 0x04CC 0x04E4 0x6 0x2
#define MX7D_PAD_ENET1_TX_CLK__CSU_ALARM_AUT0
0x025C 0x04CC 0x0000 0x7 0x0
-#define MX7D_PAD_ENET1_RX_CLK__ENET1_RX_CLK
0x0260 0x04D0 0x056C 0x0 0x0
+#define MX7D_PAD_ENET1_RX_CLK__ENET1_RGMII_RXC
0x0260 0x04D0 0x056C 0x0 0x0
+#define MX7D_PAD_ENET1_RX_CLK__ENET1_RX_CLK
0x0260 0x04D0 0x056C 0x0 0x1
#define MX7D_PAD_ENET1_RX_CLK__WDOG2_WDOG_B
0x0260 0x04D0 0x0000 0x1 0x0
#define MX7D_PAD_ENET1_RX_CLK__SAI1_TX_BCLK
0x0260 0x04D0 0x06A8 0x2 0x1
#define MX7D_PAD_ENET1_RX_CLK__GPT2_CLK
0x0260 0x04D0 0x0000 0x3 0x0

arch/arm/include/asm/arch-mx7/mx7d_pins.h +1 -1
index 0ab1246de852..55375f5aa0dc 100644
@@ -1278,7 +1278,8 @@ enum {
 	MX7D_PAD_ENET1_TX_CLK__CCM_EXT_CLK1                      =
 IOMUX_PAD(0x04CC, 0x025C, 6, 0x04E4, 2, 0),
 	MX7D_PAD_ENET1_TX_CLK__CSU_ALARM_AUT0                    =
 IOMUX_PAD(0x04CC, 0x025C, 7, 0x0000, 0, 0),
 
-	MX7D_PAD_ENET1_RX_CLK__ENET1_RX_CLK                      =
 IOMUX_PAD(0x04D0, 0x0260, 0, 0x056C, 0, 0),
+	MX7D_PAD_ENET1_RX_CLK__ENET1_RGMII_RXC                   =

IOMUX_PAD(0x04D0, 0x0260, 0, 0x056C, 0, 0),

arch/arm/include/asm/arch-mx7/mx7d_pins.h +1 -0
+	MX7D_PAD_ENET1_RX_CLK__ENET1_RX_CLK                      =

IOMUX_PAD(0x04D0, 0x0260, 0, 0x056C, 1, 0),
MX7D_PAD_ENET1_RX_CLK__WDOG2_WDOG_B =
IOMUX_PAD(0x04D0, 0x0260, 1, 0x0000, 0, 0),
MX7D_PAD_ENET1_RX_CLK__SAI1_TX_BCLK =
IOMUX_PAD(0x04D0, 0x0260, 2, 0x06A8, 1, 0),
MX7D_PAD_ENET1_RX_CLK__GPT2_CLK =
IOMUX_PAD(0x04D0, 0x0260, 3, 0x0000, 0, 0),

#2 lore raw

PATCH 1/1 imx: iomux-v3: provide MX7D_PAD_ENET1_RX_CLK__ENET1_RGMII_RXC

Quoted 11 lines · Stefan Agner
Quoted 5 lines · Sebastian Andrzej Siewior

MX7D_PAD_ENET1_RX_CLK__ENET1_RX_CLK is in its currently RGMII_RXC. Fix this by providing RX_CLK with properly setting the DAISY value and MX7D_PAD_ENET1_RX_CLK__ENET1_RGMII_RXC which did the "previous" setting. There should be no fallout because there no in tree users of MX7D_PAD_ENET1_RX_CLK__ENET1_RX_CLK.

Are you sure this is correct? According to my data sheet Rev 0.1, 08/2016, 0x240 is ALT0_ENET1_RGMII_RXC... 0x260 only mentions ALT0_ENET1_RX_CLK. I don't think that muxing 0x0260 to 0 and 0x056C (daisy chain) to 0 is a sensible configuration.

8.2.7.343 ENET1_RX_CLK_SELECT_INPUT DAISY Register (IOMUXC_ENET1_RX_CLK_SELECT_INPUT) says:

|0 ENET1_RGMII_RXC_ALT0 - Selecting Pad: ENET1_RGMII_RXC Mode:
|  ALT0 for ENET1_RGMII_RXC
|1 ENET1_RX_CLK_ALT0 - Selecting Pad: ENET1_RX_CLK Mode: ALT0
|  for ENET1_RX_CLK

and I would like the 1 in daisy.

Quoted 11 lines

The daisy chaining seems wrong, though, for both pinmux, but this should lead to a fix like this:

(shortened a bit so that it fits into 80 characters):

-#de MX7D_PAD_ENET1_RGMII_RXC__ENET1_RGMII_RXC 0x0240 0x04B0 0x0000 0x0 0x0
+#de MX7D_PAD_ENET1_RGMII_RXC__ENET1_RGMII_RXC 0x0240 0x04B0 0x056C 0x0 0x0

Quoted 4 lines

-#de MX7D_PAD_ENET1_RX_CLK__ENET1_RX_CLK 0x0260 0x04D0 0x056C 0x0
0x0
+#de MX7D_PAD_ENET1_RX_CLK__ENET1_RX_CLK 0x0260 0x04D0 0x056C 0x0
0x1

If you send me a proper patch I could test if it works. The part I sent is what I use atm on a 100Mbit MII PHY.

Sebastian

#3 lore raw

PATCH 1/1 imx: iomux-v3: provide MX7D_PAD_ENET1_RX_CLK__ENET1_RGMII_RXC

In reply to Sebastian Andrzej Siewior

Hi Sebastian,

Quoted 6 lines · Sebastian Andrzej Siewior

MX7D_PAD_ENET1_RX_CLK__ENET1_RX_CLK is in its currently RGMII_RXC. Fix this by providing RX_CLK with properly setting the DAISY value and MX7D_PAD_ENET1_RX_CLK__ENET1_RGMII_RXC which did the "previous" setting. There should be no fallout because there no in tree users of MX7D_PAD_ENET1_RX_CLK__ENET1_RX_CLK.

Right - I do not see any use case, and we do not break any board.

Quoted 26 lines
---
 arch/arm/dts/imx7d-pinfunc.h              | 3 ++-
 arch/arm/include/asm/arch-mx7/mx7d_pins.h | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
arch/arm/dts/imx7d-pinfunc.h +2 -1
index 32d2464b417d..7bc1dee0f7ff 100644
@@ -1123,7 +1123,8 @@
 #define MX7D_PAD_ENET1_TX_CLK__GPIO7_IO12                         0x025C 0x04CC 0x0000 0x5 0x0
 #define MX7D_PAD_ENET1_TX_CLK__CCM_EXT_CLK1                       0x025C 0x04CC 0x04E4 0x6 0x2
 #define MX7D_PAD_ENET1_TX_CLK__CSU_ALARM_AUT0                     0x025C 0x04CC 0x0000 0x7 0x0
-#define MX7D_PAD_ENET1_RX_CLK__ENET1_RX_CLK                       0x0260 0x04D0 0x056C 0x0 0x0
+#define MX7D_PAD_ENET1_RX_CLK__ENET1_RGMII_RXC                    0x0260 0x04D0 0x056C 0x0 0x0
+#define MX7D_PAD_ENET1_RX_CLK__ENET1_RX_CLK                       0x0260 0x04D0 0x056C 0x0 0x1
 #define MX7D_PAD_ENET1_RX_CLK__WDOG2_WDOG_B                       0x0260 0x04D0 0x0000 0x1 0x0
 #define MX7D_PAD_ENET1_RX_CLK__SAI1_TX_BCLK                       0x0260 0x04D0 0x06A8 0x2 0x1
 #define MX7D_PAD_ENET1_RX_CLK__GPT2_CLK                           0x0260 0x04D0 0x0000 0x3 0x0
arch/arm/include/asm/arch-mx7/mx7d_pins.h +0 -0
index 0ab1246de852..55375f5aa0dc 100644

arch/arm/include/asm/arch-mx7/mx7d_pins.h enum { · line 1285

Quoted 9 lines
arch/arm/include/asm/arch-mx7/mx7d_pins.h +2 -1
@@ -1278,7 +1278,8 @@ enum {
 	MX7D_PAD_ENET1_TX_CLK__CCM_EXT_CLK1                      = IOMUX_PAD(0x04CC, 0x025C, 6, 0x04E4, 2, 0),
 	MX7D_PAD_ENET1_TX_CLK__CSU_ALARM_AUT0                    = IOMUX_PAD(0x04CC, 0x025C, 7, 0x0000, 0, 0),
 
-	MX7D_PAD_ENET1_RX_CLK__ENET1_RX_CLK                      = IOMUX_PAD(0x04D0, 0x0260, 0, 0x056C, 0, 0),
+	MX7D_PAD_ENET1_RX_CLK__ENET1_RGMII_RXC                   = IOMUX_PAD(0x04D0, 0x0260, 0, 0x056C, 0, 0),
+	MX7D_PAD_ENET1_RX_CLK__ENET1_RX_CLK                      = IOMUX_PAD(0x04D0, 0x0260, 0, 0x056C, 1, 0),
 	MX7D_PAD_ENET1_RX_CLK__WDOG2_WDOG_B                      = IOMUX_PAD(0x04D0, 0x0260, 1, 0x0000, 0, 0),
 	MX7D_PAD_ENET1_RX_CLK__SAI1_TX_BCLK                      = IOMUX_PAD(0x04D0, 0x0260, 2, 0x06A8, 1, 0),
 	MX7D_PAD_ENET1_RX_CLK__GPT2_CLK                          = IOMUX_PAD(0x04D0, 0x0260, 3, 0x0000, 0, 0),

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================