mediatek: update to latest kernel patchset from v4.13-rc
[openwrt/openwrt.git] / target / linux / mediatek / patches-4.9 / 0025-dt-bindings-net-dsa-add-Mediatek-MT7530-binding.patch
1 From 3b9b46b5705214b16c5356284ad68be32ae56a26 Mon Sep 17 00:00:00 2001
2 From: Sean Wang <sean.wang@mediatek.com>
3 Date: Wed, 29 Mar 2017 17:38:19 +0800
4 Subject: [PATCH 25/57] dt-bindings: net: dsa: add Mediatek MT7530 binding
5
6 Add device-tree binding for Mediatek MT7530 switch.
7
8 Cc: devicetree@vger.kernel.org
9 Signed-off-by: Sean Wang <sean.wang@mediatek.com>
10 Acked-by: Rob Herring <robh@kernel.org>
11 ---
12 .../devicetree/bindings/net/dsa/mt7530.txt | 92 ++++++++++++++++++++++
13 1 file changed, 92 insertions(+)
14 create mode 100644 Documentation/devicetree/bindings/net/dsa/mt7530.txt
15
16 --- /dev/null
17 +++ b/Documentation/devicetree/bindings/net/dsa/mt7530.txt
18 @@ -0,0 +1,92 @@
19 +Mediatek MT7530 Ethernet switch
20 +================================
21 +
22 +Required properties:
23 +
24 +- compatible: Must be compatible = "mediatek,mt7530";
25 +- #address-cells: Must be 1.
26 +- #size-cells: Must be 0.
27 +- mediatek,mcm: Boolean; if defined, indicates that either MT7530 is the part
28 + on multi-chip module belong to MT7623A has or the remotely standalone
29 + chip as the function MT7623N reference board provided for.
30 +- core-supply: Phandle to the regulator node necessary for the core power.
31 +- io-supply: Phandle to the regulator node necessary for the I/O power.
32 + See Documentation/devicetree/bindings/regulator/mt6323-regulator.txt
33 + for details for the regulator setup on these boards.
34 +
35 +If the property mediatek,mcm isn't defined, following property is required
36 +
37 +- reset-gpios: Should be a gpio specifier for a reset line.
38 +
39 +Else, following properties are required
40 +
41 +- resets : Phandle pointing to the system reset controller with
42 + line index for the ethsys.
43 +- reset-names : Should be set to "mcm".
44 +
45 +Required properties for the child nodes within ports container:
46 +
47 +- reg: Port address described must be 6 for CPU port and from 0 to 5 for
48 + user ports.
49 +- phy-mode: String, must be either "trgmii" or "rgmii" for port labeled
50 + "cpu".
51 +
52 +See Documentation/devicetree/bindings/dsa/dsa.txt for a list of additional
53 +required, optional properties and how the integrated switch subnodes must
54 +be specified.
55 +
56 +Example:
57 +
58 + &mdio0 {
59 + switch@0 {
60 + compatible = "mediatek,mt7530";
61 + #address-cells = <1>;
62 + #size-cells = <0>;
63 + reg = <0>;
64 +
65 + core-supply = <&mt6323_vpa_reg>;
66 + io-supply = <&mt6323_vemc3v3_reg>;
67 + reset-gpios = <&pio 33 0>;
68 +
69 + ports {
70 + #address-cells = <1>;
71 + #size-cells = <0>;
72 + reg = <0>;
73 + port@0 {
74 + reg = <0>;
75 + label = "lan0";
76 + };
77 +
78 + port@1 {
79 + reg = <1>;
80 + label = "lan1";
81 + };
82 +
83 + port@2 {
84 + reg = <2>;
85 + label = "lan2";
86 + };
87 +
88 + port@3 {
89 + reg = <3>;
90 + label = "lan3";
91 + };
92 +
93 + port@4 {
94 + reg = <4>;
95 + label = "wan";
96 + };
97 +
98 + port@6 {
99 + reg = <6>;
100 + label = "cpu";
101 + ethernet = <&gmac0>;
102 + phy-mode = "trgmii";
103 + fixed-link {
104 + speed = <1000>;
105 + full-duplex;
106 + };
107 + };
108 + };
109 + };
110 + };