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