// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
-/dts-v1/;
+
+#include "qca956x.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
-
-#include "qca956x.dtsi"
+#include <dt-bindings/leds/common.h>
/ {
compatible = "tplink,archer-c7-v4", "qca,qca9563";
model = "TP-Link Archer C7 v4";
- chosen {
- bootargs = "console=ttyS0,115200n8";
- };
-
aliases {
- led-boot = &system;
- led-failsafe = &system;
- led-running = &system;
- led-upgrade = &system;
+ led-boot = &led_system;
+ led-failsafe = &led_system;
+ led-running = &led_system;
+ led-upgrade = &led_system;
+ label-mac-device = ð0;
};
led_spi {
#address-cells = <1>;
#size-cells = <0>;
- gpio-sck = <&gpio 15 GPIO_ACTIVE_HIGH>; // 74HC595 SRCLK (Serial Clock)
- gpio-mosi = <&gpio 14 GPIO_ACTIVE_HIGH>; // 74HC595 SER (Serial)
+ sck-gpios = <&gpio 15 GPIO_ACTIVE_HIGH>; // 74HC595 SRCLK (Serial Clock)
+ mosi-gpios = <&gpio 14 GPIO_ACTIVE_HIGH>; // 74HC595 SER (Serial)
cs-gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; // 74HC595 RCLK (Register Clock)
num-chipselects = <1>;
leds {
compatible = "gpio-leds";
- system: system {
- label = "tp-link:green:system";
+ led_system: system {
+ label = "green:system";
gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
default-state = "on";
};
usb1 {
- label = "tp-link:green:usb1";
- gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
+ label = "green:usb1";
+ gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
trigger-sources = <&hub_port1>;
linux,default-trigger = "usbport";
};
usb2 {
- label = "tp-link:green:usb2";
- gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
+ label = "green:usb2";
+ gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
trigger-sources = <&hub_port0>;
linux,default-trigger = "usbport";
};
wlan5g {
- label = "tp-link:green:wlan5g";
+ label = "green:wlan5g";
gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
wlan2g {
- label = "tp-link:green:wlan2g";
+ label = "green:wlan2g";
gpios = <&led_gpio 7 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1tpt";
};
wan {
- label = "tp-link:green:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&led_gpio 5 GPIO_ACTIVE_LOW>;
};
wan_fail {
- label = "tp-link:orange:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_ORANGE>;
gpios = <&led_gpio 6 GPIO_ACTIVE_LOW>;
};
lan1 {
- label = "tp-link:green:lan1";
+ label = "green:lan1";
gpios = <&led_gpio 4 GPIO_ACTIVE_LOW>;
};
lan2 {
- label = "tp-link:green:lan2";
+ label = "green:lan2";
gpios = <&led_gpio 3 GPIO_ACTIVE_LOW>;
};
lan3 {
- label = "tp-link:green:lan3";
+ label = "green:lan3";
gpios = <&led_gpio 2 GPIO_ACTIVE_LOW>;
};
lan4 {
- label = "tp-link:green:lan4";
+ label = "green:lan4";
gpios = <&led_gpio 1 GPIO_ACTIVE_LOW>;
};
wps {
- label = "tp-link:green:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&led_gpio 0 GPIO_ACTIVE_LOW>;
};
};
debounce-interval = <60>;
};
};
-
};
&pcie {
status = "okay";
-};
-
-&uart {
- status = "okay";
-};
-&gpio {
- status = "okay";
+ wifi@0,0 {
+ compatible = "qcom,ath10k";
+ reg = <0x0000 0 0 0 0>;
+ nvmem-cells = <&cal_art_5000>, <&macaddr_info_8 (-1)>;
+ nvmem-cell-names = "calibration", "mac-address";
+ };
};
&usb_phy0 {
};
&usb0 {
- #address-cells = <1>;
- #size-cells = <0>;
status = "okay";
-
- hub_port0: port@1 {
- reg = <1>;
- #trigger-source-cells = <0>;
- };
};
&usb_phy1 {
};
&usb1 {
- #address-cells = <1>;
- #size-cells = <0>;
status = "okay";
-
- hub_port1: port@1 {
- reg = <1>;
- #trigger-source-cells = <0>;
- };
};
&spi {
status = "okay";
- num-cs = <1>;
flash@0 {
compatible = "jedec,spi-nor";
};
info: partition@f00000 {
- label = "config";
+ label = "info";
reg = <0xf00000 0x0f0000>;
read-only;
+
+ nvmem-layout {
+ compatible = "fixed-layout";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ macaddr_info_8: macaddr@8 {
+ compatible = "mac-base";
+ reg = <0x8 0x6>;
+ #nvmem-cell-cells = <1>;
+ };
+ };
};
art: partition@ff0000 {
label = "art";
reg = <0xff0000 0x010000>;
read-only;
+
+ nvmem-layout {
+ compatible = "fixed-layout";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ cal_art_5000: calibration@5000 {
+ reg = <0x5000 0x844>;
+ };
+ };
};
};
};
&mdio0 {
status = "okay";
- phy-mask = <0>;
-
phy0: ethernet-phy@0 {
reg = <0>;
phy-mode = "sgmii";
+ qca,mib-poll-interval = <500>;
qca,ar8327-initvals = <
0x04 0x80080080 /* PORT0 PAD MODE CTRL */
pll-data = <0x03000101 0x00000101 0x00001919>;
phy-mode = "sgmii";
- mtd-mac-address = <&info 0x8>;
+ nvmem-cells = <&macaddr_info_8 0>;
+ nvmem-cell-names = "mac-address";
phy-handle = <&phy0>;
};
&wmac {
status = "okay";
+
mtd-cal-data = <&art 0x1000>;
- mtd-mac-address = <&info 0x8>;
+ nvmem-cells = <&macaddr_info_8 0>;
+ nvmem-cell-names = "mac-address";
};