]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
net: dwc_eth_qos: Add support of STM32MP13xx platform
authorChristophe Roullier <christophe.roullier@st.com>
Tue, 26 Mar 2024 12:07:31 +0000 (13:07 +0100)
committerPatrice Chotard <patrice.chotard@foss.st.com>
Fri, 19 Apr 2024 09:30:51 +0000 (11:30 +0200)
Add compatible "st,stm32mp13-dwmac" to manage STM32MP13 boards.

Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Christophe Roullier <christophe.roullier@st.com>
Signed-off-by: Marek Vasut <marex@denx.de> # Rebase, reshuffle, squash code
Reviewed-by: Christophe ROULLIER <christophe.roullier@foss.st.com>
drivers/net/dwc_eth_qos.c
drivers/net/dwc_eth_qos.h
drivers/net/dwc_eth_qos_stm32.c

index 8d106ec0d0d69553914db545d9553d3233293f9a..32a5d52165ac7d11c7d97c1e73de6202e2750ecf 100644 (file)
@@ -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
index bafd0d339fb9709ec370ac5ae2c07316056ebd6f..8b3d0d464d352c5874f7786d10c27034c59028bc 100644 (file)
@@ -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;
index 5a20fe5bea2a4329c911fa4e8d8608f1692f1ca3..435473f99a6c144c149e7d73dc41519fc7ef2c81 100644 (file)
@@ -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,