ramips: mt7621: add TP-Link EAP613 v1
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7628an_tplink_tl-wr840n-v5.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-wr840n-v5", "mediatek,mt7628an-soc";
8 model = "TP-Link TL-WR840N v5";
9
10 aliases {
11 led-boot = &led_power_green;
12 led-failsafe = &led_power_green;
13 led-running = &led_power_green;
14 led-upgrade = &led_power_green;
15 };
16
17 chosen {
18 bootargs = "console=ttyS0,115200";
19 };
20
21 keys {
22 compatible = "gpio-keys";
23
24 reset {
25 label = "reset";
26 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
27 linux,code = <KEY_RESTART>;
28 };
29 };
30
31 /* LED used is dual-color,dual lead LED */
32 leds {
33 compatible = "gpio-leds";
34
35 led_power_green: power {
36 label = "green:power";
37 gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
38 };
39
40 orange {
41 label = "orange:power";
42 gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
43 };
44 };
45 };
46
47 &spi0 {
48 status = "okay";
49
50 flash@0 {
51 compatible = "jedec,spi-nor";
52 reg = <0>;
53 spi-max-frequency = <10000000>;
54
55 partitions {
56 compatible = "fixed-partitions";
57 #address-cells = <1>;
58 #size-cells = <1>;
59
60 partition@0 {
61 label = "boot";
62 reg = <0x0 0x20000>;
63 read-only;
64 };
65
66 partition@20000 {
67 compatible = "tplink,firmware";
68 label = "firmware";
69 reg = <0x20000 0x3d0000>;
70 };
71
72 factory: partition@3f0000 {
73 label = "factory";
74 reg = <0x3f0000 0x10000>;
75 read-only;
76 };
77 };
78 };
79 };
80
81 &ehci {
82 status = "disabled";
83 };
84
85 &ohci {
86 status = "disabled";
87 };
88
89 &wmac {
90 status = "okay";
91
92 mediatek,mtd-eeprom = <&factory 0x0>;
93
94 nvmem-cells = <&macaddr_factory_f100>;
95 nvmem-cell-names = "mac-address";
96 };
97
98 &ethernet {
99 nvmem-cells = <&macaddr_factory_f100>;
100 nvmem-cell-names = "mac-address";
101 };
102
103 &esw {
104 mediatek,portmap = <0x3e>;
105 };
106
107 &state_default {
108 gpio {
109 groups = "p0led_an", "p2led_an", "perst";
110 function = "gpio";
111 };
112 };
113
114 &factory {
115 compatible = "nvmem-cells";
116 #address-cells = <1>;
117 #size-cells = <1>;
118
119 macaddr_factory_f100: macaddr@f100 {
120 reg = <0xf100 0x6>;
121 };
122 };