mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-24 07:46:48 +00:00
372 lines
7.0 KiB
Plaintext
372 lines
7.0 KiB
Plaintext
|
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||
|
/dts-v1/;
|
||
|
|
||
|
#include <dt-bindings/gpio/gpio.h>
|
||
|
#include <dt-bindings/input/input.h>
|
||
|
#include <dt-bindings/leds/common.h>
|
||
|
|
||
|
#include "qca955x.dtsi"
|
||
|
|
||
|
/ {
|
||
|
chosen {
|
||
|
/*
|
||
|
* don't specify bootargs property in DeviceTree to
|
||
|
* enable a console with a default baudrate (9600)
|
||
|
* or passed console= parameter from the bootloader
|
||
|
*/
|
||
|
/delete-property/ bootargs;
|
||
|
stdout-path = &uart0;
|
||
|
};
|
||
|
|
||
|
aliases {
|
||
|
led-boot = &led_power_green;
|
||
|
led-failsafe = &led_power_red;
|
||
|
led-running = &led_power_green;
|
||
|
led-upgrade = &led_power_green;
|
||
|
label-mac-device = ð0;
|
||
|
};
|
||
|
|
||
|
i2c {
|
||
|
compatible = "i2c-gpio";
|
||
|
|
||
|
pinctrl-names = "default";
|
||
|
pinctrl-0 = <&pmx_gpio_i2c_pins>;
|
||
|
sda-gpios = <&gpio 20 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
|
||
|
scl-gpios = <&gpio 19 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
|
||
|
#address-cells = <1>;
|
||
|
#size-cells = <0>;
|
||
|
|
||
|
gpio1: gpio@20 {
|
||
|
compatible = "ti,tca6416";
|
||
|
reg = <0x20>;
|
||
|
reset-gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
|
||
|
gpio-controller;
|
||
|
#gpio-cells = <2>;
|
||
|
|
||
|
usb-hub-reset {
|
||
|
gpio-hog;
|
||
|
gpios = <0 GPIO_ACTIVE_HIGH>;
|
||
|
output-high;
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
|
||
|
keys {
|
||
|
compatible = "gpio-keys";
|
||
|
pinctrl-names = "default";
|
||
|
pinctrl-0 = <&jtag_disable_pins>;
|
||
|
|
||
|
button-wps {
|
||
|
label = "wps";
|
||
|
gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
|
||
|
linux,code = <KEY_WPS_BUTTON>;
|
||
|
debounce-interval = <60>;
|
||
|
};
|
||
|
|
||
|
button-eco {
|
||
|
label = "eco";
|
||
|
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
|
||
|
linux,code = <BTN_0>;
|
||
|
debounce-interval = <60>;
|
||
|
};
|
||
|
|
||
|
switch-bridge {
|
||
|
label = "br";
|
||
|
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
|
||
|
linux,code = <BTN_1>;
|
||
|
debounce-interval = <60>;
|
||
|
};
|
||
|
|
||
|
button-reset {
|
||
|
label = "reset";
|
||
|
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
|
||
|
linux,code = <KEY_RESTART>;
|
||
|
debounce-interval = <60>;
|
||
|
};
|
||
|
|
||
|
switch-converter {
|
||
|
label = "cnv";
|
||
|
gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
|
||
|
linux,code = <BTN_2>;
|
||
|
debounce-interval = <60>;
|
||
|
};
|
||
|
};
|
||
|
|
||
|
leds {
|
||
|
compatible = "gpio-leds";
|
||
|
|
||
|
led-0 {
|
||
|
gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
|
||
|
color = <LED_COLOR_ID_RED>;
|
||
|
function = "converter";
|
||
|
};
|
||
|
|
||
|
led-1 {
|
||
|
label = "green:converter";
|
||
|
gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
|
||
|
color = <LED_COLOR_ID_GREEN>;
|
||
|
function = "converter";
|
||
|
};
|
||
|
|
||
|
led-2 {
|
||
|
gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
|
||
|
color = <LED_COLOR_ID_RED>;
|
||
|
function = "tv";
|
||
|
};
|
||
|
|
||
|
led-3 {
|
||
|
gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
|
||
|
color = <LED_COLOR_ID_GREEN>;
|
||
|
function = "tv";
|
||
|
};
|
||
|
|
||
|
led-4 {
|
||
|
gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
|
||
|
color = <LED_COLOR_ID_RED>;
|
||
|
function = LED_FUNCTION_WLAN_5GHZ;
|
||
|
};
|
||
|
|
||
|
led-5 {
|
||
|
gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
|
||
|
color = <LED_COLOR_ID_GREEN>;
|
||
|
function = LED_FUNCTION_WLAN_5GHZ;
|
||
|
linux,default-trigger = "phy0tpt";
|
||
|
};
|
||
|
|
||
|
led-6 {
|
||
|
gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
|
||
|
color = <LED_COLOR_ID_RED>;
|
||
|
function = LED_FUNCTION_WLAN_2GHZ;
|
||
|
};
|
||
|
|
||
|
led-7 {
|
||
|
gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
|
||
|
color = <LED_COLOR_ID_GREEN>;
|
||
|
function = LED_FUNCTION_WLAN_2GHZ;
|
||
|
linux,default-trigger = "phy1tpt";
|
||
|
};
|
||
|
|
||
|
led-8 {
|
||
|
gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
|
||
|
color = <LED_COLOR_ID_RED>;
|
||
|
function = LED_FUNCTION_WAN_ONLINE;
|
||
|
};
|
||
|
|
||
|
led-9 {
|
||
|
gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
|
||
|
color = <LED_COLOR_ID_GREEN>;
|
||
|
function = LED_FUNCTION_WAN_ONLINE;
|
||
|
};
|
||
|
|
||
|
led_power_red: led-10 {
|
||
|
gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
|
||
|
color = <LED_COLOR_ID_RED>;
|
||
|
function = LED_FUNCTION_POWER;
|
||
|
};
|
||
|
|
||
|
led_power_green: led-11 {
|
||
|
gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
|
||
|
color = <LED_COLOR_ID_GREEN>;
|
||
|
function = LED_FUNCTION_POWER;
|
||
|
default-state = "on";
|
||
|
};
|
||
|
};
|
||
|
|
||
|
regulator {
|
||
|
compatible = "regulator-fixed";
|
||
|
regulator-name = "usb-vbus";
|
||
|
regulator-min-microvolt = <5000000>;
|
||
|
regulator-max-microvolt = <5000000>;
|
||
|
gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
|
||
|
enable-active-high;
|
||
|
regulator-always-on;
|
||
|
};
|
||
|
};
|
||
|
|
||
|
&spi {
|
||
|
status = "okay";
|
||
|
|
||
|
flash@0 {
|
||
|
compatible = "jedec,spi-nor";
|
||
|
reg = <0>;
|
||
|
spi-max-frequency = <25000000>;
|
||
|
|
||
|
partitions {
|
||
|
compatible = "fixed-partitions";
|
||
|
#address-cells = <1>;
|
||
|
#size-cells = <1>;
|
||
|
|
||
|
/*
|
||
|
* since the OEM bootloader requires unknown
|
||
|
* filesystem on firmware area, needs to be
|
||
|
* replaced to u-boot before OpenWrt installation
|
||
|
*/
|
||
|
partition@0 {
|
||
|
label = "bootloader";
|
||
|
reg = <0x000000 0x020000>;
|
||
|
};
|
||
|
|
||
|
/* not compatible with u-boot */
|
||
|
partition@20000 {
|
||
|
label = "config";
|
||
|
reg = <0x020000 0x010000>;
|
||
|
read-only;
|
||
|
|
||
|
nvmem-layout {
|
||
|
compatible = "fixed-layout";
|
||
|
#address-cells = <1>;
|
||
|
#size-cells = <1>;
|
||
|
|
||
|
macaddr_config_0: macaddr@0 {
|
||
|
reg = <0x0 0x6>;
|
||
|
};
|
||
|
|
||
|
macaddr_config_6: macaddr@6 {
|
||
|
reg = <0x6 0x6>;
|
||
|
};
|
||
|
|
||
|
macaddr_config_c: macaddr@c {
|
||
|
reg = <0xc 0x6>;
|
||
|
};
|
||
|
|
||
|
macaddr_config_12: macaddr@12 {
|
||
|
reg = <0x12 0x6>;
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
|
||
|
partition@30000 {
|
||
|
label = "art";
|
||
|
reg = <0x030000 0x010000>;
|
||
|
read-only;
|
||
|
|
||
|
nvmem-layout {
|
||
|
compatible = "fixed-layout";
|
||
|
#address-cells = <1>;
|
||
|
#size-cells = <1>;
|
||
|
|
||
|
cal_art_1000: calibration@1000 {
|
||
|
reg = <0x1000 0x440>;
|
||
|
};
|
||
|
|
||
|
cal_art_5000: calibration@5000 {
|
||
|
reg = <0x5000 0x844>;
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
|
||
|
partition@40000 {
|
||
|
compatible = "denx,uimage";
|
||
|
label = "firmware";
|
||
|
reg = <0x040000 0xfc0000>;
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
|
||
|
&mdio0 {
|
||
|
status = "okay";
|
||
|
|
||
|
phy0: ethernet-phy@0 {
|
||
|
reg = <0>;
|
||
|
|
||
|
qca,ar8327-initvals = <
|
||
|
0x04 0x00080080 /* PORT0_PAD_MODE_CTRL */
|
||
|
0x08 0x00000000 /* PORT5_PAD_MODE_CTRL */
|
||
|
0x0c 0x07600000 /* PORT6_PAD_MODE_CTRL */
|
||
|
0x10 0xa12613a0 /* POWER_ON_STRAP */
|
||
|
0x50 0xcc36cc36 /* LED_CTRL0 */
|
||
|
0x54 0xca36ca36 /* LED_CTRL1 */
|
||
|
0x58 0xc936c936 /* LED_CTRL2 */
|
||
|
0x5c 0x03ffff00 /* LED_CTRL3 */
|
||
|
0x7c 0x0000007e /* PORT0_STATUS */
|
||
|
0x94 0x0000007e /* PORT6_STATUS */
|
||
|
0xe0 0xc74164d0 /* SGMII_CONTROL */
|
||
|
>;
|
||
|
};
|
||
|
};
|
||
|
|
||
|
ð0 {
|
||
|
status = "okay";
|
||
|
|
||
|
nvmem-cells = <&macaddr_config_c>;
|
||
|
nvmem-cell-names = "mac-address";
|
||
|
phy-handle = <&phy0>;
|
||
|
qca955x-sgmii-fixup;
|
||
|
|
||
|
gmac-config {
|
||
|
device = <&gmac>;
|
||
|
|
||
|
rgmii-enabled = <1>;
|
||
|
rxdv-delay = <2>;
|
||
|
rxd-delay = <2>;
|
||
|
};
|
||
|
};
|
||
|
|
||
|
ð1 {
|
||
|
status = "okay";
|
||
|
|
||
|
nvmem-cells = <&macaddr_config_6>;
|
||
|
nvmem-cell-names = "mac-address";
|
||
|
pll-data = <0x03000000 0x00000101 0x00001616>;
|
||
|
|
||
|
fixed-link {
|
||
|
speed = <1000>;
|
||
|
full-duplex;
|
||
|
};
|
||
|
};
|
||
|
|
||
|
&gpio {
|
||
|
switch-reset {
|
||
|
gpio-hog;
|
||
|
gpios = <11 GPIO_ACTIVE_HIGH>;
|
||
|
output-high;
|
||
|
};
|
||
|
};
|
||
|
|
||
|
&pcie0 {
|
||
|
status = "okay";
|
||
|
|
||
|
wifi@0,0 {
|
||
|
compatible = "pci168c,003c";
|
||
|
reg = <0x0000 0 0 0 0>;
|
||
|
nvmem-cells = <&cal_art_5000>, <&macaddr_config_12>;
|
||
|
nvmem-cell-names = "calibration", "mac-address";
|
||
|
};
|
||
|
};
|
||
|
|
||
|
&pinmux {
|
||
|
/* mux GPIO19/20 as GPIO instead of native I2C on QCA9558 */
|
||
|
pmx_gpio_i2c_pins: gpio-i2c-pins {
|
||
|
pinctrl-single,bits = <0x10 0x0 0xff000000>,
|
||
|
<0x14 0x0 0xff>;
|
||
|
};
|
||
|
};
|
||
|
|
||
|
&usb_phy0 {
|
||
|
status = "okay";
|
||
|
};
|
||
|
|
||
|
&usb0 {
|
||
|
status = "okay";
|
||
|
#address-cells = <1>;
|
||
|
#size-cells = <0>;
|
||
|
|
||
|
dr_mode = "host";
|
||
|
|
||
|
/delete-node/ port@1;
|
||
|
|
||
|
/* NEC uPD720114 */
|
||
|
hub@1 {
|
||
|
compatible = "usb0409,005a";
|
||
|
reg = <1>;
|
||
|
};
|
||
|
};
|
||
|
|
||
|
&wmac {
|
||
|
status = "okay";
|
||
|
|
||
|
nvmem-cells = <&cal_art_1000>, <&macaddr_config_0>;
|
||
|
nvmem-cell-names = "calibration", "mac-address";
|
||
|
};
|