Skip to content

Commit

Permalink
ARM: dts: ccmp13-dvk: set 10/100 Ethernet PHY on shared MDIO1 bus
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
abuzarra committed Mar 2, 2023
1 parent f1b2527 commit de6df6b
Showing 1 changed file with 10 additions and 18 deletions.
28 changes: 10 additions & 18 deletions arch/arm/dts/ccmp13-dvk.dts
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,20 @@
reset-assert-us = <1000>;
reset-deassert-us = <2000>;
};

phy0_eth2: ethernet-phy@1 {
reg = <1>;
compatible = "ethernet-phy-id0007.c0f0"; /* PHY ID for SMSC LAN8720Ai */
reset-gpios = <&gpioh 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
interrupt-parent = <&gpioh>;
interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
};
};
};

/* 10/100 Ethernet */
&eth2 {
status = "disabled";
status = "okay";
pinctrl-0 = <&ccmp13_eth2_rmii_pins>;
pinctrl-1 = <&ccmp13_eth2_rmii_sleep_pins>;
pinctrl-names = "default", "sleep";
Expand All @@ -118,18 +126,6 @@
phy-handle = <&phy0_eth2>;
st,ext-phyclk;
phy-supply = <&reg_3v3_eth_pwr>;

mdio1 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "snps,dwmac-mdio";

phy0_eth2: ethernet-phy@0 {
reg = <0>;
compatible = "ethernet-phy-id0007.c0f0"; /* PHY ID for SMSC LAN8720Ai */
reset-gpios = <&gpioh 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
};
};
};

&i2c2 {
Expand Down Expand Up @@ -441,9 +437,7 @@
pinmux = <STM32_PINMUX('F', 7, AF11)>, /* ETH2_TXD0 */
<STM32_PINMUX('G', 11, AF10)>, /* ETH2_TXD1 */
<STM32_PINMUX('A', 11, AF13)>, /* ETH2_CLK */
<STM32_PINMUX('F', 6, AF11)>, /* ETH2_TX_EN */
<STM32_PINMUX('B', 2, AF11)>, /* ETH2_MDIO */
<STM32_PINMUX('G', 5, AF10)>; /* ETH2_MDC */
<STM32_PINMUX('F', 6, AF11)>; /* ETH2_TX_EN */
bias-disable;
drive-push-pull;
slew-rate = <1>;
Expand All @@ -464,8 +458,6 @@
<STM32_PINMUX('G', 11, ANALOG)>, /* ETH2_TXD1 */
<STM32_PINMUX('A', 11, ANALOG)>, /* ETH2_CLK */
<STM32_PINMUX('F', 6, ANALOG)>, /* ETH2_TX_EN */
<STM32_PINMUX('B', 2, ANALOG)>, /* ETH2_MDIO */
<STM32_PINMUX('G', 5, ANALOG)>, /* ETH2_MDC */
<STM32_PINMUX('F', 4, ANALOG)>, /* ETH2_RXD0 */
<STM32_PINMUX('E', 2, ANALOG)>, /* ETH2_RXD1 */
<STM32_PINMUX('A', 12, ANALOG)>, /* ETH2_RX_DV */
Expand Down

0 comments on commit de6df6b

Please sign in to comment.