Topics

Raspberry PI enabling MMC1


chuck kamas
 

Hi all,


I have been spinning my wheels for two days trying to discover how to enable MMC1 on a CM3. This is the one on GPIO22-27. I can boot Rasbian on the CM3 and it inits the MMC1 and its pins just fine. I can read/write to my SD card from it etc. However, when I build yocto it leaves the GPIOS22-27 in gpio mode and does not set them to MMC1 mode.  I have tried changing the device tree as described here:

https://stackoverflow.com/questions/44702426/how-to-setup-an-own-device-tree-for-a-raspberrypi-in-yocto

That compiles and add the .dtbo to my build, but still the GPIOS are not set to MMC1 mode.

cat /sys/kernel/debug/pinctrl/*gpio*/pinmux-pins
Pinmux settings per pin
Format: pin (name): mux_owner gpio_owner hog?
....

pin 22 (gpio22): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 23 (gpio23): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 24 (gpio24): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 25 (gpio25): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 26 (gpio26): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 27 (gpio27): (MUX UNCLAIMED) (GPIO UNCLAIMED)

.....
I have looked at:

https://ralimtek.com/raspberry%20pi/electronics/software/raspberry_pi_secondary_sd_card/


Any ideas of where to look next to turn on the sdio would be appreciated!


Chuck


Khem Raj
 

On Mon, Nov 16, 2020 at 11:43 PM chuck kamas via
lists.yoctoproject.org <chuckkamas=yahoo.com@lists.yoctoproject.org>
wrote:

Hi all,


I have been spinning my wheels for two days trying to discover how to
enable MMC1 on a CM3. This is the one on GPIO22-27. I can boot Rasbian
on the CM3 and it inits the MMC1 and its pins just fine. I can
read/write to my SD card from it etc. However, when I build yocto it
leaves the GPIOS22-27 in gpio mode and does not set them to MMC1 mode.
I have tried changing the device tree as described here:

https://stackoverflow.com/questions/44702426/how-to-setup-an-own-device-tree-for-a-raspberrypi-in-yocto

That compiles and add the .dtbo to my build, but still the GPIOS are not
set to MMC1 mode.

cat /sys/kernel/debug/pinctrl/*gpio*/pinmux-pins
Pinmux settings per pin
Format: pin (name): mux_owner gpio_owner hog?
....

pin 22 (gpio22): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 23 (gpio23): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 24 (gpio24): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 25 (gpio25): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 26 (gpio26): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 27 (gpio27): (MUX UNCLAIMED) (GPIO UNCLAIMED)

.....
I have looked at:

https://ralimtek.com/raspberry%20pi/electronics/software/raspberry_pi_secondary_sd_card/


Any ideas of where to look next to turn on the sdio would be appreciated!

what does /boot/config.txt look like on raspbian and yocto built images

Chuck





chuck kamas
 

Raj,


Thanks for taking the time to respond. I thought of that too. My custom Yocto build has the line to turn on the sdio in it:

dtoverlay=sdio,poll_once=off
I have attached the entire file: config.txt.yocto

However, the Rasbian image does not have any mention of the dtoverlay for the sdio.  Curious. See config.txt attached.


Thanks for the help!

Chuck


On 11/17/20 12:08 AM, Khem Raj wrote:
On Mon, Nov 16, 2020 at 11:43 PM chuck kamas via
lists.yoctoproject.org <chuckkamas=yahoo.com@lists.yoctoproject.org>
wrote:
Hi all,


I have been spinning my wheels for two days trying to discover how to
enable MMC1 on a CM3. This is the one on GPIO22-27. I can boot Rasbian
on the CM3 and it inits the MMC1 and its pins just fine. I can
read/write to my SD card from it etc. However, when I build yocto it
leaves the GPIOS22-27 in gpio mode and does not set them to MMC1 mode.
I have tried changing the device tree as described here:

https://stackoverflow.com/questions/44702426/how-to-setup-an-own-device-tree-for-a-raspberrypi-in-yocto

That compiles and add the .dtbo to my build, but still the GPIOS are not
set to MMC1 mode.

cat /sys/kernel/debug/pinctrl/*gpio*/pinmux-pins
Pinmux settings per pin
Format: pin (name): mux_owner gpio_owner hog?
....

pin 22 (gpio22): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 23 (gpio23): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 24 (gpio24): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 25 (gpio25): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 26 (gpio26): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 27 (gpio27): (MUX UNCLAIMED) (GPIO UNCLAIMED)

.....
I have looked at:

https://ralimtek.com/raspberry%20pi/electronics/software/raspberry_pi_secondary_sd_card/


Any ideas of where to look next to turn on the sdio would be appreciated!

what does /boot/config.txt look like on raspbian and yocto built images

Chuck




chuck kamas
 

Raj,


Thanks for taking the time to respond. I thought of that too. My custom Yocto build has the line to turn on the sdio in it:

dtoverlay=sdio,poll_once=off
I have attached the entire file: config.txt.yocto

However, the Rasbian image does not have any mention of the dtoverlay for the sdio.  Curious. See config.txt attached.


Thanks for the help!

Chuck


On 11/17/20 12:08 AM, Khem Raj wrote:
On Mon, Nov 16, 2020 at 11:43 PM chuck kamas via
lists.yoctoproject.org <chuckkamas=yahoo.com@lists.yoctoproject.org>
wrote:
Hi all,


I have been spinning my wheels for two days trying to discover how to
enable MMC1 on a CM3. This is the one on GPIO22-27. I can boot Rasbian
on the CM3 and it inits the MMC1 and its pins just fine. I can
read/write to my SD card from it etc. However, when I build yocto it
leaves the GPIOS22-27 in gpio mode and does not set them to MMC1 mode.
I have tried changing the device tree as described here:

https://stackoverflow.com/questions/44702426/how-to-setup-an-own-device-tree-for-a-raspberrypi-in-yocto

That compiles and add the .dtbo to my build, but still the GPIOS are not
set to MMC1 mode.

cat /sys/kernel/debug/pinctrl/*gpio*/pinmux-pins
Pinmux settings per pin
Format: pin (name): mux_owner gpio_owner hog?
....

pin 22 (gpio22): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 23 (gpio23): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 24 (gpio24): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 25 (gpio25): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 26 (gpio26): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 27 (gpio27): (MUX UNCLAIMED) (GPIO UNCLAIMED)

.....
I have looked at:

https://ralimtek.com/raspberry%20pi/electronics/software/raspberry_pi_secondary_sd_card/


Any ideas of where to look next to turn on the sdio would be appreciated!

what does /boot/config.txt look like on raspbian and yocto built images

Chuck




chuck kamas
 

Raj,


I found out how to debug the boot process of the PI from:

https://github.com/raspberrypi/documentation/blob/master/hardware/raspberrypi/bootmodes/README.md

by turning on the boot code debug.

sed -i -e "s/BOOT_UART=0/BOOT_UART=1/" bootcode.bin


I found out that the sdio overlay does not exist!

MESS:00:00:07.868162:0: dtdebug: Failed to open overlay file 'overlays/sdio.dtbo'
MESS:00:00:07.874093:0: Failed to load overlay 'sdio'
MESS:00:00:07.878881:0: brfs: File read: /mfs/sd/overlays/sdio.dtbo
MESS:00:00:07.891322:0: brfs: File read: /mfs/sd/cmdline.txt


So what am I missing on how to turn on the sdio on GPIO22-27? Is it not an overlay and instead a driver/other code/linux config that needs to be set?


Chuck


On 11/17/20 4:29 PM, chuck kamas via lists.yoctoproject.org wrote:
Raj,


Thanks for taking the time to respond. I thought of that too. My custom Yocto build has the line to turn on the sdio in it:

dtoverlay=sdio,poll_once=off

I have attached the entire file: config.txt.yocto

However, the Rasbian image does not have any mention of the dtoverlay for the sdio.  Curious. See config.txt attached.


Thanks for the help!

Chuck


On 11/17/20 12:08 AM, Khem Raj wrote:
On Mon, Nov 16, 2020 at 11:43 PM chuck kamas via
lists.yoctoproject.org <chuckkamas=yahoo.com@...>
wrote:
Hi all,


I have been spinning my wheels for two days trying to discover how to
enable MMC1 on a CM3. This is the one on GPIO22-27. I can boot Rasbian
on the CM3 and it inits the MMC1 and its pins just fine. I can
read/write to my SD card from it etc. However, when I build yocto it
leaves the GPIOS22-27 in gpio mode and does not set them to MMC1 mode.
I have tried changing the device tree as described here:

https://stackoverflow.com/questions/44702426/how-to-setup-an-own-device-tree-for-a-raspberrypi-in-yocto

That compiles and add the .dtbo to my build, but still the GPIOS are not
set to MMC1 mode.

cat /sys/kernel/debug/pinctrl/*gpio*/pinmux-pins
Pinmux settings per pin
Format: pin (name): mux_owner gpio_owner hog?
....

pin 22 (gpio22): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 23 (gpio23): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 24 (gpio24): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 25 (gpio25): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 26 (gpio26): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 27 (gpio27): (MUX UNCLAIMED) (GPIO UNCLAIMED)

.....

I have looked at:

https://ralimtek.com/raspberry%20pi/electronics/software/raspberry_pi_secondary_sd_card/


Any ideas of where to look next to turn on the sdio would be appreciated!


what does /boot/config.txt look like on raspbian and yocto built images

Chuck












chuck kamas
 

Making some progress here!


I added a compiled version of the attached device tree and now the mmc1 shows up in my yocto image! Yes! Now I need to find out the secret magic in that tree that I need to add...


Chuck


On 11/18/20 7:59 PM, chuck kamas via lists.yoctoproject.org wrote:

Raj,


I found out how to debug the boot process of the PI from:

https://github.com/raspberrypi/documentation/blob/master/hardware/raspberrypi/bootmodes/README.md

by turning on the boot code debug.

sed -i -e "s/BOOT_UART=0/BOOT_UART=1/" bootcode.bin


I found out that the sdio overlay does not exist!

MESS:00:00:07.868162:0: dtdebug: Failed to open overlay file 'overlays/sdio.dtbo'
MESS:00:00:07.874093:0: Failed to load overlay 'sdio'
MESS:00:00:07.878881:0: brfs: File read: /mfs/sd/overlays/sdio.dtbo
MESS:00:00:07.891322:0: brfs: File read: /mfs/sd/cmdline.txt


So what am I missing on how to turn on the sdio on GPIO22-27? Is it not an overlay and instead a driver/other code/linux config that needs to be set?


Chuck


On 11/17/20 4:29 PM, chuck kamas via lists.yoctoproject.org wrote:
Raj,


Thanks for taking the time to respond. I thought of that too. My custom Yocto build has the line to turn on the sdio in it:

dtoverlay=sdio,poll_once=off

I have attached the entire file: config.txt.yocto

However, the Rasbian image does not have any mention of the dtoverlay for the sdio.  Curious. See config.txt attached.


Thanks for the help!

Chuck


On 11/17/20 12:08 AM, Khem Raj wrote:
On Mon, Nov 16, 2020 at 11:43 PM chuck kamas via
lists.yoctoproject.org <chuckkamas=yahoo.com@...>
wrote:
Hi all,


I have been spinning my wheels for two days trying to discover how to
enable MMC1 on a CM3. This is the one on GPIO22-27. I can boot Rasbian
on the CM3 and it inits the MMC1 and its pins just fine. I can
read/write to my SD card from it etc. However, when I build yocto it
leaves the GPIOS22-27 in gpio mode and does not set them to MMC1 mode.
I have tried changing the device tree as described here:

https://stackoverflow.com/questions/44702426/how-to-setup-an-own-device-tree-for-a-raspberrypi-in-yocto

That compiles and add the .dtbo to my build, but still the GPIOS are not
set to MMC1 mode.

cat /sys/kernel/debug/pinctrl/*gpio*/pinmux-pins
Pinmux settings per pin
Format: pin (name): mux_owner gpio_owner hog?
....

pin 22 (gpio22): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 23 (gpio23): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 24 (gpio24): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 25 (gpio25): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 26 (gpio26): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 27 (gpio27): (MUX UNCLAIMED) (GPIO UNCLAIMED)

.....

I have looked at:

https://ralimtek.com/raspberry%20pi/electronics/software/raspberry_pi_secondary_sd_card/


Any ideas of where to look next to turn on the sdio would be appreciated!


what does /boot/config.txt look like on raspbian and yocto built images

Chuck










      




chuck kamas
 

Raj,


Thanks for taking the time to respond. I thought of that too. My custom Yocto build has the line to turn on the sdio in it:

dtoverlay=sdio,poll_once=off
I have attached the entire file: config.txt.yocto

However, the Rasbian image does not have any mention of the dtoverlay for the sdio.  Curious. See config.txt attached.


Thanks for the help!

Chuck


On 11/17/20 12:08 AM, Khem Raj wrote:
On Mon, Nov 16, 2020 at 11:43 PM chuck kamas via
lists.yoctoproject.org <chuckkamas=yahoo.com@lists.yoctoproject.org>
wrote:
Hi all,


I have been spinning my wheels for two days trying to discover how to
enable MMC1 on a CM3. This is the one on GPIO22-27. I can boot Rasbian
on the CM3 and it inits the MMC1 and its pins just fine. I can
read/write to my SD card from it etc. However, when I build yocto it
leaves the GPIOS22-27 in gpio mode and does not set them to MMC1 mode.
I have tried changing the device tree as described here:

https://stackoverflow.com/questions/44702426/how-to-setup-an-own-device-tree-for-a-raspberrypi-in-yocto

That compiles and add the .dtbo to my build, but still the GPIOS are not
set to MMC1 mode.

cat /sys/kernel/debug/pinctrl/*gpio*/pinmux-pins
Pinmux settings per pin
Format: pin (name): mux_owner gpio_owner hog?
....

pin 22 (gpio22): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 23 (gpio23): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 24 (gpio24): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 25 (gpio25): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 26 (gpio26): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 27 (gpio27): (MUX UNCLAIMED) (GPIO UNCLAIMED)

.....
I have looked at:

https://ralimtek.com/raspberry%20pi/electronics/software/raspberry_pi_secondary_sd_card/


Any ideas of where to look next to turn on the sdio would be appreciated!

what does /boot/config.txt look like on raspbian and yocto built images

Chuck




chuck kamas
 

Raj,


I found out how to debug the boot process of the PI from:

https://github.com/raspberrypi/documentation/blob/master/hardware/raspberrypi/bootmodes/README.md

by turning on the boot code debug.

sed -i -e "s/BOOT_UART=0/BOOT_UART=1/" bootcode.bin


I found out that the sdio overlay does not exist!

MESS:00:00:07.868162:0: dtdebug: Failed to open overlay file 'overlays/sdio.dtbo'
MESS:00:00:07.874093:0: Failed to load overlay 'sdio'
MESS:00:00:07.878881:0: brfs: File read: /mfs/sd/overlays/sdio.dtbo
MESS:00:00:07.891322:0: brfs: File read: /mfs/sd/cmdline.txt


So what am I missing on how to turn on the sdio on GPIO22-27? Is it not an overlay and instead a driver/other code/linux config that needs to be set?


Chuck


On 11/17/20 4:29 PM, chuck kamas via lists.yoctoproject.org wrote:
Raj,


Thanks for taking the time to respond. I thought of that too. My custom Yocto build has the line to turn on the sdio in it:

dtoverlay=sdio,poll_once=off

I have attached the entire file: config.txt.yocto

However, the Rasbian image does not have any mention of the dtoverlay for the sdio.  Curious. See config.txt attached.


Thanks for the help!

Chuck


On 11/17/20 12:08 AM, Khem Raj wrote:
On Mon, Nov 16, 2020 at 11:43 PM chuck kamas via
lists.yoctoproject.org <chuckkamas=yahoo.com@...>
wrote:
Hi all,


I have been spinning my wheels for two days trying to discover how to
enable MMC1 on a CM3. This is the one on GPIO22-27. I can boot Rasbian
on the CM3 and it inits the MMC1 and its pins just fine. I can
read/write to my SD card from it etc. However, when I build yocto it
leaves the GPIOS22-27 in gpio mode and does not set them to MMC1 mode.
I have tried changing the device tree as described here:

https://stackoverflow.com/questions/44702426/how-to-setup-an-own-device-tree-for-a-raspberrypi-in-yocto

That compiles and add the .dtbo to my build, but still the GPIOS are not
set to MMC1 mode.

cat /sys/kernel/debug/pinctrl/*gpio*/pinmux-pins
Pinmux settings per pin
Format: pin (name): mux_owner gpio_owner hog?
....

pin 22 (gpio22): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 23 (gpio23): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 24 (gpio24): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 25 (gpio25): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 26 (gpio26): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 27 (gpio27): (MUX UNCLAIMED) (GPIO UNCLAIMED)

.....

I have looked at:

https://ralimtek.com/raspberry%20pi/electronics/software/raspberry_pi_secondary_sd_card/


Any ideas of where to look next to turn on the sdio would be appreciated!


what does /boot/config.txt look like on raspbian and yocto built images

Chuck












chuck kamas
 

Making some progress here!


I added a compiled version of the attached device tree and now the mmc1 shows up in my yocto image! Yes! Now I need to find out the secret magic in that tree that I need to add...


Chuck


On 11/18/20 7:59 PM, chuck kamas via lists.yoctoproject.org wrote:

Raj,


I found out how to debug the boot process of the PI from:

https://github.com/raspberrypi/documentation/blob/master/hardware/raspberrypi/bootmodes/README.md

by turning on the boot code debug.

sed -i -e "s/BOOT_UART=0/BOOT_UART=1/" bootcode.bin


I found out that the sdio overlay does not exist!

MESS:00:00:07.868162:0: dtdebug: Failed to open overlay file 'overlays/sdio.dtbo'
MESS:00:00:07.874093:0: Failed to load overlay 'sdio'
MESS:00:00:07.878881:0: brfs: File read: /mfs/sd/overlays/sdio.dtbo
MESS:00:00:07.891322:0: brfs: File read: /mfs/sd/cmdline.txt


So what am I missing on how to turn on the sdio on GPIO22-27? Is it not an overlay and instead a driver/other code/linux config that needs to be set?


Chuck


On 11/17/20 4:29 PM, chuck kamas via lists.yoctoproject.org wrote:
Raj,


Thanks for taking the time to respond. I thought of that too. My custom Yocto build has the line to turn on the sdio in it:

dtoverlay=sdio,poll_once=off

I have attached the entire file: config.txt.yocto

However, the Rasbian image does not have any mention of the dtoverlay for the sdio.  Curious. See config.txt attached.


Thanks for the help!

Chuck


On 11/17/20 12:08 AM, Khem Raj wrote:
On Mon, Nov 16, 2020 at 11:43 PM chuck kamas via
lists.yoctoproject.org <chuckkamas=yahoo.com@...>
wrote:
Hi all,


I have been spinning my wheels for two days trying to discover how to
enable MMC1 on a CM3. This is the one on GPIO22-27. I can boot Rasbian
on the CM3 and it inits the MMC1 and its pins just fine. I can
read/write to my SD card from it etc. However, when I build yocto it
leaves the GPIOS22-27 in gpio mode and does not set them to MMC1 mode.
I have tried changing the device tree as described here:

https://stackoverflow.com/questions/44702426/how-to-setup-an-own-device-tree-for-a-raspberrypi-in-yocto

That compiles and add the .dtbo to my build, but still the GPIOS are not
set to MMC1 mode.

cat /sys/kernel/debug/pinctrl/*gpio*/pinmux-pins
Pinmux settings per pin
Format: pin (name): mux_owner gpio_owner hog?
....

pin 22 (gpio22): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 23 (gpio23): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 24 (gpio24): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 25 (gpio25): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 26 (gpio26): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 27 (gpio27): (MUX UNCLAIMED) (GPIO UNCLAIMED)

.....

I have looked at:

https://ralimtek.com/raspberry%20pi/electronics/software/raspberry_pi_secondary_sd_card/


Any ideas of where to look next to turn on the sdio would be appreciated!


what does /boot/config.txt look like on raspbian and yocto built images

Chuck










      




chuck kamas
 

Raj,


Thanks for taking the time to respond. I thought of that too. My custom Yocto build has the line to turn on the sdio in it:

dtoverlay=sdio,poll_once=off
I have attached the entire file: config.txt.yocto

However, the Rasbian image does not have any mention of the dtoverlay for the sdio.  Curious. See config.txt attached.


Thanks for the help!

Chuck


On 11/17/20 12:08 AM, Khem Raj wrote:
On Mon, Nov 16, 2020 at 11:43 PM chuck kamas via
lists.yoctoproject.org <chuckkamas=yahoo.com@lists.yoctoproject.org>
wrote:
Hi all,


I have been spinning my wheels for two days trying to discover how to
enable MMC1 on a CM3. This is the one on GPIO22-27. I can boot Rasbian
on the CM3 and it inits the MMC1 and its pins just fine. I can
read/write to my SD card from it etc. However, when I build yocto it
leaves the GPIOS22-27 in gpio mode and does not set them to MMC1 mode.
I have tried changing the device tree as described here:

https://stackoverflow.com/questions/44702426/how-to-setup-an-own-device-tree-for-a-raspberrypi-in-yocto

That compiles and add the .dtbo to my build, but still the GPIOS are not
set to MMC1 mode.

cat /sys/kernel/debug/pinctrl/*gpio*/pinmux-pins
Pinmux settings per pin
Format: pin (name): mux_owner gpio_owner hog?
....

pin 22 (gpio22): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 23 (gpio23): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 24 (gpio24): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 25 (gpio25): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 26 (gpio26): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 27 (gpio27): (MUX UNCLAIMED) (GPIO UNCLAIMED)

.....
I have looked at:

https://ralimtek.com/raspberry%20pi/electronics/software/raspberry_pi_secondary_sd_card/


Any ideas of where to look next to turn on the sdio would be appreciated!

what does /boot/config.txt look like on raspbian and yocto built images

Chuck




Erik Boto
 

On Thu, Nov 19, 2020 at 7:21 PM chuck kamas via lists.yoctoproject.org
<chuckkamas=yahoo.com@lists.yoctoproject.org> wrote:

Making some progress here!


I added a compiled version of the attached device tree and now the mmc1 shows up in my yocto image! Yes! Now I need to find out the secret magic in that tree that I need to add...
If I'm not mistaken that should be done by appending
RPI_KERNEL_DEVICETREE_OVERLAYS. If you don't have your own custom
machine configuration where this could be added, try adding the
following to local.conf:

RPI_KERNEL_DEVICETREE_OVERLAYS_append = " overlays/sdio.dtbo "

Cheers,
Erik


Chuck


On 11/18/20 7:59 PM, chuck kamas via lists.yoctoproject.org wrote:

Raj,


I found out how to debug the boot process of the PI from:

https://github.com/raspberrypi/documentation/blob/master/hardware/raspberrypi/bootmodes/README.md

by turning on the boot code debug.

sed -i -e "s/BOOT_UART=0/BOOT_UART=1/" bootcode.bin


I found out that the sdio overlay does not exist!

MESS:00:00:07.868162:0: dtdebug: Failed to open overlay file 'overlays/sdio.dtbo'
MESS:00:00:07.874093:0: Failed to load overlay 'sdio'
MESS:00:00:07.878881:0: brfs: File read: /mfs/sd/overlays/sdio.dtbo
MESS:00:00:07.891322:0: brfs: File read: /mfs/sd/cmdline.txt


So what am I missing on how to turn on the sdio on GPIO22-27? Is it not an overlay and instead a driver/other code/linux config that needs to be set?


Chuck


On 11/17/20 4:29 PM, chuck kamas via lists.yoctoproject.org wrote:

Raj,


Thanks for taking the time to respond. I thought of that too. My custom Yocto build has the line to turn on the sdio in it:

dtoverlay=sdio,poll_once=off


I have attached the entire file: config.txt.yocto

However, the Rasbian image does not have any mention of the dtoverlay for the sdio. Curious. See config.txt attached.


Thanks for the help!

Chuck


On 11/17/20 12:08 AM, Khem Raj wrote:

On Mon, Nov 16, 2020 at 11:43 PM chuck kamas via
lists.yoctoproject.org <chuckkamas=yahoo.com@lists.yoctoproject.org>
wrote:

Hi all,


I have been spinning my wheels for two days trying to discover how to
enable MMC1 on a CM3. This is the one on GPIO22-27. I can boot Rasbian
on the CM3 and it inits the MMC1 and its pins just fine. I can
read/write to my SD card from it etc. However, when I build yocto it
leaves the GPIOS22-27 in gpio mode and does not set them to MMC1 mode.
I have tried changing the device tree as described here:

https://stackoverflow.com/questions/44702426/how-to-setup-an-own-device-tree-for-a-raspberrypi-in-yocto

That compiles and add the .dtbo to my build, but still the GPIOS are not
set to MMC1 mode.

cat /sys/kernel/debug/pinctrl/*gpio*/pinmux-pins
Pinmux settings per pin
Format: pin (name): mux_owner gpio_owner hog?
....

pin 22 (gpio22): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 23 (gpio23): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 24 (gpio24): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 25 (gpio25): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 26 (gpio26): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 27 (gpio27): (MUX UNCLAIMED) (GPIO UNCLAIMED)

.....

I have looked at:

https://ralimtek.com/raspberry%20pi/electronics/software/raspberry_pi_secondary_sd_card/


Any ideas of where to look next to turn on the sdio would be appreciated!


what does /boot/config.txt look like on raspbian and yocto built images

Chuck















Khem Raj
 

Can you also post the content list of /boot/overlays directory on raspbian

On Tue, Nov 17, 2020 at 4:29 PM Chuck Kamas <chuckkamas@yahoo.com> wrote:

Raj,


Thanks for taking the time to respond. I thought of that too. My custom
Yocto build has the line to turn on the sdio in it:

dtoverlay=sdio,poll_once=off
I have attached the entire file: config.txt.yocto

However, the Rasbian image does not have any mention of the dtoverlay
for the sdio. Curious. See config.txt attached.


Thanks for the help!

Chuck


On 11/17/20 12:08 AM, Khem Raj wrote:
On Mon, Nov 16, 2020 at 11:43 PM chuck kamas via
lists.yoctoproject.org <chuckkamas=yahoo.com@lists.yoctoproject.org>
wrote:
Hi all,


I have been spinning my wheels for two days trying to discover how to
enable MMC1 on a CM3. This is the one on GPIO22-27. I can boot Rasbian
on the CM3 and it inits the MMC1 and its pins just fine. I can
read/write to my SD card from it etc. However, when I build yocto it
leaves the GPIOS22-27 in gpio mode and does not set them to MMC1 mode.
I have tried changing the device tree as described here:

https://stackoverflow.com/questions/44702426/how-to-setup-an-own-device-tree-for-a-raspberrypi-in-yocto

That compiles and add the .dtbo to my build, but still the GPIOS are not
set to MMC1 mode.

cat /sys/kernel/debug/pinctrl/*gpio*/pinmux-pins
Pinmux settings per pin
Format: pin (name): mux_owner gpio_owner hog?
....

pin 22 (gpio22): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 23 (gpio23): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 24 (gpio24): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 25 (gpio25): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 26 (gpio26): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 27 (gpio27): (MUX UNCLAIMED) (GPIO UNCLAIMED)

.....
I have looked at:

https://ralimtek.com/raspberry%20pi/electronics/software/raspberry_pi_secondary_sd_card/


Any ideas of where to look next to turn on the sdio would be appreciated!

what does /boot/config.txt look like on raspbian and yocto built images

Chuck





Erik Boto
 

On Thu, Nov 19, 2020 at 7:21 PM chuck kamas via lists.yoctoproject.org
<chuckkamas=yahoo.com@lists.yoctoproject.org> wrote:

Making some progress here!


I added a compiled version of the attached device tree and now the mmc1 shows up in my yocto image! Yes! Now I need to find out the secret magic in that tree that I need to add...
If I'm not mistaken that should be done by appending
RPI_KERNEL_DEVICETREE_OVERLAYS. If you don't have your own custom
machine configuration where this could be added, try adding the
following to local.conf:

RPI_KERNEL_DEVICETREE_OVERLAYS_append = " overlays/sdio.dtbo "

Cheers,
Erik


Chuck


On 11/18/20 7:59 PM, chuck kamas via lists.yoctoproject.org wrote:

Raj,


I found out how to debug the boot process of the PI from:

https://github.com/raspberrypi/documentation/blob/master/hardware/raspberrypi/bootmodes/README.md

by turning on the boot code debug.

sed -i -e "s/BOOT_UART=0/BOOT_UART=1/" bootcode.bin


I found out that the sdio overlay does not exist!

MESS:00:00:07.868162:0: dtdebug: Failed to open overlay file 'overlays/sdio.dtbo'
MESS:00:00:07.874093:0: Failed to load overlay 'sdio'
MESS:00:00:07.878881:0: brfs: File read: /mfs/sd/overlays/sdio.dtbo
MESS:00:00:07.891322:0: brfs: File read: /mfs/sd/cmdline.txt


So what am I missing on how to turn on the sdio on GPIO22-27? Is it not an overlay and instead a driver/other code/linux config that needs to be set?


Chuck


On 11/17/20 4:29 PM, chuck kamas via lists.yoctoproject.org wrote:

Raj,


Thanks for taking the time to respond. I thought of that too. My custom Yocto build has the line to turn on the sdio in it:

dtoverlay=sdio,poll_once=off


I have attached the entire file: config.txt.yocto

However, the Rasbian image does not have any mention of the dtoverlay for the sdio. Curious. See config.txt attached.


Thanks for the help!

Chuck


On 11/17/20 12:08 AM, Khem Raj wrote:

On Mon, Nov 16, 2020 at 11:43 PM chuck kamas via
lists.yoctoproject.org <chuckkamas=yahoo.com@lists.yoctoproject.org>
wrote:

Hi all,


I have been spinning my wheels for two days trying to discover how to
enable MMC1 on a CM3. This is the one on GPIO22-27. I can boot Rasbian
on the CM3 and it inits the MMC1 and its pins just fine. I can
read/write to my SD card from it etc. However, when I build yocto it
leaves the GPIOS22-27 in gpio mode and does not set them to MMC1 mode.
I have tried changing the device tree as described here:

https://stackoverflow.com/questions/44702426/how-to-setup-an-own-device-tree-for-a-raspberrypi-in-yocto

That compiles and add the .dtbo to my build, but still the GPIOS are not
set to MMC1 mode.

cat /sys/kernel/debug/pinctrl/*gpio*/pinmux-pins
Pinmux settings per pin
Format: pin (name): mux_owner gpio_owner hog?
....

pin 22 (gpio22): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 23 (gpio23): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 24 (gpio24): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 25 (gpio25): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 26 (gpio26): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 27 (gpio27): (MUX UNCLAIMED) (GPIO UNCLAIMED)

.....

I have looked at:

https://ralimtek.com/raspberry%20pi/electronics/software/raspberry_pi_secondary_sd_card/


Any ideas of where to look next to turn on the sdio would be appreciated!


what does /boot/config.txt look like on raspbian and yocto built images

Chuck















chuck kamas
 

Thank you all. That is good information to know! However, I already had a custom machine config that I was able to drop the overlay into. Once I had the correct overlay enabling the sdio, the SD card works!


Thanks again for all of your help.



On 11/20/20 4:22 AM, Erik Boto wrote:
On Thu, Nov 19, 2020 at 7:21 PM chuck kamas via lists.yoctoproject.org
<chuckkamas=yahoo.com@...> wrote:
Making some progress here!


I added a compiled version of the attached device tree and now the mmc1 shows up in my yocto image! Yes! Now I need to find out the secret magic in that tree that I need to add...
If I'm not mistaken that should be done by appending
RPI_KERNEL_DEVICETREE_OVERLAYS. If you don't have your own custom
machine configuration where this could be added, try adding the
following to local.conf:

RPI_KERNEL_DEVICETREE_OVERLAYS_append = " overlays/sdio.dtbo "

Cheers,
Erik

Chuck


On 11/18/20 7:59 PM, chuck kamas via lists.yoctoproject.org wrote:

Raj,


I found out how to debug the boot process of the PI from:

https://github.com/raspberrypi/documentation/blob/master/hardware/raspberrypi/bootmodes/README.md

by turning on the boot code debug.

sed -i -e "s/BOOT_UART=0/BOOT_UART=1/" bootcode.bin


I found out that the sdio overlay does not exist!

MESS:00:00:07.868162:0: dtdebug: Failed to open overlay file 'overlays/sdio.dtbo'
MESS:00:00:07.874093:0: Failed to load overlay 'sdio'
MESS:00:00:07.878881:0: brfs: File read: /mfs/sd/overlays/sdio.dtbo
MESS:00:00:07.891322:0: brfs: File read: /mfs/sd/cmdline.txt


So what am I missing on how to turn on the sdio on GPIO22-27? Is it not an overlay and instead a driver/other code/linux config that needs to be set?


Chuck


On 11/17/20 4:29 PM, chuck kamas via lists.yoctoproject.org wrote:

Raj,


Thanks for taking the time to respond. I thought of that too. My custom Yocto build has the line to turn on the sdio in it:

dtoverlay=sdio,poll_once=off


I have attached the entire file: config.txt.yocto

However, the Rasbian image does not have any mention of the dtoverlay for the sdio.  Curious. See config.txt attached.


Thanks for the help!

Chuck


On 11/17/20 12:08 AM, Khem Raj wrote:

On Mon, Nov 16, 2020 at 11:43 PM chuck kamas via
lists.yoctoproject.org <chuckkamas=yahoo.com@...>
wrote:

Hi all,


I have been spinning my wheels for two days trying to discover how to
enable MMC1 on a CM3. This is the one on GPIO22-27. I can boot Rasbian
on the CM3 and it inits the MMC1 and its pins just fine. I can
read/write to my SD card from it etc. However, when I build yocto it
leaves the GPIOS22-27 in gpio mode and does not set them to MMC1 mode.
I have tried changing the device tree as described here:

https://stackoverflow.com/questions/44702426/how-to-setup-an-own-device-tree-for-a-raspberrypi-in-yocto

That compiles and add the .dtbo to my build, but still the GPIOS are not
set to MMC1 mode.

cat /sys/kernel/debug/pinctrl/*gpio*/pinmux-pins
Pinmux settings per pin
Format: pin (name): mux_owner gpio_owner hog?
....

pin 22 (gpio22): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 23 (gpio23): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 24 (gpio24): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 25 (gpio25): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 26 (gpio26): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 27 (gpio27): (MUX UNCLAIMED) (GPIO UNCLAIMED)

.....

I have looked at:

https://ralimtek.com/raspberry%20pi/electronics/software/raspberry_pi_secondary_sd_card/


Any ideas of where to look next to turn on the sdio would be appreciated!


what does /boot/config.txt look like on raspbian and yocto built images

Chuck