ramips: mt7620a: convert to nvmem-layout
[openwrt/staging/hauke.git] / target / linux / ramips / dts / mt7620a_dovado_tiny-ac.dts
1 #include "mt7620a.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "dovado,tiny-ac", "ralink,mt7620a-soc";
8 model = "Dovado Tiny AC";
9
10 leds {
11 compatible = "gpio-leds";
12
13 usb {
14 label = "green:usb";
15 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
16 trigger-sources = <&ohci_port1>, <&ehci_port1>;
17 linux,default-trigger = "usbport";
18 };
19
20 wifi {
21 label = "orange:wifi";
22 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
23 };
24 };
25
26 keys {
27 compatible = "gpio-keys";
28
29 reset {
30 label = "reset";
31 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
32 linux,code = <KEY_RESTART>;
33 };
34 };
35
36 gpio_export {
37 compatible = "gpio-export";
38 #size-cells = <0>;
39
40 usbpower {
41 gpio-export,name = "usbpower";
42 gpio-export,output = <1>;
43 gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
44 };
45 };
46 };
47
48 &gpio2 {
49 status = "okay";
50 };
51
52 &gpio3 {
53 status = "okay";
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_8000: eeprom@8000 {
92 reg = <0x8000 0x200>;
93 };
94 };
95 };
96
97 partition@50000 {
98 compatible = "denx,uimage";
99 label = "firmware";
100 reg = <0x50000 0x7b0000>;
101 };
102 };
103 };
104 };
105
106 &ehci {
107 status = "okay";
108 };
109
110 &ohci {
111 status = "okay";
112 };
113
114 &ethernet {
115 pinctrl-names = "default";
116 pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
117
118 mediatek,portmap = "llllw";
119
120 port@4 {
121 status = "okay";
122 phy-mode = "rgmii";
123 phy-handle = <&phy4>;
124 };
125
126 port@5 {
127 status = "okay";
128 phy-mode = "rgmii";
129 phy-handle = <&phy5>;
130 };
131
132 mdio-bus {
133 status = "okay";
134
135 phy4: ethernet-phy@4 {
136 reg = <4>;
137 phy-mode = "rgmii";
138 };
139
140 phy5: ethernet-phy@5 {
141 reg = <5>;
142 phy-mode = "rgmii";
143 };
144 };
145 };
146
147 &gsw {
148 mediatek,port4-gmac;
149 mediatek,ephy-base = /bits/ 8 <8>;
150 };
151
152 &pcie {
153 status = "okay";
154 };
155
156 &state_default {
157 gpio {
158 groups = "uartf", "nd_sd", "wled";
159 function = "gpio";
160 };
161 };
162
163 &pcie0 {
164 mt76@0,0 {
165 reg = <0x0000 0 0 0 0>;
166 nvmem-cells = <&eeprom_factory_8000>;
167 nvmem-cell-names = "eeprom";
168 ieee80211-freq-limit = <5000000 6000000>;
169 };
170 };