From: NeilBrown <neil@brown.name>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: devel@driverdev.osuosl.org, lkml <linux-kernel@vger.kernel.org>,
John Crispin <blogic@openwrt.org>
Subject: [PATCH 07/13] staging: mt7621-eth: Document ralink/mediatek SoC ethernet binding
Date: Thu, 15 Mar 2018 07:22:36 +1100 [thread overview]
Message-ID: <152105895593.22262.7124655301943448670.stgit@noble> (raw)
In-Reply-To: <152105892255.22262.1902152685410223215.stgit@noble>
From: John Crispin <blogic@openwrt.org>
Add possible dt binding for mediatek gigabit switches.
Signed-off-by: John Crispin <blogic@openwrt.org>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Michael Lee <igvtee@gmail.com>
Cc: devicetree@vger.kernel.org
Signed-off-by: NeilBrown <neil@brown.name>
---
.../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 <neil@brown.name>
next prev parent reply other threads:[~2018-03-14 20:22 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-14 20:22 [PATCH 00/13] staging: add drivers to support Mediatek mt7621 in gnubee-pc1 NeilBrown
2018-03-14 20:22 ` [PATCH 04/13] staging: mt7621-spi: add mt7621 support NeilBrown
2018-03-14 20:22 ` [PATCH 01/13] staging: mt7621-pci: MIPS/ralink: add MT7621 pcie driver NeilBrown
2018-03-15 10:43 ` Dan Carpenter
2018-03-14 20:22 ` [PATCH 05/13] staging: mt7621-dma: ralink: add rt2880 dma engine NeilBrown
2018-03-14 20:22 ` [PATCH 03/13] staging: mt7621-gpio: ralink: add mt7621 gpio controller NeilBrown
2018-03-14 20:22 ` [PATCH 02/13] staging: mt7621-pinctrl: ralink: add pinctrl driver NeilBrown
2018-03-14 20:22 ` [PATCH 06/13] staging: mt7621-mmc: MIPS: ralink: add sdhci for mt7620a SoC NeilBrown
2018-03-14 20:22 ` [PATCH 08/13] staging: mt7621-eth: add the drivers core files NeilBrown
2018-03-14 20:22 ` NeilBrown [this message]
2018-03-14 20:22 ` [PATCH 09/13] staging: mt7621-eth: add gigabit switch driver (GSW) NeilBrown
2018-03-14 20:22 ` [PATCH 12/13] staging: mt7621-eth: mediatek: add Kconfig and Makefile NeilBrown
2018-03-14 20:22 ` [PATCH 13/13] staging: mt7621-dts: add dts files NeilBrown
2018-03-14 20:22 ` [PATCH 11/13] staging: mt7621-eth: add support for mt7621 NeilBrown
2018-03-14 20:22 ` [PATCH 10/13] staging: mt7621-eth: add mdio support for mt762X family NeilBrown
2018-03-14 23:45 ` [PATCH 00/13] staging: add drivers to support Mediatek mt7621 in gnubee-pc1 NeilBrown
2018-03-15 10:48 ` Dan Carpenter
2018-03-15 11:04 ` NeilBrown
2018-03-15 11:24 ` Dan Carpenter
2018-03-15 20:02 ` NeilBrown
2018-03-16 7:42 ` Dan Carpenter
2018-03-15 11:07 ` John Crispin
2018-03-15 11:29 ` Dan Carpenter
2018-03-15 20:12 ` NeilBrown
2018-03-15 20:21 ` John Crispin
2018-03-15 22:58 ` NeilBrown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=152105895593.22262.7124655301943448670.stgit@noble \
--to=neil@brown.name \
--cc=blogic@openwrt.org \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox