ath79: qca: convert to nvmem-layout
[openwrt/staging/hauke.git] / target / linux / ath79 / dts / qca9558_ocedo_ursus.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,ursus", "qca,qca9558";
10 model = "OCEDO Ursus";
11
12 leds {
13 compatible = "gpio-leds";
14
15 wifi2 {
16 label = "green:wlan2g";
17 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
18 linux,default-trigger = "phy1tpt";
19 };
20
21 wifi5 {
22 label = "green:wlan5g";
23 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
24 linux,default-trigger = "phy0tpt";
25 };
26 };
27 };
28
29 &pcie1 {
30 status = "okay";
31 };
32
33 &spi {
34 status = "okay";
35
36 flash@0 {
37 compatible = "jedec,spi-nor";
38 reg = <0>;
39 spi-max-frequency = <50000000>;
40
41 partitions {
42 compatible = "fixed-partitions";
43 #address-cells = <1>;
44 #size-cells = <1>;
45
46 uboot: partition@0 {
47 label = "u-boot";
48 reg = <0x000000 0x040000>;
49 read-only;
50 };
51
52 partition@40000 {
53 label = "u-boot-env";
54 reg = <0x040000 0x010000>;
55 };
56
57 partition@50000 {
58 /* Dual-Flash layout combined */
59 compatible = "denx,uimage";
60 label = "firmware";
61 reg = <0x050000 0xe80000>;
62 };
63
64 partition@ed0000 {
65 label = "data";
66 reg = <0xed0000 0x110000>;
67 read-only;
68 };
69
70 partition@fe0000 {
71 label = "id";
72 reg = <0xfe0000 0x010000>;
73 read-only;
74 };
75
76 art: partition@ff0000 {
77 label = "art";
78 reg = <0xff0000 0x010000>;
79 read-only;
80
81 nvmem-layout {
82 compatible = "fixed-layout";
83 #address-cells = <1>;
84 #size-cells = <1>;
85
86 macaddr_art_0: macaddr@0 {
87 reg = <0x0 0x6>;
88 };
89
90 macaddr_art_6: macaddr@6 {
91 reg = <0x6 0x6>;
92 };
93
94 macaddr_art_12: macaddr@12 {
95 reg = <0x12 0x6>;
96 };
97 };
98 };
99 };
100 };
101 };
102
103 &wmac {
104 status = "okay";
105
106 mtd-cal-data = <&art 0x1000>;
107 nvmem-cells = <&macaddr_art_6>;
108 nvmem-cell-names = "mac-address";
109 };
110
111 &mdio0 {
112 status = "okay";
113
114 phy1: ethernet-phy@1 {
115 reg = <1>;
116 };
117
118 phy2: ethernet-phy@2 {
119 reg = <2>;
120 at803x-override-sgmii-link-check;
121 };
122 };
123
124 &eth0 {
125 status = "okay";
126 nvmem-cells = <&macaddr_art_0>;
127 nvmem-cell-names = "mac-address";
128
129 phy-mode = "rgmii-rxid";
130 phy-handle = <&phy1>;
131 pll-data = <0x8e000000 0x80000101 0x80001313>;
132
133 gmac_config: gmac-config {
134 device = <&gmac>;
135
136 rxdv-delay = <3>;
137 rxd-delay = <3>;
138 txen-delay = <0>;
139 txd-delay = <0>;
140 rgmii-enabled = <1>;
141 };
142 };
143
144 &eth1 {
145 status = "okay";
146 nvmem-cells = <&macaddr_art_12>;
147 nvmem-cell-names = "mac-address";
148 phy-handle = <&phy2>;
149 pll-data = <0x3000101 0x101 0x1313>;
150 qca955x-sgmii-fixup;
151 };