19e968bf948a38ccdb7ad62c08f99d707f65df34
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / mt7620n_comfast_cf-wr800n.dts
1 #include "mt7620n.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "comfast,cf-wr800n", "ralink,mt7620n-soc";
8 model = "Comfast CF-WR800N";
9
10 aliases {
11 led-boot = &led_wps;
12 led-failsafe = &led_wps;
13 led-running = &led_wps;
14 led-upgrade = &led_wps;
15 };
16
17 chosen {
18 bootargs = "console=ttyS0,115200";
19 };
20
21 leds {
22 compatible = "gpio-leds";
23
24 ethernet {
25 label = "white:ethernet";
26 gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
27 };
28
29 wifi {
30 label = "white:wifi";
31 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
32 };
33
34 led_wps: wps {
35 label = "white:wps";
36 gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
37 };
38 };
39
40 keys {
41 compatible = "gpio-keys";
42
43 reset {
44 label = "reset";
45 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
46 linux,code = <KEY_RESTART>;
47 };
48 };
49 };
50
51 &gpio1 {
52 status = "okay";
53 };
54
55 &gpio2 {
56 status = "okay";
57 };
58
59 &gpio3 {
60 status = "okay";
61 };
62
63 &spi0 {
64 status = "okay";
65
66 flash@0 {
67 compatible = "jedec,spi-nor";
68 reg = <0>;
69 spi-max-frequency = <10000000>;
70
71 partitions {
72 compatible = "fixed-partitions";
73 #address-cells = <1>;
74 #size-cells = <1>;
75
76 partition@0 {
77 label = "u-boot";
78 reg = <0x0 0x30000>;
79 read-only;
80 };
81
82 partition@30000 {
83 label = "u-boot-env";
84 reg = <0x30000 0x10000>;
85 read-only;
86 };
87
88 factory: partition@40000 {
89 label = "factory";
90 reg = <0x40000 0x10000>;
91 read-only;
92
93 nvmem-layout {
94 compatible = "fixed-layout";
95 #address-cells = <1>;
96 #size-cells = <1>;
97
98 eeprom_factory_0: eeprom@0 {
99 reg = <0x0 0x200>;
100 };
101
102 macaddr_factory_4: macaddr@4 {
103 reg = <0x4 0x6>;
104 };
105 };
106 };
107
108 partition@50000 {
109 compatible = "denx,uimage";
110 label = "firmware";
111 reg = <0x50000 0x7b0000>;
112 };
113 };
114 };
115 };
116
117 &ethernet {
118 nvmem-cells = <&macaddr_factory_4>;
119 nvmem-cell-names = "mac-address";
120 };
121
122 &wmac {
123 nvmem-cells = <&eeprom_factory_0>;
124 nvmem-cell-names = "eeprom";
125 };
126
127 &state_default {
128 default {
129 groups = "ephy", "wled", "spi refclk", "i2c";
130 function = "gpio";
131 };
132 };