Skip to content

Commit de6df6b

Browse files
committed
ARM: dts: ccmp13-dvk: set 10/100 Ethernet PHY on shared MDIO1 bus
The CCMP13 DVK board shares the MDIO bus #1 for both Ethernet PHYs, so this commit reflects this with the following changes: - Move the eth2 PHY definition to the mdio1 bus node - Free the MDIO bus #2 lines (ETH2_MDIO and ETH2_MDC) - Add support to the interrupt line for second Ethernet PHY - Enable by default both Ethernet PHYs https://onedigi.atlassian.net/browse/DEL-8338 Signed-off-by: Arturo Buzarra <[email protected]>
1 parent f1b2527 commit de6df6b

File tree

1 file changed

+10
-18
lines changed

1 file changed

+10
-18
lines changed

arch/arm/dts/ccmp13-dvk.dts

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,20 @@
104104
reset-assert-us = <1000>;
105105
reset-deassert-us = <2000>;
106106
};
107+
108+
phy0_eth2: ethernet-phy@1 {
109+
reg = <1>;
110+
compatible = "ethernet-phy-id0007.c0f0"; /* PHY ID for SMSC LAN8720Ai */
111+
reset-gpios = <&gpioh 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
112+
interrupt-parent = <&gpioh>;
113+
interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
114+
};
107115
};
108116
};
109117

110118
/* 10/100 Ethernet */
111119
&eth2 {
112-
status = "disabled";
120+
status = "okay";
113121
pinctrl-0 = <&ccmp13_eth2_rmii_pins>;
114122
pinctrl-1 = <&ccmp13_eth2_rmii_sleep_pins>;
115123
pinctrl-names = "default", "sleep";
@@ -118,18 +126,6 @@
118126
phy-handle = <&phy0_eth2>;
119127
st,ext-phyclk;
120128
phy-supply = <&reg_3v3_eth_pwr>;
121-
122-
mdio1 {
123-
#address-cells = <1>;
124-
#size-cells = <0>;
125-
compatible = "snps,dwmac-mdio";
126-
127-
phy0_eth2: ethernet-phy@0 {
128-
reg = <0>;
129-
compatible = "ethernet-phy-id0007.c0f0"; /* PHY ID for SMSC LAN8720Ai */
130-
reset-gpios = <&gpioh 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
131-
};
132-
};
133129
};
134130

135131
&i2c2 {
@@ -441,9 +437,7 @@
441437
pinmux = <STM32_PINMUX('F', 7, AF11)>, /* ETH2_TXD0 */
442438
<STM32_PINMUX('G', 11, AF10)>, /* ETH2_TXD1 */
443439
<STM32_PINMUX('A', 11, AF13)>, /* ETH2_CLK */
444-
<STM32_PINMUX('F', 6, AF11)>, /* ETH2_TX_EN */
445-
<STM32_PINMUX('B', 2, AF11)>, /* ETH2_MDIO */
446-
<STM32_PINMUX('G', 5, AF10)>; /* ETH2_MDC */
440+
<STM32_PINMUX('F', 6, AF11)>; /* ETH2_TX_EN */
447441
bias-disable;
448442
drive-push-pull;
449443
slew-rate = <1>;
@@ -464,8 +458,6 @@
464458
<STM32_PINMUX('G', 11, ANALOG)>, /* ETH2_TXD1 */
465459
<STM32_PINMUX('A', 11, ANALOG)>, /* ETH2_CLK */
466460
<STM32_PINMUX('F', 6, ANALOG)>, /* ETH2_TX_EN */
467-
<STM32_PINMUX('B', 2, ANALOG)>, /* ETH2_MDIO */
468-
<STM32_PINMUX('G', 5, ANALOG)>, /* ETH2_MDC */
469461
<STM32_PINMUX('F', 4, ANALOG)>, /* ETH2_RXD0 */
470462
<STM32_PINMUX('E', 2, ANALOG)>, /* ETH2_RXD1 */
471463
<STM32_PINMUX('A', 12, ANALOG)>, /* ETH2_RX_DV */

0 commit comments

Comments
 (0)