Re: [PATCH v2] dt-bindings: iommu: Convert QCOM IOMMU to YAML

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/04/2023 13:58, Konrad Dybcio wrote:
> Convert the Qualcomm IOMMU bindings to YAML.
> 
> Signed-off-by: Konrad Dybcio <konrad.dybcio@xxxxxxxxxx>
> ---
> v1 -> v2:

Thank you for your patch. There is something to discuss/improve.

> +
> +patternProperties:
> +  "^iommu-ctx@[0-9a-f]+$":
> +    type: object

On this level:
additionalProperties: false

> +    properties:
> +      compatible:
> +        enum:
> +          - qcom,msm-iommu-v1-ns
> +          - qcom,msm-iommu-v1-sec
> +
> +      interrupts:
> +        maxItems: 1
> +
> +      reg:
> +        maxItems: 1

On this level:
    required:
      - compatible
      - interrupts
      - reg

> +
> +required:
> +  - compatible
> +  - clocks
> +  - clock-names
> +  - ranges
> +  - '#address-cells'
> +  - '#size-cells'
> +  - '#iommu-cells'
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/clock/qcom,gcc-msm8916.h>
> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
> +
> +    apps_iommu: iommu@1e20000 {
> +      compatible = "qcom,msm8916-iommu", "qcom,msm-iommu-v1";
> +      reg = <0x01ef0000 0x3000>;
> +      clocks = <&gcc GCC_SMMU_CFG_CLK>,
> +               <&gcc GCC_APSS_TCU_CLK>;
> +      clock-names = "iface", "bus";
> +      qcom,iommu-secure-id = <17>;
> +      #address-cells = <1>;
> +      #size-cells = <1>;
> +      #iommu-cells = <1>;
> +      ranges = <0 0x01e20000 0x40000>;
> +
> +      /* mdp_0: */
> +      iommu-ctx@4000 {
> +        compatible = "qcom,msm-iommu-v1-ns";
> +        reg = <0x4000 0x1000>;
> +        interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>;
> +      };
> +    };
> +
> +    mdp: mdp@1a01000 {
> +      reg = <0x01a01000 0x1000>;
> +      iommus = <&apps_iommu 4>;

Drop mdp node. Consumers should not be in provider bindings.



Best regards,
Krzysztof




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux