clk: qcom: smd: Add support for MSM8992/4 rpm clocks
PATCH 1/1 clk: qcom: smd: Add support for MSM8992/4 rpm clocks
Add rpm smd clocks, PMIC and bus clocks which are required on MSM8992, MSM8994 (and APQ variants) for clients to vote on.
--- .../devicetree/bindings/clock/qcom,rpmcc.txt | 2 + drivers/clk/qcom/clk-smd-rpm.c | 171 ++++++++++++++++++ include/dt-bindings/clock/qcom,rpmcc.h | 4 + 3 files changed, 177 insertions(+)
Documentation/devicetree/bindings/clock/qcom,rpmcc.txt +2 -0
@@ -17,6 +17,8 @@ Required properties : "qcom,rpmcc-msm8976", "qcom,rpmcc" "qcom,rpmcc-apq8064", "qcom,rpmcc" "qcom,rpmcc-ipq806x", "qcom,rpmcc" + "qcom,rpmcc-msm8992",·"qcom,rpmcc" + "qcom,rpmcc-msm8994",·"qcom,rpmcc" "qcom,rpmcc-msm8996", "qcom,rpmcc" "qcom,rpmcc-msm8998", "qcom,rpmcc" "qcom,rpmcc-qcs404", "qcom,rpmcc"
drivers/clk/qcom/clk-smd-rpm.c +171 -0
183 lines not on this page · raw message
include/dt-bindings/clock/qcom,rpmcc.h +4 -0
@@ -143,5 +143,9 @@#define RPM_SMD_LN_BB_CLK1_A_PIN 97#define RPM_SMD_LN_BB_CLK2_PIN 98#define RPM_SMD_LN_BB_CLK2_A_PIN 99 +#define RPM_SMD_CE2_CLK 100 +#define RPM_SMD_CE2_A_CLK 101 +#define RPM_SMD_CE3_CLK 102 +#define RPM_SMD_CE3_A_CLK 103#endif
Signature · 1 line
2.27.0
I should also note that for quite some time a hack [1] has been needed on some platforms for the RPMCC to register.
This includes 8992/94, 8956/76 and possibly many more.
With that commit, RPMCC registers fine.
[1] https://github.com/kholk/kernel-upstream/commit/5df7bb6e337c0a41b2cc6477cddc718d622d7545
Regards
Konrad
Stephen Boyd
maintainerQuoting Konrad Dybcio (2020-06-24 08:09:18)
Quoted 7 lines
I should also note that for quite some time a hack [1] has been needed on some platforms for the RPMCC to register.
This includes 8992/94, 8956/76 and possibly many more.
With that commit, RPMCC registers fine.
What happens if that patch isn't applied? Does the system crash? Because I'd rather not merge a patch in clk tree that causes the system to fail to boot.
Nah, it does not crash. It just does not work properly. If my memory isn't corrupted, rpmcc doesn't load and regulator voltages aren't brought up.
It is safe to merge, as the worst case scenario is it just not loading.
Regards
Konrad
Quoted 4 lines · Stephen Boyd
Quoting Konrad Dybcio (2020-06-24 08:09:18)
Quoted 3 lines
I should also note that for quite some time a hack [1] has been needed on some platforms for the RPMCC to register.
Quoted 8 lines
Quoted 4 lines
This includes 8992/94, 8956/76 and possibly many more.
With that commit, RPMCC registers fine.
What happens if that patch isn't applied? Does the system crash? Because I'd rather not merge a patch in clk tree that causes the system to fail to boot.
The state machine code in the SMD implementation finds the RPM channel, but it's in a state that indicates that the remote side is still closing/cleaning up from when the bootloader had it open.
The result is that we never probe the RPM driver.
I merged a patch that would cause the logic here to be a little bit more aggressive/optimistic, but that had to be reverted because it prevented the modem from coming up cleanly after a crash. And I unfortunately still don't have any hardware that manifest this problem that I can debug this on myself.
But I think it's fine to merge the rpmcc patch (which I see you did).
Thanks,
Bjorn
Quoting Konrad Dybcio (2020-06-23 16:00:18)
Quoted 5 lines
Add rpm smd clocks, PMIC and bus clocks which are required on MSM8992, MSM8994 (and APQ variants) for clients to vote on.
Signed-off-by Konrad Dybcio <[email protected]>---
Applied to clk-next but I had to fix the binding numbers again.