Re: spi-ar934x: Using GPIO CS issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Dave.

On Tue, Nov 2, 2021 at 11:31 PM Dave Bender <codehero@xxxxxxxxx> wrote:
> Under the mach-* era of configuring boards, I was able to use a second
> SPI NOR flash with a GPIO chip select, as in:
>
> static struct spi_board_info spi_info[] = {
>        { ... },
>        {
>                .bus_num        = 0,
>                .chip_select    = 1,
>                .max_speed_hz   = 25000000,
>                .modalias       = "m25p80",
>        },
> };
>
> static int cs_gpios[2] = {
>        -ENOENT,
>        11,
> };
>
> static struct ath79_spi_platform_data mtriq_spi_data __initdata = {
>        .bus_num = 0
>        ,.num_chipselect = 2
>        ,.cs_gpios = cs_gpios
> };
>
> static void __init board_setup(){
>  ath79_register_spi(&spi_data, spi_info, 2);
> }
>
>
> However, under the new dts regime, I try to use a CS gpio but cannot
> communicate successfully to the chip:
>
> &spi {
>     status = "okay";
>     cs-gpios = <0>,<&gpio 11 GPIO_ACTIVE_LOW>;
>
>     flash@1 {
>     compatible = "jedec,spi-nor";
>     spi-max-frequency = <25000000>;
>     reg = <1>;
>   };
> };
>
> Am I missing something here?

Does it work if you change GPIO_ACTIVE_LOW to GPIO_ACTIVE_HIGH?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux