[PATCH net-next v7 3/3] net: stmmac: dwmac-nuvoton: Add dwmac glue for Nuvoton MA35 family
Paul Menzel
pmenzel at molgen.mpg.de
Tue Jan 14 13:21:59 AEDT 2025
Dear Andrew,
Thank you for your quick reply.
Am 14.01.25 um 21:16 schrieb Andrew Lunn:
>>> +#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.
Thank you for the clarification. Maybe it’s my English, but I didn’t
deduce this from how the comment is worded. I do not have a better idea
either.
>>> +#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.
Understood. Maybe a comment could be added?
Kind regards,
Paul
More information about the openbmc
mailing list