Message ID | 20220721153155.245336-2-krzysztof.kozlowski@linaro.org (mailing list archive) |
---|---|
State | Handled Elsewhere |
Headers | show |
Series | dt-bindings: iio/panel/eeprom/misc/net/spi: drop SPI CPHA and CPOL | expand |
On Thu, Jul 21, 2022 at 05:31:50PM +0200, Krzysztof Kozlowski wrote: > The spi-cpha and spi-cpol properties are device specific and should be > accepted only if device really needs them. Explicitly list them in > device bindings in preparation of their removal from generic > spi-peripheral-props.yaml schema. > > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > --- > .../bindings/display/panel/lgphilips,lb035q02.yaml | 10 ++++++++++ > .../bindings/display/panel/samsung,ld9040.yaml | 10 ++++++++++ > .../bindings/display/panel/samsung,lms380kf01.yaml | 12 +++++++++--- > .../bindings/display/panel/samsung,lms397kf04.yaml | 12 +++++++++--- > .../bindings/display/panel/samsung,s6d27a1.yaml | 12 +++++++++--- > .../bindings/display/panel/sitronix,st7789v.yaml | 10 ++++++++++ > .../devicetree/bindings/display/panel/tpo,td.yaml | 10 ++++++++++ > 7 files changed, 67 insertions(+), 9 deletions(-) > > diff --git a/Documentation/devicetree/bindings/display/panel/lgphilips,lb035q02.yaml b/Documentation/devicetree/bindings/display/panel/lgphilips,lb035q02.yaml > index 5e4e0e552c2f..0bd7bbad5b94 100644 > --- a/Documentation/devicetree/bindings/display/panel/lgphilips,lb035q02.yaml > +++ b/Documentation/devicetree/bindings/display/panel/lgphilips,lb035q02.yaml > @@ -21,6 +21,16 @@ properties: > enable-gpios: true > port: true > > + spi-cpha: > + type: boolean > + description: > + The device requires shifted clock phase (CPHA) mode. > + > + spi-cpol: > + type: boolean > + description: > + The device requires inverse clock polarity (CPOL) mode. Not great duplicating the type and description everywhere. We can move the definition back to spi-controller.yaml, so then that does type checking of the property, but not presence/absence checks. Rob
On 21/07/2022 21:30, Rob Herring wrote: > On Thu, Jul 21, 2022 at 05:31:50PM +0200, Krzysztof Kozlowski wrote: >> The spi-cpha and spi-cpol properties are device specific and should be >> accepted only if device really needs them. Explicitly list them in >> device bindings in preparation of their removal from generic >> spi-peripheral-props.yaml schema. >> >> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> >> --- >> .../bindings/display/panel/lgphilips,lb035q02.yaml | 10 ++++++++++ >> .../bindings/display/panel/samsung,ld9040.yaml | 10 ++++++++++ >> .../bindings/display/panel/samsung,lms380kf01.yaml | 12 +++++++++--- >> .../bindings/display/panel/samsung,lms397kf04.yaml | 12 +++++++++--- >> .../bindings/display/panel/samsung,s6d27a1.yaml | 12 +++++++++--- >> .../bindings/display/panel/sitronix,st7789v.yaml | 10 ++++++++++ >> .../devicetree/bindings/display/panel/tpo,td.yaml | 10 ++++++++++ >> 7 files changed, 67 insertions(+), 9 deletions(-) >> >> diff --git a/Documentation/devicetree/bindings/display/panel/lgphilips,lb035q02.yaml b/Documentation/devicetree/bindings/display/panel/lgphilips,lb035q02.yaml >> index 5e4e0e552c2f..0bd7bbad5b94 100644 >> --- a/Documentation/devicetree/bindings/display/panel/lgphilips,lb035q02.yaml >> +++ b/Documentation/devicetree/bindings/display/panel/lgphilips,lb035q02.yaml >> @@ -21,6 +21,16 @@ properties: >> enable-gpios: true >> port: true >> >> + spi-cpha: >> + type: boolean >> + description: >> + The device requires shifted clock phase (CPHA) mode. >> + >> + spi-cpol: >> + type: boolean >> + description: >> + The device requires inverse clock polarity (CPOL) mode. > > Not great duplicating the type and description everywhere. > > We can move the definition back to spi-controller.yaml, so then that > does type checking of the property, but not presence/absence checks. If I understand correctly, all client devices (which do no reference spi-controller) will need to explicitly mention CPHA/CPOL. Good idea. Best regards, Krzysztof
diff --git a/Documentation/devicetree/bindings/display/panel/lgphilips,lb035q02.yaml b/Documentation/devicetree/bindings/display/panel/lgphilips,lb035q02.yaml index 5e4e0e552c2f..0bd7bbad5b94 100644 --- a/Documentation/devicetree/bindings/display/panel/lgphilips,lb035q02.yaml +++ b/Documentation/devicetree/bindings/display/panel/lgphilips,lb035q02.yaml @@ -21,6 +21,16 @@ properties: enable-gpios: true port: true + spi-cpha: + type: boolean + description: + The device requires shifted clock phase (CPHA) mode. + + spi-cpol: + type: boolean + description: + The device requires inverse clock polarity (CPOL) mode. + required: - compatible - enable-gpios diff --git a/Documentation/devicetree/bindings/display/panel/samsung,ld9040.yaml b/Documentation/devicetree/bindings/display/panel/samsung,ld9040.yaml index d525165d6d63..ee6a61549916 100644 --- a/Documentation/devicetree/bindings/display/panel/samsung,ld9040.yaml +++ b/Documentation/devicetree/bindings/display/panel/samsung,ld9040.yaml @@ -42,6 +42,16 @@ properties: panel-height-mm: description: physical panel height [mm] + spi-cpha: + type: boolean + description: + The device requires shifted clock phase (CPHA) mode. + + spi-cpol: + type: boolean + description: + The device requires inverse clock polarity (CPOL) mode. + required: - compatible - reg diff --git a/Documentation/devicetree/bindings/display/panel/samsung,lms380kf01.yaml b/Documentation/devicetree/bindings/display/panel/samsung,lms380kf01.yaml index 251f0c7115aa..7f010cb4aa20 100644 --- a/Documentation/devicetree/bindings/display/panel/samsung,lms380kf01.yaml +++ b/Documentation/devicetree/bindings/display/panel/samsung,lms380kf01.yaml @@ -43,9 +43,15 @@ properties: backlight: true - spi-cpha: true - - spi-cpol: true + spi-cpha: + type: boolean + description: + The device requires shifted clock phase (CPHA) mode. + + spi-cpol: + type: boolean + description: + The device requires inverse clock polarity (CPOL) mode. spi-max-frequency: maximum: 1200000 diff --git a/Documentation/devicetree/bindings/display/panel/samsung,lms397kf04.yaml b/Documentation/devicetree/bindings/display/panel/samsung,lms397kf04.yaml index cd62968426fb..794da8b45896 100644 --- a/Documentation/devicetree/bindings/display/panel/samsung,lms397kf04.yaml +++ b/Documentation/devicetree/bindings/display/panel/samsung,lms397kf04.yaml @@ -33,9 +33,15 @@ properties: backlight: true - spi-cpha: true - - spi-cpol: true + spi-cpha: + type: boolean + description: + The device requires shifted clock phase (CPHA) mode. + + spi-cpol: + type: boolean + description: + The device requires inverse clock polarity (CPOL) mode. spi-max-frequency: description: inherited as a SPI client node, the datasheet specifies diff --git a/Documentation/devicetree/bindings/display/panel/samsung,s6d27a1.yaml b/Documentation/devicetree/bindings/display/panel/samsung,s6d27a1.yaml index 26e3c820a2f7..468111b1a1b4 100644 --- a/Documentation/devicetree/bindings/display/panel/samsung,s6d27a1.yaml +++ b/Documentation/devicetree/bindings/display/panel/samsung,s6d27a1.yaml @@ -41,9 +41,15 @@ properties: backlight: true - spi-cpha: true - - spi-cpol: true + spi-cpha: + type: boolean + description: + The device requires shifted clock phase (CPHA) mode. + + spi-cpol: + type: boolean + description: + The device requires inverse clock polarity (CPOL) mode. spi-max-frequency: maximum: 1200000 diff --git a/Documentation/devicetree/bindings/display/panel/sitronix,st7789v.yaml b/Documentation/devicetree/bindings/display/panel/sitronix,st7789v.yaml index 9e1d707c2ace..0eea7de51689 100644 --- a/Documentation/devicetree/bindings/display/panel/sitronix,st7789v.yaml +++ b/Documentation/devicetree/bindings/display/panel/sitronix,st7789v.yaml @@ -23,6 +23,16 @@ properties: backlight: true port: true + spi-cpha: + type: boolean + description: + The device requires shifted clock phase (CPHA) mode. + + spi-cpol: + type: boolean + description: + The device requires inverse clock polarity (CPOL) mode. + required: - compatible - reg diff --git a/Documentation/devicetree/bindings/display/panel/tpo,td.yaml b/Documentation/devicetree/bindings/display/panel/tpo,td.yaml index f902a9d74141..9b0e8659d6bd 100644 --- a/Documentation/devicetree/bindings/display/panel/tpo,td.yaml +++ b/Documentation/devicetree/bindings/display/panel/tpo,td.yaml @@ -28,6 +28,16 @@ properties: backlight: true port: true + spi-cpha: + type: boolean + description: + The device requires shifted clock phase (CPHA) mode. + + spi-cpol: + type: boolean + description: + The device requires inverse clock polarity (CPOL) mode. + required: - compatible - port
The spi-cpha and spi-cpol properties are device specific and should be accepted only if device really needs them. Explicitly list them in device bindings in preparation of their removal from generic spi-peripheral-props.yaml schema. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> --- .../bindings/display/panel/lgphilips,lb035q02.yaml | 10 ++++++++++ .../bindings/display/panel/samsung,ld9040.yaml | 10 ++++++++++ .../bindings/display/panel/samsung,lms380kf01.yaml | 12 +++++++++--- .../bindings/display/panel/samsung,lms397kf04.yaml | 12 +++++++++--- .../bindings/display/panel/samsung,s6d27a1.yaml | 12 +++++++++--- .../bindings/display/panel/sitronix,st7789v.yaml | 10 ++++++++++ .../devicetree/bindings/display/panel/tpo,td.yaml | 10 ++++++++++ 7 files changed, 67 insertions(+), 9 deletions(-)