09e42341946e872fdd013cde49280cf45bd442c7
[openwrt/staging/jow.git] / target / linux / ath79 / dts / ar9331_onion_omega.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar9331.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 model = "Onion Omega";
10 compatible = "onion,omega", "qca,ar9331";
11
12 aliases {
13 serial0 = &uart;
14 label-mac-device = &wmac;
15 led-boot = &led_system;
16 led-failsafe = &led_system;
17 led-running = &led_system;
18 led-upgrade = &led_system;
19 };
20
21 leds {
22 compatible = "gpio-leds";
23
24 led_system: system {
25 label = "amber:system";
26 gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
27 };
28 };
29
30 keys {
31 compatible = "gpio-keys";
32
33 reset {
34 label = "reset";
35 linux,code = <KEY_RESTART>;
36 gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
37 debounce-interval = <60>;
38 };
39 };
40
41 reg_usb_vbus: reg_usb_vbus {
42 compatible = "regulator-fixed";
43 regulator-name = "usb_vbus";
44 regulator-min-microvolt = <5000000>;
45 regulator-max-microvolt = <5000000>;
46 gpio = <&gpio 8 GPIO_ACTIVE_HIGH>;
47 enable-active-high;
48 };
49 };
50
51 &ref {
52 clock-frequency = <25000000>;
53 };
54
55 &usb {
56 status = "okay";
57
58 vbus-supply = <&reg_usb_vbus>;
59 dr_mode = "host";
60 };
61
62 &usb_phy {
63 status = "okay";
64 };
65
66 &eth0 {
67 status = "okay";
68
69 compatible = "syscon", "simple-mfd";
70 };
71
72 &eth1 {
73 status = "okay";
74
75 nvmem-cells = <&macaddr_uboot_1fc00>;
76 nvmem-cell-names = "mac-address";
77 mac-address-increment = <(-1)>;
78
79 gmac-config {
80 device = <&gmac>;
81 switch-phy-addr-swap = <4>;
82 switch-phy-swap = <4>;
83 };
84 };
85
86 &spi {
87 status = "okay";
88
89 flash@0 {
90 compatible = "jedec,spi-nor";
91 spi-max-frequency = <25000000>;
92 reg = <0>;
93
94 partitions {
95 compatible = "fixed-partitions";
96 #address-cells = <1>;
97 #size-cells = <1>;
98
99 uboot: partition@0 {
100 label = "u-boot";
101 reg = <0x000000 0x020000>;
102 read-only;
103 };
104
105 partition@20000 {
106 compatible = "tplink,firmware";
107 label = "firmware";
108 reg = <0x020000 0xfd0000>;
109 };
110
111 art: partition@ff0000 {
112 label = "art";
113 reg = <0xff0000 0x010000>;
114 read-only;
115 };
116 };
117 };
118 };
119
120 &wmac {
121 status = "okay";
122
123 mtd-cal-data = <&art 0x1000>;
124
125 nvmem-cells = <&macaddr_uboot_1fc00>;
126 nvmem-cell-names = "mac-address";
127 };
128
129 &uboot {
130 compatible = "nvmem-cells";
131 #address-cells = <1>;
132 #size-cells = <1>;
133
134 macaddr_uboot_1fc00: macaddr@1fc00 {
135 reg = <0x1fc00 0x6>;
136 };
137 };