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.

PROCESSOR-SDK-AM335X: NAND flash interfacing

Part Number: PROCESSOR-SDK-AM335X
Other Parts Discussed in Thread: AM3352, TPS65217, DP83848C

We have the TI SITARA AM335X board.
We are using the Linux Kernel and u-boot.We would like to the perform the NAND operation through Linux Kernel/U-boot
Please let us know the steps for NAND flash read, write and erase operation

  • I am trying to boot linux kernel from flash,


    1)I modified the uboot for mtd partition,It is done

    output from uboot promt

    => mtdparts

    device nand0 <nand.0>, # parts = 10
    #: name size offset mask_flags
    0: NAND.SPL 0x00020000 0x00000000 0
    1: NAND.SPL.backup1 0x00020000 0x00020000 0
    2: NAND.SPL.backup2 0x00020000 0x00040000 0
    3: NAND.SPL.backup3 0x00020000 0x00060000 0
    4: NAND.u-boot-spl-os 0x00040000 0x00080000 0
    5: NAND.u-boot 0x00100000 0x000c0000 0
    6: NAND.u-boot-env 0x00020000 0x001c0000 0
    7: NAND.u-boot-env.backup10x00020000 0x001e0000 0
    8: NAND.kernel 0x00800000 0x00200000 0
    9: NAND.file-system 0x3f600000 0x00a00000 0

    active partition: nand0,0 - (NAND.SPL) 0x00020000 @ 0x00000000

    defaults:
    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),1m(NAND.u-boot),128k(NAND.u-boot-env),128k(NAND.u-boot-env.backup1),8m(NAND.kernel),-(NAND.file-system)
    =>


    from the uboot prompt ,I can get following nand information

    => nand info

    Device 0: nand0, sector size 128 KiB
    Page size 2048 b
    OOB size 64 b
    Erase size 131072 b
    subpagesize 512 b
    options 0x c
    bbt options 0x 8000

    2) changed the dts file

    &am33xx_pinmux {
    bbcape_nand_flash_pins: bbcape_nand_flash_pins {
    pinctrl-single,pins = <
    0x00 (MUX_MODE0 | PIN_INPUT) /* gpmc_ad0.gpmc_ad0 */
    0x04 (MUX_MODE0 | PIN_INPUT) /* gpmc_ad1.gpmc_ad1 */
    0x08 (MUX_MODE0 | PIN_INPUT) /* gpmc_ad2.gpmc_ad2 */
    0x0c (MUX_MODE0 | PIN_INPUT) /* gpmc_ad3.gpmc_ad3 */
    0x10 (MUX_MODE0 | PIN_INPUT) /* gpmc_ad4.gpmc_ad4 */
    0x14 (MUX_MODE0 | PIN_INPUT) /* gpmc_ad5.gpmc_ad5 */
    0x18 (MUX_MODE0 | PIN_INPUT) /* gpmc_ad6.gpmc_ad6 */
    0x1c (MUX_MODE0 | PIN_INPUT) /* gpmc_ad7.gpmc_ad7 */
    0x20 (MUX_MODE0 | PIN_INPUT) /* gpmc_ad8.gpmc_ad8 */
    0x24 (MUX_MODE0 | PIN_INPUT) /* gpmc_ad9.gpmc_ad9 */
    0x28 (MUX_MODE0 | PIN_INPUT) /* gpmc_ad10.gpmc_ad10 */
    0x2c (MUX_MODE0 | PIN_INPUT) /* gpmc_ad11.gpmc_ad11 */
    0x30 (MUX_MODE0 | PIN_INPUT) /* gpmc_ad12.gpmc_ad12 */
    0x34 (MUX_MODE0 | PIN_INPUT) /* gpmc_ad13.gpmc_ad13 */
    0x38 (MUX_MODE0 | PIN_INPUT) /* gpmc_ad14.gpmc_ad14 */
    0x3c (MUX_MODE0 | PIN_INPUT) /* gpmc_ad15.gpmc_ad15 */
    0x70 (MUX_MODE0 | PIN_INPUT_PULLUP ) /* gpmc_wait0.gpmc_wait0 */
    0x74 (MUX_MODE0 | PIN_OUTPUT_PULLUP) /* gpmc_wpn.gpmc_wpn */
    0x7c (MUX_MODE0 | PIN_OUTPUT_PULLUP) /* gpmc_csn0.gpmc_csn0 */
    0x90 (MUX_MODE0 | PIN_OUTPUT) /* gpmc_advn_ale.gpmc_advn_ale */
    0x94 (MUX_MODE0 | PIN_OUTPUT) /* gpmc_oen_ren.gpmc_oen_ren */
    0x98 (MUX_MODE0 | PIN_OUTPUT) /* gpmc_wen.gpmc_wen */
    0x9c (MUX_MODE0 | PIN_OUTPUT) /* gpmc_be0n_cle.gpmc_be0n_cle */
    >;
    };
    };


    &gpmc {
    ranges = <0 0 0 0x01000000>; /* address range = 16MB (minimum GPMC partition) */
    pinctrl-names = "default";
    pinctrl-0 = <&bbcape_nand_flash_pins>;
    nand@0,0 {
    status = "enabled";
    reg = <0 0 4>; /* device IO registers */
    ti,nand-ecc-opt = "bch8";
    ti,elm-id = <&elm>;
    /* generic bindings */
    nand-bus-width = <16>;
    /* vendor specific bindings */
    gpmc,device-width = <2>;
    gpmc,sync-clk-ps = <0>;
    gpmc,cs-on-ns = <0>;
    gpmc,cs-rd-off-ns = <80>;
    gpmc,cs-wr-off-ns = <80>;
    gpmc,adv-on-ns = <0>;
    gpmc,adv-rd-off-ns = <80>;
    gpmc,adv-wr-off-ns = <80>;
    gpmc,we-on-ns = <20>;
    gpmc,we-off-ns = <60>;
    gpmc,oe-on-ns = <20>;
    gpmc,oe-off-ns = <60>;
    gpmc,access-ns = <40>;
    gpmc,rd-cycle-ns = <80>;
    gpmc,wr-cycle-ns = <80>;
    gpmc,wait-pin = <0>;
    gpmc,wait-on-read;
    gpmc,wait-on-write;
    gpmc,bus-turnaround-ns = <0>;
    gpmc,cycle2cycle-delay-ns = <0>;
    gpmc,clk-activation-ns = <0>;
    gpmc,wait-monitoring-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 0x00040000>;
    };
    partition@1 {
    label = "NAND.SPL.backup1";
    reg = <0x00040000 0x00040000>;
    };
    partition@2 {
    label = "NAND.SPL.backup2";
    reg = <0x00080000 0x00040000>;
    };
    partition@3 {
    label = "NAND.SPL.backup3";
    reg = <0x000c0000 0x00040000>;
    };
    partition@4 {
    label = "NAND.u-boot-spl-os";
    reg = <0x00100000 0x00080000>;
    };
    partition@5 {
    label = "NAND.u-boot";
    reg = <0x00180000 0x00100000>;
    };
    partition@6 {
    label = "NAND.u-boot-env";
    reg = <0x00280000 0x00040000>;
    };
    partition@7 {
    label = "NAND.u-boot-env.backup1";
    reg = <0x002c0000 0x00040000>;
    };
    partition@8 {
    label = "NAND.kernel";
    reg = <0x00300000 0x00700000>;
    };
    partition@9 {
    label = "NAND.file-system";
    reg = <0x00a00000 0x3f600000>;
    };
    };
    };

    3) changed kernel configuration

    Device Drivers  --->
      <*> Memory Technology Device (MTD) support  --->
                [*]   Command line partition table parsing
                <*>   Direct char device access to MTD devices
                <*>   Caching block device access to MTD devices
                <*>   NAND Device Support  --->
                            <*>    NAND Flash device on OMAP2 and OMAP3
                <*>   Enable UBI - Unsorted block images  --->

    4) copied the uImage,.dtb file in MMC card to copy it to flash.

    I transferred MLO,uboot.bin images.

    5) boot the kernel

    but I am not able to see the mtd partitions


    sh-4.4# cat /proc/mtd
    dev: size erasesize name

  • Hi Keerti,

    looks like something is missing, maybe some change didn't quite make it. Can you please post the full(!) boot log including U-Boot.

    Then, can you also check if your device tree changes actually made it all the way into the Kernel like this:

    root@am335x-evm:/sys/kernel/debug# ls -al /proc/device-tree/ocp/gpmc@50000000/nand@0\,0/
    
    -r--r--r--    1 root     root             4 Oct 21 17:43 #address-cells
    -r--r--r--    1 root     root             4 Oct 21 17:43 #size-cells
    drwxr-xr-x   12 root     root             0 Oct 19 16:13 .
    drwxr-xr-x    3 root     root             0 Oct 19 16:13 ..
    -r--r--r--    1 root     root            14 Oct 21 17:43 compatible
    -r--r--r--    1 root     root             4 Oct 21 17:43 gpmc,access-ns
    -r--r--r--    1 root     root             4 Oct 21 17:43 gpmc,adv-on-ns
    -r--r--r--    1 root     root             4 Oct 21 17:43 gpmc,adv-rd-off-ns
    -r--r--r--    1 root     root             4 Oct 21 17:43 gpmc,adv-wr-off-ns
    -r--r--r--    1 root     root             4 Oct 21 17:43 gpmc,bus-turnaround-ns
    -r--r--r--    1 root     root             4 Oct 21 17:43 gpmc,clk-activation-ns
    -r--r--r--    1 root     root             4 Oct 21 17:43 gpmc,cs-on-ns
    -r--r--r--    1 root     root             4 Oct 21 17:43 gpmc,cs-rd-off-ns
    -r--r--r--    1 root     root             4 Oct 21 17:43 gpmc,cs-wr-off-ns
    -r--r--r--    1 root     root             4 Oct 21 17:43 gpmc,cycle2cycle-delay-ns
    -r--r--r--    1 root     root             4 Oct 21 17:43 gpmc,device-width
    -r--r--r--    1 root     root             4 Oct 21 17:43 gpmc,oe-off-ns
    -r--r--r--    1 root     root             4 Oct 21 17:43 gpmc,oe-on-ns
    -r--r--r--    1 root     root             4 Oct 21 17:43 gpmc,rd-cycle-ns
    -r--r--r--    1 root     root             4 Oct 21 17:43 gpmc,sync-clk-ps
    -r--r--r--    1 root     root             4 Oct 21 17:43 gpmc,we-off-ns
    -r--r--r--    1 root     root             4 Oct 21 17:43 gpmc,we-on-ns
    -r--r--r--    1 root     root             4 Oct 21 17:43 gpmc,wr-access-ns
    -r--r--r--    1 root     root             4 Oct 21 17:43 gpmc,wr-cycle-ns
    -r--r--r--    1 root     root             4 Oct 21 17:43 gpmc,wr-data-mux-bus-ns
    -r--r--r--    1 root     root             4 Oct 21 17:43 interrupt-parent
    -r--r--r--    1 root     root            16 Oct 21 17:43 interrupts
    -r--r--r--    1 root     root             5 Oct 21 17:43 name
    -r--r--r--    1 root     root             4 Oct 21 17:43 nand-bus-width
    drwxr-xr-x    2 root     root             0 Oct 19 16:13 partition@0
    drwxr-xr-x    2 root     root             0 Oct 19 16:13 partition@1
    drwxr-xr-x    2 root     root             0 Oct 19 16:13 partition@2
    drwxr-xr-x    2 root     root             0 Oct 19 16:13 partition@3
    drwxr-xr-x    2 root     root             0 Oct 19 16:13 partition@4
    drwxr-xr-x    2 root     root             0 Oct 19 16:13 partition@5
    drwxr-xr-x    2 root     root             0 Oct 19 16:13 partition@6
    drwxr-xr-x    2 root     root             0 Oct 19 16:13 partition@7
    drwxr-xr-x    2 root     root             0 Oct 19 16:13 partition@8
    drwxr-xr-x    2 root     root             0 Oct 19 16:13 partition@9
    -r--r--r--    1 root     root            12 Oct 21 17:43 rb-gpios
    -r--r--r--    1 root     root            12 Oct 21 17:43 reg
    -r--r--r--    1 root     root             4 Oct 21 17:43 ti,elm-id
    -r--r--r--    1 root     root             5 Oct 21 17:43 ti,nand-ecc-opt
    -r--r--r--    1 root     root            13 Oct 21 17:43 ti,nand-xfer-type
    root@am335x-evm:/sys/kernel/debug#

    Regards, Andreas

  • keerti jain said:
    3) changed kernel configuration

    Also when I check the configurations enabled for MTD support on our AM335x EVM I get all of the following... You might want to double-check that there isn't something missing on your end:

    $ grep '^CO.*MTD' .config
    CONFIG_MTD=y
    CONFIG_MTD_TESTS=m
    CONFIG_MTD_CMDLINE_PARTS=y
    CONFIG_MTD_OF_PARTS=y
    CONFIG_MTD_BLKDEVS=y
    CONFIG_MTD_BLOCK=y
    CONFIG_MTD_MAP_BANK_WIDTH_1=y
    CONFIG_MTD_MAP_BANK_WIDTH_2=y
    CONFIG_MTD_MAP_BANK_WIDTH_4=y
    CONFIG_MTD_CFI_I1=y
    CONFIG_MTD_CFI_I2=y
    CONFIG_MTD_M25P80=y
    CONFIG_MTD_NAND_ECC=y
    CONFIG_MTD_NAND=y
    CONFIG_MTD_NAND_DENALI=y
    CONFIG_MTD_NAND_DENALI_DT=y
    CONFIG_MTD_NAND_OMAP2=y
    CONFIG_MTD_NAND_OMAP_BCH=y
    CONFIG_MTD_NAND_OMAP_BCH_BUILD=y
    CONFIG_MTD_NAND_IDS=y
    CONFIG_MTD_NAND_BRCMNAND=y
    CONFIG_MTD_SPI_NOR=y
    CONFIG_MTD_UBI=y
    CONFIG_MTD_UBI_WL_THRESHOLD=4096
    CONFIG_MTD_UBI_BEB_LIMIT=20

    Regards, Andreas

  • hi ,

    Here is the log 


    U-Boot SPL 2017.03 (Jun 12 2018 - 19:52:37)
    Timed out in wait_for_event: status=0000
    Check if pads/pull-ups of bus are properly configured
    Trying to boot from MMC1
    reading uboot.env
    reading u-boot.img
    reading u-boot.img


    U-Boot 2017.03 (Jun 12 2018 - 19:52:37 +0530)

    CPU : AM335X-GP rev 2.1
    Model: TI AM335x EVM
    DRAM: 256 MiB
    NAND: 1024 MiB
    MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
    reading uboot.env
    ERROR: No USB device found

    at drivers/usb/gadget/ether.c:2709/usb_ether_init()
    <ethaddr> not set. Validating first E-fuse MAC
    Net: eth0: ethernet@4a100000
    Hit any key to stop autoboot: 0
    switch to partitions #0, OK
    mmc0 is current device
    SD/MMC found on device 0
    reading boot.scr
    ** Unable to read file boot.scr **
    reading uEnv.txt
    210 bytes read in 5 ms (41 KiB/s)
    Loaded env from uEnv.txt
    Importing environment from mmc0 ...
    Running uenvcmd ...
    reading uImage
    3591936 bytes read in 398 ms (8.6 MiB/s)
    reading am335x-vci.dtb
    39886 bytes read in 10 ms (3.8 MiB/s)
    ## Booting kernel from Legacy Image at 80007fc0 ...
    Image Name: Linux-4.9.28
    Created: 2019-11-21 8:05:40 UTC
    Image Type: ARM Linux Kernel Image (uncompressed)
    Data Size: 3591872 Bytes = 3.4 MiB
    Load Address: 80008000
    Entry Point: 80008000
    Verifying Checksum ... OK
    ## Flattened Device Tree blob at 80f80000
    Booting using the fdt blob at 0x80f80000
    XIP Kernel Image ... OK
    Loading Device Tree to 8df1e000, end 8df2abcd ... OK

    Starting kernel ...


    [ 0.000000] Booting Linux on physical CPU 0x0
    [ 0.000000] Linux version 4.9.28 (root@keerti-VirtualBox) (gcc version 7.2.1
    [ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
    [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instructio
    [ 0.000000] OF: fdt:Machine model: TI AM335x BeagleBone Black
    [ 0.000000] efi: Getting EFI parameters from FDT:
    [ 0.000000] efi: UEFI not found.
    [ 0.000000] cma: Reserved 48 MiB at 0x8a800000
    [ 0.000000] Memory policy: Data cache writeback
    [ 0.000000] CPU: All CPU(s) started in SVC mode.
    [ 0.000000] AM335X ES2.1 (sgx neon)
    [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pag
    [ 0.000000] Kernel command line: console=ttyO0,115200n8 root=/dev/mmcblk0p2 r
    [ 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: 198332K/262144K available (7168K kernel code, 279K rwdata
    [ 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 - 0xc0800000 (8160 kB)
    [ 0.000000] .init : 0xc0b00000 - 0xc0c00000 (1024 kB)
    [ 0.000000] .data : 0xc0c00000 - 0xc0c45f28 ( 280 kB)
    [ 0.000000] .bss : 0xc0c45f28 - 0xc0c8a1b4 ( 273 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 interrup
    [ 0.000000] OMAP clockevent source: timer2 at 24000000 Hz
    [ 0.000027] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478
    [ 0.000062] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max
    [ 0.000082] OMAP clocksource: timer1 at 24000000 Hz
    [ 0.000419] clocksource_probe: no matching clocksources found
    [ 0.000745] Console: colour dummy device 80x30
    [ 0.000791] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
    [ 0.000804] This ensures that you still see kernel messages. Please
    [ 0.000816] update your kernel commandline.
    [ 0.000857] Calibrating delay loop... 398.13 BogoMIPS (lpj=1990656)
    [ 0.048299] pid_max: default: 32768 minimum: 301
    [ 0.048531] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [ 0.048554] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [ 0.049981] CPU: Testing write buffer coherency: ok
    [ 0.050601] Setting up static identity map for 0x80100000 - 0x80100060
    [ 0.052181] EFI services will not be available.
    [ 0.054839] devtmpfs: initialized
    [ 0.079278] VFP support v0.3: implementor 41 architecture 3 part 30 variant c
    [ 0.079887] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, ma
    [ 0.079933] futex hash table entries: 256 (order: -1, 3072 bytes)
    [ 0.086146] pinctrl core: initialized pinctrl subsystem
    [ 0.088613] NET: Registered protocol family 16
    [ 0.092267] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [ 0.118468] omap_hwmod: debugss: _wait_target_disable failed
    [ 0.198302] cpuidle: using governor ladder
    [ 0.228287] cpuidle: using governor menu
    [ 0.240395] OMAP GPIO hardware version 0.1
    [ 0.262963] platform 44e3e000.rtc: Cannot lookup hwmod 'rtc'
    [ 0.271066] hw-breakpoint: debug architecture 0x4 unsupported.
    [ 0.324402] edma 49000000.edma: TI EDMA DMA engine driver
    [ 0.331088] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wk
    [ 0.331358] media: Linux media interface: v0.10
    [ 0.331470] Linux video capture interface: v2.00
    [ 0.331552] pps_core: LinuxPPS API ver. 1 registered
    [ 0.331567] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giome
    [ 0.331613] PTP clock support registered
    [ 0.331688] EDAC MC: Ver: 3.0.0
    [ 0.333732] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
    [ 0.334380] Advanced Linux Sound Architecture Driver Initialized.
    [ 0.336708] clocksource: Switched to clocksource timer1
    [ 0.357569] NET: Registered protocol family 2
    [ 0.358978] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
    [ 0.359047] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
    [ 0.359103] TCP: Hash tables configured (established 2048 bind 2048)
    [ 0.359225] UDP hash table entries: 256 (order: 0, 4096 bytes)
    [ 0.359261] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    [ 0.359518] NET: Registered protocol family 1
    [ 0.360279] RPC: Registered named UNIX socket transport module.
    [ 0.360307] RPC: Registered udp transport module.
    [ 0.360320] RPC: Registered tcp transport module.
    [ 0.360333] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [ 0.361938] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counter
    [ 0.366288] workingset: timestamp_bits=14 max_order=16 bucket_order=2
    [ 0.382167] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [ 0.384018] NFS: Registering the id_resolver key type
    [ 0.384109] Key type id_resolver registered
    [ 0.384125] Key type id_legacy registered
    [ 0.384212] ntfs: driver 2.1.32 [Flags: R/O].
    [ 0.388067] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 2
    [ 0.388101] io scheduler noop registered
    [ 0.388116] io scheduler deadline registered
    [ 0.388440] io scheduler cfq registered (default)
    [ 0.390228] pinctrl-single 44e10800.pinmux: please update dts to use #pinctrl
    [ 0.391095] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
    [ 0.518695] Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
    [ 0.526141] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 158, base_baud =
    [ 1.118851] console [ttyS0] enabled
    [ 1.125520] omap_rng 48310000.rng: OMAP Random Number Generator ver. 20
    [ 1.132515] [drm] Initialized
    [ 1.162562] brd: module loaded
    [ 1.178332] loop: module loaded
    [ 1.185838] libphy: Fixed MDIO Bus: probed
    [ 1.266845] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
    [ 1.273007] davinci_mdio 4a101000.mdio: detected phy mask fffffff5
    [ 1.279521] libphy: ### Retrieved PHY-ID:3625CC2
    [ 1.285697] libphy: ### Retrieved PHY-ID:20005C90
    [ 1.291405] libphy: 4a101000.mdio: probed
    [ 1.295471] davinci_mdio 4a101000.mdio: phy[1]: device 4a101000.mdio:01, driv
    [ 1.303665] davinci_mdio 4a101000.mdio: phy[3]: device 4a101000.mdio:03, driv
    [ 1.314920] cpsw 4a100000.ethernet: Detected MACID = 98:84:e3:a7:6c:82
    [ 1.321947] cpsw 4a100000.ethernet: cpts: overflow check period 500 (jiffies)
    [ 1.331561] cpsw 4a100000.ethernet: cpsw: Detected MACID = 98:84:e3:a7:6c:84
    [ 1.341476] mousedev: PS/2 mouse device common for all mice
    [ 1.347885] i2c /dev entries driver
    [ 1.354692] cpuidle: enable-method property 'ti,am3352' found operations
    [ 1.363370] omap_hsmmc 48060000.mmc: Got CD GPIO
    [ 1.489048] leds-gpio leds: Led beaglebone:green:usr3 renamed to beaglebone:g
    [ 1.500282] ledtrig-cpu: registered to indicate activity on CPUs
    [ 1.512602] pinctrl-single 44e10800.pinmux: pin PIN107 already requested by l
    [ 1.523179] pinctrl-single 44e10800.pinmux: pin-107 (48038000.mcasp) status -
    [ 1.530729] pinctrl-single 44e10800.pinmux: could not request pin 107 (PIN107
    [ 1.542426] davinci-mcasp 48038000.mcasp: Error applying setting, reverse thi
    [ 1.550459] davinci-mcasp: probe of 48038000.mcasp failed with error -22
    [ 1.560642] NET: Registered protocol family 10
    [ 1.568160] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
    [ 1.574218] mmc0: host does not support reading read-only switch, assuming wr
    [ 1.582643] mmc0: new high speed SDHC card at address aaaa
    [ 1.583887] mmcblk0: mmc0:aaaa SL08G 7.40 GiB
    [ 1.591185] mmcblk0: p1 p2
    [ 1.602103] NET: Registered protocol family 17
    [ 1.607279] Key type dns_resolver registered
    [ 1.611990] omap_voltage_late_init: Voltage driver support not added
    [ 1.656844] tps65217 0-0024: Read from reg 0x16 failed
    [ 1.662048] vdds_dpr: failed to enable
    [ 1.665834] tps65217 0-0024: failed to register tps65217-pmic regulator
    [ 1.672589] tps65217-pmic: probe of tps65217-pmic failed with error -121
    [ 1.680460] tps65217 0-0024: Failed to read revision register: -121
    [ 1.687453] tps65217: probe of 0-0024 failed with error -121
    [ 1.716032] random: fast init done
    [ 1.723455] tda998x 0-0070: Error -121 writing to cec:0xff
    [ 1.729160] tda998x 0-0070: set_page 000a err -121
    [ 1.796844] tda998x 0-0070: set_page 000a err -121
    [ 1.866809] tda998x 0-0070: set_page 0001 err -121
    [ 1.871705] tda998x 0-0070: set_page 0001 err -121
    [ 1.876620] tda998x 0-0070: set_page 0200 err -121
    [ 1.881545] tda998x 0-0070: set_page 0201 err -121
    [ 1.886460] tda998x 0-0070: set_page 0202 err -121
    [ 1.891382] tda998x 0-0070: set_page 0203 err -121
    [ 1.896294] tda998x 0-0070: set_page 0204 err -121
    [ 1.901215] tda998x 0-0070: set_page 0205 err -121
    [ 1.906112] tda998x 0-0070: set_page 020e err -121
    [ 1.911040] tda998x 0-0070: set_page 0211 err -121
    [ 1.915952] tda998x 0-0070: set_page 0207 err -121
    [ 1.920875] tda998x 0-0070: set_page 0208 err -121
    [ 1.925785] tda998x 0-0070: set_page 0209 err -121
    [ 1.930706] tda998x 0-0070: set_page 020a err -121
    [ 1.935617] tda998x 0-0070: set_page 0206 err -121
    [ 1.940537] tda998x 0-0070: set_page 0027 err -121
    [ 1.945446] tda998x 0-0070: set_page 0000 err -121
    [ 1.950368] tda998x 0-0070: set_page 0002 err -121
    [ 1.955405] tilcdc 4830e000.lcdc: failed to bind 0-0070 (ops tda998x_ops): -6
    [ 1.962936] tilcdc 4830e000.lcdc: master bind failed: -6
    [ 1.968639] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
    [ 1.975774] hctosys: unable to open rtc device (rtc0)
    [ 1.981943] ALSA device list:
    [ 1.984953] No soundcards found.
    [ 1.991811] EXT4-fs (mmcblk0p2): mounting ext3 file system using the ext4 sub
    [ 2.220285] EXT4-fs (mmcblk0p2): warning: mounting fs with errors, running e2
    [ 2.232149] EXT4-fs (mmcblk0p2): recovery complete
    [ 2.238804] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. O
    [ 2.247119] VFS: Mounted root (ext3 filesystem) on device 179:2.
    [ 2.256477] devtmpfs: mounted
    [ 2.262848] Freeing unused kernel memory: 1024K (c0b00000 - c0c00000)
    /sbin/init: /lib/libuuid.so.1: no version information available (required by /li
    [ 2.683727] systemd[1]: System time before build time, advancing clock.
    [ 2.763375] systemd[1]: systemd 234 running in system mode. (+PAM -AUDIT -SEL -SECCOMP +BLKID -ELFUTILS +KMOD -IDN2 -IDN default-hierarchy=hybrid)
    [ 2.785643] systemd[1]: Detected architecture arm.

    Welcome to Arago 2018.10!

    [ 2.828439] systemd[1]: Set hostname to <am335x-evm>.
    [ 3.783104] systemd[1]: Created slice User and Session Slice.
    [ OK ] Created slice User and Session Slice.
    [ 3.817835] systemd[1]: Listening on Syslog Socket.
    [ OK ] Listening on Syslog Socket.
    [ 3.847803] systemd[1]: Started Forward Password Requests to Wall Directory W
    [ OK ] Started Forward Password Requests to Wall Directory Watch.
    [ 3.887971] systemd[1]: Started Dispatch Password Requests to Console Directo
    [ OK ] Started Dispatch Password Requests to Console Directory Watch.
    [ 3.927656] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
    [ OK ] Listening on /dev/initctl Compatibility Named Pipe.
    [ 3.968270] systemd[1]: Listening on Network Service Netlink Socket.
    [ OK ] Listening on Network Service Netlink Socket.
    [ 4.007803] systemd[1]: Listening on udev Control Socket.
    [ OK ] Listening on udev Control Socket.
    [ OK ] Listening on udev Kernel Socket.
    [ OK ] Reached target Remote File Systems.
    [ OK ] Reached target Paths.
    [ OK ] Created slice System Slice.
    [ OK ] Created slice system-serial\x2dgetty.slice.
    Mounting Kernel Debug File System...
    [ OK ] Created slice system-getty.slice.
    Mounting POSIX Message Queue File System...
    [ OK ] Reached target Slices.
    [ OK ] Listening on Journal Socket.
    Starting Create list of required st…ce nodes for the current kernel...
    Starting Remount Root and Kernel File Systems...
    Starting Load Kernel Modules...
    [ OK ] Reached target Swap.
    Mounting Temporary Directory (/tmp)...
    [ OK ] Listening on Journal Socket (/dev/log).
    Starting Journal Service...
    [ OK ] Listening on Process Core Dump Socket.
    [FAILED] Failed to mount Kernel Debug File System.
    See 'systemctl status sys-kernel-debug.mount' for details.
    [FAILED] Failed to mount POSIX Message Queue File System.
    See 'systemctl status dev-mqueue.mount' for details.
    [ OK ] Started Create list of required sta…vice nodes for the current kernel.
    [FAILED] Failed to start Remount Root and Kernel File Systems.
    See 'systemctl status systemd-remount-fs.service' for details.
    [FAILED] Failed to start Load Kernel Modules.
    See 'systemctl status systemd-modules-load.service' for details.
    [FAILED] Failed to mount Temporary Directory (/tmp).
    See 'systemctl status tmp.mount' for details.
    [DEPEND] Dependency failed for Network Time Synchronization.
    [DEPEND] Dependency failed for Network Name Resolution.
    [ OK ] Started Journal Service.
    [ OK ] Reached target Host and Network Name Lookups.
    [ OK ] Reached target System Time Synchronized.
    Mounting Kernel Configuration File System...
    Starting Apply Kernel Variables...
    Starting Flush Journal to Persistent Storage...
    Starting udev Coldplug all Devices...
    Starting Create Static Device Nodes in /dev...
    [FAILED] Failed to mount Kernel Configuration File System.
    See 'systemctl status sys-kernel-config.mount' for details.
    [ OK ] Started Apply Kernel Variables.
    [ OK ] Started Create Static Device Nodes in /dev.
    [ 5.899787] systemd-journald[92]: Received request to flush runtime journal f
    Starting udev Kernel Device Manager...
    [ OK ] Reached target Local File Systems (Pre).
    Mounting /media/ram...
    Mounting /var/volatile...
    [ OK ] Started Flush Journal to Persistent Storage.
    [FAILED] Failed to mount /media/ram.
    See 'systemctl status media-ram.mount' for details.
    [DEPEND] Dependency failed for Local File Systems.
    [FAILED] Failed to mount /var/volatile.
    See 'systemctl status var-volatile.mount' for details.
    [DEPEND] Dependency failed for Bind mount volatile /srv.
    [DEPEND] Dependency failed for Bind mount volatile /var/cache.
    [DEPEND] Dependency failed for Bind mount volatile /var/lib.
    [DEPEND] Dependency failed for Bind mount volatile /var/spool.
    [ OK ] Started udev Kernel Device Manager.
    Starting Network Service...
    [ OK ] Reached target Login Prompts.
    Starting Synchronize System and HW clocks...
    [ OK ] Closed Syslog Socket.
    [ OK ] Reached target Timers.
    [ OK ] Reached target Sockets.
    Starting Load/Save Random Seed...
    [ OK ] Started Emergency Shell.
    [ OK ] Reached target Emergency Mode.
    Starting Create Volatile Files and Directories...
    [FAILED] Failed to start Synchronize System and HW clocks.
    See 'systemctl status sync-clocks.service' for details.
    [ OK ] Started Load/Save Random Seed.
    [ OK ] Started Network Service.
    [ OK ] Reached target Network.
    [ OK ] Started Create Volatile Files and Directories.
    Starting Update UTMP about System Boot/Shutdown...
    Mounting Kernel Configuration File System...
    [FAILED] Failed to mount Kernel Configuration File System.
    See 'systemctl status sys-kernel-config.mount' for details.
    [ OK ] Started Update UTMP about System Boot/Shutdown.
    Starting Update UTMP about System Runlevel Changes...
    [ OK ] Started Update UTMP about System Runlevel Changes.
    [ 9.979312] omap_rtc 44e3e000.rtc: _od_fail_runtime_resume: FIXME: missing hw
    [ 10.087168] Unhandled fault: external abort on non-linefetch (0x1028) at 0xf9
    [ 10.094903] pgd = cf7c8000
    [ 10.097629] [f9e3e054] *pgd=44e11452(bad)
    [ 10.101696] Internal error: : 1028 [#1] PREEMPT ARM
    [ 10.106602] Modules linked in: omap_wdt(+) rtc_omap(+) sch_fq_codel
    [ 10.112958] CPU: 0 PID: 126 Comm: systemd-udevd Not tainted 4.9.28 #148
    [ 10.119608] Hardware name: Generic AM33XX (Flattened Device Tree)
    [ 10.125736] task: ca04a100 task.stack: cf758000
    [ 10.130342] PC is at omap_rtc_probe+0x3dc/0x4fc [rtc_omap]
    [ 10.135872] LR is at omap_rtc_probe+0x120/0x4fc [rtc_omap]
    [ 10.141392] pc : [<bf007198>] lr : [<bf006edc>] psr: 200b0113
    [ 10.141392] sp : cf759c80 ip : cf759c80 fp : cf759cb4
    [ 10.152931] r10: cf77b8e4 r9 : 00000003 r8 : 00000003
    [ 10.158186] r7 : cf72b880 r6 : cf139c00 r5 : cf139c10 r4 : cf72b950
    [ 10.164747] r3 : f9e3e000 r2 : 00000001 r1 : 00000005 r0 : cf72b950
    [ 10.171314] Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
    [ 10.178488] Control: 10c5387d Table: 8f7c8019 DAC: 00000051
    [ 10.184265] Process systemd-udevd (pid: 126, stack limit = 0xcf758208)
    [ 10.190828] Stack: (0xcf759c80 to 0xcf75a000)
    [ 10.195226] 9c80: cf139c10 00000000 cf139c18 cf139c10 cf139c10 cf139c10 fffff
    [ 10.203457] 9ca0: fffffdfb 00000003 cf759cd4 cf759cb8 c0517eb8 bf006dc8 c0c7f
    [ 10.211689] 9cc0: 00000000 bf0079ac cf759cfc cf759cd8 c0516460 c0517e6c cf139
    [ 10.219919] 9ce0: cf139c44 00000000 00000001 00000003 cf759d1c cf759d00 c0516
    [ 10.228151] 9d00: 00000000 bf0079ac c051654c 00000000 cf759d44 cf759d20 c0514
    [ 10.236380] 9d20: cf03540c cf132930 cf4f6d34 bf0079ac cf4f6d00 c0c2ef28 cf759
    [ 10.244611] 9d40: c0515d10 c051447c cf759d7c cf759d58 c05158d8 c0515cf8 bf007
    [ 10.252842] 9d60: bf0079ac 00000000 bf00a000 cf72bbc0 cf759d94 cf759d80 c0516
    [ 10.261073] 9d80: c0c2ef28 00000000 cf759dac cf759d98 c0517e10 c0516d74 ffffe
    [ 10.269304] 9da0: cf759dbc cf759db0 bf00a01c c0517dd4 cf759e34 cf759dc0 c0101
    [ 10.277535] 9dc0: fffff000 cffcdd94 cf77d4c0 cf001e40 ffffe000 cffcdd94 cf77d
    [ 10.285765] 9de0: ffffe000 00008fb5 00000003 cf77b8e4 cf759e2c cf759e00 c01ff
    [ 10.293996] 9e00: 00000001 d0bab000 00000001 00000005 bf007a00 bf007a00 00000
    [ 10.302226] 9e20: cf72bbc0 00000001 cf759e5c cf759e38 c01b6a78 c01016c4 cf77b
    [ 10.310458] 9e40: cf759f44 00000001 cf77b8c0 bf007a00 cf759f1c cf759e60 c0193
    [ 10.318689] 9e60: bf007a0c 00007fff bf007a00 c0190bb0 bf000000 c09941b8 c0994
    [ 10.326920] 9e80: bf007b14 c0994184 00000000 c080423c bf007bc4 00000000 bf007
    [ 10.335150] 9ea0: cf759eec cf759eb0 c02173d0 c0216f64 d0bab000 00000000 00000
    [ 10.343381] 9ec0: 00000000 00000000 00000000 00000000 00000000 00000000 00000
    [ 10.351611] 9ee0: 00000000 00000000 00000000 00000000 7fffffff 00000000 00000
    [ 10.359842] 9f00: 0000017b c0107d04 cf758000 00000000 cf759fa4 cf759f20 c0193
    [ 10.368072] 9f20: 7fffffff 00000000 00000003 cf759f38 c01d6b6c d0bab000 00004
    [ 10.376303] 9f40: 00000000 d0bab000 00004608 d0bad978 d0bad89b d0baedd8 00001
    [ 10.384533] 9f60: 00000000 00000000 00000000 000011c4 00000016 00000017 00000
    [ 10.392762] 9f80: 00000009 00000000 00000000 00000000 00000001 00000000 00000
    [ 10.400992] 9fa0: c0107b40 c0193cc0 00000000 00000001 00000007 b6ecb0c4 00000
    [ 10.409223] 9fc0: 00000000 00000001 00000000 0000017b 00000000 7f5b0dec 00000
    [ 10.417453] 9fe0: be97e9a0 be97e990 b6ec3c58 b6dfda82 800b0030 00000007 00000
    [ 10.425667] Backtrace:
    [ 10.428185] [<bf006dbc>] (omap_rtc_probe [rtc_omap]) from [<c0517eb8>] (platf
    [ 10.437462] r8:00000003 r7:fffffdfb r6:bf0079ac r5:ffffffed r4:cf139c10
    [ 10.444211] [<c0517e60>] (platform_drv_probe) from [<c0516460>] (driver_probe
    [ 10.453135] r7:bf0079ac r6:00000000 r5:cf139c10 r4:c0c7fcf4
    [ 10.458834] [<c0516294>] (driver_probe_device) from [<c05165f8>] (__driver_at
    [ 10.467324] r9:00000003 r8:00000001 r7:00000000 r6:cf139c44 r5:bf0079ac r4:c
    [ 10.475129] [<c051654c>] (__driver_attach) from [<c05144c4>] (bus_for_each_de
    [ 10.483352] r7:00000000 r6:c051654c r5:bf0079ac r4:00000000
    [ 10.489058] [<c0514470>] (bus_for_each_dev) from [<c0515d10>] (driver_attach+
    [ 10.497107] r6:c0c2ef28 r5:cf4f6d00 r4:bf0079ac
    [ 10.501762] [<c0515cec>] (driver_attach) from [<c05158d8>] (bus_add_driver+0x
    [ 10.509817] [<c0515740>] (bus_add_driver) from [<c0516de8>] (driver_register+
    [ 10.517867] r7:cf72bbc0 r6:bf00a000 r5:00000000 r4:bf0079ac
    [ 10.523564] [<c0516d68>] (driver_register) from [<c0517e10>] (__platform_driv
    [ 10.532658] r5:00000000 r4:c0c2ef28
    [ 10.536277] [<c0517dc8>] (__platform_driver_register) from [<bf00a01c>] (omap
    [ 10.546765] r5:00000000 r4:ffffe000
    [ 10.550387] [<bf00a000>] (omap_rtc_driver_init [rtc_omap]) from [<c0101704>]
    [ 10.560028] [<c01016b8>] (do_one_initcall) from [<c01b6a78>] (do_init_module+
    [ 10.568167] r8:00000001 r7:cf72bbc0 r6:cf77b8c0 r5:00000001 r4:bf007a00
    [ 10.574923] [<c01b6a10>] (do_init_module) from [<c0193508>] (load_module+0x1b
    [ 10.582974] r7:bf007a00 r6:cf77b8c0 r5:00000001 r4:cf759f44
    [ 10.588674] [<c0191a04>] (load_module) from [<c0193d58>] (SyS_finit_module+0x
    [ 10.596555] r10:00000000 r9:cf758000 r8:c0107d04 r7:0000017b r6:b6ecb0c4 r5:
    [ 10.604424] r4:00000000
    [ 10.606992] [<c0193cb4>] (SyS_finit_module) from [<c0107b40>] (ret_fast_sysca
    [ 10.615213] r6:00000000 r5:00000001 r4:00000000
    [ 10.619866] Code: eb58e4f8 e2900000 13a00001 eaffff1f (e5d37054)
    [ 10.626000] ---[ end trace f0e2a78f7e4918f1 ]---
    [ OK ] Started udev Coldplug all Devices.
    You are in emergency mode. After logging in, type "journalctl -xb" to view
    system logs, "systemctl reboot" to reboot, "systemctl default" or ^D to boot
    into default mode.
    Press Enter for maintenance
    (or press Control-D to continue): [ 12.482690] remoteproc remoteproc0: wkup_m3
    [ 13.247714] net eth0: initializing cpsw version 1.12 (0)
    [ 13.253109] net eth0: initialized cpsw ale version 1.4
    [ 13.316426] net eth0: ALE Table size 1024
    [ 13.467502] NS DP83848C 10/100 Mbps PHY 4a101000.mdio:03: attached PHY driver
    [ 13.597171] remoteproc remoteproc0: powering up wkup_m3
    [ 13.616234] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    [ 13.663109] remoteproc remoteproc0: Booting fw image am335x-pm-firmware.elf,
    [ 13.663488] wkup_m3_ipc 44e11324.wkup_m3_ipc: CM3 Firmware Version = 0x192
    [ 13.682411] remoteproc remoteproc0: remote processor wkup_m3 is now up
    [ 13.988494] net eth1: initializing cpsw version 1.12 (0)
    [ 14.147482] Generic PHY 4a101000.mdio:01: attached PHY driver [Generic PHY] (
    [ 14.205263] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready

    sh-4.4#

    sh-4.4# cd /sys/kernel/debug/
    sh-4.4# ls -al /proc/device-tree/o
    ocp/ opp_table0/
    sh-4.4# ls -al /proc/device-tree/ocp/gp
    gpio@44e07000/ gpio@4804c000/ gpio@481ac000/ gpio@481ae000/ gpmc@50000000/
    sh-4.4# ls -al /proc/device-tree/ocp/gp[ 139.476807] random: crng init done
    mc\@50000000/na
    name nand@0,0/
    sh-4.4# ls -al /proc/device-tree/ocp/gpmc\@50000000/nand\@0\,0/
    total 0
    -r--r--r-- 1 root root 4 Dec 16 03:34 #address-cells
    -r--r--r-- 1 root root 4 Dec 16 03:34 #size-cells
    drwxr-xr-x 12 root root 0 Dec 16 03:34 .
    drwxr-xr-x 3 root root 0 Dec 16 03:33 ..
    -r--r--r-- 1 root root 4 Dec 16 03:34 gpmc,access-ns
    -r--r--r-- 1 root root 4 Dec 16 03:34 gpmc,adv-on-ns
    -r--r--r-- 1 root root 4 Dec 16 03:34 gpmc,adv-rd-off-ns
    -r--r--r-- 1 root root 4 Dec 16 03:34 gpmc,adv-wr-off-ns
    -r--r--r-- 1 root root 4 Dec 16 03:34 gpmc,bus-turnaround-ns
    -r--r--r-- 1 root root 4 Dec 16 03:34 gpmc,clk-activation-ns
    -r--r--r-- 1 root root 4 Dec 16 03:34 gpmc,cs-on-ns
    -r--r--r-- 1 root root 4 Dec 16 03:34 gpmc,cs-rd-off-ns
    -r--r--r-- 1 root root 4 Dec 16 03:34 gpmc,cs-wr-off-ns
    -r--r--r-- 1 root root 4 Dec 16 03:34 gpmc,cycle2cycle-delay- ns
    -r--r--r-- 1 root root 4 Dec 16 03:34 gpmc,device-width
    -r--r--r-- 1 root root 4 Dec 16 03:34 gpmc,oe-off-ns
    -r--r--r-- 1 root root 4 Dec 16 03:34 gpmc,oe-on-ns
    -r--r--r-- 1 root root 4 Dec 16 03:34 gpmc,rd-cycle-ns
    -r--r--r-- 1 root root 4 Dec 16 03:34 gpmc,sync-clk-ps
    -r--r--r-- 1 root root 4 Dec 16 03:34 gpmc,wait-monitoring-ns
    -r--r--r-- 1 root root 0 Dec 16 03:34 gpmc,wait-on-read
    -r--r--r-- 1 root root 0 Dec 16 03:34 gpmc,wait-on-write
    -r--r--r-- 1 root root 4 Dec 16 03:34 gpmc,wait-pin
    -r--r--r-- 1 root root 4 Dec 16 03:34 gpmc,we-off-ns
    -r--r--r-- 1 root root 4 Dec 16 03:34 gpmc,we-on-ns
    -r--r--r-- 1 root root 4 Dec 16 03:34 gpmc,wr-access-ns
    -r--r--r-- 1 root root 4 Dec 16 03:34 gpmc,wr-cycle-ns
    -r--r--r-- 1 root root 4 Dec 16 03:34 gpmc,wr-data-mux-bus-ns
    -r--r--r-- 1 root root 5 Dec 16 03:34 name
    -r--r--r-- 1 root root 4 Dec 16 03:34 nand-bus-width
    drwxr-xr-x 2 root root 0 Dec 16 03:34 partition@0
    drwxr-xr-x 2 root root 0 Dec 16 03:34 partition@1
    drwxr-xr-x 2 root root 0 Dec 16 03:34 partition@2
    drwxr-xr-x 2 root root 0 Dec 16 03:34 partition@3
    drwxr-xr-x 2 root root 0 Dec 16 03:34 partition@4
    drwxr-xr-x 2 root root 0 Dec 16 03:34 partition@5
    drwxr-xr-x 2 root root 0 Dec 16 03:34 partition@6
    drwxr-xr-x 2 root root 0 Dec 16 03:34 partition@7
    drwxr-xr-x 2 root root 0 Dec 16 03:34 partition@8
    drwxr-xr-x 2 root root 0 Dec 16 03:34 partition@9
    -r--r--r-- 1 root root 12 Dec 16 03:34 reg
    -r--r--r-- 1 root root 9 Dec 16 03:34 status
    -r--r--r-- 1 root root 4 Dec 16 03:34 ti,elm-id
    -r--r--r-- 1 root root 5 Dec 16 03:34 ti,nand-ecc-opt
    sh-4.4#

    sh-4.4# cat /proc/
    Display all 132 possibilities? (y or n)
    sh-4.4# cat /proc/mtd
    dev: size erasesize name
    sh-4.4#

  • hi ,

    checked kernel configuration

    root@keerti-VirtualBox:/home/keerti/linux-4.9.28# grep '^CO.*MTD' .config
    CONFIG_MTD=y
    CONFIG_MTD_TESTS=m
    CONFIG_MTD_CMDLINE_PARTS=y
    CONFIG_MTD_OF_PARTS=y
    CONFIG_MTD_BLKDEVS=y
    CONFIG_MTD_BLOCK=y
    CONFIG_MTD_MAP_BANK_WIDTH_1=y
    CONFIG_MTD_MAP_BANK_WIDTH_2=y
    CONFIG_MTD_MAP_BANK_WIDTH_4=y
    CONFIG_MTD_CFI_I1=y
    CONFIG_MTD_CFI_I2=y
    CONFIG_MTD_M25P80=y
    CONFIG_MTD_NAND_ECC=y
    CONFIG_MTD_NAND=y
    CONFIG_MTD_NAND_DENALI=y
    CONFIG_MTD_NAND_DENALI_DT=y
    CONFIG_MTD_NAND_OMAP2=y
    CONFIG_MTD_NAND_OMAP_BCH=y
    CONFIG_MTD_NAND_OMAP_BCH_BUILD=y
    CONFIG_MTD_NAND_IDS=y
    CONFIG_MTD_NAND_BRCMNAND=y
    CONFIG_MTD_SPI_NOR=y
    CONFIG_MTD_UBI=y
    CONFIG_MTD_UBI_WL_THRESHOLD=4096
    CONFIG_MTD_UBI_BEB_LIMIT=20

  • Keerti,

    CONFIG.*MTD settings look good, but I don't see any trace at all in your Kernel boot log from the GPMC driver. Can you check that you are using CONFIG_OMAP_GPMC=y ?

    The expected boot output regarding GPMC and MTD should look something like this:

    [    1.475789] omap-gpmc 50000000.gpmc: GPMC revision 6.0
    [    1.480980] gpmc_mem_init: disabling cs 0 mapped at 0x0-0x1000000
    [    1.488954] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xda
    [    1.495445] nand: Micron MT29F2G08ABAEAWP
    [    1.499474] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
    [    1.507233] nand: using OMAP_ECC_BCH8_CODE_HW ECC scheme
    [    1.512699] 10 fixed-partitions partitions found on MTD device omap2-nand.0
    [    1.519724] Creating 10 MTD partitions on "omap2-nand.0":
    [    1.525197] 0x000000000000-0x000000020000 : "NAND.SPL"
    [    1.532213] 0x000000020000-0x000000040000 : "NAND.SPL.backup1"
    [    1.539446] 0x000000040000-0x000000060000 : "NAND.SPL.backup2"
    [    1.546619] 0x000000060000-0x000000080000 : "NAND.SPL.backup3"
    [    1.553698] 0x000000080000-0x0000000c0000 : "NAND.u-boot-spl-os"
    [    1.561118] 0x0000000c0000-0x0000001c0000 : "NAND.u-boot"
    [    1.568302] 0x0000001c0000-0x0000001e0000 : "NAND.u-boot-env"
    [    1.575411] 0x0000001e0000-0x000000200000 : "NAND.u-boot-env.backup1"
    [    1.583129] 0x000000200000-0x000000a00000 : "NAND.kernel"
    [    1.593577] 0x000000a00000-0x000010000000 : "NAND.file-system"

    Then, can you double-check the configuration on your running Kernel as follows. It should reflect the MTD and GPMC settings we discussed. This will help ensue that you are indeed running the Kernel with those settings active.

    root@am335x-evm:/# gunzip -c /proc/config.gz | grep -E '^CO.*(MTD|GPMC)'
    CONFIG_MTD=y
    CONFIG_MTD_CMDLINE_PARTS=y
    CONFIG_MTD_OF_PARTS=y
    CONFIG_MTD_BLKDEVS=y
    CONFIG_MTD_BLOCK=y
    CONFIG_MTD_CFI=y
    CONFIG_MTD_GEN_PROBE=y
    CONFIG_MTD_MAP_BANK_WIDTH_1=y
    CONFIG_MTD_MAP_BANK_WIDTH_2=y
    CONFIG_MTD_MAP_BANK_WIDTH_4=y
    CONFIG_MTD_CFI_I1=y
    CONFIG_MTD_CFI_I2=y
    CONFIG_MTD_CFI_INTELEXT=y
    CONFIG_MTD_CFI_UTIL=y
    CONFIG_MTD_PHYSMAP=y
    CONFIG_MTD_PHYSMAP_OF=y
    CONFIG_MTD_NAND_CORE=y
    CONFIG_MTD_NAND_ECC_SW_HAMMING=y
    CONFIG_MTD_RAW_NAND=y
    CONFIG_MTD_NAND_DENALI=y
    CONFIG_MTD_NAND_DENALI_DT=y
    CONFIG_MTD_NAND_OMAP2=y
    CONFIG_MTD_NAND_OMAP_BCH=y
    CONFIG_MTD_NAND_OMAP_BCH_BUILD=y
    CONFIG_MTD_NAND_BRCMNAND=y
    CONFIG_MTD_SPI_NOR=y
    CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y
    CONFIG_MTD_UBI=y
    CONFIG_MTD_UBI_WL_THRESHOLD=4096
    CONFIG_MTD_UBI_BEB_LIMIT=20
    CONFIG_OMAP_GPMC=y

    Regards, Andreas

  • Hi ,

    I am getting following log for nand,but partitions are not created

    [ 1.145410] console [ttyS0] enabled
    [ 1.152119] omap_rng 48310000.rng: OMAP Random Number Generator ver. 20
    [ 1.159114] [drm] Initialized
    [ 1.189095] brd: module loaded
    [ 1.204638] loop: module loaded
    [ 1.209966] [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0
    [ 1.219597] [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0
    [ 1.229078] [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0
    [ 1.238546] [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0
    [ 1.248011] [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0
    [ 1.257476] [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0
    [ 1.266934] nand: device found, Manufacturer ID: 0x98, Chip ID: 0x39
    [ 1.273346] nand: Toshiba NAND 128MiB 1,8V 8-bit
    [ 1.278018] nand: 128 MiB, SLC, erase size: 16 KiB, page size: 512, OOB size: 16
    [ 1.285614] flash size: 128 MiB
    [ 1.288809] page size: 512 bytes
    [ 1.292057] OOB area size: 16 bytes
    [ 1.295563] sector size: 16 KiB
    [ 1.298744] pages number: 262144
    [ 1.301989] pages per sector: 32
    [ 1.305232] bus width: 8
    [ 1.307799] bits in sector size: 14
    [ 1.311305] bits in page size: 9
    [ 1.314548] bits in OOB size: 4
    [ 1.317728] flash size with OOB: 135168 KiB
    [ 1.321933] page address bytes: 4
    [ 1.325264] sector address bytes: 3
    [ 1.328795] options: 0x42
    [ 1.336884] Scanning device for bad blocks
    [ 1.454186] Creating 1 MTD partitions on "NAND 128MiB 1,8V 8-bit":
    [ 1.460497] 0x000000000000-0x000008000000 : "NAND simulator partition 0"
    [ 1.480437] @@@broadcom_init
    [ 1.484165] libphy: Fixed MDIO Bus: probed

  • Hi,

    I am not able to find 

    board-omap3beagle.c file which has the partition details.

    will adding this file and compilation solve  the issue?

  • Keerti,

    you seem to trying to use CONFIG_MTD_NAND_NANDSIM. What is the purpose oft this?

    keerti jain said:

    board-omap3beagle.c file which has the partition details.

    will adding this file and compilation solve  the issue?

    This seems to be a file from a really old Kernel (v4.1?) when partitions where still defined using board files. This is no longer the case with more modern Kernels, and adding this file won't do anything. The MTD partitions need to be defined using a suitable DTS description, as we had already looked at earlier.

    Can you double-check your CONFIG_MTD_* options as suggested earlier, and make them match to what I had posted. Also make sure CONFIG_MTD_NAND_NANDSIM is inactive.

    Regards, Andreas

  • I have disabled NAND simulator.

    I am interfacing IS35ML04G084 NAND flash.

    Please let me know whether I am using correct dts file 

    /*
     * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
     *
     * This program is free software; you can redistribute it and/or modify
     * it under the terms of the GNU General Public License version 2 as
     * published by the Free Software Foundation.
     */
     
    /*
    24July 2017:This file is having original name as am335x-boneblack.dts renamed it to port it on to custom vci board- Vishvajeet
    */ 
     
    /dts-v1/;
    #include "am33xx.dtsi"
    #include "am335x-vci-common.dtsi" /*#include "am335x-bone-common.dtsi"*/
    #include <dt-bindings/display/tda998x.h>
    / {
    model = "TI AM335x BeagleBone Black";
    compatible = "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx";
    };
    &ldo3_reg {
    regulator-min-microvolt = <1800000>;
    regulator-max-microvolt = <1800000>;
    regulator-always-on;
    };
    &mmc1 {
    vmmc-supply = <&vmmcsd_fixed>;
    };
    &mmc2 {
    vmmc-supply = <&vmmcsd_fixed>;
    pinctrl-names = "default";
    pinctrl-0 = <&emmc_pins>;
    bus-width = <8>;
    status = "okay";
    };
    &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>;
    };
    };
    &am33xx_pinmux {
    nxp_hdmi_bonelt_pins: nxp_hdmi_bonelt_pins {
    pinctrl-single,pins = <
    AM33XX_IOPAD(0x9b0, PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr0 */
    AM33XX_IOPAD(0x8a0, PIN_OUTPUT | MUX_MODE0) /* lcd_data0.lcd_data0 */
    AM33XX_IOPAD(0x8a4, PIN_OUTPUT | MUX_MODE0) /* lcd_data1.lcd_data1 */
    AM33XX_IOPAD(0x8a8, PIN_OUTPUT | MUX_MODE0) /* lcd_data2.lcd_data2 */
    AM33XX_IOPAD(0x8ac, PIN_OUTPUT | MUX_MODE0) /* lcd_data3.lcd_data3 */
    AM33XX_IOPAD(0x8b0, PIN_OUTPUT | MUX_MODE0) /* lcd_data4.lcd_data4 */
    AM33XX_IOPAD(0x8b4, PIN_OUTPUT | MUX_MODE0) /* lcd_data5.lcd_data5 */
    AM33XX_IOPAD(0x8b8, PIN_OUTPUT | MUX_MODE0) /* lcd_data6.lcd_data6 */
    AM33XX_IOPAD(0x8bc, PIN_OUTPUT | MUX_MODE0) /* lcd_data7.lcd_data7 */
    AM33XX_IOPAD(0x8c0, PIN_OUTPUT | MUX_MODE0) /* lcd_data8.lcd_data8 */
    AM33XX_IOPAD(0x8c4, PIN_OUTPUT | MUX_MODE0) /* lcd_data9.lcd_data9 */
    AM33XX_IOPAD(0x8c8, PIN_OUTPUT | MUX_MODE0) /* lcd_data10.lcd_data10 */
    AM33XX_IOPAD(0x8cc, PIN_OUTPUT | MUX_MODE0) /* lcd_data11.lcd_data11 */
    AM33XX_IOPAD(0x8d0, PIN_OUTPUT | MUX_MODE0) /* lcd_data12.lcd_data12 */
    AM33XX_IOPAD(0x8d4, PIN_OUTPUT | MUX_MODE0) /* lcd_data13.lcd_data13 */
    AM33XX_IOPAD(0x8d8, PIN_OUTPUT | MUX_MODE0) /* lcd_data14.lcd_data14 */
    AM33XX_IOPAD(0x8dc, PIN_OUTPUT | MUX_MODE0) /* lcd_data15.lcd_data15 */
    AM33XX_IOPAD(0x8e0, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* lcd_vsync.lcd_vsync */
    AM33XX_IOPAD(0x8e4, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* lcd_hsync.lcd_hsync */
    AM33XX_IOPAD(0x8e8, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* lcd_pclk.lcd_pclk */
    AM33XX_IOPAD(0x8ec, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* lcd_ac_bias_en.lcd_ac_bias_en */
    >;
    };
    nxp_hdmi_bonelt_off_pins: nxp_hdmi_bonelt_off_pins {
    pinctrl-single,pins = <
    AM33XX_IOPAD(0x9b0, PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr0 */
    >;
    };
    mcasp0_pins: mcasp0_pins {
    pinctrl-single,pins = <
    AM33XX_IOPAD(0x9ac, PIN_INPUT_PULLUP | MUX_MODE0) /* mcasp0_ahcklx.mcasp0_ahclkx */
    AM33XX_IOPAD(0x99c, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mcasp0_ahclkr.mcasp0_axr2*/
    AM33XX_IOPAD(0x994, PIN_OUTPUT_PULLUP | MUX_MODE0) /* mcasp0_fsx.mcasp0_fsx */
    AM33XX_IOPAD(0x990, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mcasp0_aclkx.mcasp0_aclkx */
    /*AM33XX_IOPAD(0x86c, PIN_OUTPUT_PULLDOWN | MUX_MODE7)*/ /* gpmc_a11.GPIO1_27 */
    >;
    };
    };
    &lcdc {
    status = "okay";
    /* If you want to get 24 bit RGB and 16 BGR mode instead of
    * current 16 bit RGB and 24 BGR modes, set the propety
    * below to "crossed" and uncomment the video-ports -property
    * in tda19988 node.
    */
    blue-and-red-wiring = "straight";
    port {
    lcdc_0: endpoint@0 {
    remote-endpoint = <&hdmi_0>;
    };
    };
    };
    &i2c0 {
    tda19988: tda19988 {
    compatible = "nxp,tda998x";
    reg = <0x70>;
    pinctrl-names = "default", "off";
    pinctrl-0 = <&nxp_hdmi_bonelt_pins>;
    pinctrl-1 = <&nxp_hdmi_bonelt_off_pins>;
    /* Convert 24bit BGR to RGB, e.g. cross red and blue wiring */
    /* video-ports = <0x234501>; */
    #sound-dai-cells = <0>;
    audio-ports = < TDA998x_I2S 0x03>;
    ports {
    port@0 {
    hdmi_0: endpoint@0 {
    remote-endpoint = <&lcdc_0>;
    };
    };
    };
    };
    };
    &rtc {
    system-power-controller;
    };
    &mcasp0 {
    #sound-dai-cells = <0>;
    pinctrl-names = "default";
    pinctrl-0 = <&mcasp0_pins>;
    status = "okay";
    op-mode = <0>; /* MCASP_IIS_MODE */
    tdm-slots = <2>;
    serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
    0 0 1 0
    >;
    tx-num-evt = <32>;
    rx-num-evt = <32>;
    };
    &sgx {
    status = "okay";
    };
    / {
    clk_mcasp0_fixed: clk_mcasp0_fixed {
    #clock-cells = <0>;
    compatible = "fixed-clock";
    clock-frequency = <24576000>;
    };
    clk_mcasp0: clk_mcasp0 {
    #clock-cells = <0>;
    compatible = "gpio-gate-clock";
    clocks = <&clk_mcasp0_fixed>;
    enable-gpios = <&gpio1 27 0>; /* BeagleBone Black Clk enable on GPIO1_27 */
    };
    sound {
    compatible = "simple-audio-card";
    simple-audio-card,name = "TI BeagleBone Black";
    simple-audio-card,format = "i2s";
    simple-audio-card,bitclock-master = <&dailink0_master>;
    simple-audio-card,frame-master = <&dailink0_master>;
    dailink0_master: simple-audio-card,cpu {
    sound-dai = <&mcasp0>;
    clocks = <&clk_mcasp0>;
    };
    simple-audio-card,codec {
    sound-dai = <&tda19988>;
    };
    };
    };
    &am33xx_pinmux {
    bbcape_nand_flash_pins: bbcape_nand_flash_pins {
    pinctrl-single,pins = <
    0x00 (MUX_MODE0 | PIN_INPUT_PULLUP) /* gpmc_ad0.gpmc_ad0 */
    0x04 (MUX_MODE0 | PIN_INPUT_PULLUP) /* gpmc_ad1.gpmc_ad1 */
    0x08 (MUX_MODE0 | PIN_INPUT_PULLUP) /* gpmc_ad2.gpmc_ad2 */
    0x0c (MUX_MODE0 | PIN_INPUT_PULLUP) /* gpmc_ad3.gpmc_ad3 */
    0x10 (MUX_MODE0 | PIN_INPUT_PULLUP) /* gpmc_ad4.gpmc_ad4 */
    0x14 (MUX_MODE0 | PIN_INPUT_PULLUP) /* gpmc_ad5.gpmc_ad5 */
    0x18 (MUX_MODE0 | PIN_INPUT_PULLUP) /* gpmc_ad6.gpmc_ad6 */
    0x1c (MUX_MODE0 | PIN_INPUT_PULLUP) /* gpmc_ad7.gpmc_ad7 */
    0x20 (MUX_MODE0 | PIN_INPUT_PULLUP) /* gpmc_ad8.gpmc_ad8 */
    0x24 (MUX_MODE0 | PIN_INPUT_PULLUP) /* gpmc_ad9.gpmc_ad9 */
    0x28 (MUX_MODE0 | PIN_INPUT_PULLUP) /* gpmc_ad10.gpmc_ad10 */
    0x2c (MUX_MODE0 | PIN_INPUT_PULLUP) /* gpmc_ad11.gpmc_ad11 */
    0x30 (MUX_MODE0 | PIN_INPUT_PULLUP) /* gpmc_ad12.gpmc_ad12 */
    0x34 (MUX_MODE0 | PIN_INPUT_PULLUP) /* gpmc_ad13.gpmc_ad13 */
    0x38 (MUX_MODE0 | PIN_INPUT_PULLUP) /* gpmc_ad14.gpmc_ad14 */
    0x3c (MUX_MODE0 | PIN_INPUT_PULLUP) /* gpmc_ad15.gpmc_ad15 */
    0x70 (MUX_MODE0 | PIN_INPUT_PULLUP ) /* gpmc_wait0.gpmc_wait0 */
    0x74 (MUX_MODE0 | PIN_INPUT_PULLUP) /* gpmc_wpn.gpmc_wpn */
    0x7c (MUX_MODE0 | PIN_OUTPUT) /* gpmc_csn0.gpmc_csn0  */
    0x90 (MUX_MODE0 | PIN_OUTPUT) /* gpmc_advn_ale.gpmc_advn_ale */
    0x94 (MUX_MODE0 | PIN_OUTPUT) /* gpmc_oen_ren.gpmc_oen_ren */
    0x98 (MUX_MODE0 | PIN_OUTPUT) /* gpmc_wen.gpmc_wen */
    0x9c (MUX_MODE0 | PIN_OUTPUT) /* gpmc_be0n_cle.gpmc_be0n_cle */
    >;
    };
    };
    &elm {
    status = "okay";
    };
    &gpmc {
    status = "okay";
    ranges = <0 0 0x80000000 0x01000000>; /* address range = 16MB (minimum GPMC partition) */
    pinctrl-names = "default";
    pinctrl-0 = <&bbcape_nand_flash_pins>;
    nand@0,0 {
    reg = <0 0 0>; /* device IO registers */
    ti,nand-ecc-opt = "bch8";
    ti,hwmods = "gpmc";
    ti,elm-id = <&elm>;
    /* generic bindings */
    nand-bus-width = <16>;
    /* vendor specific bindings */
    gpmc,device-nand = "true";
    gpmc,device-width = <2>;
    gpmc,sync-clk-ps = <0>;
    gpmc,cs-on-ns = <0>;
    gpmc,cs-rd-off-ns = <80>;
    gpmc,cs-wr-off-ns = <80>;
    gpmc,adv-on-ns = <0>;
    gpmc,adv-rd-off-ns = <80>;
    gpmc,adv-wr-off-ns = <80>;
    gpmc,we-on-ns = <20>;
    gpmc,we-off-ns = <60>;
    gpmc,oe-on-ns = <20>;
    gpmc,oe-off-ns = <60>;
    gpmc,access-ns = <40>;
    gpmc,rd-cycle-ns = <80>;
    gpmc,wr-cycle-ns = <80>;
    gpmc,wait-pin = <0>;
    gpmc,wait-on-read;
    gpmc,wait-on-write;
    gpmc,bus-turnaround-ns = <0>;
    gpmc,cycle2cycle-delay-ns = <0>;
    gpmc,clk-activation-ns = <0>;
    gpmc,wait-monitoring-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 0x00040000>;
    };
    partition@1 {
    label = "NAND.SPL.backup1";
    reg = <0x00040000 0x00040000>;
    };
    partition@2 {
    label = "NAND.SPL.backup2";
    reg = <0x00080000 0x00040000>;
    };
    partition@3 {
    label = "NAND.SPL.backup3";
    reg = <0x000c0000 0x00040000>;
    };
    partition@4 {
    label = "NAND.u-boot-spl-os";
    reg = <0x00100000 0x00080000>;
    };
    partition@5 {
    label = "NAND.u-boot";
    reg = <0x00180000 0x00100000>;
    };
    partition@6 {
    label = "NAND.u-boot-env";
    reg = <0x00280000 0x00040000>;
    };
    partition@7 {
    label = "NAND.u-boot-env.backup1";
    reg = <0x002c0000 0x00040000>;
    };
    partition@8 {
    label = "NAND.kernel";
    reg = <0x00300000 0x00700000>;
    };
    partition@9 {
    label = "NAND.file-system";
    reg = <0x00a00000 0x3f600000>;
    };
    };
    };
  • Hi Andreas,

    with this changes in .dts file

    &am33xx_pinmux {
    bbcape_nand_flash_pins: bbcape_nand_flash_pins {
    pinctrl-single,pins = <
    0x00 (MUX_MODE0 | PIN_INPUT_PULLUP) /* gpmc_ad0.gpmc_ad0 */
    0x04 (MUX_MODE0 | PIN_INPUT_PULLUP) /* gpmc_ad1.gpmc_ad1 */
    0x08 (MUX_MODE0 | PIN_INPUT_PULLUP) /* gpmc_ad2.gpmc_ad2 */
    0x0c (MUX_MODE0 | PIN_INPUT_PULLUP) /* gpmc_ad3.gpmc_ad3 */
    0x10 (MUX_MODE0 | PIN_INPUT_PULLUP) /* gpmc_ad4.gpmc_ad4 */
    0x14 (MUX_MODE0 | PIN_INPUT_PULLUP) /* gpmc_ad5.gpmc_ad5 */
    0x18 (MUX_MODE0 | PIN_INPUT_PULLUP) /* gpmc_ad6.gpmc_ad6 */
    0x1c (MUX_MODE0 | PIN_INPUT_PULLUP) /* gpmc_ad7.gpmc_ad7 */
    0x70 (MUX_MODE0 | PIN_INPUT_PULLUP ) /* gpmc_wait0.gpmc_wait0 */
    0x74 (MUX_MODE0 | PIN_INPUT_PULLUP) /* gpmc_wpn.gpmc_wpn */
    0x7c (MUX_MODE0 | PIN_OUTPUT) /* gpmc_csn0.gpmc_csn0 */
    0x90 (MUX_MODE0 | PIN_OUTPUT) /* gpmc_advn_ale.gpmc_advn_ale */
    0x94 (MUX_MODE0 | PIN_OUTPUT) /* gpmc_oen_ren.gpmc_oen_ren */
    0x98 (MUX_MODE0 | PIN_OUTPUT) /* gpmc_wen.gpmc_wen */
    0x9c (MUX_MODE0 | PIN_OUTPUT) /* gpmc_be0n_cle.gpmc_be0n_cle */
    >;
    };
    };

    &elm {
    status = "okay";
    };

    &gpmc {
    status = "okay";
    ranges = <0 0 0x80000000 0x01000000>; /* address range = 16MB (minimum GPMC partition) */
    pinctrl-names = "default";
    pinctrl-0 = <&bbcape_nand_flash_pins>;
    nand@0,0 {

    reg = <0 0 0>; /* device IO registers */
    ti,nand-ecc-opt = "bch8";
    ti,hwmods = "gpmc";
    ti,elm-id = <&elm>;
    /* generic bindings */
    nand-bus-width = <8>;
    /* vendor specific bindings */
    gpmc,device-nand = "true";
    gpmc,device-width = <1>;
    gpmc,sync-clk-ps = <0>;
    gpmc,cs-on-ns = <0>;
    gpmc,cs-rd-off-ns = <80>;
    gpmc,cs-wr-off-ns = <80>;
    gpmc,adv-on-ns = <0>;
    gpmc,adv-rd-off-ns = <80>;
    gpmc,adv-wr-off-ns = <80>;
    gpmc,we-on-ns = <20>;
    gpmc,we-off-ns = <60>;
    gpmc,oe-on-ns = <20>;
    gpmc,oe-off-ns = <60>;
    gpmc,access-ns = <40>;
    gpmc,rd-cycle-ns = <80>;
    gpmc,wr-cycle-ns = <80>;
    gpmc,wait-pin = <0>;
    gpmc,wait-on-read;
    gpmc,wait-on-write;
    gpmc,bus-turnaround-ns = <0>;
    gpmc,cycle2cycle-delay-ns = <0>;
    gpmc,clk-activation-ns = <0>;
    gpmc,wait-monitoring-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 0x00040000>;
    };
    partition@1 {
    label = "NAND.SPL.backup1";
    reg = <0x00040000 0x00040000>;
    };
    partition@2 {
    label = "NAND.SPL.backup2";
    reg = <0x00080000 0x00040000>;
    };
    partition@3 {
    label = "NAND.SPL.backup3";
    reg = <0x000c0000 0x00040000>;
    };
    partition@4 {
    label = "NAND.u-boot-spl-os";
    reg = <0x00100000 0x00080000>;
    };
    partition@5 {
    label = "NAND.u-boot";
    reg = <0x00180000 0x00100000>;
    };
    partition@6 {
    label = "NAND.u-boot-env";
    reg = <0x00280000 0x00040000>;
    };
    partition@7 {
    label = "NAND.u-boot-env.backup1";
    reg = <0x002c0000 0x00040000>;
    };
    partition@8 {
    label = "NAND.kernel";
    reg = <0x00300000 0x00700000>;
    };
    partition@9 {
    label = "NAND.file-system";
    reg = <0x00a00000 0x3f600000>;
    };
    };
    };

    I am getting following error when the kernel boots

     omap-gpmc 50000000.gpmc: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/bbcape_nand_flash_pins, deferring probe

  • Hi Keerti,

    keerti jain said:
     omap-gpmc 50000000.gpmc: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/bbcape_nand_flash_pins, deferring probe

    Sounds like an issue with the pinmux, potentially double-assignment of pins?
    Please review related thread here: https://e2e.ti.com/support/processors/f/791/t/747038

    Also it seems like you are trying to build a solution based of BeagleBone source trees (your error message references "bbcape_nand_flash_pins"). I would recommend you use the latest TI Linux SDK for AM335x as a known-good starting point for an implementation using NAND, specifically the AM335x EVM configuration and related files in U-Boot. Please see here: http://www.ti.com/tool/PROCESSOR-SDK-AM335X  It is often easier to start with a more complete, working solution and trim it down to what you need, rather than building it up, that's probably why you keep running into various different issues.

    Once you can witness the AM335x-SDK based NAND probe working you can then port the solution to whatever software tree you are using. I would still recommend however to base any custom AM335x design on the latest processor SDK referred to earlier.

    Regards, Andreas

  • Hi Andreas,

    Thanks for your support.

    Making changes in the dts file created the partition

    &am33xx_pinmux {
    bbcape_nand_flash_pins: bbcape_nand_flash_pins {
    pinctrl-single,pins = <
    0x00 (MUX_MODE0 | PIN_INPUT_PULLUP) /* gpmc_ad0.gpmc_ad0 */
    0x04 (MUX_MODE0 | PIN_INPUT_PULLUP) /* gpmc_ad1.gpmc_ad1 */
    0x08 (MUX_MODE0 | PIN_INPUT_PULLUP) /* gpmc_ad2.gpmc_ad2 */
    0x0c (MUX_MODE0 | PIN_INPUT_PULLUP) /* gpmc_ad3.gpmc_ad3 */
    0x10 (MUX_MODE0 | PIN_INPUT_PULLUP) /* gpmc_ad4.gpmc_ad4 */
    0x14 (MUX_MODE0 | PIN_INPUT_PULLUP) /* gpmc_ad5.gpmc_ad5 */
    0x18 (MUX_MODE0 | PIN_INPUT_PULLUP) /* gpmc_ad6.gpmc_ad6 */
    0x1c (MUX_MODE0 | PIN_INPUT_PULLUP) /* gpmc_ad7.gpmc_ad7 */
    0x70 (MUX_MODE0 | PIN_INPUT_PULLUP ) /* gpmc_wait0.gpmc_wait0 */
    0x74 (MUX_MODE0 | PIN_OUTPUT) /* gpmc_wpn.gpmc_wpn */
    0x7c (MUX_MODE0 | PIN_OUTPUT) /* gpmc_csn0.gpmc_csn0 */
    0x90 (MUX_MODE0 | PIN_OUTPUT) /* gpmc_advn_ale.gpmc_advn_ale */
    0x94 (MUX_MODE0 | PIN_OUTPUT) /* gpmc_oen_ren.gpmc_oen_ren */
    0x98 (MUX_MODE0 | PIN_OUTPUT) /* gpmc_wen.gpmc_wen */
    0x9c (MUX_MODE0 | PIN_OUTPUT) /* gpmc_be0n_cle.gpmc_be0n_cle */
    >;
    };
    };

    &elm {
    status = "okay";
    };

    &gpmc {
    status = "okay";
    ranges = <0 0 0x80000000 0x10000000>; /* address range = 16MB (minimum GPMC partition) */
    pinctrl-names = "default";
    pinctrl-0 = <&bbcape_nand_flash_pins>;
    nand@0,0 {

    reg = <0 0 4>; /* device IO registers */
    ti,nand-ecc-opt = "bch16";
    ti,hwmods = "gpmc";
    ti,elm-id = <&elm>;
    /* generic bindings */
    nand-bus-width = <8>;
    /* vendor specific bindings */
    gpmc,device-nand = "true";
    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,wait-pin = <0>;*/
    gpmc,wait-on-read= "true";
    gpmc,wait-on-write="true";
    gpmc,bus-turnaround-ns = <0>;
    gpmc,cycle2cycle-delay-ns = <0>;
    gpmc,clk-activation-ns = <0>;
    gpmc,wait-monitoring-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 0x00020000>;
    };
    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 0x3f600000>;
    };
    };
    };

    With Regards,

    Keerti