3489a972d4e74aedc75082a87889dc2b19eb50e8
[oweals/openwrt.git] / target / linux / ath79 / dts / ar9331_embeddedwireless_dorin.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include <dt-bindings/gpio/gpio.h>
5 #include <dt-bindings/input/input.h>
6
7 #include "ar9331.dtsi"
8
9 / {
10         model = "Embedded Wireless Dorin";
11         compatible = "embeddedwireless,dorin", "qca,ar9331";
12
13         aliases {
14                 led-boot = &led_status;
15                 led-failsafe = &led_status;
16                 led-running = &led_status;
17                 led-upgrade = &led_status;
18                 serial0 = &uart;
19         };
20
21         leds {
22                 compatible = "gpio-leds";
23
24                 led_status: status {
25                         label = "dorin:green:status";
26                         gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
27                 };
28         };
29
30         keys {
31                 compatible = "gpio-keys";
32
33                 wps {
34                         label = "wps";
35                         linux,code = <KEY_WPS_BUTTON>;
36                         gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
37                 };
38
39                 reset {
40                         label = "reset";
41                         linux,code = <KEY_RESTART>;
42                         gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
43                 };
44         };
45 };
46
47 &uart {
48         status = "okay";
49 };
50
51 &gpio {
52         status = "okay";
53 };
54
55 &usb {
56         dr_mode = "host";
57         status = "okay";
58 };
59
60 &usb_phy {
61         status = "okay";
62 };
63
64 &spi {
65         status = "okay";
66
67         num-chipselects = <1>;
68
69         flash@0 {
70                 compatible = "jedec,spi-nor";
71                 spi-max-frequency = <104000000>;
72                 reg = <0>;
73
74                 partitions {
75                         compatible = "fixed-partitions";
76                         #address-cells = <1>;
77                         #size-cells = <1>;
78
79                         partition@0 {
80                                 label = "u-boot";
81                                 reg = <0x000000 0x040000>;
82                                 read-only;
83                         };
84
85                         partition@1 {
86                                 label = "u-boot-env";
87                                 reg = <0x040000 0x010000>;
88                         };
89
90                         partition@2 {
91                                 compatible = "denx,uimage";
92                                 label = "firmware";
93                                 reg = <0x050000 0xfa0000>;
94                         };
95
96                         art: partition@3 {
97                                 label = "art";
98                                 reg = <0xff0000 0x010000>;
99                                 read-only;
100                         };
101                 };
102         };
103 };
104
105 &eth1 {
106         status = "okay";
107
108         mtd-mac-address = <&art 0x1002>;
109         mtd-mac-address-increment-byte = <3>;
110         mtd-mac-address-increment = <0x40>;
111 };
112
113 &mdio1 {
114         status = "okay";
115 };
116
117 &wmac {
118         status = "okay";
119
120         mtd-cal-data = <&art 0x1000>;
121 };