ath79: fix I2C on GL-AR300M devices
[openwrt/staging/chunkeey.git] / target / linux / ath79 / dts / qca9531_glinet_gl-ar300m.dtsi
1 #include "qca953x.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 aliases {
8 led-boot = &led_status;
9 led-failsafe = &led_status;
10 led-running = &led_status;
11 led-upgrade = &led_status;
12 label-mac-device = &eth0;
13 };
14
15 keys {
16 compatible = "gpio-keys";
17
18 pinctrl-names = "default";
19 pinctrl-0 = <&jtag_disable_pins>;
20
21 reset {
22 label = "reset";
23 linux,code = <KEY_RESTART>;
24 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
25 };
26
27 right {
28 label = "button right";
29 linux,code = <BTN_0>;
30 gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
31 };
32
33 left {
34 label = "button left";
35 linux,code = <BTN_1>;
36 gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
37 };
38 };
39
40 reg_usb_vbus: reg_usb_vbus {
41 compatible = "regulator-fixed";
42
43 regulator-name = "usb_vbus";
44 regulator-min-microvolt = <5000000>;
45 regulator-max-microvolt = <5000000>;
46 gpio = <&gpio 2 GPIO_ACTIVE_HIGH>;
47 enable-active-high;
48 };
49
50 leds {
51 compatible = "gpio-leds";
52
53 // Colors for non-Lite versions
54
55 led_status: status {
56 label = "green:status";
57 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
58 };
59
60 lan {
61 label = "green:lan";
62 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
63 };
64
65 led_wlan: wlan {
66 label = "red:wlan";
67 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
68 linux,default-trigger = "phy0tpt";
69 };
70 };
71
72 i2c: i2c {
73 compatible = "i2c-gpio";
74
75 pinctrl-names = "default";
76 pinctrl-0 = <&enable_gpio17>;
77
78 sda-gpios = <&gpio 17 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
79 scl-gpios = <&gpio 16 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
80 };
81 };
82
83 &pcie0 {
84 status = "okay";
85 };
86
87 &spi {
88 status = "okay";
89
90 flash@0 {
91 compatible = "jedec,spi-nor";
92 reg = <0>;
93 spi-max-frequency = <25000000>;
94
95 partitions {
96 compatible = "fixed-partitions";
97 #address-cells = <1>;
98 #size-cells = <1>;
99
100 partition@0 {
101 label = "u-boot";
102 reg = <0x000000 0x040000>;
103 read-only;
104 };
105
106 partition@40000 {
107 label = "u-boot-env";
108 reg = <0x040000 0x010000>;
109 };
110
111 nor_firmware: partition@50000 {
112 label = "nor_firmware";
113 reg = <0x050000 0xfa0000>;
114 };
115
116 art: partition@ff0000 {
117 label = "art";
118 reg = <0xff0000 0x010000>;
119 read-only;
120 };
121 };
122 };
123
124 nand_flash: flash@1 {
125 compatible = "spi-nand";
126 reg = <1>;
127 spi-max-frequency = <25000000>;
128
129 partitions {
130 compatible = "fixed-partitions";
131 #address-cells = <1>;
132 #size-cells = <1>;
133
134 nand_kernel: partition@0 {
135 label = "nand_kernel";
136 reg = <0x000000 0x400000>;
137 };
138
139 nand_ubi: partition@400000 {
140 label = "nand_ubi";
141 reg = <0x400000 0x7c00000>;
142 };
143 };
144 };
145 };
146
147 &usb0 {
148 #address-cells = <1>;
149 #size-cells = <0>;
150 vbus-supply = <&reg_usb_vbus>;
151 status = "okay";
152 };
153
154 &usb_phy {
155 status = "okay";
156 };
157
158 &eth0 {
159 status = "okay";
160
161 phy-handle = <&swphy4>;
162
163 nvmem-cells = <&macaddr_art_0>;
164 nvmem-cell-names = "mac-address";
165 };
166
167 &eth1 {
168 nvmem-cells = <&macaddr_art_0>;
169 nvmem-cell-names = "mac-address";
170 mac-address-increment = <1>;
171 };
172
173 &wmac {
174 status = "okay";
175 mtd-cal-data = <&art 0x1000>;
176 };
177
178 &art {
179 compatible = "nvmem-cells";
180 #address-cells = <1>;
181 #size-cells = <1>;
182
183 macaddr_art_0: macaddr@0 {
184 reg = <0x0 0x6>;
185 };
186 };
187
188 &pinmux {
189 enable_gpio17: pinmux_enable_gpio17 {
190 pinctrl-single,bits = <0x10 0x0000 0xff00>;
191 };
192 };