ramips: fix mtd partition node names for Phicomm PSG1208
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7628an_tplink_re200.dtsi
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 aliases {
10 label-mac-device = &ethernet;
11 led-boot = &led_power;
12 led-failsafe = &led_power;
13 led-running = &led_power;
14 led-upgrade = &led_power;
15 };
16
17 chosen {
18 bootargs = "console=ttyS0,57600n8";
19 };
20
21 keys {
22 compatible = "gpio-keys";
23
24 reset {
25 label = "reset";
26 gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
27 linux,code = <KEY_RESTART>;
28 };
29
30 wps {
31 label = "wps";
32 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
33 linux,code = <KEY_WPS_BUTTON>;
34 };
35 };
36
37 leds {
38 compatible = "gpio-leds";
39
40 wps {
41 label = "green:wps";
42 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
43 };
44
45 wifi {
46 label = "green:wifi";
47 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
48 };
49
50 lan {
51 label = "green:lan";
52 gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
53 };
54
55 led_power: power {
56 label = "green:power";
57 };
58
59 wifi2g_green {
60 label = "green:wifi2g";
61 gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
62 linux,default-trigger = "phy0tpt";
63 };
64
65 wifi5g_green {
66 label = "green:wifi5g";
67 gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
68 linux,default-trigger = "phy1tpt";
69 };
70 };
71 };
72
73 &spi0 {
74 status = "okay";
75
76 flash@0 {
77 compatible = "jedec,spi-nor";
78 reg = <0>;
79 spi-max-frequency = <50000000>;
80
81 partitions {
82 compatible = "fixed-partitions";
83 #address-cells = <1>;
84 #size-cells = <1>;
85
86 partition@0 {
87 label = "u-boot";
88 reg = <0x0 0x20000>;
89 read-only;
90 };
91
92 partition@20000 {
93 compatible = "tplink,firmware";
94 label = "firmware";
95 reg = <0x20000 0x7a0000>;
96 };
97
98 config: partition@7c0000 {
99 label = "config";
100 reg = <0x7c0000 0x30000>;
101 read-only;
102 };
103
104 radio: partition@7f0000 {
105 label = "radio";
106 reg = <0x7f0000 0x10000>;
107 read-only;
108 };
109 };
110 };
111 };
112
113 &state_default {
114 gpio {
115 groups = "p4led_an", "p3led_an", "p2led_an", "p1led_an",
116 "p0led_an", "wled_an", "i2c", "wdt", "refclk";
117 function = "gpio";
118 };
119 };
120
121 &ethernet {
122 nvmem-cells = <&macaddr_config_2008>;
123 nvmem-cell-names = "mac-address";
124 };
125
126 &wmac {
127 status = "okay";
128
129 mediatek,mtd-eeprom = <&radio 0x0>;
130
131 nvmem-cells = <&macaddr_config_2008>;
132 nvmem-cell-names = "mac-address";
133 mac-address-increment = <1>;
134 };
135
136 &pcie {
137 status = "okay";
138 };
139
140 &pcie0 {
141 mt76@0,0 {
142 reg = <0x0000 0 0 0 0>;
143 mediatek,mtd-eeprom = <&radio 0x8000>;
144 ieee80211-freq-limit = <5000000 6000000>;
145 nvmem-cells = <&macaddr_config_2008>;
146 nvmem-cell-names = "mac-address";
147 mac-address-increment = <2>;
148 };
149 };
150
151 &config {
152 compatible = "nvmem-cells";
153 #address-cells = <1>;
154 #size-cells = <1>;
155
156 macaddr_config_2008: macaddr@2008 {
157 reg = <0x2008 0x6>;
158 };
159 };