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.

Linux/AM3351: Device tree configuration for NAND flash

Part Number: AM3351
Other Parts Discussed in Thread: AM3352, TPS65217

Tool/software: Linux

Hi, i am not getting any NAND portions in /dev path in sd  boot,

root@am335x-evm:~# dmesg | grep -r "NAND"                        
[    1.833045] nand: No NAND device found
root@am335x-evm:~# ls /dev/m
mem               memory_bandwidth  mmcblk0           mmcblk0p1         mmcblk0p2         mqueue/    

i am using ti-processor-sdk 03.00.00.04 and below dts configurations for nand, please suggest me what are the configurations need to take care for nand boot.

nandflash_pins_s0: nandflash_pins_s0 {
        pinctrl-single,pins = <
            0x0 (PIN_INPUT_PULLUP | MUX_MODE0)    /* gpmc_ad0.gpmc_ad0 */
            0x4 (PIN_INPUT_PULLUP | MUX_MODE0)    /* gpmc_ad1.gpmc_ad1 */
            0x8 (PIN_INPUT_PULLUP | MUX_MODE0)    /* gpmc_ad2.gpmc_ad2 */
            0xc (PIN_INPUT_PULLUP | MUX_MODE0)    /* gpmc_ad3.gpmc_ad3 */
            0x10 (PIN_INPUT_PULLUP | MUX_MODE0)    /* gpmc_ad4.gpmc_ad4 */
            0x14 (PIN_INPUT_PULLUP | MUX_MODE0)    /* gpmc_ad5.gpmc_ad5 */
            0x18 (PIN_INPUT_PULLUP | MUX_MODE0)    /* gpmc_ad6.gpmc_ad6 */
            0x1c (PIN_INPUT_PULLUP | MUX_MODE0)    /* gpmc_ad7.gpmc_ad7 */
            0x70 (PIN_INPUT_PULLUP | MUX_MODE0)    /* gpmc_wait0.gpmc_wait0 */
            0x74 (PIN_INPUT_PULLUP | MUX_MODE7)    /* gpmc_wpn.gpio0_30 */
            0x7c (PIN_OUTPUT | MUX_MODE0)        /* gpmc_csn0.gpmc_csn0  */
            0x90 (PIN_OUTPUT | MUX_MODE0)        /* gpmc_advn_ale.gpmc_advn_ale */
            0x94 (PIN_OUTPUT | MUX_MODE0)        /* gpmc_oen_ren.gpmc_oen_ren */
            0x98 (PIN_OUTPUT | MUX_MODE0)        /* gpmc_wen.gpmc_wen */
            0x9c (PIN_OUTPUT | MUX_MODE0)        /* gpmc_be0n_cle.gpmc_be0n_cle */
        >;
    };


&gpmc {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&nandflash_pins_s0>;
    ranges = <0 0 0x08000000 0x2000000>;    /* CS0: 16MB for NAND */
    nand@0,0 {
        compatible = "ti,omap2-nand";
        reg = <0 0 4>; /* CS0, offset 0, IO size 4 */
        interrupt-parent = <&gpmc>;
        interrupts = <0 0>, /* fifoevent */
                 <1 0>;    /* termcount */
        rb-gpios = <&gpmc 0 GPIO_ACTIVE_HIGH>; /* gpmc_wait0 */
        ti,nand-ecc-opt = "bch8";
        ti,elm-id = <&elm>;
        nand-bus-width = <8>;
        gpmc,device-width = <1>;
        gpmc,sync-clk-ps = <0>;
        gpmc,cs-on-ns = <0>;
        gpmc,cs-rd-off-ns = <44>;
        gpmc,cs-wr-off-ns = <44>;
        gpmc,adv-on-ns = <6>;
        gpmc,adv-rd-off-ns = <34>;
        gpmc,adv-wr-off-ns = <44>;
        gpmc,we-on-ns = <0>;
        gpmc,we-off-ns = <40>;
        gpmc,oe-on-ns = <0>;
        gpmc,oe-off-ns = <54>;
        gpmc,access-ns = <64>;
        gpmc,rd-cycle-ns = <82>;
        gpmc,wr-cycle-ns = <82>;
        gpmc,bus-turnaround-ns = <0>;
        gpmc,cycle2cycle-delay-ns = <0>;
        gpmc,clk-activation-ns = <0>;
        gpmc,wr-access-ns = <40>;
        gpmc,wr-data-mux-bus-ns = <0>;
        /* MTD partition table */
        /* All SPL-* partitions are sized to minimal length
         * which can be independently programmable. For
         * NAND flash this is equal to size of erase-block */
        #address-cells = <1>;
        #size-cells = <1>;
        partition@0 {
            label = "NAND.SPL";
            reg = <0x00000000 0x000020000>;
        };
        partition@1 {
            label = "NAND.SPL.backup1";
            reg = <0x00020000 0x00020000>;
        };
        partition@2 {
            label = "NAND.SPL.backup2";
            reg = <0x00040000 0x00020000>;
        };
        partition@3 {
            label = "NAND.SPL.backup3";
            reg = <0x00060000 0x00020000>;
        };
        partition@4 {
            label = "NAND.u-boot-spl-os";
            reg = <0x00080000 0x00040000>;
        };
        partition@5 {
            label = "NAND.u-boot";
            reg = <0x000C0000 0x00100000>;
        };
        partition@6 {
            label = "NAND.u-boot-env";
            reg = <0x001C0000 0x00020000>;
        };
        partition@7 {
            label = "NAND.u-boot-env.backup1";
            reg = <0x001E0000 0x00020000>;
        };
        partition@8 {
            label = "NAND.kernel";
            reg = <0x00200000 0x00800000>;
        };
        partition@9 {
            label = "NAND.file-system";
            reg = <0x00A00000 0x0F600000>;
        };
    };

thankyou,

  • Hello khageswararao,

    What do you mean by nandboot? Are you want to boot from NAND or you want to boot from SD card, but detect and use the NAND as memory technology device?

    Best regards,
    Kemal

  • Hi Kemal,

    i am using MX30LF4G18AC NAND (4 G-bit,bus-x8,Page size: (2048+64) byte, Block size: (128K+4K) byte,2048-block/plane x 2 for 4Gb)

    i want to boot from Nand,so using SD card i copied MLO, U-boot, Kernel into Nand, after restarting the board it hangs and displays below error message.

    U-Boot SPL 2016.05-00230-g120a8a3-dirty (Nov 14 2017 - 22:23:31)
    CONFIG_SPL_NAND_SUPPORT
    The Expected Linux image was not found. Please check your NAND configuration.
    Trying to start u-boot now...
    fit read sector c0000, sectors=1984, dst=807ff800, count=1984
    data_offset=0, data_size=1de094
    U-Boot size 1de094, data 80800000
    image: data_offset=7c0, dst=80800000, src_sector=c07c0, sectors=1de094
    , fdt 'fdt@1'
    fit read 8ff6 sectors to 80800000, dst 809de0c0, data_offset 1de854


    U-Boot 2016.05-00230-g120a8a3-dirty (Nov 14 2017 - 22:23:31 +0530)

    Monitor len: 0020C450

    RAM Configuration:
    Bank #0: 80000000
    DRAM1234: NAND: 512 MiB
    MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
    Card did not respond to voltage select!
    ** Bad device mmc 0 **
    Using default environment

    Net: No ethernet found.
    Press SPACE to abort autoboot in 2 seconds
    Card did not respond to voltage select!
    Card did not respond to voltage select!
    Card did not respond to voltage select!
    Card did not respond to voltage select!
    Card did not respond to voltage select!
    data abort
    pc : [<8fe005ec>] lr : [<8fdffa3f>]
    reloc pc : [<8081d5ec>] lr : [<8081ca3f>]
    sp : 8edb86a0 ip : 8fde8335 fp : 00000003
    r10: 8ffb6330 r9 : 8edc2ed8 r8 : 8edca9c0
    r7 : 8fde7ebd r6 : 8edc92f8 r5 : 8edc9370 r4 : 47810000
    r3 : 8fe005dd r2 : 000022a4 r1 : 8ffa8720 r0 : 8edc9370
    Flags: nZCv IRQs off FIQs on Mode SVC_32
    Resetting CPU ...


    //Nand partitions in u-boot

    0x00000000 "128k(NAND.SPL)," \
    0x00020000 "128k(NAND.SPL.backup1)," \
    0x00040000 "128k(NAND.SPL.backup2)," \
    0x00060000 "128k(NAND.SPL.backup3)," \
    0x00080000 "256k(NAND.u-boot-spl-os)," \
    0x000C0000 "1m(NAND.u-boot)," \
    "128k(NAND.u-boot-env)," \
    "128k(NAND.u-boot-env.backup1)," \
    0x00200000 "8m(NAND.kernel)," \
    "-(NAND.file-system)"

    //u-boot commands
    nand erase.chip
    mmc rescan
    fatload mmc 0 0x80000000 MLO
    nand write 0x80000000 0x00000 0x13000
    mmc rescan
    fatload mmc 0 0x80000000 u-boot.img
    nand write 0x80000000 0xc0000 0x9BC00
    mmc rescan
    fatload mmc 0 0x80000000 am335x-evmsk.dtb
    nand write 0x80000000 0x80000 0x9800
    mmc rescan
    fatload mmc 0 0x80000000 zImage
    nand write 0x80000000 0x200000 0x3CCCCD

    Thankyou,

  • So, now can you put the <Processor SDK>/filesystem/arago-base-tisdk-image-am335x-evm.ubi to your SD card. Rescan the mmc. Flash the file-system. Run nandboot. Then attach the boot log.
    mmc rescan
    fatload mmc 0 0x82000000 arago-base-tisdk-image-am335x-evm.ubi
    nand write 0x82000000 NAND.file-system
    run nandboot

  • Hi Kemal,
    i was struck at creating new ubi image, when i was working with sd card, i modified dts files according to hard ware, so please guide me to creating to ubi image for nand flash,
    i am using "tisdk-rootfs-image-am335x-evm.tar.gz" it is having 518 MB, my NAND size is 4 G-bit, how to optimize it for fit into NAND,
    Please guide me to resolve it,

    thankyou,
  • Temporarily use the prebuilt <Processor SDK>/filesystem/arago-base-tisdk-image-am335x-evm.ubi for the test.

  • Hi Kemal,

    As suggested i used the prebuilt ubi. Below is the log generated while booting kernel.
    Starting kernel ...

    [ 0.000000] Booting Linux on physical CPU 0x0
    [ 0.000000] Initializing cgroup subsys cpu
    [ 0.000000] Initializing cgroup subsys cpuacct
    [ 0.000000] Linux version 4.4.12-g3639bea54a (gtbldadm@ubuntu-16) (gcc version 5.3.1 20160113 (Linaro GCC 5.3-2016.02) ) #1 PREEMPT Fri Jul 8 19:26
    [ 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] Machine model: TI AM335x BeagleBone Black
    [ 0.000000] cma: Reserved 24 MiB at 0x8d000000
    [ 0.000000] Memory policy: Data cache writeback
    [ 0.000000] CPU: All CPU(s) started in SVC mode.
    [ 0.000000] AM335X ES2.1 (neon )
    [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 64960
    [ 0.000000] Kernel command line: console=ttyO0,115200n8 root=ubi0:rootfs rw ubi.mtd=NAND.file-system,2048 rootfstype=ubifs rootwait=1
    [ 0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
    [ 0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
    [ 0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
    [ 0.000000] Memory: 224308K/262144K available (7095K kernel code, 292K rwdata, 2520K rodata, 292K init, 263K bss, 13260K reserved, 24576K cma-rese)
    [ 0.000000] Virtual kernel memory layout:
    [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
    [ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
    [ 0.000000] vmalloc : 0xd0800000 - 0xff800000 ( 752 MB)
    [ 0.000000] lowmem : 0xc0000000 - 0xd0000000 ( 256 MB)
    [ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
    [ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
    [ 0.000000] .text : 0xc0008000 - 0xc096c034 (9617 kB)
    [ 0.000000] .init : 0xc096d000 - 0xc09b6000 ( 292 kB)
    [ 0.000000] .data : 0xc09b6000 - 0xc09ff248 ( 293 kB)
    [ 0.000000] .bss : 0xc0a01000 - 0xc0a42ed8 ( 264 kB)
    [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    [ 0.000000] Preemptible hierarchical RCU implementation.
    [ 0.000000] Build-time adjustment of leaf fanout to 32.
    [ 0.000000] NR_IRQS:16 nr_irqs:16 16
    [ 0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
    [ 0.000000] OMAP clockevent source: timer2 at 19200000 Hz
    [ 0.000033] sched_clock: 32 bits at 19MHz, resolution 52ns, wraps every 111848106981ns
    [ 0.000086] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 99544814920 ns
    [ 0.000109] OMAP clocksource: timer1 at 19200000 Hz
    [ 0.001125] clocksource_probe: no matching clocksources found
    [ 0.001510] Console: colour dummy device 80x30
    [ 0.001569] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
    [ 0.001585] This ensures that you still see kernel messages. Please
    [ 0.001599] update your kernel commandline.
    [ 0.001635] Calibrating delay loop... 302.28 BogoMIPS (lpj=1511424)
    [ 0.057723] pid_max: default: 32768 minimum: 301
    [ 0.058006] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [ 0.058036] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [ 0.059590] Initializing cgroup subsys io
    [ 0.059669] Initializing cgroup subsys memory
    [ 0.059744] Initializing cgroup subsys devices
    [ 0.059780] Initializing cgroup subsys freezer
    [ 0.059813] Initializing cgroup subsys perf_event
    [ 0.059844] Initializing cgroup subsys pids
    [ 0.059906] CPU: Testing write buffer coherency: ok
    [ 0.060708] Setting up static identity map for 0x80008200 - 0x80008258
    [ 0.065888] devtmpfs: initialized
    [ 0.093056] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    [ 0.125675] omap_hwmod: debugss: _wait_target_disable failed
    [ 0.130645] omap_hwmod: d_can0: _wait_target_ready failed: -16
    [ 0.130670] omap_hwmod: d_can0: cannot be enabled for reset (3)
    [ 0.134557] omap_hwmod: d_can1: _wait_target_ready failed: -16
    [ 0.134575] omap_hwmod: d_can1: cannot be enabled for reset (3)
    [ 0.203798] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    [ 0.208654] pinctrl core: initialized pinctrl subsystem
    [ 0.211747] NET: Registered protocol family 16
    [ 0.216927] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [ 0.247738] cpuidle: using governor ladder
    [ 0.277714] cpuidle: using governor menu
    [ 0.289254] OMAP GPIO hardware version 0.1
    [ 0.292348] omap_gpio 481ac000.gpio: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_gpio2_pins, deferring probe
    [ 0.293114] omap_gpio 481ae000.gpio: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_gpio3_pins, deferring probe
    [ 0.311464] hw-breakpoint: debug architecture 0x4 unsupported.
    [ 0.379438] edma 49000000.edma: TI EDMA DMA engine driver
    [ 0.386737] vgaarb: loaded
    [ 0.388256] SCSI subsystem initialized
    [ 0.389028] usbcore: registered new interface driver usbfs
    [ 0.389209] usbcore: registered new interface driver hub
    [ 0.389439] usbcore: registered new device driver usb
    [ 0.390720] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, deferring probe
    [ 0.390850] omap_i2c 4819c000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c2_pins, deferring probe
    [ 0.391154] media: Linux media interface: v0.10
    [ 0.391313] Linux video capture interface: v2.00
    [ 0.391441] pps_core: LinuxPPS API ver. 1 registered
    [ 0.391460] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [ 0.391537] PTP clock support registered
    [ 0.392077] EDAC MC: Ver: 3.0.0
    [ 0.394697] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
    [ 0.395429] Advanced Linux Sound Architecture Driver Initialized.
    [ 0.398329] clocksource: Switched to clocksource timer1
    [ 0.426014] NET: Registered protocol family 2
    [ 0.427779] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
    [ 0.427872] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
    [ 0.427943] TCP: Hash tables configured (established 2048 bind 2048)
    [ 0.428103] UDP hash table entries: 256 (order: 0, 4096 bytes)
    [ 0.428154] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    [ 0.428653] NET: Registered protocol family 1
    [ 0.429481] RPC: Registered named UNIX socket transport module.
    [ 0.429511] RPC: Registered udp transport module.
    [ 0.429527] RPC: Registered tcp transport module.
    [ 0.429543] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [ 0.431642] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
    [ 0.436167] futex hash table entries: 256 (order: -1, 3072 bytes)
    [ 0.457471] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [ 0.459621] NFS: Registering the id_resolver key type
    [ 0.459767] Key type id_resolver registered
    [ 0.459789] Key type id_legacy registered
    [ 0.459971] ntfs: driver 2.1.32 [Flags: R/O].
    [ 0.464554] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)
    [ 0.464617] io scheduler noop registered
    [ 0.464653] io scheduler deadline registered
    [ 0.465051] io scheduler cfq registered (default)
    [ 0.468935] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
    [ 0.475671] backlight supply power not found, using dummy regulator
    [ 0.476350] pwm-backlight backlight: invalid default brightness level: 53, using 8
    [ 0.634219] Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
    [ 0.644299] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 94, base_baud = 3000000) is a 8250
    [ 1.334811] console [ttyS0] enabled
    [ 1.340802] [drm] Initialized drm 1.1.0 20060810
    [ 1.348592] of_graph_get_next_endpoint(): no port node found in /ocp/lcdc@4830e000
    [ 1.357653] of_graph_get_next_endpoint(): no port node found in /ocp/lcdc@4830e000
    [ 1.366323] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
    [ 1.373087] [drm] No driver support for vblank timestamp query.
    [ 1.397580] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underfow
    [ 1.398578] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1.401114] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underfow
    [ 1.402455] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1.418679] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1.444852] Console: switching to colour frame buffer device 160x50
    [ 1.527392] tilcdc 4830e000.lcdc: fb0: frame buffer device
    [ 1.558403] [drm] Initialized tilcdc 1.0.0 20121205 on minor 0
    [ 1.583061] loop: module loaded
    [ 1.592979] libphy: Fixed MDIO Bus: probed
    [ 1.600551] pegasus: v0.9.3 (2013/04/25), Pegasus/Pegasus II USB Ethernet driver
    [ 1.608240] usbcore: registered new interface driver pegasus
    [ 1.614154] usbcore: registered new interface driver asix
    [ 1.619750] usbcore: registered new interface driver ax88179_178a
    [ 1.626031] usbcore: registered new interface driver cdc_ether
    [ 1.632086] usbcore: registered new interface driver smsc75xx
    [ 1.638053] usbcore: registered new interface driver smsc95xx
    [ 1.643972] usbcore: registered new interface driver net1080
    [ 1.649795] usbcore: registered new interface driver cdc_subset
    [ 1.655889] usbcore: registered new interface driver zaurus
    [ 1.661780] usbcore: registered new interface driver cdc_ncm
    [ 1.669096] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    [ 1.675719] ehci-pci: EHCI PCI platform driver
    [ 1.680373] ehci-platform: EHCI generic platform driver
    [ 1.686030] ehci-omap: OMAP-EHCI Host Controller driver
    [ 1.691644] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
    [ 1.697884] ohci-pci: OHCI PCI platform driver
    [ 1.702559] ohci-platform: OHCI generic platform driver
    [ 1.709084] usbcore: registered new interface driver usb-storage
    [ 1.716123] mousedev: PS/2 mouse device common for all mice
    [ 1.723864] i2c /dev entries driver
    [ 1.731484] cpuidle: enable-method property 'ti,am3352' found operations
    [ 1.738878] sdhci: Secure Digital Host Controller Interface driver
    [ 1.745041] sdhci: Copyright(c) Pierre Ossman
    [ 1.750799] omap_hsmmc 48060000.mmc: Got CD GPIO
    [ 1.828936] Synopsys Designware Multimedia Card Interface Driver
    [ 1.836042] sdhci-pltfm: SDHCI platform and OF driver helper
    [ 1.843502] ledtrig-cpu: registered to indicate activity on CPUs
    [ 1.850206] usbcore: registered new interface driver usbhid
    [ 1.855850] usbhid: USB HID core driver
    [ 1.866075] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underfow
    [ 1.873323] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000104): Sync lost
    [ 1.882234] NET: Registered protocol family 10
    [ 1.886778] mmc0: host does not support reading read-only switch, assuming write-enable
    [ 1.897522] sit: IPv6 over IPv4 tunneling driver
    [ 1.904447] NET: Registered protocol family 17
    [ 1.909374] mmc0: new high speed SDHC card at address aaaa
    [ 1.916347] Key type dns_resolver registered
    [ 1.921927] omap_voltage_late_init: Voltage driver support not added
    [ 1.928584] mmcblk0: mmc0:aaaa SS08G 7.40 GiB
    [ 1.935773] mmcblk0: p1 p2
    [ 1.940541] ThumbEE CPU extension supported.
    [ 1.944864] Registering SWP/SWPB emulation handler
    [ 2.001509] tps65217 0-0024: TPS65217 ID 0xe version 1.2
    [ 2.007492] i2c i2c-0: Failed to register i2c client tps65217 at 0x24 (-16)
    [ 2.014571] i2c i2c-0: of_i2c: Failure registering /ocp/i2c@44e0b000/tps65217@24
    [ 2.022033] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
    [ 2.031214] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 40 kHz
    [ 2.039526] cpufreq: cpufreq_online: CPU0: Running at unlisted freq: 303157 KHz
    [ 2.046923] cpu cpu0: dev_pm_opp_domain_set_rate: failed to find current OPP for freq 303157894 (-34)
    [ 2.073847] cpufreq: cpufreq_online: CPU0: Unlisted initial frequency changed to: 300000 KHz
    [ 2.083512] UBI error: cannot open mtd NAND.file-system, error -2
    [ 2.090394] hctosys: unable to open rtc device (rtc0)
    [ 2.105056] ALSA device list:
    [ 2.108236] No soundcards found.
    [ 2.114514] UBIFS error (pid: 1): cannot open "ubi0:rootfs", error -19VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0): error -19
    [ 2.127868] Please append a correct "root=" boot option; here are the available partitions:
    [ 2.136336] b300 7761920 mmcblk0 driver: mmcblk
    [ 2.141799] b301 71680 mmcblk0p1 0002a9d3-01
    [ 2.147113] b302 7672832 mmcblk0p2 0002a9d3-02
    [ 2.152469] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
    [ 2.160717] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

    uboot env:

    arch=arm
    args_mmc=run finduuid;setenv bootargs console=${console} ${optargs} root=PARTUUID=${uuid} rw rootfstype=${mmcrootfstype}
    baudrate=115200
    board=am335x
    board_name=am335x-evmsk
    board_rev=$�S� �
    board_serial=� �
    boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
    boot_efi_binary=load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} efi/boot/bootarm.efi; if fdt addr ${fdt_addr_r}; then bootefi ${kernel_i
    boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}extlinux/extlinux.conf
    boot_fdt=try
    boot_net_usb_start=usb start
    boot_prefixes=/ /boot/
    boot_script_dhcp=boot.scr.uimg
    boot_scripts=boot.scr.uimg boot.scr
    boot_targets=mmc0 legacy_mmc0 mmc1 legacy_mmc1 nand0 pxe dhcp
    bootcmd=run nandboot
    bootcmd_dhcp=run boot_net_usb_start; if dhcp ${scriptaddr} ${boot_script_dhcp}; then source ${scriptaddr}; fi
    bootcmd_legacy_mmc0=setenv mmcdev 0; setenv bootpart 0:2 ; run mmcboot
    bootcmd_legacy_mmc1=setenv mmcdev 1; setenv bootpart 1:2 ; run mmcboot
    bootcmd_mmc0=setenv devnum 0; run mmc_boot
    bootcmd_mmc1=setenv devnum 1; run mmc_boot
    bootcmd_nand=run nandboot
    bootcmd_pxe=run boot_net_usb_start; dhcp; if pxe get; then pxe boot; fi
    bootcount=1
    bootdelay=2
    bootdir=/boot
    bootenvfile=uEnv.txt
    bootfile=zImage
    bootm_size=0x10000000
    bootpart=0:2
    bootscript=echo Running bootscript from mmc${mmcdev} ...; source ${loadaddr}
    console=ttyO0,115200n8
    cpu=armv7
    dfu_alt_info_emmc=rawemmc raw 0 3751936
    dfu_alt_info_mmc=boot part 0 1;rootfs part 0 2;MLO fat 0 1;MLO.raw raw 0x100 0x100;u-boot.img.raw raw 0x300 0x400;spl-os-args.raw raw 0x80 0x80;spl-o1
    dfu_alt_info_nand=SPL part 0 1;SPL.backup1 part 0 2;SPL.backup2 part 0 3;SPL.backup3 part 0 4;u-boot part 0 5;u-boot-spl-os part 0 6;kernel part 0 8;9
    dfu_alt_info_ram=kernel ram 0x80200000 0xD80000;fdt ram 0x80F80000 0x80000;ramdisk ram 0x81000000 0x4000000
    distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done
    efi_dtb_prefixes=/ /dtb/ /dtb/current/
    envboot=mmc dev ${mmcdev}; if mmc rescan; then echo SD/MMC found on device ${mmcdev};if run loadbootscript; then run bootscript;else if run loadboote;
    fdt_addr_r=0x88000000
    fdtaddr=0x88000000
    fdtcontroladdr=8edb8ed8
    fdtfile=am335x-evmsk.dtb
    findfdt=if test $board_name = A335BONE; then setenv fdtfile am335x-bone.dtb; fi; if test $board_name = A335BNLT; then setenv fdtfile am335x-boneblack
    finduuid=part uuid mmc 0:2 uuid
    importbootenv=echo Importing environment from mmc${mmcdev} ...; env import -t ${loadaddr} ${filesize}
    init_console=if test $board_name = A335_ICE; then setenv console ttyO3,115200n8;else setenv console ttyO0,115200n8;fi;
    kernel_addr_r=0x82000000
    load_efi_dtb=load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}${efi_fdtfile}
    loadaddr=0x82000000
    loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}
    loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr
    loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}
    loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}
    loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz
    mmc_boot=if mmc dev ${devnum}; then setenv devtype mmc; run scan_dev_for_boot_part; fi
    mmcboot=mmc dev ${mmcdev}; if mmc rescan; then echo SD/MMC found on device ${mmcdev};run envboot; if run loadimage; then run mmcloados;fi;fi;
    mmcdev=0
    mmcloados=run args_mmc; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run loadfdt; then bootz ${loadaddr} - ${fdtaddr}; else if test $;
    mmcrootfstype=ext4 rootwait
    mtdids=nand0=nand.0
    mtdparts=mtdparts=nand.0:128k(NAND.SPL),128k(NAND.SPL.backup1),128k(NAND.SPL.backup2),128k(NAND.SPL.backup3),256k(NAND.u-boot-spl-os),3m(NAND.u-boot))
    nandargs=setenv bootargs console=${console} ${optargs} root=${nandroot} rootfstype=${nandrootfstype}
    nandboot=echo Booting from nand ...; run nandargs; nand read ${fdtaddr} NAND.u-boot-spl-os; nand read ${loadaddr} NAND.kernel; bootz ${loadaddr} - ${}
    nandroot=ubi0:rootfs rw ubi.mtd=NAND.file-system,2048
    nandrootfstype=ubifs rootwait=1
    netargs=setenv bootargs console=${console} ${optargs} root=/dev/nfs nfsroot=${serverip}:${rootpath},${nfsopts} rw ip=dhcp
    netboot=echo Booting from network ...; setenv autoload no; dhcp; run netloadimage; run netloadfdt; run netargs; bootz ${loadaddr} - ${fdtaddr}
    netloadfdt=tftp ${fdtaddr} ${fdtfile}
    netloadimage=tftp ${loadaddr} ${bootfile}
    nfsopts=nolock
    partitions=uuid_disk=${uuid_gpt_disk};name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}
    pxefile_addr_r=0x80100000
    ramargs=setenv bootargs console=${console} ${optargs} root=${ramroot} rootfstype=${ramrootfstype}
    ramboot=echo Booting from ramdisk ...; run ramargs; bootz ${loadaddr} ${rdaddr} ${fdtaddr}
    ramdisk_addr_r=0x88080000
    ramroot=/dev/ram0 rw
    ramrootfstype=ext2
    rdaddr=0x88080000
    rootpath=/export/rootfs
    scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_de;
    scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devpliste
    scan_dev_for_efi=setenv efi_fdtfile ${fdtfile}; if test -z "${fdtfile}" -a -n "${soc}"; then setenv efi_fdtfile ${soc}-${board}${boardver}.dtb; fi; fe
    scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}extlinux/extlinux.conf; then echo Found ${prefix}extlinux/extlinux.i
    scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot e
    scriptaddr=0x80000000
    soc=am33xx
    spiargs=setenv bootargs console=${console} ${optargs} root=${spiroot} rootfstype=${spirootfstype}
    spiboot=echo Booting from spi ...; run spiargs; sf probe ${spibusno}:0; sf read ${loadaddr} ${spisrcaddr} ${spiimgsize}; bootz ${loadaddr}
    spibusno=0
    spiimgsize=0x362000
    spiroot=/dev/mtdblock4 rw
    spirootfstype=jffs2
    spisrcaddr=0xe0000
    static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off
    stderr=serial@44e09000
    stdin=serial@44e09000
    stdout=serial@44e09000
    usb_boot=usb start; if usb dev ${devnum}; then setenv devtype usb; run scan_dev_for_boot_part; fi
    vendor=ti
    ver=U-Boot 2016.05-00230-g120a8a3-dirty (Dec 05 2017 - 12:42:22 +0530)

    Environment size: 8021/131068 bytes

  • Seems the gpmc is not properly configured in dts file. Please, see this post.

  • I tried modifying dts file.

    Now kernel is unable to find a NAND device.

    Starting kernel ...

    [ 0.000000] Booting Linux on physical CPU 0x0
    [ 0.000000] Initializing cgroup subsys cpu
    [ 0.000000] Initializing cgroup subsys cpuacct
    [ 0.000000] Linux version 4.4.12-g3639bea54a (mubeen@MUBEEN-ThinkCentre-M83) (gcc version 5.3.1 20160113 (Linaro GCC 5.3-2016.02) ) #20 PREEMPT Th7
    [ 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] Machine model: TI AM335x BeagleBone Black
    [ 0.000000] cma: Reserved 24 MiB at 0x8d000000
    [ 0.000000] Memory policy: Data cache writeback
    [ 0.000000] CPU: All CPU(s) started in SVC mode.
    [ 0.000000] AM335X ES2.1 (neon )
    [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 64960
    [ 0.000000] Kernel command line: console=ttyO0,115200n8 root=ubi0:rootfs rw ubi.mtd=NAND.file-system,2048 mtdparts=mtdparts=nand.0:128k(NAND.SPL),1
    [ 0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
    [ 0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
    [ 0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
    [ 0.000000] Memory: 227180K/262144K available (5235K kernel code, 205K rwdata, 1668K rodata, 248K init, 230K bss, 10388K reserved, 24576K cma-rese)
    [ 0.000000] Virtual kernel memory layout:
    [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
    [ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
    [ 0.000000] vmalloc : 0xd0800000 - 0xff800000 ( 752 MB)
    [ 0.000000] lowmem : 0xc0000000 - 0xd0000000 ( 256 MB)
    [ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
    [ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
    [ 0.000000] .text : 0xc0008000 - 0xc06c5f74 (6904 kB)
    [ 0.000000] .init : 0xc06c6000 - 0xc0704000 ( 248 kB)
    [ 0.000000] .data : 0xc0704000 - 0xc07377b0 ( 206 kB)
    [ 0.000000] .bss : 0xc0739000 - 0xc0772824 ( 231 kB)
    [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    [ 0.000000] Preemptible hierarchical RCU implementation.
    [ 0.000000] Build-time adjustment of leaf fanout to 32.
    [ 0.000000] NR_IRQS:16 nr_irqs:16 16
    [ 0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
    [ 0.000000] OMAP clockevent source: timer2 at 19200000 Hz
    [ 0.000034] sched_clock: 32 bits at 19MHz, resolution 52ns, wraps every 111848106981ns
    [ 0.000086] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 99544814920 ns
    [ 0.000112] OMAP clocksource: timer1 at 19200000 Hz
    [ 0.001179] clocksource_probe: no matching clocksources found
    [ 0.001566] Console: colour dummy device 80x30
    [ 0.001637] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
    [ 0.001653] This ensures that you still see kernel messages. Please
    [ 0.001667] update your kernel commandline.
    [ 0.001704] Calibrating delay loop... 302.28 BogoMIPS (lpj=1511424)
    [ 0.057694] pid_max: default: 32768 minimum: 301
    [ 0.057978] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [ 0.058011] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [ 0.059560] Initializing cgroup subsys io
    [ 0.059627] Initializing cgroup subsys memory
    [ 0.059703] Initializing cgroup subsys devices
    [ 0.059738] Initializing cgroup subsys freezer
    [ 0.059772] Initializing cgroup subsys perf_event
    [ 0.059805] Initializing cgroup subsys pids
    [ 0.059870] CPU: Testing write buffer coherency: ok
    [ 0.060671] Setting up static identity map for 0x80008200 - 0x80008258
    [ 0.065870] devtmpfs: initialized
    [ 0.094025] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    [ 0.128340] omap_hwmod: debugss: _wait_target_disable failed
    [ 0.133260] omap_hwmod: d_can0: _wait_target_ready failed: -16
    [ 0.133283] omap_hwmod: d_can0: cannot be enabled for reset (3)
    [ 0.137167] omap_hwmod: d_can1: _wait_target_ready failed: -16
    [ 0.137185] omap_hwmod: d_can1: cannot be enabled for reset (3)
    [ 0.206391] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    [ 0.211099] pinctrl core: initialized pinctrl subsystem
    [ 0.213886] NET: Registered protocol family 16
    [ 0.219230] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [ 0.247709] cpuidle: using governor ladder
    [ 0.277687] cpuidle: using governor menu
    [ 0.289192] OMAP GPIO hardware version 0.1
    [ 0.292272] omap_gpio 481ac000.gpio: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_gpio2_pins, deferring probe
    [ 0.293045] omap_gpio 481ae000.gpio: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_gpio3_pins, deferring probe
    [ 0.305282] omap-gpmc 50000000.gpmc: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_emmc_pins, deferring probe
    [ 0.311830] hw-breakpoint: debug architecture 0x4 unsupported.
    [ 0.368233] edma 49000000.edma: TI EDMA DMA engine driver
    [ 0.373556] usbcore: registered new interface driver usbfs
    [ 0.373760] usbcore: registered new interface driver hub
    [ 0.374015] usbcore: registered new device driver usb
    [ 0.374899] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, deferring probe
    [ 0.375018] omap_i2c 4819c000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c2_pins, deferring probe
    [ 0.375372] pps_core: LinuxPPS API ver. 1 registered
    [ 0.375393] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [ 0.375470] PTP clock support registered
    [ 0.377824] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
    [ 0.380302] clocksource: Switched to clocksource timer1
    [ 0.407451] NET: Registered protocol family 2
    [ 0.409196] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
    [ 0.409283] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
    [ 0.409355] TCP: Hash tables configured (established 2048 bind 2048)
    [ 0.409519] UDP hash table entries: 256 (order: 0, 4096 bytes)
    [ 0.409569] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    [ 0.409927] NET: Registered protocol family 1
    [ 0.412024] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
    [ 0.416442] futex hash table entries: 256 (order: -1, 3072 bytes)
    [ 0.441501] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250)
    [ 0.441576] io scheduler noop registered
    [ 0.441613] io scheduler deadline registered
    [ 0.442060] io scheduler cfq registered (default)
    [ 0.445537] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
    [ 0.450992] backlight supply power not found, using dummy regulator
    [ 0.451716] pwm-backlight backlight: invalid default brightness level: 53, using 8
    [ 0.607294] Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
    [ 0.616692] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 94, base_baud = 3000000) is a 8250
    [ 1.272168] console [ttyS0] enabled
    [ 1.293797] loop: module loaded
    [ 1.300947] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    [ 1.307491] ehci-platform: EHCI generic platform driver
    [ 1.313189] ehci-omap: OMAP-EHCI Host Controller driver
    [ 1.318653] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
    [ 1.324925] ohci-platform: OHCI generic platform driver
    [ 1.331977] mousedev: PS/2 mouse device common for all mice
    [ 1.339430] GTP driver installing...
    [ 1.343571] i2c /dev entries driver
    [ 1.350273] cpuidle: enable-method property 'ti,am3352' found operations
    [ 1.357628] sdhci: Secure Digital Host Controller Interface driver
    [ 1.363896] sdhci: Copyright(c) Pierre Ossman
    [ 1.369566] omap_hsmmc 48060000.mmc: Got CD GPIO
    [ 1.411509] Synopsys Designware Multimedia Card Interface Driver
    [ 1.421906] sdhci-pltfm: SDHCI platform and OF driver helper
    [ 1.428542] ledtrig-cpu: registered to indicate activity on CPUs
    [ 1.435436] usbcore: registered new interface driver usbhid
    [ 1.441122] usbhid: USB HID core driver
    [ 1.449511] NET: Registered protocol family 10
    [ 1.456600] sit: IPv6 over IPv4 tunneling driver
    [ 1.463298] NET: Registered protocol family 17
    [ 1.468108] omap_voltage_late_init: Voltage driver support not added
    [ 1.476762] ThumbEE CPU extension supported.
    [ 1.481208] Registering SWP/SWPB emulation handler
    [ 1.494015] omap-gpmc 50000000.gpmc: GPMC revision 6.0
    [ 1.499186] gpmc_mem_init: disabling cs 0 mapped at 0x0-0x1000000
    [ 1.507868] nand: No NAND device found
    [ 1.511856] omap2-nand 8000000.nand: scan failed, may be bus-width mismatch
    [ 1.553545] tps65217 0-0024: TPS65217 ID 0xe version 1.2
    [ 1.559587] 0-0014 supply vdd_ana not found, using dummy regulator
    [ 1.565988] 0-0014 supply vcc_i2c not found, using dummy regulator
    [ 1.700705] <<-GTP-ERROR->> I2C Read: 0x8047, 1 bytes failed, errcode: -121! Process reset.
    [ 1.820332] <<-GTP-ERROR->> GTP i2c test failed time 1.
    [ 1.840674] <<-GTP-ERROR->> I2C Read: 0x8047, 1 bytes failed, errcode: -121! Process reset.
    [ 1.960340] <<-GTP-ERROR->> GTP i2c test failed time 2.
    [ 1.980675] <<-GTP-ERROR->> I2C Read: 0x8047, 1 bytes failed, errcode: -121! Process reset.
    [ 2.100339] <<-GTP-ERROR->> GTP i2c test failed time 3.
    [ 2.120673] <<-GTP-ERROR->> I2C Read: 0x8047, 1 bytes failed, errcode: -121! Process reset.
    [ 2.240333] <<-GTP-ERROR->> GTP i2c test failed time 4.
    [ 2.260682] <<-GTP-ERROR->> I2C Read: 0x8047, 1 bytes failed, errcode: -121! Process reset.
    [ 2.380332] <<-GTP-ERROR->> GTP i2c test failed time 5.
    [ 2.400332] <<-GTP-ERROR->> I2C communication ERROR!
    [ 2.405628] <<-GTP-ERROR->> I2C Read: 0x8140, 6 bytes failed, errcode: -121! Process reset.
    [ 2.530340] <<-GTP-ERROR->> GTP read version failed
    [ 2.535205] <<-GTP-ERROR->> Read version failed.
    [ 2.540143] <<-GTP-ERROR->> I2C Read: 0x41E4, 1 bytes failed, errcode: -121! Process reset.
    [ 2.660676] <<-GTP-ERROR->> I2C Read: 0x41E4, 1 bytes failed, errcode: -121! Process reset.
    [ 2.780675] <<-GTP-ERROR->> I2C Read: 0x41E4, 1 bytes failed, errcode: -121! Process reset.
    [ 2.900671] <<-GTP-ERROR->> I2C Read: 0x41E4, 1 bytes failed, errcode: -121! Process reset.
    [ 3.020671] <<-GTP-ERROR->> I2C Read: 0x41E4, 1 bytes failed, errcode: -121! Process reset.
    [ 3.140679] <<-GTP-ERROR->> I2C Read: 0x41E4, 1 bytes failed, errcode: -121! Process reset.
    [ 3.260337] <<-GTP-ERROR->> I2C read 0x41E4, 1 bytes, double check failed!
    [ 3.267522] <<-GTP-ERROR->> I2C Read: 0x814A, 1 bytes failed, errcode: -121! Process reset.
    [ 3.390676] <<-GTP-ERROR->> I2C Read: 0x814A, 1 bytes failed, errcode: -121! Process reset.
    [ 3.510683] <<-GTP-ERROR->> I2C Read: 0x814A, 1 bytes failed, errcode: -121! Process reset.
    [ 3.630674] <<-GTP-ERROR->> I2C Read: 0x814A, 1 bytes failed, errcode: -121! Process reset.
    [ 3.750675] <<-GTP-ERROR->> I2C Read: 0x814A, 1 bytes failed, errcode: -121! Process reset.
    [ 3.870673] <<-GTP-ERROR->> I2C Read: 0x814A, 1 bytes failed, errcode: -121! Process reset.
    [ 3.990334] <<-GTP-ERROR->> I2C read 0x814A, 1 bytes, double check failed!
    [ 3.997182] <<-GTP-ERROR->> Failed to get sensor_id, No config sent!
    [ 4.003547] <<-GTP-ERROR->> GTP init panel failed.
    [ 4.008962] input: goodix-ts as /devices/virtual/input/input0
    [ 4.015590] i2c i2c-0: Failed to register i2c client tps65217 at 0x24 (-16)
    [ 4.022621] i2c i2c-0: of_i2c: Failure registering /ocp/i2c@44e0b000/tps65217@24
    [ 4.030046] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
    [ 4.038798] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 40 kHz
    [ 4.046820] cpufreq: cpufreq_online: CPU0: Running at unlisted freq: 303157 KHz
    [ 4.054381] cpu cpu0: dev_pm_opp_domain_set_rate: failed to find current OPP for freq 303157894 (-34)
    [ 4.065801] cpufreq: cpufreq_online: CPU0: Unlisted initial frequency changed to: 300000 KHz
    [ 4.075490] UBI error: cannot open mtd NAND.file-system, error -2
    [ 4.090697] vmmcsd_fixed: disabling
    [ 4.096926] UBIFS error (pid: 1): cannot open "ubi0:rootfs", error -19VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0): error -19
    [ 4.110201] Please append a correct "root=" boot option; here are the available partitions:
    [ 4.118641] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
    [ 4.126890] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
    [ 80.800337] random: nonblocking pool is initialized



    [ 1.507868] nand: No NAND device found --
    is the problem due to
    [ 0.305282] omap-gpmc 50000000.gpmc: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_emmc_pins, deferring probe
  • Hi,

    Does the SDK ti-processor-sdk-linux-am335x-evm-03.00.00.04 has supprot for MT29F nand chip?

  • Hi,

    NAND chip is detected. but unable to attach ubi to mtd partition. It shows goog PEB count as 0.

    [ 2.002054] nand: device found, Manufacturer ID: 0xc2, Chip ID: 0xdc
    [ 2.008390] nand: Macronix MX30LF4G18AC
    [ 2.012286] nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
    [ 2.019825] nand: using OMAP_ECC_HAM1_CODE_HW
    [ 2.024225] nand: WARNING: 8000000.nand: the ECC used on your system is too weak compared to the one required by the NAND chip
    [ 2.035816] 10 ofpart partitions found on MTD device 8000000.nand
    [ 2.041933] Creating 10 MTD partitions on "8000000.nand":
    [ 2.047329] 0x000000000000-0x000000020000 : "NAND.SPL"
    [ 2.058090] 0x000000020000-0x000000040000 : "NAND.SPL.backup1"
    [ 2.067400] ftl_cs: FTL header not found.
    [ 2.073236] 0x000000040000-0x000000060000 : "NAND.SPL.backup2"
    [ 2.082470] ftl_cs: FTL header not found.
    [ 2.088179] 0x000000060000-0x000000080000 : "NAND.SPL.backup3"
    [ 2.097411] ftl_cs: FTL header not found.
    [ 2.103183] 0x000000080000-0x0000000c0000 : "NAND.u-boot-spl-os"
    [ 2.114380] 0x0000000c0000-0x0000003c0000 : "NAND.u-boot"
    [ 2.125361] 0x0000003c0000-0x0000003e0000 : "NAND.u-boot-env"
    [ 2.134578] ftl_cs: FTL header not found.
    [ 2.140359] 0x0000003e0000-0x000000400000 : "NAND.u-boot-env.backup1"
    [ 2.150259] ftl_cs: FTL header not found.
    [ 2.156153] 0x000000400000-0x000000c00000 : "NAND.kernel"
    [ 2.167670] 0x000000c00000-0x000020000000 : "NAND.file-system"
    [ 2.253734] ftl_cs: FTL header not found.

    [ 4.794536] cpu cpu0: dev_pm_opp_domain_set_rate: failed to find current OPP for freq 303157894 (-34)
    [ 4.805995] cpufreq: cpufreq_online: CPU0: Unlisted initial frequency changed to: 300000 KHz
    [ 4.815735] ubi0: attaching mtd9
    [ 4.880773] ubi0: scanning is finished
    [ 4.884524] ubi0: empty MTD device detected
    [ 4.888759] *******************************************
    [ 4.894004] good_peb_count:0, corr_peb_count:0
    [ 4.898401] ubi0 error: ubi_early_get_peb: no free eraseblocks
    [ 4.904484] ubi0 error: ubi_attach_mtd_dev: failed to attach mtd9, error -28
    [ 4.911587] UBI error: cannot attach mtd9
    [ 4.924482] vmmcsd_fixed: disabling
    [ 4.930912] UBIFS error (pid: 1): cannot open "ubi0:rootfs", error -19VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0): error -19
    [ 4.944129] Please append a correct "root=" boot option; here are the available partitions:
    [ 4.952586] 1f00 128 mtdblock0 (driver?)
    [ 4.957646] 1f01 128 mtdblock1 (driver?)
    [ 4.962795] 1f02 128 mtdblock2 (driver?)
    [ 4.967847] 1f03 128 mtdblock3 (driver?)
    [ 4.972942] 1f04 256 mtdblock4 (driver?)
    [ 4.977995] 1f05 3072 mtdblock5 (driver?)
    [ 4.983086] 1f06 128 mtdblock6 (driver?)
    [ 4.988136] 1f07 128 mtdblock7 (driver?)
    [ 4.993226] 1f08 8192 mtdblock8 (driver?)
    [ 4.998280] 1f09 512000 mtdblock9 (driver?)
    [ 5.003377] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
    [ 5.011622] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
    [ 80.790432] random: nonblocking pool is initialized

    &gpmc {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&emmc_pins>;
    ranges = <0 0 0x08000000 0x20000000>; /* CS0: 512MB for NAND */
    ti,elm-id = <&elm>;
    nand@0,0 {
    compatible = "ti,omap2-nand";
    reg = <0 0 4>; /* CS0, offset 0, IO size 4 */
    interrupt-parent = <&gpmc>;
    interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */
    <1 IRQ_TYPE_NONE>; /* termcount */
    rb-gpios = <&gpmc 0 GPIO_ACTIVE_HIGH>; /* gpmc_wait0 */
    ti,nand-ecc-opt = "bch8";
    ti,elm-id = <&elm>;
    elm_id = <&elm>;
    ti,nand-xfer-type = "polled";
    gpmc,device-nand = "true";
    gpmc,device-width = <1>;
    gpmc,sync-clk-ps = <0>;
    gpmc,bus-turnaround-ns = <12>;
    gpmc,we-on-ns = <10>;
    gpmc,cs-on-ns = <15>;
    gpmc,rd-cycle-ns = <20>;
    gpmc,wr-cycle-ns = <20>;
    /* nand-on-flash-bbt;*/

    #address-cells = <1>;
    #size-cells = <1>;

    [ 2.002008] nand: device found, Manufacturer ID: 0xc2, Chip ID: 0xdc
    [ 2.008346] nand: Macronix MX30LF4G18AC
    [ 2.012239] nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
    [ 2.019777] nand: using OMAP_ECC_BCH8_CODE_HW_DETECTION_SW
    [ 2.030157] 10 ofpart partitions found on MTD device 8000000.nand
    [ 2.036338] Creating 10 MTD partitions on "8000000.nand":
    [ 2.041784] 0x000000000000-0x000000020000 : "NAND.SPL"
    [ 2.051002] ecc unrecoverable error
    [ 2.054701] ecc unrecoverable error
    [ 2.058369] ecc unrecoverable error
    [ 2.062106] ecc unrecoverable error


    My u boot has OMAP_ECC_BCH8_CODE_HW scheme. I have configured gpmc as for bch8 scheme it is configured as OMAP_ECC_BCH8_CODE_HW_DETECTION_SW :

    as from the code in drivers/mtd/nand/omap2.c
    else if (!strcmp(s, "bch8")) {
    if (info->elm_of_node)
    info->ecc_opt = OMAP_ECC_BCH8_CODE_HW_DETECTION_SW;
    else
    info->ecc_opt = OMAP_ECC_BCH8_CODE_HW;

    if i remove elm node from gpmc device tree probe is failing stating error:
    ELM not available

    if (ecc_needs_elm && !is_elm_present(info, info->elm_of_node)) {
    dev_err(&info->pdev->dev, "ELM not available\n");
    return false;
    }


    if i try to hardcode ecc scheme to OMAP_ECC_BCH8_CODE_HW i see the error:
    2.019881] nand: using OMAP_ECC_BCH8_CODE_HW ECC scheme
    [ 2.025464] 10 ofpart partitions found on MTD device 8000000.nand
    [ 2.031587] Creating 10 MTD partitions on "8000000.nand":
    [ 2.037015] 0x000000000000-0x000000020000 : "NAND.SPL"
    [ 2.045820] ftl_cs: FTL header not found.
    [ 2.051875] 0x000000020000-0x000000040000 : "NAND.SPL.backup1"
    [ 2.061091] ftl_cs: FTL header not found.
    [ 2.066868] 0x000000040000-0x000000060000 : "NAND.SPL.backup2"
    [ 2.076086] ftl_cs: FTL header not found.
    [ 2.081855] 0x000000060000-0x000000080000 : "NAND.SPL.backup3"
    [ 2.091038] ftl_cs: FTL header not found.
    [ 2.096765] 0x000000080000-0x0000000c0000 : "NAND.u-boot-spl-os"
    [ 2.108784] omap2-nand 8000000.nand: uncorrectable bit-flips found
    [ 2.116854] 0x0000000c0000-0x0000003c0000 : "NAND.u-boot"
    [ 2.129180] omap2-nand 8000000.nand: uncorrectable bit-flips found
    [ 2.135413] omap2-nand 8000000.nand: uncorrectable bit-flips found
    [ 2.141612] omap2-nand 8000000.nand: uncorrectable bit-flips found
    [ 2.147774] omap2-nand 8000000.nand: uncorrectable bit-flips found
    [ 2.155789] 0x0000003c0000-0x0000003e0000 : "NAND.u-boot-env"
    [ 2.164967] ftl_cs: FTL header not found.
    [ 2.170844] 0x0000003e0000-0x000000400000 : "NAND.u-boot-env.backup1"
    [ 2.180685] ftl_cs: FTL header not found.
    [ 2.186519] 0x000000400000-0x000000c00000 : "NAND.kernel"
    [ 2.199496] omap2-nand 8000000.nand: uncorrectable bit-flips found
    [ 2.205731] omap2-nand 8000000.nand: uncorrectable bit-flips found
    [ 2.211930] omap2-nand 8000000.nand: uncorrectable bit-flips found
    [ 2.218093] omap2-nand 8000000.nand: uncorrectable bit-flips found
    [ 2.225968] 0x000000c00000-0x000020000000 : "NAND.file-system"
    [ 2.298167] omap2-nand 8000000.nand: uncorrectable bit-flips found
    [ 2.333602] tps65217 0-0024: TPS65217 ID 0xe version 1.2

    [ 4.855668] ubi0: attaching mtd9
    [ 4.920820] ubi0: scanning is finished
    [ 4.924568] ubi0: empty MTD device detected
    [ 4.928801] *******************************************
    [ 4.934047] good_peb_count:0, corr_peb_count:0
    [ 4.938447] ubi0 error: ubi_early_get_peb: no free eraseblocks
    [ 4.944530] ubi0 error: ubi_attach_mtd_dev: failed to attach mtd9, error -28
    [ 4.951630] UBI error: cannot attach mtd9
    [ 4.964510] vmmcsd_fixed: disabling
    [ 4.970934] UBIFS error (pid: 1): cannot open "ubi0:rootfs", error -19VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0): error -19
    [ 4.984146] Please append a correct "root=" boot option; here are the available partitions:
    [ 4.992607] 1f00 128 mtdblock0 (driver?)
    [ 4.997670] 1f01 128 mtdblock1 (driver?)
    [ 5.002833] 1f02 128 mtdblock2 (driver?)
    [ 5.007886] 1f03 128 mtdblock3 (driver?)
    [ 5.012989] 1f04 256 mtdblock4 (driver?)
    [ 5.018043] 1f05 3072 mtdblock5 (driver?)
    [ 5.023136] 1f06 128 mtdblock6 (driver?)
    [ 5.028188] 1f07 128 mtdblock7 (driver?)
    [ 5.033275] 1f08 8192 mtdblock8 (driver?)
    [ 5.038326] 1f09 512000 mtdblock9 (driver?)
    [ 5.043413] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
    [ 5.051657] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
    [ 80.760437] random: nonblocking pool is initialized


    unable to proceed.
    Looking out for any info to proceed
  • How did you fix the NAND detection problem? Was the problem in gpmc timings? For UBI attaching to MTD partition please see this post. You are misusing the rootdelay kernel command line option.

  • Hi

    This is not a problem with rootdelay.
    I have booted from SD card and tried to access /dev/mtd partitions.
    root@am335x-evm:~# flash_eraseall /dev/mtd9
    lists all blocks as bad blocks.
    flash_erase: Skipping bad block at 1f1a0000
    flash_erase: Skipping bad block at 1f1c0000
    flash_erase: Skipping bad block at 1f1e0000
    flash_erase: Skipping bad block at 1f200000
    flash_erase: Skipping bad block at 1f220000
    flash_erase: Skipping bad block at 1f240000
    flash_erase: Skipping bad block at 1f260000
    flash_erase: Skipping bad block at 1f280000
    flash_erase: Skipping bad block at 1f2a0000
    flash_erase: Skipping bad block at 1f2c0000
    flash_erase: Skipping bad block at 1f2e0000
    flash_erase: Skipping bad block at 1f300000
    flash_erase: Skipping bad block at 1f320000
    flash_erase: Skipping bad block at 1f340000
    flash_erase: Skipping bad block at 1f360000
    flash_erase: Skipping bad block at 1f380000
    flash_erase: Skipping bad block at 1f3a0000
    flash_erase: Skipping bad block at 1f3c0000
    flash_erase: Skipping bad block at 1f3e0000
    Erasing 128 Kibyte @ 1f3e0000 -- 100 % complete

    When trying to boot from Nand, it says no free erase blocks.

    [ 4.880773] ubi0: scanning is finished
    [ 4.884524] ubi0: empty MTD device detected
    [ 4.888759] *******************************************
    [ 4.894004] good_peb_count:0, corr_peb_count:0
    [ 4.898401] ubi0 error: ubi_early_get_peb: no free eraseblocks
    [ 4.904484] ubi0 error: ubi_attach_mtd_dev: failed to attach mtd9, error -28
    [ 4.911587] UBI error: cannot attach mtd9
    [ 4.924482] vmmcsd_fixed: disabling
    [ 4.930912] UBIFS error (pid: 1): cannot open "ubi0:rootfs", error -19VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0): error -19
    [ 4.944129] Please append a correct "root=" boot option; here are the available partitions:

    device tree is as below and using OMAP_ECC_BCH8_CODE_HW_DETECTION_SW scheme (it is same in the u-boot, nand read/write working perfectly).

    &gpmc {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&emmc_pins>;
    ranges = <0 0 0x08000000 0x20000000>; /* CS0: 512MB for NAND */
    ti,elm-id = <&elm>;
    nand@0,0 {
    compatible = "ti,omap2-nand";
    reg = <0 0 4>; /* CS0, offset 0, IO size 4 */
    interrupt-parent = <&gpmc>;
    interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */
    <1 IRQ_TYPE_NONE>; /* termcount */
    rb-gpios = <&gpmc 0 GPIO_ACTIVE_HIGH>; /* gpmc_wait0 */
    ti,nand-ecc-opt = "bch8";
    ti,elm-id = <&elm>;
    elm_id = <&elm>;
    gpmc,device-nand = "true";
    gpmc,device-width = <1>;
    gpmc,sync-clk-ps = <0>;
    gpmc,bus-turnaround-ns = <12>;
    gpmc,we-on-ns = <10>;
    gpmc,cs-on-ns = <15>;
    gpmc,rd-cycle-ns = <20>;
    gpmc,wr-cycle-ns = <20>;
    /* nand-on-flash-bbt;*/

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

    Seeking for info.

    Thanks,
    Kagesh
  • Hi,

    Hi

    This is not a problem with rootdelay.
    I have booted from SD card and tried to access /dev/mtd partitions.
    root@am335x-evm:~# flash_eraseall /dev/mtd9
    lists all blocks as bad blocks.
    flash_erase: Skipping bad block at 1f1a0000
    flash_erase: Skipping bad block at 1f1c0000
    flash_erase: Skipping bad block at 1f1e0000
    flash_erase: Skipping bad block at 1f200000
    flash_erase: Skipping bad block at 1f220000
    flash_erase: Skipping bad block at 1f240000
    flash_erase: Skipping bad block at 1f260000
    flash_erase: Skipping bad block at 1f280000
    flash_erase: Skipping bad block at 1f2a0000
    flash_erase: Skipping bad block at 1f2c0000
    flash_erase: Skipping bad block at 1f2e0000
    flash_erase: Skipping bad block at 1f300000
    flash_erase: Skipping bad block at 1f320000
    flash_erase: Skipping bad block at 1f340000
    flash_erase: Skipping bad block at 1f360000
    flash_erase: Skipping bad block at 1f380000
    flash_erase: Skipping bad block at 1f3a0000
    flash_erase: Skipping bad block at 1f3c0000
    flash_erase: Skipping bad block at 1f3e0000
    Erasing 128 Kibyte @ 1f3e0000 -- 100 % complete

    root@am335x-evm:~# nanddump --bb=skipbad /dev/mtd9
    ECC failed: 3
    ECC corrected: 0
    Number of bad blocks: 3999
    Number of bbt blocks: 0
    Not printing binary garbage to tty. Use '-a'
    or '--forcebinary' to override.



    When trying to boot from Nand, it says no free erase blocks.

    [ 4.880773] ubi0: scanning is finished
    [ 4.884524] ubi0: empty MTD device detected
    [ 4.888759] *******************************************
    [ 4.894004] good_peb_count:0, corr_peb_count:0
    [ 4.898401] ubi0 error: ubi_early_get_peb: no free eraseblocks
    [ 4.904484] ubi0 error: ubi_attach_mtd_dev: failed to attach mtd9, error -28
    [ 4.911587] UBI error: cannot attach mtd9
    [ 4.924482] vmmcsd_fixed: disabling
    [ 4.930912] UBIFS error (pid: 1): cannot open "ubi0:rootfs", error -19VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0): error -19
    [ 4.944129] Please append a correct "root=" boot option; here are the available partitions:

    device tree is as below and using OMAP_ECC_BCH8_CODE_HW_DETECTION_SW scheme (it is same in the u-boot, nand read/write working perfectly).

    &gpmc {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&emmc_pins>;
    ranges = <0 0 0x08000000 0x20000000>; /* CS0: 512MB for NAND */
    ti,elm-id = <&elm>;
    nand@0,0 {
    compatible = "ti,omap2-nand";
    reg = <0 0 4>; /* CS0, offset 0, IO size 4 */
    interrupt-parent = <&gpmc>;
    interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */
    <1 IRQ_TYPE_NONE>; /* termcount */
    rb-gpios = <&gpmc 0 GPIO_ACTIVE_HIGH>; /* gpmc_wait0 */
    ti,nand-ecc-opt = "bch8";
    ti,elm-id = <&elm>;
    elm_id = <&elm>;
    gpmc,device-nand = "true";
    gpmc,device-width = <1>;
    gpmc,sync-clk-ps = <0>;
    gpmc,bus-turnaround-ns = <12>;
    gpmc,we-on-ns = <10>;
    gpmc,cs-on-ns = <15>;
    gpmc,rd-cycle-ns = <20>;
    gpmc,wr-cycle-ns = <20>;
    /* nand-on-flash-bbt;*/

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


    Seeking for info.

    Thanks,
    Kagesh
  • Something is not okay here. Your complete NAND is marked as bad so that attaching the UBI fails with no space left on device error.