Page 1 of 1

UART0_M0 not setting up /dev/ttyS0

Posted: 2025-06-17 21:22
by luckfox_prototyper
Hi everyone 😊

We're developing an application using Core1106 which communicates over UART to some other peripheral.
I've previously successfully setup a UART communication over UART0_M1 (GPIO2_B0 and GPIO2_B1). I've selected uart0m1_xfer in my device tree for &uart0 and everything was working. However we updated our layout and connected this UART communication to UART0_M0(GPIO0_A0 and GPIO0_A1). I've updated my device tree to use uart0m0_xfer instead of uart0m1_xfer and removed the uart0m0_cnts, but on boot it doesn't setup a /dev/ttyS0 port like previously. I've disabled the RTC, which was using GPIO0_A0 and tested a bunch of other dts setups and I did enable UART0_M0 manually in luckfox-config as well. None seemed to work and checking in the device tree it looks like I'm still having some errors.

Anyone has any idea how to get it working?

rv1106g-luckfox-pico-pi-w.dts uart definition

Code: Select all

/**********RTC**********/
&rtc {
	status = "disabled";
};

/**********BT**********/
&uart0 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&uart0m0_xfer>;
};
Forced output of flashed device tree:

Code: Select all

[root@luckfox root]# dtc -I fs /sys/firmware/devicetree/base/serial@ff4a0000/ -f
<stdout>: ERROR (name_properties): /: "name" property is incorrect ("serial" instead of base node name)
Warning: Input tree has errors, output forced
/dts-v1/;

/ {
        reg-io-width = <0x04>;
        compatible = "rockchip,rv1106-uart\0snps,dw-apb-uart";
        clocks = <0x02 0xac 0x02 0x3f>;
        clock-names = "baudclk\0apb_pclk";
        status = "okay";
        interrupts = <0x00 0x19 0x04>;
        reg = <0xff4a0000 0x100>;
        clock-frequency = <0x16e3600>;
        pinctrl-0 = <0x45>;
        dmas = <0x44 0x07 0x44 0x06>;
        reg-shift = <0x02>;
        name = "serial";
        pinctrl-names = "default";
};
[root@luckfox root]#

Re: UART0_M0 not setting up /dev/ttyS0

Posted: 2025-06-19 1:27
by Crocodile
Hello, if the pins of UART0_M0 are occupied by other pins, the driver loading may fail, resulting in the absence of /dev/ttyS0. You can check the startup log by using the command "cat /var/log/messages" to determine.

The operation of luckfox-config is dependent on the original dts. It does not support the use on the kernel that has been modified by dts.