|
|
@@ -0,0 +1,503 @@
|
|
|
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
|
|
+
|
|
|
+/dts-v1/;
|
|
|
+
|
|
|
+#include "ipq5018.dtsi"
|
|
|
+#include "ipq5018-ess.dtsi"
|
|
|
+
|
|
|
+#include <dt-bindings/gpio/gpio.h>
|
|
|
+#include <dt-bindings/input/input.h>
|
|
|
+#include <dt-bindings/leds/common.h>
|
|
|
+
|
|
|
+/ {
|
|
|
+ model = "ELECOM WRC-X3000GS2";
|
|
|
+ compatible = "elecom,wrc-x3000gs2", "qcom,ipq5018";
|
|
|
+
|
|
|
+ aliases {
|
|
|
+ serial0 = &blsp1_uart1;
|
|
|
+ led-boot = &led_power_green;
|
|
|
+ led-failsafe = &led_power_red;
|
|
|
+ led-running = &led_power_green;
|
|
|
+ led-upgrade = &led_power_green;
|
|
|
+ label-mac-device = <&dp1>;
|
|
|
+ };
|
|
|
+
|
|
|
+ chosen {
|
|
|
+ bootargs-append = " root=/dev/ubiblock0_1 coherent_pool=2M";
|
|
|
+ stdout-path = "serial0:115200n8";
|
|
|
+ };
|
|
|
+
|
|
|
+ keys {
|
|
|
+ compatible = "gpio-keys";
|
|
|
+ pinctrl-0 = <&button_pins>;
|
|
|
+ pinctrl-names = "default";
|
|
|
+
|
|
|
+ switch-router {
|
|
|
+ label = "router";
|
|
|
+ gpios = <&tlmm 14 GPIO_ACTIVE_HIGH>;
|
|
|
+ linux,code = <BTN_0>;
|
|
|
+ linux,input-type = <EV_SW>;
|
|
|
+ };
|
|
|
+
|
|
|
+ reset-button {
|
|
|
+ label = "reset";
|
|
|
+ gpios = <&tlmm 22 GPIO_ACTIVE_LOW>;
|
|
|
+ linux,code = <KEY_RESTART>;
|
|
|
+ };
|
|
|
+
|
|
|
+ wps-button {
|
|
|
+ label = "wps";
|
|
|
+ gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
|
|
|
+ linux,code = <KEY_WPS_BUTTON>;
|
|
|
+ };
|
|
|
+ };
|
|
|
+
|
|
|
+ leds {
|
|
|
+ compatible = "gpio-leds";
|
|
|
+ pinctrl-0 = <&led_pins>;
|
|
|
+ pinctrl-names = "default";
|
|
|
+
|
|
|
+ led-0 {
|
|
|
+ gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;
|
|
|
+ color = <LED_COLOR_ID_RED>;
|
|
|
+ function = LED_FUNCTION_WPS;
|
|
|
+ };
|
|
|
+
|
|
|
+ led_power_green: led-1 {
|
|
|
+ gpios = <&tlmm 13 GPIO_ACTIVE_HIGH>;
|
|
|
+ color = <LED_COLOR_ID_GREEN>;
|
|
|
+ function = LED_FUNCTION_POWER;
|
|
|
+ };
|
|
|
+
|
|
|
+ led_power_red: led-2 {
|
|
|
+ gpios = <&tlmm 16 GPIO_ACTIVE_HIGH>;
|
|
|
+ color = <LED_COLOR_ID_RED>;
|
|
|
+ function = LED_FUNCTION_POWER;
|
|
|
+ };
|
|
|
+
|
|
|
+ led-3 {
|
|
|
+ gpios = <&tlmm 24 GPIO_ACTIVE_HIGH>;
|
|
|
+ color = <LED_COLOR_ID_GREEN>;
|
|
|
+ function = LED_FUNCTION_WLAN_5GHZ;
|
|
|
+ linux,default-trigger = "phy1radio";
|
|
|
+ };
|
|
|
+
|
|
|
+ led-4 {
|
|
|
+ gpios = <&tlmm 25 GPIO_ACTIVE_HIGH>;
|
|
|
+ color = <LED_COLOR_ID_RED>;
|
|
|
+ function = LED_FUNCTION_WLAN_5GHZ;
|
|
|
+ };
|
|
|
+
|
|
|
+ led-5 {
|
|
|
+ gpios = <&tlmm 26 GPIO_ACTIVE_HIGH>;
|
|
|
+ color = <LED_COLOR_ID_GREEN>;
|
|
|
+ function = LED_FUNCTION_WLAN_2GHZ;
|
|
|
+ linux,default-trigger = "phy0radio";
|
|
|
+ };
|
|
|
+
|
|
|
+ led-6 {
|
|
|
+ gpios = <&tlmm 28 GPIO_ACTIVE_HIGH>;
|
|
|
+ color = <LED_COLOR_ID_RED>;
|
|
|
+ function = LED_FUNCTION_WLAN_2GHZ;
|
|
|
+ };
|
|
|
+
|
|
|
+ led-7 {
|
|
|
+ gpios = <&tlmm 46 GPIO_ACTIVE_HIGH>;
|
|
|
+ color = <LED_COLOR_ID_GREEN>;
|
|
|
+ function = LED_FUNCTION_WAN;
|
|
|
+ };
|
|
|
+ };
|
|
|
+
|
|
|
+ reserved-memory {
|
|
|
+ q6_mem_regions: q6_mem_regions@4b000000 {
|
|
|
+ no-map;
|
|
|
+ reg = <0x0 0x4b000000 0x0 0x3000000>;
|
|
|
+ status = "disabled";
|
|
|
+ };
|
|
|
+ };
|
|
|
+};
|
|
|
+
|
|
|
+&sleep_clk {
|
|
|
+ clock-frequency = <32000>;
|
|
|
+};
|
|
|
+
|
|
|
+&xo_board_clk {
|
|
|
+ clock-frequency = <24000000>;
|
|
|
+};
|
|
|
+
|
|
|
+&blsp1_uart1 {
|
|
|
+ status = "okay";
|
|
|
+
|
|
|
+ pinctrl-0 = <&serial_0_pins>;
|
|
|
+ pinctrl-names = "default";
|
|
|
+};
|
|
|
+
|
|
|
+&crypto {
|
|
|
+ status = "okay";
|
|
|
+};
|
|
|
+
|
|
|
+&cryptobam {
|
|
|
+ status = "okay";
|
|
|
+};
|
|
|
+
|
|
|
+&prng {
|
|
|
+ status = "okay";
|
|
|
+};
|
|
|
+
|
|
|
+&qfprom {
|
|
|
+ status = "okay";
|
|
|
+};
|
|
|
+
|
|
|
+&qpic_bam {
|
|
|
+ status = "okay";
|
|
|
+};
|
|
|
+
|
|
|
+&qpic_nand {
|
|
|
+ pinctrl-0 = <&qpic_pins>;
|
|
|
+ pinctrl-names = "default";
|
|
|
+ status = "okay";
|
|
|
+
|
|
|
+ flash@0 {
|
|
|
+ compatible = "spi-nand";
|
|
|
+ reg = <0>;
|
|
|
+ #address-cells = <1>;
|
|
|
+ #size-cells = <1>;
|
|
|
+
|
|
|
+ nand-ecc-engine = <&qpic_nand>;
|
|
|
+
|
|
|
+ /* strength=8 breaks NAND I/O, use 4 instead */
|
|
|
+ nand-ecc-strength = <4>;
|
|
|
+ nand-ecc-step-size = <512>;
|
|
|
+ nand-bus-width = <8>;
|
|
|
+
|
|
|
+ partitions {
|
|
|
+ compatible = "qcom,smem-part";
|
|
|
+
|
|
|
+ partition-0-appsblenv {
|
|
|
+ compatible = "fixed-partitions";
|
|
|
+ label = "0:appsblenv";
|
|
|
+ #address-cells = <1>;
|
|
|
+ #size-cells = <1>;
|
|
|
+
|
|
|
+ partition@0 {
|
|
|
+ label = "env-data";
|
|
|
+ reg = <0x0 0x40000>;
|
|
|
+
|
|
|
+ nvmem-layout {
|
|
|
+ compatible = "u-boot,env";
|
|
|
+
|
|
|
+ macaddr_appsblenv_ethaddr: ethaddr {
|
|
|
+ compatible = "mac-base";
|
|
|
+ #nvmem-cell-cells = <1>;
|
|
|
+ };
|
|
|
+ };
|
|
|
+ };
|
|
|
+ };
|
|
|
+ };
|
|
|
+ };
|
|
|
+};
|
|
|
+
|
|
|
+&switch {
|
|
|
+ status = "okay";
|
|
|
+
|
|
|
+ switch_mac_mode = <MAC_MODE_SGMII_CHANNEL0>;
|
|
|
+
|
|
|
+ qcom,port_phyinfo {
|
|
|
+ port@0 {
|
|
|
+ port_id = <1>;
|
|
|
+ mdiobus = <&mdio0>;
|
|
|
+ phy_address = <7>;
|
|
|
+ };
|
|
|
+
|
|
|
+ port@1 {
|
|
|
+ port_id = <2>;
|
|
|
+ forced-speed = <1000>;
|
|
|
+ forced-duplex = <1>;
|
|
|
+ };
|
|
|
+ };
|
|
|
+};
|
|
|
+
|
|
|
+&dp1 {
|
|
|
+ status = "okay";
|
|
|
+
|
|
|
+ label = "wan";
|
|
|
+ nvmem-cells = <&macaddr_appsblenv_ethaddr 3>;
|
|
|
+ nvmem-cell-names = "mac-address";
|
|
|
+};
|
|
|
+
|
|
|
+&dp2 {
|
|
|
+ status = "okay";
|
|
|
+
|
|
|
+ nvmem-cells = <&macaddr_appsblenv_ethaddr 0>;
|
|
|
+ nvmem-cell-names = "mac-address";
|
|
|
+
|
|
|
+ fixed-link {
|
|
|
+ speed = <1000>;
|
|
|
+ full-duplex;
|
|
|
+ };
|
|
|
+};
|
|
|
+
|
|
|
+&mdio0 {
|
|
|
+ status = "okay";
|
|
|
+};
|
|
|
+
|
|
|
+&mdio1 {
|
|
|
+ status = "okay";
|
|
|
+
|
|
|
+ pinctrl-0 = <&mdio1_pins>, <&switch_reset_pins>;
|
|
|
+ pinctrl-names = "default";
|
|
|
+ reset-gpios = <&tlmm 39 GPIO_ACTIVE_LOW>;
|
|
|
+
|
|
|
+ qca8337_0: ethernet-phy@0 {
|
|
|
+ reg = <0>;
|
|
|
+ };
|
|
|
+
|
|
|
+ qca8337_1: ethernet-phy@1 {
|
|
|
+ reg = <1>;
|
|
|
+ };
|
|
|
+
|
|
|
+ qca8337_2: ethernet-phy@2 {
|
|
|
+ reg = <2>;
|
|
|
+ };
|
|
|
+
|
|
|
+ qca8337_3: ethernet-phy@3 {
|
|
|
+ reg = <3>;
|
|
|
+ };
|
|
|
+
|
|
|
+ ethernet-switch@18 {
|
|
|
+ compatible = "qca,qca8337";
|
|
|
+ reg = <0x18>;
|
|
|
+ #address-cells = <1>;
|
|
|
+ #size-cells = <0>;
|
|
|
+
|
|
|
+ ports {
|
|
|
+ #address-cells = <1>;
|
|
|
+ #size-cells = <0>;
|
|
|
+
|
|
|
+ port@1 {
|
|
|
+ reg = <1>;
|
|
|
+ label = "lan1";
|
|
|
+ phy-handle = <&qca8337_0>;
|
|
|
+ };
|
|
|
+
|
|
|
+ port@2 {
|
|
|
+ reg = <2>;
|
|
|
+ label = "lan2";
|
|
|
+ phy-handle = <&qca8337_1>;
|
|
|
+ };
|
|
|
+
|
|
|
+ port@3 {
|
|
|
+ reg = <3>;
|
|
|
+ label = "lan3";
|
|
|
+ phy-handle = <&qca8337_2>;
|
|
|
+ };
|
|
|
+
|
|
|
+ port@4 {
|
|
|
+ reg = <4>;
|
|
|
+ label = "lan4";
|
|
|
+ phy-handle = <&qca8337_3>;
|
|
|
+ };
|
|
|
+
|
|
|
+ port@6 {
|
|
|
+ reg = <6>;
|
|
|
+ phy-mode = "sgmii";
|
|
|
+ ethernet = <&dp2>;
|
|
|
+ qca,sgmii-enable-pll;
|
|
|
+
|
|
|
+ fixed-link {
|
|
|
+ speed = <1000>;
|
|
|
+ full-duplex;
|
|
|
+ };
|
|
|
+ };
|
|
|
+ };
|
|
|
+ };
|
|
|
+};
|
|
|
+
|
|
|
+&tlmm {
|
|
|
+ button_pins: button-state {
|
|
|
+ button-pins {
|
|
|
+ pins = "gpio22", "gpio38";
|
|
|
+ function = "gpio";
|
|
|
+ drive-strength = <8>;
|
|
|
+ bias-pull-up;
|
|
|
+ };
|
|
|
+
|
|
|
+ switch-pins {
|
|
|
+ pins = "gpio14";
|
|
|
+ function = "gpio";
|
|
|
+ drive-strength = <8>;
|
|
|
+ bias-pull-down;
|
|
|
+ };
|
|
|
+ };
|
|
|
+
|
|
|
+ led_pins: led-state {
|
|
|
+ pins = "gpio12", "gpio13", "gpio16", "gpio24",
|
|
|
+ "gpio25", "gpio26", "gpio28", "gpio46";
|
|
|
+ function = "gpio";
|
|
|
+ drive-strength = <8>;
|
|
|
+ bias-pull-down;
|
|
|
+ };
|
|
|
+
|
|
|
+ mdio1_pins: mdio-state {
|
|
|
+ mdc-pins {
|
|
|
+ pins = "gpio36";
|
|
|
+ function = "mdc";
|
|
|
+ drive-strength = <8>;
|
|
|
+ bias-pull-up;
|
|
|
+ };
|
|
|
+
|
|
|
+ mdio-pins {
|
|
|
+ pins = "gpio37";
|
|
|
+ function = "mdio";
|
|
|
+ drive-strength = <8>;
|
|
|
+ bias-pull-up;
|
|
|
+ };
|
|
|
+ };
|
|
|
+
|
|
|
+ qpic_pins: qpic-state {
|
|
|
+ clock-pins {
|
|
|
+ pins = "gpio9";
|
|
|
+ function = "qspi_clk";
|
|
|
+ drive-strength = <8>;
|
|
|
+ bias-disable;
|
|
|
+ };
|
|
|
+
|
|
|
+ cs-pins {
|
|
|
+ pins = "gpio8";
|
|
|
+ function = "qspi_cs";
|
|
|
+ drive-strength = <8>;
|
|
|
+ bias-disable;
|
|
|
+ };
|
|
|
+
|
|
|
+ data-pins {
|
|
|
+ pins = "gpio4", "gpio5", "gpio6", "gpio7";
|
|
|
+ function = "qspi_data";
|
|
|
+ drive-strength = <8>;
|
|
|
+ bias-disable;
|
|
|
+ };
|
|
|
+ };
|
|
|
+
|
|
|
+ serial_0_pins: uart0-state {
|
|
|
+ pins = "gpio20", "gpio21";
|
|
|
+ function = "blsp0_uart0";
|
|
|
+ bias-disable;
|
|
|
+ };
|
|
|
+
|
|
|
+ switch_reset_pins: switch-reset-state {
|
|
|
+ pins = "gpio39";
|
|
|
+ function = "gpio";
|
|
|
+ drive-strength = <8>;
|
|
|
+ bias-pull-down;
|
|
|
+ };
|
|
|
+};
|
|
|
+
|
|
|
+&tsens {
|
|
|
+ status = "okay";
|
|
|
+};
|
|
|
+
|
|
|
+/*
|
|
|
+ * ath11k Wi-Fi consumes too large memory spaces and too few spaces are
|
|
|
+ * available for users. To prevent OOM when using LuCI or other softwares,
|
|
|
+ * disable Wi-Fi related peripherals at the moment.
|
|
|
+ */
|
|
|
+&q6v5_wcss {
|
|
|
+ status = "disabled";
|
|
|
+
|
|
|
+ memory-region = <&q6_mem_regions>;
|
|
|
+ firmware-name = "ath11k/IPQ5018/hw1.0/q6_fw.mdt",
|
|
|
+ "ath11k/IPQ5018/hw1.0/m3_fw.mdt",
|
|
|
+ "ath11k/QCN6122/hw1.0/m3_fw.mdt";
|
|
|
+
|
|
|
+ boot-args = <0x2 4 2 18 0 0>; /* pcie:1, len:4, updid:2, reset:gpio18 */
|
|
|
+
|
|
|
+ q6_wcss_pd1: pd-1 {
|
|
|
+ firmware-name = "ath11k/IPQ5018/hw1.0/q6_fw.mdt";
|
|
|
+
|
|
|
+ resets =
|
|
|
+ <&gcc GCC_WCSSAON_RESET>,
|
|
|
+ <&gcc GCC_WCSS_BCR>,
|
|
|
+ <&gcc GCC_CE_BCR>;
|
|
|
+ reset-names =
|
|
|
+ "wcss_aon_reset",
|
|
|
+ "wcss_reset",
|
|
|
+ "ce_reset";
|
|
|
+
|
|
|
+ clocks =
|
|
|
+ <&gcc GCC_WCSS_AHB_S_CLK>,
|
|
|
+ <&gcc GCC_WCSS_ACMT_CLK>,
|
|
|
+ <&gcc GCC_WCSS_AXI_M_CLK>;
|
|
|
+ clock-names =
|
|
|
+ "gcc_wcss_ahb_s_clk",
|
|
|
+ "gcc_wcss_acmt_clk",
|
|
|
+ "gcc_wcss_axi_m_clk";
|
|
|
+
|
|
|
+ interrupts-extended =
|
|
|
+ <&wcss_smp2p_in 8 IRQ_TYPE_NONE>,
|
|
|
+ <&wcss_smp2p_in 9 IRQ_TYPE_NONE>,
|
|
|
+ <&wcss_smp2p_in 12 IRQ_TYPE_NONE>,
|
|
|
+ <&wcss_smp2p_in 11 IRQ_TYPE_NONE>;
|
|
|
+ interrupt-names =
|
|
|
+ "fatal",
|
|
|
+ "ready",
|
|
|
+ "spawn-ack",
|
|
|
+ "stop-ack";
|
|
|
+
|
|
|
+ qcom,smem-states =
|
|
|
+ <&wcss_smp2p_out 8>,
|
|
|
+ <&wcss_smp2p_out 9>,
|
|
|
+ <&wcss_smp2p_out 10>;
|
|
|
+ qcom,smem-state-names =
|
|
|
+ "shutdown",
|
|
|
+ "stop",
|
|
|
+ "spawn";
|
|
|
+ };
|
|
|
+
|
|
|
+ q6_wcss_pd2: pd-2 {
|
|
|
+ firmware-name = "ath11k/IPQ5018/hw1.0/q6_fw.mdt";
|
|
|
+
|
|
|
+ interrupts-extended =
|
|
|
+ <&wcss_smp2p_in 16 IRQ_TYPE_NONE>,
|
|
|
+ <&wcss_smp2p_in 17 IRQ_TYPE_NONE>,
|
|
|
+ <&wcss_smp2p_in 20 IRQ_TYPE_NONE>,
|
|
|
+ <&wcss_smp2p_in 19 IRQ_TYPE_NONE>;
|
|
|
+ interrupt-names =
|
|
|
+ "fatal",
|
|
|
+ "ready",
|
|
|
+ "spawn-ack",
|
|
|
+ "stop-ack";
|
|
|
+
|
|
|
+ qcom,smem-states =
|
|
|
+ <&wcss_smp2p_out 16>,
|
|
|
+ <&wcss_smp2p_out 17>,
|
|
|
+ <&wcss_smp2p_out 18>;
|
|
|
+ qcom,smem-state-names =
|
|
|
+ "shutdown",
|
|
|
+ "stop",
|
|
|
+ "spawn";
|
|
|
+ };
|
|
|
+};
|
|
|
+
|
|
|
+&wifi0 {
|
|
|
+ qcom,rproc = <&q6_wcss_pd1>;
|
|
|
+ qcom,userpd-subsys-name = "q6v5_wcss_userpd1";
|
|
|
+ qcom,ath11k-calibration-variant = "ELECOM-WRC-X3000GS2";
|
|
|
+ qcom,ath11k-fw-memory-mode = <2>;
|
|
|
+ qcom,bdf-addr = <0x4c400000>;
|
|
|
+
|
|
|
+ ieee80211-freq-limit = <2400000 2483000>;
|
|
|
+
|
|
|
+ status = "disabled";
|
|
|
+};
|
|
|
+
|
|
|
+&wifi1 {
|
|
|
+ qcom,rproc = <&q6_wcss_pd2>;
|
|
|
+ qcom,userpd-subsys-name = "q6v5_wcss_userpd2";
|
|
|
+ qcom,ath11k-calibration-variant = "ELECOM-WRC-X3000GS2";
|
|
|
+ qcom,ath11k-fw-memory-mode = <2>;
|
|
|
+ qcom,bdf-addr = <0x4d100000>;
|
|
|
+ qcom,m3-dump-addr = <0x4df00000>;
|
|
|
+
|
|
|
+ ieee80211-freq-limit = <5150000 5730000>;
|
|
|
+
|
|
|
+ status = "disabled";
|
|
|
+};
|