linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christophe Leroy <christophe.leroy@c-s.fr>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-spi <linux-spi@vger.kernel.org>,
	Mark Brown <broonie@kernel.org>,
	Fabio Estevam <festevam@gmail.com>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>
Subject: Re: Boot failure with 5.4-rc5, bisected to 0f0581b24bd0 ("spi: fsl: Convert to use CS GPIO descriptors")
Date: Wed, 27 Nov 2019 10:34:18 +0100	[thread overview]
Message-ID: <e6a39aba-a41b-d781-966a-647977216b87@c-s.fr> (raw)
In-Reply-To: <CACRpkdawu5DcCA5rnRbOe+meBPtxctL7HuWciqboOEkCHZKA7A@mail.gmail.com>



Le 27/11/2019 à 10:11, Linus Walleij a écrit :
> On Wed, Nov 27, 2019 at 10:07 AM Christophe Leroy
> <christophe.leroy@c-s.fr> wrote:
>> Le 27/11/2019 à 09:26, Linus Walleij a écrit :
> 
>>>         master->num_chipselect = pdata->max_chipselect;
>>
>> I confirm it can't be that .... here I get ngpios = 9
> 
> Ah yeah you're right.
> 
>>> But the new code in the core has this:
>>>
>>>       nb = gpiod_count(dev, "cs");
>>
>> However the above is likely the issue. The property in the DTS is
>> 'gpios' and not 'cs-gpios'. According to commit e3023bf80639 ("gpio: of:
>> Handle the Freescale SPI CS"), it shouldn't be needed to rename it, and
>> that's also what I understand from commit log of 0f0581b24bd0 ("spi:
>> fsl: Convert to use CS GPIO descriptors")
> 
> Yeah I see it now, the gpio_get* does use the extra quirks to find
> a node just named "gpios" but this gpiod_count doesn't work
> because that does not loop through the same quirk.

In the meantime, I have tried changing "gpios" by "cs-gpios" in the 
device tree, and I get the following warning:

[    3.152279] ------------[ cut here ]------------
[    3.156654] WARNING: CPU: 0 PID: 1 at drivers/spi/spi-fsl-spi.c:716 
fsl_spi_cs_control+0x64/0x7c
[    3.165320] CPU: 0 PID: 1 Comm: swapper Not tainted 
5.4.0-s3k-dev-00898-gd57c00e2472d #2507
[    3.173557] NIP:  c030e8c4 LR: c030e898 CTR: c030e860
[    3.178558] REGS: c60e1bd0 TRAP: 0700   Not tainted 
(5.4.0-s3k-dev-00898-gd57c00e2472d)
[    3.186536] MSR:  00029032 <EE,ME,IR,DR,RI>  CR: 24004842  XER: 20000000
[    3.193161]
[    3.193161] GPR00: c030f630 c60e1c88 c60d4000 c6211c50 00000000 
00000000 07de2900 c61f2210
[    3.193161] GPR08: 00001208 c61f2210 00001200 000affff 24004848 
00000000 c0003890 00000000
[    3.193161] GPR16: 00000000 00000000 00000000 c7ffd478 c06aabc4 
c06b0000 c06aaae0 c06aaaec
[    3.193161] GPR24: c06aaaf8 c06aab04 00000000 c61f2210 c07bb2dc 
00000000 c6244a40 00000000
[    3.227800] NIP [c030e8c4] fsl_spi_cs_control+0x64/0x7c
[    3.232963] LR [c030e898] fsl_spi_cs_control+0x38/0x7c
[    3.238000] Call Trace:
[    3.240450] [c60e1c98] [c030f630] fsl_spi_setup+0xc4/0x148
[    3.245903] [c60e1cb8] [c030be98] spi_setup+0xd0/0x1c4
[    3.250960] [c60e1cd8] [c030c030] spi_add_device+0xa4/0x190
[    3.256472] [c60e1cf8] [c030cb28] spi_register_controller+0x75c/0xb50
[    3.262840] [c60e1d48] [c030cf5c] devm_spi_register_controller+0x40/0x98
[    3.269452] [c60e1d68] [c030edb0] of_fsl_spi_probe+0x2e0/0x3a0
[    3.275220] [c60e1db8] [c02c4e94] platform_drv_probe+0x44/0xa4
[    3.281010] [c60e1dc8] [c02c3038] really_probe+0x1ac/0x418
[    3.286419] [c60e1df8] [c02c3ab8] device_driver_attach+0x88/0x90
[    3.292355] [c60e1e18] [c02c3b60] __driver_attach+0xa0/0x154
[    3.297947] [c60e1e38] [c02c1098] bus_for_each_dev+0x64/0xb4
[    3.303540] [c60e1e68] [c02c1a74] bus_add_driver+0xe0/0x218
[    3.309052] [c60e1e88] [c02c4318] driver_register+0x84/0x148
[    3.314649] [c60e1e98] [c06d8d30] do_one_initcall+0x8c/0x1cc
[    3.320232] [c60e1ef8] [c06d8fac] kernel_init_freeable+0x13c/0x1ec
[    3.326341] [c60e1f28] [c00038a4] kernel_init+0x14/0x110
[    3.331595] [c60e1f38] [c000e1cc] ret_from_kernel_thread+0x14/0x1c
[    3.337656] Instruction dump:
[    3.340590] 4bfffab1 80830018 2f840000 419e0024 80010014 215f0000 
7c0803a6 83e1000c
[    3.348246] 7c631910 54630000 38210010 4bd00028 <0fe00000> 80010014 
83e1000c 7c0803a6
[    3.356108] ---[ end trace 1b884d70796b2b85 ]---

And SPI doesn't work allthough it seems to get properly registered

Christophe

  reply	other threads:[~2019-11-27  9:34 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-08 12:33 Boot failure with 5.4-rc5, bisected to 0f0581b24bd0 ("spi: fsl: Convert to use CS GPIO descriptors") Christophe Leroy
2019-11-08 13:09 ` Linus Walleij
2019-11-08 13:34   ` Christophe Leroy
2019-11-26 15:01     ` Christophe Leroy
2019-11-26 15:35       ` Fabio Estevam
2019-11-26 16:16         ` Christophe Leroy
2019-11-26 16:23         ` Mark Brown
2019-11-26 15:48     ` Linus Walleij
2019-11-26 19:08       ` Christophe Leroy
2019-11-26 19:14         ` Christophe Leroy
2019-11-27  8:26           ` Linus Walleij
2019-11-27  8:57             ` Christophe Leroy
2019-11-27  9:07             ` Christophe Leroy
2019-11-27  9:11               ` Linus Walleij
2019-11-27  9:34                 ` Christophe Leroy [this message]
2019-11-27 10:02                   ` Linus Walleij
2019-11-27 10:39                     ` Christophe Leroy
2019-11-27 10:55                       ` Linus Walleij
2019-11-27 12:04                         ` Christophe Leroy
2019-11-27 13:00                           ` Linus Walleij
2019-11-27 13:44                             ` Christophe Leroy
2019-11-27 13:52                               ` Linus Walleij
2019-11-27 13:54                                 ` Christophe Leroy
2019-11-27 13:56                                   ` Linus Walleij
2019-11-27 14:29                                     ` Christophe Leroy
2019-11-28  8:42                                       ` Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e6a39aba-a41b-d781-966a-647977216b87@c-s.fr \
    --to=christophe.leroy@c-s.fr \
    --cc=broonie@kernel.org \
    --cc=festevam@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).