diff mbox series

[v2,5/5] arm64: boot: dts: qcom: sc8280xp: Add in CAMCC for sc8280xp

Message ID 20230930134114.1816590-6-bryan.odonoghue@linaro.org
State Superseded
Headers show
Series Add sc8280xp CAMCC bindings and driver | expand

Commit Message

Bryan O'Donoghue Sept. 30, 2023, 1:41 p.m. UTC
Add in CAMCC for sc8280xp. The sc8280xp Camera Clock Controller looks
similar to most of the sdmX, smX and now scX controllers.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
 arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

Comments

Konrad Dybcio Sept. 30, 2023, 4:41 p.m. UTC | #1
On 9/30/23 15:41, Bryan O'Donoghue wrote:
> Add in CAMCC for sc8280xp. The sc8280xp Camera Clock Controller looks
> similar to most of the sdmX, smX and now scX controllers.
> 
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> ---
>   arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 16 ++++++++++++++++
>   1 file changed, 16 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
> index cad59af7ccef..ca43d038578b 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
> @@ -8,6 +8,7 @@
>   #include <dt-bindings/clock/qcom,gcc-sc8280xp.h>
>   #include <dt-bindings/clock/qcom,gpucc-sc8280xp.h>
>   #include <dt-bindings/clock/qcom,rpmh.h>
> +#include <dt-bindings/clock/qcom,sc8280xp-camcc.h>
>   #include <dt-bindings/clock/qcom,sc8280xp-lpasscc.h>
>   #include <dt-bindings/interconnect/qcom,osm-l3.h>
>   #include <dt-bindings/interconnect/qcom,sc8280xp.h>
> @@ -3450,6 +3451,21 @@ usb_1_role_switch: endpoint {
>   			};
>   		};
>   
> +		camcc: clock-controller@ad00000 {
> +			compatible = "qcom,sc8280xp-camcc";
> +			reg = <0 0x0ad00000 0 0x20000>;
> +			clocks = <&gcc GCC_CAMERA_AHB_CLK>,
> +				 <&rpmhcc RPMH_CXO_CLK>,
> +				 <&rpmhcc RPMH_CXO_CLK_A>,
> +				 <&sleep_clk>;
> +			clock-names = "iface", "bi_tcxo", "bi_tcxo_ao", "sleep_clk";
clock-names is now redundant :)

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad
Bryan O'Donoghue Sept. 30, 2023, 11:01 p.m. UTC | #2
On 30/09/2023 17:41, Konrad Dybcio wrote:
> 
> 
> On 9/30/23 15:41, Bryan O'Donoghue wrote:
>> Add in CAMCC for sc8280xp. The sc8280xp Camera Clock Controller looks
>> similar to most of the sdmX, smX and now scX controllers.
>>
>> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
>> ---
>>   arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 16 ++++++++++++++++
>>   1 file changed, 16 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi 
>> b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
>> index cad59af7ccef..ca43d038578b 100644
>> --- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
>> @@ -8,6 +8,7 @@
>>   #include <dt-bindings/clock/qcom,gcc-sc8280xp.h>
>>   #include <dt-bindings/clock/qcom,gpucc-sc8280xp.h>
>>   #include <dt-bindings/clock/qcom,rpmh.h>
>> +#include <dt-bindings/clock/qcom,sc8280xp-camcc.h>
>>   #include <dt-bindings/clock/qcom,sc8280xp-lpasscc.h>
>>   #include <dt-bindings/interconnect/qcom,osm-l3.h>
>>   #include <dt-bindings/interconnect/qcom,sc8280xp.h>
>> @@ -3450,6 +3451,21 @@ usb_1_role_switch: endpoint {
>>               };
>>           };
>> +        camcc: clock-controller@ad00000 {
>> +            compatible = "qcom,sc8280xp-camcc";
>> +            reg = <0 0x0ad00000 0 0x20000>;
>> +            clocks = <&gcc GCC_CAMERA_AHB_CLK>,
>> +                 <&rpmhcc RPMH_CXO_CLK>,
>> +                 <&rpmhcc RPMH_CXO_CLK_A>,
>> +                 <&sleep_clk>;
>> +            clock-names = "iface", "bi_tcxo", "bi_tcxo_ao", "sleep_clk";
> clock-names is now redundant :)
> 
> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> 
> Konrad

BTW.

Looking at the block diagram for the Camera, I see why Cam_CC_AHB is 
included in this list. Its not called out as a dependency in the clock 
tree but when you look at the block diagram you can see it gates the AHB 
bus to the CAM_CC block.

anyway

---
bod
Konrad Dybcio Oct. 2, 2023, 9:56 a.m. UTC | #3
On 10/1/23 01:01, Bryan O'Donoghue wrote:
> On 30/09/2023 17:41, Konrad Dybcio wrote:
>>
>>
>> On 9/30/23 15:41, Bryan O'Donoghue wrote:
>>> Add in CAMCC for sc8280xp. The sc8280xp Camera Clock Controller looks
>>> similar to most of the sdmX, smX and now scX controllers.
>>>
>>> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
>>> ---
>>>   arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 16 ++++++++++++++++
>>>   1 file changed, 16 insertions(+)
>>>
>>> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi 
>>> b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
>>> index cad59af7ccef..ca43d038578b 100644
>>> --- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
>>> +++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
>>> @@ -8,6 +8,7 @@
>>>   #include <dt-bindings/clock/qcom,gcc-sc8280xp.h>
>>>   #include <dt-bindings/clock/qcom,gpucc-sc8280xp.h>
>>>   #include <dt-bindings/clock/qcom,rpmh.h>
>>> +#include <dt-bindings/clock/qcom,sc8280xp-camcc.h>
>>>   #include <dt-bindings/clock/qcom,sc8280xp-lpasscc.h>
>>>   #include <dt-bindings/interconnect/qcom,osm-l3.h>
>>>   #include <dt-bindings/interconnect/qcom,sc8280xp.h>
>>> @@ -3450,6 +3451,21 @@ usb_1_role_switch: endpoint {
>>>               };
>>>           };
>>> +        camcc: clock-controller@ad00000 {
>>> +            compatible = "qcom,sc8280xp-camcc";
>>> +            reg = <0 0x0ad00000 0 0x20000>;
>>> +            clocks = <&gcc GCC_CAMERA_AHB_CLK>,
>>> +                 <&rpmhcc RPMH_CXO_CLK>,
>>> +                 <&rpmhcc RPMH_CXO_CLK_A>,
>>> +                 <&sleep_clk>;
>>> +            clock-names = "iface", "bi_tcxo", "bi_tcxo_ao", 
>>> "sleep_clk";
>> clock-names is now redundant :)
>>
>> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
>>
>> Konrad
> 
> BTW.
> 
> Looking at the block diagram for the Camera, I see why Cam_CC_AHB is 
> included in this list. Its not called out as a dependency in the clock 
> tree but when you look at the block diagram you can see it gates the AHB 
> bus to the CAM_CC block.
Yep, that's why using is as pm_clk for the clock controller makes sense

Konrad
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
index cad59af7ccef..ca43d038578b 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
@@ -8,6 +8,7 @@ 
 #include <dt-bindings/clock/qcom,gcc-sc8280xp.h>
 #include <dt-bindings/clock/qcom,gpucc-sc8280xp.h>
 #include <dt-bindings/clock/qcom,rpmh.h>
+#include <dt-bindings/clock/qcom,sc8280xp-camcc.h>
 #include <dt-bindings/clock/qcom,sc8280xp-lpasscc.h>
 #include <dt-bindings/interconnect/qcom,osm-l3.h>
 #include <dt-bindings/interconnect/qcom,sc8280xp.h>
@@ -3450,6 +3451,21 @@  usb_1_role_switch: endpoint {
 			};
 		};
 
+		camcc: clock-controller@ad00000 {
+			compatible = "qcom,sc8280xp-camcc";
+			reg = <0 0x0ad00000 0 0x20000>;
+			clocks = <&gcc GCC_CAMERA_AHB_CLK>,
+				 <&rpmhcc RPMH_CXO_CLK>,
+				 <&rpmhcc RPMH_CXO_CLK_A>,
+				 <&sleep_clk>;
+			clock-names = "iface", "bi_tcxo", "bi_tcxo_ao", "sleep_clk";
+			power-domains = <&rpmhpd SC8280XP_MMCX>;
+			required-opps = <&rpmhpd_opp_low_svs>;
+			#clock-cells = <1>;
+			#reset-cells = <1>;
+			#power-domain-cells = <1>;
+		};
+
 		mdss0: display-subsystem@ae00000 {
 			compatible = "qcom,sc8280xp-mdss";
 			reg = <0 0x0ae00000 0 0x1000>;