From patchwork Mon Mar 24 14:14:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangfei Gao X-Patchwork-Id: 3882831 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A0E58BF540 for ; Mon, 24 Mar 2014 14:23:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AA3862020F for ; Mon, 24 Mar 2014 14:22:59 +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 92B3E2020E for ; Mon, 24 Mar 2014 14:22:58 +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 1WS5m9-0004Kr-0O; Mon, 24 Mar 2014 14:22:53 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WS5m6-0001Iq-N9; Mon, 24 Mar 2014 14:22:50 +0000 Received: from mail-pd0-f174.google.com ([209.85.192.174]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WS5m3-0001I0-GB for linux-arm-kernel@lists.infradead.org; Mon, 24 Mar 2014 14:22:48 +0000 Received: by mail-pd0-f174.google.com with SMTP id y13so5368584pdi.19 for ; Mon, 24 Mar 2014 07:22:25 -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=7PrypTU5Q9GWi5ppP6AZUgcrEkptOwlxcvK2L4sVd+4=; b=L/V149VAE/iiUM16989WCZAMZCfRSoTMAh8xNr5jTaQX8rtaHHzZcwje/7DbOhO8Z5 Jm8kB1mZxQaNCLFo5TlCu4n96HD54/rnrWIztcAxq9V13w+u3yCqwq85G09p/EmD2j2k +8K6f1QTITponHBPcHwu91oKv3foz0ysxAg16WjKIx99djdDjXtigXgR0nlGbq9ij4rj piD3z5wLCriGyKO+l26W0IowK5+z4+jT32ND7NnyJ+f2TM2SxJq4PbGiJoo0aCOB9b6F tqskQblxLDFV7D67N6i+qgpm2L0TTYIK2WkJI9TPdN992dHUlBKq/JwpLtBAPupNgEeJ k6Jw== X-Gm-Message-State: ALoCoQkpUIoW4JxnMJ0eiujhPDkDr47es//PzH4O5uaL0FpXWDWsdTigFYZkRnIQDe7KOwK3Hkn4 X-Received: by 10.66.218.170 with SMTP id ph10mr71342877pac.53.1395670510024; Mon, 24 Mar 2014 07:15:10 -0700 (PDT) Received: from localhost.localdomain ([180.150.157.4]) by mx.google.com with ESMTPSA id c7sm33518145pbt.0.2014.03.24.07.15.05 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 24 Mar 2014 07:15:08 -0700 (PDT) From: Zhangfei Gao To: davem@davemloft.net, linux@arm.linux.org.uk, arnd@arndb.de, f.fainelli@gmail.com, sergei.shtylyov@cogentembedded.com, mark.rutland@arm.com Subject: [PATCH 1/3] Documentation: add Device tree bindings for Hisilicon hip04 ethernet Date: Mon, 24 Mar 2014 22:14:54 +0800 Message-Id: <1395670496-17381-2-git-send-email-zhangfei.gao@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1395670496-17381-1-git-send-email-zhangfei.gao@linaro.org> References: <1395670496-17381-1-git-send-email-zhangfei.gao@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140324_102247_627572_A471922C X-CRM114-Status: UNSURE ( 8.17 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) 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.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 | 110 ++++++++++++++++++++ 1 file changed, 110 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..bd8ad3b --- /dev/null +++ b/Documentation/devicetree/bindings/net/hisilicon-hip04-net.txt @@ -0,0 +1,110 @@ +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 +- phy-mode: see ethernet.txt [1]. + +Optional properties: +- phy-handle: see ethernet.txt [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. + +Required properties: +- #address-cells : Should be <1> +- #size-cells : Should be <0> +- compatible: "hisilicon,hip04-ppe", "syscon". +- reg: address and length of the register set for the device. + +==Child node== + +Required properties: +- reg: port physical number, range from 0 to 0x1f. +- channel: recv channel start from channel * number (RX_DESC_NUM). + + +* MDIO bus node: + +Required properties: + +- compatible: should be "hisilicon,hip04-mdio". +- Inherits from MDIO bus node binding [2] +[2] Documentation/devicetree/bindings/net/phy.txt + +Example: + mdio { + compatible = "hisilicon,hip04-mdio"; + reg = <0x28f1000 0x1000>; + #address-cells = <1>; + #size-cells = <0>; + + phy0: ethernet-phy@0 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0>; + marvell,reg-init = <18 0x14 0 0x8001>; + }; + + phy1: ethernet-phy@1 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <1>; + marvell,reg-init = <18 0x14 0 0x8001>; + }; + }; + + ppe: ppe@28c0000 { + compatible = "hisilicon,hip04-ppe", "syscon"; + reg = <0x28c0000 0x10000>; + #address-cells = <1>; + #size-cells = <0>; + + eth0_port: port@1f { + reg = <0x1f>; + channel = <0>; + }; + + eth1_port: port@0 { + reg = <0>; + channel = <1>; + }; + + eth2_port: port@8 { + reg = <8>; + channel = <2>; + }; + }; + + 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>; + };