From patchwork Tue Mar 14 14:18:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 738733 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3vjHBR60hGz9rxw for ; Wed, 15 Mar 2017 01:27:27 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Ss4TVC4u"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752145AbdCNOVT (ORCPT ); Tue, 14 Mar 2017 10:21:19 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:33775 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752340AbdCNOVR (ORCPT ); Tue, 14 Mar 2017 10:21:17 -0400 Received: by mail-wr0-f193.google.com with SMTP id g10so24133924wrg.0; Tue, 14 Mar 2017 07:21:16 -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=1pcd34eCNoN6QDmHIcazAu4I/TVF5N2VeTc8a1VnFJ4=; b=Ss4TVC4uyzB3ZG3ABWE6xMOtGlxMQUwYZHCKS3ieiEVf1HEHGQ/pmBCVJZorVJYlKh ICrrBgNW3EkXCXfXgScPYIqD9LFXSiaJL9s5L2VhX9SDgJ+4R2mCVXwEIaelaTnKPWqu WCNgmoyQzPMjPzQNLiNK7mjen66Xvhs+Vd0Mh0bpVXF4rOUEngZE9F41wEuFCX/Qex7+ 0NOIMafwo2NcFE3rpEQGYefYq/5u7BYVsxwh0mTZ0yDgY6AEqgw/DFMZNFmAeutPOuuD FgRUCS10ghOELyB1Pc2peQP3FREgSB8tlJvv3vyIWyrZ1izZTTBRFmoD/sGlWYjj+of3 EkDg== 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=1pcd34eCNoN6QDmHIcazAu4I/TVF5N2VeTc8a1VnFJ4=; b=bfFU2J48yuloL8+J2lMJ6+prOMW/2Zj78RLaHAL0TWBC5RHIKcP8HkeJ4lb6qGZXJT k0CNeoM04VQ5a2lw9QHN8y+4oHKvrTnGGyloq3VhwIkqj+OrUdAie8nq0zR1Ypo30Q3O 1dHE/GcONv6U/LZaF7dWtzzctsslpJxNLud8TOek16dJbc2m834XAFlLwadzvQdFK0A9 3JkmIuBLwpKHXVwiG52gGk4amNnuKnW0opmKYlAhpl7EEPuu6oIrna7fZePbXHCRc2G8 vJD1vHcHhRXvu9AswqYSHW6Z3AWhKj7PviwRoCidKS/w3yI6+RpOLSJcm8YhVBl1BFKG upwg== X-Gm-Message-State: AMke39lb+oDmCqHwPTids0K1/KjiB+inurqYQkmTf9AP94OvDCwN4C5fpnHkSxAeAQFYQw== X-Received: by 10.223.148.35 with SMTP id 32mr32869625wrq.82.1489501275240; Tue, 14 Mar 2017 07:21:15 -0700 (PDT) Received: from Red.local (LFbn-1-7035-57.w90-116.abo.wanadoo.fr. [90.116.208.57]) by smtp.googlemail.com with ESMTPSA id o143sm49526wmd.3.2017.03.14.07.21.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 14 Mar 2017 07:21:14 -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, davem@davemloft.net Cc: f.fainelli@gmail.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Corentin Labbe Subject: [PATCH v2 03/20] ARM: sun8i: dt: Add DT bindings documentation for Allwinner dwmac-sun8i Date: Tue, 14 Mar 2017 15:18:39 +0100 Message-Id: <20170314141856.24560-4-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170314141856.24560-1-clabbe.montjoie@gmail.com> References: <20170314141856.24560-1-clabbe.montjoie@gmail.com> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This patch adds documentation for Device-Tree bindings for the Allwinner dwmac-sun8i driver. Signed-off-by: Corentin Labbe Acked-by: Rob Herring --- .../devicetree/bindings/net/dwmac-sun8i.txt | 77 ++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/dwmac-sun8i.txt diff --git a/Documentation/devicetree/bindings/net/dwmac-sun8i.txt b/Documentation/devicetree/bindings/net/dwmac-sun8i.txt new file mode 100644 index 0000000..f01ef17 --- /dev/null +++ b/Documentation/devicetree/bindings/net/dwmac-sun8i.txt @@ -0,0 +1,77 @@ +* 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,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-a64-system-controller + - allwinner,sun8i-a83t-system-controller + +Optional properties: +- allwinner,tx-delay: TX clock delay chain value. Range value is 0-0x07. Default is 0) +- allwinner,rx-delay: RX clock delay chain value. Range value is 0-0x1F. Default is 0) +Both delay properties are in 0.1ns step. + +Optional properties for "allwinner,sun8i-h3-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 "allwinner,sun8i-h3-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 = <&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>; + }; + }; +};