Re: [PATCH v5 5/6] phy: realtek: usb2: add support for RTL9607C USB2 PHY

From: Vladimir Oltean

Date: Tue May 05 2026 - 07:45:51 EST


On Tue, Apr 21, 2026 at 12:19:40AM +0500, Rustam Adilov wrote:
> Add support for the usb2 phy of RTL9607C series based SoCs.
> Add the macros and phy config struct for rtl9607.
>
> RTL9607C requires to clear a "force host disconnect" bit in the
> specific register (which is at an offset from reg_wrap_vstatus)
> before proceeding with phy parameter writes. Since it belongs into
> the vstatus register region, it doesn't need bytes swapping.
>
> Add the bool variable to the driver data struct and hide this whole
> procedure under the if statement that checks this new variable.
>
> Add the appropriate little endian read and write functions for rtl9607
> and assign them to its phy config struct.
>
> As mentioned earlier, the readl/writel are native endian on MIPS arch
> if SWAP_IO_SPACE is not enabled. Since enabling SWAP_IO_SPACE results
> in boot hang on RTL9607C machine, wrapping le32 around readl/writel
> should be a good compromise, but swab32 could be also work.
>
> Co-developed-by: Michael Zavertkin <misha.zavertkin@xxxxxxx>
> Signed-off-by: Michael Zavertkin <misha.zavertkin@xxxxxxx>
> Signed-off-by: Rustam Adilov <adilov@xxxxxxxxxxx>
> ---

Have you considered ioread32() instead of wrapping le32 around readl()?