mbox series

[0/3] Add imx93 support for dwmac-imx

Message ID 20221012105129.3706062-1-xiaoning.wang@nxp.com
Headers show
Series Add imx93 support for dwmac-imx | expand

Message

Clark Wang Oct. 12, 2022, 10:51 a.m. UTC
Hi,

This patchset add imx93 support for dwmac-imx glue driver.
There are some changes of GPR implement 

Clark Wang (3):
  net: stmmac: add imx93 platform support
  dt-bindings: add mx93 description
  arm64: dts: imx93: add fec and eqos support

 .../bindings/net/nxp,dwmac-imx.yaml           |  4 +-
 .../boot/dts/freescale/imx93-11x11-evk.dts    | 40 ++++++++++++++
 arch/arm64/boot/dts/freescale/imx93.dtsi      | 22 ++++++++
 .../net/ethernet/stmicro/stmmac/dwmac-imx.c   | 55 +++++++++++++++++--
 4 files changed, 115 insertions(+), 6 deletions(-)

Comments

Andrew Lunn Oct. 12, 2022, 9:29 p.m. UTC | #1
> +static int imx93_set_intf_mode(struct plat_stmmacenet_data *plat_dat)
> +{
> +	struct imx_priv_data *dwmac = plat_dat->bsp_priv;
> +	int val;
> +
> +	switch (plat_dat->interface) {
> +	case PHY_INTERFACE_MODE_MII:
> +		val = MX93_GPR_ENET_QOS_INTF_SEL_MII;
> +		break;
> +	case PHY_INTERFACE_MODE_RMII:
> +		val = MX93_GPR_ENET_QOS_INTF_SEL_RMII;
> +		break;
> +	case PHY_INTERFACE_MODE_RGMII:
> +	case PHY_INTERFACE_MODE_RGMII_ID:
> +	case PHY_INTERFACE_MODE_RGMII_RXID:
> +	case PHY_INTERFACE_MODE_RGMII_TXID:
> +		val = MX93_GPR_ENET_QOS_INTF_SEL_RGMII;
> +		break;
> +	default:
> +		pr_debug("imx dwmac doesn't support %d interface\n",
> +			 plat_dat->interface);

netdev_debug(), or dev_debug(), so there is some clue which of the 42
dwmac instances has a bad value in DT.
Andrew Lunn Oct. 12, 2022, 9:32 p.m. UTC | #2
> +	mdio {
> +		compatible = "snps,dwmac-mdio";
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +		clock-frequency = <5000000>;
> +
> +		ethphy1: ethernet-phy@1 {
> +			compatible = "ethernet-phy-ieee802.3-c22";

It is not wrong, but this is not needed, its the default.

   Andrew