OpenWRT support DataGem D series / IPQ5018

Ive tried about everything here, i have the original QSDK dts files, and tried to modify them to be compliant with OpenWRT, no matter what... no joy Ive attached both if someone can maybe sort out the DTS i can manage the rest.

 *
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */

#include "qcom-ipq5018.dtsi"

/ {
	#address-cells = <0x2>;
	#size-cells = <0x2>;
	model = "OptimCloud D50-5G";
	compatible = "optimcloud,d50-5g", "qcom,ipq5018-mp03.1", "qcom,ipq5018";
	interrupt-parent = <&intc>;
	#ifdef __IPQ_MEM_PROFILE_256_MB__
	AUTO_MOUNT;
	#endif

	aliases {
		sdhc1 = &sdhc_1; /* SDC1 eMMC slot */
		serial0 = &blsp1_uart1;
		serial1 = &blsp1_uart2;
		ethernet0 = "/soc/dp2";
		ethernet1 = "/soc/dp1";
	};

	chosen {
		bootargs = "console=ttyMSM0,115200,n8 rw init=/init";
	#ifdef __IPQ_MEM_PROFILE_256_MB__
		bootargs-append = " swiotlb=1";
	#else
		bootargs-append = " swiotlb=1 coherent_pool=2M";
	#endif
		stdout-path = "serial0";
	};

	reserved-memory {
	#ifdef __IPQ_MEM_PROFILE_256_MB__
	/*            256 MB Profile
	 * +=========+==============+========================+
	 * |        |              |                         |
	 * | Region | Start Offset |          Size           |
	 * |        |              |                         |
	 * +--------+--------------+-------------------------+
	 * |        |              |                         |
	 * |        |              |                         |
	 * |  NSS   |  0x40000000  |          8MB            |
	 * |        |              |                         |
	 * |        |              |                         |
	 * +--------+--------------+-------------------------+
	 * |        |              |                         |
	 * |        |              |                         |
	 * |        |              |                         |
	 * |        |              |                         |
	 * | Linux  |  0x40800000  | Depends on total memory |
	 * |        |              |                         |
	 * |        |              |                         |
	 * |        |              |                         |
	 * +        |              |                         |
	 * +--------+--------------+-------------------------+
	 * |        |              |                         |
	 * | uboot  |  0x4A600000  |           4MB           |
	 * |        |              |                         |
	 * +--------+--------------+-------------------------+
	 * |  SBL   |  0x4AA00000  |           1MB           |
	 * +--------+--------------+-------------------------+
	 * |  smem  |  0x4AB00000  |           1MB           |
	 * +--------+--------------+-------------------------+
	 * |        |              |                         |
	 * |   TZ   |  0x4AC00000  |           4MB           |
	 * |        |              |                         |
	 * +--------+--------------+-------------------------+
	 * |        |              |                         |
	 * |        |              |                         |
	 * |        |              |                         |
	 * |   Q6   |  0x4B000000  |          23MB           |
	 * |        |              |                         |
	 * |        |              |                         |
	 * |        |              |                         |
	 * +--------+--------------+-------------------------+
	 * | M3 Dump| 0x4C700000   |          1MB            |
	 * +--------+--------------+-------------------------+
	 * | QDSS   | 0x4C800000   |          1MB            |
	 * +--------+--------------+-------------------------+
	 * |        |              |                         |
	 * |QCN9000 |  0x4C900000  |          17MB           |
	 * |        |              |                         |
	 * +--------+--------------+-------------------------+
	 * |        |              |                         |
	 * |  MHI1  |  0x4DA00000  |          16MB           |
	 * |        |              |                         |
	 * +--------+--------------+-------------------------+
	 * |                                                 |
	 * |      Rest of the memory for Linux               |
	 * |                                                 |
	 * +=================================================+
	 */
		q6_region: wcnss@4b000000 {
			no-map;
			reg = <0x0 0x4b000000 0x0 0x01700000>;
		};

		m3_dump@4c700000 {
			no-map;
			reg = <0x0 0x4C700000 0x0 0x100000>;
		};

		q6_etr_region:q6_etr_dump@4c800000 {
			no-map;
			reg = <0x0 0x4c800000 0x0 0x100000>;
		};

		qcn9000_pcie0@4c900000 {
			no-map;
			reg = <0x0 0x4C900000 0x0 0x01100000>;
		};

		mhi_region1: dma_pool1@4da00000 {
			compatible = "shared-dma-pool";
			no-map;
			reg = <0x0 0x4da00000 0x0 0x01000000>;
		};
	#elif __IPQ_MEM_PROFILE_512_MB__
	/*                      512 MB Profile
	 * +=========+==============+========================+
	 * |        |              |                         |
	 * | Region | Start Offset |          Size           |
	 * |        |              |                         |
	 * +--------+--------------+-------------------------+
	 * |        |              |                         |
	 * |        |              |                         |
	 * |  NSS   |  0x40000000  |          16MB           |
	 * |        |              |                         |
	 * |        |              |                         |
	 * +--------+--------------+-------------------------+
	 * |        |              |                         |
	 * |        |              |                         |
	 * |        |              |                         |
	 * |        |              |                         |
	 * | Linux  |  0x41000000  | Depends on total memory |
	 * |        |              |                         |
	 * |        |              |                         |
	 * |        |              |                         |
	 * |        |              |                         |
	 * +--------+--------------+-------------------------+
	 * |        |              |                         |
	 * | uboot  |  0x4A600000  |           4MB           |
	 * |        |              |                         |
	 * +--------+--------------+-------------------------+
	 * |  SBL   |  0x4AA00000  |           1MB           |
	 * +--------+--------------+-------------------------+
	 * |  smem  |  0x4AB00000  |           1MB           |
	 * +--------+--------------+-------------------------+
	 * |        |              |                         |
	 * |   TZ   |  0x4AC00000  |           4MB           |
	 * |        |              |                         |
	 * +--------+--------------+-------------------------+
	 * |        |              |                         |
	 * |        |              |                         |
	 * |        |              |                         |
	 * |   Q6   |  0x4B000000  |          24MB           |
	 * |        |              |                         |
	 * |        |              |                         |
	 * +--------+--------------+-------------------------+
	 * | M3 Dump|  0x4C800000  |           1MB           |
	 * +--------+--------------+-------------------------+
	 * |  QDSS  |  0x4C900000  |           1MB           |
	 * +--------+--------------+-------------------------+
	 * | caldb  |  0x4CA00000  |           2MB           |
	 * +--------+--------------+-------------------------+
	 * |        |              |                         |
	 * |QCN9000 |  0x4CC00000  |          30MB           |
	 * |        |              |                         |
	 * +--------+--------------+-------------------------+
	 * |        |              |                         |
	 * |  MHI1  |  0x4EA00000  |          16MB           |
	 * |        |              |                         |
	 * +--------+--------------+-------------------------+
	 * |                                                 |
	 * |      Rest of the memory for Linux               |
	 * |                                                 |
	 * +=================================================+
	 */
		q6_region: wcnss@4b000000 {
			no-map;
			reg = <0x0 0x4b000000 0x0 0x01800000>;
		};

		m3_dump@4c800000 {
			no-map;
			reg = <0x0 0x4c800000 0x0 0x100000>;
		};

		q6_etr_region:q6_etr_dump@4c900000 {
			no-map;
			reg = <0x0 0x4c900000 0x0 0x100000>;
		};

		q6_caldb_region:q6_caldb_region@4ca00000 {
			no-map;
			reg = <0x0 0x4ca00000 0x0 0x200000>;
		};

		qcn9000_pcie0@4cc00000 {
			no-map;
			reg = <0x0 0x4CC00000 0x0 0x01E00000>;
		};

		mhi_region1: dma_pool1@4ea00000 {
			compatible = "shared-dma-pool";
			no-map;
			reg = <0x0 0x4ea00000 0x0 0x01000000>;
		};
	#else
	/*                      1G Profile
	 * +=========+==============+========================+
	 * |        |              |                         |
	 * | Region | Start Offset |          Size           |
	 * |        |              |                         |
	 * +--------+--------------+-------------------------+
	 * |        |              |                         |
	 * |        |              |                         |
	 * |  NSS   |  0x40000000  |          16MB           |
	 * |        |              |                         |
	 * |        |              |                         |
	 * +--------+--------------+-------------------------+
	 * |        |              |                         |
	 * |        |              |                         |
	 * |        |              |                         |
	 * |        |              |                         |
	 * | Linux  |  0x41000000  | Depends on total memory |
	 * |        |              |                         |
	 * |        |              |                         |
	 * |        |              |                         |
	 * |        |              |                         |
	 * +--------+--------------+-------------------------+
	 * |        |              |                         |
	 * | uboot  |  0x4A600000  |           4MB           |
	 * |        |              |                         |
	 * +--------+--------------+-------------------------+
	 * |  SBL   |  0x4AA00000  |           1MB           |
	 * +--------+--------------+-------------------------+
	 * |  smem  |  0x4AB00000  |           1MB           |
	 * +--------+--------------+-------------------------+
	 * |        |              |                         |
	 * |   TZ   |  0x4AC00000  |           4MB           |
	 * |        |              |                         |
	 * +--------+--------------+-------------------------+
	 * |        |              |                         |
	 * |        |              |                         |
	 * |        |              |                         |
	 * |   Q6   |  0x4B000000  |          24MB           |
	 * |        |              |                         |
	 * |        |              |                         |
	 * +--------+--------------+-------------------------+
	 * | M3 Dump|  0x4C800000  |           1MB           |
	 * +--------+--------------+-------------------------+
	 * |  QDSS  |  0x4C900000  |           1MB           |
	 * +--------+--------------+-------------------------+
	 * | caldb  |  0x4CA00000  |           2MB           |
	 * +--------+--------------+-------------------------+
	 * |        |              |                         |
	 * |QCN9000 |  0x4CC00000  |          45MB           |
	 * |        |              |                         |
	 * +--------+--------------+-------------------------+
	 * |        |              |                         |
	 * |  MHI1  |  0x4F900000  |          24MB           |
	 * |        |              |                         |
	 * +--------+--------------+-------------------------+
	 * |                                                 |
	 * |      Rest of the memory for Linux               |
	 * |                                                 |
	 * +=================================================+
	 */
		q6_region: wcnss@4b000000 {
			no-map;
			reg = <0x0 0x4b000000 0x0 0x01800000>;
		};

		m3_dump@4c800000 {
			no-map;
			reg = <0x0 0x4c800000 0x0 0x100000>;
		};

		q6_etr_region:q6_etr_dump@4c900000 {
			no-map;
			reg = <0x0 0x4c900000 0x0 0x100000>;
		};

		q6_caldb_region:q6_caldb_region@4ca00000 {
			no-map;
			reg = <0x0 0x4ca00000 0x0 0x200000>;
		};

		qcn9000_pcie0@4cc00000 {
			no-map;
			reg = <0x0 0x4CC00000 0x0 0x02D00000>;
		};

		mhi_region1: dma_pool1@4F900000 {
			compatible = "shared-dma-pool";
			no-map;
			reg = <0x0 0x4F900000 0x0 0x01800000>;
		};
	#endif
	};

	soc {
		serial@78af000 {
			status = "ok";
		};

		blsp1_uart2: serial@78b0000 {
			pinctrl-0 = <&blsp1_uart_pins>;
			pinctrl-names = "default";
		};

		qpic_bam: dma@7984000{
			status = "ok";
		};

		nand: qpic-nand@79b0000 {
			pinctrl-0 = <&qspi_nand_pins>;
			pinctrl-names = "default";
			status = "ok";
		};

		spi_0: spi@78b5000 { /* BLSP1 QUP0 */
			pinctrl-0 = <&blsp0_spi_pins>;
			pinctrl-names = "default";
			cs-select = <0>;
			status = "ok";

			m25p80@0 {
				#address-cells = <1>;
				#size-cells = <1>;
				reg = <0>;
				compatible = "n25q128a11";
				linux,modalias = "m25p80", "n25q128a11";
				spi-max-frequency = <50000000>;
				use-default-sizes;
			};
		};

		mdio0: mdio@88000 {
			status = "ok";

			ethernet-phy@0 {
				reg = <7>;
			};
		};

		mdio1: mdio@90000 {
			status = "ok";
			pinctrl-0 = <&mdio1_pins>;
			pinctrl-names = "default";
			phy-reset-gpio = <&tlmm 39 0>;
			ethernet-phy@0 {
				reg = <0>;
			};

			ethernet-phy@1 {
				reg = <1>;
			};

			ethernet-phy@2 {
				reg = <2>;
			};

			ethernet-phy@3 {
				reg = <3>;
			};
		};

		ess-instance {
			num_devices = <0x2>;
			ess-switch@0x39c00000 {
				compatible = "qcom,ess-switch-ipq50xx";
				device_id = <0>;
				switch_mac_mode = <0xf>; /* mac mode for uniphy instance*/
				cmnblk_clk = "internal_96MHz"; /* cmnblk clk*/
				qcom,port_phyinfo {
					port@0 {
						port_id = <1>;
						phy_address = <7>;
					};
					port@1 {
						port_id = <2>;
						forced-speed = <1000>;
						forced-duplex = <1>;
					};
				};
				led_source@0 {
					source = <0>;
					mode = "normal";
					speed = "all";
					blink_en = "enable";
					active = "high";
				};
			};
			ess-switch1@1 {
				compatible = "qcom,ess-switch-qca83xx";
				device_id = <1>;
				switch_access_mode = "mdio";
				mdio-bus = <&mdio1>;
				reset_gpio = <0x27>;
				switch_cpu_bmp = <0x40>;  /* cpu port bitmap */
				switch_lan_bmp = <0x1e>; /* lan port bitmap */
				switch_wan_bmp = <0x0>;  /* wan port bitmap */
				qca,ar8327-initvals = <
						0x00004 0x7600000   /* PAD0_MODE */
						0x00008 0x1000000   /* PAD5_MODE */
						0x0000c 0x80        /* PAD6_MODE */
						0x00010 0x2613a0    /* PORT6 FORCE MODE*/
						0x000e4 0xaa545     /* MAC_POWER_SEL */
						0x000e0 0xc74164de  /* SGMII_CTRL */
						0x0007c 0x4e        /* PORT0_STATUS */
						0x00094 0x4e        /* PORT6_STATUS */
				>;
				qcom,port_phyinfo {
					port@0 {
						port_id = <1>;
						phy_address = <0>;
					};
					port@1 {
						port_id = <2>;
						phy_address = <1>;
					};
					port@2 {
						port_id = <3>;
						phy_address = <2>;
					};
					port@3 {
						port_id = <4>;
						phy_address = <3>;
					};
				};
			};
		};

		wifi0: wifi@c000000 {
			qcom,bdf-addr = <0x4BA00000 0x4BA00000 0x4BA00000
						0x0 0x0>;
			qcom,caldb-addr = <0x4CA00000 0x4CA00000 0x4CA00000
						0x0 0x0>;
			qcom,caldb-size = <0x200000>;
			status = "ok";
		};

		ess-uniphy@98000 {
			status = "disabled";
		};

		qcom,sps {
			status = "ok";
		};

		qcom,usbbam@8B04000 {
			status = "ok";
		};

		qcom,diag@0 {
			status = "ok";
		};

		dp2 {
			device_type = "network";
			compatible = "qcom,nss-dp";
			clocks = <&gcc GCC_SNOC_GMAC0_AXI_CLK>;
			clock-names = "nss-snoc-gmac-axi-clk";
			qcom,id = <1>;
			reg = <0x39C00000 0x10000>;
			interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
			qcom,mactype = <2>;
			qcom,link-poll = <1>;
			qcom,phy-mdio-addr = <7>;
			mdio-bus = <&mdio0>;
			local-mac-address = [000000000000];
			phy-mode = "sgmii";
		};

		dp1 {
			device_type = "network";
			compatible = "qcom,nss-dp";
			clocks = <&gcc GCC_SNOC_GMAC1_AXI_CLK>;
			clock-names = "nss-snoc-gmac-axi-clk";
			qcom,id = <2>;
			reg = <0x39D00000 0x10000>;
			interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
			qcom,mactype = <2>;
			local-mac-address = [000000000000];
			phy-mode = "sgmii";
		};

		rpm_etm0 {
			status = "disabled";
		};

		lpass: lpass@0xA000000{
			status = "disabled";
		};

		pcm: pcm@0xA3C0000{
			pinctrl-0 = <&audio_pins>;
			pinctrl-names = "default";
			status = "disabled";
		};

		pcm_lb: pcm_lb@0 {
			status = "disabled";
		};
	};

	thermal-zones {
		status = "ok";
	};

	gpio_keys {
		compatible = "gpio-keys-polled";
		pinctrl-0 = <&button_pins>;
		pinctrl-names = "default";
		poll-interval = <100>;

		button@0 {
			label = "reset";
			linux,code = <KEY_RESTART>;
			gpios = <&tlmm 22 GPIO_ACTIVE_LOW>;
			linux,input-type = <1>;
			debounce-interval = <60>;
		};
		button@1 {
			label = "wps";
			linux,code = <KEY_WPS_BUTTON>;
			gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
			linux,input-type = <1>;
			debounce-interval = <60>;
		};
		
	};

	leds {
		compatible = "gpio-leds";
		pinctrl-0 = <&leds_pins>;
		pinctrl-names = "default";

		led@35 {
			label = "green:4g";
			gpios = <&tlmm 35 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "led_5g_wifi";
			default-state = "off";
		};
		led@30 {
			label = "green:wifi";
			gpios = <&tlmm 30 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "led_2g_wifi";
			default-state = "off";
		};
		led@1 {
			label = "green:internet";
			gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "led_voice";
			default-state = "off";
		};
		led@33 {
			label = "green:lte";
			gpios = <&tlmm 33 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "led_lte_g";
			default-state = "off";
		};		
		led@34 {
			label = "red:lte";
			gpios = <&tlmm 34 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "led_lte_r";
			default-state = "off";
		};	
		led@27 {
			label = "green:mesh";
			gpios = <&tlmm 27 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "led_nr_g";
			default-state = "off";
		};
		led@28 {
			label = "red:mesh";
			gpios = <&tlmm 28 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "led_nr_r";
			default-state = "off";
		};
	};


};

&tlmm {
	pinctrl-0 = <&blsp0_uart_pins &phy_led_pins>;
	pinctrl-names = "default";

	blsp0_uart_pins: blsp0_uart_pins {
		blsp0_uart_rx_tx {
			pins = "gpio20", "gpio21";
			function = "blsp0_uart0";
			bias-disable;
		};
	};

	blsp1_uart_pins: blsp1_uart_pins {
		blsp1_uart_rx_tx {
			pins = "gpio23", "gpio25", "gpio24", "gpio26";
			function = "blsp1_uart2";
			bias-disable;
		};
	};

	blsp0_spi_pins: blsp0_spi_pins {
		mux {
			pins = "gpio10", "gpio11", "gpio12", "gpio13";
			function = "blsp0_spi";
			drive-strength = <2>;
			bias-disable;
		};
	};

	qspi_nand_pins: qspi_nand_pins {
		qspi_clock {
				pins = "gpio9";
				function = "qspi_clk";
				drive-strength = <8>;
				bias-disable;
			};
		qspi_cs {
				pins = "gpio8";
				function = "qspi_cs";
				drive-strength = <8>;
				bias-disable;
			};
		qspi_data_0 {
				pins = "gpio7";
				function = "qspi0";
				drive-strength = <8>;
				bias-disable;
			};
		qspi_data_1 {
				pins = "gpio6";
				function = "qspi1";
				drive-strength = <8>;
				bias-disable;
			};
		qspi_data_2 {
				pins = "gpio5";
				function = "qspi2";
				drive-strength = <8>;
				bias-disable;
			};
		qspi_data_3 {
				pins = "gpio4";
				function = "qspi3";
				drive-strength = <8>;
				bias-disable;
			};
	};

	mdio1_pins: mdio_pinmux {
		mux_0 {
			pins = "gpio36";
			function = "mdc";
			drive-strength = <8>;
			bias-pull-up;
		};

		mux_1 {
			pins = "gpio37";
			function = "mdio";
			drive-strength = <8>;
			bias-pull-up;
		};
	};

	phy_led_pins: phy_led_pins {
		gephy_led_pin {
			pins = "gpio46";
			function = "led0";
			drive-strength = <8>;
			bias-pull-down;
		};
	};

	i2c_pins: i2c_pins {
		i2c_scl {
			pins = "gpio25";
			function = "blsp2_i2c1";
			drive-strength = <8>;
			bias-disable;
		};

		i2c_sda {
			pins = "gpio26";
			function = "blsp2_i2c1";
			drive-strength = <8>;
			bias-disable;
		};
	};

	button_pins: button_pins {
		reset_button{
			pins = "gpio22";
			function = "gpio";
			drive-strength = <8>;
			bias-pull-up;
		};
		
		wps_button {
			pins = "gpio38";
			function = "gpio";
			drive-strength = <8>;
			bias-pull-up;
		};
		
	};
	
	leds_pins: leds_pins {
		led_5g_wifi {
			pins = "gpio35";
			function = "gpio";
			drive-strength = <8>;
			bias-pull-down;
		};
		led_2g_wifi {
			pins = "gpio30";
			function = "gpio";
			drive-strength = <8>;
			bias-pull-down;
		};
		led_lte_g {
			pins = "gpio33";
			function = "gpio";
			drive-strength = <8>;
			bias-pull-down;
		};
		led_lte_r {
			pins = "gpio34";
			function = "gpio";
			drive-strength = <8>;
			bias-pull-down;
		};
		led_nr_g {
			pins = "gpio27";
			function = "gpio";
			drive-strength = <8>;
			bias-pull-down;
		};
		led_nr_r {
			pins = "gpio28";
			function = "gpio";
			drive-strength = <8>;
			bias-pull-down;
		};
		led_voice {
			pins = "gpio1";
			function = "gpio";
			drive-strength = <8>;
			bias-pull-down;
		};	
	};

	audio_pins: audio_pinmux {
		mux_1 {
			pins = "gpio24";
			function = "audio_rxbclk";
			drive-strength = <8>;
			bias-pull-down;
		};

		mux_2 {
			pins = "gpio25";
			function = "audio_rxfsync";
			drive-strength = <8>;
			bias-pull-down;
		};

		mux_3 {
			pins = "gpio26";
			function = "audio_rxd";
			drive-strength = <8>;
			bias-pull-down;
		};

		mux_4 {
			pins = "gpio27";
			function = "audio_txmclk";
			drive-strength = <8>;
			bias-pull-down;
		};

		mux_5 {
			pins = "gpio28";
			function = "audio_txbclk";
			drive-strength = <8>;
			bias-pull-down;
		};

		mux_6 {
			pins = "gpio29";
			function = "audio_txfsync";
			drive-strength = <8>;
			bias-pull-down;
		};

		mux_7 {
			pins = "gpio30";
			function = "audio_txd";
			drive-strength = <8>;
			bias-pull-down;
		};
	};

};

&usb3 {
	qcom,multiplexed-phy;
	qcom,phy-mux-regs = <&tcsr_q6_block 0x2540>;
	device-power-gpio = <&tlmm 24 1>;
	status = "ok";
};

&eud {
	status = "ok";
};

&pcie_x1 {
	status = "disabled";
	perst-gpio = <&tlmm 18 1>;
};

&pcie_x2 {
	status = "ok";
	perst-gpio = <&tlmm 15 1>;
};

&bt {
	status = "ok";
};

&wcss {
	status = "ok";
};

&q6v5_wcss {
	status = "disabled";
};

&q6v5_m3 {
	status = "disabled";
};

&tcsr_mutex_block {
	status = "ok";
};

&tcsr_mutex {
	status = "ok";
};

&smem {
	status = "ok";
};

&apcs_glb {
	status = "ok";
};

&tcsr_q6_block {
	status = "ok";
};

&qcom_q6v5_wcss {
	#ifdef __IPQ_MEM_PROFILE_256_MB__
		memory-region = <&q6_region>, <&q6_etr_region>;
	#else
		memory-region = <&q6_region>, <&q6_etr_region>,
				<&q6_caldb_region>;
	#endif
	/* IPQ5018 */
	q6v5_wcss_userpd1 {
		m3_firmware = "IPQ5018/m3_fw.mdt";
		interrupts-extended = <&wcss_smp2p_in 8 0>,
			<&wcss_smp2p_in 9 0>,
			<&wcss_smp2p_in 12 0>,
			<&wcss_smp2p_in 11 0>;
		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";
		qca,asid = <1>;
		qca,auto-restart;
		qca,int_radio;
	};
};

&i2c_0 {
	pinctrl-0 = <&i2c_pins>;
	pinctrl-names = "default";
	status = "disabled";
};

&dbm_1p5 {
	status = "ok";
};

&msm_imem {
	status = "ok";
};

&blsp1_uart1 {
	status = "ok";
};

&ssuniphy_0 {
	status = "ok";
};

&hs_m31phy_0 {
	status = "ok";
};

&pcie_x1phy {
	status = "disabled";
};

&pcie_x2phy {
	status = "ok";
};

&pcie_x1_rp {
	status = "disabled";

	mhi_0: qcom,mhi@0 {
		reg = <0 0 0 0 0 >;
	};
};

&pcie_x2_rp {
	status = "ok";

	mhi_1: qcom,mhi@1 {
		reg = <0 0 0 0 0 >;
		qrtr_instance_id = <0x20>;
		#address-cells = <0x2>;
		#size-cells = <0x2>;
		memory-region = <&mhi_region1>;
#if !defined(__CNSS2__)
		base-addr = <0x4CC00000>;
		m3-dump-addr = <0x4E000000>;
		etr-addr = <0x4E100000>;
		qcom,caldb-addr = <0x4E200000>;
		qcom,tgt-mem-mode = <0x1>;
		mhi,max-channels = <30>;
		mhi,timeout = <10000>;
#endif
	};
};

&wifi0 {
	/* IPQ5018 */
	qcom,board_id = <0x24>;
	status = "ok";
};

&wifi3 {
	/* QCN9000 5G */
	board_id = <0xa0>;
	status = "ok";
};

&qfprom {
	status = "ok";
};

&tsens {
	status = "ok";
};

so far ive gotten a image built yet its failing with

Verifying Hash Integrity ... crc32+ sha1+ OK
## Loading fdt from FIT Image at 44000000 ...
   Using 'config@mp03.1' configuration
   Trying 'fdt-1' fdt subimage
     Description:  ARM64 OpenWrt optimcloud_d50 device tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x449ec824
     Data Size:    27247 Bytes = 26.6 KiB
     Architecture: AArch64
     Hash algo:    crc32
     Hash value:   563f9f23
     Hash algo:    sha1
     Hash value:   fe9653ef0f510ee8aef37eba97f9549c09ef4483
   Verifying Hash Integrity ... crc32+ sha1+ OK
   Booting using the fdt blob at 0x449ec824
   Uncompressing Kernel Image ... OK
   Loading Device Tree to 4a3f6000, end 4a3ffa6e ... OK
fdt_fixup_qpic: QPIC: unable to find node '/soc/qpic-nand@79b0000'
Could not find PCI in device tree
Using machid 0x8040001 from environment

Starting kernel ...

Jumping to AARCH64 kernel via monitor
[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x51af8014]
[    0.000000] Linux version 5.15.147 (dingo@misery) (aarch64-openwrt-linux-musl-gcc (OpenWrt GCC 12.3.0 r25252-7fd2377f85) 12.3.0, GNU ld (GNU Binutils) 2.40.0) #0 SMP PREEMPT Thu Mar 7 16:16:34 2024
[    0.000000] Machine model: OptimCloud D50-5G
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000040000000-0x000000005fffffff]
[    0.000000]   DMA32    empty
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000040000000-0x000000004a7fffff]
[    0.000000]   node   0: [mem 0x000000004a800000-0x000000004adfffff]
[    0.000000]   node   0: [mem 0x000000004ae00000-0x000000004affffff]
[    0.000000]   node   0: [mem 0x000000004b000000-0x000000004fffffff]
[    0.000000]   node   0: [mem 0x0000000050000000-0x000000005fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x000000005fffffff]
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.0 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] psci: SMC Calling Convention v1.0
[    0.000000] psci: OSI mode supported.
[    0.000000] percpu: Embedded 20 pages/cpu s44760 r8192 d28968 u81920
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: detected: Spectre-v4
[    0.000000] CPU features: kernel page table isolation disabled by kernel configuration
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 129024
[    0.000000] Kernel command line: xu_whitelabel=XU xu_hwlbl=R5Q-D50-1G-DB4-EM console=ttyMSM0,115200n8 swiotlb=1 coherent_pool=2M
[    0.000000] Unknown kernel command line parameters "xu_whitelabel=XU xu_hwlbl=R5Q-D50-1G-DB4-EM", will be passed to user space.
[    0.000000] Dentry cache hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    0.000000] Inode-cache hash table entries: 32768 (order: 6, 262144 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 389388K/524288K available (8256K kernel code, 892K rwdata, 2512K rodata, 25408K init, 289K bss, 134900K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000]  Trampoline variant of Tasks RCU enabled.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] Root IRQ handler: gic_handle_irq
[    0.000000] GICv2m: range[mem 0x0b00a000-0x0b00aff7], SPI[448:479]
[    0.000000] GICv2m: range[mem 0x0b00b000-0x0b00bff7], SPI[480:511]
[    0.000000] arch_timer: cp15 and mmio timer(s) running at 24.00MHz (virt/virt).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000000] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000123] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.000144] pid_max: default: 32768 minimum: 301
[    0.000690] Mount-cache hash table entries: 1024 (order: 1, 8192 bytes, linear)
[    0.000715] Mountpoint-cache hash table entries: 1024 (order: 1, 8192 bytes, linear)
[    0.004142] rcu: Hierarchical SRCU implementation.
[    0.004458] dyndbg: Ignore empty _ddebug table in a CONFIG_DYNAMIC_DEBUG_CORE build
[    0.005065] smp: Bringing up secondary CPUs ...
[    0.006084] Detected VIPT I-cache on CPU1
[    0.006163] CPU1: Booted secondary processor 0x0000000001 [0x51af8014]
[    0.006367] smp: Brought up 1 node, 2 CPUs
[    0.006394] SMP: Total of 2 processors activated.
[    0.006404] CPU features: detected: 32-bit EL0 Support
[    0.006413] CPU features: detected: CRC32 instructions
[    0.006494] CPU features: emulated: Privileged Access Never (PAN) using TTBR0_EL1 switching
[    0.006507] CPU: All CPU(s) started at EL1
[    0.006534] alternatives: patching kernel code
[    0.014860] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.014898] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[    0.015189] pinctrl core: initialized pinctrl subsystem
[    0.017279] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.018312] DMA: preallocated 2048 KiB GFP_KERNEL pool for atomic allocations
[    0.018637] DMA: preallocated 2048 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[    0.018940] DMA: preallocated 2048 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.019628] thermal_sys: Registered thermal governor 'step_wise'
[    0.019640] thermal_sys: Registered thermal governor 'user_space'
[    0.020927] cpuidle: using governor ladder
[    0.021242] cpuidle: using governor menu
[    0.021556] NET: Registered PF_QIPCRTR protocol family
[    0.021800] ASID allocator initialised with 65536 entries
[    0.095982] DRBG: Continuing without Jitter RNG
[    0.150494] SCSI subsystem initialized
[    0.150778] usbcore: registered new interface driver usbfs
[    0.150865] usbcore: registered new interface driver hub
[    0.150918] usbcore: registered new device driver usb
[    0.150968] pps_core: LinuxPPS API ver. 1 registered
[    0.150977] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.150999] PTP clock support registered
[    0.151312] qcom_scm: convention: smc arm 64
[    0.151353] qcom_scm firmware:scm: No available mechanism for setting download mode
[    0.151833] Advanced Linux Sound Architecture Driver Initialized.
[    0.152777] Bluetooth: Core ver 2.22
[    0.152850] NET: Registered PF_BLUETOOTH protocol family
[    0.152862] Bluetooth: HCI device and connection manager initialized
[    0.152880] Bluetooth: HCI socket layer initialized
[    0.152891] Bluetooth: L2CAP socket layer initialized
[    0.152918] Bluetooth: SCO socket layer initialized
[    0.153520] clocksource: Switched to clocksource arch_sys_counter
[    0.154949] NET: Registered PF_INET protocol family
[    0.155136] IP idents hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.156026] tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.156061] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.156090] TCP established hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.156147] TCP bind hash table entries: 4096 (order: 4, 65536 bytes, linear)
[    0.156236] TCP: Hash tables configured (established 4096 bind 4096)
[    0.156402] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.156447] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.156821] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.156884] PCI: CLS 0 bytes, default 64
[    0.158676] workingset: timestamp_bits=46 max_order=17 bucket_order=0
[    0.167701] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.167732] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.224551] Key type asymmetric registered
[    0.224579] Asymmetric key parser 'x509' registered
[    0.232663] qcom-pcie a0000000.pcie: host bridge /soc@0/pcie@a0000000 ranges:
[    0.232761] qcom-pcie a0000000.pcie:       IO 0x00a0200000..0x00a02fffff -> 0x00a0200000
[    0.232804] qcom-pcie a0000000.pcie:      MEM 0x00a0300000..0x00b02fffff -> 0x00a0300000
[    0.365122] qcom-pcie a0000000.pcie: iATU unroll: enabled
[    0.365147] qcom-pcie a0000000.pcie: Detected iATU regions: 8 outbound, 8 inbound
[    0.465244] qcom-pcie a0000000.pcie: Link up
[    0.465440] qcom-pcie a0000000.pcie: PCI host bridge to bus 0001:00
[    0.465460] pci_bus 0001:00: root bus resource [bus 00-ff]
[    0.465478] pci_bus 0001:00: root bus resource [io  0x0000-0xfffff] (bus address [0xa0200000-0xa02fffff])
[    0.465491] pci_bus 0001:00: root bus resource [mem 0xa0300000-0xb02fffff]
[    0.465539] pci 0001:00:00.0: [17cb:1004] type 01 class 0x060400
[    0.465565] pci 0001:00:00.0: reg 0x10: [mem 0x00000000-0x00000fff]
[    0.465644] pci 0001:00:00.0: PME# supported from D0 D3hot D3cold
[    0.469048] pci 0001:01:00.0: [17cb:1104] type 00 class 0x028000
[    0.469172] pci 0001:01:00.0: reg 0x10: [mem 0x00000000-0x001fffff 64bit]
[    0.469709] pci 0001:01:00.0: PME# supported from D0 D3hot D3cold
[    0.469835] pci 0001:01:00.0: 8.000 Gb/s available PCIe bandwidth, limited by 5.0 GT/s PCIe x2 link at 0001:00:00.0 (capable of 15.752 Gb/s with 8.0 GT/s PCIe x2 link)
[    0.472852] pci 0001:00:00.0: BAR 8: assigned [mem 0xa0400000-0xa05fffff]
[    0.472882] pci 0001:00:00.0: BAR 0: assigned [mem 0xa0300000-0xa0300fff]
[    0.472907] pci 0001:01:00.0: BAR 0: assigned [mem 0xa0400000-0xa05fffff 64bit]
[    0.472977] pci 0001:00:00.0: PCI bridge to [bus 01-ff]
[    0.472993] pci 0001:00:00.0:   bridge window [mem 0xa0400000-0xa05fffff]
[    0.477233] msm_serial 78af000.serial: msm_serial: detected port #0
[    0.477288] msm_serial 78af000.serial: uartclk = 0
[    0.477345] 78af000.serial: ttyMSM0 at MMIO 0x78af000 (irq = 20, base_baud = 0) is a MSM
[    0.477383] msm_serial: console setup on port #0
[    1.303813] printk: console [ttyMSM0] enabled
[    1.309067] msm_serial: driver initialized
[    1.325391] brd: module loaded
[    1.330919] loop: module loaded
[    1.334234] i2c_dev: i2c /dev entries driver
[    1.335596] qcom_wdt b017000.watchdog: failed to get input clock
[    1.337660] Bluetooth: HCI UART driver ver 2.3
[    1.343630] Bluetooth: HCI UART protocol H4 registered
[    1.347808] Bluetooth: HCI UART protocol BCSP registered
[    1.352971] Bluetooth: HCI UART protocol QCA registered
[    1.358889] cpufreq: cpufreq_online: ->get() failed
[    1.363438] cpufreq: cpufreq_online: ->get() failed
[    1.368292] cpufreq-dt cpufreq-dt: failed register driver: -19
[    1.373439] sdhci: Secure Digital Host Controller Interface driver
[    1.379014] sdhci: Copyright(c) Pierre Ossman
[    1.385152] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.390214] qcom-q6-mpd: probe of cd00000.remoteproc failed with error -22
[    1.397363] NET: Registered PF_INET6 protocol family
[    1.404011] Segment Routing with IPv6
[    1.407150] In-situ OAM (IOAM) with IPv6
[    1.410735] NET: Registered PF_PACKET protocol family
[    1.415069] 8021q: 802.1Q VLAN Support v1.8
[    1.439308] debugfs: Directory '4a9000.thermal-sensor' with parent 'tsens' already present!
[    1.440894] qcom_wdt b017000.watchdog: failed to get input clock
[    1.447083] qcom_wdt b017000.watchdog: failed to get input clock
[    1.454013] ALSA devic[    1.476268] Freeing unused kernel memory: 25408K
[    1.483652] Run /init as init process
[    1.988573] init: Console is alive
[    2.002247] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    2.005982] ipq5018-tlmm 1000000.pinctrl: pin GPIO_38 already requested by soc@0:gpio_keys; cannot claim for keys
[    2.006090] qcom_wdt b017000.watchdog: failed to get input clock
[    2.008020] ipq5018-tlmm 1000000.pinctrl: pin-38 (keys) status -22
[    2.025014] ipq5018-tlmm 1000000.pinctrl: could not request pin 38 (GPIO_38) from group gpio38  on device 1000000.pinctrl
[    2.030334] gpio-keys keys: Error applying setting, reverse things back
[    2.051531] ssdk_switch_device_num_init[1335]:INFO:ess-switch dts node number: 2
[    2.051661] ssdk_dt_get_switch_node[1124]:INFO:ess-switch DT exist!
[    2.058076] ssdk_dt_parse_access_mode[994]:ERROR:ess-switch: error reading properties for switch_access_mode
[    2.064033] ssdk_plat_init[1692]:INFO:ssdk_plat_init start
[    2.074277] miibus_get[778]:ERROR:No MDIO node found in DTS!
[    2.079477] ssdk_dt_get_switch_node[1124]:INFO:ess-switch DT exist!
[    2.085226] ssdk_dt_parse_access_mode[999]:INFO:switch_access_mode: mdio
[    2.091162] ssdk_dt_parse_mac_mode[324]:INFO:mac mode doesn't exit!
[    2.098128] ssdk_dt_parse_mac_mode[333]:INFO:mac mode1 doesn't exit!
[    2.104111] ssdk_dt_parse_mac_mode[342]:INFO:mac mode2 doesn't exit!
[    2.110724] ssdk_dt_parse[1228]:INFO:switch node is qca83xx!
[    2.117057] ssdk_plat_init[1692]:INFO:ssdk_plat_init start
[    2.122692] Unable to handle kernel access to user memory outside uaccess routines at virtual address 0000000000000470
[    2.127998] Mem abort info:
[    2.138656]   ESR = 0x0000000096000005
[    2.141331]   EC = 0x25: DABT (current EL), IL = 32 bits
[    2.145165]   SET = 0, FnV = 0
[    2.150618]   EA = 0, S1PTW = 0
[    2.153483]   FSC = 0x05: level 1 translation fault
[    2.156523] Data abort info:
[    2.161381]   ISV = 0, ISS = 0x00000005
[    2.164522]   CM = 0, WnR = 0
[    2.168066] user pgtable: 4k pages, 39-bit VAs, pgdp=0000000040e5b000
[    2.171194] [0000000000000470] pgd=0800000044a53003, p4d=0800000044a53003, pud=0800000044a53003, pmd=0000000000000000
[    2.177652] Internal error: Oops: 0000000096000005 [#1] PREEMPT SMP
[    2.188209] Modules linked in: qca_ssdk(+) gpio_button_hotplug
[    2.194286] CPU: 0 PID: 90 Comm: kmodloader Not tainted 5.15.147 #0
[    2.200188] Hardware name: OptimCloud D50-5G (DT)
[    2.206351] pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[    2.211213] pc : mutex_lock+0xc/0x40
[    2.217980] lr : qca_ar8216_mii_read+0x38/0xbc [qca_ssdk]
[    2.221805] sp : ffffff8000fbf840
[    2.227094] x29: ffffff8000fbf840 x28: ffffffc00088e9d0 x27: 000000000000001b
[    2.230397] x26: 0000000000000001 x25: ffffffc000864cc0 x24: ffffffc000864c20
[    2.237514] x23: 0000000000000001 x22: 0000000000000470 x21: 0000000000000000
[    2.244632] x20: 0000000000000000 x19: 0000000000000000 x18: ffffffc00a388268
[    2.251751] x17: 7020676e69646165 x16: 7220726f72726520 x15: 000000000000023a
[    2.258868] x14: 00000000000000be x13: ffffff8000fbf558 x12: ffffffc00a3e0268
[    2.265987] x11: 0000000000000030 x10: 0101010101010101 x9 : 0000000000000000
[    2.273104] x8 : 0000000000000000 x7 : 0000000000000003 x6 : 0000000040010002
[    2.280223] x5 : ffffffc000864c20 x4 : ffffff8000ca6960 x3 : 0000000000000001
[    2.287341] x2 : ffffff8004a25240 x1 : 0000000000000000 x0 : 0000000000000470
[    2.294461] Call trace:
[    2.301574]  mutex_lock+0xc/0x40
[    2.303829]  qca_mac_sw_sync_work_task+0xc4/0x580 [qca_ssdk]
[    2.307305]  init_module+0x298/0x1000 [qca_ssdk]
[    2.312947]  do_one_initcall+0x4c/0x1b0
[    2.317545]  do_init_module+0x40/0x1cc
[    2.321104]  load_module+0x1bbc/0x23d4
[    2.324924]  __do_sys_init_module+0x1ac/0x28c
[    2.328658]  __arm64_sys_init_module+0x18/0x20
[    2.333084]  invoke_syscall+0x50/0x120
[    2.337423]  el0_svc_common.constprop.0+0x48/0xf0
[    2.341158]  do_el0_svc+0x18/0x20
[    2.345930]  el0_svc+0x14/0x4c
[    2.349228]  el0t_64_sync_handler+0xe0/0x110
[    2.352181]  el0t_64_sync+0x15c/0x160
[    2.356613] Code: d503201f d2800001 d5384102 f9800011 (c85ffc03) 
[    2.360175] ---[ end trace 603a31f7be3d46d7 ]---
[    2.366247] Kernel panic - not syncing: Oops: Fatal exception
[    2.370934] SMP: stopping secondary CPUs
[    2.376583] Kernel Offset: disabled
[    2.380565] CPU features: 0x0,00000041,00000802
[    2.383780] Memory Limit: none
[    2.388294] Rebooting in 5 seconds..