ramips: TP-link archer A6/C6 device tree updates
[openwrt/openwrt.git] / target / linux / ramips / dts / rt3883_trendnet_tew-692gr.dts
1 #include "rt3883.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "trendnet,tew-692gr", "ralink,rt3883-soc";
8 model = "TRENDnet TEW-692GR";
9
10 aliases {
11 led-boot = &led_wps_green;
12 led-failsafe = &led_wps_green;
13 led-running = &led_wps_green;
14 led-upgrade = &led_wps_green;
15 };
16
17 flash@1c000000 {
18 compatible = "cfi-flash";
19 reg = <0x1c000000 0x800000>;
20 bank-width = <2>;
21
22 partitions {
23 compatible = "fixed-partitions";
24 #address-cells = <1>;
25 #size-cells = <1>;
26
27 partition@0 {
28 reg = <0x0 0x0030000>;
29 label = "u-boot";
30 read-only;
31 };
32
33 partition@30000 {
34 reg = <0x00030000 0x00010000>;
35 label = "u-boot-env";
36 read-only;
37 };
38
39 factory: partition@40000 {
40 compatible = "nvmem-cells";
41 label = "factory";
42 reg = <0x00040000 0x00010000>;
43 #address-cells = <1>;
44 #size-cells = <1>;
45 read-only;
46
47 eeprom_factory_0: eeprom@0 {
48 reg = <0x0 0x200>;
49 };
50
51 macaddr_factory_4: macaddr@4 {
52 reg = <0x4 0x6>;
53 };
54 };
55
56 partition@50000 {
57 compatible = "denx,uimage";
58 reg = <0x00050000 0x007b0000>;
59 label = "firmware";
60 };
61 };
62 };
63
64 keys {
65 compatible = "gpio-keys-polled";
66 poll-interval = <100>;
67
68 reset {
69 label = "reset";
70 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
71 linux,code = <KEY_RESTART>;
72 };
73
74 wps {
75 label = "wps";
76 gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
77 linux,code = <KEY_WPS_BUTTON>;
78 };
79 };
80
81 leds {
82 compatible = "gpio-leds";
83
84 wps {
85 label = "orange:wps";
86 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
87 };
88
89 led_wps_green: wps2 {
90 label = "green:wps";
91 gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
92 };
93 };
94 };
95
96 &gpio1 {
97 status = "okay";
98 };
99
100 &state_default {
101 gpio {
102 groups = "spi", "i2c", "jtag", "uartf";
103 function = "gpio";
104 };
105 };
106
107 &ethernet {
108 status = "okay";
109 nvmem-cells = <&macaddr_factory_4>;
110 nvmem-cell-names = "mac-address";
111
112 port@0 {
113 phy-handle = <&phy0>;
114 phy-mode = "rgmii";
115 };
116
117 mdio-bus {
118 status = "okay";
119
120 phy0: ethernet-phy@0 {
121 reg = <0>;
122 phy-mode = "rgmii";
123
124 qca,ar8327-initvals = <
125 0x04 0x07600000 /* PORT0 PAD MODE CTRL */
126 0x0c 0x07600000 /* PORT6 PAD MODE CTRL */
127 0x10 0x40000000 /* Power-on Strapping: 176-pin interface configuration */
128 0x50 0xc437c437 /* LED Control Register 0 */
129 0x54 0xc337c337 /* LED Control Register 1 */
130 0x58 0x00000000 /* LED Control Register 2 */
131 0x5c 0x03ffff00 /* LED Control Register 3 */
132 0x7c 0x0000007e /* PORT0_STATUS */
133 0x94 0x0000007e /* PORT6 STATUS */
134 >;
135 };
136 };
137 };
138
139 &pci {
140 status = "okay";
141 };
142
143 &pci1 {
144 status = "okay";
145
146 wifi@0,0 {
147 compatible = "pci0,0";
148 reg = < 0x10000 0 0 0 0 >;
149 ralink,2ghz = <0>;
150 };
151 };
152
153 &wmac {
154 ralink,5ghz = <0>;
155 nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_4>;
156 nvmem-cell-names = "eeprom", "mac-address";
157 mac-address-increment = <3>;
158 };