[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181029122731.GA9174@lunn.ch>
Date: Mon, 29 Oct 2018 13:27:31 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Biao Huang <biao.huang@...iatek.com>
Cc: davem@...emloft.net, robh+dt@...nel.org,
honghui.zhang@...iatek.com, yt.shen@...iatek.com,
liguo.zhang@...iatek.com, mark.rutland@....com,
sean.wang@...iatek.com, nelson.chang@...iatek.com,
matthias.bgg@...il.com, netdev@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, joabreu@...opsys.com
Subject: Re: [PATCH 1/2] net:stmmac: dwmac-mediatek: add support for mt2712
> +static int mt2712_config_dt(struct mediatek_dwmac_plat_data *plat)
> +{
> + u32 mac_timings[4];
> +
> + plat->peri_regmap = syscon_regmap_lookup_by_compatible("mediatek,mt2712-pericfg");
> + if (IS_ERR(plat->peri_regmap)) {
> + dev_err(plat->dev, "Failed to get pericfg syscon\n");
> + return PTR_ERR(plat->peri_regmap);
> + }
> +
> + if (!of_property_read_u32_array(plat->np, "mac-delay", mac_timings,
> + ARRAY_SIZE(mac_timings))) {
> + plat->mac_delay.tx_delay = mac_timings[0];
> + plat->mac_delay.rx_delay = mac_timings[1];
> + plat->mac_delay.tx_inv = mac_timings[2];
> + plat->mac_delay.rx_inv = mac_timings[3];
> + }
> +
> + plat->fine_tune = of_property_read_bool(plat->np, "fine-tune");
> +
> + plat->rmii_rxc = of_property_read_bool(plat->np, "rmii-rxc");
Please add document for these properties in the binding.
Ideally, you should reuse the binding that some of the other stmmac
glue layer uses. e.g. there is already allwinner,tx-delay-ps,
allwinner,rx-delay-ps.
Thanks
Andrew
Powered by blists - more mailing lists