AM335x board starts kernel from SD card but uses distro from eMMC

Hello,

I have a custom board which I’m trying to port the Beaglebone Black distribution to. The differences between the board and the BBB are:

  • SD card presence signal has inverted polarity (active high)
  • no EEPROM on the board
  • different PMIC chip: TPS65910 instead of TPS65217.

I’ve successfully patched the U-Boot based on v2022.04-bbb.io-am335x-am57xx branch. It boots and starts the kernel. The kernel is built according to Debian: Getting Started with the BeagleBone Black and I used origin/ti-linux-4.19.y branch of https://github.com/RobertCNelson/bb-kernel.

The kernel sources are not changed, the only thing I added is new device tree (and one line in Makefile to make it build).

Here’s my device tree (slightly changed am335x-boneblack-uboot-univ.dts):

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (C) 2012 Texas Instruments Incorporated - https://www.ti.com/
 */
/dts-v1/;

#include "am33xx.dtsi"
#include "am335x-bone-common.dtsi"
#include "am335x-bone-common-univ.dtsi"
#include "bbb-bone-buses.dtsi"

/ {
	model = "TI AM335x BeagleBone Black";
	compatible = "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx";

	chosen {
		base_dtb = "am335x-evolve-uboot-univ.dts";
		base_dtb_timestamp = __TIMESTAMP__;
	};

	vbat: fixedregulator@0 {
		compatible = "regulator-fixed";
		regulator-name = "vbat";
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		regulator-boot-on;
	};

	cpus {
		cpu@0 {
			cpu0-supply = <&vdd1_reg>;
		};
	};
};

&i2c0 {
        /delete-node/ tps@24;
	tps: tps@2d {
		reg = <0x2d>;
	};
};

&cpu0_opp_table {
	/*
	 * All PG 2.0 silicon may not support 1GHz but some of the early
	 * BeagleBone Blacks have PG 2.0 silicon which is guaranteed
	 * to support 1GHz OPP so enable it for PG 2.0 on this board.
	 */
	oppnitro-1000000000 {
		opp-supported-hw = <0x06 0x0100>;
	};
};

&mmc1 {
	vmmc-supply = <&vmmc_reg>;
	cd-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
};

#include "tps65910.dtsi"

&tps {
	vcc1-supply = <&vbat>;
	vcc2-supply = <&vbat>;
	vcc3-supply = <&vbat>;
	vcc4-supply = <&vbat>;
	vcc5-supply = <&vbat>;
	vcc6-supply = <&vbat>;
	vcc7-supply = <&vbat>;
	vccio-supply = <&vbat>;

	regulators {
		vrtc_reg: regulator@0 {
			regulator-always-on;
		};

		vio_reg: regulator@1 {
			regulator-always-on;
		};

		vdd1_reg: regulator@2 {
			/* VDD_MPU voltage limits 0.95V - 1.26V with +/-4% tolerance */
			regulator-name = "vdd_mpu";
			regulator-min-microvolt = <912500>;
			regulator-max-microvolt = <1351500>;
			regulator-boot-on;
			regulator-always-on;
		};

		vdd2_reg: regulator@3 {
			/* VDD_CORE voltage limits 0.95V - 1.1V with +/-4% tolerance */
			regulator-name = "vdd_core";
			regulator-min-microvolt = <912500>;
			regulator-max-microvolt = <1150000>;
			regulator-boot-on;
			regulator-always-on;
		};

		vdd3_reg: regulator@4 {
			regulator-always-on;
		};

		vdig1_reg: regulator@5 {
			regulator-always-on;
		};

		vdig2_reg: regulator@6 {
			regulator-always-on;
		};

		vpll_reg: regulator@7 {
			regulator-always-on;
		};

		vdac_reg: regulator@8 {
			regulator-always-on;
		};

		vaux1_reg: regulator@9 {
			regulator-always-on;
		};

		vaux2_reg: regulator@10 {
			regulator-always-on;
		};

		vaux33_reg: regulator@11 {
			regulator-always-on;
		};

		vmmc_reg: regulator@12 {
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <3300000>;
			regulator-always-on;
		};
	};
};

The final image is built with the help of GitHub - beagleboard/image-builder: Image builder.

Here’s my uEnv.txt:

#Docs: http://elinux.org/Beagleboard:U-boot_partitioning_layout_2.0

uname_r=4.19.94-ti-r73
#uuid=
#dtb=

###U-Boot Overlays###
###Documentation: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Overlays
###Master Enable
enable_uboot_overlays=1
###
###Overide capes with eeprom
#uboot_overlay_addr0=<file0>.dtbo
#uboot_overlay_addr1=<file1>.dtbo
#uboot_overlay_addr2=<file2>.dtbo
#uboot_overlay_addr3=<file3>.dtbo
###
###Additional custom capes
#uboot_overlay_addr4=<file4>.dtbo
#uboot_overlay_addr5=<file5>.dtbo
#uboot_overlay_addr6=<file6>.dtbo
#uboot_overlay_addr7=<file7>.dtbo
###
###Custom Cape
#dtb_overlay=<file8>.dtbo
###
###Disable auto loading of virtual capes (emmc/video/wireless/adc)
#disable_uboot_overlay_emmc=1
#disable_uboot_overlay_video=1
#disable_uboot_overlay_audio=1
#disable_uboot_overlay_wireless=1
#disable_uboot_overlay_adc=1
###
###PRUSS OPTIONS
###pru_rproc (4.14.x-ti kernel)
#uboot_overlay_pru=AM335X-PRU-RPROC-4-14-TI-00A0.dtbo
###pru_rproc (4.19.x-ti kernel)
uboot_overlay_pru=AM335X-PRU-RPROC-4-19-TI-00A0.dtbo
###pru_uio (4.14.x-ti, 4.19.x-ti & mainline/bone kernel)
#uboot_overlay_pru=AM335X-PRU-UIO-00A0.dtbo
###
###Cape Universal Enable
enable_uboot_cape_universal=1
###
###Debug: disable uboot autoload of Cape
#disable_uboot_overlay_addr0=1
#disable_uboot_overlay_addr1=1
#disable_uboot_overlay_addr2=1
#disable_uboot_overlay_addr3=1
###
###U-Boot fdt tweaks... (60000 = 384KB)
#uboot_fdt_buffer=0x60000
###U-Boot Overlays###

console=ttyS0,115200n8
cmdline=coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet

#In the event of edid real failures, uncomment this next line:
#cmdline=coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet video=HDMI-A-1:1024x768@60e

#Use an overlayfs on top of a read-only root filesystem:
#cmdline=coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet overlayroot=tmpfs

##enable Generic eMMC Flasher:
#cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh

Here’s my dmesg output:

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.19.94-ti-r73 (azarubkin@ubuntu-2004-vm) (gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)) #1xross SMP PREEMPT Thu Sep 22 16:57:00 MSK 2022
[    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: TI AM335x BeagleBone Black
[    0.000000] Memory policy: Data cache writeback
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] cma: Reserved 48 MiB at 0x9c800000
[    0.000000] On node 0 totalpages: 130560
[    0.000000]   Normal zone: 1148 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 130560 pages, LIFO batch:31
[    0.000000] CPU: All CPU(s) started in SVC mode.
[    0.000000] AM335X ES2.1 (sgx neon)
[    0.000000] random: get_random_bytes called from start_kernel+0xb0/0x4d0 with crng_init=0
[    0.000000] percpu: Embedded 17 pages/cpu s38988 r8192 d22452 u69632
[    0.000000] pcpu-alloc: s38988 r8192 d22452 u69632 alloc=17*4096
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 129412
[    0.000000] Kernel command line: console=ttyS0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 438116K/522240K available (13312K kernel code, 1141K rwdata, 4384K rodata, 1024K init, 350K bss, 34972K reserved, 49152K cma-reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
                   vector  : 0xffff0000 - 0xffff1000   (   4 kB)
                   fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
                   vmalloc : 0xe0000000 - 0xff800000   ( 504 MB)
                   lowmem  : 0xc0000000 - 0xdfe00000   ( 510 MB)
                   pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
                   modules : 0xbf000000 - 0xbfe00000   (  14 MB)
                     .text : 0x(ptrval) - 0x(ptrval)   (14304 kB)
                     .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
                     .data : 0x(ptrval) - 0x(ptrval)   (1142 kB)
                      .bss : 0x(ptrval) - 0x(ptrval)   ( 351 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] ftrace: allocating 42206 entries in 124 pages
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] rcu: 	RCU restricting CPUs from NR_CPUS=2 to nr_cpu_ids=1.
[    0.000000] 	Tasks RCU enabled.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] IRQ: Found an INTC at 0x(ptrval) (revision 5.0) with 128 interrupts
[    0.000000] OMAP clockevent source: timer2 at 24000000 Hz
[    0.000024] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000045] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000056] OMAP clocksource: timer1 at 24000000 Hz
[    0.002217] timer_probe: no matching timers found
[    0.002574] Console: colour dummy device 80x30
[    0.002655] Calibrating delay loop (skipped) preset value.. 995.32 BogoMIPS (lpj=1990656)
[    0.002672] pid_max: default: 32768 minimum: 301
[    0.002958] Security Framework initialized
[    0.002973] Yama: becoming mindful.
[    0.003117] AppArmor: AppArmor initialized
[    0.003226] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.003239] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.004354] CPU: Testing write buffer coherency: ok
[    0.004421] CPU0: Spectre v2: using BPIALL workaround
[    0.004918] CPU0: thread -1, cpu 0, socket -1, mpidr 0
[    0.029242] Setting up static identity map for 0x80100000 - 0x80100060
[    0.037149] rcu: Hierarchical SRCU implementation.
[    0.048395] EFI services will not be available.
[    0.053156] smp: Bringing up secondary CPUs ...
[    0.053169] smp: Brought up 1 node, 1 CPU
[    0.053181] SMP: Total of 1 processors activated (995.32 BogoMIPS).
[    0.053187] CPU: All CPU(s) started in SVC mode.
[    0.054926] devtmpfs: initialized
[    0.089558] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[    0.090199] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.090228] futex hash table entries: 256 (order: 2, 16384 bytes)
[    0.094205] xor: automatically using best checksumming function   neon      
[    0.094222] pinctrl core: initialized pinctrl subsystem
[    0.095575] NET: Registered protocol family 16
[    0.100808] DMA: preallocated 1024 KiB pool for atomic coherent allocations
[    0.195762] l4_wkup_cm:clk:0010:0: failed to disable
[    0.248222] audit: initializing netlink subsys (disabled)
[    0.253259] audit: type=2000 audit(0.240:1): state=initialized audit_enabled=0 res=1
[    0.257359] OMAP GPIO hardware version 0.1
[    0.284523] hw-breakpoint: debug architecture 0x4 unsupported.
[    0.313308] raid6: using algorithm neonx8 gen() 0 MB/s
[    0.313322] raid6: .... xor() 0 MB/s, rmw enabled
[    0.313329] raid6: using neon recovery algorithm
[    0.321691] edma 49000000.edma: TI EDMA DMA engine driver
[    0.329537] SCSI subsystem initialized
[    0.333285] libata version 3.00 loaded.
[    0.333621] usbcore: registered new interface driver usbfs
[    0.333679] usbcore: registered new interface driver hub
[    0.333799] usbcore: registered new device driver usb
[    0.335956] omap_i2c 4802a000.i2c: bus 1 rev0.11 at 100 kHz
[    0.337560] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 100 kHz
[    0.338221] pps_core: LinuxPPS API ver. 1 registered
[    0.338229] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.338255] PTP clock support registered
[    0.339173] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
[    0.341571] Advanced Linux Sound Architecture Driver Initialized.
[    0.342429] NetLabel: Initializing
[    0.342441] NetLabel:  domain hash size = 128
[    0.342445] NetLabel:  protocols = UNLABELED CIPSOv4 CALIPSO
[    0.342539] NetLabel:  unlabeled traffic allowed by default
[    0.343628] clocksource: Switched to clocksource timer1
[    0.499695] VFS: Disk quotas dquot_6.6.0
[    0.499810] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.500692] AppArmor: AppArmor Filesystem Enabled
[    0.513880] NET: Registered protocol family 2
[    0.514916] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)
[    0.514952] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.514995] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
[    0.515053] TCP: Hash tables configured (established 4096 bind 4096)
[    0.515193] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.515217] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.515570] NET: Registered protocol family 1
[    0.528962] RPC: Registered named UNIX socket transport module.
[    0.528974] RPC: Registered udp transport module.
[    0.528979] RPC: Registered tcp transport module.
[    0.528984] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.529863] Unpacking initramfs...
[    0.947092] Freeing initrd memory: 7252K
[    0.948116] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
[    0.951384] Initialise system trusted keyrings
[    0.951929] workingset: timestamp_bits=14 max_order=17 bucket_order=3
[    0.959162] zbud: loaded
[    0.966687] NFS: Registering the id_resolver key type
[    0.966729] Key type id_resolver registered
[    0.966735] Key type id_legacy registered
[    0.966753] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.967128] fuse init (API version 7.27)
[    0.977752] Key type asymmetric registered
[    0.977766] Asymmetric key parser 'x509' registered
[    0.977871] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[    0.982239] io scheduler noop registered
[    0.982250] io scheduler deadline registered
[    0.982566] io scheduler cfq registered (default)
[    0.982576] io scheduler mq-deadline registered
[    0.986622] pinctrl-single 44e10800.pinmux: 142 pins, size 568
[    1.000209] gpio-of-helper ocp:cape-universal: ready
[    1.014765] Serial: 8250/16550 driver, 6 ports, IRQ sharing disabled
[    1.015687] random: fast init done
[    1.018518] console [ttyS0] disabled
[    1.018625] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 30, base_baud = 3000000) is a 8250
[    1.028775] console [ttyS0] enabled
[    1.029946] 48022000.serial: ttyS1 at MMIO 0x48022000 (irq = 31, base_baud = 3000000) is a 8250
[    1.030973] 48024000.serial: ttyS2 at MMIO 0x48024000 (irq = 32, base_baud = 3000000) is a 8250
[    1.032098] 481a6000.serial: ttyS3 at MMIO 0x481a6000 (irq = 33, base_baud = 3000000) is a 8250
[    1.033115] 481a8000.serial: ttyS4 at MMIO 0x481a8000 (irq = 34, base_baud = 3000000) is a 8250
[    1.034073] 481aa000.serial: ttyS5 at MMIO 0x481aa000 (irq = 35, base_baud = 3000000) is a 8250
[    1.038004] omap_rng 48310000.rng: Random Number Generator ver. 20
[    1.039118] sdhci: Secure Digital Host Controller Interface driver
[    1.039127] sdhci: Copyright(c) Pierre Ossman
[    1.039912] omap_gpio 44e07000.gpio: Could not set line 6 debounce to 200000 microseconds (-22)
[    1.039926] omap_hsmmc 48060000.mmc: Got CD GPIO
[    1.041463] omap_hsmmc 481d8000.mmc: Linked as a consumer to regulator.1
[    1.042149] random: crng init done
[    1.068038] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.106682] mmc0: new high speed MMC card at address 0001
[    1.112266] mmcblk0: mmc0:0001 4FTE4R 3.64 GiB 
[    1.112902] mmcblk0boot0: mmc0:0001 4FTE4R partition 1 4.00 MiB
[    1.113513] mmcblk0boot1: mmc0:0001 4FTE4R partition 2 4.00 MiB
[    1.113881] mmcblk0rpmb: mmc0:0001 4FTE4R partition 3 512 KiB, chardev (245:0)
[    1.119547]  mmcblk0: p1
[    2.087651] omap_i2c 4819c000.i2c: timeout waiting for bus ready
[    3.095634] omap_i2c 4819c000.i2c: timeout waiting for bus ready
[    4.103639] omap_i2c 4819c000.i2c: timeout waiting for bus ready
[    5.111634] omap_i2c 4819c000.i2c: timeout waiting for bus ready
[    6.119635] omap_i2c 4819c000.i2c: timeout waiting for bus ready
[    7.127632] omap_i2c 4819c000.i2c: timeout waiting for bus ready
[    8.135633] omap_i2c 4819c000.i2c: timeout waiting for bus ready
[    9.143632] omap_i2c 4819c000.i2c: timeout waiting for bus ready
[    9.145996] eqep 48300180.eqep: ver. 1.0
[    9.146263] eqep 48300180.eqep: count_mode:0
[    9.146274] eqep 48300180.eqep: invert_qa:1
[    9.146283] eqep 48300180.eqep: invert_qb:1
[    9.146292] eqep 48300180.eqep: invert_qi:0
[    9.146300] eqep 48300180.eqep: invert_qs:0
[    9.146309] eqep 48300180.eqep: swap_inputs:0
[    9.146317] eqep 48300180.eqep: QDECCTL:0x0180
[    9.146326] eqep 48300180.eqep: QPOSINIT:0x00000000
[    9.146333] eqep 48300180.eqep: QPOSMAX:0xffffffff
[    9.146341] eqep 48300180.eqep: QPOSCNT:0x00000000
[    9.146349] eqep 48300180.eqep: omit_interrupt:0
[    9.146356] eqep 48300180.eqep: QEINT:0x0800
[    9.146364] eqep 48300180.eqep: QUPRD:0x05f5e100
[    9.146371] eqep 48300180.eqep: QEPCTL:0x009e write
[    9.146378] eqep 48300180.eqep: QEPCTL:0x009e read
[    9.146406] eqep 48300180.eqep: irq:134, clk_rate:100000000
[    9.146708] eqep 48302180.eqep: ver. 1.0
[    9.146840] eqep 48302180.eqep: count_mode:0
[    9.146850] eqep 48302180.eqep: invert_qa:1
[    9.146858] eqep 48302180.eqep: invert_qb:1
[    9.146866] eqep 48302180.eqep: invert_qi:0
[    9.146874] eqep 48302180.eqep: invert_qs:0
[    9.146882] eqep 48302180.eqep: swap_inputs:0
[    9.146889] eqep 48302180.eqep: QDECCTL:0x0180
[    9.146898] eqep 48302180.eqep: QPOSINIT:0x00000000
[    9.146905] eqep 48302180.eqep: QPOSMAX:0xffffffff
[    9.146912] eqep 48302180.eqep: QPOSCNT:0x00000000
[    9.146921] eqep 48302180.eqep: omit_interrupt:0
[    9.146928] eqep 48302180.eqep: QEINT:0x0800
[    9.146935] eqep 48302180.eqep: QUPRD:0x05f5e100
[    9.146943] eqep 48302180.eqep: QEPCTL:0x009e write
[    9.146950] eqep 48302180.eqep: QEPCTL:0x009e read
[    9.146971] eqep 48302180.eqep: irq:136, clk_rate:100000000
[    9.147184] eqep 48304180.eqep: ver. 1.0
[    9.147298] eqep 48304180.eqep: count_mode:0
[    9.147308] eqep 48304180.eqep: invert_qa:1
[    9.147316] eqep 48304180.eqep: invert_qb:1
[    9.147324] eqep 48304180.eqep: invert_qi:0
[    9.147332] eqep 48304180.eqep: invert_qs:0
[    9.147340] eqep 48304180.eqep: swap_inputs:0
[    9.147348] eqep 48304180.eqep: QDECCTL:0x0180
[    9.147356] eqep 48304180.eqep: QPOSINIT:0x00000000
[    9.147363] eqep 48304180.eqep: QPOSMAX:0xffffffff
[    9.147369] eqep 48304180.eqep: QPOSCNT:0x00000000
[    9.147378] eqep 48304180.eqep: omit_interrupt:0
[    9.147384] eqep 48304180.eqep: QEINT:0x0800
[    9.147391] eqep 48304180.eqep: QUPRD:0x05f5e100
[    9.147398] eqep 48304180.eqep: QEPCTL:0x009e write
[    9.147405] eqep 48304180.eqep: QEPCTL:0x009e read
[    9.147424] eqep 48304180.eqep: irq:138, clk_rate:100000000
[    9.237845] libphy: Fixed MDIO Bus: probed
[    9.238822] CAN device driver interface
[    9.240549] c_can_platform 481cc000.can: c_can_platform device registered (regs=37c33da9, irq=42)
[    9.241783] c_can_platform 481d0000.can: c_can_platform device registered (regs=16fd8e9f, irq=43)
[    9.299737] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6, bus freq 1000000
[    9.299753] davinci_mdio 4a101000.mdio: detected phy mask fffffffe
[    9.300741] MDIO: davinci_mdio: dt: updated phy_id[0] from phy_mask[fffffffe]
[    9.319346] libphy: 4a101000.mdio: probed
[    9.319377] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver SMSC LAN8710/LAN8720
[    9.320890] cpsw 4a100000.ethernet: Detected MACID = 48:70:1e:f9:1e:06
[    9.321066] cpsw 4a100000.ethernet: initialized cpsw ale version 1.4
[    9.321077] cpsw 4a100000.ethernet: ALE Table size 1024
[    9.321120] cpsw 4a100000.ethernet: cpts: overflow check period 1250 (jiffies)
[    9.323400] usbcore: registered new interface driver smsc95xx
[    9.325725] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    9.325798] ehci-platform: EHCI generic platform driver
[    9.326232] ehci-omap: OMAP-EHCI Host Controller driver
[    9.327307] usbcore: registered new interface driver usb-storage
[    9.331279] am335x-phy-driver 47401300.usb-phy: 47401300.usb-phy supply vcc not found, using dummy regulator
[    9.331474] am335x-phy-driver 47401300.usb-phy: Linked as a consumer to regulator.0
[    9.332159] OF: /ocp/usb@47400000/usb@47401000: could not get #interrupt-cells for /ocp/i2c@44e0b000/tps@2d
[    9.343130] OF: /ocp/usb@47400000/usb@47401000: could not get #interrupt-cells for /ocp/i2c@44e0b000/tps@2d
[    9.357570] am335x-phy-driver 47401b00.usb-phy: 47401b00.usb-phy supply vcc not found, using dummy regulator
[    9.357769] am335x-phy-driver 47401b00.usb-phy: Linked as a consumer to regulator.0
[    9.361212] musb-hdrc musb-hdrc.1: MUSB HDRC host driver
[    9.361255] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 1
[    9.361599] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.19
[    9.361610] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    9.361618] usb usb1: Product: MUSB HDRC host driver
[    9.361625] usb usb1: Manufacturer: Linux 4.19.94-ti-r73 musb-hcd
[    9.361633] usb usb1: SerialNumber: musb-hdrc.1
[    9.362469] hub 1-0:1.0: USB hub found
[    9.362546] hub 1-0:1.0: 1 port detected
[    9.374924] omap_rtc 44e3e000.rtc: already running
[    9.375767] omap_rtc 44e3e000.rtc: registered as rtc0
[    9.377565] i2c /dev entries driver
[    9.382222] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
[    9.382935] softdog: initialized. soft_noboot=0 soft_margin=60 sec soft_panic=0 (nowayout=0)
[    9.388085] ledtrig-cpu: registered to indicate activity on CPUs
[    9.388694] omap-aes 53500000.aes: OMAP AES hw accel rev: 3.2
[    9.389059] omap-aes 53500000.aes: will run requests pump with realtime priority
[    9.392161] omap-sham 53100000.sham: hw accel on OMAP rev 4.3
[    9.396430] hidraw: raw HID events driver (C) Jiri Kosina
[    9.404975] gnss: GNSS driver registered with major 242
[    9.413097] NET: Registered protocol family 10
[    9.484381] Segment Routing with IPv6
[    9.484522] mip6: Mobile IPv6
[    9.484680] NET: Registered protocol family 17
[    9.484710] can: controller area network core (rev 20170425 abi 9)
[    9.484816] NET: Registered protocol family 29
[    9.484918] 8021q: 802.1Q VLAN Support v1.8
[    9.485006] Key type dns_resolver registered
[    9.485012] mpls_gso: MPLS GSO support
[    9.485322] ThumbEE CPU extension supported.
[    9.485340] Registering SWP/SWPB emulation handler
[    9.485351] omap_voltage_late_init: Voltage driver support not added
[    9.493616] registered taskstats version 1
[    9.493626] Loading compiled-in X.509 certificates
[    9.493760] zswap: loaded using pool lzo/zbud
[    9.497269] Btrfs loaded, crc32c=crc32c-generic
[    9.497397] AppArmor: AppArmor sha1 policy hashing enabled
[    9.540070] at24 0-0050: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
[    9.540575] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
[    9.541631] omap_gpio 44e07000.gpio: Could not set line 6 debounce to 200000 microseconds (-22)
[    9.541644] omap_hsmmc 48060000.mmc: Got CD GPIO
[    9.548907] omap_gpio 44e07000.gpio: Could not set line 6 debounce to 200000 microseconds (-22)
[    9.548924] omap_hsmmc 48060000.mmc: Got CD GPIO
[    9.552063] omap_rtc 44e3e000.rtc: setting system clock to 2022-09-23 09:33:20 UTC (1663925600)
[    9.553596] ALSA device list:
[    9.553606]   No soundcards found.
[    9.560585] Freeing unused kernel memory: 1024K
[    9.561311] Run /init as init process
[   12.985019] omap_gpio 44e07000.gpio: Could not set line 6 debounce to 200000 microseconds (-22)
[   12.985036] omap_hsmmc 48060000.mmc: Got CD GPIO
[   12.993237] omap_gpio 44e07000.gpio: Could not set line 6 debounce to 200000 microseconds (-22)
[   12.993255] omap_hsmmc 48060000.mmc: Got CD GPIO
[   13.002831] omap_gpio 44e07000.gpio: Could not set line 6 debounce to 200000 microseconds (-22)
[   13.002849] omap_hsmmc 48060000.mmc: Got CD GPIO
[   13.009345] omap_gpio 44e07000.gpio: Could not set line 6 debounce to 200000 microseconds (-22)
[   13.009362] omap_hsmmc 48060000.mmc: Got CD GPIO
[   18.848967] EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts: (null)
[   19.495939] systemd[1]: systemd 241 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid)
[   19.496715] systemd[1]: Detected architecture arm.
[   19.515272] systemd[1]: Set hostname to <beaglebone>.
[   20.916503] systemd[1]: Listening on Journal Audit Socket.
[   20.922193] systemd[1]: Created slice User and Session Slice.
[   20.923342] systemd[1]: Listening on fsck to fsckd communication Socket.
[   20.924347] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[   20.928898] systemd[1]: Created slice system-serial\x2dgetty.slice.
[   20.930946] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[   20.931566] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[   22.336737] EXT4-fs (mmcblk0p1): re-mounted. Opts: errors=remount-ro
[   23.204762] systemd-journald[568]: Received request to flush runtime journal from PID 1
[   29.060208] net eth0: initializing cpsw version 1.12 (0)
[   29.133102] SMSC LAN8710/LAN8720 4a101000.mdio:00: attached PHY driver [SMSC LAN8710/LAN8720] (mii_bus:phy_addr=4a101000.mdio:00, irq=POLL)
[   29.149069] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   29.149090] 8021q: adding VLAN 0 to HW filter on device eth0
[   31.443203] using random self ethernet address
[   31.443222] using random host ethernet address
[   31.853129] using random self ethernet address
[   31.853148] using random host ethernet address
[   32.030323] usb0: HOST MAC 48:70:1e:f9:1e:09
[   32.030642] usb0: MAC 48:70:1e:f9:1e:08
[   32.043991] usb1: HOST MAC 48:70:1e:f9:1e:0b
[   32.044149] usb1: MAC 48:70:1e:f9:1e:0c
[   32.200859] cpsw 4a100000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
[   32.200950] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   32.297616] IPv6: ADDRCONF(NETDEV_UP): usb0: link is not ready
[   32.451898] IPv6: ADDRCONF(NETDEV_UP): usb1: link is not ready
[   39.911810] vbat: disabling
[   41.653827] omap_gpio 44e07000.gpio: Could not set line 6 debounce to 200000 microseconds (-22)
[   41.653849] omap_hsmmc 48060000.mmc: Got CD GPIO
[   44.795541] remoteproc remoteproc0: wkup_m3 is available
[   44.822087] omap_gpio 44e07000.gpio: Could not set line 6 debounce to 200000 microseconds (-22)
[   44.822108] omap_hsmmc 48060000.mmc: Got CD GPIO
[   44.849641] remoteproc remoteproc0: powering up wkup_m3
[   44.849676] remoteproc remoteproc0: Booting fw image am335x-pm-firmware.elf, size 217148
[   44.849956] remoteproc remoteproc0: remote processor wkup_m3 is now up
[   44.849988] wkup_m3_ipc 44e11324.wkup_m3_ipc: CM3 Firmware Version = 0x192
[   44.851408] omap_gpio 44e07000.gpio: Could not set line 6 debounce to 200000 microseconds (-22)
[   44.851425] omap_hsmmc 48060000.mmc: Got CD GPIO
[   44.974110] PM: bootloader does not support rtc-only!
[   44.975356] omap_gpio 44e07000.gpio: Could not set line 6 debounce to 200000 microseconds (-22)
[   44.975373] omap_hsmmc 48060000.mmc: Got CD GPIO
[   45.980282] omap_gpio 44e07000.gpio: Could not set line 6 debounce to 200000 microseconds (-22)
[   45.980304] omap_hsmmc 48060000.mmc: Got CD GPIO
[   46.139133] omap_gpio 44e07000.gpio: Could not set line 6 debounce to 200000 microseconds (-22)
[   46.139154] omap_hsmmc 48060000.mmc: Got CD GPIO
[   46.195022] remoteproc remoteproc1: 4a334000.pru is available
[   46.195217] pru-rproc 4a334000.pru: PRU rproc node pru@4a334000 probed successfully
[   46.196542] omap_gpio 44e07000.gpio: Could not set line 6 debounce to 200000 microseconds (-22)
[   46.196560] omap_hsmmc 48060000.mmc: Got CD GPIO
[   46.216133] remoteproc remoteproc2: 4a338000.pru is available
[   46.216336] pru-rproc 4a338000.pru: PRU rproc node pru@4a338000 probed successfully
[   46.217465] omap_gpio 44e07000.gpio: Could not set line 6 debounce to 200000 microseconds (-22)
[   46.217478] omap_hsmmc 48060000.mmc: Got CD GPIO

Hi @me21, please post your serial boot log from power on to login…

I need info to answer your question why.

“AM335x board starts kernel from SD card but uses distro from eMMC”

Regards,

Sure thing. Please note the kernel boot log is not captured here except a few lines. I don’t know why. But I think you can view the kernel messages in my dmesg output I posted earlier. As for the U-Boot output, it’s all here. The lines like spl_start_uboot enter are my diagnostic messages I added to the U-Boot to monitor the code execution.

U-Boot SPL 2022.04-00044-g0816cfd5f6-dirty (Sep 22 2022 - 11:48:33 +0300)
Trying to boot from MMC1
spl_start_uboot enter
spl_start_uboot exit


U-Boot 2022.04-00044-g0816cfd5f6-dirty (Sep 22 2022 - 11:48:33 +0300)

CPU  : AM335X-GP rev 2.1
Model: TI AM335x EVOLVE
DRAM:  512 MiB
board_init enter
Reset Source: Power-on reset has occurred.
RTC 32KCLK Source: Internal.
board_init exit
Core:  147 devices, 14 uclasses, devicetree: separate
WDT:   Started wdt@44e35000 with servicing (60s timeout)
MMC:   OMAP SD/MMC: 0
Loading Environment from EXT4... ** File not found /boot/uboot.env **

** Unable to read "/boot/uboot.env" from mmc0:1 **
board_late_init enter
Model: Evolve
<ethaddr> not set. Validating first E-fuse MAC
board_late_init exit
Net:   Could not get PHY for ethernet@4a100000: addr 0
eth2: ethernet@4a100000, eth3: usb_ether
Press SPACE to abort autoboot in 0 seconds
board_name=[EVOLVE] ...
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
Couldn't find partition 0:2 0x82000000
Can't set block device
Couldn't find partition 0:2 0x82000000
Can't set block device
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Scanning disk mmc@48060000.blk...
Found 2 disks
No EFI system partition
ft_board_setup enter
ft_board_setup exit
BootOrder not defined
EFI boot manager: Cannot load any image
gpio: pin 56 (gpio 56) value is 0
gpio: pin 55 (gpio 55) value is 0
gpio: pin 54 (gpio 54) value is 0
gpio: pin 53 (gpio 53) value is 1
switch to partitions #0, OK
mmc0 is current device
gpio: pin 54 (gpio 54) value is 1
Checking for: /uEnv.txt ...
Checking for: /boot/uEnv.txt ...
gpio: pin 55 (gpio 55) value is 1
2023 bytes read in 3 ms (658.2 KiB/s)
Loaded environment from /boot/uEnv.txt
Checking if uname_r is set in /boot/uEnv.txt...
gpio: pin 56 (gpio 56) value is 1
Running uname_boot ...
loading /boot/vmlinuz-4.19.94-ti-r73 ...
10170880 bytes read in 649 ms (14.9 MiB/s)
debug: [enable_uboot_overlays=1] ...
debug: [enable_uboot_cape_universal=1] ...
debug: [uboot_base_dtb_univ=am335x-evolve-uboot-univ.dtb] ...
uboot_overlays: [uboot_base_dtb=am335x-evolve-uboot-univ.dtb] ...
uboot_overlays: Switching too: dtb=am335x-evolve-uboot-univ.dtb ...
loading /boot/dtbs/4.19.94-ti-r73/am335x-evolve-uboot-univ.dtb ...
168554 bytes read in 16 ms (10 MiB/s)
Unknown command 'extension' - try 'help'
uboot_overlays: [fdt_buffer=0x60000] ...
uboot_overlays: loading /boot/dtbs/4.19.94-ti-r73/overlays/BB-ADC-00A0.dtbo ...
645 bytes read in 7 ms (89.8 KiB/s)
uboot_overlays: loading /boot/dtbs/4.19.94-ti-r73/overlays/BB-BONE-eMMC1-01-00A0.dtbo ...
1605 bytes read in 7 ms (223.6 KiB/s)
uboot_overlays: loading /boot/dtbs/4.19.94-ti-r73/overlays/AM335X-PRU-RPROC-4-19-TI-00A0.dtbo ...
3627 bytes read in 9 ms (393.6 KiB/s)
loading /boot/initrd.img-4.19.94-ti-r73 ...
7425390 bytes read in 477 ms (14.8 MiB/s)
debug: [console=ttyS0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet] ...
debug: [bootz 0x82000000 0x88080000:714d6e 88000000] ...
Kernel image @ 0x82000000 [ 0x000000 - 0x9b3200 ]
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
   Loading Ramdisk to 8f8eb000, end 8ffffd6e ... OK
   Loading Device Tree to 8f85e000, end 8f8eafff ... OK
ft_board_setup enter
ft_board_setup exit

Starting kernel ...

[    0.002211] timer_probe: no matching timers found
[    0.191598] l4_wkup_cm:clk:0010:0: failed to disable
[    9.324184] OF: /ocp/usb@47400000/usb@47401000: could not get #interrupt-cells for /ocp/i2c@44e0b000/tps@2d
[    9.335145] OF: /ocp/usb@47400000/usb@47401000: could not get #interrupt-cells for /ocp/i2c@44e0b000/tps@2d
[    9.476945] omap_voltage_late_init: Voltage driver support not added

Debian GNU/Linux 10 beaglebone ttyS0

BeagleBoard.org Debian Buster Console Image 2022-06-24
Support: https://bbb.io/debian
default username:password is [debian:temppwd]

beaglebone login: [   45.256485] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle

beaglebone login: 
beaglebone login: debian
Password: 
Last login: Fri Sep 23 09:45:48 UTC 2022 from 192.168.1.104 on pts/0

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
debian@beaglebone:~$ 

I fixed it by adding a new fixed regulator to my / root node and setting mmc1.vmmc-supply to it.
Now the SD card is detected.
But why? What’s going on here?..

Here’s my new device tree:

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (C) 2012 Texas Instruments Incorporated - https://www.ti.com/
 */
/dts-v1/;

#include "am33xx.dtsi"
#include "am335x-bone-common.dtsi"
#include "am335x-bone-common-univ.dtsi"
#include "bbb-bone-buses.dtsi"

/ {
	model = "TI AM335x BeagleBone Black";
	compatible = "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx";

	chosen {
		base_dtb = "am335x-evolve-uboot-univ.dts";
		base_dtb_timestamp = __TIMESTAMP__;
	};

	vbat: fixedregulator@0 {
		compatible = "regulator-fixed";
		regulator-name = "vbat";
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		regulator-boot-on;
	};

        vmmcsd_fixed: fixedregulator0 {
                compatible = "regulator-fixed";
                regulator-name = "vmmcsd_fixed";
                regulator-min-microvolt = <3300000>;
                regulator-max-microvolt = <3300000>;
        };

	cpus {
		cpu@0 {
			cpu0-supply = <&vdd1_reg>;
		};
	};
};

&i2c0 {
        /delete-node/ tps@24;
	tps: tps@2d {
		reg = <0x2d>;
	};
};

&cpu0_opp_table {
	/*
	 * All PG 2.0 silicon may not support 1GHz but some of the early
	 * BeagleBone Blacks have PG 2.0 silicon which is guaranteed
	 * to support 1GHz OPP so enable it for PG 2.0 on this board.
	 */
	oppnitro-1000000000 {
		opp-supported-hw = <0x06 0x0100>;
	};
};

&mmc1 {
	vmmc-supply = <&vmmcsd_fixed>;
	cd-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
};

#include "tps65910.dtsi"

&tps {
	vcc1-supply = <&vbat>;
	vcc2-supply = <&vbat>;
	vcc3-supply = <&vbat>;
	vcc4-supply = <&vbat>;
	vcc5-supply = <&vbat>;
	vcc6-supply = <&vbat>;
	vcc7-supply = <&vbat>;
	vccio-supply = <&vbat>;

	regulators {
		vrtc_reg: regulator@0 {
			regulator-always-on;
		};

		vio_reg: regulator@1 {
			regulator-always-on;
		};

		vdd1_reg: regulator@2 {
			/* VDD_MPU voltage limits 0.95V - 1.26V with +/-4% tolerance */
			regulator-name = "vdd_mpu";
			regulator-min-microvolt = <912500>;
			regulator-max-microvolt = <1351500>;
			regulator-boot-on;
			regulator-always-on;
		};

		vdd2_reg: regulator@3 {
			/* VDD_CORE voltage limits 0.95V - 1.1V with +/-4% tolerance */
			regulator-name = "vdd_core";
			regulator-min-microvolt = <912500>;
			regulator-max-microvolt = <1150000>;
			regulator-boot-on;
			regulator-always-on;
		};

		vdd3_reg: regulator@4 {
			regulator-always-on;
		};

		vdig1_reg: regulator@5 {
			regulator-always-on;
		};

		vdig2_reg: regulator@6 {
			regulator-always-on;
		};

		vpll_reg: regulator@7 {
			regulator-always-on;
		};

		vdac_reg: regulator@8 {
			regulator-always-on;
		};

		vaux1_reg: regulator@9 {
			regulator-always-on;
		};

		vaux2_reg: regulator@10 {
			regulator-always-on;
		};

		vaux33_reg: regulator@11 {
			regulator-always-on;
		};

		vmmc_reg: regulator@12 {
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <3300000>;
			regulator-always-on;
		};
	};
};

Okay, I even realized it was already defined in am335x-bone-common.dtsi, so it should be enough just to change vmmc-supply property of mmc1
Could you please explain why does it matter?

I agree, it’s already defined.

Thus if it doesn’t work unless you add it to your *.dts, you should recheck your device-tree git tree…

Regards,

No, it works without adding. Thank you! I only wanted to know what’s going on, why does it work this way?