Signed-off-by: Satya Priya Kakitapalli <[email protected]>
---
Changes in v3:
- Adding the required-opps property back, which was removed in v2.
- This is needed because the lowest power state for MMCX on sm8150 platform
is retention, but we want to enable the power domain in low_svs not retention.
- Link to v2: https://lore.kernel.org/r/[email protected]
Changes in v2:
- As per Dmitry's comments, there is no need to update to index based
lookup for already existing drivers, hence keeping clock-names property.
- Updated the videocc bindings to add AHB clock for the sm8150 platform.
- Link to v1: https://lore.kernel.org/r/[email protected]
---
Satya Priya Kakitapalli (2):
dt-bindings: clock: qcom: Add AHB clock for SM8150
arm64: dts: qcom: sm8150: Add video clock controller node
.../devicetree/bindings/clock/qcom,videocc.yaml | 17 ++++++++++++++++-
arch/arm64/boot/dts/qcom/sa8155p.dtsi | 4 ++++
arch/arm64/boot/dts/qcom/sm8150.dtsi | 14 ++++++++++++++
3 files changed, 34 insertions(+), 1 deletion(-)
---
base-commit: 8ffc8b1bbd505e27e2c8439d326b6059c906c9dd
change-id: 20240308-videocc-sm8150-dt-node-6f163b492f7c
Best regards,
--
Satya Priya Kakitapalli <[email protected]>
Add device node for video clock controller on Qualcomm
SM8150 platform.
Signed-off-by: Satya Priya Kakitapalli <[email protected]>
---
arch/arm64/boot/dts/qcom/sa8155p.dtsi | 4 ++++
arch/arm64/boot/dts/qcom/sm8150.dtsi | 14 ++++++++++++++
2 files changed, 18 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sa8155p.dtsi b/arch/arm64/boot/dts/qcom/sa8155p.dtsi
index ffb7ab695213..9e70effc72e1 100644
--- a/arch/arm64/boot/dts/qcom/sa8155p.dtsi
+++ b/arch/arm64/boot/dts/qcom/sa8155p.dtsi
@@ -38,3 +38,7 @@ &rpmhpd {
*/
compatible = "qcom,sa8155p-rpmhpd";
};
+
+&videocc {
+ power-domains = <&rpmhpd SA8155P_CX>;
+};
diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi
index a35c0852b5a1..55c9046f4fb9 100644
--- a/arch/arm64/boot/dts/qcom/sm8150.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi
@@ -14,6 +14,7 @@
#include <dt-bindings/clock/qcom,dispcc-sm8150.h>
#include <dt-bindings/clock/qcom,gcc-sm8150.h>
#include <dt-bindings/clock/qcom,gpucc-sm8150.h>
+#include <dt-bindings/clock/qcom,videocc-sm8150.h>
#include <dt-bindings/interconnect/qcom,osm-l3.h>
#include <dt-bindings/interconnect/qcom,sm8150.h>
#include <dt-bindings/thermal/thermal.h>
@@ -3715,6 +3716,19 @@ usb_2_dwc3: usb@a800000 {
};
};
+ videocc: clock-controller@ab00000 {
+ compatible = "qcom,sm8150-videocc";
+ reg = <0 0x0ab00000 0 0x10000>;
+ clocks = <&gcc GCC_VIDEO_AHB_CLK>,
+ <&rpmhcc RPMH_CXO_CLK>;
+ clock-names = "iface", "bi_tcxo";
+ power-domains = <&rpmhpd SM8150_MMCX>;
+ required-opps = <&rpmhpd_opp_low_svs>;
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ #power-domain-cells = <1>;
+ };
+
camnoc_virt: interconnect@ac00000 {
compatible = "qcom,sm8150-camnoc-virt";
reg = <0 0x0ac00000 0 0x1000>;
--
2.25.1
SM8150 videocc needs AHB clock, so update the bindings for sm8150
to add the AHB clock.
Fixes: 35d26e9292e2 ("dt-bindings: clock: Add YAML schemas for the QCOM VIDEOCC clock bindings")
Signed-off-by: Satya Priya Kakitapalli <[email protected]>
---
.../devicetree/bindings/clock/qcom,videocc.yaml | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/clock/qcom,videocc.yaml b/Documentation/devicetree/bindings/clock/qcom,videocc.yaml
index 6999e36ace1b..68bac801adb0 100644
--- a/Documentation/devicetree/bindings/clock/qcom,videocc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,videocc.yaml
@@ -75,7 +75,6 @@ allOf:
enum:
- qcom,sc7180-videocc
- qcom,sdm845-videocc
- - qcom,sm8150-videocc
then:
properties:
clocks:
@@ -101,6 +100,22 @@ allOf:
- const: bi_tcxo
- const: bi_tcxo_ao
+ - if:
+ properties:
+ compatible:
+ enum:
+ - qcom,sm8150-videocc
+ then:
+ properties:
+ clocks:
+ items:
+ - description: AHB
+ - description: Board XO source
+ clock-names:
+ items:
+ - const: iface
+ - const: bi_tcxo
+
- if:
properties:
compatible:
--
2.25.1
On Wed, 1 May 2024 at 11:32, Satya Priya Kakitapalli
<[email protected]> wrote:
>
> SM8150 videocc needs AHB clock, so update the bindings for sm8150
> to add the AHB clock.
>
> Fixes: 35d26e9292e2 ("dt-bindings: clock: Add YAML schemas for the QCOM VIDEOCC clock bindings")
The tag is incorrect. The mentioned commit didn't add sm8150 bindings,
so it didn't have a bug.
> Signed-off-by: Satya Priya Kakitapalli <[email protected]>
> ---
> .../devicetree/bindings/clock/qcom,videocc.yaml | 17 ++++++++++++++++-
> 1 file changed, 16 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/clock/qcom,videocc.yaml b/Documentation/devicetree/bindings/clock/qcom,videocc.yaml
> index 6999e36ace1b..68bac801adb0 100644
> --- a/Documentation/devicetree/bindings/clock/qcom,videocc.yaml
> +++ b/Documentation/devicetree/bindings/clock/qcom,videocc.yaml
> @@ -75,7 +75,6 @@ allOf:
> enum:
> - qcom,sc7180-videocc
> - qcom,sdm845-videocc
> - - qcom,sm8150-videocc
> then:
> properties:
> clocks:
> @@ -101,6 +100,22 @@ allOf:
> - const: bi_tcxo
> - const: bi_tcxo_ao
>
> + - if:
> + properties:
> + compatible:
> + enum:
> + - qcom,sm8150-videocc
Could you please extend the sm8250 case instead of defining a new one?
Also could you please check if there is a clock (like ahb_clk_src)
that uses bi_tcxo_ao instead of bi_tcxo? If so, we have to add this
clock to the bindings even if the driver doesn't use/model it at this
point.
> + then:
> + properties:
> + clocks:
> + items:
> + - description: AHB
> + - description: Board XO source
> + clock-names:
> + items:
> + - const: iface
> + - const: bi_tcxo
> +
> - if:
> properties:
> compatible:
>
> --
> 2.25.1
>
--
With best wishes
Dmitry
On 5/1/2024 5:36 PM, Dmitry Baryshkov wrote:
> On Wed, 1 May 2024 at 11:32, Satya Priya Kakitapalli
> <[email protected]> wrote:
>> SM8150 videocc needs AHB clock, so update the bindings for sm8150
>> to add the AHB clock.
>>
>> Fixes: 35d26e9292e2 ("dt-bindings: clock: Add YAML schemas for the QCOM VIDEOCC clock bindings")
> The tag is incorrect. The mentioned commit didn't add sm8150 bindings,
> so it didn't have a bug.
Thanks, will correct the tag.
>> Signed-off-by: Satya Priya Kakitapalli <[email protected]>
>> ---
>> .../devicetree/bindings/clock/qcom,videocc.yaml | 17 ++++++++++++++++-
>> 1 file changed, 16 insertions(+), 1 deletion(-)
>>
>> diff --git a/Documentation/devicetree/bindings/clock/qcom,videocc.yaml b/Documentation/devicetree/bindings/clock/qcom,videocc.yaml
>> index 6999e36ace1b..68bac801adb0 100644
>> --- a/Documentation/devicetree/bindings/clock/qcom,videocc.yaml
>> +++ b/Documentation/devicetree/bindings/clock/qcom,videocc.yaml
>> @@ -75,7 +75,6 @@ allOf:
>> enum:
>> - qcom,sc7180-videocc
>> - qcom,sdm845-videocc
>> - - qcom,sm8150-videocc
>> then:
>> properties:
>> clocks:
>> @@ -101,6 +100,22 @@ allOf:
>> - const: bi_tcxo
>> - const: bi_tcxo_ao
>>
>> + - if:
>> + properties:
>> + compatible:
>> + enum:
>> + - qcom,sm8150-videocc
> Could you please extend the sm8250 case instead of defining a new one?
> Also could you please check if there is a clock (like ahb_clk_src)
> that uses bi_tcxo_ao instead of bi_tcxo? If so, we have to add this
> clock to the bindings even if the driver doesn't use/model it at this
> point.
There are no clocks using the bi_tcxo_ao on sm8150. Hence added separate
case for sm8150 instead of re-using sm8250.
>> + then:
>> + properties:
>> + clocks:
>> + items:
>> + - description: AHB
>> + - description: Board XO source
>> + clock-names:
>> + items:
>> + - const: iface
>> + - const: bi_tcxo
>> +
>> - if:
>> properties:
>> compatible:
>>
>> --
>> 2.25.1
>>
>