lkml.org 
[lkml]   [2020]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] spi: dt-bindings: clarify CS behavior for spi-cs-high and gpio descriptors
On Wed, Dec 9, 2020 at 3:08 PM H. Nikolaus Schaller <hns@goldelico.com> wrote:
>
> But I have tested with
>
> > spi->mode |= SPI_MODE_3;
>
> which should keep the mode intact. Right? That did not work either.
>

- make sure ("spi: fix client driver breakages when using GPIO descriptors")
is in your tree
- your panel's CS is active-low, so 'spi-cs-high' should be removed from its
devicetree entry. In accordance with the rules as explained in commit
message of 6953c57ab172. Also in accordance with the table you posted
in this patch.

When these two changes in place, your panel should work. I have tested this
by mirroring your setup on my board:

spi5-gpio {
compatible = "spi-gpio";
#address-cells = <0x1>;
#size-cells = <0x0>;
pinctrl-names = "default";
pinctrl-0 = <&...>;

sck-gpios = <&gpio... GPIO_ACTIVE_HIGH>;
miso-gpios = <&gpio... GPIO_ACTIVE_HIGH>;
mosi-gpios = <&gpio... GPIO_ACTIVE_HIGH>;
cs-gpios = <&gpio... GPIO_ACTIVE_HIGH>;
num-chipselects = <1>;

ethernet-switch@0 { /* active low cs */
compatible = "micrel,ksz8795";
spi-max-frequency = <1000000>;
reg = <0>;
};
};

If this does not work for you, then what are we missing?

\
 
 \ /
  Last update: 2020-12-09 22:30    [W:0.055 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site