Received: by 10.213.65.68 with SMTP id h4csp1224600imn; Wed, 14 Mar 2018 13:26:37 -0700 (PDT) X-Google-Smtp-Source: AG47ELuSX+W1tOJSYWRZvPdpbz8r7x8LBxiKbFY1a0SMomc7X2menUKflVs0BKCJTKjz2DChpQkf X-Received: by 10.98.233.3 with SMTP id j3mr5550514pfh.38.1521059197082; Wed, 14 Mar 2018 13:26:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521059197; cv=none; d=google.com; s=arc-20160816; b=IGASm6+J4XEhNHNjmYsdUCyzX+d7B5Un61zOXgG7C8hP+InyK8LCtjPnLksqMM05Ed 2pB44vgju/f+TIdTPbrosgCQvBnfg8/wOVlBc+Wj2HZCjkZoeNSyyVst5aQDsVBt32ho IwP1SFTpoXy2R0xAYDFQoUh+o2DoNcp4ZIFnHFDjW2b6lwqCwP4cJ+E04luHOKzt+fR1 Katfgl25oNmTXzVc3Br3Z+CBw+gBLJLyUlpiN/UbX9SgLjOqqIRcBP1nfozALHWAg8BZ tjRQz2wFwsw10KXAomNBfs7su3CA2MOG2fFgbEGWmPM/Bi8jm94wzNnUgkUTot0iR53h FcZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:cc:subject:date:to :from:arc-authentication-results; bh=jua0I/24ZmNeJXwrNteVPs9XrOhCXRK6CDl9F7YB1zQ=; b=qNF5wBq+96L0oWqqD8nE+sxi/f9TvhM659Oh8WAxcl2mKlj7svOTAcIRP+TWoIbMsm pMoaIh7eRmswWgnLolblEfyIxpA6PzLdXNXa00aR0dpecgpTa8Ul3Uc5KOzZFkMq/1Ac EjVMdWwxtArXT7g0YUtxKz4XiEOu1ILx5JslKJT0lqgmrQwGm7L+HC8r2kIu+yp+jO3n jlcZWxg1H09sWYIU+6ME82bp/c3Z39fivBRn3+Mkd9nM8/KDenZjlQVmVeJdZgFP1uNg OZsZTq6JwCWJ6goqI04ftzhsSfN1qkRRizmrpLrbsTxOHktNu7nd+a6r5DJoMk1wWkNs 2xVA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t66si2401571pgc.160.2018.03.14.13.26.22; Wed, 14 Mar 2018 13:26:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752386AbeCNUYL (ORCPT + 99 others); Wed, 14 Mar 2018 16:24:11 -0400 Received: from mx2.suse.de ([195.135.220.15]:38601 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752334AbeCNUXs (ORCPT ); Wed, 14 Mar 2018 16:23:48 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 5D4ADB018; Wed, 14 Mar 2018 20:23:47 +0000 (UTC) From: NeilBrown To: Greg Kroah-Hartman Date: Thu, 15 Mar 2018 07:22:36 +1100 Subject: [PATCH 07/13] staging: mt7621-eth: Document ralink/mediatek SoC ethernet binding Cc: devel@driverdev.osuosl.org, lkml , John Crispin Message-ID: <152105895593.22262.7124655301943448670.stgit@noble> In-Reply-To: <152105892255.22262.1902152685410223215.stgit@noble> References: <152105892255.22262.1902152685410223215.stgit@noble> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: John Crispin Add possible dt binding for mediatek gigabit switches. Signed-off-by: John Crispin Signed-off-by: Felix Fietkau Signed-off-by: Michael Lee Cc: devicetree@vger.kernel.org Signed-off-by: NeilBrown --- .../devicetree/bindings/net/mediatek-net-gsw.txt | 48 ++++++++++++++++++++ drivers/staging/mt7621-eth/TODO | 4 ++ 2 files changed, 52 insertions(+) create mode 100644 drivers/staging/mt7621-eth/Documentation/devicetree/bindings/net/mediatek-net-gsw.txt create mode 100644 drivers/staging/mt7621-eth/TODO diff --git a/drivers/staging/mt7621-eth/Documentation/devicetree/bindings/net/mediatek-net-gsw.txt b/drivers/staging/mt7621-eth/Documentation/devicetree/bindings/net/mediatek-net-gsw.txt new file mode 100644 index 000000000000..596b38552697 --- /dev/null +++ b/drivers/staging/mt7621-eth/Documentation/devicetree/bindings/net/mediatek-net-gsw.txt @@ -0,0 +1,48 @@ +Mediatek Gigabit Switch +======================= + +The mediatek gigabit switch can be found on Mediatek SoCs. + +Required properties: +- compatible: Should be "mediatek,mt7620-gsw", "mediatek,mt7621-gsw", + "mediatek,mt7623-gsw" +- reg: Address and length of the register set for the device +- interrupts: Should contain the gigabit switches interrupt + + +Additional required properties for ARM based SoCs: +- mediatek,reset-pin: phandle describing the reset GPIO +- clocks: the clocks used by the switch +- clock-names: the names of the clocks listed in the clocks property + these should be "trgpll", "esw", "gp2", "gp1" +- mt7530-supply: the phandle of the regulator used to power the switch +- mediatek,pctl-regmap: phandle to the port control regmap. this is used to + setup the drive current + + +Optional properties: +- interrupt-parent: Should be the phandle for the interrupt controller + that services interrupts for this device + +Example: + +gsw: switch@1b100000 { + compatible = "mediatek,mt7623-gsw"; + reg = <0 0x1b110000 0 0x300000>; + + interrupt-parent = <&pio>; + interrupts = <168 IRQ_TYPE_EDGE_RISING>; + + clocks = <&apmixedsys CLK_APMIXED_TRGPLL>, + <ðsys CLK_ETHSYS_ESW>, + <ðsys CLK_ETHSYS_GP2>, + <ðsys CLK_ETHSYS_GP1>; + clock-names = "trgpll", "esw", "gp2", "gp1"; + + mt7530-supply = <&mt6323_vpa_reg>; + + mediatek,pctl-regmap = <&syscfg_pctl_a>; + mediatek,reset-pin = <&pio 15 0>; + + status = "okay"; +}; diff --git a/drivers/staging/mt7621-eth/TODO b/drivers/staging/mt7621-eth/TODO new file mode 100644 index 000000000000..5f269af0db5c --- /dev/null +++ b/drivers/staging/mt7621-eth/TODO @@ -0,0 +1,4 @@ + +- verify devicetree documentation is consistent with code + +Cc: NeilBrown