ramips: fix flash layout for TP-Link TL-WR841N v14
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_dlink_dir-8xx-a1.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 aliases {
10 label-mac-device = &gmac0;
11 };
12
13 keys {
14 compatible = "gpio-keys";
15
16 reset {
17 label = "reset";
18 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
19 linux,code = <KEY_RESTART>;
20 };
21
22 wps {
23 label = "wps";
24 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
25 linux,code = <KEY_WPS_BUTTON>;
26 };
27
28 wifi {
29 label = "wifi";
30 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
31 linux,code = <KEY_RFKILL>;
32 };
33 };
34 };
35
36 &spi0 {
37 status = "okay";
38
39 flash@0 {
40 compatible = "jedec,spi-nor";
41 reg = <0>;
42 spi-max-frequency = <50000000>;
43
44 partitions {
45 compatible = "fixed-partitions";
46 #address-cells = <1>;
47 #size-cells = <1>;
48
49 partition@0 {
50 label = "u-boot";
51 reg = <0x0 0x30000>;
52 read-only;
53 };
54
55 partition@30000 {
56 label = "u-boot-env";
57 reg = <0x30000 0x10000>;
58 read-only;
59 };
60
61 factory: partition@40000 {
62 label = "factory";
63 reg = <0x40000 0x20000>;
64 read-only;
65 };
66
67 partition@60000 {
68 compatible = "sge,uimage";
69 label = "firmware";
70 reg = <0x60000 0xfa0000>;
71 };
72 };
73 };
74 };
75
76 &pcie {
77 status = "okay";
78 };
79
80 &pcie0 {
81 wifi@0,0 {
82 compatible = "mediatek,mt76";
83 reg = <0x0000 0 0 0 0>;
84 mediatek,mtd-eeprom = <&factory 0x0000>;
85 ieee80211-freq-limit = <2400000 2500000>;
86
87 led {
88 led-active-low;
89 };
90 };
91 };
92
93 &pcie1 {
94 wifi@0,0 {
95 compatible = "mediatek,mt76";
96 reg = <0x0000 0 0 0 0>;
97 mediatek,mtd-eeprom = <&factory 0x8000>;
98 ieee80211-freq-limit = <5000000 6000000>;
99
100 led {
101 led-active-low;
102 };
103 };
104 };
105
106 &gmac0 {
107 mtd-mac-address = <&factory 0xe000>;
108 };
109
110 &switch0 {
111 ports {
112 port@0 {
113 status = "okay";
114 label = "lan4";
115 };
116
117 port@1 {
118 status = "okay";
119 label = "lan3";
120 };
121
122 port@2 {
123 status = "okay";
124 label = "lan2";
125 };
126
127 port@3 {
128 status = "okay";
129 label = "lan1";
130 };
131
132 port@4 {
133 status = "okay";
134 label = "wan";
135 mtd-mac-address = <&factory 0xe006>;
136 };
137 };
138 };
139
140 &state_default {
141 gpio {
142 groups = "i2c", "uart3", "jtag", "wdt";
143 function = "gpio";
144 };
145 };