Skip to content

Commit 5ed3b84

Browse files
committed
boards: st: stm32mp135f_dk: add ethernet nodes
The STM32MP135F-DK board embeds 2 ethernets. Enable the ethernet1 in RMII mode with associated PHY. Signed-off-by: Arnaud Pouliquen <[email protected]>
1 parent 5c85052 commit 5ed3b84

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

boards/st/stm32mp135f_dk/Kconfig.defconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,7 @@ config GPIO_MCP230XX_INIT_PRIORITY
1212

1313
endif # GPIO_MCP230XX
1414

15+
config NET_L2_ETHERNET
16+
default y if NETWORKING
17+
1518
endif # BOARD_STM32MP135F_DK

boards/st/stm32mp135f_dk/stm32mp135f_dk.dts

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,13 @@
7373
gpio-map = <CSI_IO0 0 &mcp23017 4 0>,
7474
<CSI_IO1 0 &mcp23017 3 0>;
7575
};
76+
77+
eth_ram: sram@30000000 {
78+
compatible = "zephyr,memory-region", "mmio-sram";
79+
reg = <0x2FFE0000 DT_SIZE_K(16)>;
80+
#memory-region-cells = <0>;
81+
zephyr,memory-region = "ETH_SRAM";
82+
};
7683
};
7784

7885
&clk_hsi {
@@ -111,6 +118,17 @@
111118
status = "okay";
112119
};
113120

121+
&pll4 {
122+
clocks = <&clk_hsi>;
123+
div-m = <2>;
124+
mul-n = <50>;
125+
div-p = <12>;
126+
div-q = <60>;
127+
div-r = <6>;
128+
fracn = <0>;
129+
status = "okay";
130+
};
131+
114132
&rcc {
115133
clock-frequency = <DT_FREQ_M(1000)>;
116134
clocks = <&pll>;
@@ -250,3 +268,30 @@ csi_interface: &dcmipp {
250268

251269
status = "disabled";
252270
};
271+
272+
&mac {
273+
status = "okay";
274+
pinctrl-0 = <&eth1_txd0_pg13
275+
&eth1_txd1_pg14
276+
&eth1_tx_ctl_pb11
277+
&eth1_ref_clk_pa1
278+
&eth1_rxd0_pc4
279+
&eth1_rxd1_pc5
280+
&eth1_crs_dv_pc1>;
281+
pinctrl-names = "default";
282+
phy-connection-type = "rmii";
283+
phy-handle = <&eth_phy>;
284+
memory-regions = <&eth_ram>;
285+
};
286+
287+
&mdio {
288+
status = "okay";
289+
pinctrl-0 = <&eth1_mdio_pa2 &eth1_mdc_pg2>;
290+
pinctrl-names = "default";
291+
292+
eth_phy: ethernet-phy@0 {
293+
compatible = "microchip,lan8742";
294+
reg = <0>;
295+
reset-gpios = <&mcp23017 9 GPIO_ACTIVE_LOW>;
296+
};
297+
};

0 commit comments

Comments
 (0)