Request for Assistance in Creating DTS File for DAVOLINK GAPD-7200

Hello everyone,

I am seeking help to create a DTS file for my device so that I can build OpenWrt firmware v23.05.5 for it. Below are the details of the device:

Device Information:

  • Device Name: DAVOLINK GAPD-7200
  • Chipset: IPQ4018-OVV
  • Components:
    • SKY85405
    • SKY1185303
    • QCA8075 OVV (Ethernet Switch)
    • WINBOND 25N01GVZE1G (NAND Flash)
    • ESMY F25L16PA (SPI Flash)
    • NANYA1824 (RAM)

Hardware Features:

  1. LEDs: 9 LEDs
  • POWER
  • WIFI 2G
  • WIFI 5G
  • WAN
  • LAN1, LAN2, LAN3, LAN4
  • WPS
  1. Ethernet Ports:
  • 5 Ethernet ports (1 WAN + 4 LANs)
  • All ports support 1Gbps speed.
  1. Buttons:
  • 1 Reset button
  • 1 WPS button
  1. Additional Ports:
  • USB Port

What I’ve Tried:

I attempted to create a DTS file myself but unfortunately, all my efforts have failed. I am not sure what I am missing, and I would greatly appreciate guidance or a working DTS file for this device.

Purpose:

The goal is to enable me to build and flash OpenWrt firmware for this device successfully.

Any help, examples, or advice would be greatly appreciated. If you need any further details or logs, I will be happy to provide them.

Thank you in advance for your support!

1-davolink-gapd-7200.dts


/dts-v1/;

/ {
    model = "Davolink GAPD-7200";
    compatible = "qcom,ipq4018";
    
    #address-cells = <1>;
    #size-cells = <1>;

    aliases {
        ethernet0 = &eth0;
        ethernet1 = &eth1;
        wifi0 = &wifi_2g;
        wifi1 = &wifi_5g;
        led-lan1 = &lan1_led;
        led-lan2 = &lan2_led;
        led-lan3 = &lan3_led;
        led-lan4 = &lan4_led;
        led-wan = &wan_led;
    };

    chosen {
        bootargs = "console=ttyMSM0,115200n8";
    };

    memory@80000000 {
        device_type = "memory";
        reg = <0x80000000 0x10000000>; // 256MB DDR3
    };

    soc {
        #address-cells = <1>;
        #size-cells = <1>;

        gpio: gpio@100000 {
            compatible = "qcom,ipq4018-gpio";
            reg = <0x100000 0x1000>;
            gpio-controller;
            #gpio-cells = <2>;
        };

        eth0: ethernet@c080000 {
            compatible = "qcom,ipq4018-eth";
            reg = <0xc080000 0x10000>;
            phy-mode = "rgmii";
            status = "okay";
        };

        eth1: ethernet@c090000 {
            compatible = "qcom,ipq4018-eth";
            reg = <0xc090000 0x10000>;
            phy-mode = "rgmii";
            status = "okay";
        };

        spi-nand@1 {
            compatible = "spi-nand";
            reg = <0x1 0x1000>;
            #address-cells = <1>;
            #size-cells = <1>;
            ranges = <0x0 0x0 0x10000000>;
            partitions {
                compatible = "fixed-partitions";
                #address-cells = <1>;
                #size-cells = <1>;
                partition@0 {
                    label = "u-boot";
                    reg = <0x00000000 0x00100000>;
                };
                partition@100000 {
                    label = "kernel";
                    reg = <0x00100000 0x00500000>;
                };
                partition@600000 {
                    label = "rootfs";
                    reg = <0x00600000 0x07800000>;
                };
            };
        };

        wifi_2g: wifi@a800000 {
            compatible = "qcom,ipq4018-wifi";
            reg = <0xa800000 0x200000>;
            status = "okay";
        };

        wifi_5g: wifi@b000000 {
            compatible = "qcom,ipq4018-wifi";
            reg = <0xb000000 0x200000>;
            status = "okay";
        };

        switch-leds {
            compatible = "gpio-leds";

            lan1_led: lan1 {
                gpios = <&gpio 29 0>;
                label = "green:lan1";
            };

            lan2_led: lan2 {
                gpios = <&gpio 30 0>;
                label = "green:lan2";
            };

            lan3_led: lan3 {
                gpios = <&gpio 31 0>;
                label = "green:lan3";
            };

            lan4_led: lan4 {
                gpios = <&gpio 28 0>;
                label = "green:lan4";
            };

            wan_led: wan {
                gpios = <&gpio 27 0>;
                label = "green:wan";
            };
        };

        keys {
            compatible = "gpio-keys";

            reset {
                gpios = <&gpio 42 0>;
                linux,code = <0x198>;
                label = "reset";
            };

            wps {
                gpios = <&gpio 43 0>;
                linux,code = <0x211>;
                label = "wps";
            };
        };
    };
};

2-davolink-gapd-7200.dts

/dts-v1/;

#include "qcom-ipq4018.dtsi"

/ {
    model = "Davolink GAPD-7200";
    compatible = "davolink,gapd-7200", "qcom,ipq4018";
    
    #address-cells = <1>;
    #size-cells = <1>;

    aliases {
        led-lan1 = &lan1_led;
        led-lan2 = &lan2_led;
        led-lan3 = &lan3_led;
        led-lan4 = &lan4_led;
        led-wan = &wan_led;
        serial0 = &blsp1_uart1;
    };

    chosen {
        bootargs = "console=ttyMSM0,115200n8 rootfstype=squashfs,ubifs rootwait noinitrd";
        stdout-path = "serial0:115200n8";
    };

    memory@80000000 {
        device_type = "memory";
        reg = <0x80000000 0x10000000>; // 256MB DDR3
    };

    soc {
        #address-cells = <1>;
        #size-cells = <1>;
        ranges = <0 0 0x10000000>;

        gpio: gpio@1000000 {
            compatible = "qcom,ipq4018-gpio";
            reg = <0x1000000 0x100>;
            gpio-controller;
            #gpio-cells = <2>;
            ngpios = <100>;
            interrupt-controller;
        };

        blsp1_uart1: serial@78af000 {
            compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm";
            reg = <0x78af000 0x200>;
            interrupts = <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
            clocks = <&gcc GCC_BLSP1_UART1_APPS_CLK>,
                     <&gcc GCC_BLSP1_AHB_CLK>;
            clock-names = "core", "iface";
            status = "okay";
        };

        eth0: ethernet@c080000 {
            compatible = "qcom,ipq4018-eth";
            reg = <0xc080000 0x8000>;
            phy-mode = "sgmii";
            status = "okay";
            fixed-link {
                speed = <1000>;
                full-duplex;
            };
        };

        switch: switch@0 {
            compatible = "qca,qca8337";
            reg = <0>;
            phy-mode = "sgmii";
            ports {
                #address-cells = <1>;
                #size-cells = <0>;

                port@0 {
                    reg = <0>;
                    label = "lan1";
                };

                port@1 {
                    reg = <1>;
                    label = "lan2";
                };

                port@2 {
                    reg = <2>;
                    label = "lan3";
                };

                port@3 {
                    reg = <3>;
                    label = "lan4";
                };

                port@4 {
                    reg = <4>;
                    label = "wan";
                };

                port@5 {
                    reg = <5>;
                    label = "cpu";
                    ethernet = <&eth0>;
                    fixed-link {
                        speed = <1000>;
                        full-duplex;
                    };
                };
            };
        };

        spi_0: spi@78b5000 { /* BLSP1 QUP1 */
            status = "okay";
            num-cs = <1>;
            cs-gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;

            spi_nand@0 {
                compatible = "spi-nand";
                reg = <0>;
                spi-max-frequency = <50000000>;
                #address-cells = <1>;
                #size-cells = <1>;

                partitions {
                    compatible = "fixed-partitions";
                    #address-cells = <1>;
                    #size-cells = <1>;

                    partition@0 {
                        label = "u-boot";
                        reg = <0x00000000 0x00100000>;
                        read-only;
                    };

                    partition@100000 {
                        label = "kernel";
                        reg = <0x00100000 0x00500000>;
                    };

                    partition@600000 {
                        label = "rootfs";
                        reg = <0x00600000 0x07a00000>;
                    };

                    art: partition@8000000 {
                        label = "art";
                        reg = <0x08000000 0x00800000>;
                        read-only;
                    };
                };
            };
        };

        wifi_2g: wifi@a000000 {
            compatible = "qcom,ath10k";
            reg = <0xa000000 0x200000>;
            qcom,ath10k-calibration-data = <&art 0x1000>;
            status = "okay";
            ieee80211-freq-limit = <2400000 2500000>;
        };

        wifi_5g: wifi@a800000 {
            compatible = "qcom,ath10k";
            reg = <0xa800000 0x200000>;
            qcom,ath10k-calibration-data = <&art 0x5000>;
            status = "okay";
            ieee80211-freq-limit = <4900000 6000000>;
        };

        leds {
            compatible = "gpio-leds";

            lan1_led: lan1 {
                label = "green:lan1";
                gpios = <&gpio 29 GPIO_ACTIVE_HIGH>;
            };

            lan2_led: lan2 {
                label = "green:lan2";
                gpios = <&gpio 30 GPIO_ACTIVE_HIGH>;
            };

            lan3_led: lan3 {
                label = "green:lan3";
                gpios = <&gpio 31 GPIO_ACTIVE_HIGH>;
            };

            lan4_led: lan4 {
                label = "green:lan4";
                gpios = <&gpio 28 GPIO_ACTIVE_HIGH>;
            };

            wan_led: wan {
                label = "green:wan";
                gpios = <&gpio 27 GPIO_ACTIVE_HIGH>;
            };
        };

        keys {
            compatible = "gpio-keys";

            reset {
                label = "reset";
                gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
                linux,code = <KEY_RESTART>;
            };

            wps {
                label = "wps";
                gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
                linux,code = <KEY_WPS_BUTTON>;
            };
        };
    };
};

model = Edgecore ECW5211
Change the switch values ​​only to 5 ports.

[admin edit: added English translsation]


عدل قيم السويتش فقط لتكون 5 بورتات

I tried to use something close and modified it and ruined the device. I will still try to find the com port so I can try to modify its bot.

[admin edit: added English translsation]


حاولت استخدام حاجه قريبه وعدلت وبوظت جهاز
لسه هحاول اشوف مدخل لل com عشان احاول اعدل البوت بتاعه

Hello,
If u can help pls send me mail to
thanks

[admin edit: removed email. Please coordinate via PM]

1 Like

https://www.mediafire.com/file/st0qjifz4d5a99k/pandorabox-ipq40xx-dts.zip/file