ramips: mt7620a: convert to nvmem-layout
[openwrt/staging/hauke.git] / target / linux / ramips / dts / mt7620a_youku_yk-l1.dtsi
1 #include "mt7620a.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 aliases {
8 led-boot = &led_power;
9 led-failsafe = &led_power;
10 led-running = &led_power;
11 led-upgrade = &led_power;
12 label-mac-device = &ethernet;
13 };
14
15 leds {
16 compatible = "gpio-leds";
17
18 led_wlan: wlan {
19 label = "blue:wlan";
20 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
21 linux,default-trigger = "phy0tpt";
22 };
23
24 usb {
25 label = "blue:usb";
26 gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
27 trigger-sources = <&ohci_port1>, <&ehci_port1>;
28 linux,default-trigger = "usbport";
29 };
30
31 led_power: power {
32 label = "blue:power";
33 gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
34 };
35 };
36
37 keys {
38 compatible = "gpio-keys";
39
40 reset {
41 label = "reset";
42 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
43 linux,code = <KEY_RESTART>;
44 };
45 };
46 };
47
48 &gpio1 {
49 status = "okay";
50 };
51
52 &gpio3 {
53 status = "okay";
54 };
55
56 &spi0 {
57 status = "okay";
58
59 flash0: flash@0 {
60 compatible = "jedec,spi-nor";
61 reg = <0>;
62 spi-max-frequency = <80000000>;
63 m25p,fast-read;
64
65 partitions {
66 compatible = "fixed-partitions";
67 #address-cells = <1>;
68 #size-cells = <1>;
69
70 partition@0 {
71 label = "u-boot";
72 reg = <0x0 0x30000>;
73 read-only;
74 };
75
76 partition@30000 {
77 label = "u-boot-env";
78 reg = <0x30000 0x10000>;
79 read-only;
80 };
81
82 factory: partition@40000 {
83 label = "factory";
84 reg = <0x40000 0x10000>;
85 read-only;
86
87 nvmem-layout {
88 compatible = "fixed-layout";
89 #address-cells = <1>;
90 #size-cells = <1>;
91
92 eeprom_factory_0: eeprom@0 {
93 reg = <0x0 0x200>;
94 };
95
96 eeprom_factory_8000: eeprom@8000 {
97 reg = <0x8000 0x200>;
98 };
99
100 macaddr_factory_28: macaddr@28 {
101 reg = <0x28 0x6>;
102 };
103 };
104 };
105
106 firmware: partition@50000 {
107 compatible = "openwrt,uimage", "denx,uimage";
108 label = "firmware";
109 openwrt,ih-magic = <0x12291000>;
110 /* reg property is set based on flash size in DTS files */
111 };
112 };
113 };
114 };
115
116 &state_default {
117 default {
118 groups = "i2c", "rgmii1", "wled";
119 function = "gpio";
120 };
121 };
122
123 &ethernet {
124 pinctrl-names = "default";
125 pinctrl-0 = <&ephy_pins>;
126
127 nvmem-cells = <&macaddr_factory_28>;
128 nvmem-cell-names = "mac-address";
129
130 mediatek,portmap = "llllw";
131 };
132
133 &wmac {
134 nvmem-cells = <&eeprom_factory_0>;
135 nvmem-cell-names = "eeprom";
136 pinctrl-names = "default", "pa_gpio";
137 pinctrl-0 = <&pa_pins>;
138 pinctrl-1 = <&pa_gpio_pins>;
139 };
140
141 &sdhci {
142 status = "okay";
143 };
144
145 &ehci {
146 status = "okay";
147 };
148
149 &ohci {
150 status = "okay";
151 };