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