ramips: convert MT7628 EEPROM to NVMEM format
[openwrt/openwrt.git] / target / linux / ramips / dts / rt3052_belkin_f5d8235-v2.dts
1 #include "rt3050.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "belkin,f5d8235-v2", "ralink,rt3052-soc";
8 model = "Belkin F5D8235 v2";
9
10 aliases {
11 led-boot = &led_router;
12 led-failsafe = &led_router;
13 led-running = &led_router;
14 led-upgrade = &led_router;
15 };
16
17 flash@1f000000 {
18 compatible = "cfi-flash";
19 reg = <0x1f000000 0x800000>;
20 bank-width = <2>;
21 device-width = <2>;
22
23 partitions {
24 compatible = "fixed-partitions";
25 #address-cells = <1>;
26 #size-cells = <1>;
27
28 uboot: partition@0 {
29 compatible = "nvmem-cells";
30 label = "uboot";
31 reg = <0x0 0x50000>;
32 #address-cells = <1>;
33 #size-cells = <1>;
34 read-only;
35
36 eeprom_uboot_40000: eeprom@40000 {
37 reg = <0x40000 0x200>;
38 };
39
40 macaddr_uboot_40004: macaddr@40004 {
41 reg = <0x40004 0x6>;
42 };
43 };
44
45 partition@50000 {
46 compatible = "denx,uimage";
47 label = "firmware";
48 reg = <0x50000 0x790000>;
49 };
50
51 partition@7e0000 {
52 label = "nvram";
53 reg = <0x7e0000 0x10000>;
54 };
55
56 factory: partition@7f0000 {
57 label = "factory";
58 reg = <0x7f0000 0x10000>;
59 };
60 };
61 };
62
63 rtl8366rb {
64 compatible = "realtek,rtl8366rb";
65 gpio-sda = <&gpio0 1 GPIO_ACTIVE_HIGH>;
66 gpio-sck = <&gpio0 2 GPIO_ACTIVE_HIGH>;
67 };
68
69 leds {
70 compatible = "gpio-leds";
71
72 internet {
73 label = "blue:internet";
74 gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
75 };
76
77 internet2 {
78 label = "amber:internet";
79 gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
80 };
81
82 modem {
83 label = "blue:modem";
84 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
85 };
86
87 modem2 {
88 label = "amber:modem";
89 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
90 };
91
92 led_router: router {
93 label = "blue:router";
94 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
95 };
96
97 storage {
98 label = "blue:storage";
99 gpios = <&gpio0 23 GPIO_ACTIVE_LOW>;
100 trigger-sources = <&otg_port1>;
101 linux,default-trigger = "usbport";
102 };
103
104 storage2 {
105 label = "amber:storage";
106 gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
107 };
108
109 security {
110 label = "blue:security";
111 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
112 };
113
114 security2 {
115 label = "amber:security";
116 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
117 };
118 };
119 };
120
121 &state_default {
122 gpio {
123 groups = "spi", "i2c", "jtag", "mdio", "uartf";
124 function = "gpio";
125 };
126 };
127
128 &ethernet {
129 nvmem-cells = <&macaddr_uboot_40004>;
130 nvmem-cell-names = "mac-address";
131 pinctrl-names = "default";
132 pinctrl-0 = <&rgmii_pins>;
133 };
134
135 &esw {
136 ralink,rgmii = <1>;
137 mediatek,portmap = <0x3f>;
138 ralink,fct2 = <0x0002500c>;
139 /*
140 * ext phy base addr 31, rx/tx clock skew 0,
141 * turbo mii off, rgmi 3.3v off, port 5 polling off
142 * port5: enabled, gige, full-duplex, rx/tx-flow-control
143 * port6: enabled, gige, full-duplex, rx/tx-flow-control
144 */
145 ralink,fpa2 = <0x1f003fff>;
146 };
147
148 &wmac {
149 nvmem-cells = <&eeprom_uboot_40000>;
150 nvmem-cell-names = "eeprom";
151 };
152
153 &otg {
154 status = "okay";
155 };