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