1f6fa875f986fbc85b4169d7665fa54364e986d7
[openwrt/staging/noltari.git] / target / linux / ramips / dts / mt7628an_tplink_tl-mr3020-v3.dts
1 #include "mt7628an.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "tplink,tl-mr3020-v3", "mediatek,mt7628an-soc";
8 model = "TP-Link TL-MR3020 v3";
9
10 aliases {
11 led-boot = &led_power;
12 led-failsafe = &led_power;
13 led-running = &led_power;
14 led-upgrade = &led_power;
15 };
16
17 chosen {
18 bootargs = "console=ttyS0,115200";
19 };
20
21 keys {
22 compatible = "gpio-keys";
23
24 wps {
25 label = "wps";
26 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
27 linux,code = <KEY_WPS_BUTTON>;
28 };
29
30 modec1 {
31 label = "sw1";
32 gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
33 linux,code = <BTN_0>;
34 linux,input-type = <EV_SW>;
35 };
36
37 modec2 {
38 label = "sw2";
39 gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
40 linux,code = <BTN_1>;
41 linux,input-type = <EV_SW>;
42 };
43 };
44
45 leds {
46 compatible = "gpio-leds";
47
48 led_power: power {
49 label = "green:power";
50 gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
51 default-state = "on";
52 };
53
54 wan {
55 label = "green:3g";
56 gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
57 trigger-sources = <&ehci_port1>, <&ohci_port1>;
58 linux,default-trigger = "usbport";
59 };
60
61 wlan {
62 label = "green:wlan";
63 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
64 linux,default-trigger = "phy0tpt";
65 };
66
67 wps {
68 label = "green:wps";
69 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
70 };
71
72 lan {
73 label = "green:lan";
74 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
75 };
76 };
77 };
78
79 &spi0 {
80 status = "okay";
81
82 flash@0 {
83 compatible = "jedec,spi-nor";
84 reg = <0>;
85 spi-max-frequency = <50000000>;
86
87 partitions {
88 compatible = "fixed-partitions";
89 #address-cells = <1>;
90 #size-cells = <1>;
91
92 partition@0 {
93 label = "boot";
94 reg = <0x0 0x20000>;
95 read-only;
96 };
97
98 partition@20000 {
99 compatible = "tplink,firmware";
100 label = "firmware";
101 reg = <0x20000 0x7a0000>;
102 };
103
104 partition@7c0000 {
105 label = "config";
106 reg = <0x7c0000 0x10000>;
107 read-only;
108 };
109
110 factory: partition@7d0000 {
111 label = "factory";
112 reg = <0x7d0000 0x30000>;
113 read-only;
114 };
115 };
116 };
117 };
118
119 &state_default {
120 gpio {
121 groups = "i2s", "refclk", "wdt", "p2led_an", "p1led_an", "p0led_an", "wled_an";
122 function = "gpio";
123 };
124 };
125
126 &wmac {
127 status = "okay";
128
129 mediatek,mtd-eeprom = <&factory 0x20000>;
130
131 nvmem-cells = <&macaddr_factory_f100>;
132 nvmem-cell-names = "mac-address";
133 };
134
135 &ethernet {
136 nvmem-cells = <&macaddr_factory_f100>;
137 nvmem-cell-names = "mac-address";
138 };
139
140 &factory {
141 compatible = "nvmem-cells";
142 #address-cells = <1>;
143 #size-cells = <1>;
144
145 macaddr_factory_f100: macaddr@f100 {
146 reg = <0xf100 0x6>;
147 };
148 };