Received: by 10.192.165.148 with SMTP id m20csp1847554imm; Sat, 28 Apr 2018 06:46:50 -0700 (PDT) X-Google-Smtp-Source: AB8JxZr/nYMTZVLuTu2Nx/R22qSr182B2I0A7Cp4n09laJcUX9OyjsU4BYcJgBtT/XrPILSN0f1n X-Received: by 10.98.198.21 with SMTP id m21mr1419374pfg.232.1524923210771; Sat, 28 Apr 2018 06:46:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524923210; cv=none; d=google.com; s=arc-20160816; b=AouXD33sJtSmSvtWeRJ9IWazy/bkadae8EIgRozmTJW7Qe/7y+asHJFcJKYZL3Yh7j jkTdURZTNuJnC+DCD46/B2j8ZZQPb8nzGLvNzOSdWQ9bHJgiYEEWbGPzzossu+4Hvt4L 5jQv83tuESR9wdSvTw+dbz+xnTRfStNNJV4hA3isRZ1PjYgmyWdE7Qj4/FtHfgSacf4h NcMM21jO7KdnJ2Ln6v23kewTyt0lvXAT3fB7ioVptvsIzO1fjgWM2FdJD0ycA8zkBKeE HKTIGDGjoENnogK+sR5X5YkFce+/Yrwa1NfokomiwMZtaj2oL1Qlr3JLES8KPGB8ducC ki0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:references:in-reply-to:mime-version :arc-authentication-results; bh=wlQffScBHXMDE26HEdIu2WfH370cHNXknJB0Kejca5U=; b=cgb+KgmoVgvw0HiQZ3BOgWiOpVGjZhIfcGDPMLgO2YF6C37W7c3AqBjRMKp0flSzUR WmTGyp3avcsSWdgXam0y9PWmoviYE3t6naVl6Axzto46sWz6T1rN7S2snDYuN38485a/ +wVe0EqBbrW3xxRpH4pgT1RBZbWEEcrV911hNf56cZYtv7ForN6q2QIS4eWtuqGHJov0 iHlHic5RM4eKr/2xxfOJGMwMLMyhKJCnO7QisNKXwICfVfLHBkx0aq2ID0MKQBmHAjhx +BGMiSBFxhnmHanGELeIbmou4CzSqM3LqcPIJ3Rw07QGdlH9+TNg9czkfwwQKwCYD8pJ eZDw== 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 v4-v6si3172358pgn.260.2018.04.28.06.46.03; Sat, 28 Apr 2018 06:46:50 -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 S1759915AbeD1Nm4 convert rfc822-to-8bit (ORCPT + 99 others); Sat, 28 Apr 2018 09:42:56 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:35631 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754892AbeD1Nmy (ORCPT ); Sat, 28 Apr 2018 09:42:54 -0400 Received: by mail-wm0-f67.google.com with SMTP id o78so7458773wmg.0; Sat, 28 Apr 2018 06:42:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=o9RLf85mEP+YUockVr3E8Fr0cZHsHm67DafRcjDEwXU=; b=C+GAPf+79lFWu76kCQrI/fX/XIV+CM1x9YIewf2QFwr8RDjZM1BOCDBmITOa7vAkcX HFM8IPiZXiKhhvzo3G728NPZR3gBWZjjWP6lKR4U6Pp9ek8OVtv9CGfd7zdxMusqYlbT 2pjXP+RscQiQXgPUyQRymplQ2Nm3l2kvxDAAY9igMLQxP0VlP3qYiuoB5QpUQDKmCK7N 7BVvoi2FJ6F/AVsvdEvzm8Fnw1Erv8KCwFZvqy62aDu+2o6sth7bjZRoZwCbCf7/r3D3 8R3hSdh22hSXMLBIJTV8y+ewMXRXGuGwTOUQH3NxWbpjV5fsbh8vGqO1zmLuYf4R3lfC egLg== X-Gm-Message-State: ALQs6tBo2JzZd+j+QsLXWLPaB5fQ7vPA+LAf/YYvVNsxqoCdsQytymt4 uSTVths88bLxICY+ReNpY7eN+HmM X-Received: by 2002:a50:b901:: with SMTP id m1-v6mr8220193ede.214.1524922972416; Sat, 28 Apr 2018 06:42:52 -0700 (PDT) Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com. [74.125.82.43]) by smtp.gmail.com with ESMTPSA id p57-v6sm2181349edc.21.2018.04.28.06.42.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 28 Apr 2018 06:42:51 -0700 (PDT) Received: by mail-wm0-f43.google.com with SMTP id l1so7444038wmb.2; Sat, 28 Apr 2018 06:42:50 -0700 (PDT) X-Received: by 10.28.128.14 with SMTP id b14mr3825890wmd.143.1524922970674; Sat, 28 Apr 2018 06:42:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.142.19 with HTTP; Sat, 28 Apr 2018 06:42:30 -0700 (PDT) In-Reply-To: <04C9F795-2680-4220-A39A-7B7D5FD74C4A@aosc.io> References: <20180411141641.14675-1-icenowy@aosc.io> <20180411141641.14675-2-icenowy@aosc.io> <20180416184745.tqxyvojtcbage4fu@rob-hp-laptop> <04C9F795-2680-4220-A39A-7B7D5FD74C4A@aosc.io> From: Chen-Yu Tsai Date: Sat, 28 Apr 2018 21:42:30 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [linux-sunxi] Re: [PATCH 1/5] dt-bindings: allow dwmac-sun8i to use other devices' exported regmap To: Rob Herring Cc: linux-arm-kernel , devicetree , Maxime Ripard , netdev , linux-sunxi , linux-kernel , Corentin Labbe , Giuseppe Cavallaro , Icenowy Zheng Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Rob, On Tue, Apr 17, 2018 at 7:17 AM, Icenowy Zheng wrote: > > > 于 2018年4月17日 GMT+08:00 上午2:47:45, Rob Herring 写到: >>On Wed, Apr 11, 2018 at 10:16:37PM +0800, Icenowy Zheng wrote: >>> On some Allwinner SoCs the EMAC clock register needed by dwmac-sun8i >>is >>> in another device's memory space. In this situation dwmac-sun8i can >>use >>> a regmap exported by the other device with only the EMAC clock >>register. >> >>If this is a clock, then why not use the clock binding? > > EMAC clock register is only the datasheet name. It contains > MII mode selection and delay chain configuration. As Icenowy already mentioned, this is likely a misnomer. The register contains controls on how to route the TX and RX clock lines, and also what interface mode to use. The former includes things like the delays mentioned in the device tree binding, and also whether to invert the signals or not. The latter influences whether the TXC line is an input or an output (or maybe what decoding module to send all the signals to). On the H3/H5, it even contains controls for the embedded PHY. The settings only make sense to the MAC. To expose it as a generic clock line would not be a good fit. You can look at what we did for sun7i-a20-gmac, which is not pretty. All other DWMAC platforms that were introduced after sun7i-a20-gmac also use a syscon, instead of clocks, even though they probably cover the same set of RXC/TXC controls. ChenYu >> >>> >>> Document this situation in the dwmac-sun8i device tree binding >>> documentation. >>> >>> Signed-off-by: Icenowy Zheng >>> --- >>> Documentation/devicetree/bindings/net/dwmac-sun8i.txt | 5 +++-- >>> 1 file changed, 3 insertions(+), 2 deletions(-) >>> >>> diff --git a/Documentation/devicetree/bindings/net/dwmac-sun8i.txt >>b/Documentation/devicetree/bindings/net/dwmac-sun8i.txt >>> index 3d6d5fa0c4d5..0c5f63a80617 100644 >>> --- a/Documentation/devicetree/bindings/net/dwmac-sun8i.txt >>> +++ b/Documentation/devicetree/bindings/net/dwmac-sun8i.txt >>> @@ -20,8 +20,9 @@ Required properties: >>> - phy-handle: See ethernet.txt >>> - #address-cells: shall be 1 >>> - #size-cells: shall be 0 >>> -- syscon: A phandle to the syscon of the SoC with one of the >>following >>> - compatible string: >>> +- syscon: A phandle to a device which exports the EMAC clock >>register as a >>> + regmap or to the syscon of the SoC with one of the following >>compatible >>> + string: >>> - allwinner,sun8i-h3-system-controller >>> - allwinner,sun8i-v3s-system-controller >>> - allwinner,sun50i-a64-system-controller >>> -- >>> 2.15.1 >>> >>> -- >>> To unsubscribe from this list: send the line "unsubscribe devicetree" >>in >>> the body of a message to majordomo@vger.kernel.org >>> More majordomo info at http://vger.kernel.org/majordomo-info.html >> >>_______________________________________________ >>linux-arm-kernel mailing list >>linux-arm-kernel@lists.infradead.org >>http://lists.infradead.org/mailman/listinfo/linux-arm-kernel > > -- > You received this message because you are subscribed to the Google Groups "linux-sunxi" group. > To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe@googlegroups.com. > For more options, visit https://groups.google.com/d/optout.