1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
3 #include "mt7620a.dtsi"
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
8 #include <dt-bindings/mtd/partitions/uimage.h>
11 compatible = "dlink,dwr-118-a1", "ralink,mt7620a-soc";
12 model = "D-Link DWR-118 A1";
15 led-boot = &led_internet;
16 led-failsafe = &led_internet;
17 led-upgrade = &led_internet;
21 compatible = "gpio-keys";
25 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
26 linux,code = <KEY_WPS_BUTTON>;
31 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
32 linux,code = <KEY_RESTART>;
37 compatible = "gpio-leds";
40 function = LED_FUNCTION_WAN;
41 color = <LED_COLOR_ID_GREEN>;
42 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
45 led_internet: internet {
46 label = "green:internet";
47 gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
51 function = LED_FUNCTION_LAN;
52 color = <LED_COLOR_ID_GREEN>;
53 gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
57 label = "green:wlan2g";
58 gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
62 function = LED_FUNCTION_USB;
63 color = <LED_COLOR_ID_GREEN>;
64 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
65 trigger-sources = <&ohci_port1>, <&ehci_port1>;
66 linux,default-trigger = "usbport";
71 compatible = "gpio-export";
75 gpio-export,name = "usb";
76 gpio-export,output = <0>;
77 gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
98 compatible = "jedec,spi-nor";
100 spi-max-frequency = <80000000>;
103 compatible = "fixed-partitions";
104 #address-cells = <1>;
114 compatible = "openwrt,uimage", "denx,uimage";
115 openwrt,ih-magic = <IH_MAGIC_OKLI>;
116 openwrt,offset = <0x10000>;
118 reg = <0x10000 0xfe0000>;
121 config: partition@ff0000 {
123 reg = <0xff0000 0x10000>;
127 compatible = "fixed-layout";
128 #address-cells = <1>;
131 eeprom_config_e083: eeprom@e083 {
132 reg = <0xe083 0x200>;
135 macaddr_config_e496: macaddr@e496 {
136 compatible = "mac-base";
138 #nvmem-cell-cells = <1>;
156 groups = "ephy", "uartf", "spi refclk", "wled";
167 reg = <0x0000 0 0 0 0>;
168 nvmem-cells = <&eeprom_config_e083>, <&macaddr_config_e496 2>;
169 nvmem-cell-names = "eeprom", "mac-address";
179 pinctrl-names = "default";
180 pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
184 phy-handle = <&phy4>;
190 phy-handle = <&phy5>;
197 phy4: ethernet-phy@4 {
199 phy-mode = "rgmii-rxid";
202 phy5: ethernet-phy@5 {
204 phy-mode = "rgmii-rxid";
211 mediatek,ephy-base = /bits/ 8 <8>;