From patchwork Sat Apr 5 04:35:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangfei Gao X-Patchwork-Id: 27869 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f198.google.com (mail-ob0-f198.google.com [209.85.214.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 72C3E20490 for ; Sat, 5 Apr 2014 04:36:31 +0000 (UTC) Received: by mail-ob0-f198.google.com with SMTP id wn1sf14438633obc.9 for ; Fri, 04 Apr 2014 21:36:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=nJjFjA0QDNOz3FXHju6TNa2HzXQc+mcP/qIyc2ba9W8=; b=LCMBh+fC/O8XWQJzQLPrIvjv9Uu9JPlOcVrLItsZusmrUzZ7prUMTMfH7Iy9uriKzY SdJt9wDECYfiIHfYhGPGn3Ujv4L7j+3OQvjW4XP+F4M/qtKz4+VnxGtfbETsOc/pg9Kb uwGQztFbaa/xMAjuPSaZX7NQ3u9C7LEyV1gJeQHI4t8mFsmaT4ZBWwh9G9C7opaJqKRC IA27pyhSgXzR0tXiwok5eeUZAaHD35uEyu/UJjJKhA20lF0Pnf4/ioRhTr/1cs/5zHhN L5zSgBc3XdTfU7c9CfJBf2VFHVpW7QLcFjqqYEbqxClPagCQBqznO0579jgEwSsfdlY3 vGQQ== X-Gm-Message-State: ALoCoQl06RdKlBW0miU29Z3JRiai5U40yvviOC/oJ9i5dzcjN/3/EkzkTJozwLVGPLAW35/yOpER X-Received: by 10.43.141.196 with SMTP id jf4mr9529376icc.9.1396672590994; Fri, 04 Apr 2014 21:36:30 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.109.101 with SMTP id k92ls1232400qgf.64.gmail; Fri, 04 Apr 2014 21:36:30 -0700 (PDT) X-Received: by 10.58.202.133 with SMTP id ki5mr28130vec.19.1396672590911; Fri, 04 Apr 2014 21:36:30 -0700 (PDT) Received: from mail-vc0-f180.google.com (mail-vc0-f180.google.com [209.85.220.180]) by mx.google.com with ESMTPS id bp12si1005661veb.27.2014.04.04.21.36.30 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 04 Apr 2014 21:36:30 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.180 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.180; Received: by mail-vc0-f180.google.com with SMTP id lf12so3729190vcb.39 for ; Fri, 04 Apr 2014 21:36:30 -0700 (PDT) X-Received: by 10.58.1.5 with SMTP id 5mr8345808vei.8.1396672590825; Fri, 04 Apr 2014 21:36:30 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.12.8 with SMTP id v8csp2173vcv; Fri, 4 Apr 2014 21:36:30 -0700 (PDT) X-Received: by 10.66.228.37 with SMTP id sf5mr18949275pac.19.1396672589652; Fri, 04 Apr 2014 21:36:29 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id xv10si506241pab.97.2014.04.04.21.36.29; Fri, 04 Apr 2014 21:36:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752376AbaDEEg2 (ORCPT + 9 others); Sat, 5 Apr 2014 00:36:28 -0400 Received: from mail-pb0-f42.google.com ([209.85.160.42]:35565 "EHLO mail-pb0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752343AbaDEEg1 (ORCPT ); Sat, 5 Apr 2014 00:36:27 -0400 Received: by mail-pb0-f42.google.com with SMTP id rr13so4335375pbb.29 for ; Fri, 04 Apr 2014 21:36:26 -0700 (PDT) X-Received: by 10.68.234.2 with SMTP id ua2mr18768970pbc.81.1396672586853; Fri, 04 Apr 2014 21:36:26 -0700 (PDT) Received: from localhost.localdomain ([60.166.219.133]) by mx.google.com with ESMTPSA id tt4sm21306582pbc.46.2014.04.04.21.36.11 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 04 Apr 2014 21:36:26 -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, David.Laight@ACULAB.COM, eric.dumazet@gmail.com Cc: linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, Zhangfei Gao Subject: [PATCH 1/3] Documentation: add Device tree bindings for Hisilicon hip04 ethernet Date: Sat, 5 Apr 2014 12:35:04 +0800 Message-Id: <1396672506-9296-2-git-send-email-zhangfei.gao@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1396672506-9296-1-git-send-email-zhangfei.gao@linaro.org> References: <1396672506-9296-1-git-send-email-zhangfei.gao@linaro.org> Sender: devicetree-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: devicetree@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: zhangfei.gao@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.180 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 | 88 ++++++++++++++++++++ 1 file changed, 88 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..988fc69 --- /dev/null +++ b/Documentation/devicetree/bindings/net/hisilicon-hip04-net.txt @@ -0,0 +1,88 @@ +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 the syscon ppe node + port, port number connected to the controller + channel, recv channel start from channel * number (RX_DESC_NUM) +- 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. +Each controller's recv channel start from channel * number (RX_DESC_NUM). + +Required properties: +- compatible: "hisilicon,hip04-ppe", "syscon". +- reg: address and length of the register set for the device. + + +* 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>; + }; + + fe: ethernet@28b0000 { + compatible = "hisilicon,hip04-mac"; + reg = <0x28b0000 0x10000>; + interrupts = <0 413 4>; + phy-mode = "mii"; + port-handle = <&ppe 31 0>; + }; + + ge0: ethernet@2800000 { + compatible = "hisilicon,hip04-mac"; + reg = <0x2800000 0x10000>; + interrupts = <0 402 4>; + phy-mode = "sgmii"; + port-handle = <&ppe 0 1>; + phy-handle = <&phy0>; + }; + + ge8: ethernet@2880000 { + compatible = "hisilicon,hip04-mac"; + reg = <0x2880000 0x10000>; + interrupts = <0 410 4>; + phy-mode = "sgmii"; + port-handle = <&ppe 8 2>; + phy-handle = <&phy1>; + };