2018-04-19 17:34:22 +00:00
|
|
|
#include "mt7620a.dtsi"
|
|
|
|
|
|
|
|
#include <dt-bindings/gpio/gpio.h>
|
|
|
|
#include <dt-bindings/input/input.h>
|
2024-02-07 13:48:43 +00:00
|
|
|
#include <dt-bindings/leds/common.h>
|
2021-06-10 15:17:23 +00:00
|
|
|
#include <dt-bindings/mtd/partitions/uimage.h>
|
2018-04-19 17:34:22 +00:00
|
|
|
|
|
|
|
/ {
|
|
|
|
compatible = "dlink,dwr-118-a2", "ralink,mt7620a-soc";
|
|
|
|
model = "D-Link DWR-118 A2";
|
|
|
|
|
|
|
|
aliases {
|
2018-08-28 04:54:27 +00:00
|
|
|
led-boot = &led_internet;
|
|
|
|
led-failsafe = &led_internet;
|
2018-04-19 17:34:22 +00:00
|
|
|
};
|
|
|
|
|
2018-12-30 11:17:25 +00:00
|
|
|
keys {
|
2019-09-20 12:03:02 +00:00
|
|
|
compatible = "gpio-keys";
|
2018-04-19 17:34:22 +00:00
|
|
|
|
|
|
|
wps {
|
|
|
|
label = "wps";
|
|
|
|
gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
|
|
|
|
linux,code = <KEY_WPS_BUTTON>;
|
|
|
|
};
|
|
|
|
|
|
|
|
reset {
|
|
|
|
label = "reset";
|
|
|
|
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
|
|
|
|
linux,code = <KEY_RESTART>;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2018-12-30 11:42:53 +00:00
|
|
|
leds {
|
2018-04-19 17:34:22 +00:00
|
|
|
compatible = "gpio-leds";
|
|
|
|
|
|
|
|
wan {
|
2024-02-07 13:48:43 +00:00
|
|
|
function = LED_FUNCTION_WAN;
|
|
|
|
color = <LED_COLOR_ID_GREEN>;
|
2018-04-19 17:34:22 +00:00
|
|
|
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
|
|
|
|
};
|
|
|
|
|
|
|
|
led_internet: internet {
|
2020-09-27 17:40:51 +00:00
|
|
|
label = "green:internet";
|
2018-04-19 17:34:22 +00:00
|
|
|
gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
|
|
|
|
};
|
|
|
|
|
|
|
|
lan {
|
2024-02-07 13:48:43 +00:00
|
|
|
function = LED_FUNCTION_LAN;
|
|
|
|
color = <LED_COLOR_ID_GREEN>;
|
2018-04-19 17:34:22 +00:00
|
|
|
gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
|
|
|
|
};
|
|
|
|
|
|
|
|
wlan2g {
|
2020-09-27 17:40:51 +00:00
|
|
|
label = "green:wlan2g";
|
2018-04-19 17:34:22 +00:00
|
|
|
gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
|
|
|
|
};
|
|
|
|
|
|
|
|
usb {
|
2024-02-07 13:48:43 +00:00
|
|
|
function = LED_FUNCTION_USB;
|
|
|
|
color = <LED_COLOR_ID_GREEN>;
|
2018-04-19 17:34:22 +00:00
|
|
|
gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
|
2018-08-13 15:14:08 +00:00
|
|
|
trigger-sources = <&ohci_port1>, <&ehci_port1>;
|
|
|
|
linux,default-trigger = "usbport";
|
2018-04-19 17:34:22 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
gpio_export {
|
|
|
|
compatible = "gpio-export";
|
|
|
|
#size-cells = <0>;
|
|
|
|
|
|
|
|
usb {
|
|
|
|
gpio-export,name = "usb";
|
|
|
|
gpio-export,output = <1>;
|
|
|
|
gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
|
2018-08-23 07:35:04 +00:00
|
|
|
};
|
2018-04-19 17:34:22 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
&gpio1 {
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
|
|
|
&gpio2 {
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
|
|
|
&gpio3 {
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
|
|
|
&spi0 {
|
|
|
|
status = "okay";
|
|
|
|
|
|
|
|
flash@0 {
|
|
|
|
compatible = "jedec,spi-nor";
|
|
|
|
reg = <0>;
|
|
|
|
spi-max-frequency = <50000000>;
|
|
|
|
|
|
|
|
partitions {
|
|
|
|
compatible = "fixed-partitions";
|
|
|
|
#address-cells = <1>;
|
|
|
|
#size-cells = <1>;
|
|
|
|
|
|
|
|
partition@0 {
|
|
|
|
label = "jboot";
|
|
|
|
reg = <0x0 0x10000>;
|
|
|
|
read-only;
|
|
|
|
};
|
|
|
|
|
|
|
|
partition@10000 {
|
2021-06-10 15:17:23 +00:00
|
|
|
compatible = "openwrt,uimage", "denx,uimage";
|
|
|
|
openwrt,ih-magic = <IH_MAGIC_OKLI>;
|
|
|
|
openwrt,offset = <0x10000>;
|
2018-04-19 17:34:22 +00:00
|
|
|
label = "firmware";
|
|
|
|
reg = <0x10000 0xfe0000>;
|
|
|
|
};
|
|
|
|
|
2024-02-17 14:10:10 +00:00
|
|
|
partition@ff0000 {
|
2018-04-19 17:34:22 +00:00
|
|
|
label = "config";
|
|
|
|
reg = <0xff0000 0x10000>;
|
|
|
|
read-only;
|
2023-11-25 21:20:44 +00:00
|
|
|
|
|
|
|
nvmem-layout {
|
|
|
|
compatible = "fixed-layout";
|
|
|
|
#address-cells = <1>;
|
|
|
|
#size-cells = <1>;
|
|
|
|
|
|
|
|
macaddr_config_e4a8: macaddr@e4a8 {
|
2023-11-25 21:35:04 +00:00
|
|
|
compatible = "mac-base";
|
2023-11-25 21:20:44 +00:00
|
|
|
reg = <0xe4a8 0x6>;
|
2023-11-25 21:35:04 +00:00
|
|
|
#nvmem-cell-cells = <1>;
|
2023-11-25 21:20:44 +00:00
|
|
|
};
|
|
|
|
};
|
2018-04-19 17:34:22 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
&ehci {
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
|
|
|
&ohci {
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
2019-12-22 20:26:01 +00:00
|
|
|
&state_default {
|
|
|
|
default {
|
2020-04-12 12:58:29 +00:00
|
|
|
groups = "ephy", "uartf", "spi refclk", "wled";
|
|
|
|
function = "gpio";
|
2018-04-19 17:34:22 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
&pcie {
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
|
|
|
&pcie0 {
|
|
|
|
wifi@0,0 {
|
|
|
|
reg = <0x0000 0 0 0 0>;
|
|
|
|
ieee80211-freq-limit = <5000000 6000000>;
|
2023-11-25 21:35:04 +00:00
|
|
|
nvmem-cells = <&macaddr_config_e4a8 2>;
|
2021-04-02 21:50:02 +00:00
|
|
|
nvmem-cell-names = "mac-address";
|
2018-04-19 17:34:22 +00:00
|
|
|
|
|
|
|
led {
|
|
|
|
led-sources = <2>;
|
|
|
|
led-active-low;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
ðernet {
|
|
|
|
pinctrl-names = "default";
|
|
|
|
pinctrl-0 = <&rgmii1_pins &mdio_pins>;
|
|
|
|
|
2020-05-14 13:41:31 +00:00
|
|
|
mediatek,portmap = "wllll";
|
|
|
|
|
2018-04-19 17:34:22 +00:00
|
|
|
port@4 {
|
|
|
|
status = "okay";
|
2018-10-29 20:50:13 +00:00
|
|
|
phy-handle = <&phy0>;
|
2018-04-19 17:34:22 +00:00
|
|
|
phy-mode = "rgmii";
|
|
|
|
};
|
|
|
|
|
|
|
|
mdio-bus {
|
|
|
|
status = "okay";
|
|
|
|
|
2018-10-29 20:50:13 +00:00
|
|
|
phy0: ethernet-phy@0 {
|
|
|
|
reg = <0>;
|
|
|
|
phy-mode = "rgmii-rxid";
|
2018-04-19 17:34:22 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
&gsw {
|
2021-03-31 20:09:37 +00:00
|
|
|
mediatek,port4-gmac;
|
2021-04-03 18:42:51 +00:00
|
|
|
mediatek,ephy-base = /bits/ 8 <2>;
|
2018-04-19 17:34:22 +00:00
|
|
|
};
|