diff options
author | Quentin Schulz <quentin.schulz@bootlin.com> | 2018-10-08 06:14:44 -0400 |
---|---|---|
committer | Paul Burton <paul.burton@mips.com> | 2018-10-09 13:37:27 -0400 |
commit | 116edf6e5239ee834ae4a8c122f319a298ef052b (patch) | |
tree | e3df0513cafc45196b9dcf12bc03a5918ce33cad | |
parent | 68dec269ee29c3abfd09596fbee7e40d875a6ab3 (diff) |
MIPS: mscc: add DT for Ocelot PCB120
The Ocelot PCB120 evaluation board is different from the PCB123 in that
it has 4 external VSC8584 (or VSC8574) PHYs.
It uses the SoC's second MDIO bus for external PHYs which have a
reversed address on the bus (i.e. PHY4 is on address 3, PHY5 is on
address 2, PHY6 on 1 and PHY7 on 0).
Here is how the PHYs are connected to the switch ports:
port 0: phy0 (internal)
port 1: phy1 (internal)
port 2: phy2 (internal)
port 3: phy3 (internal)
port 4: phy7
port 5: phy4
port 6: phy6
port 9: phy5
Reviewed-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Quentin Schulz <quentin.schulz@bootlin.com>
Signed-off-by: Paul Burton <paul.burton@mips.com>
Patchwork: https://patchwork.linux-mips.org/patch/20869/
Cc: ralf@linux-mips.org
Cc: jhogan@kernel.org
Cc: robh+dt@kernel.org
Cc: mark.rutland@arm.com
Cc: davem@davemloft.net
Cc: andrew@lunn.ch
Cc: f.fainelli@gmail.com
Cc: allan.nielsen@microchip.com
Cc: linux-mips@linux-mips.org
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: thomas.petazzoni@bootlin.com
Cc: antoine.tenart@bootlin.com
-rw-r--r-- | arch/mips/boot/dts/mscc/Makefile | 2 | ||||
-rw-r--r-- | arch/mips/boot/dts/mscc/ocelot_pcb120.dts | 107 |
2 files changed, 108 insertions, 1 deletions
diff --git a/arch/mips/boot/dts/mscc/Makefile b/arch/mips/boot/dts/mscc/Makefile index 9a9bb7ea0503..ec6f5b2bf093 100644 --- a/arch/mips/boot/dts/mscc/Makefile +++ b/arch/mips/boot/dts/mscc/Makefile | |||
@@ -1,3 +1,3 @@ | |||
1 | dtb-$(CONFIG_MSCC_OCELOT) += ocelot_pcb123.dtb | 1 | dtb-$(CONFIG_MSCC_OCELOT) += ocelot_pcb123.dtb ocelot_pcb120.dtb |
2 | 2 | ||
3 | obj-$(CONFIG_BUILTIN_DTB) += $(addsuffix .o, $(dtb-y)) | 3 | obj-$(CONFIG_BUILTIN_DTB) += $(addsuffix .o, $(dtb-y)) |
diff --git a/arch/mips/boot/dts/mscc/ocelot_pcb120.dts b/arch/mips/boot/dts/mscc/ocelot_pcb120.dts new file mode 100644 index 000000000000..33991fd209f5 --- /dev/null +++ b/arch/mips/boot/dts/mscc/ocelot_pcb120.dts | |||
@@ -0,0 +1,107 @@ | |||
1 | // SPDX-License-Identifier: (GPL-2.0 OR MIT) | ||
2 | /* Copyright (c) 2017 Microsemi Corporation */ | ||
3 | |||
4 | /dts-v1/; | ||
5 | |||
6 | #include <dt-bindings/interrupt-controller/irq.h> | ||
7 | #include <dt-bindings/phy/phy-ocelot-serdes.h> | ||
8 | #include "ocelot.dtsi" | ||
9 | |||
10 | / { | ||
11 | compatible = "mscc,ocelot-pcb120", "mscc,ocelot"; | ||
12 | |||
13 | chosen { | ||
14 | stdout-path = "serial0:115200n8"; | ||
15 | }; | ||
16 | |||
17 | memory@0 { | ||
18 | device_type = "memory"; | ||
19 | reg = <0x0 0x0e000000>; | ||
20 | }; | ||
21 | }; | ||
22 | |||
23 | &gpio { | ||
24 | phy_int_pins: phy_int_pins { | ||
25 | pins = "GPIO_4"; | ||
26 | function = "gpio"; | ||
27 | }; | ||
28 | }; | ||
29 | |||
30 | &mdio0 { | ||
31 | status = "okay"; | ||
32 | }; | ||
33 | |||
34 | &mdio1 { | ||
35 | status = "okay"; | ||
36 | pinctrl-names = "default"; | ||
37 | pinctrl-0 = <&miim1>, <&phy_int_pins>; | ||
38 | |||
39 | phy7: ethernet-phy@0 { | ||
40 | reg = <0>; | ||
41 | interrupts = <4 IRQ_TYPE_LEVEL_HIGH>; | ||
42 | interrupt-parent = <&gpio>; | ||
43 | }; | ||
44 | phy6: ethernet-phy@1 { | ||
45 | reg = <1>; | ||
46 | interrupts = <4 IRQ_TYPE_LEVEL_HIGH>; | ||
47 | interrupt-parent = <&gpio>; | ||
48 | }; | ||
49 | phy5: ethernet-phy@2 { | ||
50 | reg = <2>; | ||
51 | interrupts = <4 IRQ_TYPE_LEVEL_HIGH>; | ||
52 | interrupt-parent = <&gpio>; | ||
53 | }; | ||
54 | phy4: ethernet-phy@3 { | ||
55 | reg = <3>; | ||
56 | interrupts = <4 IRQ_TYPE_LEVEL_HIGH>; | ||
57 | interrupt-parent = <&gpio>; | ||
58 | }; | ||
59 | }; | ||
60 | |||
61 | &port0 { | ||
62 | phy-handle = <&phy0>; | ||
63 | }; | ||
64 | |||
65 | &port1 { | ||
66 | phy-handle = <&phy1>; | ||
67 | }; | ||
68 | |||
69 | &port2 { | ||
70 | phy-handle = <&phy2>; | ||
71 | }; | ||
72 | |||
73 | &port3 { | ||
74 | phy-handle = <&phy3>; | ||
75 | }; | ||
76 | |||
77 | &port4 { | ||
78 | phy-handle = <&phy7>; | ||
79 | phy-mode = "sgmii"; | ||
80 | phys = <&serdes 4 SERDES1G(2)>; | ||
81 | }; | ||
82 | |||
83 | &port5 { | ||
84 | phy-handle = <&phy4>; | ||
85 | phy-mode = "sgmii"; | ||
86 | phys = <&serdes 5 SERDES1G(5)>; | ||
87 | }; | ||
88 | |||
89 | &port6 { | ||
90 | phy-handle = <&phy6>; | ||
91 | phy-mode = "sgmii"; | ||
92 | phys = <&serdes 6 SERDES1G(3)>; | ||
93 | }; | ||
94 | |||
95 | &port9 { | ||
96 | phy-handle = <&phy5>; | ||
97 | phy-mode = "sgmii"; | ||
98 | phys = <&serdes 9 SERDES1G(4)>; | ||
99 | }; | ||
100 | |||
101 | &uart0 { | ||
102 | status = "okay"; | ||
103 | }; | ||
104 | |||
105 | &uart2 { | ||
106 | status = "okay"; | ||
107 | }; | ||