ath79: apply Engenius ECB1750 style to OpenMesh MR900 RGMII cfg
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar7242_ubnt_sw.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar7242.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "qca,ar7242";
10 model = "Ubiquiti Networks SW board";
11
12 chosen {
13 bootargs = "console=ttyS0,115200n8";
14 };
15
16 aliases {
17 led-boot = &led_usr;
18 led-failsafe = &led_usr;
19 led-running = &led_usr;
20 led-upgrade = &led_usr;
21 };
22
23 leds {
24 compatible = "gpio-leds";
25
26 led_usr: usr {
27 label = "yellow:usr";
28 gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
29 };
30 };
31
32 keys {
33 compatible = "gpio-keys";
34
35 reset {
36 linux,code = <KEY_RESTART>;
37 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
38 debounce-interval = <60>;
39 };
40 };
41
42 gpio_spi {
43 compatible = "spi-gpio";
44 #address-cells = <0x1>;
45 ranges;
46
47 sck-gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
48 mosi-gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
49 cs-gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
50 num-chipselects = <1>;
51
52 gpio_hc595: gpio_spi@0 {
53 compatible = "fairchild,74hc595";
54 reg = <0>;
55 registers-number = <2>;
56 spi-max-frequency = <100000>;
57 enable-gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
58
59 gpio-controller;
60 #gpio-cells = <2>;
61
62 };
63 };
64 };
65
66 &spi {
67 status = "okay";
68
69 flash@0 {
70 compatible = "jedec,spi-nor";
71 reg = <0>;
72 spi-max-frequency = <25000000>;
73
74 partitions {
75 compatible = "fixed-partitions";
76 #address-cells = <1>;
77 #size-cells = <1>;
78
79 partition@0 {
80 reg = <0x000000 0x040000>;
81 label = "u-boot";
82 read-only;
83 };
84
85 partition@40000 {
86 reg = <0x040000 0x010000>;
87 label = "u-boot-env";
88 read-only;
89 };
90
91 partition@50000 {
92 compatible = "denx,uimage";
93 reg = <0x050000 0x760000>;
94 label = "firmware";
95 };
96
97 partition@7b0000 {
98 reg = <0x7b0000 0x040000>;
99 label = "cfg";
100 read-only;
101 };
102
103 art: partition@7f0000 {
104 reg = <0x7f0000 0x010000>;
105 label = "art";
106 read-only;
107 };
108 };
109 };
110 };
111
112 &usb_phy {
113 status = "okay";
114 };
115
116 &usb {
117 #address-cells = <1>;
118 #size-cells = <0>;
119 status = "okay";
120
121 hub_port: port@1 {
122 reg = <1>;
123 #trigger-source-cells = <0>;
124 };
125 };
126
127 &pcie {
128 status = "okay";
129 };
130
131 &uart {
132 status = "okay";
133 };
134
135 &eth1 {
136 status = "okay";
137
138 mtd-mac-address = <&art 0x6>;
139 };