ramips: add support for Sercomm CPJ routers
[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 compatible = "nvmem-cells";
93 label = "factory";
94 reg = <0x40000 0x10000>;
95 #address-cells = <1>;
96 #size-cells = <1>;
97 read-only;
98
99 eeprom_factory_0: eeprom@0 {
100 reg = <0x0 0x200>;
101 };
102
103 macaddr_factory_28: macaddr@28 {
104 reg = <0x28 0x6>;
105 };
106 };
107
108 partition@50000 {
109 compatible = "denx,uimage";
110 label = "firmware";
111 reg = <0x50000 0x7b0000>;
112 };
113 };
114 };
115 };
116
117 &state_default {
118 gpio {
119 groups = "uartf";
120 function = "gpio";
121 };
122 };
123
124 &ethernet {
125 nvmem-cells = <&macaddr_factory_28>;
126 nvmem-cell-names = "mac-address";
127 };
128
129 &esw {
130 mediatek,portmap = <0x2f>;
131 mediatek,led_polarity = <0x17>;
132 };
133
134 &wmac {
135 ralink,led-polarity = <1>;
136 nvmem-cells = <&eeprom_factory_0>;
137 nvmem-cell-names = "eeprom";
138 };