13333d7ca908c26be4c51f965d8f2f23a6c8502a
[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 = &status;
15                 led-failsafe = &status;
16                 led-running = &status;
17                 led-upgrade = &status;
18                 serial0 = &uart;
19         };
20
21         leds {
22                 compatible = "gpio-leds";
23
24                 status: status {
25                         label = "dorin:green:status";
26                         gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
27                         default-state = "off";
28                 };
29         };
30
31         keys {
32                 compatible = "gpio-keys-polled";
33                 poll-interval = <100>;
34
35                 wps {
36                         label = "wps";
37                         linux,code = <KEY_WPS_BUTTON>;
38                         gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
39                 };
40
41                 reset {
42                         label = "reset";
43                         linux,code = <KEY_RESTART>;
44                         gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
45                 };
46         };
47 };
48
49 &uart {
50         status = "okay";
51 };
52
53 &gpio {
54         status = "okay";
55 };
56
57 &usb {
58         dr_mode = "host";
59         status = "okay";
60 };
61
62 &usb_phy {
63         status = "okay";
64 };
65
66 &spi {
67         num-chipselects = <1>;
68         status = "okay";
69
70         flash@0 {
71                 compatible = "jedec,spi-nor";
72                 spi-max-frequency = <104000000>;
73                 reg = <0>;
74
75                 partitions {
76                         compatible = "fixed-partitions";
77                         #address-cells = <1>;
78                         #size-cells = <1>;
79
80                         partition@0 {
81                                 label = "u-boot";
82                                 reg = <0x000000 0x040000>;
83                                 read-only;
84                         };
85
86                         partition@1 {
87                                 label = "u-boot-env";
88                                 reg = <0x040000 0x010000>;
89                         };
90
91                         partition@2 {
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         mtd-cal-data = <&art 0x1000>;
120         mtd-mac-address = <&art 0x1002>;
121 };