Hi Linus, > On 10 Jan 2019, at 15:25, Linus Walleij <linus.walleij@xxxxxxxxxx> wrote: > On Thu, Jan 10, 2019 at 1:46 PM Janek Kotas <jank@xxxxxxxxxxx> wrote: >>> On 10 Jan 2019, at 13:15, Linus Walleij <linus.walleij@xxxxxxxxxx> wrote: >>> >>> Janek, it'd be great if you could test this patch and >>> confirm that it makes the DW driver tick again. >>> >> >> Hi Linus, >> >> The setup function works now and the Cadence driver is initialized: >> at25 spi0.0: 1 KByte at25 eeprom, pagesize 16 >> >> However, the chip select signal is inverted. >> The moment the SPI HW is initialized it goes low. >> It is driven high during SPI transmissions. > > Ouch! Which device tree file is this? I’m using a custom one for out test system. Here’s the SPI part: spi0: spi@fd0b0000 { compatible = "cdns,spi-r1p6"; reg = <0x0 0xfd0b0000 0x0 0x1000>; clock-names = "ref_clk", "pclk"; clocks = <&sysclock>, <&sysclock>; interrupts = <0 4 IRQ_TYPE_LEVEL_HIGH>; interrupt-parent = <&gic>; num-cs = <4>; is-decoded-cs = <0>; #address-cells = <1>; #size-cells = <0>; eeprom@0 { compatible = "at,at25"; reg = <0>; spi-max-frequency = <10000000>; /* spi-cpha; */ /* spi-cpol; */ pagesize = <16>; size = <1024>; address-width = <16>; }; }; > My intention was that of_gpio_flags_quirks() in > drivers/gpio/gpiolib-of.c would activate and you would > get a print like this in dmesg: > > of_gpio_flags_quirks: enforce active low on chipselect handle I haven’t seen that in my logs. > But I'm on to it! > > Yours, > Linus Walleij Regards, Janek