1 // SPDX-License-Identifier: GPL-2.0
5 * Devicetree for the Inteno XG6846 router, mostly used as a
6 * media converter from fiber to twisted pair ethernet
7 * "fiber modem" in many households in Sweden. The Marvell
8 * switch has one of its ports connected to an SFP (Small Form
9 * Factor pluggable) optical fiber receiver, which is bridged
10 * to the twisted pair connector LAN1.
12 * This device tree is inspired by research from the OpenWrt
13 * and Sweclockers forums, including contributions from
14 * NPeca75, mrhaav and csom.
16 * Some devices have a USB type A host receptacle mounted,
19 #include "bcm6328.dtsi"
20 #include <dt-bindings/input/input.h>
21 #include <dt-bindings/gpio/gpio.h>
24 model = "Inteno XG6846";
25 compatible = "inteno,xg6846", "brcm,bcm6328";
27 /* OpenWrt-specific aliases */
29 led-boot = &led_pwr_red;
30 led-failsafe = &led_pwr_red;
31 led-running = &led_pwr_green;
32 led-upgrade = &led_pwr_red;
33 led-usb = &led_usb_green;
37 bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200";
38 stdout-path = "serial0:115200n8";
42 * This I2C port is connected to the SFP and reflects the EEPROM etc
43 * inside the SFP module. If the module is not plugged in, consequently
44 * nothing will be found on the bus.
47 compatible = "i2c-gpio";
48 sda-gpios = <&gpio 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
49 scl-gpios = <&gpio 19 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
54 /* This I2C bus is used for the external CATV connector (usually unused) */
56 compatible = "i2c-gpio";
57 sda-gpios = <&gpio 23 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
58 scl-gpios = <&gpio 7 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
64 compatible = "sff,sfp";
66 los-gpios = <&gpio 29 GPIO_ACTIVE_HIGH>;
70 compatible = "gpio-keys-polled";
77 gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
78 linux,code = <KEY_RESTART>;
79 debounce-interval = <60>;
88 compatible = "jedec,spi-nor";
90 * HW 1.0-1.1: Spansion S25FL128S1
91 * HW 1.3: Winbond W25Q128
93 * Fast Read Data max speed is 50MHz, see the Winbond W25Q128
94 * datasheet table 9.5 "AC Electrical Characteristics", we can
95 * use this speed because the chip supports fast reads. Older
96 * HW has different NOR chips, I assume they can all do fast
99 spi-max-frequency = <104000000>;
100 spi-tx-bus-width = <2>;
101 spi-rx-bus-width = <2>;
105 #address-cells = <1>;
109 compatible = "fixed-partitions";
110 #address-cells = <1>;
115 reg = <0x0000000 0x0010000>;
120 compatible = "brcm,bcm963xx-imagetag";
121 reg = <0x010000 0xfe0000>;
126 reg = <0xff0000 0x010000>;
134 compatible = "nvmem-cells";
135 #address-cells = <1>;
138 macaddr_cfe_6a0: macaddr@6a0 {
146 nvmem-cells = <&macaddr_cfe_6a0>;
147 nvmem-cell-names = "mac-address";
154 switch0port4: port@4 {
169 /* The switch is not using any external IRQ, sadly */
170 compatible = "marvell,mv88e6085";
171 #address-cells = <1>;
174 interrupt-controller;
175 #interrupt-cells = <2>;
179 #address-cells = <1>;
185 phy-handle = <&lan1phy>;
191 phy-handle = <&lan2phy>;
197 phy-handle = <&lan3phy>;
203 phy-handle = <&lan4phy>;
209 phy-handle = <&ext1phy>;
214 phy-mode = "rgmii-id";
225 phy-mode = "rgmii-id";
227 ethernet = <&switch0port4>;
236 #address-cells = <1>;
239 lan1phy: ethernet-phy@0 {
241 interrupt-parent = <&switch1>;
242 interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
244 lan2phy: ethernet-phy@1 {
246 interrupt-parent = <&switch1>;
247 interrupts = <1 IRQ_TYPE_LEVEL_HIGH>;
249 lan3phy: ethernet-phy@2 {
251 interrupt-parent = <&switch1>;
252 interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
254 lan4phy: ethernet-phy@3 {
256 interrupt-parent = <&switch1>;
257 interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;
259 ext1phy: ethernet-phy@4 {
261 interrupt-parent = <&switch1>;
262 interrupts = <4 IRQ_TYPE_LEVEL_HIGH>;
273 pinctrl_xg6846_usb_spd_led: xg6846_usb_spd_led-pins {
281 pinctrl-names = "default";
282 pinctrl-0 = <&pinctrl_xg6846_usb_spd_led>, /* GPIO16 LED USB */
283 <&pinctrl_ephy1_spd_led>, /* GPIO18 LED PWR red */
284 <&pinctrl_ephy3_spd_led>; /* GPIO20 LED PWR green */
286 /* On board variants without USB this LED is not mounted */
287 led_usb_green: led@16 {
291 default-state = "off";
295 * LED 18 and 20 drive the same physical LED, the PWR
296 * LED that can be both red and green.
298 led_pwr_red: led@18 {
302 default-state = "off";
305 led_pwr_green: led@20 {
309 default-state = "off";