Re: [PATCH v2 4/4] clk: imx95-blk-ctl: Add one clock mux for HSIO block

Frank Li
2025-10-10T14:13:23Z

On Fri, Oct 10, 2025 at 07:01:13PM +0800, Xu Yang wrote:
> The GPR_REG0 register has an USB_PHY_REF_CLK_SEL (bit 6) to select USB 3.0
> PHY reference clock.
>
> USB_PHY_REF_CLK_SEL:
> bit[6] - 0b 24 MHz external oscillator
> - 1b 100 MHz high performance PLL
>
> Add a clock multiplexer to support USB3.0 PHY clock selection.
>
> Reviewed-by: Peng Fan <peng.fan@nxp.com>
> Signed-off-by: Xu Yang <xu.yang_2@nxp.com>

Reviewed-by: Frank Li <Frank.Li@nxp.com>

>
> ---
> Changes in v2:
> - add Rb tag
> ---
> drivers/clk/imx/clk-imx95-blk-ctl.c | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
>
> diff --git a/drivers/clk/imx/clk-imx95-blk-ctl.c b/drivers/clk/imx/clk-imx95-blk-ctl.c
> index 56bed44719954d6a644606914b61dad672cd82cf..c078b2ee28e81155ca3a93d26c2e757c8ddc91be 100644
> --- a/drivers/clk/imx/clk-imx95-blk-ctl.c
> +++ b/drivers/clk/imx/clk-imx95-blk-ctl.c
> @@ -302,6 +302,24 @@ static const struct imx95_blk_ctl_dev_data hsio_blk_ctl_dev_data = {
> .clk_reg_offset = 0,
> };
>
> +static const struct imx95_blk_ctl_clk_dev_data hsio_usb_blk_ctl_clk_dev_data[] = {
> + [0] = {
> + .name = "usb_phy_ref_clk_sel",
> + .parent_names = (const char *[]){"osc24m", "hsiopll"},
> + .num_parents = 2,
> + .reg = 0,
> + .bit_idx = 6,
> + .bit_width = 1,
> + .type = CLK_MUX,
> + .flags = CLK_SET_RATE_NO_REPARENT | CLK_SET_RATE_PARENT,
> + }
> +};
> +
> +static const struct imx95_blk_ctl_dev_data hsio_usb_blk_ctl_dev_data = {
> + .num_clks = 1,
> + .clk_dev_data = hsio_usb_blk_ctl_clk_dev_data,
> +};
> +
> static const struct imx95_blk_ctl_clk_dev_data imx94_lvds_clk_dev_data[] = {
> [IMX94_CLK_DISPMIX_LVDS_CLK_GATE] = {
> .name = "lvds_clk_gate",
> @@ -519,6 +537,7 @@ static const struct of_device_id imx95_bc_of_match[] = {
> { .compatible = "nxp,imx95-display-csr", .data = &imx95_dispmix_csr_dev_data },
> { .compatible = "nxp,imx95-lvds-csr", .data = &imx95_lvds_csr_dev_data },
> { .compatible = "nxp,imx95-hsio-blk-ctl", .data = &hsio_blk_ctl_dev_data },
> + { .compatible = "nxp,imx95-hsio-usb-blk-ctl", .data = &hsio_usb_blk_ctl_dev_data },
> { .compatible = "nxp,imx95-vpu-csr", .data = &vpublk_dev_data },
> { .compatible = "nxp,imx95-netcmix-blk-ctrl", .data = &netcmix_dev_data},
> { /* Sentinel */ },
>
> --
> 2.34.1
>