From patchwork Fri Mar 21 15:09:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangfei Gao X-Patchwork-Id: 3874901 Return-Path: X-Original-To: patchwork-linux-arm@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 1C3619F334 for ; Fri, 21 Mar 2014 15:11:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3EED3201C7 for ; Fri, 21 Mar 2014 15:11:04 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (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 D81542016C for ; Fri, 21 Mar 2014 15:10:59 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WR15g-0003Dw-NQ; Fri, 21 Mar 2014 15:10:36 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WR15a-0000jq-GW; Fri, 21 Mar 2014 15:10:30 +0000 Received: from mail-ie0-f169.google.com ([209.85.223.169]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WR15T-0000hF-47 for linux-arm-kernel@lists.infradead.org; Fri, 21 Mar 2014 15:10:25 +0000 Received: by mail-ie0-f169.google.com with SMTP id to1so2572420ieb.14 for ; Fri, 21 Mar 2014 08:10:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=YWS+H3jVsQIsY3Vj+LpAYYP3X/N5Jzj0rpLwINyUvo4=; b=MGTQpoj4hz3o5B2CLtph8ipGtwQTkK/n3vgpr2IwE0gRGq0LvhoMYpSI1Ax+/BUO3J x9tqccc17ANSX5cLK7bnBZ10VqJylEYys5CxK7KNcgAJbUE4UV6rviuCKwxX2COA2yVl gyNpE0K/8npCz3w137tiJapwcRWn4BAdaLZ4UFQGyf9chZ+ujhF0DRXiJT/Z2mulRZLf 987S+K9icnHN8fh0hgeM5JszrZnvWyYHMYhjp5rTAzNFPdzcG2djHJJKzMsURgivGrPq 84qQj56P4cJYAg9ZalDZXUCYsnQxVAW/bA0IKJjI7Q+tUtTtHcfADAP+MZNMbHUd7b/T YxeQ== X-Gm-Message-State: ALoCoQlNnbE2MReKwJrERgmS7/ScX2FSJaLUpg8D5IBMZPv+/MsGCsXRZZIoXEpmKSBAwp6mQrP8 X-Received: by 10.50.57.17 with SMTP id e17mr3339587igq.13.1395414601923; Fri, 21 Mar 2014 08:10:01 -0700 (PDT) Received: from localhost.localdomain ([205.204.88.171]) by mx.google.com with ESMTPSA id sc8sm4042705igb.0.2014.03.21.08.09.47 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 21 Mar 2014 08:10:00 -0700 (PDT) From: Zhangfei Gao To: "David S. Miller" , linux@arm.linux.org.uk, arnd@arndb.de, f.fainelli@gmail.com, mark.rutland@arm.com, sergei.shtylyov@cogentembedded.com Subject: [PATCH 1/3] Documentation: add Device tree bindings for Hisilicon hip04 ethernet Date: Fri, 21 Mar 2014 23:09:28 +0800 Message-Id: <1395414570-25515-2-git-send-email-zhangfei.gao@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1395414570-25515-1-git-send-email-zhangfei.gao@linaro.org> References: <1395414570-25515-1-git-send-email-zhangfei.gao@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140321_111023_271671_91B43EEB X-CRM114-Status: UNSURE ( 9.57 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.6 (--) Cc: netdev@vger.kernel.org, Zhangfei Gao , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 patch adds the Device Tree bindings for the Hisilicon hip04 Ethernet controller, including 100M / 1000M controller. Signed-off-by: Zhangfei Gao --- .../bindings/net/hisilicon-hip04-net.txt | 107 ++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/hisilicon-hip04-net.txt diff --git a/Documentation/devicetree/bindings/net/hisilicon-hip04-net.txt b/Documentation/devicetree/bindings/net/hisilicon-hip04-net.txt new file mode 100644 index 0000000..22838b2 --- /dev/null +++ b/Documentation/devicetree/bindings/net/hisilicon-hip04-net.txt @@ -0,0 +1,107 @@ +Hisilicon hip04 Ethernet Controller + +* Ethernet controller node + +Required properties: +- compatible: should be "hisilicon,hip04-mac". +- reg: address and length of the register set for the device. +- interrupts: interrupt for the device. +- port-handle: phandle, specifies a reference to a node representing + the connected port +- Inherets from ethernet common binding [1] +[1] Documentation/devicetree/bindings/net/ethernet.txt + + +* Ethernet ppe node: +Control rx & tx fifos of all ethernet controllers. +Have 2048 recv channels shared by all ethernet controllers, only if no overlap. +Each controller's start recv channel is alisa_id * RX_DESC_NUM. + +Required properties: +- #address-cells : Should be <1> +- #size-cells : Should be <0> +- compatible: "hisilicon,hip04-ppe" +- reg: address and length of the register set for the device. + +==Child node== + +Required properties: +- reg: port physical number, range from 0 to 0x1f + + +* MDIO bus node: + +Required properties: + +- compatible: should be "hisilicon,hip04-mdio", "ethernet-phy-ieee802.3-c22". +- Inherets from MDIO bus node binding [2] +[2] Documentation/devicetree/bindings/net/phy.txt + +Example: + aliases { + ethernet0 = &fe; + ethernet1 = &ge0; + ethernet2 = &ge8; + }; + + mdio { + compatible = "hisilicon,hip04-mdio", "ethernet-phy-ieee802.3-c22"; + reg = <0x28f1000 0x1000>; + #address-cells = <1>; + #size-cells = <0>; + + phy0: ethernet-phy@0 { + reg = <0>; + marvell,reg-init = <18 0x14 0 0x8001>; + }; + + phy1: ethernet-phy@1 { + reg = <1>; + marvell,reg-init = <18 0x14 0 0x8001>; + }; + }; + + ppe: ppe@28c0000 { + compatible = "hisilicon,hip04-ppe"; + reg = <0x28c0000 0x10000>; + #address-cells = <1>; + #size-cells = <0>; + + eth0_port: port@1f { + reg = <0x1f>; + }; + + eth1_port: port@0 { + reg = <0>; + }; + + eth2_port: port@8 { + reg = <8>; + }; + }; + + fe: ethernet@28b0000 { + compatible = "hisilicon,hip04-mac"; + reg = <0x28b0000 0x10000>; + interrupts = <0 413 4>; + phy-mode = "mii"; + port-handle = <ð0_port>; + }; + + ge0: ethernet@2800000 { + compatible = "hisilicon,hip04-mac"; + reg = <0x2800000 0x10000>; + interrupts = <0 402 4>; + phy-mode = "sgmii"; + port-handle = <ð1_port>; + phy-handle = <&phy0>; + }; + + ge8: ethernet@2880000 { + compatible = "hisilicon,hip04-mac"; + reg = <0x2880000 0x10000>; + interrupts = <0 410 4>; + phy-mode = "sgmii"; + port-handle = <ð2_port>; + phy-handle = <&phy1>; + };