boards: dts: stm32: add mdio and phy node

add mdio and phy node to every stm32board that
supports ethernet.
Also set the phy-handle for every ethernet mac.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
This commit is contained in:
Fin Maaß 2025-03-26 07:46:37 +01:00 committed by Benjamin Cabé
commit d74d0f7ac7
29 changed files with 189 additions and 60 deletions

View file

@ -108,6 +108,7 @@ zephyr_udc0: &usbotg_fs {
>;
pinctrl-names = "default";
phy-connection-type = "rmii";
phy-handle = <&eth_phy>;
status = "okay";
};
@ -116,9 +117,8 @@ zephyr_udc0: &usbotg_fs {
pinctrl-names = "default";
status = "okay";
ethernet-phy@0 {
eth_phy: ethernet-phy@0 {
compatible = "ethernet-phy";
reg = <0x00>;
status = "okay";
};
};

View file

@ -223,6 +223,7 @@
&eth_txd0_pg13 >;
pinctrl-names = "default";
phy-connection-type = "rmii";
phy-handle = <&eth_phy>;
status = "okay";
};
@ -231,10 +232,9 @@
pinctrl-0 = <&eth_mdio_pa2 &eth_mdc_pc1>;
pinctrl-names = "default";
ethernet-phy@0 {
eth_phy: ethernet-phy@0 {
compatible = "ethernet-phy";
reg = <0x00>;
status = "okay";
};
};

View file

@ -116,11 +116,9 @@ zephyr_udc0: &usbotg_hs {
&mac {
status = "okay";
pinctrl-0 = <&eth_mdc_pc1
&eth_rxd0_pc4
pinctrl-0 = <&eth_rxd0_pc4
&eth_rxd1_pc5
&eth_ref_clk_pa1
&eth_mdio_pa2
&eth_col_pa3
&eth_crs_dv_pa7
&eth_tx_en_pg11
@ -128,4 +126,16 @@ zephyr_udc0: &usbotg_hs {
&eth_txd1_pg14>;
pinctrl-names = "default";
phy-connection-type = "rmii";
phy-handle = <&eth_phy>;
};
&mdio {
status = "okay";
pinctrl-0 = <&eth_mdio_pa2 &eth_mdc_pc1>;
pinctrl-names = "default";
eth_phy: ethernet-phy@0 {
compatible = "ethernet-phy";
reg = <0x00>;
};
};

View file

@ -179,17 +179,27 @@ zephyr_udc0: &usbotg_fs {
&mac {
status = "okay";
pinctrl-0 = <&eth_mdc_pc1
&eth_rxd0_pc4
pinctrl-0 = <&eth_rxd0_pc4
&eth_rxd1_pc5
&eth_ref_clk_pa1
&eth_mdio_pa2
&eth_crs_dv_pa7
&eth_tx_en_pg11
&eth_txd0_pg13
&eth_txd1_pb13>;
pinctrl-names = "default";
phy-connection-type = "rmii";
phy-handle = <&phy>;
};
&mdio {
status = "okay";
pinctrl-0 = <&eth_mdio_pa2 &eth_mdc_pc1>;
pinctrl-names = "default";
phy: ethernet-phy@0 {
compatible = "ethernet-phy";
reg = <0x00>;
};
};
&flash0 {

View file

@ -176,17 +176,27 @@ zephyr_udc0: &usbotg_fs {
&mac {
status = "okay";
pinctrl-0 = <&eth_mdc_pc1
&eth_rxd0_pc4
pinctrl-0 = <&eth_rxd0_pc4
&eth_rxd1_pc5
&eth_ref_clk_pa1
&eth_mdio_pa2
&eth_crs_dv_pa7
&eth_tx_en_pg11
&eth_txd0_pg13
&eth_txd1_pb13>;
pinctrl-names = "default";
phy-connection-type = "rmii";
phy-handle = <&eth_phy>;
};
&mdio {
status = "okay";
pinctrl-0 = <&eth_mdio_pa2 &eth_mdc_pc1>;
pinctrl-names = "default";
eth_phy: ethernet-phy@0 {
compatible = "ethernet-phy";
reg = <0x00>;
};
};
&flash0 {

View file

@ -180,17 +180,27 @@ zephyr_udc0: &usbotg_fs {
&mac {
status = "okay";
pinctrl-0 = <&eth_mdc_pc1
&eth_rxd0_pc4
pinctrl-0 = <&eth_rxd0_pc4
&eth_rxd1_pc5
&eth_ref_clk_pa1
&eth_mdio_pa2
&eth_crs_dv_pa7
&eth_tx_en_pg11
&eth_txd0_pg13
&eth_txd1_pb13>;
pinctrl-names = "default";
phy-connection-type = "rmii";
phy-handle = <&eth_phy>;
};
&mdio {
status = "okay";
pinctrl-0 = <&eth_mdio_pa2 &eth_mdc_pc1>;
pinctrl-names = "default";
eth_phy: ethernet-phy@0 {
compatible = "ethernet-phy";
reg = <0x00>;
};
};
&flash0 {

View file

@ -197,17 +197,27 @@ zephyr_udc0: &usbotg_fs {
&mac {
status = "okay";
pinctrl-0 = <&eth_mdc_pc1
&eth_rxd0_pc4
pinctrl-0 = <&eth_rxd0_pc4
&eth_rxd1_pc5
&eth_ref_clk_pa1
&eth_mdio_pa2
&eth_crs_dv_pa7
&eth_tx_en_pg11
&eth_txd0_pg13
&eth_txd1_pb13>;
pinctrl-names = "default";
phy-connection-type = "rmii";
phy-handle = <&eth_phy>;
};
&mdio {
status = "okay";
pinctrl-0 = <&eth_mdio_pa2 &eth_mdc_pc1>;
pinctrl-names = "default";
eth_phy: ethernet-phy@0 {
compatible = "ethernet-phy";
reg = <0x00>;
};
};
&backup_sram {

View file

@ -141,19 +141,30 @@ zephyr_udc0: &usbotg_fs {
&mac {
status = "okay";
pinctrl-0 = <&eth_mdc_pc1
&eth_rxd0_pc4
pinctrl-0 = <&eth_rxd0_pc4
&eth_rxd1_pc5
&eth_ref_clk_pa1
&eth_mdio_pa2
&eth_crs_dv_pa7
&eth_tx_en_pg11
&eth_txd0_pg13
&eth_txd1_pb13>;
pinctrl-names = "default";
phy-connection-type = "rmii";
phy-handle = <&eth_phy>;
};
&mdio {
status = "okay";
pinctrl-0 = <&eth_mdio_pa2 &eth_mdc_pc1>;
pinctrl-names = "default";
eth_phy: ethernet-phy@0 {
compatible = "ethernet-phy";
reg = <0x00>;
};
};
&flash0 {
partitions {
compatible = "fixed-partitions";

View file

@ -188,17 +188,27 @@ zephyr_udc0: &usbotg_fs {
&mac {
status = "okay";
pinctrl-0 = <&eth_mdc_pc1
&eth_rxd0_pc4
pinctrl-0 = <&eth_rxd0_pc4
&eth_rxd1_pc5
&eth_ref_clk_pa1
&eth_mdio_pa2
&eth_crs_dv_pa7
&eth_tx_en_pg11
&eth_txd0_pg13
&eth_txd1_pb13>;
pinctrl-names = "default";
phy-connection-type = "rmii";
phy-handle = <&eth_phy>;
};
&mdio {
status = "okay";
pinctrl-0 = <&eth_mdio_pa2 &eth_mdc_pc1>;
pinctrl-names = "default";
eth_phy: ethernet-phy@0 {
compatible = "ethernet-phy";
reg = <0x00>;
};
};
&flash0 {

View file

@ -50,6 +50,7 @@
&eth_txd1_pb15>;
pinctrl-names = "default";
phy-connection-type = "rmii";
phy-handle = <&eth_phy>;
};
&mdio {
@ -57,9 +58,8 @@
pinctrl-0 = <&eth_mdio_pa2 &eth_mdc_pc1>;
pinctrl-names = "default";
ethernet-phy@0 {
eth_phy: ethernet-phy@0 {
compatible = "ethernet-phy";
reg = <0x00>;
status = "okay";
};
};

View file

@ -179,6 +179,7 @@
&eth_txd1_pb13>;
pinctrl-names = "default";
phy-connection-type = "rmii";
phy-handle = <&eth_phy>;
};
&mdio {
@ -186,10 +187,9 @@
pinctrl-0 = <&eth_mdio_pa2 &eth_mdc_pc1>;
pinctrl-names = "default";
phy: ethernet-phy@0 {
eth_phy: ethernet-phy@0 {
compatible = "ethernet-phy";
reg = <0>;
status = "okay";
};
};

View file

@ -204,6 +204,7 @@ zephyr_udc0: &usbotg_fs {
&eth_txd1_pb13>;
pinctrl-names = "default";
phy-connection-type = "rmii";
phy-handle = <&eth_phy>;
};
&mdio {
@ -211,10 +212,9 @@ zephyr_udc0: &usbotg_fs {
pinctrl-0 = <&eth_mdio_pa2 &eth_mdc_pc1>;
pinctrl-names = "default";
ethernet-phy@0 {
eth_phy: ethernet-phy@0 {
compatible = "ethernet-phy";
reg = <0x00>;
status = "okay";
};
};

View file

@ -116,6 +116,7 @@
&eth_txd1_pb13>;
pinctrl-names = "default";
phy-connection-type = "rmii";
phy-handle = <&eth_phy>;
};
&mdio {
@ -123,10 +124,9 @@
pinctrl-0 = <&eth_mdio_pa2 &eth_mdc_pc1>;
pinctrl-names = "default";
ethernet-phy@0 {
eth_phy: ethernet-phy@0 {
compatible = "ethernet-phy";
reg = <0x00>;
status = "okay";
};
};

View file

@ -183,6 +183,7 @@ zephyr_udc0: &usbotg_fs {
&eth_txd1_pb13>;
pinctrl-names = "default";
phy-connection-type = "rmii";
phy-handle = <&eth_phy>;
};
&mdio {
@ -190,10 +191,9 @@ zephyr_udc0: &usbotg_fs {
pinctrl-0 = <&eth_mdio_pa2 &eth_mdc_pc1>;
pinctrl-names = "default";
ethernet-phy@0 {
eth_phy: ethernet-phy@0 {
compatible = "ethernet-phy";
reg = <0x00>;
status = "okay";
};
};

View file

@ -134,6 +134,7 @@
&eth_txd1_pb13>;
pinctrl-names = "default";
phy-connection-type = "rmii";
phy-handle = <&eth_phy>;
};
&mdio {
@ -141,10 +142,9 @@
pinctrl-0 = <&eth_mdio_pa2 &eth_mdc_pc1>;
pinctrl-names = "default";
ethernet-phy@0 {
eth_phy: ethernet-phy@0 {
compatible = "ethernet-phy";
reg = <0x00>;
status = "okay";
};
};

View file

@ -188,6 +188,7 @@
&eth1_rmii_txd1_pf13>;
pinctrl-names = "default";
phy-connection-type = "rmii";
phy-handle = <&eth_phy>;
};
&mdio {
@ -195,10 +196,9 @@
pinctrl-0 = <&eth1_mdio_pf4 &eth1_mdc_pg11>;
pinctrl-names = "default";
ethernet-phy@0 {
eth_phy: ethernet-phy@0 {
compatible = "ethernet-phy";
reg = <0x0>;
status = "okay";
};
};

View file

@ -177,17 +177,27 @@ zephyr_udc0: &usbotg_fs {
&mac {
status = "okay";
pinctrl-0 = <&eth_mdc_pc1
&eth_rxd0_pc4
pinctrl-0 = <&eth_rxd0_pc4
&eth_rxd1_pc5
&eth_ref_clk_pa1
&eth_mdio_pa2
&eth_crs_dv_pa7
&eth_tx_en_pg11
&eth_txd0_pg13
&eth_txd1_pg14>;
pinctrl-names = "default";
phy-connection-type = "rmii";
phy-handle = <&eth_phy>;
};
&mdio {
status = "okay";
pinctrl-0 = <&eth_mdio_pa2 &eth_mdc_pc1>;
pinctrl-names = "default";
eth_phy: ethernet-phy@0 {
compatible = "ethernet-phy";
reg = <0x00>;
};
};
&quadspi {

View file

@ -164,17 +164,27 @@ zephyr_udc0: &usbotg_fs {
&mac {
status = "okay";
pinctrl-0 = <&eth_mdc_pc1
&eth_rxd0_pc4
pinctrl-0 = <&eth_rxd0_pc4
&eth_rxd1_pc5
&eth_ref_clk_pa1
&eth_mdio_pa2
&eth_crs_dv_pa7
&eth_tx_en_pg11
&eth_txd0_pg13
&eth_txd1_pg14>;
pinctrl-names = "default";
phy-connection-type = "rmii";
phy-handle = <&eth_phy>;
};
&mdio {
status = "okay";
pinctrl-0 = <&eth_mdio_pa2 &eth_mdc_pc1>;
pinctrl-names = "default";
eth_phy: ethernet-phy@0 {
compatible = "ethernet-phy";
reg = <0x00>;
};
};
&quadspi {

View file

@ -151,17 +151,27 @@ arduino_serial: &usart6 {};
&mac {
status = "okay";
pinctrl-0 = <&eth_mdc_pc1
&eth_rxd0_pc4
pinctrl-0 = <&eth_rxd0_pc4
&eth_rxd1_pc5
&eth_ref_clk_pa1
&eth_mdio_pa2
&eth_crs_dv_pa7
&eth_tx_en_pg11
&eth_txd0_pg13
&eth_txd1_pg14>;
pinctrl-names = "default";
phy-connection-type = "rmii";
phy-handle = <&eth_phy>;
};
&mdio {
status = "okay";
pinctrl-0 = <&eth_mdio_pa2 &eth_mdc_pc1>;
pinctrl-names = "default";
eth_phy: ethernet-phy@0 {
compatible = "ethernet-phy";
reg = <0x00>;
};
};
&sdmmc2 {

View file

@ -167,6 +167,7 @@
&eth_txd1_pg12>;
pinctrl-names = "default";
phy-connection-type = "rmii";
phy-handle = <&eth_phy>;
};
&mdio {
@ -174,10 +175,9 @@
pinctrl-0 = <&eth_mdio_pa2 &eth_mdc_pc1>;
pinctrl-names = "default";
ethernet-phy@0 {
eth_phy: ethernet-phy@0 {
compatible = "ethernet-phy";
reg = <0x00>;
status = "okay";
};
};

View file

@ -139,6 +139,7 @@
&eth_txd1_pb13>;
pinctrl-names = "default";
phy-connection-type = "rmii";
phy-handle = <&eth_phy>;
status = "okay";
};
@ -147,10 +148,9 @@
pinctrl-0 = <&eth_mdio_pa2 &eth_mdc_pc1>;
pinctrl-names = "default";
ethernet-phy@0 {
eth_phy: ethernet-phy@0 {
compatible = "ethernet-phy";
reg = <0x00>;
status = "okay";
};
};

View file

@ -145,6 +145,7 @@
&eth_rx_er_pi10>;
pinctrl-names = "default";
phy-connection-type = "mii";
phy-handle = <&eth_phy>;
};
&mdio {
@ -152,10 +153,9 @@
pinctrl-0 = <&eth_mdio_pa2 &eth_mdc_pc1>;
pinctrl-names = "default";
ethernet-phy@1 {
eth_phy: ethernet-phy@1 {
compatible = "ethernet-phy";
reg = <0x01>;
status = "okay";
};
};

View file

@ -145,6 +145,7 @@
&eth_txd1_pg12>;
pinctrl-names = "default";
phy-connection-type = "rmii";
phy-handle = <&eth_phy>;
};
&mdio {
@ -152,10 +153,9 @@
pinctrl-0 = <&eth_mdio_pa2 &eth_mdc_pc1>;
pinctrl-names = "default";
ethernet-phy@0 {
eth_phy: ethernet-phy@0 {
compatible = "ethernet-phy";
reg = <0x00>;
status = "okay";
};
};

View file

@ -161,6 +161,7 @@
&eth_txd1_pg12>;
pinctrl-names = "default";
phy-connection-type = "rmii";
phy-handle = <&eth_phy>;
};
&mdio {
@ -168,10 +169,9 @@
pinctrl-0 = <&eth_mdio_pa2 &eth_mdc_pc1>;
pinctrl-names = "default";
ethernet-phy@0 {
eth_phy: ethernet-phy@0 {
compatible = "ethernet-phy";
reg = <0x00>;
status = "okay";
};
};

View file

@ -239,6 +239,7 @@ zephyr_udc0: &usbotg_fs {
&eth_txd1_pg14>;
pinctrl-names = "default";
phy-connection-type = "rmii";
phy-handle = <&eth_phy>;
};
&mdio {
@ -246,10 +247,9 @@ zephyr_udc0: &usbotg_fs {
pinctrl-0 = <&eth_mdio_pa2 &eth_mdc_pc1>;
pinctrl-names = "default";
ethernet-phy@0 {
eth_phy: ethernet-phy@0 {
compatible = "microchip,ksz8081";
reg = <0x00>;
status = "okay";
microchip,interface-type = "rmii-25MHz";
};
};

View file

@ -29,6 +29,13 @@
<&rcc STM32_CLOCK(AHB1, 15U)>,
<&rcc STM32_CLOCK(AHB1, 16U)>;
status = "disabled";
mdio: mdio {
compatible = "st,stm32-mdio";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
};
};
};
};

View file

@ -21,6 +21,13 @@
<&rcc STM32_CLOCK(AHB1, 27U)>,
<&rcc STM32_CLOCK(AHB1, 28U)>;
status = "disabled";
mdio: mdio {
compatible = "st,stm32-mdio";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
};
};
};
};

View file

@ -21,6 +21,13 @@
<&rcc STM32_CLOCK(AHB1, 27U)>,
<&rcc STM32_CLOCK(AHB1, 28U)>;
status = "disabled";
mdio: mdio {
compatible = "st,stm32-mdio";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
};
};
};
};

View file

@ -86,6 +86,13 @@
<&rcc STM32_CLOCK(AHB1, 27U)>,
<&rcc STM32_CLOCK(AHB1, 28U)>;
status = "disabled";
mdio: mdio {
compatible = "st,stm32-mdio";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
};
};
};