ramips: add support for ZTE MF283+
[openwrt/openwrt.git] / target / linux / ramips / dts / rt3352_zte_mf283plus.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "rt3352.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "zte,mf283plus", "ralink,rt3352-soc";
10 model = "ZTE MF283+";
11
12 aliases {
13 led-boot = &led_wwan_green;
14 led-failsafe = &led_wwan_red;
15 led-upgrade = &led_wwan_red;
16 label-mac-device = &ethernet;
17 };
18
19 leds {
20 compatible = "gpio-leds";
21
22 led_wwan_blue: wwan_blue {
23 label = "blue:wwan";
24 gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
25 };
26
27 led_wwan_green: wwan_green {
28 label = "green:wwan";
29 gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
30 };
31
32 led_wwan_red: wwan_red {
33 label = "red:wwan";
34 gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
35 };
36
37 signal {
38 label = "blue:signal";
39 gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
40 };
41 };
42
43 keys {
44 compatible = "gpio-keys-polled";
45 poll-interval = <20>;
46
47 reset {
48 label = "reset";
49 gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
50 linux,code = <KEY_RESTART>;
51 };
52
53 wps {
54 label = "wps";
55 gpios = <&gpio0 19 GPIO_ACTIVE_LOW>;
56 linux,code = <KEY_WPS_BUTTON>;
57 };
58 };
59 };
60
61 &spi0 {
62 status = "okay";
63
64 flash@0 {
65 compatible = "jedec,spi-nor";
66 reg = <0>;
67 spi-max-frequency = <50000000>;
68 m25p,fast-read;
69
70 partitions {
71 compatible = "fixed-partitions";
72 #address-cells = <1>;
73 #size-cells = <1>;
74
75 partition@0 {
76 label = "u-boot";
77 reg = <0x0 0x60000>;
78 read-only;
79 };
80
81 partition@60000 {
82 label = "u-boot-env";
83 reg = <0x60000 0x10000>;
84 read-only;
85 };
86
87 factory: partition@70000 {
88 label = "factory";
89 reg = <0x70000 0x10000>;
90 read-only;
91 };
92
93 partition@80000 {
94 compatible = "denx,uimage";
95 label = "firmware";
96 reg = <0x80000 0xf80000>;
97 };
98 };
99 };
100 };
101
102 &state_default {
103 gpio {
104 groups = "i2c", "jtag", "rgmii", "mdio", "uartf";
105 function = "gpio";
106 };
107 };
108
109 &gpio1 {
110 status = "okay";
111 };
112
113 &ethernet {
114 mtd-mac-address = <&factory 0x28>;
115 };
116
117 &esw {
118 mediatek,portmap = <0x2f>;
119 };
120
121 &wmac {
122 ralink,mtd-eeprom = <&factory 0x0>;
123 };
124
125 &ehci {
126 status = "okay";
127 };
128
129 &ohci {
130 status = "okay";
131 };