Message ID | 20221004-up-aml-fix-spi-v3-1-89de126fd163@baylibre.com |
---|---|
State | New |
Headers | show |
Series | [v3,1/2] spi: dt-bindings: amlogic, meson-gx-spicc: Add pinctrl names for SPI signal states | expand |
>>> + properties: >>> + pinctrl-names: >>> + minItems: 1 >>> + items: >>> + - const: default >>> + - const: idle-high >>> + - const: idle-low >> >> You should also define in such case pinctrl-0 and others. > > Ok I thought it would be covered by the pinctrl-consumer.yaml > but yeah we should allow pinctrl-1 and pinctrl-2 here aswell by adding: > > pinctrl-1: true > pinctrl-2: true > > Yes. Best regards, Krzysztof
On 21/10/2022 08:54, Amjad Ouled-Ameur wrote: > Hi > > On 10/20/22 14:49, Krzysztof Kozlowski wrote: >>>>> + properties: >>>>> + pinctrl-names: >>>>> + minItems: 1 >>>>> + items: >>>>> + - const: default >>>>> + - const: idle-high >>>>> + - const: idle-low >>>> You should also define in such case pinctrl-0 and others. >>> Ok I thought it would be covered by the pinctrl-consumer.yaml >>> but yeah we should allow pinctrl-1 and pinctrl-2 here aswell by adding: >>> >>> pinctrl-1: true >>> pinctrl-2: true >>> >>> > In such case, should I define pinctrl- as part of the if statement, as shown below, > > or before allOf ? The same as pinctrl-names, so part of allOf. > > [...] > > - if: > properties: > compatible: > contains: > enum: > - amlogic,meson-gx-spicc > > then: > properties: > pinctrl-0: true > pinctrl-1: true > pinctrl-2: true > > pinctrl-names: > minItems: 1 > items: > - const: default > - const: idle-high > - const: idle-low Best regards, Krzysztof
diff --git a/Documentation/devicetree/bindings/spi/amlogic,meson-gx-spicc.yaml b/Documentation/devicetree/bindings/spi/amlogic,meson-gx-spicc.yaml index 0c10f7678178..3e47fe7760a8 100644 --- a/Documentation/devicetree/bindings/spi/amlogic,meson-gx-spicc.yaml +++ b/Documentation/devicetree/bindings/spi/amlogic,meson-gx-spicc.yaml @@ -43,31 +43,48 @@ properties: minItems: 1 maxItems: 2 -if: - properties: - compatible: - contains: - enum: - - amlogic,meson-g12a-spicc - -then: - properties: - clocks: - minItems: 2 - - clock-names: - items: - - const: core - - const: pclk - -else: - properties: - clocks: - maxItems: 1 - - clock-names: - items: - - const: core +allOf: + - if: + properties: + compatible: + contains: + enum: + - amlogic,meson-g12a-spicc + + then: + properties: + clocks: + minItems: 2 + + clock-names: + items: + - const: core + - const: pclk + + else: + properties: + clocks: + maxItems: 1 + + clock-names: + items: + - const: core + + - if: + properties: + compatible: + contains: + enum: + - amlogic,meson-gx-spicc + + then: + properties: + pinctrl-names: + minItems: 1 + items: + - const: default + - const: idle-high + - const: idle-low required: - compatible