ba73418a65c1a4745851e428c6d1a1d35ed6f2a8
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / TL-WR840NV5.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 memory@0 {
24 device_type = "memory";
25 reg = <0x0 0x4000000>;
26 };
27
28 keys {
29 compatible = "gpio-keys-polled";
30 poll-interval = <20>;
31
32 reset {
33 label = "reset";
34 gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
35 linux,code = <KEY_RESTART>;
36 };
37 };
38 /* LED used is dual-color,dual lead LED */
39 gpio-leds {
40 compatible = "gpio-leds";
41
42 led_power_green: power {
43 label = "tl-wr840n-v5:green:power";
44 gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
45 };
46
47 orange {
48 label = "tl-wr840n-v5:orange:power";
49 gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
50 };
51 };
52 };
53
54 &spi0 {
55 status = "okay";
56
57 m25p80@0 {
58 compatible = "jedec,spi-nor";
59 reg = <0>;
60 spi-max-frequency = <10000000>;
61 m25p,chunked-io = <32>;
62
63 partitions {
64 compatible = "fixed-partitions";
65 #address-cells = <1>;
66 #size-cells = <1>;
67
68 partition@0 {
69 label = "boot";
70 reg = <0x0 0x20000>;
71 read-only;
72 };
73
74 partition@20000 {
75 compatible = "tplink,firmware";
76 label = "firmware";
77 reg = <0x20000 0x3d0000>;
78 };
79
80 factory: partition@3f0000 {
81 label = "factory";
82 reg = <0x3f0000 0x10000>;
83 read-only;
84 };
85 };
86 };
87 };
88
89 &ehci {
90 status = "disabled";
91 };
92
93 &ohci {
94 status = "disabled";
95 };
96
97 &wmac {
98 status = "okay";
99 mtd-mac-address = <&factory 0xf100>;
100 mediatek,mtd-eeprom = <&factory 0x0>;
101 };
102
103 &ethernet {
104 mtd-mac-address = <&factory 0xf100>;
105 mediatek,portmap = "wllll";
106 };
107
108 &pinctrl {
109 state_default: pinctrl0 {
110 gpio {
111 ralink,group = "p0led_an", "p2led_an", "perst";
112 ralink,function = "gpio";
113 };
114 };
115 };