ath79: qca: convert to nvmem-layout
[openwrt/staging/hauke.git] / target / linux / ath79 / dts / qca9558_ocedo_koala.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qca955x.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "ocedo,koala", "qca,qca9558";
10 model = "OCEDO Koala";
11
12 aliases {
13 led-boot = &led_system;
14 led-failsafe = &led_system;
15 led-running = &led_system;
16 led-upgrade = &led_system;
17 label-mac-device = &eth0;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 power {
24 label = "green:power";
25 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
26 default-state = "on";
27 };
28
29 wifi2 {
30 label = "yellow:wlan2";
31 gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
32 linux,default-trigger = "phy1tpt";
33 };
34
35 wifi5 {
36 label = "red:wlan58";
37 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
38 linux,default-trigger = "phy0tpt";
39 };
40
41 led_system: system {
42 label = "blue:sys";
43 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
44 };
45 };
46
47 keys {
48 compatible = "gpio-keys";
49
50 reset {
51 label = "reset";
52 linux,code = <KEY_RESTART>;
53 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
54 };
55 };
56 };
57
58 &pcie0 {
59 status = "okay";
60 };
61
62 &spi {
63 status = "okay";
64
65 flash@0 {
66 compatible = "jedec,spi-nor";
67 reg = <0>;
68 spi-max-frequency = <50000000>;
69
70 partitions {
71 compatible = "fixed-partitions";
72 #address-cells = <1>;
73 #size-cells = <1>;
74
75 uboot: partition@0 {
76 label = "u-boot";
77 reg = <0x000000 0x040000>;
78 read-only;
79 };
80
81 partition@40000 {
82 label = "u-boot-env";
83 reg = <0x040000 0x010000>;
84 };
85
86 partition@50000 {
87 /* Dual-Flash layout combined */
88 compatible = "denx,uimage";
89 label = "firmware";
90 reg = <0x050000 0xe80000>;
91 };
92
93 partition@ed0000 {
94 label = "data";
95 reg = <0xed0000 0x110000>;
96 read-only;
97 };
98
99 partition@fe0000 {
100 label = "id";
101 reg = <0xfe0000 0x010000>;
102 read-only;
103 };
104
105 art: partition@ff0000 {
106 label = "art";
107 reg = <0xff0000 0x010000>;
108 read-only;
109
110 nvmem-layout {
111 compatible = "fixed-layout";
112 #address-cells = <1>;
113 #size-cells = <1>;
114
115 macaddr_art_0: macaddr@0 {
116 reg = <0x0 0x6>;
117 };
118
119 macaddr_art_6: macaddr@6 {
120 reg = <0x6 0x6>;
121 };
122 };
123 };
124 };
125 };
126 };
127
128 &wmac {
129 status = "okay";
130
131 mtd-cal-data = <&art 0x1000>;
132 nvmem-cells = <&macaddr_art_6>;
133 nvmem-cell-names = "mac-address";
134 };
135
136 &mdio0 {
137 status = "okay";
138
139 phy5: ethernet-phy@5 {
140 reg = <5>;
141 eee-broken-100tx;
142 eee-broken-1000t;
143 };
144 };
145
146 &eth0 {
147 status = "okay";
148
149 nvmem-cells = <&macaddr_art_0>;
150 nvmem-cell-names = "mac-address";
151
152 phy-handle = <&phy5>;
153 phy-mode = "rgmii-rxid";
154
155 pll-data = <0x8e000000 0x80000101 0x80001313>;
156 };