uboot-mvebu: backport patch for Turris Omnia to enable LTO
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar7240_netgear_wnr612-v2.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar7240.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
8 #include <dt-bindings/mtd/partitions/uimage.h>
9
10 / {
11 aliases {
12 led-boot = &led_power;
13 led-failsafe = &led_power;
14 led-running = &led_power;
15 led-upgrade = &led_power;
16 label-mac-device = &eth1;
17 };
18
19 ath9k-keys {
20 compatible = "gpio-keys-polled";
21 poll-interval = <20>;
22
23 reset {
24 label = "reset";
25 linux,code = <KEY_RESTART>;
26 gpios = <&ath9k 7 GPIO_ACTIVE_LOW>;
27 debounce-interval = <60>;
28 };
29 };
30
31 leds {
32 compatible = "gpio-leds";
33
34 pinctrl-names = "default";
35 pinctrl-0 = <&jtag_disable_pins &switch_led_disable_pins &clks_disable_pins>;
36
37 led_power: power {
38 function = LED_FUNCTION_POWER;
39 color = <LED_COLOR_ID_GREEN>;
40 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
41 };
42
43 lan1 {
44 label = "green:lan1";
45 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
46 };
47
48 lan2 {
49 label = "green:lan2";
50 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
51 };
52
53 wan {
54 function = LED_FUNCTION_WAN;
55 color = <LED_COLOR_ID_GREEN>;
56 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
57 };
58 };
59
60 ath9k-leds {
61 compatible = "gpio-leds";
62
63 wlan {
64 function = LED_FUNCTION_WLAN;
65 color = <LED_COLOR_ID_GREEN>;
66 gpios = <&ath9k 1 GPIO_ACTIVE_LOW>;
67 linux,default-trigger = "phy0tpt";
68 };
69 };
70 };
71
72 &spi {
73 status = "okay";
74
75 flash@0 {
76 compatible = "jedec,spi-nor";
77 reg = <0>;
78 spi-max-frequency = <25000000>;
79
80 partitions {
81 compatible = "fixed-partitions";
82 #address-cells = <1>;
83 #size-cells = <1>;
84
85 partition@0 {
86 reg = <0x0 0x40000>;
87 label = "u-boot";
88 read-only;
89 };
90
91 partition@40000 {
92 reg = <0x40000 0x10000>;
93 label = "u-boot-env";
94 };
95
96 partition@50000 {
97 compatible = "openwrt,uimage", "denx,uimage";
98 openwrt,ih-magic = <0x32303631>;
99 openwrt,ih-type = <IH_TYPE_FILESYSTEM>;
100 reg = <0x50000 0x3a0000>;
101 label = "firmware";
102 };
103
104 art: partition@3f0000 {
105 reg = <0x3f0000 0x10000>;
106 label = "art";
107 read-only;
108
109 nvmem-layout {
110 compatible = "fixed-layout";
111 #address-cells = <1>;
112 #size-cells = <1>;
113
114 macaddr_art_0: macaddr@0 {
115 compatible = "mac-base";
116 reg = <0x0 0x6>;
117 #nvmem-cell-cells = <1>;
118 };
119
120 macaddr_art_6: macaddr@6 {
121 reg = <0x6 0x6>;
122 };
123 };
124 };
125 };
126 };
127 };
128
129 &eth0 {
130 nvmem-cells = <&macaddr_art_0 0>;
131 nvmem-cell-names = "mac-address";
132 };
133
134 &eth1 {
135 status = "okay";
136
137 nvmem-cells = <&macaddr_art_6>;
138 nvmem-cell-names = "mac-address";
139 };
140
141 &pcie {
142 status = "okay";
143
144 ath9k: wifi@0,0 {
145 compatible = "pci168c,002b";
146 reg = <0x0000 0 0 0 0>;
147 nvmem-cells = <&macaddr_art_0 1>;
148 nvmem-cell-names = "mac-address";
149 qca,no-eeprom;
150 #gpio-cells = <2>;
151 gpio-controller;
152 };
153 };