ramips: unielec-u7621-01: Increase SPI frequency to 50MHz
[openwrt/openwrt.git] / target / linux / ramips / dts / rt5350_zyxel_keenetic-4g-b.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later
2
3 #include "rt5350.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "zyxel,keenetic-4g-b", "ralink,rt5350-soc";
10 model = "ZyXEL Keenetic 4G Rev.B";
11
12 aliases {
13 led-boot = &led_power;
14 led-failsafe = &led_power;
15 led-running = &led_power;
16 led-upgrade = &led_power;
17 };
18
19 leds {
20 compatible = "gpio-leds";
21
22 led_power: power {
23 label = "green:power";
24 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
25 };
26
27 usb {
28 label = "green:usb";
29 gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
30 };
31
32 reserved {
33 label = "green:reserved";
34 gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
35 };
36
37 internet {
38 label = "green:internet";
39 gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
40 };
41
42 wlan {
43 label = "green:wlan";
44 gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
45 };
46
47 };
48
49 keys {
50 compatible = "gpio-keys";
51
52 wps {
53 label = "wps";
54 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
55 linux,code = <KEY_WPS_BUTTON>;
56 };
57
58 reset {
59 label = "reset";
60 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
61 linux,code = <KEY_RESTART>;
62 };
63 };
64 };
65
66 &spi0 {
67 status = "okay";
68
69 flash@0 {
70 compatible = "jedec,spi-nor";
71 reg = <0>;
72 spi-max-frequency = <30000000>;
73
74 partitions {
75 compatible = "fixed-partitions";
76 #address-cells = <1>;
77 #size-cells = <1>;
78
79 partition@0 {
80 label = "u-boot";
81 reg = <0x0 0x30000>;
82 read-only;
83 };
84
85 partition@30000 {
86 label = "u-boot-env";
87 reg = <0x30000 0x10000>;
88 read-only;
89 };
90
91 factory: partition@40000 {
92 label = "factory";
93 reg = <0x40000 0x10000>;
94 read-only;
95
96 nvmem-layout {
97 compatible = "fixed-layout";
98 #address-cells = <1>;
99 #size-cells = <1>;
100
101 eeprom_factory_0: eeprom@0 {
102 reg = <0x0 0x200>;
103 };
104
105 macaddr_factory_28: macaddr@28 {
106 reg = <0x28 0x6>;
107 };
108 };
109 };
110
111 partition@50000 {
112 compatible = "denx,uimage";
113 label = "firmware";
114 reg = <0x50000 0x7b0000>;
115 };
116 };
117 };
118 };
119
120 &state_default {
121 gpio {
122 groups = "uartf";
123 function = "gpio";
124 };
125 };
126
127 &ethernet {
128 nvmem-cells = <&macaddr_factory_28>;
129 nvmem-cell-names = "mac-address";
130 };
131
132 &esw {
133 mediatek,portmap = <0x2f>;
134 mediatek,led_polarity = <0x17>;
135 };
136
137 &wmac {
138 ralink,led-polarity = <1>;
139 nvmem-cells = <&eeprom_factory_0>;
140 nvmem-cell-names = "eeprom";
141 };