ramips: fix dtc warnings
[openwrt/openwrt.git] / target / linux / ramips / dts / 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-status = &led_blue;
14 };
15
16 memory@0 {
17 device_type = "memory";
18 reg = <0x0 0x8000000>;
19 };
20
21 chosen {
22 bootargs = "console=ttyS0,57600";
23 };
24
25 gpio-leds {
26 compatible = "gpio-leds";
27
28 stat_r {
29 label = "k2p:red:status";
30 gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
31 };
32
33 stat_y {
34 label = "k2p:yellow:status";
35 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
36 };
37
38 led_blue: stat_b {
39 label = "k2p:blue:status";
40 gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
41 };
42 };
43
44 gpio-keys-polled {
45 compatible = "gpio-keys-polled";
46 poll-interval = <20>;
47
48 reset {
49 label = "reset";
50 gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
51 linux,code = <KEY_RESTART>;
52 };
53 };
54 };
55
56 &spi0 {
57 status = "okay";
58
59 m25p80@0 {
60 #address-cells = <1>;
61 #size-cells = <1>;
62 compatible = "jedec,spi-nor";
63 reg = <0>;
64 spi-max-frequency = <10000000>;
65 m25p,chunked-io = <32>;
66
67 partition@0 {
68 label = "u-boot";
69 reg = <0x0 0x30000>;
70 read-only;
71 };
72
73 partition@30000 {
74 label = "u-boot-env";
75 reg = <0x30000 0x10000>;
76 read-only;
77 };
78
79 factory: partition@40000 {
80 label = "factory";
81 reg = <0x40000 0x10000>;
82 read-only;
83 };
84
85 partition@50000 {
86 label = "permanent_config";
87 reg = <0x50000 0x50000>;
88 read-only;
89 };
90
91 partition@a0000 {
92 label = "firmware";
93 reg = <0xa0000 0xf60000>;
94 };
95 };
96 };
97
98 &pcie {
99 status = "okay";
100 };
101
102 &pcie0 {
103 mt76@0,0 {
104 reg = <0x0000 0 0 0 0>;
105 mediatek,mtd-eeprom = <&factory 0x0>;
106 };
107 };
108
109 &ethernet {
110 mtd-mac-address = <&factory 0xe006>;
111 };
112
113 &pinctrl {
114 state_default: pinctrl0 {
115 gpio {
116 ralink,group = "i2c", "jtag";
117 ralink,function = "gpio";
118 };
119 };
120 };