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 = "openwrt,uimage", "denx,uimage";
121 reg = <0x010000 0xfe0000>;
123 openwrt,offset = <0x30000>;
127 reg = <0xff0000 0x010000>;
135 compatible = "nvmem-cells";
136 #address-cells = <1>;
139 macaddr_cfe_6a0: macaddr@6a0 {
147 nvmem-cells = <&macaddr_cfe_6a0>;
148 nvmem-cell-names = "mac-address";
155 switch0port4: port@4 {
170 /* The switch is not using any external IRQ, sadly */
171 compatible = "marvell,mv88e6085";
172 #address-cells = <1>;
175 interrupt-controller;
176 #interrupt-cells = <2>;
180 #address-cells = <1>;
186 phy-handle = <&lan1phy>;
192 phy-handle = <&lan2phy>;
198 phy-handle = <&lan3phy>;
204 phy-handle = <&lan4phy>;
210 phy-handle = <&ext1phy>;
215 phy-mode = "rgmii-id";
226 phy-mode = "rgmii-id";
228 ethernet = <&switch0port4>;
237 #address-cells = <1>;
240 lan1phy: ethernet-phy@0 {
242 interrupt-parent = <&switch1>;
243 interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
245 lan2phy: ethernet-phy@1 {
247 interrupt-parent = <&switch1>;
248 interrupts = <1 IRQ_TYPE_LEVEL_HIGH>;
250 lan3phy: ethernet-phy@2 {
252 interrupt-parent = <&switch1>;
253 interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
255 lan4phy: ethernet-phy@3 {
257 interrupt-parent = <&switch1>;
258 interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;
260 ext1phy: ethernet-phy@4 {
262 interrupt-parent = <&switch1>;
263 interrupts = <4 IRQ_TYPE_LEVEL_HIGH>;
274 pinctrl_xg6846_usb_spd_led: xg6846_usb_spd_led-pins {
282 pinctrl-names = "default";
283 pinctrl-0 = <&pinctrl_xg6846_usb_spd_led>, /* GPIO16 LED USB */
284 <&pinctrl_ephy1_spd_led>, /* GPIO18 LED PWR red */
285 <&pinctrl_ephy3_spd_led>; /* GPIO20 LED PWR green */
287 /* On board variants without USB this LED is not mounted */
288 led_usb_green: led@16 {
292 default-state = "off";
296 * LED 18 and 20 drive the same physical LED, the PWR
297 * LED that can be both red and green.
299 led_pwr_red: led@18 {
303 default-state = "off";
306 led_pwr_green: led@20 {
310 default-state = "off";