24428ee96c702287a91e74e82f01f60bdce63a61
[openwrt/staging/hauke.git] / target / linux / ramips / dts / rt5350_poray_m3.dts
1 #include "rt5350.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "poray,m3", "ralink,rt5350-soc";
8 model = "Poray M3";
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 = "blue:status";
22 gpios = <&gpio0 9 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 mode {
37 label = "mode";
38 gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
39 linux,code = <BTN_0>;
40 linux,input-type = <EV_SW>;
41 };
42 };
43 };
44
45 &spi0 {
46 status = "okay";
47
48 flash@0 {
49 compatible = "jedec,spi-nor";
50 reg = <0>;
51 spi-max-frequency = <10000000>;
52
53 partitions {
54 compatible = "fixed-partitions";
55 #address-cells = <1>;
56 #size-cells = <1>;
57
58 partition@0 {
59 label = "u-boot";
60 reg = <0x0 0x30000>;
61 read-only;
62 };
63
64 partition@30000 {
65 label = "u-boot-env";
66 reg = <0x30000 0x10000>;
67 read-only;
68 };
69
70 factory: partition@40000 {
71 compatible = "nvmem-cells";
72 label = "factory";
73 reg = <0x40000 0x10000>;
74 #address-cells = <1>;
75 #size-cells = <1>;
76 read-only;
77
78 eeprom_factory_0: eeprom@0 {
79 reg = <0x0 0x200>;
80 };
81
82 macaddr_factory_4: macaddr@4 {
83 reg = <0x4 0x6>;
84 };
85 };
86
87 partition@50000 {
88 compatible = "denx,uimage";
89 label = "firmware";
90 reg = <0x50000 0x3b0000>;
91 };
92 };
93 };
94 };
95
96 &state_default {
97 gpio {
98 groups = "i2c", "jtag", "uartf";
99 function = "gpio";
100 };
101 };
102
103 &ethernet {
104 nvmem-cells = <&macaddr_factory_4>;
105 nvmem-cell-names = "mac-address";
106 };
107
108 &esw {
109 mediatek,portmap = <0x2f>;
110 mediatek,led_polarity = <1>;
111 };
112
113 &wmac {
114 ralink,led-polarity = <1>;
115 nvmem-cells = <&eeprom_factory_0>;
116 nvmem-cell-names = "eeprom";
117 };