From patchwork Thu Dec 11 11:42:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ding Tianhong X-Patchwork-Id: 42111 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f71.google.com (mail-ee0-f71.google.com [74.125.83.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C02B826666 for ; Thu, 11 Dec 2014 11:43:50 +0000 (UTC) Received: by mail-ee0-f71.google.com with SMTP id c13sf3569475eek.10 for ; Thu, 11 Dec 2014 03:43:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-type:sender:precedence :list-id:x-original-sender:x-original-authentication-results :mailing-list:list-post:list-help:list-archive:list-unsubscribe; bh=+95pKZtJYDk9yky2DmBUbNZT2R3zdMwTEsNGLNVMkvM=; b=cVE0HWe/wZAkI5pNQHkkY1WsVxGXa2pgFMuTNsWjpRK047g70CLM0e5SsR6ROsF/CI 4Wi3jRURYggbJ8x4Bcg0xZU3EMlLNcUoeDYGHXxZmcF0Z+T98MXQF+DUV5cTO//8ZBwO D7VPPXF1lqyWoKTZmedD5RyCLXau7XmYdhL8zCgt2/XQ6CaOqlQpm1+wsoB7mfc2/zFW 0CdQyeTsCPZDTuj0bg0uRacNU8UHEozzLsBJAXkfJWZqftBdjX5PX5SICRjBS7al7Nlp jT5v6gW7zResgnxh6DC2f0qQNSW1UVZEk4dPQEZ6GUcO+seQNj+zNyyoJ2zLMnY55oZq iiew== X-Gm-Message-State: ALoCoQmlSDm0LFCimykgpfSrZ22mg9y3qdGVeso63Px1AH1R9olxXtxKt+8XPk9q8cNIxizVHjXq X-Received: by 10.180.8.9 with SMTP id n9mr2426199wia.6.1418298229986; Thu, 11 Dec 2014 03:43:49 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.22.132 with SMTP id d4ls71860laf.9.gmail; Thu, 11 Dec 2014 03:43:49 -0800 (PST) X-Received: by 10.112.135.197 with SMTP id pu5mr9365453lbb.22.1418298229733; Thu, 11 Dec 2014 03:43:49 -0800 (PST) Received: from mail-la0-f45.google.com (mail-la0-f45.google.com. [209.85.215.45]) by mx.google.com with ESMTPS id zk9si948822lbb.138.2014.12.11.03.43.49 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 11 Dec 2014 03:43:49 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) client-ip=209.85.215.45; Received: by mail-la0-f45.google.com with SMTP id gq15so4078392lab.4 for ; Thu, 11 Dec 2014 03:43:49 -0800 (PST) X-Received: by 10.152.45.41 with SMTP id j9mr9453892lam.59.1418298229610; Thu, 11 Dec 2014 03:43:49 -0800 (PST) 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.112.142.69 with SMTP id ru5csp493846lbb; Thu, 11 Dec 2014 03:43:48 -0800 (PST) X-Received: by 10.66.65.108 with SMTP id w12mr15923953pas.115.1418298227289; Thu, 11 Dec 2014 03:43:47 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h1si1452000pdg.44.2014.12.11.03.43.46 for ; Thu, 11 Dec 2014 03:43:47 -0800 (PST) Received-SPF: none (google.com: devicetree-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752935AbaLKLnp (ORCPT + 4 others); Thu, 11 Dec 2014 06:43:45 -0500 Received: from szxga03-in.huawei.com ([119.145.14.66]:33199 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751101AbaLKLnn (ORCPT ); Thu, 11 Dec 2014 06:43:43 -0500 Received: from 172.24.2.119 (EHLO szxeml415-hub.china.huawei.com) ([172.24.2.119]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id AYN78637; Thu, 11 Dec 2014 19:42:43 +0800 (CST) Received: from localhost (10.177.22.246) by szxeml415-hub.china.huawei.com (10.82.67.154) with Microsoft SMTP Server id 14.3.158.1; Thu, 11 Dec 2014 19:42:32 +0800 From: Ding Tianhong To: , , , , , , , , , CC: , , Subject: [PATCH net-next v9 1/3] Documentation: add Device tree bindings for Hisilicon hip04 ethernet Date: Thu, 11 Dec 2014 19:42:28 +0800 Message-ID: <1418298150-4944-2-git-send-email-dingtianhong@huawei.com> X-Mailer: git-send-email 1.8.5.2.msysgit.0 In-Reply-To: <1418298150-4944-1-git-send-email-dingtianhong@huawei.com> References: <1418298150-4944-1-git-send-email-dingtianhong@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.177.22.246] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020205.54898335.00BB, ss=1, re=0.001, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 7202562ae00bb55dafd37ec7ed6573ff 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: dingtianhong@huawei.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) 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: , From: Zhangfei Gao This patch adds the Device Tree bindings for the Hisilicon hip04 Ethernet controller, including 100M / 1000M controller. Signed-off-by: Zhangfei Gao Signed-off-by: Ding Tianhong --- .../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>; + };