ramips: fix Gigabit Ethernet port of the HiWiFi HC5861
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7620a_lenovo_newifi-y1.dtsi
1 #include "mt7620a.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "lenovo,newifi-y1", "ralink,mt7620a-soc";
8
9 chosen {
10 bootargs = "console=ttyS0,115200";
11 };
12
13 keys {
14 compatible = "gpio-keys";
15
16 reset {
17 label = "reset";
18 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
19 linux,code = <KEY_RESTART>;
20 };
21 };
22 };
23
24 &gpio2 {
25 status = "okay";
26 };
27
28 &gpio3 {
29 status = "okay";
30 };
31
32 &spi0 {
33 status = "okay";
34
35 flash@0 {
36 compatible = "jedec,spi-nor";
37 reg = <0>;
38 spi-max-frequency = <10000000>;
39
40 partitions {
41 compatible = "fixed-partitions";
42 #address-cells = <1>;
43 #size-cells = <1>;
44
45 partition@0 {
46 label = "u-boot";
47 reg = <0x0 0x30000>;
48 read-only;
49 };
50
51 partition@30000 {
52 label = "u-boot-env";
53 reg = <0x30000 0x10000>;
54 read-only;
55 };
56
57 factory: partition@40000 {
58 compatible = "nvmem-cells";
59 label = "factory";
60 reg = <0x40000 0x10000>;
61 #address-cells = <1>;
62 #size-cells = <1>;
63 read-only;
64
65 eeprom_factory_0: eeprom@0 {
66 reg = <0x0 0x200>;
67 };
68
69 eeprom_factory_8000: eeprom@8000 {
70 reg = <0x8000 0x200>;
71 };
72
73 macaddr_factory_28: macaddr@28 {
74 reg = <0x28 0x6>;
75 };
76 };
77
78 partition@50000 {
79 compatible = "denx,uimage";
80 label = "firmware";
81 reg = <0x50000 0xfb0000>;
82 };
83 };
84 };
85 };
86
87 &ehci {
88 status = "okay";
89 };
90
91 &ohci {
92 status = "okay";
93 };
94
95 &pcie {
96 status = "okay";
97 };
98
99 &pcie0 {
100 mt76@0,0 {
101 reg = <0x0000 0 0 0 0>;
102 nvmem-cells = <&eeprom_factory_8000>;
103 nvmem-cell-names = "eeprom";
104 ieee80211-freq-limit = <5000000 6000000>;
105 };
106 };
107
108 &wmac {
109 pinctrl-names = "default", "pa_gpio";
110 pinctrl-0 = <&pa_pins>;
111 pinctrl-1 = <&pa_gpio_pins>;
112 nvmem-cells = <&eeprom_factory_0>;
113 nvmem-cell-names = "eeprom";
114 };
115
116 &state_default {
117 gpio {
118 groups = "uartf", "wled", "nd_sd";
119 function = "gpio";
120 };
121 };