* [PATCH 2/2] DTS: ARM: gta04: introduce legacy spi-cs-high to make display work again [not found] <cover.1562597164.git.hns@goldelico.com> @ 2019-07-08 14:46 ` H. Nikolaus Schaller 2019-07-24 19:42 ` Rob Herring 0 siblings, 1 reply; 17+ messages in thread From: H. Nikolaus Schaller @ 2019-07-08 14:46 UTC (permalink / raw) To: Mark Brown, Rob Herring, Mark Rutland, Benoît Cousson, Tony Lindgren Cc: letux-kernel, linux-spi, devicetree, linux-kernel, linux-omap, H. Nikolaus Schaller, stable commit 6953c57ab172 "gpio: of: Handle SPI chipselect legacy bindings" did introduce logic to centrally handle the legacy spi-cs-high property in combination with cs-gpios. This assumes that the polarity of the CS has to be inverted if spi-cs-high is missing, even and especially if non-legacy GPIO_ACTIVE_HIGH is specified. The DTS for the GTA04 was orginally introduced under the assumption that there is no need for spi-cs-high if the gpio is defined with proper polarity GPIO_ACTIVE_HIGH. This was not a problem until gpiolib changed the interpretation of GPIO_ACTIVE_HIGH and missing spi-cs-high. The effect is that the missing spi-cs-high is now interpreted as CS being low (despite GPIO_ACTIVE_HIGH) which turns off the SPI interface when the panel is to be programmed by the panel driver. Therefore, we have to add the redundant and legacy spi-cs-high property to properly pass through the legacy handler. Since this is nowhere documented in the bindings, we add some words of WARNING. Cc: stable@vger.kernel.org Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com> --- Documentation/devicetree/bindings/spi/spi-bus.txt | 6 ++++++ arch/arm/boot/dts/omap3-gta04.dtsi | 1 + 2 files changed, 7 insertions(+) diff --git a/Documentation/devicetree/bindings/spi/spi-bus.txt b/Documentation/devicetree/bindings/spi/spi-bus.txt index 1f6e86f787ef..982aa590058b 100644 --- a/Documentation/devicetree/bindings/spi/spi-bus.txt +++ b/Documentation/devicetree/bindings/spi/spi-bus.txt @@ -47,6 +47,10 @@ cs1 : native cs2 : &gpio1 1 0 cs3 : &gpio1 2 0 +WARNING: the polarity of cs-gpios may be inverted in some cases compared +to what is specified in the third parameter. In that case the spi-cs-high +property must be defined for slave nodes. + SPI slave nodes must be children of the SPI controller node. @@ -69,6 +73,8 @@ All slave nodes can contain the following optional properties: phase (CPHA) mode. - spi-cs-high - Empty property indicating device requires chip select active high. + WARNING: this is especially required even if the cs-gpios + define the gpio as GPIO_ACTIVE_HIGH - spi-3wire - Empty property indicating device requires 3-wire mode. - spi-lsb-first - Empty property indicating device requires LSB first mode. - spi-tx-bus-width - The bus width (number of data wires) that is used for MOSI. diff --git a/arch/arm/boot/dts/omap3-gta04.dtsi b/arch/arm/boot/dts/omap3-gta04.dtsi index 9a9a29fe88ec..47bab8e1040e 100644 --- a/arch/arm/boot/dts/omap3-gta04.dtsi +++ b/arch/arm/boot/dts/omap3-gta04.dtsi @@ -124,6 +124,7 @@ spi-max-frequency = <100000>; spi-cpol; spi-cpha; + spi-cs-high; backlight= <&backlight>; label = "lcd"; -- 2.19.1 ^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH 2/2] DTS: ARM: gta04: introduce legacy spi-cs-high to make display work again 2019-07-08 14:46 ` [PATCH 2/2] DTS: ARM: gta04: introduce legacy spi-cs-high to make display work again H. Nikolaus Schaller @ 2019-07-24 19:42 ` Rob Herring 2019-07-25 6:23 ` H. Nikolaus Schaller 0 siblings, 1 reply; 17+ messages in thread From: Rob Herring @ 2019-07-24 19:42 UTC (permalink / raw) To: H. Nikolaus Schaller Cc: Mark Brown, Mark Rutland, Benoît Cousson, Tony Lindgren, letux-kernel, linux-spi, devicetree, linux-kernel, linux-omap, stable On Mon, Jul 08, 2019 at 04:46:05PM +0200, H. Nikolaus Schaller wrote: > commit 6953c57ab172 "gpio: of: Handle SPI chipselect legacy bindings" > > did introduce logic to centrally handle the legacy spi-cs-high property > in combination with cs-gpios. This assumes that the polarity > of the CS has to be inverted if spi-cs-high is missing, even > and especially if non-legacy GPIO_ACTIVE_HIGH is specified. > > The DTS for the GTA04 was orginally introduced under the assumption > that there is no need for spi-cs-high if the gpio is defined with > proper polarity GPIO_ACTIVE_HIGH. Given that spi-cs-high is called legacy, that would imply that DT's should not have to use spi-cs-high. > This was not a problem until gpiolib changed the interpretation of > GPIO_ACTIVE_HIGH and missing spi-cs-high. Then we should fix gpiolib... > The effect is that the missing spi-cs-high is now interpreted as CS being > low (despite GPIO_ACTIVE_HIGH) which turns off the SPI interface when the > panel is to be programmed by the panel driver. > > Therefore, we have to add the redundant and legacy spi-cs-high property > to properly pass through the legacy handler. > > Since this is nowhere documented in the bindings, we add some words of > WARNING. > > Cc: stable@vger.kernel.org > Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com> > --- > Documentation/devicetree/bindings/spi/spi-bus.txt | 6 ++++++ > arch/arm/boot/dts/omap3-gta04.dtsi | 1 + > 2 files changed, 7 insertions(+) ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 2/2] DTS: ARM: gta04: introduce legacy spi-cs-high to make display work again 2019-07-24 19:42 ` Rob Herring @ 2019-07-25 6:23 ` H. Nikolaus Schaller 2019-07-25 22:42 ` Rob Herring 0 siblings, 1 reply; 17+ messages in thread From: H. Nikolaus Schaller @ 2019-07-25 6:23 UTC (permalink / raw) To: Rob Herring, Linus Walleij Cc: Mark Brown, Mark Rutland, Benoît Cousson, Tony Lindgren, Discussions about the Letux Kernel, linux-spi, devicetree, Linux Kernel Mailing List, Linux-OMAP, stable Hi Rob, > Am 24.07.2019 um 21:42 schrieb Rob Herring <robh@kernel.org>: > > On Mon, Jul 08, 2019 at 04:46:05PM +0200, H. Nikolaus Schaller wrote: >> commit 6953c57ab172 "gpio: of: Handle SPI chipselect legacy bindings" >> >> did introduce logic to centrally handle the legacy spi-cs-high property >> in combination with cs-gpios. This assumes that the polarity >> of the CS has to be inverted if spi-cs-high is missing, even >> and especially if non-legacy GPIO_ACTIVE_HIGH is specified. >> >> The DTS for the GTA04 was orginally introduced under the assumption >> that there is no need for spi-cs-high if the gpio is defined with >> proper polarity GPIO_ACTIVE_HIGH. > > Given that spi-cs-high is called legacy, that would imply that DT's > should not have to use spi-cs-high. Yes. > >> This was not a problem until gpiolib changed the interpretation of >> GPIO_ACTIVE_HIGH and missing spi-cs-high. > > Then we should fix gpiolib... I tried to convince Linus that this is the right way but he convinced me that a fix that handles all cases does not exist. There seem to be embedded devices with older DTB (potentially in ROM) which provide a plain 0 value for a gpios definition. And either with or without spi-cs-high. Since "0" is the same as "GPIO_ACTIVE_HIGH", the absence of spi-cs-high was and must be interpreted as active low for these devices. This leads to the inversion logic in code. AFAIR it boils down to the question if gpiolib and the bindings should still support such legacy devices with out-of tree DTB, but force in-tree DTS to add the legacy spi-cs-high property. Or if we should fix the 2 or 3 cases of in-tree legacy cases and potentially break out-of tree DTBs. IMHO it is more general to keep the out-of-tree DTBs working and "fix" what we can control (in-tree DTS). > >> The effect is that the missing spi-cs-high is now interpreted as CS being >> low (despite GPIO_ACTIVE_HIGH) which turns off the SPI interface when the >> panel is to be programmed by the panel driver. >> >> Therefore, we have to add the redundant and legacy spi-cs-high property >> to properly pass through the legacy handler. >> >> Since this is nowhere documented in the bindings, we add some words of >> WARNING. >> >> Cc: stable@vger.kernel.org >> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com> >> --- >> Documentation/devicetree/bindings/spi/spi-bus.txt | 6 ++++++ >> arch/arm/boot/dts/omap3-gta04.dtsi | 1 + >> 2 files changed, 7 insertions(+) BR, Nikolaus ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 2/2] DTS: ARM: gta04: introduce legacy spi-cs-high to make display work again 2019-07-25 6:23 ` H. Nikolaus Schaller @ 2019-07-25 22:42 ` Rob Herring 2019-08-05 10:29 ` Linus Walleij 0 siblings, 1 reply; 17+ messages in thread From: Rob Herring @ 2019-07-25 22:42 UTC (permalink / raw) To: H. Nikolaus Schaller Cc: Linus Walleij, Mark Brown, Mark Rutland, Benoît Cousson, Tony Lindgren, Discussions about the Letux Kernel, linux-spi, devicetree, Linux Kernel Mailing List, Linux-OMAP, stable On Thu, Jul 25, 2019 at 12:23 AM H. Nikolaus Schaller <hns@goldelico.com> wrote: > > Hi Rob, > > > Am 24.07.2019 um 21:42 schrieb Rob Herring <robh@kernel.org>: > > > > On Mon, Jul 08, 2019 at 04:46:05PM +0200, H. Nikolaus Schaller wrote: > >> commit 6953c57ab172 "gpio: of: Handle SPI chipselect legacy bindings" > >> > >> did introduce logic to centrally handle the legacy spi-cs-high property > >> in combination with cs-gpios. This assumes that the polarity > >> of the CS has to be inverted if spi-cs-high is missing, even > >> and especially if non-legacy GPIO_ACTIVE_HIGH is specified. > >> > >> The DTS for the GTA04 was orginally introduced under the assumption > >> that there is no need for spi-cs-high if the gpio is defined with > >> proper polarity GPIO_ACTIVE_HIGH. > > > > Given that spi-cs-high is called legacy, that would imply that DT's > > should not have to use spi-cs-high. > > Yes. > > > > >> This was not a problem until gpiolib changed the interpretation of > >> GPIO_ACTIVE_HIGH and missing spi-cs-high. > > > > Then we should fix gpiolib... > > I tried to convince Linus that this is the right way but he convinced > me that a fix that handles all cases does not exist. > > There seem to be embedded devices with older DTB (potentially in ROM) > which provide a plain 0 value for a gpios definition. And either with > or without spi-cs-high. > > Since "0" is the same as "GPIO_ACTIVE_HIGH", the absence of > spi-cs-high was and must be interpreted as active low for these > devices. This leads to the inversion logic in code. > > AFAIR it boils down to the question if gpiolib and the bindings > should still support such legacy devices with out-of tree DTB, > but force in-tree DTS to add the legacy spi-cs-high property. > > Or if we should fix the 2 or 3 cases of in-tree legacy cases > and potentially break out-of tree DTBs. If it is small number of platforms, then the kernel could handle those cases explicitly as needed. > IMHO it is more general to keep the out-of-tree DTBs working > and "fix" what we can control (in-tree DTS). If we do this, then we need to not call spi-cs-high legacy because we're stuck with it forever. Rob ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 2/2] DTS: ARM: gta04: introduce legacy spi-cs-high to make display work again 2019-07-25 22:42 ` Rob Herring @ 2019-08-05 10:29 ` Linus Walleij 2019-08-31 6:48 ` [Letux-kernel] " Andreas Kemnade 0 siblings, 1 reply; 17+ messages in thread From: Linus Walleij @ 2019-08-05 10:29 UTC (permalink / raw) To: Rob Herring Cc: H. Nikolaus Schaller, Mark Brown, Mark Rutland, Benoît Cousson, Tony Lindgren, Discussions about the Letux Kernel, linux-spi, devicetree, Linux Kernel Mailing List, Linux-OMAP, stable On Fri, Jul 26, 2019 at 12:43 AM Rob Herring <robh@kernel.org> wrote: > On Thu, Jul 25, 2019 at 12:23 AM H. Nikolaus Schaller <hns@goldelico.com> wrote: > > I tried to convince Linus that this is the right way but he convinced > > me that a fix that handles all cases does not exist. > > > > There seem to be embedded devices with older DTB (potentially in ROM) > > which provide a plain 0 value for a gpios definition. And either with > > or without spi-cs-high. > > > > Since "0" is the same as "GPIO_ACTIVE_HIGH", the absence of > > spi-cs-high was and must be interpreted as active low for these > > devices. This leads to the inversion logic in code. > > > > AFAIR it boils down to the question if gpiolib and the bindings > > should still support such legacy devices with out-of tree DTB, > > but force in-tree DTS to add the legacy spi-cs-high property. > > > > Or if we should fix the 2 or 3 cases of in-tree legacy cases > > and potentially break out-of tree DTBs. > > If it is small number of platforms, then the kernel could handle those > cases explicitly as needed. > > > IMHO it is more general to keep the out-of-tree DTBs working > > and "fix" what we can control (in-tree DTS). > > If we do this, then we need to not call spi-cs-high legacy because > we're stuck with it forever. I agree. The background on it is here: https://lkml.org/lkml/2019/4/2/4 Not using the negatively defined (i.e. if it is no there, the line is by default active low) spi-cs-high would break PowerPC, who were AFAICT using this to ship devices. Yours, Linus Walleij ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Letux-kernel] [PATCH 2/2] DTS: ARM: gta04: introduce legacy spi-cs-high to make display work again 2019-08-05 10:29 ` Linus Walleij @ 2019-08-31 6:48 ` Andreas Kemnade 2019-09-16 10:59 ` H. Nikolaus Schaller 0 siblings, 1 reply; 17+ messages in thread From: Andreas Kemnade @ 2019-08-31 6:48 UTC (permalink / raw) To: Linus Walleij Cc: Discussions about the Letux Kernel, Rob Herring, Mark Rutland, devicetree, Linux-OMAP, Tony Lindgren, Linux Kernel Mailing List, stable, linux-spi, Mark Brown, Benoît Cousson Hi, On Mon, 5 Aug 2019 12:29:19 +0200 Linus Walleij <linus.walleij@linaro.org> wrote: > On Fri, Jul 26, 2019 at 12:43 AM Rob Herring <robh@kernel.org> wrote: > > On Thu, Jul 25, 2019 at 12:23 AM H. Nikolaus Schaller <hns@goldelico.com> wrote: > > > > I tried to convince Linus that this is the right way but he convinced > > > me that a fix that handles all cases does not exist. > > > > > > There seem to be embedded devices with older DTB (potentially in ROM) > > > which provide a plain 0 value for a gpios definition. And either with > > > or without spi-cs-high. > > > > > > Since "0" is the same as "GPIO_ACTIVE_HIGH", the absence of > > > spi-cs-high was and must be interpreted as active low for these > > > devices. This leads to the inversion logic in code. > > > > > > AFAIR it boils down to the question if gpiolib and the bindings > > > should still support such legacy devices with out-of tree DTB, > > > but force in-tree DTS to add the legacy spi-cs-high property. > > > > > > Or if we should fix the 2 or 3 cases of in-tree legacy cases > > > and potentially break out-of tree DTBs. > > > > If it is small number of platforms, then the kernel could handle those > > cases explicitly as needed. > > > > > IMHO it is more general to keep the out-of-tree DTBs working > > > and "fix" what we can control (in-tree DTS). > > > > If we do this, then we need to not call spi-cs-high legacy because > > we're stuck with it forever. > > I agree. The background on it is here: > https://lkml.org/lkml/2019/4/2/4 > > Not using the negatively defined (i.e. if it is no there, the line is > by default active low) spi-cs-high would break > PowerPC, who were AFAICT using this to ship devices. > is this thing now just waiting for someone to do a s/legacy//? Regards, Andreas ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Letux-kernel] [PATCH 2/2] DTS: ARM: gta04: introduce legacy spi-cs-high to make display work again 2019-08-31 6:48 ` [Letux-kernel] " Andreas Kemnade @ 2019-09-16 10:59 ` H. Nikolaus Schaller 2019-09-16 22:52 ` Linus Walleij 0 siblings, 1 reply; 17+ messages in thread From: H. Nikolaus Schaller @ 2019-09-16 10:59 UTC (permalink / raw) To: Linus Walleij Cc: Discussions about the Letux Kernel, Rob Herring, Mark Rutland, devicetree, Linux-OMAP, Tony Lindgren, Linux Kernel Mailing List, stable, linux-spi, Mark Brown, Benoît Cousson ping. Device omap3-gta04 is neither working with v5.3 nor linux-next quite a while and we need a solution. > Am 31.08.2019 um 08:48 schrieb Andreas Kemnade <andreas@kemnade.info>: > > Hi, > > On Mon, 5 Aug 2019 12:29:19 +0200 > Linus Walleij <linus.walleij@linaro.org> wrote: > >> On Fri, Jul 26, 2019 at 12:43 AM Rob Herring <robh@kernel.org> wrote: >>> On Thu, Jul 25, 2019 at 12:23 AM H. Nikolaus Schaller <hns@goldelico.com> wrote: >> >>>> I tried to convince Linus that this is the right way but he convinced >>>> me that a fix that handles all cases does not exist. >>>> >>>> There seem to be embedded devices with older DTB (potentially in ROM) >>>> which provide a plain 0 value for a gpios definition. And either with >>>> or without spi-cs-high. >>>> >>>> Since "0" is the same as "GPIO_ACTIVE_HIGH", the absence of >>>> spi-cs-high was and must be interpreted as active low for these >>>> devices. This leads to the inversion logic in code. >>>> >>>> AFAIR it boils down to the question if gpiolib and the bindings >>>> should still support such legacy devices with out-of tree DTB, >>>> but force in-tree DTS to add the legacy spi-cs-high property. >>>> >>>> Or if we should fix the 2 or 3 cases of in-tree legacy cases >>>> and potentially break out-of tree DTBs. >>> >>> If it is small number of platforms, then the kernel could handle those >>> cases explicitly as needed. >>> >>>> IMHO it is more general to keep the out-of-tree DTBs working >>>> and "fix" what we can control (in-tree DTS). >>> >>> If we do this, then we need to not call spi-cs-high legacy because >>> we're stuck with it forever. >> >> I agree. The background on it is here: >> https://lkml.org/lkml/2019/4/2/4 >> >> Not using the negatively defined (i.e. if it is no there, the line is >> by default active low) spi-cs-high would break >> PowerPC, who were AFAICT using this to ship devices. >> > is this thing now just waiting for someone to do a s/legacy//? > > Regards, > Andreas ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Letux-kernel] [PATCH 2/2] DTS: ARM: gta04: introduce legacy spi-cs-high to make display work again 2019-09-16 10:59 ` H. Nikolaus Schaller @ 2019-09-16 22:52 ` Linus Walleij 2019-09-17 14:26 ` H. Nikolaus Schaller 0 siblings, 1 reply; 17+ messages in thread From: Linus Walleij @ 2019-09-16 22:52 UTC (permalink / raw) To: H. Nikolaus Schaller Cc: Discussions about the Letux Kernel, Rob Herring, Mark Rutland, devicetree, Linux-OMAP, Tony Lindgren, Linux Kernel Mailing List, stable, linux-spi, Mark Brown, Benoît Cousson On Mon, Sep 16, 2019 at 12:59 PM H. Nikolaus Schaller <hns@goldelico.com> wrote: > ping. > > Device omap3-gta04 is neither working with v5.3 nor linux-next quite a while and we need a solution. Can't we just apply the last part of the patch in this thread: diff --git a/arch/arm/boot/dts/omap3-gta04.dtsi b/arch/arm/boot/dts/omap3-gta04.dtsi index 9a9a29fe88ec..47bab8e1040e 100644 --- a/arch/arm/boot/dts/omap3-gta04.dtsi +++ b/arch/arm/boot/dts/omap3-gta04.dtsi @@ -124,6 +124,7 @@ spi-max-frequency = <100000>; spi-cpol; spi-cpha; + spi-cs-high; backlight= <&backlight>; label = "lcd"; Surely this fixes the problem? Yours, Linus Walleij ^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [Letux-kernel] [PATCH 2/2] DTS: ARM: gta04: introduce legacy spi-cs-high to make display work again 2019-09-16 22:52 ` Linus Walleij @ 2019-09-17 14:26 ` H. Nikolaus Schaller 2019-09-20 8:55 ` Linus Walleij 0 siblings, 1 reply; 17+ messages in thread From: H. Nikolaus Schaller @ 2019-09-17 14:26 UTC (permalink / raw) To: Linus Walleij Cc: Discussions about the Letux Kernel, Rob Herring, Mark Rutland, devicetree, Linux-OMAP, Tony Lindgren, Linux Kernel Mailing List, stable, linux-spi, Mark Brown, Benoît Cousson Hi Lunus, > Am 17.09.2019 um 00:52 schrieb Linus Walleij <linus.walleij@linaro.org>: > > On Mon, Sep 16, 2019 at 12:59 PM H. Nikolaus Schaller <hns@goldelico.com> wrote: > >> ping. >> >> Device omap3-gta04 is neither working with v5.3 nor linux-next quite a while and we need a solution. > > Can't we just apply the last part of the patch in this thread: > > diff --git a/arch/arm/boot/dts/omap3-gta04.dtsi > b/arch/arm/boot/dts/omap3-gta04.dtsi > index 9a9a29fe88ec..47bab8e1040e 100644 > --- a/arch/arm/boot/dts/omap3-gta04.dtsi > +++ b/arch/arm/boot/dts/omap3-gta04.dtsi > @@ -124,6 +124,7 @@ > spi-max-frequency = <100000>; > spi-cpol; > spi-cpha; > + spi-cs-high; > > backlight= <&backlight>; > label = "lcd"; > > > Surely this fixes the problem? yes, it is a workaround, but appears to violate some policies. E.g. the spi-cs-high; is undocumented but DT bindings maintainer seems to be against documenting it as I had proposed in my other patch. Rather he seems to have proposed a white-list in the driver code. So that the legacy mode is only becoming active for those systems which really need the legacy mode instead of everyone. Then, we do not need this patch for GTA04. So its up to you to decide which way to go. We are happy with any one that makes mainline work again asap... BR and thanks, Nikolaus ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Letux-kernel] [PATCH 2/2] DTS: ARM: gta04: introduce legacy spi-cs-high to make display work again 2019-09-17 14:26 ` H. Nikolaus Schaller @ 2019-09-20 8:55 ` Linus Walleij 2019-09-20 9:19 ` H. Nikolaus Schaller 0 siblings, 1 reply; 17+ messages in thread From: Linus Walleij @ 2019-09-20 8:55 UTC (permalink / raw) To: H. Nikolaus Schaller Cc: Discussions about the Letux Kernel, Rob Herring, Mark Rutland, devicetree, Linux-OMAP, Tony Lindgren, Linux Kernel Mailing List, stable, linux-spi, Mark Brown, Benoît Cousson On Tue, Sep 17, 2019 at 4:26 PM H. Nikolaus Schaller <hns@goldelico.com> wrote: > > Am 17.09.2019 um 00:52 schrieb Linus Walleij <linus.walleij@linaro.org>: > > On Mon, Sep 16, 2019 at 12:59 PM H. Nikolaus Schaller <hns@goldelico.com> wrote: > > > >> ping. > >> > >> Device omap3-gta04 is neither working with v5.3 nor linux-next quite a while and we need a solution. > > > > Can't we just apply the last part of the patch in this thread: > > > > diff --git a/arch/arm/boot/dts/omap3-gta04.dtsi > > b/arch/arm/boot/dts/omap3-gta04.dtsi > > index 9a9a29fe88ec..47bab8e1040e 100644 > > --- a/arch/arm/boot/dts/omap3-gta04.dtsi > > +++ b/arch/arm/boot/dts/omap3-gta04.dtsi > > @@ -124,6 +124,7 @@ > > spi-max-frequency = <100000>; > > spi-cpol; > > spi-cpha; > > + spi-cs-high; > > > > backlight= <&backlight>; > > label = "lcd"; > > > > > > Surely this fixes the problem? > > yes, it is a workaround, but appears to violate some policies. > E.g. the spi-cs-high; is undocumented but DT bindings maintainer > seems to be against documenting it as I had proposed in my > other patch. It is documented as a boolean in Documentation/devicetree/bindings/spi/spi-controller.yaml with the following description: spi-cs-high: $ref: /schemas/types.yaml#/definitions/flag description: The device requires the chip select active high. So I don't think it is about it being undocumented. > Rather he seems to have proposed a white-list in the driver code. > So that the legacy mode is only becoming active for those systems > which really need the legacy mode instead of everyone. Yeah that seems like a plausible way forward if we want to move away from the legacy way of specifying polarity. > Then, we do not need this patch for GTA04. We don't need to implement the perfect solution up front. We can aim for that in the long run. I usually go by the IETF motto "rough consensus and running code". > So its up to you to decide which way to go. We are happy with > any one that makes mainline work again asap... I suggest to go both way: apply this oneliner and tag for stable so that GTA04 works again. Then for the next kernel think about a possible more abitious whitelist solution and after adding that remove *all* "spi-cs-high" flags from all device trees in the kernel after fixing them all up. Yours, Linus Walleij ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Letux-kernel] [PATCH 2/2] DTS: ARM: gta04: introduce legacy spi-cs-high to make display work again 2019-09-20 8:55 ` Linus Walleij @ 2019-09-20 9:19 ` H. Nikolaus Schaller 2019-09-20 14:20 ` Tony Lindgren 0 siblings, 1 reply; 17+ messages in thread From: H. Nikolaus Schaller @ 2019-09-20 9:19 UTC (permalink / raw) To: Linus Walleij Cc: Discussions about the Letux Kernel, Rob Herring, Mark Rutland, devicetree, Linux-OMAP, Tony Lindgren, Linux Kernel Mailing List, stable, linux-spi, Mark Brown, Benoît Cousson > Am 20.09.2019 um 10:55 schrieb Linus Walleij <linus.walleij@linaro.org>: > > On Tue, Sep 17, 2019 at 4:26 PM H. Nikolaus Schaller <hns@goldelico.com> wrote: >>> Am 17.09.2019 um 00:52 schrieb Linus Walleij <linus.walleij@linaro.org>: >>> On Mon, Sep 16, 2019 at 12:59 PM H. Nikolaus Schaller <hns@goldelico.com> wrote: >>> >>>> ping. >>>> >>>> Device omap3-gta04 is neither working with v5.3 nor linux-next quite a while and we need a solution. >>> >>> Can't we just apply the last part of the patch in this thread: >>> >>> diff --git a/arch/arm/boot/dts/omap3-gta04.dtsi >>> b/arch/arm/boot/dts/omap3-gta04.dtsi >>> index 9a9a29fe88ec..47bab8e1040e 100644 >>> --- a/arch/arm/boot/dts/omap3-gta04.dtsi >>> +++ b/arch/arm/boot/dts/omap3-gta04.dtsi >>> @@ -124,6 +124,7 @@ >>> spi-max-frequency = <100000>; >>> spi-cpol; >>> spi-cpha; >>> + spi-cs-high; >>> >>> backlight= <&backlight>; >>> label = "lcd"; >>> >>> >>> Surely this fixes the problem? >> >> yes, it is a workaround, but appears to violate some policies. >> E.g. the spi-cs-high; is undocumented but DT bindings maintainer >> seems to be against documenting it as I had proposed in my >> other patch. > > It is documented as a boolean in > Documentation/devicetree/bindings/spi/spi-controller.yaml > with the following description: > > spi-cs-high: > $ref: /schemas/types.yaml#/definitions/flag > description: > The device requires the chip select active high. > > So I don't think it is about it being undocumented. Yes, the basic property is documented. But incomplete. The strange inversion side-effect on the third gpio parameter is undocumented and not understandable from this description alone. > >> Rather he seems to have proposed a white-list in the driver code. >> So that the legacy mode is only becoming active for those systems >> which really need the legacy mode instead of everyone. > > Yeah that seems like a plausible way forward if we want to > move away from the legacy way of specifying polarity. > >> Then, we do not need this patch for GTA04. > > We don't need to implement the perfect solution up front. > We can aim for that in the long run. I usually go by the IETF > motto "rough consensus and running code". > >> So its up to you to decide which way to go. We are happy with >> any one that makes mainline work again asap... > > I suggest to go both way: > apply this oneliner and tag for stable so that GTA04 works > again. > > Then for the next kernel think about a possible more abitious > whitelist solution and after adding that remove *all* "spi-cs-high" > flags from all device trees in the kernel after fixing them > all up. Ok, that looks like a viable path. BR and thanks, Nikolaus ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Letux-kernel] [PATCH 2/2] DTS: ARM: gta04: introduce legacy spi-cs-high to make display work again 2019-09-20 9:19 ` H. Nikolaus Schaller @ 2019-09-20 14:20 ` Tony Lindgren 2019-09-20 14:54 ` H. Nikolaus Schaller 0 siblings, 1 reply; 17+ messages in thread From: Tony Lindgren @ 2019-09-20 14:20 UTC (permalink / raw) To: H. Nikolaus Schaller Cc: Linus Walleij, Discussions about the Letux Kernel, Rob Herring, Mark Rutland, devicetree, Linux-OMAP, Linux Kernel Mailing List, stable, linux-spi, Mark Brown, Benoît Cousson * H. Nikolaus Schaller <hns@goldelico.com> [190920 09:19]: > > Am 20.09.2019 um 10:55 schrieb Linus Walleij <linus.walleij@linaro.org>: > > I suggest to go both way: > > apply this oneliner and tag for stable so that GTA04 works > > again. > > > > Then for the next kernel think about a possible more abitious > > whitelist solution and after adding that remove *all* "spi-cs-high" > > flags from all device trees in the kernel after fixing them > > all up. > > Ok, that looks like a viable path. Please repost the oneline so people can ack easily. At least I've already lost track of this thread. Regards, Tony ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Letux-kernel] [PATCH 2/2] DTS: ARM: gta04: introduce legacy spi-cs-high to make display work again 2019-09-20 14:20 ` Tony Lindgren @ 2019-09-20 14:54 ` H. Nikolaus Schaller 2019-09-20 15:29 ` Andreas Kemnade 0 siblings, 1 reply; 17+ messages in thread From: H. Nikolaus Schaller @ 2019-09-20 14:54 UTC (permalink / raw) To: Tony Lindgren Cc: Linus Walleij, Discussions about the Letux Kernel, Rob Herring, Mark Rutland, devicetree, Linux-OMAP, Linux Kernel Mailing List, stable, linux-spi, Mark Brown, Benoît Cousson > Am 20.09.2019 um 16:20 schrieb Tony Lindgren <tony@atomide.com>: > > * H. Nikolaus Schaller <hns@goldelico.com> [190920 09:19]: >>> Am 20.09.2019 um 10:55 schrieb Linus Walleij <linus.walleij@linaro.org>: >>> I suggest to go both way: >>> apply this oneliner and tag for stable so that GTA04 works >>> again. >>> >>> Then for the next kernel think about a possible more abitious >>> whitelist solution and after adding that remove *all* "spi-cs-high" >>> flags from all device trees in the kernel after fixing them >>> all up. >> >> Ok, that looks like a viable path. > > Please repost the oneline so people can ack easily. At least > I've already lost track of this thread. It is all here: https://patchwork.kernel.org/patch/11035253/ Best regards, Nikolaus ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Letux-kernel] [PATCH 2/2] DTS: ARM: gta04: introduce legacy spi-cs-high to make display work again 2019-09-20 14:54 ` H. Nikolaus Schaller @ 2019-09-20 15:29 ` Andreas Kemnade 2019-09-20 15:50 ` H. Nikolaus Schaller 0 siblings, 1 reply; 17+ messages in thread From: Andreas Kemnade @ 2019-09-20 15:29 UTC (permalink / raw) To: H. Nikolaus Schaller Cc: Discussions about the Letux Kernel, Tony Lindgren, Mark Rutland, Rob Herring, Linux-OMAP, devicetree, Linus Walleij, Linux Kernel Mailing List, stable, linux-spi, Mark Brown, Benoît Cousson On Fri, 20 Sep 2019 16:54:18 +0200 "H. Nikolaus Schaller" <hns@goldelico.com> wrote: > > Am 20.09.2019 um 16:20 schrieb Tony Lindgren <tony@atomide.com>: > > > > * H. Nikolaus Schaller <hns@goldelico.com> [190920 09:19]: > >>> Am 20.09.2019 um 10:55 schrieb Linus Walleij <linus.walleij@linaro.org>: > >>> I suggest to go both way: > >>> apply this oneliner and tag for stable so that GTA04 works > >>> again. > >>> > >>> Then for the next kernel think about a possible more abitious > >>> whitelist solution and after adding that remove *all* "spi-cs-high" > >>> flags from all device trees in the kernel after fixing them > >>> all up. > >> > >> Ok, that looks like a viable path. > > > > Please repost the oneline so people can ack easily. At least > > I've already lost track of this thread. > > It is all here: > > https://patchwork.kernel.org/patch/11035253/ > It is the full one (incl. documentation), not the oneline and does not apply. Now lets not discuss whether it is well documented or not. First get it fixed. Regards, Andreas ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Letux-kernel] [PATCH 2/2] DTS: ARM: gta04: introduce legacy spi-cs-high to make display work again 2019-09-20 15:29 ` Andreas Kemnade @ 2019-09-20 15:50 ` H. Nikolaus Schaller 2019-09-20 15:53 ` Tony Lindgren 2019-09-20 15:55 ` H. Nikolaus Schaller 0 siblings, 2 replies; 17+ messages in thread From: H. Nikolaus Schaller @ 2019-09-20 15:50 UTC (permalink / raw) To: Andreas Kemnade Cc: Discussions about the Letux Kernel, Tony Lindgren, Mark Rutland, Rob Herring, Linux-OMAP, devicetree, Linus Walleij, Linux Kernel Mailing List, stable, linux-spi, Mark Brown, Benoît Cousson > Am 20.09.2019 um 17:29 schrieb Andreas Kemnade <andreas@kemnade.info>: > > On Fri, 20 Sep 2019 16:54:18 +0200 > "H. Nikolaus Schaller" <hns@goldelico.com> wrote: > >>> Am 20.09.2019 um 16:20 schrieb Tony Lindgren <tony@atomide.com>: >>> >>> * H. Nikolaus Schaller <hns@goldelico.com> [190920 09:19]: >>>>> Am 20.09.2019 um 10:55 schrieb Linus Walleij <linus.walleij@linaro.org>: >>>>> I suggest to go both way: >>>>> apply this oneliner and tag for stable so that GTA04 works >>>>> again. >>>>> >>>>> Then for the next kernel think about a possible more abitious >>>>> whitelist solution and after adding that remove *all* "spi-cs-high" >>>>> flags from all device trees in the kernel after fixing them >>>>> all up. >>>> >>>> Ok, that looks like a viable path. >>> >>> Please repost the oneline so people can ack easily. At least >>> I've already lost track of this thread. >> >> It is all here: >> >> https://patchwork.kernel.org/patch/11035253/ >> > It is the full one (incl. documentation), not the oneline and does not > apply. Looks as if it was sitting too long in the queue and linux-next has changed the basis in the meantime, while v5.3 has not yet. Documentation/devicetree/bindings/spi/spi-bus.txt -> spi-controller.yaml So it should still apply for v5.3.1 and earlier and we need both versions. One for stable and one for linux-next. I don't know how to handle such cases. BR, Nikolaus ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Letux-kernel] [PATCH 2/2] DTS: ARM: gta04: introduce legacy spi-cs-high to make display work again 2019-09-20 15:50 ` H. Nikolaus Schaller @ 2019-09-20 15:53 ` Tony Lindgren 2019-09-20 15:55 ` H. Nikolaus Schaller 1 sibling, 0 replies; 17+ messages in thread From: Tony Lindgren @ 2019-09-20 15:53 UTC (permalink / raw) To: H. Nikolaus Schaller Cc: Andreas Kemnade, Discussions about the Letux Kernel, Mark Rutland, Rob Herring, Linux-OMAP, devicetree, Linus Walleij, Linux Kernel Mailing List, stable, linux-spi, Mark Brown, Benoît Cousson * H. Nikolaus Schaller <hns@goldelico.com> [190920 15:50]: > > > Am 20.09.2019 um 17:29 schrieb Andreas Kemnade <andreas@kemnade.info>: > > > > On Fri, 20 Sep 2019 16:54:18 +0200 > > "H. Nikolaus Schaller" <hns@goldelico.com> wrote: > > > >>> Am 20.09.2019 um 16:20 schrieb Tony Lindgren <tony@atomide.com>: > >>> > >>> * H. Nikolaus Schaller <hns@goldelico.com> [190920 09:19]: > >>>>> Am 20.09.2019 um 10:55 schrieb Linus Walleij <linus.walleij@linaro.org>: > >>>>> I suggest to go both way: > >>>>> apply this oneliner and tag for stable so that GTA04 works > >>>>> again. > >>>>> > >>>>> Then for the next kernel think about a possible more abitious > >>>>> whitelist solution and after adding that remove *all* "spi-cs-high" > >>>>> flags from all device trees in the kernel after fixing them > >>>>> all up. > >>>> > >>>> Ok, that looks like a viable path. > >>> > >>> Please repost the oneline so people can ack easily. At least > >>> I've already lost track of this thread. > >> > >> It is all here: > >> > >> https://patchwork.kernel.org/patch/11035253/ > >> > > It is the full one (incl. documentation), not the oneline and does not > > apply. > > Looks as if it was sitting too long in the queue and linux-next has changed > the basis in the meantime, while v5.3 has not yet. > > Documentation/devicetree/bindings/spi/spi-bus.txt -> spi-controller.yaml > > So it should still apply for v5.3.1 and earlier and we need both versions. > One for stable and one for linux-next. I don't know how to handle such cases. Please just repost a minimal dts one line fix. Then a separate patch for the documentation changes. Regards, Tony ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Letux-kernel] [PATCH 2/2] DTS: ARM: gta04: introduce legacy spi-cs-high to make display work again 2019-09-20 15:50 ` H. Nikolaus Schaller 2019-09-20 15:53 ` Tony Lindgren @ 2019-09-20 15:55 ` H. Nikolaus Schaller 1 sibling, 0 replies; 17+ messages in thread From: H. Nikolaus Schaller @ 2019-09-20 15:55 UTC (permalink / raw) To: Discussions about the Letux Kernel Cc: Andreas Kemnade, Mark Rutland, devicetree, Rob Herring, Tony Lindgren, Linus Walleij, Linux Kernel Mailing List, stable, linux-spi, Mark Brown, Benoît Cousson, Linux-OMAP > Am 20.09.2019 um 17:50 schrieb H. Nikolaus Schaller <hns@goldelico.com>: > > >> Am 20.09.2019 um 17:29 schrieb Andreas Kemnade <andreas@kemnade.info>: >> >> On Fri, 20 Sep 2019 16:54:18 +0200 >> "H. Nikolaus Schaller" <hns@goldelico.com> wrote: >> >>>> Am 20.09.2019 um 16:20 schrieb Tony Lindgren <tony@atomide.com>: >>>> >>>> * H. Nikolaus Schaller <hns@goldelico.com> [190920 09:19]: >>>>>> Am 20.09.2019 um 10:55 schrieb Linus Walleij <linus.walleij@linaro.org>: >>>>>> I suggest to go both way: >>>>>> apply this oneliner and tag for stable so that GTA04 works >>>>>> again. >>>>>> >>>>>> Then for the next kernel think about a possible more abitious >>>>>> whitelist solution and after adding that remove *all* "spi-cs-high" >>>>>> flags from all device trees in the kernel after fixing them >>>>>> all up. >>>>> >>>>> Ok, that looks like a viable path. >>>> >>>> Please repost the oneline so people can ack easily. At least >>>> I've already lost track of this thread. >>> >>> It is all here: >>> >>> https://patchwork.kernel.org/patch/11035253/ >>> >> It is the full one (incl. documentation), not the oneline and does not >> apply. > > Looks as if it was sitting too long in the queue and linux-next has changed > the basis in the meantime, while v5.3 has not yet. > > Documentation/devicetree/bindings/spi/spi-bus.txt -> spi-controller.yaml > > So it should still apply for v5.3.1 and earlier and we need both versions. > One for stable and one for linux-next. I don't know how to handle such cases. Ok, here is a correction of this statement: It applies fine to v5.2 and v5.3 already uses the spi-controller.yaml ^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2019-09-20 15:55 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <cover.1562597164.git.hns@goldelico.com>
2019-07-08 14:46 ` [PATCH 2/2] DTS: ARM: gta04: introduce legacy spi-cs-high to make display work again H. Nikolaus Schaller
2019-07-24 19:42 ` Rob Herring
2019-07-25 6:23 ` H. Nikolaus Schaller
2019-07-25 22:42 ` Rob Herring
2019-08-05 10:29 ` Linus Walleij
2019-08-31 6:48 ` [Letux-kernel] " Andreas Kemnade
2019-09-16 10:59 ` H. Nikolaus Schaller
2019-09-16 22:52 ` Linus Walleij
2019-09-17 14:26 ` H. Nikolaus Schaller
2019-09-20 8:55 ` Linus Walleij
2019-09-20 9:19 ` H. Nikolaus Schaller
2019-09-20 14:20 ` Tony Lindgren
2019-09-20 14:54 ` H. Nikolaus Schaller
2019-09-20 15:29 ` Andreas Kemnade
2019-09-20 15:50 ` H. Nikolaus Schaller
2019-09-20 15:53 ` Tony Lindgren
2019-09-20 15:55 ` H. Nikolaus Schaller
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).