Message ID | 20240309021831.264018-12-marex@denx.de |
---|---|
State | Superseded |
Delegated to: | Patrice Chotard |
Headers | show |
Series | net: dwc_eth_qos: Clean up STM32 glue code and add STM32MP13xx support | expand |
On 3/9/24 03:11, Marek Vasut wrote: > From: Christophe Roullier <christophe.roullier@st.com> > > Add compatible "st,stm32mp13-dwmac" to manage STM32MP13 boards. > > Signed-off-by: Christophe Roullier <christophe.roullier@st.com> > Signed-off-by: Marek Vasut <marex@denx.de> # Rebase, reshuffle, squash code > --- > Cc: Christophe Roullier <christophe.roullier@st.com> > Cc: Joe Hershberger <joe.hershberger@ni.com> > Cc: Patrice Chotard <patrice.chotard@foss.st.com> > Cc: Patrick Delaunay <patrick.delaunay@foss.st.com> > Cc: Ramon Fried <rfried.dev@gmail.com> > Cc: u-boot@dh-electronics.com > Cc: uboot-stm32@st-md-mailman.stormreply.com > --- > 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 00bf6d45568..e167a7ba901 100644 > --- a/drivers/net/dwc_eth_qos_stm32.c > +++ b/drivers/net/dwc_eth_qos_stm32.c > @@ -314,6 +314,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, Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Thanks Patrice
> On 3/9/24 03:11, Marek Vasut wrote: >> From: Christophe Roullier <christophe.roullier@st.com> >> >> Add compatible "st,stm32mp13-dwmac" to manage STM32MP13 boards. >> >> Signed-off-by: Christophe Roullier <christophe.roullier@st.com> >> Signed-off-by: Marek Vasut <marex@denx.de> # Rebase, reshuffle, squash >> code >> --- >> Cc: Christophe Roullier <christophe.roullier@st.com> >> Cc: Joe Hershberger <joe.hershberger@ni.com> >> Cc: Patrice Chotard <patrice.chotard@foss.st.com> >> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com> >> Cc: Ramon Fried <rfried.dev@gmail.com> >> Cc: u-boot@dh-electronics.com >> Cc: uboot-stm32@st-md-mailman.stormreply.com >> --- >> 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 00bf6d45568..e167a7ba901 100644 >> --- a/drivers/net/dwc_eth_qos_stm32.c >> +++ b/drivers/net/dwc_eth_qos_stm32.c >> @@ -314,6 +314,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, Reviewed-by: Christophe ROULLIER <christophe.roullier@foss.st.com>
On 4/5/24 4:56 PM, Christophe ROULLIER wrote: >> On 3/9/24 03:11, Marek Vasut wrote: >>> From: Christophe Roullier <christophe.roullier@st.com> >>> >>> Add compatible "st,stm32mp13-dwmac" to manage STM32MP13 boards. >>> >>> Signed-off-by: Christophe Roullier <christophe.roullier@st.com> >>> Signed-off-by: Marek Vasut <marex@denx.de> # Rebase, reshuffle, squash >>> code >>> --- >>> Cc: Christophe Roullier <christophe.roullier@st.com> >>> Cc: Joe Hershberger <joe.hershberger@ni.com> >>> Cc: Patrice Chotard <patrice.chotard@foss.st.com> >>> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com> >>> Cc: Ramon Fried <rfried.dev@gmail.com> >>> Cc: u-boot@dh-electronics.com >>> Cc: uboot-stm32@st-md-mailman.stormreply.com >>> --- >>> 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 00bf6d45568..e167a7ba901 100644 >>> --- a/drivers/net/dwc_eth_qos_stm32.c >>> +++ b/drivers/net/dwc_eth_qos_stm32.c >>> @@ -314,6 +314,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, > > Reviewed-by: Christophe ROULLIER <christophe.roullier@foss.st.com> Thank you. There is a V2 series submitted, can you add those tags there too ?
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 00bf6d45568..e167a7ba901 100644 --- a/drivers/net/dwc_eth_qos_stm32.c +++ b/drivers/net/dwc_eth_qos_stm32.c @@ -314,6 +314,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,