ramips: rtxxxx: convert to nvmem-layout
[openwrt/staging/hauke.git] / target / linux / ramips / dts / rt5350_trendnet_tew-714tru.dts
1 #include "rt5350.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "trendnet,tew-714tru", "ralink,rt5350-soc";
8 model = "TRENDnet TEW714TRU";
9
10 leds {
11 compatible = "gpio-leds";
12
13 usb {
14 label = "red:usb";
15 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
16 trigger-sources = <&ohci_port1>, <&ehci_port1>;
17 linux,default-trigger = "usbport";
18 };
19
20 wifi {
21 label = "green:wifi";
22 gpios = <&gpio0 13 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 wps {
37 label = "wps";
38 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
39 linux,code = <KEY_WPS_BUTTON>;
40 };
41 };
42
43 gpio_export {
44 compatible = "gpio-export";
45 #size-cells = <0>;
46
47 repeater {
48 gpio-export,name = "repeater_switch";
49 gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
50 };
51
52 wisp {
53 gpio-export,name = "wisp_switch";
54 gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
55 };
56 };
57 };
58
59 &spi0 {
60 status = "okay";
61
62 flash@0 {
63 compatible = "jedec,spi-nor";
64 reg = <0>;
65 spi-max-frequency = <10000000>;
66
67 partitions {
68 compatible = "fixed-partitions";
69 #address-cells = <1>;
70 #size-cells = <1>;
71
72 partition@0 {
73 label = "u-boot";
74 reg = <0x0 0x30000>;
75 read-only;
76 };
77
78 partition@30000 {
79 label = "u-boot-env";
80 reg = <0x30000 0x10000>;
81 read-only;
82 };
83
84 factory: partition@40000 {
85 label = "factory";
86 reg = <0x40000 0x10000>;
87 read-only;
88
89 nvmem-layout {
90 compatible = "fixed-layout";
91 #address-cells = <1>;
92 #size-cells = <1>;
93
94 eeprom_factory_0: eeprom@0 {
95 reg = <0x0 0x200>;
96 };
97
98 macaddr_factory_4: macaddr@4 {
99 reg = <0x4 0x6>;
100 };
101 };
102 };
103
104 partition@50000 {
105 compatible = "denx,uimage";
106 label = "firmware";
107 reg = <0x50000 0x7b0000>;
108 };
109 };
110 };
111 };
112
113 &state_default {
114 gpio {
115 groups = "i2c", "jtag", "uartf";
116 function = "gpio";
117 };
118 };
119
120 &ethernet {
121 nvmem-cells = <&macaddr_factory_4>;
122 nvmem-cell-names = "mac-address";
123 };
124
125 &esw {
126 mediatek,portmap = <0x1>;
127 mediatek,portdisable = <0x3e>;
128 };
129
130 &wmac {
131 nvmem-cells = <&eeprom_factory_0>;
132 nvmem-cell-names = "eeprom";
133 };