ramips: mt7620: move mt7620_mdio_mode() to ethernet driver
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7620a_lava_lr-25g001.dts
1 #include "mt7620a.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "lava,lr-25g001", "ralink,mt7620a-soc";
8 model = "LAVA LR-25G001";
9
10 aliases {
11 led-boot = &led_status;
12 led-failsafe = &led_status;
13 led-running = &led_status;
14 led-upgrade = &led_status;
15 };
16
17 keys {
18 compatible = "gpio-keys";
19
20 wps {
21 label = "wps";
22 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
23 linux,code = <KEY_WPS_BUTTON>;
24 };
25
26 reset {
27 label = "reset";
28 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
29 linux,code = <KEY_RESTART>;
30 };
31 };
32
33 leds {
34 compatible = "gpio-leds";
35
36 led_status: status {
37 label = "green:status";
38 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
39 };
40
41 wifi2g {
42 label = "green:wifi2g";
43 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
44 };
45
46 wifi5g {
47 label = "green:wifi5g";
48 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
49 };
50 };
51
52 gpio_export {
53 compatible = "gpio-export";
54 #size-cells = <0>;
55
56 usbpower {
57 gpio-export,name = "usbpower";
58 gpio-export,output = <1>;
59 gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
60 };
61 };
62 };
63
64 &spi0 {
65 status = "okay";
66
67 flash@0 {
68 compatible = "jedec,spi-nor";
69 reg = <0>;
70 spi-max-frequency = <10000000>;
71
72 partitions {
73 compatible = "fixed-partitions";
74 #address-cells = <1>;
75 #size-cells = <1>;
76
77 partition@0 {
78 label = "jboot";
79 reg = <0x0 0x10000>;
80 read-only;
81 };
82
83 partition@10000 {
84 compatible = "amit,jimage";
85 label = "firmware";
86 reg = <0x10000 0xfe0000>;
87 };
88
89 config: partition@ff0000 {
90 label = "config";
91 reg = <0xff0000 0x10000>;
92 read-only;
93 };
94 };
95 };
96 };
97
98 &ehci {
99 status = "okay";
100 };
101
102 &ohci {
103 status = "okay";
104 };
105
106 &ethernet {
107 pinctrl-names = "default";
108 pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
109
110 port@5 {
111 status = "okay";
112 phy-mode = "rgmii";
113 mediatek,fixed-link = <1000 1 1 1>;
114 };
115
116 mdio-bus {
117 status = "okay";
118
119 ethernet-phy@0 {
120 reg = <0>;
121 phy-mode = "rgmii";
122 qca,ar8327-initvals = <
123 0x04 0x87300000 /* PORT0 PAD MODE CTRL */
124 0x0c 0x00000000 /* PORT6 PAD MODE CTRL */
125 0x7c 0x0000007e /* PORT0_STATUS */
126 0x94 0x00000000 /* PORT6_STATUS */
127 >;
128 };
129 };
130 };
131
132 &gsw {
133 mediatek,ephy-base = /bits/ 8 <8>;
134 };
135
136 &pcie {
137 status = "okay";
138 };
139
140 &pcie0 {
141 mt76x0e@0,0 {
142 reg = <0x0000 0 0 0 0>;
143 mtd-mac-address = <&config 0xe07e>;
144 mtd-mac-address-increment = <(2)>;
145 mediatek,mtd-eeprom = <&config 0xe08a>;
146 };
147 };
148
149 &state_default {
150 gpio {
151 groups = "uartf", "i2c";
152 function = "gpio";
153 };
154 };