4e669dc07c9a82aea896241fc3918d0bdfa368e2
[openwrt/staging/wigyori.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 gpio-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 m25p,chunked-io = <32>;
67
68 partitions {
69 compatible = "fixed-partitions";
70 #address-cells = <1>;
71 #size-cells = <1>;
72
73 partition@0 {
74 label = "u-boot";
75 reg = <0x0 0x30000>;
76 read-only;
77 };
78
79 partition@30000 {
80 label = "u-boot-env";
81 reg = <0x30000 0x10000>;
82 read-only;
83 };
84
85 factory: partition@40000 {
86 label = "factory";
87 reg = <0x40000 0x10000>;
88 read-only;
89 };
90
91 partition@50000 {
92 label = "permanent_config";
93 reg = <0x50000 0x50000>;
94 read-only;
95 };
96
97 partition@a0000 {
98 compatible = "denx,uimage";
99 label = "firmware";
100 reg = <0xa0000 0xf60000>;
101 };
102 };
103 };
104 };
105
106 &pcie {
107 status = "okay";
108 };
109
110 &pcie0 {
111 mt76@0,0 {
112 reg = <0x0000 0 0 0 0>;
113 mediatek,mtd-eeprom = <&factory 0x0>;
114 };
115 };
116
117 &ethernet {
118 mtd-mac-address = <&factory 0xe006>;
119 };
120
121 &pinctrl {
122 state_default: pinctrl0 {
123 gpio {
124 ralink,group = "i2c", "jtag";
125 ralink,function = "gpio";
126 };
127 };
128 };