* Device tree probe order
@ 2023-11-15 16:47 Renaud Barbier
2023-11-16 7:56 ` Sascha Hauer
0 siblings, 1 reply; 3+ messages in thread
From: Renaud Barbier @ 2023-11-15 16:47 UTC (permalink / raw)
To: Barebox List
We have a board based on the LS1026A with a boot SPI NOR on the QSPI controller and FRAM on the DSPI controller.
Currently, the DSPI is being probed first and got the device node /dev/m25p0. The boot SPI get /dev/m25p1.
I would like the QSPI NOR to be assigned to /dev/m25p0 and the FRAM to /dev/m25p1.
Is it possible to change the probing order or the device node assignment?
Cheers,
Renaud
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Device tree probe order
2023-11-15 16:47 Device tree probe order Renaud Barbier
@ 2023-11-16 7:56 ` Sascha Hauer
2023-11-16 9:23 ` Renaud Barbier
0 siblings, 1 reply; 3+ messages in thread
From: Sascha Hauer @ 2023-11-16 7:56 UTC (permalink / raw)
To: Renaud Barbier; +Cc: Barebox List
Hi Renauld,
On Wed, Nov 15, 2023 at 04:47:03PM +0000, Renaud Barbier wrote:
> We have a board based on the LS1026A with a boot SPI NOR on the QSPI
> controller and FRAM on the DSPI controller. Currently, the DSPI is
> being probed first and got the device node /dev/m25p0. The boot SPI
> get /dev/m25p1.
>
> I would like the QSPI NOR to be assigned to /dev/m25p0 and the FRAM
> to /dev/m25p1.
>
> Is it possible to change the probing order or the device node
> assignment?
You can create aliases in the device tree for both flashes, see
drivers/mtd/devices/m25p80.c:258:
if (dev->of_node)
flash_name = of_alias_get(dev->of_node);
Sascha
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: Device tree probe order
2023-11-16 7:56 ` Sascha Hauer
@ 2023-11-16 9:23 ` Renaud Barbier
0 siblings, 0 replies; 3+ messages in thread
From: Renaud Barbier @ 2023-11-16 9:23 UTC (permalink / raw)
To: Sascha Hauer; +Cc: Barebox List
Thanks.
I had found that swapping the device driver registration made the QSPI probe first. Changing DSPI to be registered by device_initall and QSPI by coredevice_initcall does what I am expected.
I will look at the method you offered.
> -----Original Message-----
> From: Sascha Hauer <sha@pengutronix.de>
> Sent: Thursday, November 16, 2023 7:56 AM
> To: Renaud Barbier <Renaud.Barbier@ametek.com>
> Cc: Barebox List <barebox@lists.infradead.org>
> Subject: Re: Device tree probe order
>
> ***NOTICE*** This came from an external source. Use caution when replying,
> clicking links, or opening attachments.
>
> Hi Renauld,
>
> On Wed, Nov 15, 2023 at 04:47:03PM +0000, Renaud Barbier wrote:
> > We have a board based on the LS1026A with a boot SPI NOR on the QSPI
> > controller and FRAM on the DSPI controller. Currently, the DSPI is
> > being probed first and got the device node /dev/m25p0. The boot SPI
> > get /dev/m25p1.
> >
> > I would like the QSPI NOR to be assigned to /dev/m25p0 and the FRAM
> > to /dev/m25p1.
> >
> > Is it possible to change the probing order or the device node
> > assignment?
>
> You can create aliases in the device tree for both flashes, see
> drivers/mtd/devices/m25p80.c:258:
>
> if (dev->of_node)
> flash_name = of_alias_get(dev->of_node);
>
> Sascha
>
> --
> Pengutronix e.K. | |
> Steuerwalder Str. 21 |
> https://urldefense.com/v3/__http://www.pengutronix.de/__;!!HKOSU0g!BN8zz
> nbk0b3uelLqUvSN2rw8QCvPlzwneze_sHvn80jabgpUMpW6mKUMPR5ix-
> ZYthtB_DT_P_RRp4-IpE3s$ |
> 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-11-16 9:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-15 16:47 Device tree probe order Renaud Barbier
2023-11-16 7:56 ` Sascha Hauer
2023-11-16 9:23 ` Renaud Barbier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox