From patchwork Wed Sep 3 10:27:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Perier X-Patchwork-Id: 4832401 Return-Path: X-Original-To: patchwork-linux-rockchip@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 78FCB9F32E for ; Wed, 3 Sep 2014 10:25:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9943820220 for ; Wed, 3 Sep 2014 10:25:32 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 81C322021B for ; Wed, 3 Sep 2014 10:25:31 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XP7kp-0002rC-0C; Wed, 03 Sep 2014 10:25:31 +0000 Received: from mail-we0-x231.google.com ([2a00:1450:400c:c03::231]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XP7km-0002k6-Cw; Wed, 03 Sep 2014 10:25:28 +0000 Received: by mail-we0-f177.google.com with SMTP id u56so8316806wes.36 for ; Wed, 03 Sep 2014 03:25:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=jnWB/tkmV24zlE4vmP2r8qoAGZZOIF078TLGzwxiEtE=; b=Z2EBfKEy2+1d6JVLZrm0CCPJVy5Sp00AlCcgWKVwsCuso5bJhdGMFoysa3daOa2hv5 qVerhohKJmlsv4aEooZtg3FRQO3UeeWOuv71ZA28ZTqKExz+x2VGXRnwScQGD6F6Cd0E gEDJWqCWHpRYEvQOriyEOMk3atRo6B0Z8wP0K+lOu30N1uZIf1HBORS81eErY2ME4Wkk R83n1qeiZSAFcZfFPZq9DFCj1dCbhRlJ7Y9GvcrkUrs4z3SsvjXjgVmy31ehLB4nmxUg pT5tfnR32VjKsDYFEeBU1wFAD8LHDX8A/N6fPc2IYJEZ8OUPKkqBKmSg3PobI4QskQ+W AQIQ== X-Received: by 10.194.118.201 with SMTP id ko9mr44042803wjb.26.1409739906094; Wed, 03 Sep 2014 03:25:06 -0700 (PDT) Received: from localhost.localdomain (AToulouse-554-1-44-245.w92-149.abo.wanadoo.fr. [92.149.235.245]) by mx.google.com with ESMTPSA id z5sm3780139wib.20.2014.09.03.03.25.04 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 03 Sep 2014 03:25:05 -0700 (PDT) From: Romain Perier To: heiko@sntech.de Subject: [PATCH 2/4] dt-bindings: Document EMAC Rockchip Date: Wed, 3 Sep 2014 10:27:14 +0000 Message-Id: <1409740036-8117-2-git-send-email-romain.perier@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1409740036-8117-1-git-send-email-romain.perier@gmail.com> References: <1409740036-8117-1-git-send-email-romain.perier@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140903_032528_584152_A0C7F746 X-CRM114-Status: GOOD ( 12.03 ) X-Spam-Score: -0.8 (/) Cc: linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, arnd@arndb.de, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This adds the necessary binding documentation for the EMAC Rockchip platform driver found in RK3066 and RK3188 SoCs. Signed-off-by: Romain Perier --- .../devicetree/bindings/net/emac_rockchip.txt | 53 ++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/emac_rockchip.txt diff --git a/Documentation/devicetree/bindings/net/emac_rockchip.txt b/Documentation/devicetree/bindings/net/emac_rockchip.txt new file mode 100644 index 0000000..d3242e4 --- /dev/null +++ b/Documentation/devicetree/bindings/net/emac_rockchip.txt @@ -0,0 +1,53 @@ +* ARC EMAC 10/100 Ethernet platform driver for Rockchip Rk3066/RK3188 SoCs + +Required properties: +- compatible: Should be "rockchip,rk3066-emac" or "rockchip,rk3188-emac" + according to the target SoC. +- reg: Address and length of the register set for the device +- interrupts: Should contain the EMAC interrupts +- pinctrl-names: pin control state name ("default"). +- pinctrl-0: pin control group list of phandle. It must contain + pin control groups for communication with the phy and for the mii bus. +- rockchip,grf: phandle to the syscon grf used to control speed and mode + for emac. +- phy: see ethernet.txt file in the same directory. +- phy-mode: see ethernet.txt file in the same directory. + +Optional properties: +- phy-supply: phandle to a regulator if the PHY needs one + +Clock handling: +- The host clock is needed to calculate and set polling period of EMAC. + It must be provided by the clock "hclk". +- The reference clock is needed to get/set data from phy at the right frequency, + according to its "phy-mode". It must be provided by the clock "macref". + +Child nodes of the driver are the individual PHY devices connected to the +MDIO bus. They must have a "reg" property given the PHY address on the MDIO bus. + +Examples: + +ethernet@10204000 { + compatible = "rockchip,rk3188-emac"; + reg = <0xc0fc2000 0x3c>; + interrupts = <6>; + mac-address = [ 00 11 22 33 44 55 ]; + + clocks = <&cru HCLK_EMAC>, <&cru SCLK_MAC>; + clock-names = "hclk", "macref"; + + pinctrl-names = "default"; + pinctrl-0 = <&emac_xfer>, <&emac_mdio>, <&phy_int>; + + rockchip,grf = <&grf>; + + phy = <&phy0>; + phy-mode = "rmii"; + phy-supply = <&vcc_rmii>; + + #address-cells = <1>; + #size-cells = <0>; + phy0: ethernet-phy@0 { + reg = <1>; + }; +};