ath79: add support for D-Link DIR-859 A1
[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                 };
28         };
29
30         keys {
31                 compatible = "gpio-keys-polled";
32                 poll-interval = <100>;
33
34                 wps {
35                         label = "wps";
36                         linux,code = <KEY_WPS_BUTTON>;
37                         gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
38                 };
39
40                 reset {
41                         label = "reset";
42                         linux,code = <KEY_RESTART>;
43                         gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
44                 };
45         };
46 };
47
48 &uart {
49         status = "okay";
50 };
51
52 &gpio {
53         status = "okay";
54 };
55
56 &usb {
57         dr_mode = "host";
58         status = "okay";
59 };
60
61 &usb_phy {
62         status = "okay";
63 };
64
65 &spi {
66         num-chipselects = <1>;
67         status = "okay";
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         mtd-cal-data = <&art 0x1000>;
120         mtd-mac-address = <&art 0x1002>;
121 };