a92798a9613ae6f2333f56024d9a34a33b719730
[openwrt/staging/jow.git] / target / linux / ramips / dts / rt5350_unbranded_a5-v11.dts
1 #include "rt5350.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5 #include <dt-bindings/leds/common.h>
6
7 / {
8 compatible = "unbranded,a5-v11", "ralink,rt5350-soc";
9 model = "Unbranded A5-V11";
10
11 aliases {
12 led-boot = &led_power;
13 led-failsafe = &led_power;
14 led-running = &led_power;
15 led-upgrade = &led_power;
16 label-mac-device = &ethernet;
17 };
18
19 leds {
20 compatible = "gpio-leds";
21
22 system {
23 label = "blue:system";
24 gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
25 };
26
27 led_power: power {
28 function = LED_FUNCTION_POWER;
29 color = <LED_COLOR_ID_RED>;
30 gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
31 };
32 };
33
34 keys {
35 compatible = "gpio-keys-polled";
36 poll-interval = <20>;
37
38 reset {
39 label = "reset";
40 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
41 linux,code = <KEY_RESTART>;
42 };
43 };
44
45 gpio_export {
46 compatible = "gpio-export";
47 #size-cells = <0>;
48
49 usb {
50 gpio-export,name = "usb";
51 gpio-export,output = <1>;
52 gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
53 };
54
55 root_hub {
56 gpio-export,name = "root_hub";
57 gpio-export,output = <1>;
58 gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
59 };
60 };
61 };
62
63 &spi0 {
64 status = "okay";
65
66 flash@0 {
67 compatible = "jedec,spi-nor";
68 reg = <0>;
69 spi-max-frequency = <10000000>;
70
71 partitions {
72 compatible = "fixed-partitions";
73 #address-cells = <1>;
74 #size-cells = <1>;
75
76 partition@0 {
77 label = "u-boot";
78 reg = <0x0 0x30000>;
79 read-only;
80 };
81
82 partition@30000 {
83 label = "u-boot-env";
84 reg = <0x30000 0x10000>;
85 read-only;
86 };
87
88 factory: partition@40000 {
89 label = "factory";
90 reg = <0x40000 0x10000>;
91 read-only;
92
93 nvmem-layout {
94 compatible = "fixed-layout";
95 #address-cells = <1>;
96 #size-cells = <1>;
97
98 eeprom_factory_0: eeprom@0 {
99 reg = <0x0 0x200>;
100 };
101
102 macaddr_factory_4: macaddr@4 {
103 reg = <0x4 0x6>;
104 };
105 };
106 };
107
108 partition@50000 {
109 compatible = "denx,uimage";
110 label = "firmware";
111 reg = <0x50000 0x3b0000>;
112 };
113 };
114 };
115 };
116
117 &state_default {
118 gpio {
119 groups = "i2c", "jtag", "uartf", "led";
120 function = "gpio";
121 };
122 };
123
124 &ethernet {
125 nvmem-cells = <&macaddr_factory_4>;
126 nvmem-cell-names = "mac-address";
127 };
128
129 &esw {
130 mediatek,portmap = <0x1>;
131 mediatek,portdisable = <0x3e>;
132 };
133
134 &wmac {
135 nvmem-cells = <&eeprom_factory_0>;
136 nvmem-cell-names = "eeprom";
137 };