0332ec2656014fe3fb1e79f0e517183499144a70
[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-status = &status;
15                 serial0 = &uart;
16         };
17
18         leds {
19                 compatible = "gpio-leds";
20
21                 status: status {
22                         label = "dorin:green:status";
23                         gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
24                         default-state = "off";
25                 };
26         };
27
28         keys {
29                 compatible = "gpio-keys-polled";
30                 poll-interval = <100>;
31
32                 wps {
33                         label = "wps";
34                         linux,code = <KEY_WPS_BUTTON>;
35                         gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
36                 };
37
38                 reset {
39                         label = "reset";
40                         linux,code = <KEY_RESTART>;
41                         gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
42                 };
43         };
44 };
45
46 &uart {
47         status = "okay";
48 };
49
50 &gpio {
51         status = "okay";
52 };
53
54 &usb {
55         dr_mode = "host";
56         status = "okay";
57 };
58
59 &usb_phy {
60         status = "okay";
61 };
62
63 &spi {
64         num-chipselects = <1>;
65         status = "okay";
66
67         flash@0 {
68                 compatible = "jedec,spi-nor";
69                 spi-max-frequency = <104000000>;
70                 reg = <0>;
71
72                 partitions {
73                         compatible = "fixed-partitions";
74                         #address-cells = <1>;
75                         #size-cells = <1>;
76
77                         partition@0 {
78                                 label = "u-boot";
79                                 reg = <0x000000 0x040000>;
80                                 read-only;
81                         };
82
83                         partition@1 {
84                                 label = "u-boot-env";
85                                 reg = <0x040000 0x010000>;
86                         };
87
88                         partition@2 {
89                                 label = "firmware";
90                                 reg = <0x050000 0xfa0000>;
91                         };
92
93                         art: partition@3 {
94                                 label = "ART";
95                                 reg = <0xff0000 0x010000>;
96                                 read-only;
97                         };
98                 };
99         };
100 };
101
102 &eth1 {
103         status = "okay";
104
105         mtd-mac-address = <&art 0x1002>;
106         mtd-mac-address-increment = <0x40>;
107 };
108
109 &mdio1 {
110         status = "okay";
111 };
112
113 &wmac {
114         status = "okay";
115         mtd-cal-data = <&art 0x1000>;
116         mtd-mac-address = <&art 0x1002>;
117 };