ramips: mt7620n: convert to nvmem-layout
[openwrt/openwrt.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 compatible = "nvmem-cells";
84 label = "factory";
85 reg = <0x40000 0x10000>;
86 #address-cells = <1>;
87 #size-cells = <1>;
88 read-only;
89
90 eeprom_factory_0: eeprom@0 {
91 reg = <0x0 0x200>;
92 };
93
94 eeprom_factory_8000: eeprom@8000 {
95 reg = <0x8000 0x200>;
96 };
97
98 macaddr_factory_28: macaddr@28 {
99 reg = <0x28 0x6>;
100 };
101 };
102
103 firmware: partition@50000 {
104 compatible = "openwrt,uimage", "denx,uimage";
105 label = "firmware";
106 openwrt,ih-magic = <0x12291000>;
107 /* reg property is set based on flash size in DTS files */
108 };
109 };
110 };
111 };
112
113 &state_default {
114 default {
115 groups = "i2c", "rgmii1", "wled";
116 function = "gpio";
117 };
118 };
119
120 &ethernet {
121 pinctrl-names = "default";
122 pinctrl-0 = <&ephy_pins>;
123
124 nvmem-cells = <&macaddr_factory_28>;
125 nvmem-cell-names = "mac-address";
126
127 mediatek,portmap = "llllw";
128 };
129
130 &wmac {
131 nvmem-cells = <&eeprom_factory_0>;
132 nvmem-cell-names = "eeprom";
133 pinctrl-names = "default", "pa_gpio";
134 pinctrl-0 = <&pa_pins>;
135 pinctrl-1 = <&pa_gpio_pins>;
136 };
137
138 &sdhci {
139 status = "okay";
140 };
141
142 &ehci {
143 status = "okay";
144 };
145
146 &ohci {
147 status = "okay";
148 };