ath79: update WA/XC devices UBNT_VERSION to 8.7.4
[openwrt/staging/wigyori.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 phy_sfp: ethernet-phy@0 {
90 reg = <0>;
91 phy-mode = "sgmii";
92 sfp = <&sfp1>;
93 };
94 };
95
96 &eth1 {
97 phy-handle = <&phy_sfp>;
98 pll-data = <0x03000000 0x00000101 0x00001616>;
99 qca955x-sgmii-fixup;
100
101 gmac-config {
102 device = <&gmac>;
103 };
104
105 fixed-link {
106 speed = <1000>;
107 full-duplex;
108 };
109 };
110
111 &spi {
112 status = "okay";
113
114 flash@0 {
115 compatible = "jedec,spi-nor";
116 reg = <0>;
117 spi-max-frequency = <25000000>;
118
119 partitions {
120 compatible = "mikrotik,routerboot-partitions";
121 #address-cells = <1>;
122 #size-cells = <1>;
123
124 partition@0 {
125 label = "routerboot";
126 reg = <0x0 0x0>;
127 read-only;
128 };
129
130 hard_config {
131 read-only;
132 };
133
134 bios {
135 size = <0x1000>;
136 read-only;
137 };
138
139 soft_config {
140 };
141 };
142 };
143 };
144
145 &nand {
146 status = "okay";
147
148 nand-ecc-mode = "soft";
149 nand-ecc-step-size = <2048>;
150 qca,nand-swap-dma;
151 qca,nand-scan-fixup;
152
153 partitions {
154 compatible = "fixed-partitions";
155 #address-cells = <1>;
156 #size-cells = <1>;
157
158 partition@0 {
159 label = "booter";
160 reg = <0x0000000 0x0040000>;
161 read-only;
162 };
163
164 partition@40000 {
165 label = "kernel";
166 reg = <0x0040000 0x03c0000>;
167 };
168
169 partition@400000 {
170 label = "ubi";
171 reg = <0x0400000 0x7c00000>;
172 };
173 };
174 };