ramips: mt7628: move mtd-eeprom out of root DTSI
[openwrt/staging/mkresin.git] / target / linux / ramips / dts / mt7628an_tplink_tl-wr841n-v14.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
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-wr841n-v14", "mediatek,mt7628an-soc";
10 model = "TP-Link TL-WR841N v14";
11
12 aliases {
13 led-boot = &led_wlan;
14 led-failsafe = &led_wlan;
15 led-upgrade = &led_wlan;
16 };
17
18 chosen {
19 bootargs = "console=ttyS0,115200";
20 };
21
22 keys {
23 compatible = "gpio-keys";
24
25 reset {
26 label = "reset";
27 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
28 linux,code = <KEY_RESTART>;
29 };
30 };
31
32 leds {
33 compatible = "gpio-leds";
34
35 lan {
36 label = "green:lan";
37 gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
38 };
39
40 wan_green {
41 label = "green:wan";
42 gpios = <&gpio 40 GPIO_ACTIVE_LOW>;
43 };
44
45 led_wlan: wlan {
46 label = "green:wlan";
47 gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
48 linux,default-trigger = "phy0tpt";
49 };
50
51 wan_orange {
52 label = "orange:wan";
53 gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
54 };
55 };
56 };
57
58 &spi0 {
59 status = "okay";
60
61 flash@0 {
62 compatible = "jedec,spi-nor";
63 reg = <0>;
64 spi-max-frequency = <10000000>;
65
66 partitions {
67 compatible = "fixed-partitions";
68 #address-cells = <1>;
69 #size-cells = <1>;
70
71 partition@0 {
72 label = "boot";
73 reg = <0x0 0x10000>;
74 read-only;
75 };
76
77 partition@10000 {
78 compatible = "tplink,firmware";
79 label = "firmware";
80 reg = <0x10000 0x3e0000>;
81 };
82
83 factory: partition@3f0000 {
84 label = "factory";
85 reg = <0x3f0000 0x10000>;
86 read-only;
87 };
88 };
89 };
90 };
91
92 &ehci {
93 status = "disabled";
94 };
95
96 &ohci {
97 status = "disabled";
98 };
99
100 &wmac {
101 status = "okay";
102
103 mediatek,mtd-eeprom = <&factory 0x0>;
104
105 nvmem-cells = <&macaddr_factory_f100>;
106 nvmem-cell-names = "mac-address";
107 };
108
109 &ethernet {
110 nvmem-cells = <&macaddr_factory_f100>;
111 nvmem-cell-names = "mac-address";
112 };
113
114 &esw {
115 mediatek,portmap = <0x3e>;
116 };
117
118 &state_default {
119 gpio {
120 groups = "p4led_an", "p3led_an", "p2led_an", "p1led_an", "p0led_an", "wdt";
121 function = "gpio";
122 };
123 };
124
125 &gpio {
126 led_wlan_enable {
127 gpio-hog;
128 gpios = <43 GPIO_ACTIVE_HIGH>;
129 output-high;
130 };
131 };
132
133 &factory {
134 compatible = "nvmem-cells";
135 #address-cells = <1>;
136 #size-cells = <1>;
137
138 macaddr_factory_f100: macaddr@f100 {
139 reg = <0xf100 0x6>;
140 };
141 };