From patchwork Tue Mar 18 08:40:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangfei Gao X-Patchwork-Id: 3847761 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 0AC1DBF540 for ; Tue, 18 Mar 2014 08:41:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 18B6B20383 for ; Tue, 18 Mar 2014 08:41:51 +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 0F4BD20380 for ; Tue, 18 Mar 2014 08:41:50 +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 1WPpaG-0002zD-Sp; Tue, 18 Mar 2014 08:41:17 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WPpa7-0002Mo-Q7; Tue, 18 Mar 2014 08:41:07 +0000 Received: from mail-pd0-f171.google.com ([209.85.192.171]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WPpZv-0002Jh-Bq for linux-arm-kernel@lists.infradead.org; Tue, 18 Mar 2014 08:40:56 +0000 Received: by mail-pd0-f171.google.com with SMTP id r10so6783871pdi.2 for ; Tue, 18 Mar 2014 01:40:34 -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=IZoAZ2UIlR34nV5+x1Y5FRCRMxYIjEprnPzxlAC4hF0=; b=DccEmRobBlXIUH8WukAINtzDrQpGxgQKlk75i/VA6wfKgGJSEeV+SY55hSjCZ9OIJk wI8F599JdM8St4tQhB6wAJ0wceldXh6kqZ+uPR3mdXaO5oGFWAIqkmEOpDH4oq9xjIqL etqqXRbxlJ1d5Y4vVAbdwDBWhRVTeZ3BLc8bdHVO3b4fen7EIPLEkZwXA7aTzQAT9jMV nq8dJym/VOKRk7N5u82kXLneb+58ZV35ru2CV0+aGapqoRecOKtHkWBudBn5qfObZc9J TakP8grKwRA7hMXyzWAmkXj6Y15QFIvkS3te8frWrV0B6Rkv1F3n34qqCQhavWD3DriW rjAw== X-Gm-Message-State: ALoCoQkwODl3e6kvI51OjRkHeAufYTGGruA8yG7IXKf0wkYOdjO1uTc+8Q1VVEVbbg7PkkwTSApw X-Received: by 10.69.1.69 with SMTP id be5mr31067485pbd.126.1395132034045; Tue, 18 Mar 2014 01:40:34 -0700 (PDT) Received: from localhost.localdomain ([180.150.157.4]) by mx.google.com with ESMTPSA id aj7sm84314764pad.29.2014.03.18.01.40.30 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 18 Mar 2014 01:40:33 -0700 (PDT) From: Zhangfei Gao To: "David S. Miller" Subject: [PATCH 1/3] Documentation: add Device tree bindings for Hisilicon hip04 ethernet Date: Tue, 18 Mar 2014 16:40:15 +0800 Message-Id: <1395132017-15928-2-git-send-email-zhangfei.gao@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1395132017-15928-1-git-send-email-zhangfei.gao@linaro.org> References: <1395132017-15928-1-git-send-email-zhangfei.gao@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140318_044055_527700_75922855 X-CRM114-Status: UNSURE ( 9.69 ) 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.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 | 74 ++++++++++++++++++++ 1 file changed, 74 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..c918f08 --- /dev/null +++ b/Documentation/devicetree/bindings/net/hisilicon-hip04-net.txt @@ -0,0 +1,74 @@ +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: ppe port number connected to the controller: range from 0 to 31. +- speed: 100 (100M) or 1000 (1000M). +- id: should be different and fe should be 0. + +Optional Properties: +- phy-handle : the phandle to a PHY node + + +* Ethernet ppe node: control rx & tx fifos of all ethernet controllers + +Required properties: +- compatible: should be "hisilicon,hip04-ppebase". +- reg: address and length of the register set for the node. + + +* MDIO bus node: + +Required properties: + +- compatible: "hisilicon,hip04-mdio" +- Inherets from MDIO bus node binding[1] +[1] 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 { + reg = <0>; + marvell,reg-init = <18 0x14 0 0x8001>; + device_type = "ethernet-phy"; + }; + + phy1: ethernet-phy@1 { + reg = <1>; + marvell,reg-init = <18 0x14 0 0x8001>; + device_type = "ethernet-phy"; + }; + }; + + ppebase: ppebase@28c0000 { + compatible = "hisilicon,hip04-ppebase"; + reg = <0x28c0000 0x10000>; + }; + + fe: ethernet@28b0000 { + compatible = "hisilicon,hip04-mac"; + reg = <0x28b0000 0x10000>; + interrupts = <0 413 4>; + port = <31>; + speed = <100>; + id = <0>; + }; + + ge0: ethernet@2800000 { + compatible = "hisilicon,hip04-mac"; + reg = <0x2800000 0x10000>; + interrupts = <0 402 4>; + port = <0>; + speed = <1000>; + id = <1>; + phy-handle = <&phy0>; + };