Second SD card on RPi3 CM3 on Ubuntu Core 18 does not work

Bug #1823655 reported by Philip Vanloo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux-raspi2 (Ubuntu)
In Progress
Low
Unassigned
Bionic
Fix Released
Undecided
Juerg Haefliger

Bug Description

As suggested in following thread;

https://forum.snapcraft.io/t/second-sd-card-on-rpi3-cm3-with-ubuntu-core-18/10465

a bug report.

The configuration works for a Ubuntu Core 16 device.

Revision history for this message
Philip Vanloo (fragiledj) wrote :

Could someone please take a look at this?

For the record, running pi-kernel with track 18-cm3

Revision history for this message
Paolo Pisati (p-pisati) wrote :

Can you add all the relevant information here?

How to reproduce the issue (kernel version pre & post regression), hardware used (cpu board, io board), an accurate description of the issue (what *exactly* was working before the regression, what didn't work after the breakage, etc), any other relevant information, etc.

Changed in linux-raspi2 (Ubuntu):
status: New → Incomplete
importance: Undecided → Low
Revision history for this message
Philip Vanloo (fragiledj) wrote :

Hi

To start off, I was using Ubuntu Core 16 on a custom-designed board that houses a RPi CM3.

This board has some peripherals such as USB, ethernet and a SD card, all of them worked.

The kernel version I used on Ubuntu Core 16 was 4.4.0-1109.117 (snap is pi2-kernel tracking stable).

Now I wanted to make the switch to Ubuntu Core 18, using the same overlays and configuration files, but the SD card no longer works, dmesg shows

[ 4.062885] sdhci: Secure Digital Host Controller Interface driver
[ 4.062888] sdhci: Copyright(c) Pierre Ossman
[ 4.063074] mmc-bcm2835 3f300000.sdio: could not get clk, deferring probe
[ 4.063288] sdhost-bcm2835 3f202000.mmc: could not get clk, deferring probe
[ 4.063344] Error: Driver 'sdhost-bcm2835' is already registered, aborting...
[ 4.063353] sdhci-pltfm: SDHCI platform and OF driver helper
[ 4.134639] mmc-bcm2835 3f300000.sdio: mmc_debug:0 mmc_debug2:0
[ 4.134645] mmc-bcm2835 3f300000.sdio: DMA channel allocated
[ 4.171639] sdhost: log_buf @ d033dd8b (fa047000)
[ 4.239344] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1)

According to the snap version, the kernel I'm using is 4.15.0-1036.38 (snap is pi-kernel tracking 18-pi3).

Revision history for this message
Philip Vanloo (fragiledj) wrote :

Any clues on what I should start looking for?

Revision history for this message
Philip Vanloo (fragiledj) wrote :

Anyone?

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for linux-raspi2 (Ubuntu) because there has been no activity for 60 days.]

Changed in linux-raspi2 (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Juerg Haefliger (juergh) wrote :

Can you please post a complete kernel log?

Revision history for this message
Philip Vanloo (fragiledj) wrote :

Thanks for following up, here's the log from dmesg.
I've removed some audit logs that are non-applicable.

Revision history for this message
Juerg Haefliger (juergh) wrote :

OK thanks. And what's the problem? Seems the Pi is booting up just fine.

If you want to talk we're on IRC freenode #ubuntu-kernel. My nick is juergh.

Revision history for this message
Juerg Haefliger (juergh) wrote :
Juerg Haefliger (juergh)
Changed in linux-raspi2 (Ubuntu Bionic):
assignee: nobody → Juerg Haefliger (juergh)
Terry Rudd (terrykrudd)
Changed in linux-raspi2 (Ubuntu):
status: Expired → In Progress
Revision history for this message
Juerg Haefliger (juergh) wrote :

I've added an SD card slot to my Raspberry CMIO board and verified that the SD card shows up when using the latest Raspbian image and the dtoverlay=sdio config.txt option. Seems to work fine.

Then installed Ubuntu Core 16, added dtoverlay=sdio, verified that /proc/device-tree shows the overlay but no further luck. The SD card does not show up. Am I missing something? Can you verify that it works for you with latest core 16 and kernel 4.4.0-1126-raspi2?

Revision history for this message
Philip Vanloo (fragiledj) wrote :

I've just checked this:

core 16-2.42.1 8043 stable canonical✓ core
core18 20191030 1267 stable canonical✓ base
pi2-kernel 4.4.0-1124.133 102 stable canonical✓ kernel

[1579563.933197] mmc1: host does not support reading read-only switch, assuming write-enable
[1579563.935491] mmc1: new high speed SDHC card at address 59b4
[1579563.938350] mmcblk1: mmc1:59b4 SMI 3.75 GiB
[1579563.940381] mmcblk1:

---------

snap refresh pi2-kernel --candidate

core 16-2.42.1 8043 stable canonical✓ core
core18 20191030 1267 stable canonical✓ base
pi2-kernel 4.4.0-1126.135 104 candidate canonical✓ kernel

[ 46.689610] mmc1: Timeout waiting for hardware interrupt.
[ 46.697435] mmc1: error -110 whilst initialising SD card
[ 47.788757] mmc1: invalid bus width
[ 47.792460] mmc1: error -22 whilst initialising SD card
[ 47.873646] mmc1: invalid bus width
[ 47.877267] mmc1: error -22 whilst initialising SD card

Revision history for this message
Juerg Haefliger (juergh) wrote :

In my case I don't get anything in the logs indicating that the kernel is trying to talk to mmc1.

$ dmesg | grep mmc
[ 4.594995] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1)
[ 4.603742] mmc-bcm2835 3f300000.mmc: mmc_debug:0 mmc_debug2:0
[ 4.610786] mmc-bcm2835 3f300000.mmc: DMA channel allocated
[ 4.706210] mmc0: host does not support reading read-only switch, assuming write-enable
[ 4.805580] mmc0: new high speed SDHC card at address aaaa
[ 4.806124] mmcblk0: mmc0:aaaa SL32G 29.7 GiB
[ 4.817997] mmcblk0: p1 p2
[ 5.574715] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[ 5.589925] EXT4-fs (mmcblk0p2): couldn't mount as ext2 due to feature incompatibilities
[ 5.620475] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: errors=remount-ro
[ 5.709751] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[ 5.725000] EXT4-fs (mmcblk0p2): couldn't mount as ext2 due to feature incompatibilities
[ 5.754792] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 6.399854] FAT-fs (mmcblk0p1): IO charset ascii not found

$ snap list
Name Version Rev Tracking Publisher Notes
cm3 16.04-0.7 7 edge canonical✓ gadget
core 16-2.42.2+git1570.35c66d9 8199 edge canonical✓ core
nano 3.2+pkg-24de 29 stable snapcrafters -
pi2-kernel 4.4.0-1126.135 104 edge canonical✓ kernel

$ find /proc/device-tree/ | grep sdio
/proc/device-tree/soc/gpio@7e200000/sdio_pins
/proc/device-tree/soc/gpio@7e200000/sdio_pins/name
/proc/device-tree/soc/gpio@7e200000/sdio_pins/phandle
/proc/device-tree/soc/gpio@7e200000/sdio_pins/brcm,function
/proc/device-tree/soc/gpio@7e200000/sdio_pins/brcm,pins
/proc/device-tree/soc/gpio@7e200000/sdio_pins/brcm,pull
/proc/device-tree/soc/gpio@7e200000/sdio_pins/linux,phandle

Revision history for this message
Philip Vanloo (fragiledj) wrote :

Indeed

$ find /proc/device-tree/ | grep sdio
/proc/device-tree/soc/gpio@7e200000/sdio_pins
/proc/device-tree/soc/gpio@7e200000/sdio_pins/name
/proc/device-tree/soc/gpio@7e200000/sdio_pins/phandle
/proc/device-tree/soc/gpio@7e200000/sdio_pins/brcm,function
/proc/device-tree/soc/gpio@7e200000/sdio_pins/brcm,pins
/proc/device-tree/soc/gpio@7e200000/sdio_pins/brcm,pull
/proc/device-tree/soc/gpio@7e200000/sdio_pins/linux,phandle

However I'm using dtoverlay=sdio,poll_once=off
Does the poll_once change anything?

On Ubuntu Core 18 find /proc/device-tree | grep sdio
Shows empty

Revision history for this message
Philip Vanloo (fragiledj) wrote :

This issue is resolved when using pi-kernel track 18-pi/stable (e.g. 5.3.0-1018.20~18.04.1), however such a version is not yet pushed to 18-cm3

Revision history for this message
Juerg Haefliger (juergh) wrote :

As mentioned on IRC, going forward there will only be a single channel 18-pi.

Also, since this problem is resolved in the 5.x kernel, I'm going to mark this bug as resolved. If someone needs this with the 4.15 kernel or with core16, please open a new ticket and we'll evaluate it.

Changed in linux-raspi2 (Ubuntu Bionic):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.