From patchwork Tue Oct 24 17:57:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 116988 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp6088721qgn; Tue, 24 Oct 2017 11:03:49 -0700 (PDT) X-Google-Smtp-Source: ABhQp+RPGu0fdAAikyoQSzHHp41LUZzjupfnNffYJWt/oAI77r6vAci0t3BFnmTP5Q0Y46tkfFgD X-Received: by 10.98.247.4 with SMTP id h4mr17522317pfi.16.1508868228932; Tue, 24 Oct 2017 11:03:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508868228; cv=none; d=google.com; s=arc-20160816; b=TEcbdt3sqvMN0GmbJph5e39FHr0GN9MUiILVHfd1H23RZTHnOvU95qx5XJfIYZwdOZ fwbnGy6KrZn9ecm5SkpiQYjo72DnoEzu7xpxOnWoLLpmYzf0rAzuqOxX6EjGhwt+P0cY wf0WpUn/SS4/7wgEqXRip8pCN9NfS32LftBRF29Q9FudHYB2JXEItJNQq6DgcL9oGndg 51/cviorttGRDycQvcbXH5qMZJUAylxcu7A+invuCo8huxqz9oIij4B922VTeEWd02Dz iQzpEM1xU8zY3YpnEoeGs227iuYc4grkUj/SUFS0bNeW1+wfnh9IPMA7/l7BxukpuhpN iVjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=7E7I7AepMTcGSOwwWyKivEU4xyZm/Mk1cuspDTgQtIE=; b=npCx043AIvKdy7TQ3c+GAeNh1FzgwVfMoJ6b84BqYBAInNsBXkbp+Dc8LNo3EEVrMt vgdkND9i0yco00g6r/XzsU/PcgO/ZiX2IwxtUOfc4MD+yy3X2HqN4yHDjaRvJofutWhq eHiOb4AGns80MGCzs4IFiECpd+mWMTEUs+Wjz9ylh4B5aEpt2kEwZlIFm/yCMyjD7h+o IhtUvJoXrsmEGGw9MmaEJ8lCjYfwcqH++XpnHQXoId2STyUUBryxXgb4TCYzTeyMvgJN zgaAb/i4PVZba2hw3BFqotpm9b/10Ch6+JspoU3rMhe4D2GFfpvM1ClnezQFaOX297nw dN2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=FDAjEHnY; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 72si561657pfm.40.2017.10.24.11.03.48; Tue, 24 Oct 2017 11:03:48 -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=@gmail.com header.s=20161025 header.b=FDAjEHnY; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932351AbdJXSDr (ORCPT + 27 others); Tue, 24 Oct 2017 14:03:47 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:51084 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751396AbdJXSAq (ORCPT ); Tue, 24 Oct 2017 14:00:46 -0400 Received: by mail-wm0-f65.google.com with SMTP id u138so17307838wmu.5; Tue, 24 Oct 2017 11:00:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=7E7I7AepMTcGSOwwWyKivEU4xyZm/Mk1cuspDTgQtIE=; b=FDAjEHnYBQdlPvlPcLLKk/AT/vKAG/z76Z6CQYqSasIIg2pzGSNb/WQvuH4FYfkIUt Dwb6+5xZnbvYnHLNcPCM2T2uTAQW64A5MxesqB2Q0R27bXerBG6sNxurKBqW24oWPlom /cZo8+SyDbL7nTzH/sg0ByRxsYWdDTeNbWNzVL6Fsp8LRHOgW7Apc2g+P6YX53eJnPpJ U7118YymsAO8CGdhXp9uJPi50YXjsZrs4gfmQW24yGV2ueKkNysaSuoMduE6Nh4z9vtg wl3MyHvwwHiV9YBGoK0EVc+k8dXIVEfI8ttV2ciKfg8pujLTehy6GjhOrV+7O9h6pBDo xpnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=7E7I7AepMTcGSOwwWyKivEU4xyZm/Mk1cuspDTgQtIE=; b=BItxQcfqQHQi6YhqClKeK6Ex8IRAJx7ZxLeGEL/qGI7LUIymOpyTsg1bpmhmMcVhi3 HdO9OdbJ2y8dQkL3koifywGDo4SUTY8hmHwOO1qwbQzJ2IEDKcVR9XPpvcrw6kESSz0K sMvBS4CpyOpq7aIIZ3Id/H5cNwDlb+IsudJ0JmVKTwAO67tyNTvtu3vH97j15235YZfz kjhJeIww558Vc1youW/5zoEtmGLjJVLW9oo/bwlJRd1e/r27esrwEy+TkublTqBI0GUL mS+o22Ue8k6H8jcmV2MVxOjseTXHz0G23uJAD8cARMBV9X5XUm7Q7+xs7nvLSCTTP/qY XAsw== X-Gm-Message-State: AMCzsaVZiFZK6lfwHjnyxusloM57EZ9dbi1y9ntU2FsieF+gRcBneGpr UBviXoSC5SQdgg4GCLHEeig= X-Received: by 10.28.16.209 with SMTP id 200mr5694254wmq.35.1508868044469; Tue, 24 Oct 2017 11:00:44 -0700 (PDT) Received: from Red.local (LFbn-MAR-1-580-96.w90-118.abo.wanadoo.fr. [90.118.159.96]) by smtp.googlemail.com with ESMTPSA id s18sm818968wrg.87.2017.10.24.11.00.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 24 Oct 2017 11:00:43 -0700 (PDT) From: Corentin Labbe To: robh+dt@kernel.org, mark.rutland@arm.com, maxime.ripard@free-electrons.com, wens@csie.org, linux@armlinux.org.uk, catalin.marinas@arm.com, will.deacon@arm.com, peppe.cavallaro@st.com, alexandre.torgue@st.com, andrew@lunn.ch, f.fainelli@gmail.com Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Corentin Labbe Subject: [PATCH v9 01/10] dt-bindings: net: Restore sun8i dwmac binding Date: Tue, 24 Oct 2017 19:57:05 +0200 Message-Id: <20171024175714.15840-2-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171024175714.15840-1-clabbe.montjoie@gmail.com> References: <20171024175714.15840-1-clabbe.montjoie@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The original dwmac-sun8i DT bindings have some issue on how to handle integrated PHY and was reverted in last RC of 4.13. But now we have a solution so we need to get back that was reverted. This patch restore dt-bindings documentation about dwmac-sun8i This reverts commit 8aa33ec2f481 ("dt-bindings: net: Revert sun8i dwmac binding") Signed-off-by: Corentin Labbe Acked-by: Rob Herring --- .../devicetree/bindings/net/dwmac-sun8i.txt | 84 ++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/dwmac-sun8i.txt -- 2.13.6 diff --git a/Documentation/devicetree/bindings/net/dwmac-sun8i.txt b/Documentation/devicetree/bindings/net/dwmac-sun8i.txt new file mode 100644 index 000000000000..725f3b187886 --- /dev/null +++ b/Documentation/devicetree/bindings/net/dwmac-sun8i.txt @@ -0,0 +1,84 @@ +* Allwinner sun8i GMAC ethernet controller + +This device is a platform glue layer for stmmac. +Please see stmmac.txt for the other unchanged properties. + +Required properties: +- compatible: should be one of the following string: + "allwinner,sun8i-a83t-emac" + "allwinner,sun8i-h3-emac" + "allwinner,sun8i-v3s-emac" + "allwinner,sun50i-a64-emac" +- reg: address and length of the register for the device. +- interrupts: interrupt for the device +- interrupt-names: should be "macirq" +- clocks: A phandle to the reference clock for this device +- clock-names: should be "stmmaceth" +- resets: A phandle to the reset control for this device +- reset-names: should be "stmmaceth" +- phy-mode: See ethernet.txt +- 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: + - allwinner,sun8i-h3-system-controller + - allwinner,sun8i-v3s-system-controller + - allwinner,sun50i-a64-system-controller + - allwinner,sun8i-a83t-system-controller + +Optional properties: +- allwinner,tx-delay-ps: TX clock delay chain value in ps. Range value is 0-700. Default is 0) +- allwinner,rx-delay-ps: RX clock delay chain value in ps. Range value is 0-3100. Default is 0) +Both delay properties need to be a multiple of 100. They control the delay for +external PHY. + +Optional properties for the following compatibles: + - "allwinner,sun8i-h3-emac", + - "allwinner,sun8i-v3s-emac": +- allwinner,leds-active-low: EPHY LEDs are active low + +Required child node of emac: +- mdio bus node: should be named mdio + +Required properties of the mdio node: +- #address-cells: shall be 1 +- #size-cells: shall be 0 + +The device node referenced by "phy" or "phy-handle" should be a child node +of the mdio node. See phy.txt for the generic PHY bindings. + +Required properties of the phy node with the following compatibles: + - "allwinner,sun8i-h3-emac", + - "allwinner,sun8i-v3s-emac": +- clocks: a phandle to the reference clock for the EPHY +- resets: a phandle to the reset control for the EPHY + +Example: + +emac: ethernet@1c0b000 { + compatible = "allwinner,sun8i-h3-emac"; + syscon = <&syscon>; + reg = <0x01c0b000 0x104>; + interrupts = ; + interrupt-names = "macirq"; + resets = <&ccu RST_BUS_EMAC>; + reset-names = "stmmaceth"; + clocks = <&ccu CLK_BUS_EMAC>; + clock-names = "stmmaceth"; + #address-cells = <1>; + #size-cells = <0>; + + phy-handle = <&int_mii_phy>; + phy-mode = "mii"; + allwinner,leds-active-low; + mdio: mdio { + #address-cells = <1>; + #size-cells = <0>; + int_mii_phy: ethernet-phy@1 { + reg = <1>; + clocks = <&ccu CLK_BUS_EPHY>; + resets = <&ccu RST_BUS_EPHY>; + }; + }; +};