Re: [PATCH 1/3] clk: qcom: smd-rpm: Add rate hooks for clk_smd_rpm_branch_ops
From: Stephen Boyd
Date: Tue Sep 14 2021 - 17:56:37 EST
Quoting Shawn Guo (2021-09-13 19:55:52)
> On QCM2290 platform, the clock xo_board runs at 38400000, while the
> child clock bi_tcxo needs to run at 19200000. That said,
> clk_smd_rpm_branch_ops needs the capability of setting rate. Add rate
> hooks into clk_smd_rpm_branch_ops to make it possible.
This doesn't sound right. The branch is a simple on/off. If xo_board is
38.4MHz, then there is an internal divider in the SoC that makes bi_tcxo
(i.e. the root of the entire clk tree) be 19.2MHz. We don't model the
divider, I guess because it isn't very important to. Instead, we tack on
a divider field and implement recalc_rate op. See clk-rpmh.c in the qcom
directory for this.