Enable Ethernet on STM32F429 EVAL board
Subsystems (4)
cover Enable Ethernet on STM32F429 EVAL board
This series adds Ethernet support on STM32F429 SOC and enable it on Eval board:
-Add Ethernet node in SOC file:
-Define MII mode pinctrl
-use Mixed burst and PBL 8
-Add system config node for glue.
-Enable Ethernet for Eval board:
-mii mode
-connected to a PHY through MDIO.
Note, this series follow the series which adds glue and update stmmac driver:
https://lkml.org/lkml/2016/2/26/329
Best regards.
Alex
Alexandre TORGUE (3):
ARM: dts: stm32f429: Add system config bank node
ARM: dts: stm32f429: Add Ethernet support
ARM: dts: stm32f429: Enable Ethernet on Eval board
arch/arm/boot/dts/stm32429i-eval.dts | 15 ++++++++++++++ arch/arm/boot/dts/stm32f429.dtsi | 40 ++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+)
Signature · 1 line
1.9.1
PATCH 1/3 ARM: dts: stm32f429: Add system config bank node
arch/arm/boot/dts/stm32f429.dtsi +5 -0
@@ -171,6 +171,11 @@ status = "disabled"; }; + syscfg: system-config at 40013800 { + compatible = "syscon"; + reg = <0x40013800 0x400>; + }; + pin-controller { #address-cells = <1>; #size-cells = <1>;
Signature · 1 line
1.9.1
PATCH 2/3 ARM: dts: stm32f429: Add Ethernet support
In reply to Alexandre TORGUEAdd Ethernet support (Synopsys MAC IP 3.50a) on stm32f429 SOC.
arch/arm/boot/dts/stm32f429.dtsi +35 -0
@@ -283,6 +283,26 @@ bias-disable; }; }; + + ethernet0_mii: mii at 0 { + mii { + slew-rate = <2>; + pinmux = <STM32F429_PG13_FUNC_ETH_MII_TXD0_ETH_RMII_TXD0>, + <STM32F429_PG14_FUNC_ETH_MII_TXD1_ETH_RMII_TXD1>, + <STM32F429_PC2_FUNC_ETH_MII_TXD2>, + <STM32F429_PB8_FUNC_ETH_MII_TXD3>, + <STM32F429_PC3_FUNC_ETH_MII_TX_CLK>, + <STM32F429_PG11_FUNC_ETH_MII_TX_EN_ETH_RMII_TX_EN>, + <STM32F429_PA2_FUNC_ETH_MDIO>, + <STM32F429_PC1_FUNC_ETH_MDC>, + <STM32F429_PA1_FUNC_ETH_MII_RX_CLK_ETH_RMII_REF_CLK>, + <STM32F429_PA7_FUNC_ETH_MII_RX_DV_ETH_RMII_CRS_DV>, + <STM32F429_PC4_FUNC_ETH_MII_RXD0_ETH_RMII_RXD0>, + <STM32F429_PC5_FUNC_ETH_MII_RXD1_ETH_RMII_RXD1>, + <STM32F429_PH6_FUNC_ETH_MII_RXD2>, + <STM32F429_PH7_FUNC_ETH_MII_RXD3>; + }; + }; }; rcc: rcc at 40023810 {
@@ -323,6 +343,21 @@ st,mem2mem; }; + ethernet0: dwmac at 40028000 { + compatible = "st,stm32-dwmac", "snps,dwmac-3.50a"; + status = "disabled"; + reg = <0x40028000 0x8000>; + reg-names = "stmmaceth"; + interrupts = <0 61 0>, <0 62 0>; + interrupt-names = "macirq", "eth_wake_irq"; + clock-names = "stmmaceth", "tx-clk", "rx-clk"; + clocks = <&rcc 0 25>, <&rcc 0 26>, <&rcc 0 27>; + st,syscon = <&syscfg 0x4>; + snps,pbl = <8>; + snps,mixed-burst; + dma-ranges; + }; + rng: rng at 50060800 { compatible = "st,stm32-rng"; reg = <0x50060800 0x400>;
Signature · 1 line
1.9.1
PATCH 3/3 ARM: dts: stm32f429: Enable Ethernet on Eval board
In reply to Alexandre TORGUEMAC is connected to a PHY in MII mode.
arch/arm/boot/dts/stm32429i-eval.dts +15 -0
@@ -87,6 +87,21 @@ clock-frequency = <25000000>; }; +ðernet0 { + status = "okay"; + pinctrl-0 = <ðernet0_mii>; + pinctrl-names = "default"; + phy-mode = "mii-id"; + mdio0 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "snps,dwmac-mdio"; + phy1: ethernet-phy at 1 { + reg = <1>; + }; + }; +}; + &usart1 { pinctrl-0 = <&usart1_pins_a>; pinctrl-names = "default";
Signature · 1 line
1.9.1
Maxime Coquelin
maintainerRe: [PATCH 2/3] ARM: dts: stm32f429: Add Ethernet support
In reply to Alexandre TORGUEHi Alex,
I have made a handful of changes on your patch, let me know if this
is ok for you.
If ok, it will be part of the PR I'll send tomorrow.
Quoted 9 lines · Alexandre TORGUE
Add Ethernet support (Synopsys MAC IP 3.50a) on stm32f429 SOC.
Signed-off-by Alexandre TORGUE <[email protected]>arch/arm/boot/dts/stm32f429.dtsi +0
-0
arch/arm/boot/dts/stm32f429.dtsi line 289
Quoted 7 lines
arch/arm/boot/dts/stm32f429.dtsi +4
-0@@ -283,6 +283,26 @@ bias-disable; }; }; + + ethernet0_mii: mii at 0 { + mii { + slew-rate = <2>;
I moved slew-rate property below the pinmux one for consistency with other pin configs in the file.
Quoted 20 lines
arch/arm/boot/dts/stm32f429.dtsi +16
-0+ pinmux = <STM32F429_PG13_FUNC_ETH_MII_TXD0_ETH_RMII_TXD0>, + <STM32F429_PG14_FUNC_ETH_MII_TXD1_ETH_RMII_TXD1>, + <STM32F429_PC2_FUNC_ETH_MII_TXD2>, + <STM32F429_PB8_FUNC_ETH_MII_TXD3>, + <STM32F429_PC3_FUNC_ETH_MII_TX_CLK>, + <STM32F429_PG11_FUNC_ETH_MII_TX_EN_ETH_RMII_TX_EN>, + <STM32F429_PA2_FUNC_ETH_MDIO>, + <STM32F429_PC1_FUNC_ETH_MDC>, + <STM32F429_PA1_FUNC_ETH_MII_RX_CLK_ETH_RMII_REF_CLK>, + <STM32F429_PA7_FUNC_ETH_MII_RX_DV_ETH_RMII_CRS_DV>, + <STM32F429_PC4_FUNC_ETH_MII_RXD0_ETH_RMII_RXD0>, + <STM32F429_PC5_FUNC_ETH_MII_RXD1_ETH_RMII_RXD1>, + <STM32F429_PH6_FUNC_ETH_MII_RXD2>, + <STM32F429_PH7_FUNC_ETH_MII_RXD3>; + }; + }; }; rcc: rcc at 40023810 {
arch/arm/boot/dts/stm32f429.dtsi line 348
Quoted 6 lines
arch/arm/boot/dts/stm32f429.dtsi +3
-0@@ -323,6 +343,21 @@ st,mem2mem; }; + ethernet0: dwmac at 40028000 { + compatible = "st,stm32-dwmac", "snps,dwmac-3.50a"; + status = "disabled";
I moved status property at the end of the node for consistency
arch/arm/boot/dts/stm32f429.dtsi line 351
Quoted 3 lines
arch/arm/boot/dts/stm32f429.dtsi +3
-0+ reg = <0x40028000 0x8000>; + reg-names = "stmmaceth"; + interrupts = <0 61 0>, <0 62 0>;
#interrupt-cells is set to 1 in the nvic node, meaning that a single cell is expected here:
interrupts = <61>, <62>;
arch/arm/boot/dts/stm32f429.dtsi line 363
Quoted 12 lines
arch/arm/boot/dts/stm32f429.dtsi +9
-0+ interrupt-names = "macirq", "eth_wake_irq"; + clock-names = "stmmaceth", "tx-clk", "rx-clk"; + clocks = <&rcc 0 25>, <&rcc 0 26>, <&rcc 0 27>; + st,syscon = <&syscfg 0x4>; + snps,pbl = <8>; + snps,mixed-burst; + dma-ranges; + }; + rng: rng at 50060800 { compatible = "st,stm32-rng"; reg = <0x50060800 0x400>;
Regards,
Maxime
Re: [PATCH 2/3] ARM: dts: stm32f429: Add Ethernet support
Hi Maxime,
2016-03-01 18:24 GMT+01:00 Maxime Coquelin <[email protected]>:
Quoted 5 lines
Hi Alex,
I have made a handful of changes on your patch, let me know if this is
ok for you.
If ok, it will be part of the PR I'll send tomorrow.
I agree with modifications.
Regards
alex
Quoted 92 lines · Alexandre TORGUE
Quoted 11 lines
Add Ethernet support (Synopsys MAC IP 3.50a) on stm32f429 SOC.
Signed-off-by Alexandre TORGUE <[email protected]>arch/arm/boot/dts/stm32f429.dtsi +0
-0arch/arm/boot/dts/stm32f429.dtsi line 289
Quoted 7 lines
arch/arm/boot/dts/stm32f429.dtsi +4
-0@@ -283,6 +283,26 @@ bias-disable; }; }; + + ethernet0_mii: mii at 0 { + mii { + slew-rate = <2>;I moved slew-rate property below the pinmux one for consistency with other pin configs in the file.
Quoted 34 lines
arch/arm/boot/dts/stm32f429.dtsi +4
-0+ pinmux = <STM32F429_PG13_FUNC_ETH_MII_TXD0_ETH_RMII_TXD0>, + <STM32F429_PG14_FUNC_ETH_MII_TXD1_ETH_RMII_TXD1>, + <STM32F429_PC2_FUNC_ETH_MII_TXD2>, +<
STM32F429_PB8_FUNC_ETH_MII_TXD3>,
+
<STM32F429_PC3_FUNC_ETH_MII_TX_CLK>,
+ <STM32F429_PG11_FUNC_ETH_MII_TX_EN_ETH_RMII_TX_EN>, +
<STM32F429_PA2_FUNC_ETH_MDIO>,
+
<STM32F429_PC1_FUNC_ETH_MDC>,
+ <STM32F429_PA1_FUNC_ETH_MII_RX_CLK_ETH_RMII_REF_CLK>, + <STM32F429_PA7_FUNC_ETH_MII_RX_DV_ETH_RMII_CRS_DV>, + <STM32F429_PC4_FUNC_ETH_MII_RXD0_ETH_RMII_RXD0>, + <STM32F429_PC5_FUNC_ETH_MII_RXD1_ETH_RMII_RXD1>, +
<STM32F429_PH6_FUNC_ETH_MII_RXD2>,
+
<STM32F429_PH7_FUNC_ETH_MII_RXD3>;arch/arm/boot/dts/stm32f429.dtsi +2
-0+ }; + }; }; rcc: rcc at 40023810 {arch/arm/boot/dts/stm32f429.dtsi line 347
Quoted 5 lines
arch/arm/boot/dts/stm32f429.dtsi +2
-0@@ -323,6 +343,21 @@ st,mem2mem; }; + ethernet0: dwmac at 40028000 { + compatible = "st,stm32-dwmac", "snps,dwmac-3.50a"; + status = "disabled";I moved status property at the end of the node for consistency
arch/arm/boot/dts/stm32f429.dtsi line 351
Quoted 4 lines
arch/arm/boot/dts/stm32f429.dtsi +3
-0+ reg = <0x40028000 0x8000>; + reg-names = "stmmaceth"; + interrupts = <0 61 0>, <0 62 0>;#interrupt-cells is set to 1 in the nvic node, meaning that a single cell is expected here:
interrupts = <61>, <62>;
arch/arm/boot/dts/stm32f429.dtsi line 363
Quoted 12 lines
arch/arm/boot/dts/stm32f429.dtsi +9
-0+ interrupt-names = "macirq", "eth_wake_irq"; + clock-names = "stmmaceth", "tx-clk", "rx-clk"; + clocks = <&rcc 0 25>, <&rcc 0 26>, <&rcc 0 27>; + st,syscon = <&syscfg 0x4>; + snps,pbl = <8>; + snps,mixed-burst; + dma-ranges; + }; + rng: rng at 50060800 { compatible = "st,stm32-rng"; reg = <0x50060800 0x400>;Regards,
Maxime