2018-04-19 17:34:22 +00:00
|
|
|
#include "mt7620a.dtsi"
|
|
|
|
|
|
|
|
#include <dt-bindings/gpio/gpio.h>
|
|
|
|
#include <dt-bindings/input/input.h>
|
|
|
|
|
|
|
|
/ {
|
|
|
|
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 {
|
2020-09-27 17:40:51 +00:00
|
|
|
label = "green:wan";
|
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 {
|
2020-09-27 17:40:51 +00:00
|
|
|
label = "green:lan";
|
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 {
|
2020-09-27 17:40:51 +00:00
|
|
|
label = "green:usb";
|
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 {
|
2018-11-29 20:42:35 +00:00
|
|
|
compatible = "amit,jimage";
|
2018-04-19 17:34:22 +00:00
|
|
|
label = "firmware";
|
|
|
|
reg = <0x10000 0xfe0000>;
|
|
|
|
};
|
|
|
|
|
|
|
|
config: partition@ff0000 {
|
|
|
|
label = "config";
|
|
|
|
reg = <0xff0000 0x10000>;
|
|
|
|
read-only;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
&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>;
|
2021-04-02 21:50:02 +00:00
|
|
|
nvmem-cells = <&macaddr_config_e4a8>;
|
|
|
|
nvmem-cell-names = "mac-address";
|
2021-07-12 19:42:41 +00:00
|
|
|
mac-address-increment = <(2)>;
|
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
|
|
|
};
|
2021-04-02 21:50:02 +00:00
|
|
|
|
|
|
|
&config {
|
|
|
|
compatible = "nvmem-cells";
|
|
|
|
#address-cells = <1>;
|
|
|
|
#size-cells = <1>;
|
|
|
|
|
|
|
|
macaddr_config_e4a8: macaddr@e4a8 {
|
|
|
|
reg = <0xe4a8 0x6>;
|
|
|
|
};
|
|
|
|
};
|