ath79: Define firmware partition format to all boards where applicable
[oweals/openwrt.git] / target / linux / ath79 / dts / qca9558_openmesh_om5p-ac-v2.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 "qca9557.dtsi"
8
9 / {
10         compatible = "openmesh,om5p-ac-v2", "qca,qca9557";
11         model = "OpenMesh OM5P-AC V2";
12
13         extosc: ref {
14                 compatible = "fixed-clock";
15                 #clock-cells = <0>;
16                 clock-output-names = "ref";
17                 clock-frequency = <40000000>;
18         };
19
20         leds {
21                 compatible = "gpio-leds";
22
23                 power {
24                         label = "om5pac:blue:power";
25                         gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
26                         default-state = "off";
27                 };
28
29                 wifi_green {
30                         label = "om5pac:green:wifi";
31                         gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
32                         default-state = "off";
33                 };
34
35                 wifi_yellow {
36                         label = "om5pac:yellow:wifi";
37                         gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
38                         default-state = "off";
39                 };
40
41                 wifi_red {
42                         label = "om5pac:red:wifi";
43                         gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
44                         default-state = "off";
45                 };
46         };
47
48         keys {
49                 compatible = "gpio-keys-polled";
50                 poll-interval = <100>;
51
52                 button0 {
53                         label = "reset";
54                         linux,code = <KEY_RESTART>;
55                         gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
56                 };
57         };
58
59         gpio-export {
60                 compatible = "gpio-export";
61                 #size-cells = <0>;
62
63                 gpio_pa_dcdc {
64                         gpio-export,name = "om5pac:pa_dcdc";
65                         gpio-export,output = <1>;
66                         gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;
67                 };
68                 gpio_pa_high {
69                         gpio-export,name = "om5pac:pa_high";
70                         gpio-export,output = <1>;
71                         gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
72                 };
73         };
74 };
75
76 &pinmux {
77         pinmux_pa_dcdc_pins {
78                 pinctrl-single,bits = <0x0 0xff00 0x0>;
79         };
80
81         pinmux_pa_high_pins {
82                 pinctrl-single,bits = <0x10 0xff 0x0>;
83         };
84 };
85
86 &pcie0 {
87         status = "okay";
88 };
89
90 &uart {
91         status = "okay";
92 };
93
94 &pll {
95         clocks = <&extosc>;
96 };
97
98 &spi {
99         status = "okay";
100         num-cs = <1>;
101
102         flash@0 {
103                 compatible = "jedec,spi-nor";
104                 reg = <0>;
105                 spi-max-frequency = <25000000>;
106
107                 partitions {
108                         compatible = "fixed-partitions";
109                         #address-cells = <1>;
110                         #size-cells = <1>;
111
112                         partition@0 {
113                                 label = "u-boot";
114                                 reg = <0x000000 0x040000>;
115                                 read-only;
116                         };
117
118                         partition@1 {
119                                 label = "u-boot-env";
120                                 reg = <0x040000 0x010000>;
121                         };
122
123                         partition@2 {
124                                 compatible = "denx,uimage";
125                                 label = "firmware";
126                                 reg = <0x850000 0x7a0000>;
127                         };
128
129                         partition@3 {
130                                 label = "ART";
131                                 reg = <0xff0000 0x010000>;
132                                 read-only;
133                         };
134                 };
135         };
136 };
137
138 &mdio0 {
139         status = "okay";
140
141         phy4: ethernet-phy@4 {
142                 reg = <4>;
143                 phy-mode = "rgmii-id";
144         };
145 };
146
147 &mdio1 {
148         status = "okay";
149
150         phy1: ethernet-phy@1 {
151                 reg = <1>;
152                 phy-mode = "sgmii";
153         };
154 };
155
156 &eth0 {
157         status = "okay";
158
159         pll-data = <0x82000101 0x80000101 0x80001313>;
160
161         phy-handle = <&phy4>;
162         phy-mode = "rgmii";
163 };
164
165 &eth1 {
166         status = "okay";
167
168         pll-data = <0x03000101 0x80000101 0x80001313>;
169
170         phy-handle = <&phy1>;
171         phy-mode = "sgmii";
172 };