Sorry, but don't understand your feedback on 1). To my current understanding we want to achieve this https://github.com/raspberrypi/linux/bl ... r.yaml#L58That's wrong for two reasons:
1. The linked document could be clearer, but it explains that the GPIO descriptors can be declared to be active high (https://github.com/raspberrypi/linux/bl ... r.yaml#L45). It then goes on to explain the special rules for when the spi-cs-high property is used. They're special because the normal case is to declare the GPIOs as being active high.
2. As I stated above, spi-cs-high is a property of the CS line, not the SPI controller - here's just one example - https://github.com/raspberrypi/linux/bl ... sb.dts#L54 - there are many others. As I also said, if spi-cs-high and cs-gpios are in the same node then you've got it wrong.
-> gpio8 is to be defined as ACTIVE_HIGH (0)
Based on your feedback in 2) spi-cs-high property has to go under the related device note (@0 in below example as I've used CS0 as active-high)- means same location were we would add other spi related properties i.e. write-only/spi-cpha or spi-cpol, right?
So below should do that if my current understanding is correct.
Code:
fragment@10 {target = <&spi0>;frag11: __overlay__ {/* needed to avoid dtc warning */#address-cells = <1>;#size-cells = <0>;cs-gpios = <&gpio 8 0>;status = "okay";spidev0_0: spidev@0 {compatible = "spidev";reg = <0>; /* CE0 */#address-cells = <1>;#size-cells = <0>;spi-max-frequency = <125000000>;status = "okay";};};};fragment@11 {target = <&spi0>;__overlay__ {/* needed to avoid dtc warning */#address-cells = <1>;#size-cells = <0>;status = "okay";device0: device@0 {compatible = "some blah here";reg = <0>;pinctrl-names = "default";pinctrl-0 = <&control_pins>;spi-max-frequency = <48000000>;spi-cs-high;...
Statistics: Posted by aBUGSworstnightmare — Thu Oct 31, 2024 7:29 am