[PATCH v6 05/10] dt-bindings: soc: mediatek: convert pwrap documentation

Krzysztof Kozlowski krzysztof.kozlowski at linaro.org
Sun Nov 27 05:11:48 PST 2022


On 27/11/2022 14:04, Krzysztof Kozlowski wrote:
> On 25/11/2022 16:10, Alexandre Mergnat wrote:
>> - Convert soc/mediatek/pwrap.txt to soc/mediatek/mediatek,pwrap.yaml
>> - Add syscon compatible const for mt8186 and mt8195 to match the DTS needs.
>>
>> +  resets:
>> +    minItems: 1
>> +    items:
>> +      - description: PMIC wrapper reset
>> +      - description: IP pairing reset
>> +
>> +  reset-names:
>> +    minItems: 1
>> +    items:
>> +      - const: pwrap
>> +      - const: pwrap-bridge
>> +
>> +  pmic:
>> +    type: object
> 
> What's here? Other schema? If not then maybe compatible? What about
> description?

I guess this was comment from Rob, so it's fine.

> 
>> +
>> +required:
>> +  - compatible
>> +  - reg
>> +  - reg-names
>> +  - interrupts
>> +  - clocks
>> +  - clock-names
>> +
>> +dependentRequired:
>> +  resets: [reset-names]
> 
> Drop.
> 
>> +
>> +allOf:
>> +  - if:
>> +      properties:
>> +        compatible:
>> +          contains:
>> +            const: mediatek,mt8365-pwrap
>> +    then:
>> +      properties:
>> +        clocks:
>> +          minItems: 4
>> +
>> +        clock-names:
>> +          minItems: 4
> 
> else:
> ???

Actually this looks less complete than your previous patch.

else:
  clocks:
    maxItems: 2
same for clock-names

> 
>> +
>> +additionalProperties: false
>> +
>> +examples:
>> +  - |
>> +    #include <dt-bindings/interrupt-controller/irq.h>
>> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
>> +    #include <dt-bindings/reset/mt8135-resets.h>
>> +
>> +    soc {
>> +        #address-cells = <2>;
>> +        #size-cells = <2>;
>> +        pwrap at 1000d000 {
>> +            compatible = "mediatek,mt8135-pwrap";
>> +            reg = <0 0x1000f000 0 0x1000>,
> 
> This does not match your unit address. No warnings when compile testing?
> 
>> +                  <0 0x11017000 0 0x1000>;
>> +            reg-names = "pwrap", "pwrap-bridge";
>> +            interrupts = <GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>;
>> +            clocks = <&clk26m>, <&clk26m>;
>> +            clock-names = "spi", "wrap";
>> +            resets = <&infracfg MT8135_INFRA_PMIC_WRAP_RST>,
>> +                     <&pericfg MT8135_PERI_PWRAP_BRIDGE_SW_RST>;
>> +            reset-names = "pwrap", "pwrap-bridge";
> 
> Missing pmic. Make your example complete.

Probably pmic should be skipped, I understand it is described in MFD
binding.

Best regards,
Krzysztof




More information about the Linux-mediatek mailing list