Zero 3e uart 5 issues

I was not able to get additional uarts to work using rsetup with the debian image.

I rebuilt the system using gentoo and was able to get it to boot, but the ethernet would not work. After updating uboot, it seemed to work, but the uarts still did not work.

I created my own overlay like this:

/dts-v1/;
/plugin/;

/ {
    fragment@0 {
	target = <&uart3>;
        __overlay__ {
	   status = "okay";
        };
    };

    fragment@1 {
	target = <&uart4>;
	__overlay__ {
	   status = "okay";
	};
    };

    fragment@3 {
	target = <&uart9>;
	__overlay__ {
	   status = "okay";
	};
    };
};

and this portion works, but if I add a fragment for uart5, I get this when booting:

[    2.040397] rockchip-pinctrl pinctrl: pin gpio2-2 already requested by fe690000.serial; cannot claim for fe2b0000.mmc
[    2.041453] rockchip-pinctrl pinctrl: error -EINVAL: pin-66 (fe2b0000.mmc)
[    2.042093] rockchip-pinctrl pinctrl: error -EINVAL: could not request pin 66 (gpio2-2) from group sdmmc0-clk on device rockchip-pinctrl
[    2.042265] arm-scmi arm-scmi.8.auto: Using scmi_smc_transport
[    2.043178] dwmmc_rockchip fe2b0000.mmc: Error applying setting, reverse things back

which makes teh system unbootable as it can’t read the SD card.

Is the dts defined incorrectly? I don’t think enabling the UART should do this. Is it actually on a different interface number?

@desu Your UART5 device tree configuration is incorrect. By default, UART5 uses the uart5-m0 channel, which is multiplexed with SDMMC. However, the 40-pin header on the 3E board uses the uart5-m1 channel instead.
Please refer to our overlay configuration for the correct setup:https://github.com/radxa-pkg/radxa-overlays/blob/main/arch/arm64/boot/dts/rockchip/overlays/rk3568-uart5-m1.dts

Thanks, I was able tof ix it using this config:

/dts-v1/;
/plugin/;

/ {
    metadata {
	title = "Enable radxa zero 3 uart";
	compatible = "radxa,zero3";
	category = "misc";
	exclusive = "GPIO3_C2", "GPIO3_C3";
	description = "Enable UARTs on Radxa Zero 3";
    };
    
    fragment@0 {
	target = <&uart3>;
        __overlay__ {
	   status = "okay";
        };
    };

    fragment@1 {
	target = <&uart4>;
	__overlay__ {
	   status = "okay";
	   pinctrl-names = "default";
	   pinctrl-0 = <&uart4m1_xfer>;
	};
    };
    
    fragment@2 {
	target = <&uart5>;
	__overlay__ {
	   status = "okay";
	   pinctrl-names = "default";
	   pinctrl-0 = <&uart5m1_xfer>;
	};
    };

    fragment@3 {
	target = <&uart9>;
	__overlay__ {
	   status = "okay";
	   pinctrl-names = "default";
	   pinctrl-0 = <&uart9m1_xfer>;
	};
    };
};

side note, i made my dtb’s using “make dtbs”, but this removes symbols making it impossible to use overlays. Is there a reasonable way to make dtbs with symbols using mainline linux sources? dtc won’t work with the dts’s in the kernel sources as they have headers. I had to use gcc to precompile them, then use dtc to make a dtb with symbols so I could use my custom overlays.