1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
3 #include "rtl838x.dtsi"
4 #include "rtl83xx_panasonic_mxxeg-pn28xx0k.dtsi"
6 #include <dt-bindings/interrupt-controller/irq.h>
9 compatible = "panasonic,m16eg-pn28160k", "realtek,rtl8382-soc";
10 model = "Panasonic Switch-M16eG PN28160K";
13 led-boot = &led_status_eco_green;
14 led-failsafe = &led_status_eco_amber;
15 led-running = &led_status_eco_green;
16 led-upgrade = &led_status_eco_green;
20 * sfp0/1 are "combo" port with each TP port (23/24), and they are
21 * connected to the RTL8218FB. Currently, there is no support for
22 * the chip and only TP ports work by the RTL8218D support.
25 compatible = "sff,sfp";
27 tx-fault-gpio = <&gpio1 0 GPIO_ACTIVE_HIGH>;
28 tx-disable-gpio = <&gpio1 1 GPIO_ACTIVE_HIGH>;
29 mod-def0-gpio = <&gpio1 2 GPIO_ACTIVE_LOW>;
30 los-gpio = <&gpio1 3 GPIO_ACTIVE_HIGH>;
34 compatible = "sff,sfp";
36 tx-fault-gpio = <&gpio1 4 GPIO_ACTIVE_HIGH>;
37 tx-disable-gpio = <&gpio1 5 GPIO_ACTIVE_HIGH>;
38 mod-def0-gpio = <&gpio1 6 GPIO_ACTIVE_LOW>;
39 los-gpio = <&gpio1 7 GPIO_ACTIVE_HIGH>;
44 led_status_eco_amber: led-5 {
45 label = "amber:status_eco";
46 gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
47 color = <LED_COLOR_ID_AMBER>;
48 function = LED_FUNCTION_STATUS;
49 function-enumerator = <1>;
52 led_status_eco_green: led-6 {
53 label = "green:status_eco";
54 gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
55 color = <LED_COLOR_ID_GREEN>;
56 function = LED_FUNCTION_STATUS;
57 function-enumerator = <2>;
62 scl-gpios = <&gpio0 0 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
63 sda-gpios = <&gpio0 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
67 scl-gpios = <&gpio0 12 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
68 sda-gpios = <&gpio0 13 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
73 #interrupt-cells = <2>;
74 interrupt-parent = <&gpio0>;
75 interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
78 * GPIO12 (IO1_4): RTL8218FB
80 * This GPIO pin should be specified as "reset-gpio" in mdio node, but
81 * RTL8218FB phy won't be configured on RTL8218D support in the current
82 * phy driver. So, ethernet ports on the phy will be broken after hard-
84 * (RTL8218FB phy will be detected as RTL8218D by the phy driver)
85 * At the moment, configure this GPIO pin as gpio-hog to avoid breaking
90 gpios = <12 GPIO_ACTIVE_HIGH>;
92 line-name = "ext-switch-reset";
104 #address-cells = <1>;
112 compatible = "realtek,rtl838x-mdio";
113 #address-cells = <1>;
139 #address-cells = <1>;
142 SWITCH_PORT(8, 1, internal)
143 SWITCH_PORT(9, 2, internal)
144 SWITCH_PORT(10, 3, internal)
145 SWITCH_PORT(11, 4, internal)
146 SWITCH_PORT(12, 5, internal)
147 SWITCH_PORT(13, 6, internal)
148 SWITCH_PORT(14, 7, internal)
149 SWITCH_PORT(15, 8, internal)
151 SWITCH_PORT(16, 9, qsgmii)
152 SWITCH_PORT(17, 10, qsgmii)
153 SWITCH_PORT(18, 11, qsgmii)
154 SWITCH_PORT(19, 12, qsgmii)
155 SWITCH_PORT(20, 13, qsgmii)
156 SWITCH_PORT(21, 14, qsgmii)
157 SWITCH_PORT(22, 15, qsgmii)
158 SWITCH_PORT(23, 16, qsgmii)
161 ethernet = <ðernet0>;
163 phy-mode = "internal";