Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp3321768imd; Mon, 29 Oct 2018 05:28:31 -0700 (PDT) X-Google-Smtp-Source: AJdET5dH16AZ308Ce0WNFbmv3aGpPB0dvKO3UJHhluwWHrRGEWmjuQAhH72vkAo+bjQgSg6lOkxq X-Received: by 2002:a63:f047:: with SMTP id s7mr8644519pgj.441.1540816111932; Mon, 29 Oct 2018 05:28:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540816111; cv=none; d=google.com; s=arc-20160816; b=aUheG8o7KajoJ/KIpQBavbf4PNlzCmocZXtq5ym++L16uZ9FM3YD7ahbTpOu1dp/tQ loBLy4GCNIzfViHQSXXS3hC0ufDRK5aFB9cdHTfYikcBnHuBioXWcKMWx4zNWU1BmgH2 ld0rmzd4jRRjRMSmhqaBlbmoU4JcZ1TqigLq3p0ZKAE+fQKhyUYZCWF+r+fJ64zfKpaf B97Wwyz33E3CCr20tAdFRtTbeSqsvs9dc3QPd5y1/p768FpnLkK7GpvGnLPk4cKeV3Wd lTEdKBugt1SM8OpO3LTjkualQF9pxzYMTJ7fTRBA5gl5LrUSSNlEAh/VVlVMPghUsb9c +8Rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=mlhFBjYEJ4qZFxhWGInYFWHCrWJV1KVxTy8D8wqdViw=; b=sMAlpRkobdMpFMbLa61+Ze1JnFZzMtYk1TCLWuMAnz45DfWuSrZ8gUcdIh6z043Dkq sFW2GhxAkMwimF6or07swmwf1GQAAdkpe9qREvNQnR288AFJy2koT4DqxVYOQkWABKzi YRhfBR7hiQXc1M9VDe1ULA9eTyEFOMis6/oPLzZqTyBlY5WwimKjYfPTugMejeSGXGFM bCVu87dkFWMFS16GHconuvFPN0UBUkFs1zK+FySjHcFa75Qxx44iMc2oqZrsBQhlE0hy KmFSqhBwMy4Jxf6JBc1jx8R/XaVqquw3Ssjn2/Bi9BZ3B5Dvsqjm/Z4kDIdxiUbqTCAU tBcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b="cMZ4L+c/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w22-v6si19194115plp.110.2018.10.29.05.28.16; Mon, 29 Oct 2018 05:28:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b="cMZ4L+c/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729280AbeJ2VQL (ORCPT + 99 others); Mon, 29 Oct 2018 17:16:11 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:45367 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728772AbeJ2VQL (ORCPT ); Mon, 29 Oct 2018 17:16:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=mlhFBjYEJ4qZFxhWGInYFWHCrWJV1KVxTy8D8wqdViw=; b=cMZ4L+c/xm2EOBX2HMdLcI/5dq53jaGs0zS9XZ2XO+IfSfW1zwHZPU2jgUBv1uUBUKXgHVNP7nDWhJsgKIUUuXpQKzhXKxYE0z0nIv9YjtXausEMFADIC6in2kdyH1Rc5rM32W+1PF9CQEeMBcQq9dbLlHE00F1kTFoWelcVsKw=; Received: from andrew by vps0.lunn.ch with local (Exim 4.84_2) (envelope-from ) id 1gH6dn-0002Um-KL; Mon, 29 Oct 2018 13:27:31 +0100 Date: Mon, 29 Oct 2018 13:27:31 +0100 From: Andrew Lunn To: Biao Huang Cc: davem@davemloft.net, robh+dt@kernel.org, honghui.zhang@mediatek.com, yt.shen@mediatek.com, liguo.zhang@mediatek.com, mark.rutland@arm.com, sean.wang@mediatek.com, nelson.chang@mediatek.com, matthias.bgg@gmail.com, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, joabreu@synopsys.com Subject: Re: [PATCH 1/2] net:stmmac: dwmac-mediatek: add support for mt2712 Message-ID: <20181029122731.GA9174@lunn.ch> References: <1540782294-27721-1-git-send-email-biao.huang@mediatek.com> <1540782294-27721-2-git-send-email-biao.huang@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1540782294-27721-2-git-send-email-biao.huang@mediatek.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > +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