lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9dcdea44-974e-416f-9d59-204d519774dd@marcan.st>
Date: Thu, 28 Nov 2024 00:29:11 +0900
From: Hector Martin <marcan@...can.st>
To: Sasha Finkelstein <fnkl.kernel@...il.com>,
 Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc: Sven Peter <sven@...npeter.dev>, Alyssa Rosenzweig
 <alyssa@...enzweig.io>, Rob Herring <robh@...nel.org>,
 Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley
 <conor+dt@...nel.org>, Henrik Rydberg <rydberg@...math.org>,
 asahi@...ts.linux.dev, linux-arm-kernel@...ts.infradead.org,
 linux-input@...r.kernel.org, devicetree@...r.kernel.org,
 linux-kernel@...r.kernel.org, Janne Grunau <j@...nau.net>,
 Mark Brown <broonie@...nel.org>
Subject: Re: [PATCH 0/4] Driver for Apple Z2 touchscreens.



On 2024/11/27 17:29, Sasha Finkelstein wrote:
> On Wed, 27 Nov 2024 at 02:51, Dmitry Torokhov <dmitry.torokhov@...il.com> wrote:
>> I believe this needs to be done at the SPI controller level. See
>> "cs-gpiods" property in
>> Documentation/devicetree/bindings/spi/spi-controller.yaml that, as far
>> as I understand, allows overriding controller's native CS handling with
>> a GPIO when needed.
> 
> I have already tried doing that (adding the relevant gpio as cs-gpios
> on the controller)
> and for some reason none of my attempts worked. Since there is no hardware
> documentation, I can't really tell why, could be possible that we need both
> native CS and that gpio, could be memory barrier issues somewhere in
> the driver core,
> but the method above is the only one i could get to work.

Are you sure this isn't just a pinmux problem, i.e. the bootloader
initializes the pinmux for hardware CS only on one device and not the other?

See spi3_pins in the DTS in our downstream tree (and the reference from
the SPI controller). If the rest of the SPI pins are already working
properly you can just try with the CS pin (same index as on the gpio
spec). Ideally we'd list the 4 pins, but someone needs to reverse
engineer the mapping with m1n1 gpiola since we don't know what it is.

If it really doesn't work with native CS and proper pinmux then cs-gpios
on the controller should work. If it doesn't something weird is going on
elsewhere. There's only one CS line, needing both makes no sense.

- Hector


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ