ath79: TP-Link EAP245 v3: convert radios to nvmem-cells
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9558_mikrotik_routerboard-92x.dtsi
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 aliases {
10 led-boot = &led_user;
11 led-failsafe = &led_user;
12 led-upgrade = &led_user;
13 serial0 = &uart;
14 };
15
16 leds {
17 compatible = "gpio-leds";
18
19 led_user: user {
20 label = "green:user";
21 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
22 };
23 };
24
25 keys {
26 compatible = "gpio-keys";
27
28 reset {
29 label = "reset";
30 linux,code = <KEY_RESTART>;
31 gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
32 debounce-interval = <60>;
33 };
34 };
35
36 gpio-export {
37 compatible = "gpio-export";
38
39 gpio_nand_power {
40 gpio-export,name = "mikrotik:power:nand";
41 gpio-export,output = <0>;
42 gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
43 };
44 };
45
46 i2c: i2c {
47 compatible = "i2c-gpio";
48
49 sda-gpios = <&gpio 18 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
50 scl-gpios = <&gpio 19 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
51 i2c-gpio,delay-us = <5>;
52 i2c-gpio,timeout-ms = <1>;
53 };
54
55 sfp1: sfp {
56 compatible = "sff,sfp";
57
58 i2c-bus = <&i2c>;
59 maximum-power-milliwatt = <1000>;
60 los-gpios = <&gpio 21 GPIO_ACTIVE_HIGH>;
61 mod-def0-gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
62 tx-disable-gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
63 // Toggling GPIO16 actually enables/disables the transmitter,
64 // but the SFP driver does not seem to be using it.
65 };
66 };
67
68 &mdio0 {
69 status = "okay";
70
71 phy4: ethernet-phy@4 {
72 reg = <4>;
73 };
74 };
75
76 &eth0 {
77 status = "okay";
78
79 phy-handle = <&phy4>;
80 pll-data = <0x8f000000 0xa0000101 0xa0001313>;
81
82 gmac-config {
83 device = <&gmac>;
84 rgmii-enabled = <1>;
85 };
86 };
87
88 &mdio1 {
89 status = "okay";
90
91 phy_sfp: ethernet-phy@0 {
92 reg = <0>;
93 phy-mode = "sgmii";
94 sfp = <&sfp1>;
95 };
96 };
97
98 &eth1 {
99 status = "okay";
100
101 phy-handle = <&phy_sfp>;
102 pll-data = <0x03000000 0x00000101 0x00001616>;
103 qca955x-sgmii-fixup;
104
105 gmac-config {
106 device = <&gmac>;
107 };
108
109 fixed-link {
110 speed = <1000>;
111 full-duplex;
112 };
113 };
114
115 &spi {
116 status = "okay";
117
118 flash@0 {
119 compatible = "jedec,spi-nor";
120 reg = <0>;
121 spi-max-frequency = <25000000>;
122
123 partitions {
124 compatible = "mikrotik,routerboot-partitions";
125 #address-cells = <1>;
126 #size-cells = <1>;
127
128 partition@0 {
129 label = "routerboot";
130 reg = <0x0 0x0>;
131 read-only;
132 };
133
134 hard_config {
135 read-only;
136 };
137
138 bios {
139 size = <0x1000>;
140 read-only;
141 };
142
143 soft_config {
144 };
145 };
146 };
147 };
148
149 &nand {
150 status = "okay";
151
152 nand-ecc-mode = "soft";
153 qca,nand-swap-dma;
154 qca,nand-scan-fixup;
155
156 partitions {
157 compatible = "fixed-partitions";
158 #size-cells = <1>;
159
160 partition@0 {
161 label = "booter";
162 reg = <0x0000000 0x0040000>;
163 read-only;
164 };
165
166 partition@40000 {
167 label = "kernel";
168 reg = <0x0040000 0x03c0000>;
169 };
170
171 partition@400000 {
172 label = "ubi";
173 reg = <0x0400000 0x7c00000>;
174 };
175 };
176 };