From: "Tomaž Šolc" <tomaz.solc@klevio.com>
To: Roland Hieber <rhi@pengutronix.de>
Cc: "barebox@lists.infradead.org" <barebox@lists.infradead.org>,
Moritz Augsburger <ml+barebox@moritz.augsburger.name>
Subject: Re: Accessing MMC/SD card storage on Raspberry Pi
Date: Tue, 12 Feb 2019 16:31:05 +0100 [thread overview]
Message-ID: <f803fb6f-763b-7027-a11e-086ad48b0054@klevio.com> (raw)
In-Reply-To: <20190212112240.sjrrrcdmysdyr3iy@pengutronix.de>
Hi
On 12. 02. 19 12:22, Roland Hieber wrote:
> If I remember correctly, there was a patch changing that behaviour... Ah
> yes, commit abc0447440d6 [0]:
>
> ARM: dts: bcm2835-rpi: re-enable booting from SD card
>
> Kernel commit a19adf8d86e822eba502486524127595372c85f6 [0] changed the
> RPi1 device tree from &sdhci to &sdhost, which was imported in barebox
> commit d14b844b08635c717fb52a294ed8d6872e260315. It seems that barebox
> does not have a driver for brcm,bcm2835-sdhost (yet), which resulted in
> barebox unable to boot from SD card. However, the driver for
> brcm,bcm2835-sdhci worked fine in the past.
>
> Although the upstream change was made for good reasons, the simplest
> change for barebox for now is to revert to using &sdhci and disable
> &sdhost.
>
> [0]: https://git.pengutronix.de/cgit/barebox/commit/?h=master&id=abc0447440d6
>
> The "solution" was a small device tree fix. Could this be related to
> your problem? Unfortunately no one here has a RPi Compute Module, but
> there were already similar questions in the last month. (Cc Moritz)
Ah, thanks for pointing this out. That commit only touched device tree
for R.Pi 1. I tried to do something similar on Compute Module 3 by
adding the following into bcm2837-rpi-3.dts:
&sdhci {
pinctrl-0 = <&emmc_gpio48>;
/delete-property/ mmc-pwrseq;
/delete-property/ non-removable;
/delete-property/ #address-cells;
/delete-property/ #size-cells;
/delete-node/ wifi@1;
};
&sdhost {
status = "disabled";
};
Unfortunately it fails to boot like that with the last things printed
out being:
initcall-> rpi_devices_init+0x0/0x138
register_device: bcm2835_fb0
bcm2835_mci 3f300000.sdhci@7e300000.of: Wanted 400000 hz, returning
divider 313 (626) which yields 399361 hz
bcm2835_mci 3f300000.sdhci@7e300000.of: Changing bus width to 1
bcm2835_mci 3f300000.sdhci@7e300000.of: IO settings: bus width=0,
frequency=400000 Hz
bcm2835_mci 3f300000.sdhci@7e300000.of: Changing bus width to 1
bcm2835_mci 3f300000.sdhci@7e300000.of: IO settings: bus width=0,
frequency=400000 Hz
One possible reason for this might be that pin functions aren't
re-assigned. I think pinctrl isn't implemented for bcm2835. It probably
works on R.Pi 1 because there firmware already assigns correct pin
functions by default before jumping to Bearbox.
I'll see if I can implement pinctrl. It shouldn't be much work since
most things already seem to be implemented in gpio-bcm2835.c.
Best regards
Tomaž
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2019-02-12 15:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-11 15:09 Tomaž Šolc
2019-02-12 11:22 ` Roland Hieber
2019-02-12 15:31 ` Tomaž Šolc [this message]
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=f803fb6f-763b-7027-a11e-086ad48b0054@klevio.com \
--to=tomaz.solc@klevio.com \
--cc=barebox@lists.infradead.org \
--cc=ml+barebox@moritz.augsburger.name \
--cc=rhi@pengutronix.de \
/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