ath79: qca: convert to nvmem-layout
[openwrt/staging/wigyori.git] / target / linux / ath79 / dts / qca9531_glinet_gl-ar300m.dtsi
1 #include "qca953x.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 aliases {
8 led-boot = &led_status;
9 led-failsafe = &led_status;
10 led-running = &led_status;
11 led-upgrade = &led_status;
12 label-mac-device = &eth0;
13 };
14
15 keys {
16 compatible = "gpio-keys";
17
18 pinctrl-names = "default";
19 pinctrl-0 = <&jtag_disable_pins>;
20
21 reset {
22 label = "reset";
23 linux,code = <KEY_RESTART>;
24 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
25 };
26
27 right {
28 label = "button right";
29 linux,code = <BTN_0>;
30 gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
31 };
32
33 left {
34 label = "button left";
35 linux,code = <BTN_1>;
36 gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
37 };
38 };
39
40 gpio-export {
41 compatible = "gpio-export";
42
43 gpio_usb_power {
44 gpio-export,name = "usb_power";
45 gpio-export,output = <1>;
46 gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;
47 };
48 };
49
50 leds {
51 compatible = "gpio-leds";
52
53 // Colors for non-Lite versions
54
55 led_status: status {
56 label = "green:status";
57 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
58 };
59
60 lan {
61 label = "green:lan";
62 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
63 };
64
65 led_wlan: wlan {
66 label = "red:wlan";
67 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
68 linux,default-trigger = "phy0tpt";
69 };
70 };
71
72 i2c: i2c {
73 compatible = "i2c-gpio";
74
75 sda-gpios = <&gpio 17 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
76 scl-gpios = <&gpio 16 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
77 };
78 };
79
80 &pcie0 {
81 status = "okay";
82 };
83
84 &spi {
85 status = "okay";
86
87 flash@0 {
88 compatible = "jedec,spi-nor";
89 reg = <0>;
90 spi-max-frequency = <25000000>;
91
92 partitions {
93 compatible = "fixed-partitions";
94 #address-cells = <1>;
95 #size-cells = <1>;
96
97 partition@0 {
98 label = "u-boot";
99 reg = <0x000000 0x040000>;
100 read-only;
101 };
102
103 partition@40000 {
104 label = "u-boot-env";
105 reg = <0x040000 0x010000>;
106 };
107
108 nor_firmware: partition@50000 {
109 label = "nor_firmware";
110 reg = <0x050000 0xfa0000>;
111 };
112
113 art: partition@ff0000 {
114 label = "art";
115 reg = <0xff0000 0x010000>;
116 read-only;
117
118 nvmem-layout {
119 compatible = "fixed-layout";
120 #address-cells = <1>;
121 #size-cells = <1>;
122
123 macaddr_art_0: macaddr@0 {
124 reg = <0x0 0x6>;
125 };
126 };
127 };
128 };
129 };
130
131 nand_flash: flash@1 {
132 compatible = "spi-nand";
133 reg = <1>;
134 spi-max-frequency = <25000000>;
135
136 partitions {
137 compatible = "fixed-partitions";
138 #address-cells = <1>;
139 #size-cells = <1>;
140
141 nand_kernel: partition@0 {
142 label = "nand_kernel";
143 reg = <0x000000 0x400000>;
144 };
145
146 nand_ubi: partition@400000 {
147 label = "nand_ubi";
148 reg = <0x400000 0x7c00000>;
149 };
150 };
151 };
152 };
153
154 &usb0 {
155 status = "okay";
156 };
157
158 &usb_phy {
159 status = "okay";
160 };
161
162 &eth0 {
163 status = "okay";
164
165 phy-handle = <&swphy4>;
166
167 nvmem-cells = <&macaddr_art_0>;
168 nvmem-cell-names = "mac-address";
169 };
170
171 &eth1 {
172 nvmem-cells = <&macaddr_art_0>;
173 nvmem-cell-names = "mac-address";
174 mac-address-increment = <1>;
175 };
176
177 &wmac {
178 status = "okay";
179 mtd-cal-data = <&art 0x1000>;
180 };
181
182 &pinmux {
183 pinctrl-names = "default";
184 pinctrl-0 = <&enable_gpio17>;
185
186 enable_gpio17: pinmux_enable_gpio17 {
187 pinctrl-single,bits = <0x10 0x0000 0xff00>;
188 };
189 };