[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e7041d36-9bc7-482a-877d-6d8f549c0ada@lunn.ch>
Date: Tue, 14 Jan 2025 03:16:57 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Paul Menzel <pmenzel@...gen.mpg.de>
Cc: Joey Lu <a0987203069@...il.com>, andrew+netdev@...n.ch,
davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, robh@...nel.org, krzk+dt@...nel.org,
conor+dt@...nel.org, mcoquelin.stm32@...il.com,
richardcochran@...il.com, devicetree@...r.kernel.org,
ychuang3@...oton.com, netdev@...r.kernel.org,
openbmc@...ts.ozlabs.org, alexandre.torgue@...s.st.com,
linux-kernel@...r.kernel.org, joabreu@...opsys.com,
schung@...oton.com, peppe.cavallaro@...com, yclu4@...oton.com,
linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH net-next v7 3/3] net: stmmac: dwmac-nuvoton: Add dwmac
glue for Nuvoton MA35 family
> > +#define NVT_MISCR_RMII BIT(0)
> > +
> > +/* 2000ps is mapped to 0x0 ~ 0xF */
>
> Excuse my ignorance: What is ps?
picoseconds. An RGMII link needs a 2ns delay between the clock line
and the data lines. Some MACs allow you to tune the delay they can
insert, in this case in steps of 2ns / 16.
> > +#define NVT_PATH_DELAY_DEC 134
> > +#define NVT_TX_DELAY_MASK GENMASK(19, 16)
> > +#define NVT_RX_DELAY_MASK GENMASK(23, 20)
> > +
> > +struct nvt_priv_data {
> > + struct platform_device *pdev;
> > + struct regmap *regmap;
> > +};
> > +
> > +static struct nvt_priv_data *
> > +nvt_gmac_setup(struct platform_device *pdev, struct plat_stmmacenet_data *plat)
> > +{
> > + struct device *dev = &pdev->dev;
> > + struct nvt_priv_data *bsp_priv;
> > + phy_interface_t phy_mode;
> > + u32 tx_delay, rx_delay;
>
> Please append the unit to the variable name.
Which is trick, because they are in units of 2000/16 of a picosecond.
Andrew
Powered by blists - more mailing lists