b6c8413c51e9fae3b7bc49dfe9867e5d7650923f
[openwrt/staging/mkresin.git] / target / linux / lantiq / files-4.14 / arch / mips / boot / dts / DGN1000B.dts
1 /dts-v1/;
2
3 #include "amazonse.dtsi"
4
5 #include <dt-bindings/input/input.h>
6
7 / {
8 compatible = "netgear,dgn1000b", "lantiq,xway", "lantiq,ase";
9 model = "Netgear DGN1000B";
10
11 chosen {
12 bootargs = "console=ttyLTQ0,115200";
13 };
14
15 aliases {
16 led-boot = &power;
17 led-failsafe = &power;
18 led-running = &power;
19 led-upgrade = &power;
20
21 led-dsl = &dsl;
22 led-internet = &online_green;
23 };
24
25 memory@0 {
26 device_type = "memory";
27 reg = <0x0 0x1000000>;
28 };
29
30 gpio-keys-polled {
31 compatible = "gpio-keys-polled";
32 #address-cells = <1>;
33 #size-cells = <0>;
34 poll-interval = <100>;
35
36 reset {
37 label = "reset";
38 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
39 linux,code = <KEY_RESTART>;
40 };
41 rfkill {
42 label = "rfkill";
43 gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
44 linux,code = <KEY_RFKILL>;
45 };
46 wps {
47 label = "wps";
48 gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
49 linux,code = <KEY_WPS_BUTTON>;
50 };
51 };
52
53 gpio-leds {
54 compatible = "gpio-leds";
55 dsl: dsl {
56 label = "dgn1000b:green:dsl";
57 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
58 default-state = "on";
59 };
60 online_green: online {
61 label = "dgn1000b:green:online";
62 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
63 default-state = "on";
64 };
65 online2 {
66 label = "dgn1000b:red:online";
67 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
68 default-state = "on";
69 };
70 wps {
71 label = "dgn1000b:green:wps";
72 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
73 default-state = "on";
74 };
75 power: power {
76 label = "dgn1000b:green:power";
77 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
78 default-state = "keep";
79 };
80 /*
81 power red is missing
82 */
83 };
84 };
85
86 &gpio {
87 pinctrl-names = "default";
88 pinctrl-0 = <&state_default>;
89
90 state_default: pinmux {
91 asc {
92 lantiq,groups = "asc";
93 lantiq,function = "asc";
94 };
95 keys_in {
96 lantiq,pins = "io0",/* "io25", */"io29";
97 lantiq,pull = <2>;
98 lantiq,open-drain = <1>;
99 };
100 };
101 pins_spi_default: pins_spi_default {
102 spi_in {
103 lantiq,groups = "spi_di";
104 lantiq,function = "spi";
105 };
106 spi_out {
107 lantiq,groups = "spi_do", "spi_clk",
108 "spi_cs1";
109 lantiq,function = "spi";
110 lantiq,output = <1>;
111 };
112 };
113 };
114
115 &gsw {
116 phy-mode = "mii";
117 mac-address = [ 00 11 22 33 44 55 ];
118 };
119
120 &spi {
121 status = "okay";
122 pinctrl-names = "default";
123 pinctrl-0 = <&pins_spi_default>;
124
125 m25p80@1 {
126 #address-cells = <1>;
127 #size-cells = <1>;
128 compatible = "jedec,spi-nor";
129 reg = <1>;
130 spi-max-frequency = <5000000>;
131
132 partitions {
133 compatible = "fixed-partitions";
134 #address-cells = <1>;
135 #size-cells = <1>;
136
137 partition@0 {
138 reg = <0x0 0x20000>;
139 label = "SPI (RO) U-Boot Image";
140 read-only;
141 };
142
143 partition@20000 {
144 reg = <0x20000 0x10000>;
145 label = "ENV_MAC";
146 read-only;
147 };
148
149 partition@30000 {
150 reg = <0x30000 0x10000>;
151 label = "DPF";
152 read-only;
153 };
154
155 partition@40000 {
156 reg = <0x40000 0x10000>;
157 label = "NVRAM";
158 read-only;
159 };
160
161 partition@500000 {
162 reg = <0x50000 0x003a0000>;
163 label = "kernel";
164 };
165 };
166 };
167 };
168
169 &usb_phy {
170 status = "okay";
171 };
172
173 &usb {
174 status = "okay";
175 };