This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LINUXSDK-OMAPL138: Linux Kernel stuck at -->Waiting for root device PARTUUID=22e9258b-02... and nand flash not detected in linux

Part Number: LINUXSDK-OMAPL138
Other Parts Discussed in Thread: OMAPL138, AM1808, OMAP-L138, DA8XX, TPS650250, TLV320AIC3106, THS8135, OMAP-L132

Hi

    Iam having problem with my custom board,while booting it hangs on Waiting for root device PARTUUID=22e9258b-02...

it seems the kernel didnt find my memory card file system

i have checked all the below mentioned pheripherals with bare metal code all seems to work

1,OMAPl138 jtag test

2,DDR

3,ETHERNET phy

4,USB

5,UART console

6,emif with fpga

7,emif with 8 bit nand

8,SD card slot with the card detect pin changed to gpio[1] instead of gpio[0]  

but when i run linux with latest processor sdk provided it hangs at  Waiting for root device PARTUUID=22e9258b-02...

i have given below the complete linux boot prompt below 

U-Boot SPL 2019.01-g333c3e72d3 (Apr 19 2020 - 06:43:52 +0000)
Trying to boot from MMC1


U-Boot 2019.01-g333c3e72d3 (Apr 19 2020 - 06:43:52 +0000)

Model: DA850/AM1808/OMAP-L138 LCDK
DRAM: 128 MiB
NAND: 0 MiB
MMC: da830-mmc: 0
Loading Environment from NAND... *** Warning - readenv() failed, using default environment

In: serial@10d000
Out: serial@10d000
Err: serial@10d000
Invalid MAC address read.
Net: DaVinci-EMAC
Warning: DaVinci-EMAC (eth0) using random MAC address - 76:c5:cb:38:0b:ed

Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
** Unable to read file boot.scr **
** Unable to read file uEnv.txt **
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
3472184 bytes read in 885 ms (3.7 MiB/s)
19902 bytes read in 6 ms (3.2 MiB/s)
## Flattened Device Tree blob at c0600000
Booting using the fdt blob at 0xc0600000
Loading Device Tree to c7e18000, end c7e1fdbd ... OK

Starting kernel ...

Booting Linux on physical CPU 0x0
Linux version 4.19.94-gbe5389fd85 (oe-user@oe-host) (gcc version 8.2.0 (GCC)) #1 PREEMPT Sun Apr 19 03:31:00 UTC 2020
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
CPU: VIVT data cache, VIVT instruction cache
OF: fdt: Machine model: DA850/AM1808/OMAP-L138 LCDK
Memory policy: Data cache writethrough
Reserved memory: created CMA memory pool at 0xc3000000, size 16 MiB
OF: reserved mem: initialized node dsp-memory@c3000000, compatible id shared-dma-pool
cma: Reserved 24 MiB at 0xc6400000
DaVinci da850/omap-l138/am18x variant 0x1
random: get_random_bytes called from start_kernel+0x88/0x424 with crng_init=0
Built 1 zonelists, mobility grouping on. Total pages: 32480
Kernel command line: console=ttyS2,115200n8 root=PARTUUID=22e9258b-02 rw rootfstype=ext4 rootwait
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 78944K/131072K available (6772K kernel code, 349K rwdata, 2156K rodata, 256K init, 152K bss, 11168K reserved, 40960K cma-reserved)
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
vmalloc : 0xc8800000 - 0xff800000 ( 880 MB)
lowmem : 0xc0000000 - 0xc8000000 ( 128 MB)
modules : 0xbf000000 - 0xc0000000 ( 16 MB)
.text : 0x(ptrval) - 0x(ptrval) (6774 kB)
.init : 0x(ptrval) - 0x(ptrval) ( 256 kB)
.data : 0x(ptrval) - 0x(ptrval) ( 350 kB)
.bss : 0x(ptrval) - 0x(ptrval) ( 153 kB)
SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
rcu: Preemptible hierarchical RCU implementation.
Tasks RCU enabled.
NR_IRQS: 245
clocksource: timer0_1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
Console: colour dummy device 80x30
Calibrating delay loop... 227.32 BogoMIPS (lpj=1136640)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0xc0008400 - 0xc0008458
rcu: Hierarchical SRCU implementation.
devtmpfs: initialized
VFP support v0.3: not present
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
futex hash table entries: 256 (order: -1, 3072 bytes)
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
cpuidle: using governor ladder
cpuidle: using governor menu
mux: initialized RTC_ALARM
mux: Setting register RTC_ALARM
mux: PINMUX0 (0x00000000) = 0x44080000 -> 0x24080000
gpiochip_add_data_with_key: GPIOs 0..143 (davinci_gpio.0) failed to register, -517
edma 1e30000.edma: memcpy is disabled
edma 1e30000.edma: TI EDMA DMA engine driver
vcc_3v3d: supplied by vcc_5vd
vcc_1v8d: supplied by vcc_5vd
SCSI subsystem initialized
media: Linux media interface: v0.10
videodev: Linux video capture interface: v2.00
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
PTP clock support registered
Advanced Linux Sound Architecture Driver Initialized.
clocksource: Switched to clocksource timer0_1
NET: Registered protocol family 2
tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 0, 4096 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
workingset: timestamp_bits=14 max_order=15 bucket_order=1
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)
io scheduler noop registered (default)
io scheduler mq-deadline registered
io scheduler kyber registered
pinctrl-single 1c14120.pinmux: 160 pins, size 80
Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
console [ttyS2] disabled
1d0d000.serial: ttyS2 at MMIO 0x1d0d000 (irq = 61, base_baud = 8250000) is a TI DA8xx/66AK2x
console [ttyS2] enabled
brd: module loaded
libphy: Fixed MDIO Bus: probed
davinci_mdio 1e24000.mdio: davinci mdio revision 1.5, bus freq 2200000
davinci_mdio 1e24000.mdio: detected phy mask ffffff7f
libphy: 1e24000.mdio: probed
davinci_mdio 1e24000.mdio: phy[7]: device 1e24000.mdio:07, driver SMSC LAN8710/LAN8720
i2c /dev entries driver
davinci-wdt 1c21000.wdt: heartbeat 60 sec
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
ti-aemif 68000000.aemif: cannot get clock 'aemif'
NET: Registered protocol family 10
Segment Routing with IPv6
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered protocol family 17
edma 1c00000.edma: memcpy is disabled
edma 1c00000.edma: TI EDMA DMA engine driver
davinci_mmc 1c40000.mmc: Got CD GPIO
davinci_mmc 1c40000.mmc: Using DMA, 4-bit mode
console [netcon0] enabled
netconsole: network logging started
davinci_emac 1e20000.ethernet: incompatible machine/device type for reading mac address
davinci_emac 1e20000.ethernet: using random MAC addr: aa:c8:d1:67:64:0a
input: gpio-keys as /devices/platform/gpio-keys/input/input0
hctosys: unable to open rtc device (rtc0)
ALSA device list:
No soundcards found.
Waiting for root device PARTUUID=22e9258b-02...

it seems my nand flash did not get detected ,but it also works in bare metal 

and here is my sd card slot connection details below

i did even build the device tree, it didnt work ,so please help me to solve the problem

  • I forgot to mention in omap development board(LCDK-Omapl138), The memory card has GPIO4[0] as card detect while in my custom board GPIO[1]

    and NAND flash has 16 bit data bus while mine has 8 bit data bus

    please give me some info about how to config these to run in linux

  • Hi Ramachandran,

    You are booting your board from the SD card, right?

    The kernel boot log seems showing the SD card is not detected. Since you use a different GPIO for card detect, did you modify the kernel device tree accordingly? Please provide the kernel patch showing how you modified it.

  • Hi

    I ve change this line in My da850-lcdk.dts and checked the sd card got detected

    ive changed the pin from 64 to 65 it worked, still trying to get my nand detected

    &mmc0 {
        max-frequency = <50000000>;
        bus-width = <4>;
        pinctrl-names = "default";
        pinctrl-0 = <&mmc0_pins>;
        cd-gpios = <&gpio 65 GPIO_ACTIVE_LOW>;
        status = "okay";
    };

  • This is the da850-lcdk.dts file

    /*
     * Copyright (c) 2016 BayLibre, Inc.
     *
     * Licensed under GPLv2.
     */
    /dts-v1/;
    #include "da850.dtsi"
    #include <dt-bindings/gpio/gpio.h>
    #include <dt-bindings/input/input.h>

    / {
        model = "DA850/AM1808/OMAP-L138 LCDK";
        compatible = "ti,da850-lcdk", "ti,da850";

        aliases {
            serial2 = &serial2;
            ethernet0 = &eth0;
        };

        chosen {
            stdout-path = "serial2:115200n8";
        };

        memory@c0000000 {
            /* 128 MB DDR2 SDRAM @ 0xc0000000 */
            reg = <0xc0000000 0x08000000>;
        };

        reserved-memory {
            #address-cells = <1>;
            #size-cells = <1>;
            ranges;

            dsp_memory_region: dsp-memory@c3000000 {
                compatible = "shared-dma-pool";
                reg = <0xc3000000 0x1000000>;
                reusable;
                status = "okay";
            };
        };

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

        vcc_3v3d: fixedregulator-vcc_3v3d {
            /* TPS650250 - VDCDC1 */
            compatible = "regulator-fixed";
            regulator-name = "vcc_3v3d";
            regulator-min-microvolt = <3300000>;
            regulator-max-microvolt = <3300000>;
            vin-supply = <&vcc_5vd>;
            regulator-always-on;
            regulator-boot-on;
        };

        vcc_1v8d: fixedregulator-vcc_1v8d {
            /* TPS650250 - VDCDC2 */
            compatible = "regulator-fixed";
            regulator-name = "vcc_1v8d";
            regulator-min-microvolt = <1800000>;
            regulator-max-microvolt = <1800000>;
            vin-supply = <&vcc_5vd>;
            regulator-always-on;
            regulator-boot-on;
        };

        sound {
            compatible = "simple-audio-card";
            simple-audio-card,name = "DA850-OMAPL138 LCDK";
            simple-audio-card,widgets =
                "Line", "Line In",
                "Line", "Line Out",
                "Microphone", "Mic Jack";
            simple-audio-card,routing =
                "LINE1L", "Line In",
                "LINE1R", "Line In",
                "Line Out", "LLOUT",
                "Line Out", "RLOUT",
                "MIC3L", "Mic Jack",
                "MIC3R", "Mic Jack",
                "Mic Jack", "Mic Bias";
            simple-audio-card,format = "dsp_b";
            simple-audio-card,bitclock-master = <&link0_codec>;
            simple-audio-card,frame-master = <&link0_codec>;
            simple-audio-card,bitclock-inversion;

            simple-audio-card,cpu {
                sound-dai = <&mcasp0>;
                system-clock-frequency = <24576000>;
            };

            link0_codec: simple-audio-card,codec {
                sound-dai = <&tlv320aic3106>;
                system-clock-frequency = <24576000>;
            };
        };

        gpio-keys {
            compatible = "gpio-keys";
            autorepeat;

            user1 {
                label = "GPIO Key USER1";
                linux,code = <BTN_0>;
                gpios = <&gpio 36 GPIO_ACTIVE_LOW>;
            };

            user2 {
                label = "GPIO Key USER2";
                linux,code = <BTN_1>;
                gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
            };
        };

        vga-bridge {
            compatible = "ti,ths8135";
            #address-cells = <1>;
            #size-cells = <0>;

            ports {
                #address-cells = <1>;
                #size-cells = <0>;

                port@0 {
                    reg = <0>;

                    vga_bridge_in: endpoint {
                        remote-endpoint = <&lcdc_out_vga>;
                    };
                };

                port@1 {
                    reg = <1>;

                    vga_bridge_out: endpoint {
                        remote-endpoint = <&vga_con_in>;
                    };
                };
            };
        };

        vga {
            compatible = "vga-connector";

            ddc-i2c-bus = <&i2c0>;

            port {
                vga_con_in: endpoint {
                    remote-endpoint = <&vga_bridge_out>;
                };
            };
        };
    };

    &ref_clk {
        clock-frequency = <24000000>;
    };

    &pmx_core {
        status = "okay";

        mcasp0_pins: pinmux_mcasp0_pins {
            pinctrl-single,bits = <
                /* AHCLKX AFSX ACLKX */
                0x00 0x00101010 0x00f0f0f0
                /* ARX13 ARX14 */
                0x04 0x00000110 0x00000ff0
            >;
        };

        nand_pins: nand_pins {
            pinctrl-single,bits = <
                /* EMA_WAIT[0], EMA_OE, EMA_WE, EMA_CS[3] */
                0x1c 0x10110010  0xf0ff00f0
                /*
                 * EMA_D[0], EMA_D[1], EMA_D[2],
                 * EMA_D[3], EMA_D[4], EMA_D[5],
                 * EMA_D[6], EMA_D[7]
                 */
                0x24 0x11111111  0xffffffff
                /*
                 * EMA_D[8],  EMA_D[9],  EMA_D[10],
                 * EMA_D[11], EMA_D[12], EMA_D[13],
                 * EMA_D[14], EMA_D[15]
                 */
                0x20 0x11111111  0xffffffff
                /* EMA_A[1], EMA_A[2] */
                0x30 0x01100000  0x0ff00000
            >;
        };
    };

    &serial2 {
        pinctrl-names = "default";
        pinctrl-0 = <&serial2_rxtx_pins>;
        status = "okay";
    };

    &wdt {
        status = "okay";
    };

    &rtc0 {
        status = "okay";
    };

    &gpio {
        status = "okay";
    };

    &sata_refclk {
        status = "okay";
        clock-frequency = <100000000>;
    };

    &sata {
        status = "okay";
    };

    &mdio {
        pinctrl-names = "default";
        pinctrl-0 = <&mdio_pins>;
        bus_freq = <2200000>;
        status = "okay";
    };

    &eth0 {
        pinctrl-names = "default";
        pinctrl-0 = <&mii_pins>;
        status = "okay";
    };

    &mmc0 {
        max-frequency = <50000000>;
        bus-width = <4>;
        pinctrl-names = "default";
        pinctrl-0 = <&mmc0_pins>;
        cd-gpios = <&gpio 65 GPIO_ACTIVE_LOW>;
        status = "okay";
    };

    &i2c0 {
        pinctrl-names = "default";
        pinctrl-0 = <&i2c0_pins>;
        clock-frequency = <100000>;
        status = "okay";

        tlv320aic3106: tlv320aic3106@18 {
            #sound-dai-cells = <0>;
            compatible = "ti,tlv320aic3106";
            reg = <0x18>;
            adc-settle-ms = <40>;
            ai3x-micbias-vg = <1>;        /* 2.0V */
            status = "okay";

            /* Regulators */
            IOVDD-supply = <&vcc_3v3d>;
            AVDD-supply = <&vcc_3v3d>;
            DRVDD-supply = <&vcc_3v3d>;
            DVDD-supply = <&vcc_1v8d>;
        };
    };

    &mcasp0 {
        #sound-dai-cells = <0>;
        pinctrl-names = "default";
        pinctrl-0 = <&mcasp0_pins>;
        status = "okay";

        op-mode = <0>;   /* DAVINCI_MCASP_IIS_MODE */
        tdm-slots = <2>;
        serial-dir = <   /* 0: INACTIVE, 1: TX, 2: RX */
            0 0 0 0
            0 0 0 0
            0 0 0 0
            0 1 2 0
        >;
        tx-num-evt = <32>;
        rx-num-evt = <32>;
    };

    &usb_phy {
        status = "okay";
    };

    &usb0 {
        status = "okay";
    };

    &usb1 {
        status = "okay";
    };

    &aemif {
        pinctrl-names = "default";
        pinctrl-0 = <&nand_pins>;
        status = "okay";
        cs3 {
            #address-cells = <2>;
            #size-cells = <1>;
            clock-ranges;
            ranges;

            ti,cs-chipselect = <3>;

            nand@2000000,0 {
                compatible = "ti,davinci-nand";
                #address-cells = <1>;
                #size-cells = <1>;
                reg = <0 0x02000000 0x02000000
                       1 0x00000000 0x00008000>;

                ti,davinci-chipselect = <1>;
                ti,davinci-mask-ale = <0>;
                ti,davinci-mask-cle = <0>;
                ti,davinci-mask-chipsel = <0>;

                ti,davinci-nand-buswidth = <16>;
                ti,davinci-ecc-mode = "hw";
                ti,davinci-ecc-bits = <4>;
                ti,davinci-nand-use-bbt;

                /*
                 * The OMAP-L132/L138 Bootloader doc SPRAB41E reads:
                 * "To boot from NAND Flash, the AIS should be written
                 * to NAND block 1 (NAND block 0 is not used by default)".
                 * The same doc mentions that for ROM "Silicon Revision 2.1",
                 * "Updated NAND boot mode to offer boot from block 0 or block 1".
                 * However the limitaion is left here by default for compatibility
                 * with older silicon and because it needs new boot pin settings
                 * not possible in stock LCDK.
                 */
                partitions {
                    compatible = "fixed-partitions";
                    #address-cells = <1>;
                    #size-cells = <1>;

                    partition@0 {
                        label = "u-boot env";
                        reg = <0 0x020000>;
                    };
                    partition@20000 {
                        /* The LCDK defaults to booting from this partition */
                        label = "u-boot";
                        reg = <0x020000 0x080000>;
                    };
                    partition@a0000 {
                        label = "free space";
                        reg = <0x0a0000 0>;
                    };
                };
            };
        };
    };

    &prictrl {
        status = "okay";
    };

    &memctrl {
        status = "okay";
    };

    &lcdc {
        status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <&lcd_pins>;

        port {
            lcdc_out_vga: endpoint {
                remote-endpoint = <&vga_bridge_in>;
            };
        };
    };

    &vpif {
        pinctrl-names = "default";
        pinctrl-0 = <&vpif_capture_pins>;
        status = "okay";
    };

    &dsp {
        memory-region = <&dsp_memory_region>;
        status = "okay";
    };

    iam trying to change nand to work in 8 bit,still trying

    is there any way to get my nand detected  in 8 bit mode

  • 8bit Nand got detected

    all i have to do is change the dts file for UBOOT and then build a new Uboot

    and then i used the builded uboot to detect my nand flash

    My nand device got detected but its showing ecc error