dts: stm32mp157c-odyssey: set PLL4_P to 125Mhz for ETH_CLK
Subsystems (3)
PATCH 1/5 dts: stm32mp157c-odyssey: set PLL4_P to 125Mhz for ETH_CLK
Odyssey board requires ETH_CLK of 125Mhz. This commit sets PLL4_P/Q/R to 125, 62.5 and 62.5Mhz in respectively.
--- arch/arm/dts/stm32mp157c-odyssey-som-u-boot.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/dts/stm32mp157c-odyssey-som-u-boot.dtsi +2 -2
@@ -115,11 +115,11 @@ bootph-all; }; - /* VCO = 594.0 MHz => P = 99, Q = 74, R = 74 */ + /* VCO = 750.0 MHz => P = 125, Q = 62.5, R = 62.5 */ pll4: st,pll@3 { compatible = "st,stm32mp1-pll"; reg = <3>; - cfg = < 3 98 5 7 7 PQR(1,1,1) >; + cfg = < 3 124 5 9 9 PQR(1,1,1) >; bootph-all; }; };
Signature · 1 line
2.34.1
PATCH 2/5 dts: stm32mp157c-odyssey: use internal clock for Tx
In Odyssey board, we should use the internal clock from RCC as the transmit clock, instead of the external clock from ETH_CLK125 pad. This commit adds a property, st,eth-clk-sel, so that the ETH_CLK_SEL mux selects ETH_CLK.
--- arch/arm/dts/stm32mp157c-odyssey.dts | 1 + 1 file changed, 1 insertion(+)
arch/arm/dts/stm32mp157c-odyssey.dts +1 -0
@@ -75,6 +75,7 @@ phy-mode = "rgmii-id"; max-speed = <1000>; phy-handle = <&phy0>; + st,ext-phyclk; mdio0 { #address-cells = <1>;
Signature · 1 line
2.34.1
Re: [PATCH 2/5] dts: stm32mp157c-odyssey: use internal clock for Tx
Quoted 15 lines · Heesub Shin
In Odyssey board, we should use the internal clock from RCC as the transmit clock, instead of the external clock from
ETH_CLK125pad. This commit adds a property, st,eth-clk-sel, so that theETH_CLK_SELmux selectsETH_CLK.Signed-off-by Heesub Shin <[email protected]>--- arch/arm/dts/stm32mp157c-odyssey.dts | 1 + 1 file changed, 1 insertion(+)arch/arm/dts/stm32mp157c-odyssey.dts +0
-0
arch/arm/dts/stm32mp157c-odyssey.dts line 81
Quoted 7 lines
arch/arm/dts/stm32mp157c-odyssey.dts +1
-0@@ -75,6 +75,7 @@ phy-mode = "rgmii-id"; max-speed = <1000>; phy-handle = <&phy0>; + st,ext-phyclk; mdio0 { #address-cells = <1>;
Thanks
Patrice
Re: [PATCH 2/5] dts: stm32mp157c-odyssey: use internal clock for Tx
Quoted 23 lines · Patrice CHOTARD
Quoted 20 lines · Heesub Shin
In Odyssey board, we should use the internal clock from RCC as the transmit clock, instead of the external clock from
ETH_CLK125pad. This commit adds a property, st,eth-clk-sel, so that theETH_CLK_SELmux selectsETH_CLK.Signed-off-by Heesub Shin <[email protected]>--- arch/arm/dts/stm32mp157c-odyssey.dts | 1 + 1 file changed, 1 insertion(+)arch/arm/dts/stm32mp157c-odyssey.dts +1
-0@@ -75,6 +75,7 @@ phy-mode = "rgmii-id"; max-speed = <1000>; phy-handle = <&phy0>; + st,ext-phyclk;
Quoted 7 lines
arch/arm/dts/stm32mp157c-odyssey.dts line 81
Quoted 2 lines
arch/arm/dts/stm32mp157c-odyssey.dts +0
-0mdio0 { #address-cells = <1>;Reviewed-by Patrice Chotard <[email protected]>Thanks
Patrice
Applied to u-boot-stm32/next
Thanks
Patrice
PATCH 3/5 dts: stm32mp157c-odyssey: fix incorrect PHY address
In reply to Heesub ShinIn Odyssey board, KSZ9031 is at the PHY address 0x7, not 0x0. This commit fixes it.
--- arch/arm/dts/stm32mp157c-odyssey.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/dts/stm32mp157c-odyssey.dts +2 -2
@@ -81,8 +81,8 @@ #address-cells = <1>; #size-cells = <0>; compatible = "snps,dwmac-mdio"; - phy0: ethernet-phy@0 { - reg = <0>; + phy0: ethernet-phy@7 { + reg = <7>; }; }; };
Signature · 1 line
2.34.1
Re: [PATCH 3/5] dts: stm32mp157c-odyssey: fix incorrect PHY address
Quoted 13 lines · Heesub Shin
In Odyssey board, KSZ9031 is at the PHY address
0x7, not0x0. This commit fixes it.Signed-off-by Heesub Shin <[email protected]>--- arch/arm/dts/stm32mp157c-odyssey.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/arm/dts/stm32mp157c-odyssey.dts +0
-0
arch/arm/dts/stm32mp157c-odyssey.dts line 88
Quoted 10 lines
arch/arm/dts/stm32mp157c-odyssey.dts +2
-2@@ -81,8 +81,8 @@ #address-cells = <1>; #size-cells = <0>; compatible = "snps,dwmac-mdio"; - phy0: ethernet-phy@0 { - reg = <0>; + phy0: ethernet-phy@7 { + reg = <7>; }; }; };
Thanks
Patrice
Re: [PATCH 3/5] dts: stm32mp157c-odyssey: fix incorrect PHY address
In reply to Heesub ShinQuoted 13 lines · Heesub Shin
In Odyssey board, KSZ9031 is at the PHY address
0x7, not0x0. This commit fixes it.Signed-off-by Heesub Shin <[email protected]>--- arch/arm/dts/stm32mp157c-odyssey.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/arm/dts/stm32mp157c-odyssey.dts +0
-0
arch/arm/dts/stm32mp157c-odyssey.dts line 88
Quoted 10 lines
arch/arm/dts/stm32mp157c-odyssey.dts +2
-2@@ -81,8 +81,8 @@ #address-cells = <1>; #size-cells = <0>; compatible = "snps,dwmac-mdio"; - phy0: ethernet-phy@0 { - reg = <0>; + phy0: ethernet-phy@7 { + reg = <7>; }; }; };
Applied to u-boot-stm32/next
Thanks
Patrice
Re: [PATCH 3/5] dts: stm32mp157c-odyssey: fix incorrect PHY address
In reply to Heesub ShinQuoted 13 lines · Heesub Shin
In Odyssey board, KSZ9031 is at the PHY address
0x7, not0x0. This commit fixes it.Signed-off-by Heesub Shin <[email protected]>--- arch/arm/dts/stm32mp157c-odyssey.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/arm/dts/stm32mp157c-odyssey.dts +0
-0
arch/arm/dts/stm32mp157c-odyssey.dts line 88
Quoted 10 lines
arch/arm/dts/stm32mp157c-odyssey.dts +2
-2@@ -81,8 +81,8 @@ #address-cells = <1>; #size-cells = <0>; compatible = "snps,dwmac-mdio"; - phy0: ethernet-phy@0 { - reg = <0>; + phy0: ethernet-phy@7 { + reg = <7>; }; }; };
Applied to u-boot-stm32/next
Thanks
Patrice
PATCH 4/5 net: dwc_eth_qos: add support for phy-reset-gpios property
In reply to Heesub ShinThis commit adds support for a property 'phy-reset-gpios' to reset PHY chipset.
--- drivers/net/dwc_eth_qos_stm32.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-)
drivers/net/dwc_eth_qos_stm32.c +22 -1
@@ -266,6 +266,12 @@ static int eqos_probe_resources_stm32(struct udevice *dev)if (ret)dev_warn (dev,"No phy clock provided %d\n" , ret); +/* Get reset gpio pin (optional) */ + ret =gpio_request_by_name (dev,"phy-reset-gpios" ,0 , + &eqos->phy_reset_gpio,GPIOD_IS_OUT ); +if (ret) +pr_warn ("No phy reset gpio provided: %d\n" , ret); +dev_dbg (dev,"%s: OK\n" , __func__);return 0 ;
@@ -277,6 +283,21 @@ err_probe:return ret; } +static int eqos_start_resets_stm32 (struct udevice *dev) +{ +struct eqos_priv *eqos =dev_get_priv (dev); + +debug ("%s(dev=%p):\n" , __func__, dev); + +if (dm_gpio_is_valid (&eqos->phy_reset_gpio)) { +dm_gpio_set_value (&eqos->phy_reset_gpio,1 ); +udelay (2 ); +dm_gpio_set_value (&eqos->phy_reset_gpio,0 ); + } + +return 0 ; +} +static int eqos_remove_resources_stm32 (struct udevice *dev) {dev_dbg (dev,"%s:\n" , __func__);
@@ -292,7 +313,7 @@ static struct eqos_ops eqos_stm32_ops = { .eqos_probe_resources = eqos_probe_resources_stm32, .eqos_remove_resources = eqos_remove_resources_stm32, .eqos_stop_resets = eqos_null_ops, - .eqos_start_resets = eqos_null_ops, + .eqos_start_resets = eqos_start_resets_stm32, .eqos_stop_clks = eqos_stop_clks_stm32, .eqos_start_clks = eqos_start_clks_stm32, .eqos_calibrate_pads = eqos_null_ops,
Signature · 1 line
2.34.1
Re: [PATCH 4/5] net: dwc_eth_qos: add support for phy-reset-gpios property
Quoted 48 lines · Heesub Shin
This commit adds support for a property 'phy-reset-gpios' to reset PHY chipset.
Signed-off-by Heesub Shin <[email protected]>--- drivers/net/dwc_eth_qos_stm32.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-)drivers/net/dwc_eth_qos_stm32.c +21
-0@@ -266,6 +266,12 @@ static int eqos_probe_resources_stm32(struct udevice *dev)if (ret)dev_warn (dev,"No phy clock provided %d\n" , ret); +/* Get reset gpio pin (optional) */ + ret =gpio_request_by_name (dev,"phy-reset-gpios" ,0 , + &eqos->phy_reset_gpio,GPIOD_IS_OUT ); +if (ret) +pr_warn ("No phy reset gpio provided: %d\n" , ret); +dev_dbg (dev,"%s: OK\n" , __func__);return 0 ;@@ -277,6 +283,21 @@ err_probe:return ret; } +static int eqos_start_resets_stm32 (struct udevice *dev) +{ +struct eqos_priv *eqos =dev_get_priv (dev); + +debug ("%s(dev=%p):\n" , __func__, dev); + +if (dm_gpio_is_valid (&eqos->phy_reset_gpio)) { +dm_gpio_set_value (&eqos->phy_reset_gpio,1 ); +udelay (2 ); +dm_gpio_set_value (&eqos->phy_reset_gpio,0 ); + } + +return 0 ; +} +static int eqos_remove_resources_stm32 (struct udevice *dev) {dev_dbg (dev,"%s:\n" , __func__);
drivers/net/dwc_eth_qos_stm32.c static struct eqos_ops eqos_stm32_ops = { · line 319
Quoted 8 lines
drivers/net/dwc_eth_qos_stm32.c +1
-1@@ -292,7 +313,7 @@ static struct eqos_ops eqos_stm32_ops = { .eqos_probe_resources = eqos_probe_resources_stm32, .eqos_remove_resources = eqos_remove_resources_stm32, .eqos_stop_resets = eqos_null_ops, - .eqos_start_resets = eqos_null_ops, + .eqos_start_resets = eqos_start_resets_stm32, .eqos_stop_clks = eqos_stop_clks_stm32, .eqos_start_clks = eqos_start_clks_stm32, .eqos_calibrate_pads = eqos_null_ops,
Thanks
Patrice
Re: [PATCH 4/5] net: dwc_eth_qos: add support for phy-reset-gpios property
In reply to Heesub ShinQuoted 48 lines · Heesub Shin
This commit adds support for a property 'phy-reset-gpios' to reset PHY chipset.
Signed-off-by Heesub Shin <[email protected]>--- drivers/net/dwc_eth_qos_stm32.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-)drivers/net/dwc_eth_qos_stm32.c +21
-0@@ -266,6 +266,12 @@ static int eqos_probe_resources_stm32(struct udevice *dev)if (ret)dev_warn (dev,"No phy clock provided %d\n" , ret); +/* Get reset gpio pin (optional) */ + ret =gpio_request_by_name (dev,"phy-reset-gpios" ,0 , + &eqos->phy_reset_gpio,GPIOD_IS_OUT ); +if (ret) +pr_warn ("No phy reset gpio provided: %d\n" , ret); +dev_dbg (dev,"%s: OK\n" , __func__);return 0 ;@@ -277,6 +283,21 @@ err_probe:return ret; } +static int eqos_start_resets_stm32 (struct udevice *dev) +{ +struct eqos_priv *eqos =dev_get_priv (dev); + +debug ("%s(dev=%p):\n" , __func__, dev); + +if (dm_gpio_is_valid (&eqos->phy_reset_gpio)) { +dm_gpio_set_value (&eqos->phy_reset_gpio,1 ); +udelay (2 ); +dm_gpio_set_value (&eqos->phy_reset_gpio,0 ); + } + +return 0 ; +} +static int eqos_remove_resources_stm32 (struct udevice *dev) {dev_dbg (dev,"%s:\n" , __func__);
drivers/net/dwc_eth_qos_stm32.c static struct eqos_ops eqos_stm32_ops = { · line 319
Quoted 8 lines
drivers/net/dwc_eth_qos_stm32.c +1
-1@@ -292,7 +313,7 @@ static struct eqos_ops eqos_stm32_ops = { .eqos_probe_resources = eqos_probe_resources_stm32, .eqos_remove_resources = eqos_remove_resources_stm32, .eqos_stop_resets = eqos_null_ops, - .eqos_start_resets = eqos_null_ops, + .eqos_start_resets = eqos_start_resets_stm32, .eqos_stop_clks = eqos_stop_clks_stm32, .eqos_start_clks = eqos_start_clks_stm32, .eqos_calibrate_pads = eqos_null_ops,
Applied to u-boot-stm32/next
Thanks
Patrice
PATCH 5/5 dts: stm32mp157c-odyssey: add phy-reset-gpios property to ethernet node
In reply to Heesub ShinIn Odyssey board, we should reset the PHY chipset, toggling G0 pin.
--- arch/arm/dts/stm32mp157c-odyssey.dts | 1 + 1 file changed, 1 insertion(+)
arch/arm/dts/stm32mp157c-odyssey.dts +1 -0
@@ -75,6 +75,7 @@ phy-mode = "rgmii-id"; max-speed = <1000>; phy-handle = <&phy0>; + phy-reset-gpios = <&gpiog 0 GPIO_ACTIVE_LOW>; st,ext-phyclk; mdio0 {
Signature · 1 line
2.34.1
Re: [PATCH 5/5] dts: stm32mp157c-odyssey: add phy-reset-gpios property to ethernet node
Quoted 12 lines · Heesub Shin
In Odyssey board, we should reset the PHY chipset, toggling G0 pin.
Signed-off-by Heesub Shin <[email protected]>--- arch/arm/dts/stm32mp157c-odyssey.dts | 1 + 1 file changed, 1 insertion(+)arch/arm/dts/stm32mp157c-odyssey.dts +0
-0
arch/arm/dts/stm32mp157c-odyssey.dts line 81
Quoted 7 lines
arch/arm/dts/stm32mp157c-odyssey.dts +1
-0@@ -75,6 +75,7 @@ phy-mode = "rgmii-id"; max-speed = <1000>; phy-handle = <&phy0>; + phy-reset-gpios = <&gpiog 0 GPIO_ACTIVE_LOW>; st,ext-phyclk; mdio0 {
Thanks
Patrice
Re: [PATCH 5/5] dts: stm32mp157c-odyssey: add phy-reset-gpios property to ethernet node
In reply to Heesub ShinQuoted 12 lines · Heesub Shin
In Odyssey board, we should reset the PHY chipset, toggling G0 pin.
Signed-off-by Heesub Shin <[email protected]>--- arch/arm/dts/stm32mp157c-odyssey.dts | 1 + 1 file changed, 1 insertion(+)arch/arm/dts/stm32mp157c-odyssey.dts +0
-0
arch/arm/dts/stm32mp157c-odyssey.dts line 81
Quoted 7 lines
arch/arm/dts/stm32mp157c-odyssey.dts +1
-0@@ -75,6 +75,7 @@ phy-mode = "rgmii-id"; max-speed = <1000>; phy-handle = <&phy0>; + phy-reset-gpios = <&gpiog 0 GPIO_ACTIVE_LOW>; st,ext-phyclk; mdio0 {
Applied to u-boot-stm32/next
Thanks
Patrice
Quoted 16 lines · Heesub Shin
Odyssey board requires
ETH_CLKof 125Mhz. This commit sets PLL4_P/Q/R to 125, 62.5 and 62.5Mhz in respectively.Signed-off-by Heesub Shin <[email protected]>--- arch/arm/dts/stm32mp157c-odyssey-som-u-boot.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/arm/dts/stm32mp157c-odyssey-som-u-boot.dtsi +0
-0@@ -115,11 +115,11 @@ bootph-all; };
arch/arm/dts/stm32mp157c-odyssey-som-u-boot.dtsi line 125
Quoted 10 lines
arch/arm/dts/stm32mp157c-odyssey-som-u-boot.dtsi +2
-2- /* VCO = 594.0 MHz => P = 99, Q = 74, R = 74 */ + /* VCO = 750.0 MHz => P = 125, Q = 62.5, R = 62.5 */ pll4: st,pll@3 { compatible = "st,stm32mp1-pll"; reg = <3>; - cfg = < 3 98 5 7 7 PQR(1,1,1) >; + cfg = < 3 124 5 9 9 PQR(1,1,1) >; bootph-all; }; };
Thanks
Patrice
Quoted 16 lines · Heesub Shin
Odyssey board requires
ETH_CLKof 125Mhz. This commit sets PLL4_P/Q/R to 125, 62.5 and 62.5Mhz in respectively.Signed-off-by Heesub Shin <[email protected]>--- arch/arm/dts/stm32mp157c-odyssey-som-u-boot.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/arm/dts/stm32mp157c-odyssey-som-u-boot.dtsi +0
-0@@ -115,11 +115,11 @@ bootph-all; };
arch/arm/dts/stm32mp157c-odyssey-som-u-boot.dtsi line 125
Quoted 10 lines
arch/arm/dts/stm32mp157c-odyssey-som-u-boot.dtsi +2
-2- /* VCO = 594.0 MHz => P = 99, Q = 74, R = 74 */ + /* VCO = 750.0 MHz => P = 125, Q = 62.5, R = 62.5 */ pll4: st,pll@3 { compatible = "st,stm32mp1-pll"; reg = <3>; - cfg = < 3 98 5 7 7 PQR(1,1,1) >; + cfg = < 3 124 5 9 9 PQR(1,1,1) >; bootph-all; }; };
Applied to u-boot-stm32/next
Thanks
Patrice