Message ID | 20220409045145.2434096-2-dfustini@baylibre.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | soc: ti: wkup_m3_ipc: support vtt toggle | expand |
On 09/04/2022 06:51, Drew Fustini wrote: > Document the Wakeup M3 IPC properties that can be used to toggle the VTT > regulator during low power mode transitions. > (...) > @@ -51,6 +61,15 @@ properties: > mbox_wkupm3 child node. > maxItems: 1 > > + ti,needs-vtt-toggle: > + type: boolean > + description: boards requires VTT toggling during suspend/resume > + > + ti,vtt-gpio-pin: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: pin on the GPIO0 module used for VTT toggle > + maxItems: 1 No need for maxItems, it's a single uint32. You could add "maximum" if you know the constraints for the value. Do you actually need two properties (bool + pin)? A case of "ti,vtt-gpio-pin" without the "ti,needs-vtt-toggle" is valid? The other way looks wrong, so you need to add a dependency (see example-schema). Best regards, Krzysztof
On Sat, Apr 09, 2022 at 06:25:24PM +0200, Krzysztof Kozlowski wrote: > On 09/04/2022 06:51, Drew Fustini wrote: > > Document the Wakeup M3 IPC properties that can be used to toggle the VTT > > regulator during low power mode transitions. > > > > (...) > > > @@ -51,6 +61,15 @@ properties: > > mbox_wkupm3 child node. > > maxItems: 1 > > > > + ti,needs-vtt-toggle: > > + type: boolean > > + description: boards requires VTT toggling during suspend/resume > > + > > + ti,vtt-gpio-pin: > > + $ref: /schemas/types.yaml#/definitions/uint32 > > + description: pin on the GPIO0 module used for VTT toggle > > + maxItems: 1 > > No need for maxItems, it's a single uint32. You could add "maximum" if > you know the constraints for the value. Thank you for letting me know. > Do you actually need two properties (bool + pin)? A case of > "ti,vtt-gpio-pin" without the "ti,needs-vtt-toggle" is valid? You raise a good point. In fact, the driver does nothing useful in the case of "ti,needs-vtt-toggle" without "ti,vtt-gpio-pin". Therefore, I will remove the "ti,needs-vtt-toggle" property. > > The other way looks wrong, so you need to add a dependency (see > example-schema). > > > Best regards, > Krzysztof Thank you, Drew
On Sat, Apr 09, 2022 at 06:25:24PM +0200, Krzysztof Kozlowski wrote: > On 09/04/2022 06:51, Drew Fustini wrote: > > Document the Wakeup M3 IPC properties that can be used to toggle the VTT > > regulator during low power mode transitions. > > > > (...) > > > @@ -51,6 +61,15 @@ properties: > > mbox_wkupm3 child node. > > maxItems: 1 > > > > + ti,needs-vtt-toggle: > > + type: boolean > > + description: boards requires VTT toggling during suspend/resume > > + > > + ti,vtt-gpio-pin: > > + $ref: /schemas/types.yaml#/definitions/uint32 > > + description: pin on the GPIO0 module used for VTT toggle > > + maxItems: 1 > > No need for maxItems, it's a single uint32. You could add "maximum" if > you know the constraints for the value. Whenever I see the same problem repeated, I ask if we can catch with meta-schema. Often we can, but we have to fix all the existing ones: media/mediatek,vcodec-encoder.yaml: properties:mediatek,scp:maxItems: False schema does not allow 1 media/mediatek,vcodec-encoder.yaml: properties:mediatek,vpu:maxItems: False schema does not allow 1 remoteproc/qcom,sc7280-wpss-pil.yaml: properties:glink-edge:properties:qcom,remote-pid:maxItems: False schema does not allow 1 media/mediatek,vcodec-subdev-decoder.yaml: properties:mediatek,scp:maxItems: False schema does not allow 1 media/mediatek,vcodec-decoder.yaml: properties:mediatek,vpu:maxItems: False schema does not allow 1 media/mediatek,vcodec-decoder.yaml: properties:mediatek,scp:maxItems: False schema does not allow 1 media/coda.yaml: properties:iram:maxItems: False schema does not allow 1 display/panel/panel-timing.yaml: properties:vsync-len:oneOf:0:maxItems: False schema does not allow 1 display/panel/panel-timing.yaml: properties:vsync-len:oneOf:0:items: False schema does not allow {'description': 'typical number of lines'} display/panel/panel-timing.yaml: properties:hfront-porch:oneOf:0:maxItems: False schema does not allow 1 display/panel/panel-timing.yaml: properties:hfront-porch:oneOf:0:items: False schema does not allow {'description': 'typical number of pixels'} display/panel/panel-timing.yaml: properties:hback-porch:oneOf:0:maxItems: False schema does not allow 1 display/panel/panel-timing.yaml: properties:hback-porch:oneOf:0:items: False schema does not allow {'description': 'typical number of pixels'} display/panel/panel-timing.yaml: properties:hsync-len:oneOf:0:maxItems: False schema does not allow 1 display/panel/panel-timing.yaml: properties:hsync-len:oneOf:0:items: False schema does not allow {'description': 'typical number of pixels'} display/panel/panel-timing.yaml: properties:vfront-porch:oneOf:0:maxItems: False schema does not allow 1 display/panel/panel-timing.yaml: properties:vfront-porch:oneOf:0:items: False schema does not allow {'description': 'typical number of lines'} display/panel/panel-timing.yaml: properties:vback-porch:oneOf:0:maxItems: False schema does not allow 1 display/panel/panel-timing.yaml: properties:vback-porch:oneOf:0:items: False schema does not allow {'description': 'typical number of lines'} iio/adc/st,stm32-dfsdm-adc.yaml: patternProperties:^filter@[0-9]+$:properties:st,filter-order:items: False schema does not allow {'minimum': 0, 'maximum': 5} spi/renesas,sh-msiof.yaml: properties:renesas,rx-fifo-size:maxItems: False schema does not allow 1 spi/renesas,sh-msiof.yaml: properties:renesas,tx-fifo-size:maxItems: False schema does not allow 1 hwmon/ti,tmp421.yaml: patternProperties:^channel@([0-3])$:properties:ti,n-factor:items: False schema does not allow {'minimum': 0, 'maximum': 255} hwmon/ti,tmp464.yaml: patternProperties:^channel@([0-8])$:properties:ti,n-factor:items: False schema does not allow {'minimum': -128, 'maximum': 127} I already have fixes for these. FYI, the meta-schema change looks like this: diff --git a/dtschema/meta-schemas/keywords.yaml b/dtschema/meta-schemas/keywords.yaml index 6d6fdfd08d3b..73ed113aed3a 100644 --- a/dtschema/meta-schemas/keywords.yaml +++ b/dtschema/meta-schemas/keywords.yaml @@ -155,3 +155,17 @@ properties: - type: boolean uniqueItems: type: boolean + +allOf: + - description: Scalar properties should not have array keywords + if: + properties: + $ref: + pattern: '(int[1-8]+|phandle|flag)$' + required: + - $ref + then: + properties: + maxItems: false + minItems: false + items: false
diff --git a/Documentation/devicetree/bindings/soc/ti/wkup-m3-ipc.yaml b/Documentation/devicetree/bindings/soc/ti/wkup-m3-ipc.yaml index d855c01ce61c..6a8fcad8b2fd 100644 --- a/Documentation/devicetree/bindings/soc/ti/wkup-m3-ipc.yaml +++ b/Documentation/devicetree/bindings/soc/ti/wkup-m3-ipc.yaml @@ -24,6 +24,16 @@ description: |+ A wkup_m3_ipc device node is used to represent the IPC registers within an SoC. + Support for VTT Toggle + ================================== + In order to enable the support for VTT toggle during Suspend/Resume sequence + needed by some boards (like AM335x EVM-SK & AM437x GP EVM), the vtt properties + below are required. It is possible to toggle VTT using one of two methods + depending on the SoC being used, either GPIO0 toggle (AM335x and AM437x), or + any GPIO with DS_PAD_CONFIG bits in the control module (AM437x only). Please + note that only pins on the GPIO0 module can be used for GPIO toggle. It will + not work with any other GPIO module. + properties: compatible: enum: @@ -51,6 +61,15 @@ properties: mbox_wkupm3 child node. maxItems: 1 + ti,needs-vtt-toggle: + type: boolean + description: boards requires VTT toggling during suspend/resume + + ti,vtt-gpio-pin: + $ref: /schemas/types.yaml#/definitions/uint32 + description: pin on the GPIO0 module used for VTT toggle + maxItems: 1 + required: - compatible - reg @@ -76,6 +95,8 @@ examples: interrupts = <78>; ti,rproc = <&wkup_m3>; mboxes = <&mailbox &mbox_wkupm3>; + ti,needs-vtt-toggle; + ti,vtt-gpio-pin = <7>; }; }; ...