* [PATCH v2 0/1] dt-bindings: spi/display/panel: drop SPI CPHA and CPOL @ 2022-07-22 19:15 Krzysztof Kozlowski 2022-07-22 19:15 ` [PATCH v2 1/1] spi/panel: dt-bindings: drop CPHA and CPOL from common properties Krzysztof Kozlowski 2022-07-26 12:20 ` [PATCH v2 0/1] dt-bindings: spi/display/panel: drop SPI CPHA and CPOL Mark Brown 0 siblings, 2 replies; 7+ messages in thread From: Krzysztof Kozlowski @ 2022-07-22 19:15 UTC (permalink / raw) To: Thierry Reding, Sam Ravnborg, David Airlie, Daniel Vetter, Rob Herring, Krzysztof Kozlowski, Mark Brown, Tomi Valkeinen, Andrzej Hajda, Maxime Ripard, Marek Belisko, H. Nikolaus Schaller, Pratyush Yadav, dri-devel, devicetree, linux-kernel, linux-spi Cc: Krzysztof Kozlowski Hi, Rebased on Linus' master Changes since v1 ================ 1. Rework patchset as Rob suggested, so there is only one patch - changing spi and display/panel. v1: https://lore.kernel.org/all/20220721153155.245336-2-krzysztof.kozlowski@linaro.org/ Merging ======= I guess via DT or SPI tree. I don't expect conflicts with display/panel tree (at least nothing visible now in linux-next). Description =========== The spi-cpha and spi-cpol properties are device specific and should be accepted only if device really needs them. Inspired by [1]. [1] https://lore.kernel.org/all/20220718220012.GA3625497-robh@kernel.org/ Best regards, Krzysztof Krzysztof Kozlowski (1): spi/panel: dt-bindings: drop CPHA and CPOL from common properties .../bindings/display/panel/lgphilips,lb035q02.yaml | 3 +++ .../bindings/display/panel/samsung,ld9040.yaml | 3 +++ .../bindings/display/panel/sitronix,st7789v.yaml | 3 +++ .../devicetree/bindings/display/panel/tpo,td.yaml | 3 +++ .../devicetree/bindings/spi/spi-controller.yaml | 11 +++++++++++ .../devicetree/bindings/spi/spi-peripheral-props.yaml | 10 ---------- 6 files changed, 23 insertions(+), 10 deletions(-) -- 2.34.1 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 1/1] spi/panel: dt-bindings: drop CPHA and CPOL from common properties 2022-07-22 19:15 [PATCH v2 0/1] dt-bindings: spi/display/panel: drop SPI CPHA and CPOL Krzysztof Kozlowski @ 2022-07-22 19:15 ` Krzysztof Kozlowski 2022-07-22 19:45 ` Sam Ravnborg ` (2 more replies) 2022-07-26 12:20 ` [PATCH v2 0/1] dt-bindings: spi/display/panel: drop SPI CPHA and CPOL Mark Brown 1 sibling, 3 replies; 7+ messages in thread From: Krzysztof Kozlowski @ 2022-07-22 19:15 UTC (permalink / raw) To: Thierry Reding, Sam Ravnborg, David Airlie, Daniel Vetter, Rob Herring, Krzysztof Kozlowski, Mark Brown, Tomi Valkeinen, Andrzej Hajda, Maxime Ripard, Marek Belisko, H. Nikolaus Schaller, Pratyush Yadav, dri-devel, devicetree, linux-kernel, linux-spi Cc: Krzysztof Kozlowski, Jonathan Cameron, Rob Herring The spi-cpha and spi-cpol properties are device specific and should be accepted only if device really needs them. Drop them from common spi-peripheral-props.yaml schema, mention in few panel drivers which use them and include instead in the SPI controller bindings. The controller bindings will provide CPHA/CPOL type validation and one place for description. Each device schema must list the properties if they are applicable. Suggested-by: Jonathan Cameron <jic23@kernel.org> Suggested-by: Rob Herring <robh@kernel.org> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> --- .../bindings/display/panel/lgphilips,lb035q02.yaml | 3 +++ .../bindings/display/panel/samsung,ld9040.yaml | 3 +++ .../bindings/display/panel/sitronix,st7789v.yaml | 3 +++ .../devicetree/bindings/display/panel/tpo,td.yaml | 3 +++ .../devicetree/bindings/spi/spi-controller.yaml | 11 +++++++++++ .../devicetree/bindings/spi/spi-peripheral-props.yaml | 10 ---------- 6 files changed, 23 insertions(+), 10 deletions(-) diff --git a/Documentation/devicetree/bindings/display/panel/lgphilips,lb035q02.yaml b/Documentation/devicetree/bindings/display/panel/lgphilips,lb035q02.yaml index 5e4e0e552c2f..628c4b898111 100644 --- a/Documentation/devicetree/bindings/display/panel/lgphilips,lb035q02.yaml +++ b/Documentation/devicetree/bindings/display/panel/lgphilips,lb035q02.yaml @@ -21,6 +21,9 @@ properties: enable-gpios: true port: true + spi-cpha: true + spi-cpol: true + 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..c0fabeb38628 100644 --- a/Documentation/devicetree/bindings/display/panel/samsung,ld9040.yaml +++ b/Documentation/devicetree/bindings/display/panel/samsung,ld9040.yaml @@ -42,6 +42,9 @@ properties: panel-height-mm: description: physical panel height [mm] + spi-cpha: true + spi-cpol: true + required: - compatible - reg diff --git a/Documentation/devicetree/bindings/display/panel/sitronix,st7789v.yaml b/Documentation/devicetree/bindings/display/panel/sitronix,st7789v.yaml index 9e1d707c2ace..d984b59daa4a 100644 --- a/Documentation/devicetree/bindings/display/panel/sitronix,st7789v.yaml +++ b/Documentation/devicetree/bindings/display/panel/sitronix,st7789v.yaml @@ -23,6 +23,9 @@ properties: backlight: true port: true + spi-cpha: true + spi-cpol: true + 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..e8c8ee8d7c88 100644 --- a/Documentation/devicetree/bindings/display/panel/tpo,td.yaml +++ b/Documentation/devicetree/bindings/display/panel/tpo,td.yaml @@ -28,6 +28,9 @@ properties: backlight: true port: true + spi-cpha: true + spi-cpol: true + required: - compatible - port diff --git a/Documentation/devicetree/bindings/spi/spi-controller.yaml b/Documentation/devicetree/bindings/spi/spi-controller.yaml index 678cee68b52a..655713fba7e2 100644 --- a/Documentation/devicetree/bindings/spi/spi-controller.yaml +++ b/Documentation/devicetree/bindings/spi/spi-controller.yaml @@ -95,6 +95,17 @@ patternProperties: type: object $ref: spi-peripheral-props.yaml + properties: + spi-cpha: + $ref: /schemas/types.yaml#/definitions/flag + description: + The device requires shifted clock phase (CPHA) mode. + + spi-cpol: + $ref: /schemas/types.yaml#/definitions/flag + description: + The device requires inverse clock polarity (CPOL) mode. + required: - compatible - reg diff --git a/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml b/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml index 5e32928c4fc3..2349f83c07f3 100644 --- a/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml +++ b/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml @@ -34,16 +34,6 @@ properties: description: The device requires 3-wire mode. - spi-cpha: - $ref: /schemas/types.yaml#/definitions/flag - description: - The device requires shifted clock phase (CPHA) mode. - - spi-cpol: - $ref: /schemas/types.yaml#/definitions/flag - description: - The device requires inverse clock polarity (CPOL) mode. - spi-cs-high: $ref: /schemas/types.yaml#/definitions/flag description: -- 2.34.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/1] spi/panel: dt-bindings: drop CPHA and CPOL from common properties 2022-07-22 19:15 ` [PATCH v2 1/1] spi/panel: dt-bindings: drop CPHA and CPOL from common properties Krzysztof Kozlowski @ 2022-07-22 19:45 ` Sam Ravnborg 2022-07-23 18:10 ` Krzysztof Kozlowski 2022-07-25 23:14 ` Rob Herring 2022-07-31 10:59 ` Jonathan Cameron 2 siblings, 1 reply; 7+ messages in thread From: Sam Ravnborg @ 2022-07-22 19:45 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: Thierry Reding, David Airlie, Daniel Vetter, Rob Herring, Krzysztof Kozlowski, Mark Brown, Tomi Valkeinen, Andrzej Hajda, Maxime Ripard, Marek Belisko, H. Nikolaus Schaller, Pratyush Yadav, dri-devel, devicetree, linux-kernel, linux-spi, Jonathan Cameron, Rob Herring Hi Krzysztof On Fri, Jul 22, 2022 at 09:15:39PM +0200, Krzysztof Kozlowski wrote: > The spi-cpha and spi-cpol properties are device specific and should be > accepted only if device really needs them. Drop them from common > spi-peripheral-props.yaml schema, mention in few panel drivers which use > themi "and include instead in the SPI controller bindings." I cannot see you do this in the touched bindings. So I cannot see how for example samsung,ld9040.yaml picks up spi-controller.yaml and thus it no longer knows the spi-cpha and spi-cpol properties. Maybe I missed something? Sam ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/1] spi/panel: dt-bindings: drop CPHA and CPOL from common properties 2022-07-22 19:45 ` Sam Ravnborg @ 2022-07-23 18:10 ` Krzysztof Kozlowski 0 siblings, 0 replies; 7+ messages in thread From: Krzysztof Kozlowski @ 2022-07-23 18:10 UTC (permalink / raw) To: Sam Ravnborg Cc: Thierry Reding, David Airlie, Daniel Vetter, Rob Herring, Krzysztof Kozlowski, Mark Brown, Tomi Valkeinen, Andrzej Hajda, Maxime Ripard, Marek Belisko, H. Nikolaus Schaller, Pratyush Yadav, dri-devel, devicetree, linux-kernel, linux-spi, Jonathan Cameron, Rob Herring On 22/07/2022 21:45, Sam Ravnborg wrote: > Hi Krzysztof > > On Fri, Jul 22, 2022 at 09:15:39PM +0200, Krzysztof Kozlowski wrote: >> The spi-cpha and spi-cpol properties are device specific and should be >> accepted only if device really needs them. Drop them from common >> spi-peripheral-props.yaml schema, mention in few panel drivers which use >> themi > > "and include instead in the SPI controller bindings." > > I cannot see you do this in the touched bindings. Yep, because you always have two schemas being in play. One is SPI controller and other is the device (SPI slave). > So I cannot see how for example samsung,ld9040.yaml picks up > spi-controller.yaml and thus it no longer knows the spi-cpha and spi-cpol > properties. ld9040 is not spi-controller, but a SPI slave device, AFAIU. It will be therefore a child of some SPI controller, thus the SPI controller schema, which includes spi-controller.yaml, will validate the type of spi-cpha/cpol properties. Best regards, Krzysztof ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/1] spi/panel: dt-bindings: drop CPHA and CPOL from common properties 2022-07-22 19:15 ` [PATCH v2 1/1] spi/panel: dt-bindings: drop CPHA and CPOL from common properties Krzysztof Kozlowski 2022-07-22 19:45 ` Sam Ravnborg @ 2022-07-25 23:14 ` Rob Herring 2022-07-31 10:59 ` Jonathan Cameron 2 siblings, 0 replies; 7+ messages in thread From: Rob Herring @ 2022-07-25 23:14 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: Krzysztof Kozlowski, Marek Belisko, Sam Ravnborg, Maxime Ripard, Pratyush Yadav, devicetree, Andrzej Hajda, linux-spi, Jonathan Cameron, Rob Herring, linux-kernel, David Airlie, Thierry Reding, Tomi Valkeinen, Daniel Vetter, Mark Brown, dri-devel, H. Nikolaus Schaller On Fri, 22 Jul 2022 21:15:39 +0200, Krzysztof Kozlowski wrote: > The spi-cpha and spi-cpol properties are device specific and should be > accepted only if device really needs them. Drop them from common > spi-peripheral-props.yaml schema, mention in few panel drivers which use > them and include instead in the SPI controller bindings. The controller > bindings will provide CPHA/CPOL type validation and one place for > description. Each device schema must list the properties if they are > applicable. > > Suggested-by: Jonathan Cameron <jic23@kernel.org> > Suggested-by: Rob Herring <robh@kernel.org> > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > --- > .../bindings/display/panel/lgphilips,lb035q02.yaml | 3 +++ > .../bindings/display/panel/samsung,ld9040.yaml | 3 +++ > .../bindings/display/panel/sitronix,st7789v.yaml | 3 +++ > .../devicetree/bindings/display/panel/tpo,td.yaml | 3 +++ > .../devicetree/bindings/spi/spi-controller.yaml | 11 +++++++++++ > .../devicetree/bindings/spi/spi-peripheral-props.yaml | 10 ---------- > 6 files changed, 23 insertions(+), 10 deletions(-) > Reviewed-by: Rob Herring <robh@kernel.org> Unless Mark doesn't want to pick this up. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/1] spi/panel: dt-bindings: drop CPHA and CPOL from common properties 2022-07-22 19:15 ` [PATCH v2 1/1] spi/panel: dt-bindings: drop CPHA and CPOL from common properties Krzysztof Kozlowski 2022-07-22 19:45 ` Sam Ravnborg 2022-07-25 23:14 ` Rob Herring @ 2022-07-31 10:59 ` Jonathan Cameron 2 siblings, 0 replies; 7+ messages in thread From: Jonathan Cameron @ 2022-07-31 10:59 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: Thierry Reding, Sam Ravnborg, David Airlie, Daniel Vetter, Rob Herring, Krzysztof Kozlowski, Mark Brown, Tomi Valkeinen, Andrzej Hajda, Maxime Ripard, Marek Belisko, H. Nikolaus Schaller, Pratyush Yadav, dri-devel, devicetree, linux-kernel, linux-spi, Rob Herring On Fri, 22 Jul 2022 21:15:39 +0200 Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote: > The spi-cpha and spi-cpol properties are device specific and should be > accepted only if device really needs them. Drop them from common > spi-peripheral-props.yaml schema, mention in few panel drivers which use > them and include instead in the SPI controller bindings. The controller > bindings will provide CPHA/CPOL type validation and one place for > description. Each device schema must list the properties if they are > applicable. > > Suggested-by: Jonathan Cameron <jic23@kernel.org> > Suggested-by: Rob Herring <robh@kernel.org> > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> This seems like a good solution to me. Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> > --- > .../bindings/display/panel/lgphilips,lb035q02.yaml | 3 +++ > .../bindings/display/panel/samsung,ld9040.yaml | 3 +++ > .../bindings/display/panel/sitronix,st7789v.yaml | 3 +++ > .../devicetree/bindings/display/panel/tpo,td.yaml | 3 +++ > .../devicetree/bindings/spi/spi-controller.yaml | 11 +++++++++++ > .../devicetree/bindings/spi/spi-peripheral-props.yaml | 10 ---------- > 6 files changed, 23 insertions(+), 10 deletions(-) > > diff --git a/Documentation/devicetree/bindings/display/panel/lgphilips,lb035q02.yaml b/Documentation/devicetree/bindings/display/panel/lgphilips,lb035q02.yaml > index 5e4e0e552c2f..628c4b898111 100644 > --- a/Documentation/devicetree/bindings/display/panel/lgphilips,lb035q02.yaml > +++ b/Documentation/devicetree/bindings/display/panel/lgphilips,lb035q02.yaml > @@ -21,6 +21,9 @@ properties: > enable-gpios: true > port: true > > + spi-cpha: true > + spi-cpol: true > + > 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..c0fabeb38628 100644 > --- a/Documentation/devicetree/bindings/display/panel/samsung,ld9040.yaml > +++ b/Documentation/devicetree/bindings/display/panel/samsung,ld9040.yaml > @@ -42,6 +42,9 @@ properties: > panel-height-mm: > description: physical panel height [mm] > > + spi-cpha: true > + spi-cpol: true > + > required: > - compatible > - reg > diff --git a/Documentation/devicetree/bindings/display/panel/sitronix,st7789v.yaml b/Documentation/devicetree/bindings/display/panel/sitronix,st7789v.yaml > index 9e1d707c2ace..d984b59daa4a 100644 > --- a/Documentation/devicetree/bindings/display/panel/sitronix,st7789v.yaml > +++ b/Documentation/devicetree/bindings/display/panel/sitronix,st7789v.yaml > @@ -23,6 +23,9 @@ properties: > backlight: true > port: true > > + spi-cpha: true > + spi-cpol: true > + > 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..e8c8ee8d7c88 100644 > --- a/Documentation/devicetree/bindings/display/panel/tpo,td.yaml > +++ b/Documentation/devicetree/bindings/display/panel/tpo,td.yaml > @@ -28,6 +28,9 @@ properties: > backlight: true > port: true > > + spi-cpha: true > + spi-cpol: true > + > required: > - compatible > - port > diff --git a/Documentation/devicetree/bindings/spi/spi-controller.yaml b/Documentation/devicetree/bindings/spi/spi-controller.yaml > index 678cee68b52a..655713fba7e2 100644 > --- a/Documentation/devicetree/bindings/spi/spi-controller.yaml > +++ b/Documentation/devicetree/bindings/spi/spi-controller.yaml > @@ -95,6 +95,17 @@ patternProperties: > type: object > $ref: spi-peripheral-props.yaml > > + properties: > + spi-cpha: > + $ref: /schemas/types.yaml#/definitions/flag > + description: > + The device requires shifted clock phase (CPHA) mode. > + > + spi-cpol: > + $ref: /schemas/types.yaml#/definitions/flag > + description: > + The device requires inverse clock polarity (CPOL) mode. > + > required: > - compatible > - reg > diff --git a/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml b/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml > index 5e32928c4fc3..2349f83c07f3 100644 > --- a/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml > +++ b/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml > @@ -34,16 +34,6 @@ properties: > description: > The device requires 3-wire mode. > > - spi-cpha: > - $ref: /schemas/types.yaml#/definitions/flag > - description: > - The device requires shifted clock phase (CPHA) mode. > - > - spi-cpol: > - $ref: /schemas/types.yaml#/definitions/flag > - description: > - The device requires inverse clock polarity (CPOL) mode. > - > spi-cs-high: > $ref: /schemas/types.yaml#/definitions/flag > description: ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 0/1] dt-bindings: spi/display/panel: drop SPI CPHA and CPOL 2022-07-22 19:15 [PATCH v2 0/1] dt-bindings: spi/display/panel: drop SPI CPHA and CPOL Krzysztof Kozlowski 2022-07-22 19:15 ` [PATCH v2 1/1] spi/panel: dt-bindings: drop CPHA and CPOL from common properties Krzysztof Kozlowski @ 2022-07-26 12:20 ` Mark Brown 1 sibling, 0 replies; 7+ messages in thread From: Mark Brown @ 2022-07-26 12:20 UTC (permalink / raw) To: linux-kernel, H. Nikolaus Schaller, Krzysztof Kozlowski, Tomi Valkeinen, Sam Ravnborg, Krzysztof Kozlowski, Rob Herring, Pratyush Yadav, Thierry Reding, Andrzej Hajda, David Airlie, Maxime Ripard, Marek Belisko, dri-devel, devicetree, Daniel Vetter, linux-spi On Fri, 22 Jul 2022 21:15:38 +0200, Krzysztof Kozlowski wrote: > Rebased on Linus' master > > Changes since v1 > ================ > 1. Rework patchset as Rob suggested, so there is only one patch - changing spi > and display/panel. > v1: https://lore.kernel.org/all/20220721153155.245336-2-krzysztof.kozlowski@linaro.org/ > > [...] Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next Thanks! [1/1] spi/panel: dt-bindings: drop CPHA and CPOL from common properties commit: 233363aba72ac638dda6838f8e817c46d36c2431 All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-07-31 10:49 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-07-22 19:15 [PATCH v2 0/1] dt-bindings: spi/display/panel: drop SPI CPHA and CPOL Krzysztof Kozlowski 2022-07-22 19:15 ` [PATCH v2 1/1] spi/panel: dt-bindings: drop CPHA and CPOL from common properties Krzysztof Kozlowski 2022-07-22 19:45 ` Sam Ravnborg 2022-07-23 18:10 ` Krzysztof Kozlowski 2022-07-25 23:14 ` Rob Herring 2022-07-31 10:59 ` Jonathan Cameron 2022-07-26 12:20 ` [PATCH v2 0/1] dt-bindings: spi/display/panel: drop SPI CPHA and CPOL Mark Brown
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).