mbox series

[0/5] Add support for videocc and camcc on SM8650

Message ID 20240206113145.31096-1-quic_jkona@quicinc.com
Headers show
Series Add support for videocc and camcc on SM8650 | expand

Message

Jagadeesh Kona Feb. 6, 2024, 11:31 a.m. UTC
Add support for video and camera clock controllers on Qualcomm
SM8650 platform.

Jagadeesh Kona (5):
  dt-bindings: clock: qcom: Add video clock bindings for SM8650
  clk: qcom: videocc-sm8550: Add support for SM8650 videocc
  dt-bindings: clock: qcom: Add SM8650 camera clock controller
  clk: qcom: camcc-sm8650: Add camera clock controller driver for SM8650
  arm64: dts: qcom: sm8650: Add video and camera clock controllers

 .../bindings/clock/qcom,sm8450-camcc.yaml     |    3 +
 .../bindings/clock/qcom,sm8450-videocc.yaml   |    4 +-
 arch/arm64/boot/dts/qcom/sm8650.dtsi          |   28 +
 drivers/clk/qcom/Kconfig                      |    8 +
 drivers/clk/qcom/Makefile                     |    1 +
 drivers/clk/qcom/camcc-sm8650.c               | 3601 +++++++++++++++++
 drivers/clk/qcom/videocc-sm8550.c             |  160 +-
 .../dt-bindings/clock/qcom,sm8450-videocc.h   |    8 +-
 include/dt-bindings/clock/qcom,sm8650-camcc.h |  195 +
 9 files changed, 4002 insertions(+), 6 deletions(-)
 create mode 100644 drivers/clk/qcom/camcc-sm8650.c
 create mode 100644 include/dt-bindings/clock/qcom,sm8650-camcc.h

Comments

Jagadeesh Kona Feb. 12, 2024, 1:07 p.m. UTC | #1
On 2/8/2024 1:49 PM, Krzysztof Kozlowski wrote:
> On 06/02/2024 12:31, Jagadeesh Kona wrote:
>> Extend device tree bindings of SM8450 videocc to add support for SM8650
>> videocc. While it at, fix the incorrect header include in sm8450 videocc
>> yaml documentation.
> 
> A nit, subject: drop second/last, redundant "bindings for". The
> "dt-bindings" prefix is already stating that these are bindings.
> See also:
> https://elixir.bootlin.com/linux/v6.7-rc8/source/Documentation/devicetree/bindings/submitting-patches.rst#L18
> 

Thanks Krzysztof. Sure will take care of this in next series.

Thanks,
Jagadeesh

>>
>> Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com>
>> ---
> 
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> 
> Best regards,
> Krzysztof
>
Jagadeesh Kona Feb. 12, 2024, 1:08 p.m. UTC | #2
On 2/7/2024 6:41 PM, Bryan O'Donoghue wrote:
> On 06/02/2024 11:31, Jagadeesh Kona wrote:
>> Add support for the camera clock controller for camera clients to be
>> able to request for camcc clocks on SM8650 platform.
>>
>> Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com>
> 
>> +static struct clk_rcg2 cam_cc_mclk1_clk_src = {
>> +    .cmd_rcgr = 0x1501c,
>> +    .mnd_width = 8,
>> +    .hid_width = 5,
>> +    .parent_map = cam_cc_parent_map_1,
>> +    .freq_tbl = ftbl_cam_cc_mclk0_clk_src,
>> +    .clkr.hw.init = &(const struct clk_init_data) {
>> +        .name = "cam_cc_mclk1_clk_src",
>> +        .parent_data = cam_cc_parent_data_1,
>> +        .num_parents = ARRAY_SIZE(cam_cc_parent_data_1),
>> +        .flags = CLK_SET_RATE_PARENT,
>> +        .ops = &clk_rcg2_shared_ops,
> 
> Nice.
> 
> I compared this to WIP for x1e80100 which looks nearly register 
> compatible. Use of the shared_ops indicates to me you've thought about 
> which clocks should not be switched all the way off.
> 

Thanks Bryan for your review, We want all RCG's to be parked at safe 
config(XO) when they are disabled, hence using shared ops for all the 
RCG's.


>> +static struct platform_driver cam_cc_sm8650_driver = {
>> +    .probe = cam_cc_sm8650_probe,
>> +    .driver = {
>> +        .name = "cam_cc-sm8650",
> 
> That said .. please fix the name here "cam_cc-sm8650". The title of your 
> series is "camcc-sm8650" which IMO is a much more appropriate name.
> 
> The admixture of hyphen "-" and underscore "_" is some kind of 
> tokenisation sin.
> 

Sure, will fix this in next series.

Thanks,
Jagadeesh

> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Dmitry Baryshkov Feb. 12, 2024, 1:16 p.m. UTC | #3
On Mon, 12 Feb 2024 at 15:09, Jagadeesh Kona <quic_jkona@quicinc.com> wrote:
>
>
>
> On 2/7/2024 6:41 PM, Bryan O'Donoghue wrote:
> > On 06/02/2024 11:31, Jagadeesh Kona wrote:
> >> Add support for the camera clock controller for camera clients to be
> >> able to request for camcc clocks on SM8650 platform.
> >>
> >> Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com>
> >
> >> +static struct clk_rcg2 cam_cc_mclk1_clk_src = {
> >> +    .cmd_rcgr = 0x1501c,
> >> +    .mnd_width = 8,
> >> +    .hid_width = 5,
> >> +    .parent_map = cam_cc_parent_map_1,
> >> +    .freq_tbl = ftbl_cam_cc_mclk0_clk_src,
> >> +    .clkr.hw.init = &(const struct clk_init_data) {
> >> +        .name = "cam_cc_mclk1_clk_src",
> >> +        .parent_data = cam_cc_parent_data_1,
> >> +        .num_parents = ARRAY_SIZE(cam_cc_parent_data_1),
> >> +        .flags = CLK_SET_RATE_PARENT,
> >> +        .ops = &clk_rcg2_shared_ops,
> >
> > Nice.
> >
> > I compared this to WIP for x1e80100 which looks nearly register
> > compatible. Use of the shared_ops indicates to me you've thought about
> > which clocks should not be switched all the way off.
> >
>
> Thanks Bryan for your review, We want all RCG's to be parked at safe
> config(XO) when they are disabled, hence using shared ops for all the
> RCG's.

What is the reason for parking it instead of fully disabling the clock?

>
>
> >> +static struct platform_driver cam_cc_sm8650_driver = {
> >> +    .probe = cam_cc_sm8650_probe,
> >> +    .driver = {
> >> +        .name = "cam_cc-sm8650",
> >
> > That said .. please fix the name here "cam_cc-sm8650". The title of your
> > series is "camcc-sm8650" which IMO is a much more appropriate name.
> >
> > The admixture of hyphen "-" and underscore "_" is some kind of
> > tokenisation sin.
> >
>
> Sure, will fix this in next series.
>
> Thanks,
> Jagadeesh
>
> > Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
>