Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp4363233imd; Tue, 30 Oct 2018 00:12:47 -0700 (PDT) X-Google-Smtp-Source: AJdET5cjJWSM2D+XTsc6yZGNmwNk5mlNIQPVFsE+ASHeS+Ib16Vt5HlrGuWa5irR1+SkxW6ybSDc X-Received: by 2002:a17:902:b203:: with SMTP id t3-v6mr17741165plr.128.1540883567229; Tue, 30 Oct 2018 00:12:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540883567; cv=none; d=google.com; s=arc-20160816; b=lN0fIWdxHa1ZGAYiXQR4pXXkhXKAoe8uwokmqU5NuoZsDefABmAgwpEiQPKLORsJTv XgbQFt1lzM9rPmGGBDL9liDSN4BWN1+l5Z+E+g1yiUH0ajW84AMIrikZUvJMiOxtezd3 uhb34+Yt4TD+amzzX+nA3abUvHfX+kBcvrhTLHINTkcH0rSJRXpc0hF9r+nUVtMV3su4 +g3ipaIyzFyl89+h/MzpQglT+n0s2LCKf/DXjJO84T1upNnGxEFO/94faOZ83zWHqCsA 0j6xdF6LVUjoKocOCXcMTF8ppt1ektQrmekYIwhV0nJhWDIWOl9uFYWmUSjo7MxRqmk5 ECgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :references:in-reply-to:date:cc:to:from:subject:message-id; bh=hsiCQUgRr9xQaMoFlLrl/epEMD//Ncb2aIRY1BzC2rQ=; b=QZoOffd7MgJIYnV8MwdqMLRc0cNVPl4nQY9Chq28UXr+hq9gd5+sWkLBJ0ORTILSYt G6tkHeO5d8vz5j6j4hZOu8lPmV5foFV1e/mVpleJbfw/Ntl/tSU9GgSAxt8/MMgHXNdR jflQSO03AnyesAH/kHvsGe7Go3uF1xyv+bysXy+5NW7Xc5D+3tUmEVaxiFr0GiPQQuM+ BS2VequqQZYY8LoH5OSQ22T03Nsdn6e3ZcmjuauLpl052BVMvZoq6DtLag2Ti4bk0j+t ZqxHuqb4BMNmVBSzW0yECcAitimIq4bsEqsOsfWVk+0i3MBXIsv2YFmj/Ij5sHJL4WrZ 59YA== ARC-Authentication-Results: i=1; mx.google.com; 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 v9-v6si5202366plg.177.2018.10.30.00.12.30; Tue, 30 Oct 2018 00:12:47 -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; 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 S1726336AbeJ3QE0 (ORCPT + 99 others); Tue, 30 Oct 2018 12:04:26 -0400 Received: from Mailgw01.mediatek.com ([1.203.163.78]:29191 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726154AbeJ3QEZ (ORCPT ); Tue, 30 Oct 2018 12:04:25 -0400 X-UUID: 9c32585e50a5430fb9e55472fc83f575-20181030 X-UUID: 9c32585e50a5430fb9e55472fc83f575-20181030 Received: from mtkcas34.mediatek.inc [(172.27.4.250)] by mailgw01.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 825455708; Tue, 30 Oct 2018 15:11:55 +0800 Received: from MTKCAS36.mediatek.inc (172.27.4.186) by MTKMBS31DR.mediatek.inc (172.27.6.102) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 30 Oct 2018 15:11:53 +0800 Received: from [10.17.3.153] (10.17.3.153) by MTKCAS36.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Tue, 30 Oct 2018 15:11:52 +0800 Message-ID: <1540883512.26982.10.camel@mhfsdcap03> Subject: Re: [PATCH 1/2] net:stmmac: dwmac-mediatek: add support for mt2712 From: biao huang To: Andrew Lunn CC: , , , , , , , , , , , , , , Date: Tue, 30 Oct 2018 15:11:52 +0800 In-Reply-To: <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> <20181029122731.GA9174@lunn.ch> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks for your kindly comments. On Mon, 2018-10-29 at 13:27 +0100, Andrew Lunn wrote: > > +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. ok, I forgot these properties. > > 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. take it, seems that tx-delay/rx-delay will be more readable than mac-delay in dts. will be changed in next patch. > > Thanks > Andrew