[v3,05/18] dt-bindings: msm: dsi-controller-main: Document clocks on a per compatible basis
Commit Message
Each compatible has a different set of clocks which are associated with it.
Add in the list of clocks for each compatible.
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
.../display/msm/dsi-controller-main.yaml | 154 ++++++++++++++++--
1 file changed, 143 insertions(+), 11 deletions(-)
Comments
On 24/11/2022 01:47, Bryan O'Donoghue wrote:
> Each compatible has a different set of clocks which are associated with it.
> Add in the list of clocks for each compatible.
>
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> ---
> .../display/msm/dsi-controller-main.yaml | 154 ++++++++++++++++--
> 1 file changed, 143 insertions(+), 11 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
> index c4da7179999d2..88aac7d33555c 100644
> --- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
> +++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
> @@ -9,9 +9,6 @@ title: Qualcomm Display DSI controller
> maintainers:
> - Krishna Manikandan <quic_mkrishn@quicinc.com>
>
> -allOf:
> - - $ref: "../dsi-controller.yaml#"
> -
> properties:
> compatible:
> items:
> @@ -48,13 +45,8 @@ properties:
> - description: Display AXI clock
>
> clock-names:
> - items:
> - - const: byte
> - - const: byte_intf
> - - const: pixel
> - - const: core
> - - const: iface
> - - const: bus
> + minItems: 6
> + maxItems: 9
>
> phys:
> maxItems: 1
> @@ -147,6 +139,146 @@ required:
> - assigned-clock-parents
> - ports
>
> +allOf:
> + - $ref: "../dsi-controller.yaml#"
> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - qcom,apq8064-dsi-ctrl
> + then:
> + properties:
> + clocks:
> + maxItems: 7
> + clock-names:
> + items:
> + - const: iface
> + - const: bus
> + - const: core_mmss
> + - const: src
> + - const: byte
> + - const: pixel
> + - const: core
> +
> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - qcom,msm8916-dsi-ctrl
> + then:
> + properties:
> + clocks:
> + maxItems: 6
> + clock-names:
> + items:
> + - const: mdp_core
> + - const: iface
> + - const: bus
> + - const: byte
> + - const: pixel
> + - const: core
> +
> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - qcom,msm8974-dsi-ctrl
> + then:
> + properties:
> + clocks:
> + maxItems: 3
> + clock-names:
> + items:
> + - const: iface
> + - const: bus
> + - const: vsync
minItems are 6, so does it actually work?
> +
> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - qcom,msm8996-dsi-ctrl
> + then:
> + properties:
> + clocks:
> + maxItems: 7
> + clock-names:
> + items:
> + - const: mdp_core
> + - const: byte
> + - const: iface
> + - const: bus
> + - const: core_mmss
> + - const: pixel
> + - const: core
> +
> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - qcom,sc7180-dsi-ctrl
> + - qcom,sc7280-dsi-ctrl
> + - qcom,sm8250-dsi-ctrl
> + then:
> + properties:
> + clocks:
> + maxItems: 6
> + clock-names:
> + items:
> + - const: byte
> + - const: byte_intf
> + - const: pixel
> + - const: core
> + - const: iface
> + - const: bus
> +
> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - qcom,sdm630-dsi-ctrl
> + - qcom,sdm660-dsi-ctrl
> + then:
> + properties:
> + clocks:
> + maxItems: 9
> + clock-names:
> + items:
> + - const: mdp_core
> + - const: byte
> + - const: byte_intf
> + - const: mnoc
> + - const: iface
> + - const: bus
> + - const: core_mmss
> + - const: pixel
> + - const: core
> +
> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - qcom,sdm845-dsi-ctrl
> + then:
> + properties:
> + clocks:
> + maxItems: 6
> + clock-names:
> + items:
> + - const: byte
> + - const: byte_intf
> + - const: pixel
> + - const: core
> + - const: iface
> + - const: bus
> +
> additionalProperties: false
>
> examples:
> @@ -157,7 +289,7 @@ examples:
> #include <dt-bindings/power/qcom-rpmpd.h>
>
> dsi@ae94000 {
> - compatible = "qcom,mdss-dsi-ctrl";
> + compatible = "qcom,sc7180-dsi-ctrl", "qcom,mdss-dsi-ctrl";
Not related to this patch.
Best regards,
Krzysztof
On 26/11/2022 14:44, Krzysztof Kozlowski wrote:
> On 24/11/2022 01:47, Bryan O'Donoghue wrote:
>> Each compatible has a different set of clocks which are associated with it.
>> Add in the list of clocks for each compatible.
>>
>> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
>> ---
>> .../display/msm/dsi-controller-main.yaml | 154 ++++++++++++++++--
>> 1 file changed, 143 insertions(+), 11 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
>> index c4da7179999d2..88aac7d33555c 100644
>> --- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
>> +++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
>> @@ -9,9 +9,6 @@ title: Qualcomm Display DSI controller
>> maintainers:
>> - Krishna Manikandan <quic_mkrishn@quicinc.com>
>>
>> -allOf:
>> - - $ref: "../dsi-controller.yaml#"
>> -
>> properties:
>> compatible:
>> items:
>> @@ -48,13 +45,8 @@ properties:
>> - description: Display AXI clock
>>
>> clock-names:
>> - items:
>> - - const: byte
>> - - const: byte_intf
>> - - const: pixel
>> - - const: core
>> - - const: iface
>> - - const: bus
>> + minItems: 6
>> + maxItems: 9
>>
>> phys:
>> maxItems: 1
>> @@ -147,6 +139,146 @@ required:
>> - assigned-clock-parents
>> - ports
>>
>> +allOf:
>> + - $ref: "../dsi-controller.yaml#"
>> + - if:
>> + properties:
>> + compatible:
>> + contains:
>> + enum:
>> + - qcom,apq8064-dsi-ctrl
>> + then:
>> + properties:
>> + clocks:
>> + maxItems: 7
>> + clock-names:
>> + items:
>> + - const: iface
>> + - const: bus
>> + - const: core_mmss
>> + - const: src
>> + - const: byte
>> + - const: pixel
>> + - const: core
>> +
>> + - if:
>> + properties:
>> + compatible:
>> + contains:
>> + enum:
>> + - qcom,msm8916-dsi-ctrl
>> + then:
>> + properties:
>> + clocks:
>> + maxItems: 6
>> + clock-names:
>> + items:
>> + - const: mdp_core
>> + - const: iface
>> + - const: bus
>> + - const: byte
>> + - const: pixel
>> + - const: core
>> +
>> + - if:
>> + properties:
>> + compatible:
>> + contains:
>> + enum:
>> + - qcom,msm8974-dsi-ctrl
>> + then:
>> + properties:
>> + clocks:
>> + maxItems: 3
>> + clock-names:
>> + items:
>> + - const: iface
>> + - const: bus
>> + - const: vsync
>
> minItems are 6, so does it actually work?
Hmm.
I ran this using a recent version of dt-schema from github
DT_DOC_CHECKER=~/Development/qualcomm/dt-schema/tools/dt-doc-validate
DT_EXTRACT_EX=~/Development/qualcomm/dt-schema/tools/dt-extract-example
DT_MK_SCHEMA=~/Development/qualcomm/dt-schema/tools/dt-mk-schema
DT_CHECKER=~/Development/qualcomm/dt-schema/tools/dt-validate
make DT_CHECKER_FLAGS=-m dt_binding_check O=$BUILDDIR
DT_DOC_CHECKER=$DT_DOC_CHECKER DT_EXTRACT_EX=$DT_EXTRACT_EX
DT_MK_SCHEMA=$DT_MK_SCHEMA DT_CHECKER=$DT_CHECKER
DT_SCHEMA_FILES=display/msm/dsi-controller-main.yaml -j `nproc`
Neither of these throw an warning in my compile log
arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts:&dsi0
arch/arm/boot/dts/qcom-msm8974pro-samsung-klte.dts:&dsi0
thanks for spotting
>> - compatible = "qcom,mdss-dsi-ctrl";
>> + compatible = "qcom,sc7180-dsi-ctrl", "qcom,mdss-dsi-ctrl";
>
already dropped in v4
@@ -9,9 +9,6 @@ title: Qualcomm Display DSI controller
maintainers:
- Krishna Manikandan <quic_mkrishn@quicinc.com>
-allOf:
- - $ref: "../dsi-controller.yaml#"
-
properties:
compatible:
items:
@@ -48,13 +45,8 @@ properties:
- description: Display AXI clock
clock-names:
- items:
- - const: byte
- - const: byte_intf
- - const: pixel
- - const: core
- - const: iface
- - const: bus
+ minItems: 6
+ maxItems: 9
phys:
maxItems: 1
@@ -147,6 +139,146 @@ required:
- assigned-clock-parents
- ports
+allOf:
+ - $ref: "../dsi-controller.yaml#"
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,apq8064-dsi-ctrl
+ then:
+ properties:
+ clocks:
+ maxItems: 7
+ clock-names:
+ items:
+ - const: iface
+ - const: bus
+ - const: core_mmss
+ - const: src
+ - const: byte
+ - const: pixel
+ - const: core
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,msm8916-dsi-ctrl
+ then:
+ properties:
+ clocks:
+ maxItems: 6
+ clock-names:
+ items:
+ - const: mdp_core
+ - const: iface
+ - const: bus
+ - const: byte
+ - const: pixel
+ - const: core
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,msm8974-dsi-ctrl
+ then:
+ properties:
+ clocks:
+ maxItems: 3
+ clock-names:
+ items:
+ - const: iface
+ - const: bus
+ - const: vsync
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,msm8996-dsi-ctrl
+ then:
+ properties:
+ clocks:
+ maxItems: 7
+ clock-names:
+ items:
+ - const: mdp_core
+ - const: byte
+ - const: iface
+ - const: bus
+ - const: core_mmss
+ - const: pixel
+ - const: core
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,sc7180-dsi-ctrl
+ - qcom,sc7280-dsi-ctrl
+ - qcom,sm8250-dsi-ctrl
+ then:
+ properties:
+ clocks:
+ maxItems: 6
+ clock-names:
+ items:
+ - const: byte
+ - const: byte_intf
+ - const: pixel
+ - const: core
+ - const: iface
+ - const: bus
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,sdm630-dsi-ctrl
+ - qcom,sdm660-dsi-ctrl
+ then:
+ properties:
+ clocks:
+ maxItems: 9
+ clock-names:
+ items:
+ - const: mdp_core
+ - const: byte
+ - const: byte_intf
+ - const: mnoc
+ - const: iface
+ - const: bus
+ - const: core_mmss
+ - const: pixel
+ - const: core
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,sdm845-dsi-ctrl
+ then:
+ properties:
+ clocks:
+ maxItems: 6
+ clock-names:
+ items:
+ - const: byte
+ - const: byte_intf
+ - const: pixel
+ - const: core
+ - const: iface
+ - const: bus
+
additionalProperties: false
examples:
@@ -157,7 +289,7 @@ examples:
#include <dt-bindings/power/qcom-rpmpd.h>
dsi@ae94000 {
- compatible = "qcom,mdss-dsi-ctrl";
+ compatible = "qcom,sc7180-dsi-ctrl", "qcom,mdss-dsi-ctrl";
reg = <0x0ae94000 0x400>;
reg-names = "dsi_ctrl";