|
|
@@ -0,0 +1,424 @@
|
|
|
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
|
|
+
|
|
|
+/dts-v1/;
|
|
|
+
|
|
|
+#include "ipq5018.dtsi"
|
|
|
+#include "ipq5018-ess.dtsi"
|
|
|
+#include "ipq5018-qcn6122.dtsi"
|
|
|
+
|
|
|
+#include <dt-bindings/gpio/gpio.h>
|
|
|
+#include <dt-bindings/input/input.h>
|
|
|
+#include <dt-bindings/leds/common.h>
|
|
|
+
|
|
|
+/ {
|
|
|
+ model = "CMCC MR3000D-CI";
|
|
|
+ compatible = "cmcc,mr3000d-ci", "qcom,ipq5018";
|
|
|
+
|
|
|
+ aliases {
|
|
|
+ label-mac-device = <&dp1>;
|
|
|
+
|
|
|
+ led-boot = &led_status_red;
|
|
|
+ led-failsafe = &led_status_green;
|
|
|
+ led-running = &led_status_green;
|
|
|
+ led-upgrade = &led_status_green;
|
|
|
+
|
|
|
+ serial0 = &blsp1_uart1;
|
|
|
+ };
|
|
|
+
|
|
|
+ chosen {
|
|
|
+ bootargs-append = " root=/dev/ubiblock0_1 swiotlb=1 coherent_pool=2M";
|
|
|
+ stdout-path = "serial0:115200n8";
|
|
|
+ };
|
|
|
+
|
|
|
+ keys {
|
|
|
+ compatible = "gpio-keys";
|
|
|
+ pinctrl-0 = <&button_pins>;
|
|
|
+ pinctrl-names = "default";
|
|
|
+
|
|
|
+ button-0 {
|
|
|
+ label = "reset";
|
|
|
+ gpios = <&tlmm 27 GPIO_ACTIVE_LOW>;
|
|
|
+ linux,code = <KEY_RESTART>;
|
|
|
+ };
|
|
|
+
|
|
|
+ button-1 {
|
|
|
+ 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_status_red: led-0 {
|
|
|
+ gpios = <&tlmm 30 GPIO_ACTIVE_HIGH>;
|
|
|
+ color = <LED_COLOR_ID_RED>;
|
|
|
+ function = LED_FUNCTION_STATUS;
|
|
|
+ };
|
|
|
+
|
|
|
+ led_status_green: led-1 {
|
|
|
+ gpios = <&tlmm 46 GPIO_ACTIVE_HIGH>;
|
|
|
+ color = <LED_COLOR_ID_GREEN>;
|
|
|
+ function = LED_FUNCTION_STATUS;
|
|
|
+ };
|
|
|
+ };
|
|
|
+};
|
|
|
+
|
|
|
+&sleep_clk {
|
|
|
+ clock-frequency = <32000>;
|
|
|
+};
|
|
|
+
|
|
|
+&xo_board_clk {
|
|
|
+ clock-div = <4>;
|
|
|
+ clock-mult = <1>;
|
|
|
+};
|
|
|
+
|
|
|
+&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";
|
|
|
+
|
|
|
+ // GigaDevice GD5F1GQ5REYIG
|
|
|
+ nand@0 {
|
|
|
+ compatible = "spi-nand";
|
|
|
+ reg = <0>;
|
|
|
+
|
|
|
+ nand-ecc-engine = <&qpic_nand>;
|
|
|
+ nand-ecc-step-size = <512>;
|
|
|
+ nand-ecc-strength = <8>;
|
|
|
+ nand-bus-width = <8>;
|
|
|
+
|
|
|
+ partitions {
|
|
|
+ compatible = "qcom,smem-part";
|
|
|
+
|
|
|
+ partition-art {
|
|
|
+ label = "0:art";
|
|
|
+ read-only;
|
|
|
+
|
|
|
+ nvmem-layout {
|
|
|
+ compatible = "fixed-layout";
|
|
|
+ #address-cells = <1>;
|
|
|
+ #size-cells = <1>;
|
|
|
+
|
|
|
+ // WAN MAC address
|
|
|
+ macaddr_art_0: mac-address@0 {
|
|
|
+ compatible = "mac-base";
|
|
|
+ reg = <0x0 0x6>;
|
|
|
+ #nvmem-cell-cells = <1>;
|
|
|
+ };
|
|
|
+
|
|
|
+ // LAN MAC address
|
|
|
+ macaddr_art_6: mac-address@6 {
|
|
|
+ compatible = "mac-base";
|
|
|
+ reg = <0x6 0x6>;
|
|
|
+ #nvmem-cell-cells = <1>;
|
|
|
+ };
|
|
|
+
|
|
|
+ // WLAN 2.4 GHz MAC address
|
|
|
+ macaddr_art_c: mac-address@c {
|
|
|
+ compatible = "mac-base";
|
|
|
+ reg = <0xc 0x6>;
|
|
|
+ #nvmem-cell-cells = <1>;
|
|
|
+ };
|
|
|
+
|
|
|
+ // WLAN 5 GHz MAC address
|
|
|
+ macaddr_art_12: mac-address@12 {
|
|
|
+ compatible = "mac-base";
|
|
|
+ reg = <0x12 0x6>;
|
|
|
+ #nvmem-cell-cells = <1>;
|
|
|
+ };
|
|
|
+ };
|
|
|
+ };
|
|
|
+ };
|
|
|
+ };
|
|
|
+};
|
|
|
+
|
|
|
+/*
|
|
|
+ * ===============================================================
|
|
|
+ * _______________________ _______________________
|
|
|
+ * | IPQ5018 | | QCA8337 |
|
|
|
+ * | +------+ +--------+ | | +--------+ +------+ |
|
|
|
+ * | | MAC0 |---| GE Phy | | | | Phy0 |---| MAC1 | |
|
|
|
+ * | +------+ +--------+ | | +--------+ +------+ |
|
|
|
+ * | +------+ +--------+ | | +--------+ +------+ |
|
|
|
+ * | | MAC1 |---| Uniphy |-+-SGMII-+-| SerDes |---| MAC6 | |
|
|
|
+ * | +------+ +--------+ | | +--------+ +------+ |
|
|
|
+ * |_______________________| |_______________________|
|
|
|
+ *
|
|
|
+ * ===============================================================
|
|
|
+ */
|
|
|
+
|
|
|
+&switch {
|
|
|
+ status = "okay";
|
|
|
+
|
|
|
+ switch_mac_mode = <MAC_MODE_SGMII_CHANNEL0>;
|
|
|
+
|
|
|
+ qcom,port_phyinfo {
|
|
|
+ // MAC0 -> GE Phy -> QCA8337 Phy4
|
|
|
+ port@1 {
|
|
|
+ port_id = <1>;
|
|
|
+ mdiobus = <&mdio0>;
|
|
|
+ phy_address = <7>;
|
|
|
+ };
|
|
|
+
|
|
|
+ // MAC1 ---SGMII---> QCA8337 SerDes
|
|
|
+ port@2 {
|
|
|
+ port_id = <2>;
|
|
|
+ mdiobus = <&mdio1>;
|
|
|
+ forced-speed = <1000>;
|
|
|
+ forced-duplex = <1>;
|
|
|
+ };
|
|
|
+ };
|
|
|
+};
|
|
|
+
|
|
|
+// MAC0 -> GE Phy
|
|
|
+&dp1 {
|
|
|
+ status = "okay";
|
|
|
+
|
|
|
+ nvmem-cell-names = "mac-address";
|
|
|
+ nvmem-cells = <&macaddr_art_0 (0)>;
|
|
|
+};
|
|
|
+
|
|
|
+// MAC1 -> SGMII
|
|
|
+&dp2 {
|
|
|
+ status = "okay";
|
|
|
+
|
|
|
+ nvmem-cell-names = "mac-address";
|
|
|
+ nvmem-cells = <&macaddr_art_6 (0)>;
|
|
|
+
|
|
|
+ fixed-link {
|
|
|
+ speed = <1000>;
|
|
|
+ full-duplex;
|
|
|
+ };
|
|
|
+};
|
|
|
+
|
|
|
+&mdio0 {
|
|
|
+ status = "okay";
|
|
|
+};
|
|
|
+
|
|
|
+// MAC0 -> GE Phy -> QCA8337 Phy4
|
|
|
+&ge_phy {
|
|
|
+ qcom,dac-preset-short-cable;
|
|
|
+};
|
|
|
+
|
|
|
+&mdio1 {
|
|
|
+ status = "okay";
|
|
|
+
|
|
|
+ pinctrl-0 = <&mdio1_pins>;
|
|
|
+ pinctrl-names = "default";
|
|
|
+ reset-gpios = <&tlmm 39 GPIO_ACTIVE_LOW>;
|
|
|
+
|
|
|
+ // QCA8337 Phy0 -> LAN3
|
|
|
+ qca8337_0: ethernet-phy@0 {
|
|
|
+ reg = <0>;
|
|
|
+ };
|
|
|
+
|
|
|
+ // QCA8337 Phy1 -> LAN2
|
|
|
+ qca8337_1: ethernet-phy@1 {
|
|
|
+ reg = <1>;
|
|
|
+ };
|
|
|
+
|
|
|
+ // QCA8337 Phy2 -> LAN1
|
|
|
+ qca8337_2: ethernet-phy@2 {
|
|
|
+ reg = <2>;
|
|
|
+ };
|
|
|
+
|
|
|
+ // QCA8337 Phy3 -> WAN
|
|
|
+ qca8337_3: ethernet-phy@3 {
|
|
|
+ reg = <3>;
|
|
|
+ };
|
|
|
+
|
|
|
+ // QCA8337 Phy4 -> IPQ5018 GE Phy
|
|
|
+ qca8337_4: ethernet-phy@4 {
|
|
|
+ reg = <4>;
|
|
|
+ };
|
|
|
+
|
|
|
+ // QCA8337 switch
|
|
|
+ switch1: ethernet-switch@17 {
|
|
|
+ compatible = "qca,qca8337";
|
|
|
+ reg = <17>;
|
|
|
+ #address-cells = <1>;
|
|
|
+ #size-cells = <0>;
|
|
|
+
|
|
|
+ ports {
|
|
|
+ #address-cells = <1>;
|
|
|
+ #size-cells = <0>;
|
|
|
+
|
|
|
+ port@1 {
|
|
|
+ reg = <1>;
|
|
|
+ label = "lan3";
|
|
|
+ phy-handle = <&qca8337_0>;
|
|
|
+ };
|
|
|
+
|
|
|
+ port@2 {
|
|
|
+ reg = <2>;
|
|
|
+ label = "lan2";
|
|
|
+ phy-handle = <&qca8337_1>;
|
|
|
+ };
|
|
|
+
|
|
|
+ port@3 {
|
|
|
+ reg = <3>;
|
|
|
+ label = "lan1";
|
|
|
+ phy-handle = <&qca8337_2>;
|
|
|
+ };
|
|
|
+
|
|
|
+ port@4 {
|
|
|
+ reg = <4>;
|
|
|
+ label = "wan";
|
|
|
+ phy-handle = <&qca8337_3>;
|
|
|
+
|
|
|
+ nvmem-cells = <&macaddr_art_0 (0)>;
|
|
|
+ nvmem-cell-names = "mac-address";
|
|
|
+ };
|
|
|
+
|
|
|
+ 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 = "gpio27", "gpio38";
|
|
|
+ function = "gpio";
|
|
|
+ drive-strength = <8>;
|
|
|
+ bias-pull-up;
|
|
|
+ };
|
|
|
+
|
|
|
+ };
|
|
|
+
|
|
|
+ led_pins: led-state {
|
|
|
+ pins = "gpio30", "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 = "gpio28", "gpio29";
|
|
|
+ function = "blsp0_uart1";
|
|
|
+ drive-strength = <8>;
|
|
|
+ bias-disable;
|
|
|
+ };
|
|
|
+
|
|
|
+ switch_reset_pins: switch-reset-state {
|
|
|
+ pins = "gpio39";
|
|
|
+ function = "gpio";
|
|
|
+ drive-strength = <8>;
|
|
|
+ bias-pull-down;
|
|
|
+ };
|
|
|
+};
|
|
|
+
|
|
|
+&q6v5_wcss {
|
|
|
+ status = "okay";
|
|
|
+
|
|
|
+ /* The QCN6102 radio should map to UPD ID 2. Without */
|
|
|
+ /* bootargs, the firmware will expect it to be on UPD ID 3 */
|
|
|
+ boot-args = <
|
|
|
+ /* type: */ 0x1 /* PCIE0 */
|
|
|
+ /* length: */ 4
|
|
|
+ /* UPD ID: */ 2
|
|
|
+ /* reset GPIO: */ 15
|
|
|
+ /* reserved: */ 0 0>;
|
|
|
+};
|
|
|
+
|
|
|
+&wifi {
|
|
|
+ // IPQ5018
|
|
|
+ status = "okay";
|
|
|
+
|
|
|
+ qcom,rproc = <&q6_wcss_pd1>;
|
|
|
+ qcom,ath11k-calibration-variant = "CMCC-MR3000D-CI";
|
|
|
+ qcom,ath11k-fw-memory-mode = <1>;
|
|
|
+ qcom,bdf-addr = <0x4c400000>;
|
|
|
+};
|
|
|
+
|
|
|
+&wifi1 {
|
|
|
+ // QCN6102 5G
|
|
|
+ status = "okay";
|
|
|
+
|
|
|
+ qcom,rproc = <&q6_wcss_pd2>;
|
|
|
+ qcom,userpd-subsys-name = "q6v5_wcss_userpd2";
|
|
|
+ qcom,ath11k-calibration-variant = "CMCC-MR3000D-CI";
|
|
|
+ qcom,ath11k-fw-memory-mode = <1>;
|
|
|
+ qcom,bdf-addr = <0x4d100000>;
|
|
|
+ qcom,m3-dump-addr = <0x4df00000>;
|
|
|
+};
|