ath79: ar: convert to mac-base
[openwrt/staging/hauke.git] / target / linux / ath79 / dts / ar7240_tplink.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
8 / {
9 aliases {
10 led-boot = &led_system;
11 led-failsafe = &led_system;
12 led-running = &led_system;
13 led-upgrade = &led_system;
14 label-mac-device = &ath9k;
15 };
16
17 keys {
18 compatible = "gpio-keys";
19
20 reset {
21 label = "reset";
22 linux,code = <KEY_RESTART>;
23 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
24 debounce-interval = <60>;
25 };
26
27 wps {
28 label = "wps";
29 linux,code = <KEY_WPS_BUTTON>;
30 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
31 debounce-interval = <60>;
32 };
33 };
34
35 leds: leds {
36 compatible = "gpio-leds";
37
38 pinctrl-names = "default";
39 pinctrl-0 = <&pinmux_switch_led_pins>;
40
41 led_system: system {
42 label = "green:system";
43 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
44 };
45
46 qss {
47 label = "green:qss";
48 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
49 };
50 };
51
52 ath9k-leds {
53 compatible = "gpio-leds";
54
55 wlan {
56 label = "green:wlan";
57 gpios = <&ath9k 1 GPIO_ACTIVE_LOW>;
58 linux,default-trigger = "phy0tpt";
59 };
60 };
61 };
62
63 &spi {
64 status = "okay";
65
66 flash@0 {
67 compatible = "jedec,spi-nor";
68 reg = <0>;
69 spi-max-frequency = <25000000>;
70
71 partitions {
72 compatible = "fixed-partitions";
73 #address-cells = <1>;
74 #size-cells = <1>;
75
76 uboot: partition@0 {
77 reg = <0x0 0x20000>;
78 label = "u-boot";
79 read-only;
80
81 nvmem-layout {
82 compatible = "fixed-layout";
83 #address-cells = <1>;
84 #size-cells = <1>;
85
86 macaddr_uboot_1fc00: macaddr@1fc00 {
87 compatible = "mac-base";
88 reg = <0x1fc00 0x6>;
89 #nvmem-cell-cells = <1>;
90 };
91 };
92 };
93
94 partition@20000 {
95 compatible = "tplink,firmware";
96 reg = <0x20000 0x3d0000>;
97 label = "firmware";
98 };
99
100 art: partition@3f0000 {
101 reg = <0x3f0000 0x10000>;
102 label = "art";
103 read-only;
104 };
105 };
106 };
107 };
108
109 &eth1 {
110 status = "okay";
111 };
112
113 &pcie {
114 status = "okay";
115
116 ath9k: wifi@0,0 {
117 reg = <0x0000 0 0 0 0>;
118 qca,no-eeprom;
119 nvmem-cells = <&macaddr_uboot_1fc00 0>;
120 nvmem-cell-names = "mac-address";
121 #gpio-cells = <2>;
122 gpio-controller;
123 };
124 };
125
126 &pinmux {
127 pinmux_switch_led_pins: switch_led_pins {
128 pinctrl-single,bits = <0x0 0x0 0xf8>;
129 };
130 };