ramips: increase SPI frequency for Phicomm series devices
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_phicomm_k2p.dts
1 #include "mt7621.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "phicomm,k2p", "mediatek,mt7621-soc";
8 model = "Phicomm K2P";
9
10 aliases {
11 led-boot = &led_blue;
12 led-failsafe = &led_blue;
13 led-running = &led_blue;
14 led-upgrade = &led_blue;
15 };
16
17 leds {
18 compatible = "gpio-leds";
19
20 stat_r {
21 label = "red:status";
22 gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
23 };
24
25 stat_y {
26 label = "yellow:status";
27 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
28 };
29
30 led_blue: stat_b {
31 label = "blue:status";
32 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
33 };
34 };
35
36 keys {
37 compatible = "gpio-keys";
38
39 reset {
40 label = "reset";
41 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
42 linux,code = <KEY_RESTART>;
43 };
44 };
45 };
46
47 &spi0 {
48 status = "okay";
49
50 flash@0 {
51 compatible = "jedec,spi-nor";
52 reg = <0>;
53 spi-max-frequency = <80000000>;
54 m25p,fast-read;
55
56 partitions {
57 compatible = "fixed-partitions";
58 #address-cells = <1>;
59 #size-cells = <1>;
60
61 partition@0 {
62 label = "u-boot";
63 reg = <0x0 0x30000>;
64 read-only;
65 };
66
67 partition@30000 {
68 label = "u-boot-env";
69 reg = <0x30000 0x10000>;
70 read-only;
71 };
72
73 factory: partition@40000 {
74 label = "factory";
75 reg = <0x40000 0x10000>;
76 read-only;
77 };
78
79 partition@50000 {
80 label = "permanent_config";
81 reg = <0x50000 0x50000>;
82 read-only;
83 };
84
85 partition@a0000 {
86 compatible = "denx,uimage";
87 label = "firmware";
88 reg = <0xa0000 0xf60000>;
89 };
90 };
91 };
92 };
93
94 &pcie {
95 status = "okay";
96 };
97
98 &pcie0 {
99 mt76@0,0 {
100 reg = <0x0000 0 0 0 0>;
101 mediatek,mtd-eeprom = <&factory 0x0>;
102 };
103 };
104
105 &gmac0 {
106 mtd-mac-address = <&factory 0xe000>;
107 };
108
109 &switch0 {
110 ports {
111 port@0 {
112 status = "okay";
113 label = "lan1";
114 };
115
116 port@1 {
117 status = "okay";
118 label = "lan2";
119 };
120
121 port@2 {
122 status = "okay";
123 label = "lan3";
124 };
125
126 port@3 {
127 status = "okay";
128 label = "lan4";
129 };
130
131 port@4 {
132 status = "okay";
133 label = "wan";
134 mtd-mac-address = <&factory 0xe006>;
135 };
136 };
137 };
138
139 &state_default {
140 gpio {
141 groups = "i2c", "jtag";
142 function = "gpio";
143 };
144 };