mbox series

[V3,0/5] Add camera clock controller support for SM8550

Message ID 20230601143430.5595-1-quic_jkona@quicinc.com
Headers show
Series Add camera clock controller support for SM8550 | expand

Message

Jagadeesh Kona June 1, 2023, 2:34 p.m. UTC
Add bindings, driver and devicetree node for camera clock controller on
SM8550. Update l configuration value to include L, CAL_L, RINGOSC_CAL_L
fields on lucid evo and ole pll's across chipsets. Remove setting CAL_L
field explicitly in lucid evo pll configure.

Jagadeesh Kona (5):
  dt-bindings: clock: qcom: Add SM8550 camera clock controller
  clk: qcom: Remove support to set CAL_L field in lucid evo pll
    configure
  clk: qcom: camcc-sm8550: Add camera clock controller driver for SM8550
  clk: qcom: camcc-sm8550: Add support for qdss, sleep and xo clocks
  arm64: dts: qcom: sm8550: Add camera clock controller

 .../bindings/clock/qcom,sm8450-camcc.yaml     |    8 +-
 arch/arm64/boot/dts/qcom/sm8550.dtsi          |   15 +
 drivers/clk/qcom/Kconfig                      |    7 +
 drivers/clk/qcom/Makefile                     |    1 +
 drivers/clk/qcom/camcc-sm8450.c               |   24 +-
 drivers/clk/qcom/camcc-sm8550.c               | 3585 +++++++++++++++++
 drivers/clk/qcom/clk-alpha-pll.c              |    6 +-
 drivers/clk/qcom/dispcc-sm8450.c              |    6 +-
 drivers/clk/qcom/dispcc-sm8550.c              |    6 +-
 drivers/clk/qcom/gpucc-sa8775p.c              |    6 +-
 drivers/clk/qcom/gpucc-sm8450.c               |    6 +-
 include/dt-bindings/clock/qcom,sm8550-camcc.h |  187 +
 12 files changed, 3834 insertions(+), 23 deletions(-)
 create mode 100644 drivers/clk/qcom/camcc-sm8550.c
 create mode 100644 include/dt-bindings/clock/qcom,sm8550-camcc.h

Comments

Dmitry Baryshkov June 1, 2023, 2:51 p.m. UTC | #1
On 01/06/2023 17:34, Jagadeesh Kona wrote:
> Add support for the camera clock controller for camera clients to be
> able to request for camcc clocks on SM8550 platform.
> 
> Co-developed-by: Taniya Das <quic_tdas@quicinc.com>
> Signed-off-by: Taniya Das <quic_tdas@quicinc.com>
> Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com>
> ---
> Changes since V2:
>   - No changes
> Changes since V1:
>   - Sorted the PLL names in proper order
>   - Updated all PLL configurations to lower case hex
>   - Reused evo ops instead of adding new ops for ole pll
>   - Moved few clocks to separate patch to fix patch too long error
> 
>   drivers/clk/qcom/Kconfig        |    7 +
>   drivers/clk/qcom/Makefile       |    1 +
>   drivers/clk/qcom/camcc-sm8550.c | 3405 +++++++++++++++++++++++++++++++
>   3 files changed, 3413 insertions(+)
>   create mode 100644 drivers/clk/qcom/camcc-sm8550.c
> 

[skipped]

> +
> +static struct platform_driver cam_cc_sm8550_driver = {
> +	.probe = cam_cc_sm8550_probe,
> +	.driver = {
> +		.name = "cam_cc-sm8550",
> +		.of_match_table = cam_cc_sm8550_match_table,
> +	},
> +};
> +
> +static int __init cam_cc_sm8550_init(void)
> +{
> +	return platform_driver_register(&cam_cc_sm8550_driver);
> +}
> +subsys_initcall(cam_cc_sm8550_init);
> +
> +static void __exit cam_cc_sm8550_exit(void)
> +{
> +	platform_driver_unregister(&cam_cc_sm8550_driver);
> +}
> +module_exit(cam_cc_sm8550_exit);

Please convert this to use module_platform_driver

> +
> +MODULE_DESCRIPTION("QTI CAMCC SM8550 Driver");
> +MODULE_LICENSE("GPL");
Jagadeesh Kona June 9, 2023, 11:49 a.m. UTC | #2
Hi Dmitry,

Thanks for your review!

On 6/1/2023 8:21 PM, Dmitry Baryshkov wrote:
> On 01/06/2023 17:34, Jagadeesh Kona wrote:
>> Add support for the camera clock controller for camera clients to be
>> able to request for camcc clocks on SM8550 platform.
>>
>> Co-developed-by: Taniya Das <quic_tdas@quicinc.com>
>> Signed-off-by: Taniya Das <quic_tdas@quicinc.com>
>> Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com>
>> ---
>> Changes since V2:
>>   - No changes
>> Changes since V1:
>>   - Sorted the PLL names in proper order
>>   - Updated all PLL configurations to lower case hex
>>   - Reused evo ops instead of adding new ops for ole pll
>>   - Moved few clocks to separate patch to fix patch too long error
>>
>>   drivers/clk/qcom/Kconfig        |    7 +
>>   drivers/clk/qcom/Makefile       |    1 +
>>   drivers/clk/qcom/camcc-sm8550.c | 3405 +++++++++++++++++++++++++++++++
>>   3 files changed, 3413 insertions(+)
>>   create mode 100644 drivers/clk/qcom/camcc-sm8550.c
>>
> 
> [skipped]
> 
>> +
>> +static struct platform_driver cam_cc_sm8550_driver = {
>> +    .probe = cam_cc_sm8550_probe,
>> +    .driver = {
>> +        .name = "cam_cc-sm8550",
>> +        .of_match_table = cam_cc_sm8550_match_table,
>> +    },
>> +};
>> +
>> +static int __init cam_cc_sm8550_init(void)
>> +{
>> +    return platform_driver_register(&cam_cc_sm8550_driver);
>> +}
>> +subsys_initcall(cam_cc_sm8550_init);
>> +
>> +static void __exit cam_cc_sm8550_exit(void)
>> +{
>> +    platform_driver_unregister(&cam_cc_sm8550_driver);
>> +}
>> +module_exit(cam_cc_sm8550_exit);
> 
> Please convert this to use module_platform_driver
> 

We still have to evaluate if module_platform_driver() works for us in 
all scenarios. We will post a cleanup patch once we conclude on 
module_platform_driver().

>> +
>> +MODULE_DESCRIPTION("QTI CAMCC SM8550 Driver");
>> +MODULE_LICENSE("GPL");
> 

Thanks & Regards,
Jagadeesh
Konrad Dybcio June 9, 2023, 12:44 p.m. UTC | #3
On 9.06.2023 13:49, Jagadeesh Kona wrote:
> Hi Dmitry,
> 
> Thanks for your review!
> 
> On 6/1/2023 8:21 PM, Dmitry Baryshkov wrote:
>> On 01/06/2023 17:34, Jagadeesh Kona wrote:
>>> Add support for the camera clock controller for camera clients to be
>>> able to request for camcc clocks on SM8550 platform.
>>>
>>> Co-developed-by: Taniya Das <quic_tdas@quicinc.com>
>>> Signed-off-by: Taniya Das <quic_tdas@quicinc.com>
>>> Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com>
>>> ---
>>> Changes since V2:
>>>   - No changes
>>> Changes since V1:
>>>   - Sorted the PLL names in proper order
>>>   - Updated all PLL configurations to lower case hex
>>>   - Reused evo ops instead of adding new ops for ole pll
>>>   - Moved few clocks to separate patch to fix patch too long error
>>>
>>>   drivers/clk/qcom/Kconfig        |    7 +
>>>   drivers/clk/qcom/Makefile       |    1 +
>>>   drivers/clk/qcom/camcc-sm8550.c | 3405 +++++++++++++++++++++++++++++++
>>>   3 files changed, 3413 insertions(+)
>>>   create mode 100644 drivers/clk/qcom/camcc-sm8550.c
>>>
>>
>> [skipped]
>>
>>> +
>>> +static struct platform_driver cam_cc_sm8550_driver = {
>>> +    .probe = cam_cc_sm8550_probe,
>>> +    .driver = {
>>> +        .name = "cam_cc-sm8550",
>>> +        .of_match_table = cam_cc_sm8550_match_table,
>>> +    },
>>> +};
>>> +
>>> +static int __init cam_cc_sm8550_init(void)
>>> +{
>>> +    return platform_driver_register(&cam_cc_sm8550_driver);
>>> +}
>>> +subsys_initcall(cam_cc_sm8550_init);
>>> +
>>> +static void __exit cam_cc_sm8550_exit(void)
>>> +{
>>> +    platform_driver_unregister(&cam_cc_sm8550_driver);
>>> +}
>>> +module_exit(cam_cc_sm8550_exit);
>>
>> Please convert this to use module_platform_driver
>>
> 
> We still have to evaluate if module_platform_driver() works for us in all scenarios. We will post a cleanup patch once we conclude on module_platform_driver().
With the arm64 defconfig, CCI and CAMSS are compiled in as modules. Since
they are not boot-critical components, this will likely not change.

Konrad
> 
>>> +
>>> +MODULE_DESCRIPTION("QTI CAMCC SM8550 Driver");
>>> +MODULE_LICENSE("GPL");
>>
> 
> Thanks & Regards,
> Jagadeesh