From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4FB47C432C0 for ; Wed, 27 Nov 2019 13:00:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2420C2070B for ; Wed, 27 Nov 2019 13:00:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="GS59w7hn" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726591AbfK0NAj (ORCPT ); Wed, 27 Nov 2019 08:00:39 -0500 Received: from mail-vs1-f65.google.com ([209.85.217.65]:45756 "EHLO mail-vs1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726530AbfK0NAj (ORCPT ); Wed, 27 Nov 2019 08:00:39 -0500 Received: by mail-vs1-f65.google.com with SMTP id n9so15083417vsa.12 for ; Wed, 27 Nov 2019 05:00:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=7zaFgifFVX7S1p9ptuX5oUt4RCSQmtxWAxQtUAthi/4=; b=GS59w7hnFk2mOzzN9HxH/GU+Ptf1GQPWGWBwugtwy+PWVVuOZyKh4UdSkLLZaWsOI1 3bbZolcqvKJzykbYfvK8mq9r3fIrNA/eTvaGQkvK+tlckbQNY1/7nJMz1o1pozFNdOfA hgym6Tnw4M56vBDfsep8sKlr2/AKOYt5TXKHb+oE1O/VhX0aMdGcJywpBl+1Cjk3rAmW w25iJ82aMc6ioE9vfyzHT5pBxIC905GXHnXuEOfobgXQ3B1jWEZUxyiROn+0SlCSm3wd utHzzoFBlmrl6iy7s4NvzVjc+zvsR0KphHh6lNkO0rDxT8nVANpVVW5S2WTbo6hcqBvv AfGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=7zaFgifFVX7S1p9ptuX5oUt4RCSQmtxWAxQtUAthi/4=; b=UCSMzPbxdbCh6s3xPls3tAQdQGWADm/Lt+tunzIKAlMELpDfCdULpLg7TNnSB/XjwU XYozB5iWoZOxfm1rMs4FYcLFZHnEaufPFJoYkMg199RM0qsUt5iydhfideZ2TODxQlLO +5yvLwqXFg5/QT+qvFwWs8GuY9Ts65P9CsIXlwzn6ab+ReNJGL+rSptTm3MnehJSLQiv YAYWJWDD8X/l4QlULujlxi5QK1R8AQTJPcRDM0OJRHzPFPClwmVSFtuAPPjq7i29lTvW F/zRY++PW2TpL5dZKMEDV6qaLBhxRHxsLve5IKKNnmKp+kvzM6HFcWyOW0AlXRKlmp8l 2QAw== X-Gm-Message-State: APjAAAW6QATBe0g8B2CE6xhoYZXmMEgaeF2Lj2P8tNx4o90dqQlXyOvH q25PyTFM0smGyjEvr1WmoyyL/wMEQHZh7UOqzCTJ8Q== X-Google-Smtp-Source: APXvYqw8L6In4ebYBmmplUMmBFUIjezsLzdjgYqLywsl9uuI2YR2sbcgZBVtjmPeaK6RBvKl/P0ZSltJDRbTfvykqew= X-Received: by 2002:a67:f84d:: with SMTP id b13mr25761464vsp.57.1574859638222; Wed, 27 Nov 2019 05:00:38 -0800 (PST) MIME-Version: 1.0 References: <1efb797c-e3c1-25a4-0e81-78b5bbadb355@c-s.fr> <3c79a8b9-65e4-bfc9-d718-b8530fe1e672@c-s.fr> <582b5ccf-8993-6345-94d1-3c2fc94e4d4f@c-s.fr> <748eb503-b692-6d30-bc5e-94539a939b06@c-s.fr> In-Reply-To: <748eb503-b692-6d30-bc5e-94539a939b06@c-s.fr> From: Linus Walleij Date: Wed, 27 Nov 2019 14:00:27 +0100 Message-ID: Subject: Re: Boot failure with 5.4-rc5, bisected to 0f0581b24bd0 ("spi: fsl: Convert to use CS GPIO descriptors") To: Christophe Leroy Cc: linux-spi , Mark Brown , Fabio Estevam , "open list:GPIO SUBSYSTEM" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On Wed, Nov 27, 2019 at 1:05 PM Christophe Leroy wrote: > Le 27/11/2019 =C3=A0 11:55, Linus Walleij a =C3=A9crit : > > That's weird, because when ->use_gpio_descriptors is set > > (as for this driver) the core only attempts to look up > > spi->cs_gpiods and not spi->cs_gpios, and consequently > > can only assign spi->cd_gpiod and not spi->cs_gpio: > > That's it. ->use_gpio_descriptors isn't set for the FSL driver: Oh, my coding mistake. :( And an especially stupid one too. OK I make a separate patch in the series to fix that too. > I have now added it, together with the DTS cs-gpios name change (without > your counting patch with crashes), and I get something which is almost > working: I get temperature back into sensors, but temperature is 0=C2=B0C= !!! OK we almost fixed it I think. It is probably better to test with all three patches (will send out soon) that rely on the gpiolib to do appropriate counting of the gpiod's and so on. > Looking into dmesg, I see: > > [ 3.153521] lm74@1 GPIO handle specifies active low - ignored > [ 3.178093] lm74@5 GPIO handle specifies active low - ignored > > Any link with the problem ? This is because your GPIO handles look like this: gpios =3D <&CPM1_PIO_C 4 1 /* SICOFI 1 */ &CPM1_PIO_B 23 1 /* TEMP MCR */ &CPM1_PIO_C 8 1 /* SICOFI 2 */ &CPM1_PIO_C 12 1 /* EEPROM MIAE */ &CPM1_PIO_D 6 1 /* SICOFI 3 */ &CPM1_PIO_B 14 1 /* TEMP MPC885 */ &CPM1_PIO_B 21 1 /* EEPROM CMPC885 */ &FAV_CS_SPI 0 1 /* FAV SPI */ &FAV_CS_SPI 2 1>; /* FAV POSTE FPGA */ That "1" at the end of each GPIO phandle means "active low" as can be seen in /* Bit 0 express polarity */ #define GPIO_ACTIVE_HIGH 0 #define GPIO_ACTIVE_LOW 1 But your child nodes look like this: sicofi@0 { compatible =3D "infineon,sicofi"; spi-max-frequency =3D <1000000>; reg =3D <0>; spi-cs-high; spi-cpha; }; lm74@1 { compatible =3D "ns,lm74"; spi-max-frequency =3D <1000000>; reg =3D <1>; spi-cs-high; }; And the spi-cs-high in the child node takes precedence. That's a bit ambigous so that is what the warning is about. Try to remove the "spi-cs-high" bool flag from your nodes, because it seems like the old code was ignoring them. Does that solve the problem? Yours, Linus Walleij