<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<span style="white-space: pre-wrap">
</span>
<blockquote type="cite"
cite="mid:DU2PR10MB7787E5DD3C53330D616436E68F002@DU2PR10MB7787.EURPRD10.PROD.OUTLOOK.COM">
<pre class="moz-quote-pre" wrap="">-----Original Message-----
From: Marek Vasut <a class="moz-txt-link-rfc2396E" href="mailto:marex@denx.de"><marex@denx.de></a>
Sent: Tuesday, March 26, 2024 1:08 PM
To: <a class="moz-txt-link-abbreviated" href="mailto:u-boot@lists.denx.de">u-boot@lists.denx.de</a>
Cc: Christophe ROULLIER <a class="moz-txt-link-rfc2396E" href="mailto:christophe.roullier@st.com"><christophe.roullier@st.com></a>; Patrice CHOTARD - foss <a class="moz-txt-link-rfc2396E" href="mailto:patrice.chotard@foss.st.com"><patrice.chotard@foss.st.com></a>; Marek Vasut <a class="moz-txt-link-rfc2396E" href="mailto:marex@denx.de"><marex@denx.de></a>; Joe Hershberger <a class="moz-txt-link-rfc2396E" href="mailto:joe.hershberger@ni.com"><joe.hershberger@ni.com></a>; Patrick DELAUNAY - foss <a class="moz-txt-link-rfc2396E" href="mailto:patrick.delaunay@foss.st.com"><patrick.delaunay@foss.st.com></a>; Ramon Fried <a class="moz-txt-link-rfc2396E" href="mailto:rfried.dev@gmail.com"><rfried.dev@gmail.com></a>; <a class="moz-txt-link-abbreviated" href="mailto:u-boot@dh-electronics.com">u-boot@dh-electronics.com</a>; <a class="moz-txt-link-abbreviated" href="mailto:uboot-stm32@st-md-mailman.stormreply.com">uboot-stm32@st-md-mailman.stormreply.com</a>
Subject: [PATCH v2 10/11] net: dwc_eth_qos: Add support of STM32MP13xx platform
From: Christophe Roullier <a class="moz-txt-link-rfc2396E" href="mailto:christophe.roullier@st.com"><christophe.roullier@st.com></a>
Add compatible "st,stm32mp13-dwmac" to manage STM32MP13 boards.
Reviewed-by: Patrice Chotard <a class="moz-txt-link-rfc2396E" href="mailto:patrice.chotard@foss.st.com"><patrice.chotard@foss.st.com></a>
Signed-off-by: Christophe Roullier <a class="moz-txt-link-rfc2396E" href="mailto:christophe.roullier@st.com"><christophe.roullier@st.com></a>
Signed-off-by: Marek Vasut <a class="moz-txt-link-rfc2396E" href="mailto:marex@denx.de"><marex@denx.de></a> # Rebase, reshuffle, squash code
---
Cc: Christophe Roullier <a class="moz-txt-link-rfc2396E" href="mailto:christophe.roullier@st.com"><christophe.roullier@st.com></a>
Cc: Joe Hershberger <a class="moz-txt-link-rfc2396E" href="mailto:joe.hershberger@ni.com"><joe.hershberger@ni.com></a>
Cc: Patrice Chotard <a class="moz-txt-link-rfc2396E" href="mailto:patrice.chotard@foss.st.com"><patrice.chotard@foss.st.com></a>
Cc: Patrick Delaunay <a class="moz-txt-link-rfc2396E" href="mailto:patrick.delaunay@foss.st.com"><patrick.delaunay@foss.st.com></a>
Cc: Ramon Fried <a class="moz-txt-link-rfc2396E" href="mailto:rfried.dev@gmail.com"><rfried.dev@gmail.com></a>
Cc: <a class="moz-txt-link-abbreviated" href="mailto:u-boot@dh-electronics.com">u-boot@dh-electronics.com</a>
Cc: <a class="moz-txt-link-abbreviated" href="mailto:uboot-stm32@st-md-mailman.stormreply.com">uboot-stm32@st-md-mailman.stormreply.com</a>
---
V2: Add RB from Patrice
---
drivers/net/dwc_eth_qos.c | 4 ++++
drivers/net/dwc_eth_qos.h | 1 +
drivers/net/dwc_eth_qos_stm32.c | 11 +++++++++++
3 files changed, 16 insertions(+)
diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c index 203bfc0848c..e02317905e5 100644
--- a/drivers/net/dwc_eth_qos.c
+++ b/drivers/net/dwc_eth_qos.c
@@ -1505,6 +1505,10 @@ static const struct udevice_id eqos_ids[] = {
},
#endif
#if IS_ENABLED(CONFIG_DWC_ETH_QOS_STM32)
+ {
+ .compatible = "st,stm32mp13-dwmac",
+ .data = (ulong)&eqos_stm32mp13_config
+ },
{
.compatible = "st,stm32mp1-dwmac",
.data = (ulong)&eqos_stm32mp15_config diff --git a/drivers/net/dwc_eth_qos.h b/drivers/net/dwc_eth_qos.h index bafd0d339fb..8b3d0d464d3 100644
--- a/drivers/net/dwc_eth_qos.h
+++ b/drivers/net/dwc_eth_qos.h
@@ -290,5 +290,6 @@ int eqos_null_ops(struct udevice *dev); extern struct eqos_config eqos_imx_config; extern struct eqos_config eqos_rockchip_config; extern struct eqos_config eqos_qcom_config;
+extern struct eqos_config eqos_stm32mp13_config;
extern struct eqos_config eqos_stm32mp15_config; extern struct eqos_config eqos_jh7110_config; diff --git a/drivers/net/dwc_eth_qos_stm32.c b/drivers/net/dwc_eth_qos_stm32.c index 5a20fe5bea2..435473f99a6 100644
--- a/drivers/net/dwc_eth_qos_stm32.c
+++ b/drivers/net/dwc_eth_qos_stm32.c
@@ -279,6 +279,17 @@ static struct eqos_ops eqos_stm32_ops = {
.eqos_get_tick_clk_rate = eqos_get_tick_clk_rate_stm32 };
+struct eqos_config __maybe_unused eqos_stm32mp13_config = {
+ .reg_access_always_ok = false,
+ .mdio_wait = 10000,
+ .swr_wait = 50,
+ .config_mac = EQOS_MAC_RXQ_CTRL0_RXQ0EN_ENABLED_DCB,
+ .config_mac_mdio = EQOS_MAC_MDIO_ADDRESS_CR_250_300,
+ .axi_bus_width = EQOS_AXI_WIDTH_32,
+ .interface = dev_read_phy_mode,
+ .ops = &eqos_stm32_ops
+};
+
struct eqos_config __maybe_unused eqos_stm32mp15_config = {
.reg_access_always_ok = false,
.mdio_wait = 10000,
--
2.43.0
</pre>
</blockquote>
Reviewed-by: Christophe ROULLIER
<a class="moz-txt-link-rfc2396E" href="mailto:christophe.roullier@foss.st.com"><christophe.roullier@foss.st.com></a><br>
</body>
</html>