c8d51b3f02ab7a24fd4e2e881390da2b3eac7141
[openwrt/staging/hauke.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 compatible = "nvmem-cells";
74 label = "factory";
75 reg = <0x40000 0x10000>;
76 #address-cells = <1>;
77 #size-cells = <1>;
78 read-only;
79
80 eeprom_factory_0: eeprom@0 {
81 reg = <0x0 0x200>;
82 };
83
84 macaddr_factory_28: macaddr@28 {
85 reg = <0x28 0x6>;
86 };
87 };
88
89 partition@50000 {
90 compatible = "denx,uimage";
91 label = "firmware";
92 reg = <0x50000 0xfb0000>;
93 };
94 };
95 };
96 };
97
98 &state_default {
99 gpio {
100 groups = "i2c", "jtag", "rgmii", "mdio", "uartf";
101 function = "gpio";
102 };
103 };
104
105 &ethernet {
106 nvmem-cells = <&macaddr_factory_28>;
107 nvmem-cell-names = "mac-address";
108 };
109
110 &esw {
111 mediatek,portmap = <0x3e>;
112 };
113
114 &wmac {
115 nvmem-cells = <&eeprom_factory_0>;
116 nvmem-cell-names = "eeprom";
117 };
118
119 &otg {
120 status = "okay";
121 };