95faff03b44fe797bae30b15776bcd814bf59c95
[openwrt/openwrt.git] / target / linux / ramips / dts / rt3050_teltonika_rut5xx.dts
1 #include "rt3050.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "teltonika,rut5xx", "ralink,rt3050-soc";
8 model = "Teltonika RUT5XX";
9
10 aliases {
11 led-boot = &led_status;
12 led-failsafe = &led_status;
13 led-running = &led_status;
14 led-upgrade = &led_status;
15 };
16
17 leds {
18 compatible = "gpio-leds";
19
20 led_status: status {
21 label = "green:status";
22 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
23 };
24 };
25
26 keys {
27 compatible = "gpio-keys-polled";
28 poll-interval = <20>;
29
30 reset {
31 label = "reset";
32 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
33 linux,code = <KEY_RESTART>;
34 };
35 };
36
37 watchdog {
38 compatible = "linux,wdt-gpio";
39 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
40 hw_algo = "toggle";
41 /* hw_margin_ms is actually 280s but driver limits it to 60s */
42 hw_margin_ms = <60000>;
43 always-running;
44 };
45 };
46
47 &spi0 {
48 status = "okay";
49
50 flash@0 {
51 compatible = "jedec,spi-nor";
52 reg = <0>;
53 spi-max-frequency = <10000000>;
54
55 partitions {
56 compatible = "fixed-partitions";
57 #address-cells = <1>;
58 #size-cells = <1>;
59
60 partition@0 {
61 label = "u-boot";
62 reg = <0x0 0x30000>;
63 read-only;
64 };
65
66 partition@30000 {
67 label = "u-boot-env";
68 reg = <0x30000 0x10000>;
69 read-only;
70 };
71
72 factory: partition@40000 {
73 label = "factory";
74 reg = <0x40000 0x10000>;
75 read-only;
76
77 nvmem-layout {
78 compatible = "fixed-layout";
79 #address-cells = <1>;
80 #size-cells = <1>;
81
82 eeprom_factory_0: eeprom@0 {
83 reg = <0x0 0x200>;
84 };
85
86 macaddr_factory_28: macaddr@28 {
87 reg = <0x28 0x6>;
88 };
89 };
90 };
91
92 partition@50000 {
93 compatible = "denx,uimage";
94 label = "firmware";
95 reg = <0x50000 0xfb0000>;
96 };
97 };
98 };
99 };
100
101 &state_default {
102 gpio {
103 groups = "i2c", "jtag", "rgmii", "mdio", "uartf";
104 function = "gpio";
105 };
106 };
107
108 &ethernet {
109 nvmem-cells = <&macaddr_factory_28>;
110 nvmem-cell-names = "mac-address";
111 };
112
113 &esw {
114 mediatek,portmap = <0x3e>;
115 };
116
117 &wmac {
118 nvmem-cells = <&eeprom_factory_0>;
119 nvmem-cell-names = "eeprom";
120 };
121
122 &otg {
123 status = "okay";
124 };