Re: [PATCH v6 3/9] phy: rockchip-samsung-dcphy: Unwind power-on on PLL lock failure

From: 楊智成

Date: Tue Nov 17 2026 - 01:41:37 EST


Hi Michael,

On 11/16/26 11:00, Michael Riesch wrote:
> Still what we discussed makes sense, so let us do some refactoring in a
> later series.

As discussed, I plan to add the tx_ prefix to the PLL helpers in 6/9.

I also noticed that struct samsung_mipi_phy holds phy and lanes, which
TX and RX both use, but also the RX-only hs* fields added in 8/9, while
the TX-only PLL state stays in struct samsung_mipi_dcphy.

I am thinking about the following:

1) One struct per direction:

struct samsung_mipi_phy_tx {
struct phy *phy;
unsigned int lanes;
struct reset_control *m_phy_rst;
bool legacy_mismatch;
struct { ... } pll;
};

struct samsung_mipi_phy_rx {
struct phy *phy;
unsigned int lanes;
struct reset_control *s_phy_rst;
unsigned long long hs_clk_rate;
u16 hsfreq_cfg;
};

2) Keep only phy and lanes in struct samsung_mipi_phy, and move the hs*
fields to struct samsung_mipi_dcphy, next to the PLL state:

struct samsung_mipi_dcphy {
...
struct samsung_mipi_phy tx;
struct samsung_mipi_phy rx;
...
struct { ... } pll;
unsigned long long rx_hs_clk_rate;
u16 rx_hsfreq_cfg;
};

Option 1 changes 6/9 to 8/9, option 2 only 8/9. Which one would be more
convenient for your future work?

Thanks,
Jason