[Bug 297618] GPIO pinctrl overlays fail silently on rk3566 for UARTs on M1+

[email protected]
Newsgroups gmane.os.freebsd.devel.arm
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=297618

            Bug ID: 297618
           Summary: GPIO pinctrl overlays fail silently on rk3566 for
                    UARTs on M1+
           Product: Base System
           Version: 15.1-RELEASE
          Hardware: arm64
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: arm
          Assignee: [email protected]
          Reporter: [email protected]

On FreeBSD 15.1-RELEASE and FreeBSD 16.0-CURRENT, pins on GPIO headers do not
respond on a Radxa Zero 3E / RK3566 when enabled with overlays if they are a
multiplexing variant 1 or higher.

UART3_RX_M0, UART3_TX_M0: works
UART4_RX_M1, UART4_RX_M1: fails


### References

I'm using a Radxa Zero 3E. Anything but M0 seem to fail:
https://docs.radxa.com/en/zero/zero3/hardware-design/hardware-interface

Other users experiencing problems. Patches discussed:
https://forums.freebsd.org/threads/enabling-uarts-on-rk3566-radxa-zero-3e.101491/


### Exact steps to reproduce

cat << EOF >> /root/uart3.dtso
/dts-v1/;
/plugin/;

/ {
    compatible = "radxa,zero3", "rockchip,rk3566";

    fragment@0 {
        target = <&uart3>;
        __overlay__ {
            status = "okay";
            pinctrl-names = "default";
            pinctrl-0 = <&uart3m0_xfer>;
        };
    };
};
EOF


cat << EOF >> /root/uart4.dtso
/dts-v1/;
/plugin/;

/ {
    compatible = "radxa,zero3", "rockchip,rk3566";

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

dtc -O dtb -o /boot/dtb/overlays/rk3566-uart3-enable.dtbo -b 0 -@
/root/uart3.dtso
dtc -O dtb -o /boot/dtb/overlays/rk3566-uart4-enable.dtbo -b 0 -@
/root/uart4.dtso

vi /boot/loader.conf
```
# Overlays
fdt_overlays="rk3566-uart3-enable.dtbo,rk3566-uart4-enable.dtbo"
```

reboot

# Loopback Test S3 and S4
pkg install picocom

picocom -b 115200 --flow none --databits 8 --parity none --stopbits 1
/dev/cuau1
# result: works (characters echo)

picocom -b 115200 --flow none --databits 8 --parity none --stopbits 1
/dev/cuau2
# result: fails (no output on screen)

-- 
You are receiving this mail because:
You are the assignee for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.