ramips: fix flash layout for TP-Link TL-WR841N v14
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_phicomm_k2p.dts
1 /dts-v1/;
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "phicomm,k2p", "mediatek,mt7621-soc";
10 model = "Phicomm K2P";
11
12 aliases {
13 led-boot = &led_blue;
14 led-failsafe = &led_blue;
15 led-running = &led_blue;
16 led-upgrade = &led_blue;
17 };
18
19 leds {
20 compatible = "gpio-leds";
21
22 stat_r {
23 label = "k2p:red:status";
24 gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
25 };
26
27 stat_y {
28 label = "k2p:yellow:status";
29 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
30 };
31
32 led_blue: stat_b {
33 label = "k2p:blue:status";
34 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
35 };
36 };
37
38 keys {
39 compatible = "gpio-keys";
40
41 reset {
42 label = "reset";
43 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
44 linux,code = <KEY_RESTART>;
45 };
46 };
47 };
48
49 &spi0 {
50 status = "okay";
51
52 flash@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 = "u-boot";
64 reg = <0x0 0x30000>;
65 read-only;
66 };
67
68 partition@30000 {
69 label = "u-boot-env";
70 reg = <0x30000 0x10000>;
71 read-only;
72 };
73
74 factory: partition@40000 {
75 label = "factory";
76 reg = <0x40000 0x10000>;
77 read-only;
78 };
79
80 partition@50000 {
81 label = "permanent_config";
82 reg = <0x50000 0x50000>;
83 read-only;
84 };
85
86 partition@a0000 {
87 compatible = "denx,uimage";
88 label = "firmware";
89 reg = <0xa0000 0xf60000>;
90 };
91 };
92 };
93 };
94
95 &pcie {
96 status = "okay";
97 };
98
99 &pcie0 {
100 mt76@0,0 {
101 reg = <0x0000 0 0 0 0>;
102 mediatek,mtd-eeprom = <&factory 0x0>;
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 = "lan1";
115 };
116
117 port@1 {
118 status = "okay";
119 label = "lan2";
120 };
121
122 port@2 {
123 status = "okay";
124 label = "lan3";
125 };
126
127 port@3 {
128 status = "okay";
129 label = "lan4";
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", "jtag";
143 function = "gpio";
144 };
145 };