Can't connect multiple modules to the SPI instance

Hello.

I found this in the sx126x.c driver:

BUILD_ASSERT(DT_NUM_INST_STATUS_OKAY(semtech_sx1261) +
	     DT_NUM_INST_STATUS_OKAY(semtech_sx1262) +
	     DT_NUM_INST_STATUS_OKAY(st_stm32wl_subghz_radio) <= 1,
	     "Multiple SX126x instances in DT");

These lines did not allow adding more than one device to the overlay. I removed this code and rewrote all driver files (those that I could find, which are module drivers (semtech libraries)) to work with multiple module instances. The build runs without errors, but I still get errors in the registers. Is there any way to allow the initialization of multiple modules? I work with ncs 2.8.0.

Here is my overlay:

&spi1 {
	compatible = "nordic,nrf-spi";
	status = "okay";
    cs-gpios = <&gpio0 15 GPIO_ACTIVE_LOW>,
                <&gpio0 12 GPIO_ACTIVE_LOW>;

	pinctrl-0 = <&spi1_default>;
	pinctrl-1 = <&spi1_sleep>;
	pinctrl-names = "default", "sleep";

    lora0: sx1262@0 {
        compatible = "semtech,sx1262";
        status = "okay";
        reg = <0>;
        reset-gpios = <&gpio0 19 GPIO_ACTIVE_LOW>;
        busy-gpios = <&gpio0 20 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>;
        dio1-gpios = <&gpio0 7 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>;
        spi-max-frequency = <2000000>;
    };

    lora1: sx1262@1 {
        compatible = "semtech,sx1262";
        status = "okay";
        reg = <1>;
        reset-gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
        busy-gpios = <&gpio0 14 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>;
        dio1-gpios = <&gpio0 8 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>;
        spi-max-frequency = <2000000>;
    };
};

/ {
    aliases {
            lora0 = &lora0;
            lora1 = &lora1;
    };
};

Related