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/AM3354: Not able to read RTC over SPI

Part Number: AM3354
Other Parts Discussed in Thread: AM3352, TPS65910

Tool/software: Linux

Hello all,

We have designed custom board based on AM3354 processor and during design of board  Am335x starter kit and beagle bone black taken as reference. we have interfaced external RTC using SPI port1. We would like to test as SPI device using some tools.

-> added the SPI and RTC related changes in device tree (am335x-evm.dts)

   spi1_pins: pinmux_spi1_pins {
       pinctrl-single,pins = <
              0x190 ( PIN_OUTPUT | MUX_MODE3 ) /* (A13) mcasp0_aclkx.spi1_sclk */
             0x194 ( PIN_INPUT | MUX_MODE3 ) /* (B13) mcasp0_fsx.spi1_d0 */
             0x198 ( PIN_OUTPUT | MUX_MODE3 ) /* (D12) mcasp0_axr0.spi1_d1 */
            0x19c ( PIN_OUTPUT | MUX_MODE3 ) /* (C12) mcasp0_ahclkr.spi1_cs0 */
         >;
 };


&spi1{
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&spi1_pins>;
    /* DO is MOSI, D1 is MISO */    
    ti,pindir-d0-out-d1-in = <1>;     
    spidev {
        compatible = "spidev";
        /* We use SPI CS 0; register the same */
        reg = <0>;
        spi-max-frequency = <1000000>;
        spi-cs-high;
        /* Operate with CPOL and CPHA set to zero */
        /* spi-cpol; */
        /* spi-cpha; */
    };   
};

Rebuild the .dtb and kernel together and loaded into custom board.

SPI dev should get listed in /dev which is not listed.

Kindly suggest the possible reason and solution to the problem.

Regards,

Anil

  • Hello,

    1] Can you post your boot log (dmesg)

    2] Have you enabled SPIDEV in kernel config ?

    3] Have you enabled MCSPI driver in kernel config ?

    4] Which linux kernel version are you using ?


    Cheers,
    --Prabhakar Lad

  • Change:
    0x190 ( PIN_OUTPUT | MUX_MODE3 ) /* (A13) mcasp0_aclkx.spi1_sclk */
    to:
    0x190 ( PIN_INPUT | MUX_MODE3 ) /* (A13) mcasp0_aclkx.spi1_sclk */
  • Hi Biser/Prabhakar,

    Thanks for reply..

    1. As per Biser suggestion, we have changed  mcasp0_aclkx.spi1_sclk  as a input signal and build the device tree
    2. kernel version is 4.4.41
    3. Both MCSPI and SPIDEV drivers are enabled

    -> After device tree changes ,  spidev1.0 listed in /dev , But boot log info show some warning for device tree  and kernel as below:


     [    1.171100] spidev spi1.0: buggy DT: spidev listed directly in DT
    [    1.177233] ------------[ cut here ]------------
    [    1.182059] WARNING: CPU: 0 PID: 1 at drivers/spi/spidev.c:719 spidev_probe+0x1cc/0x1dc()
    [    1.190300] Modules linked in:
    [    1.193390] CPU: 0 PID: 1 Comm: swapper Not tainted 4.4.41-gf9f6f0db2d #1
    [    1.200262] Hardware name: Generic AM33XX (Flattened Device Tree)
    [    1.206384] Backtrace:
    [    1.208875] [<c0013508>] (dump_backtrace) from [<c0013704>] (show_stack+0x18/0x1c)
    [    1.216528]  r7:c0440594 r6:000002cf r5:00000009 r4:00000000
    [    1.222279] [<c00136ec>] (show_stack) from [<c02a8aa8>] (dump_stack+0x24/0x28)
    [    1.229603] [<c02a8a84>] (dump_stack) from [<c0031d64>] (warn_slowpath_common+0x88/0xb4)
    [    1.237742] [<c0031cdc>] (warn_slowpath_common) from [<c0031e34>] (warn_slowpath_null+0x24/0x2c)
    [    1.246610]  r8:00000000 r7:c0945da0 r6:c0945d90 r5:dc430000 r4:dc430000
    [    1.253416] [<c0031e10>] (warn_slowpath_null) from [<c0440594>] (spidev_probe+0x1cc/0x1dc)
    [    1.261774] [<c04403c8>] (spidev_probe) from [<c043d540>] (spi_drv_probe+0x84/0xb0)
    [    1.269545]  r8:00000000 r7:c0945da0 r6:c0945d90 r5:00000000 r4:dc430000
    [    1.276361] [<c043d4bc>] (spi_drv_probe) from [<c03e35d8>] (driver_probe_device+0x204/0x2f8)
    [    1.284857]  r7:c0945da0 r6:00000000 r5:dc430000 r4:c0991408
    [    1.290596] [<c03e33d4>] (driver_probe_device) from [<c03e37f0>] (__device_attach_driver+0x8c/0xb4)
    [    1.299729]  r9:00000000 r8:c09913e4 r7:00000001 r6:dc430000 r5:dc057c48 r4:c0945da0
    [    1.307569] [<c03e3764>] (__device_attach_driver) from [<c03e17a0>] (bus_for_each_drv+0x68/0x9c)
    [    1.316438]  r7:00000001 r6:c03e3764 r5:dc057c48 r4:00000000
    [    1.322184] [<c03e1738>] (bus_for_each_drv) from [<c03e332c>] (__device_attach+0xb8/0x11c)
    [    1.330528]  r6:dc430034 r5:dc430000 r4:dc430000
    [    1.335196] [<c03e3274>] (__device_attach) from [<c03e3864>] (device_initial_probe+0x14/0x18)
    [    1.343801]  r7:00000000 r6:c0945840 r5:dc430000 r4:dc430008
    [    1.349543] [<c03e3850>] (device_initial_probe) from [<c03e2844>] (bus_probe_device+0x8c/0x94)
    [    1.358228] [<c03e27b8>] (bus_probe_device) from [<c03e0958>] (device_add+0x3f4/0x57c)
    [    1.366199]  r7:00000000 r6:dc430000 r5:dc3a9c00 r4:dc430008
    [    1.371943] [<c03e0564>] (device_add) from [<c043df80>] (spi_add_device+0xa4/0x160)
    [    1.379677]  r10:dc3a9d72 r9:dc112610 r8:dcb57208 r7:dc112610 r6:dc3a9c00 r5:00000000
    [    1.387580]  r4:dc430000
    [    1.390186] [<c043dedc>] (spi_add_device) from [<c043e490>] (of_register_spi_device+0x22c/0x2f4)
    [    1.399010]  r7:dc3a9c00 r6:dcb57550 r5:dc430000 r4:00000000
    [    1.404754] [<c043e264>] (of_register_spi_device) from [<c043fd9c>] (spi_register_master+0x29c/0x484)
    [    1.414057]  r7:c085c6f8 r6:00000000 r5:dcb57550 r4:dc3a9c00
    [    1.419803] [<c043fb00>] (spi_register_master) from [<c043ffc4>] (devm_spi_register_master+0x40/0x78)
    [    1.429088]  r10:dc3a9d72 r9:c085cc60 r8:dc3a9c00 r7:dc112610 r6:dc3a9c00 r5:dc372d90
    [    1.437011]  r4:00000000
    [    1.439616] [<c043ff84>] (devm_spi_register_master) from [<c04431c4>] (omap2_mcspi_probe+0x2d4/0x364)
    [    1.448875]  r7:dc112610 r6:dc3a9c00 r5:dc3a9eb0 r4:00000000
    [    1.454648] [<c0442ef0>] (omap2_mcspi_probe) from [<c03e50c8>] (platform_drv_probe+0x54/0xb8)
    [    1.463230]  r10:00000000 r9:c08c8600 r8:00000000 r7:fffffdfb r6:c0945df4 r5:dc112610
    [    1.471205]  r4:c0991408
    [    1.473763] [<c03e5074>] (platform_drv_probe) from [<c03e35d8>] (driver_probe_device+0x204/0x2f8)
    [    1.482694]  r7:c0945df4 r6:00000000 r5:dc112610 r4:c0991408
    [    1.488445] [<c03e33d4>] (driver_probe_device) from [<c03e3760>] (__driver_attach+0x94/0x98)
    [    1.496938]  r9:c08c8600 r8:000000a9 r7:00000000 r6:dc112644 r5:c0945df4 r4:dc112610
    [    1.504812] [<c03e36cc>] (__driver_attach) from [<c03e16e0>] (bus_for_each_dev+0x70/0xa4)
    [    1.513044]  r7:00000000 r6:c03e36cc r5:c0945df4 r4:00000000
    [    1.518795] [<c03e1670>] (bus_for_each_dev) from [<c03e2ec4>] (driver_attach+0x24/0x28)
    [    1.526854]  r6:c093fb20 r5:dc376980 r4:c0945df4
    [    1.531538] [<c03e2ea0>] (driver_attach) from [<c03e2b00>] (bus_add_driver+0x1a8/0x220)
    [    1.539630] [<c03e2958>] (bus_add_driver) from [<c03e3f78>] (driver_register+0x80/0x100)
    [    1.547757]  r7:dc372980 r6:c090ed20 r5:c08eb9a4 r4:c0945df4
    [    1.553527] [<c03e3ef8>] (driver_register) from [<c03e4ff0>] (__platform_driver_register+0x48/0x50)
    [    1.562632]  r5:c08eb9a4 r4:c093fb20
    [    1.566248] [<c03e4fa8>] (__platform_driver_register) from [<c08eb9c0>] (omap2_mcspi_driver_init+0x1c/0x20)
    [    1.576075]  r5:c08eb9a4 r4:c090ed20
    [    1.579709] [<c08eb9a4>] (omap2_mcspi_driver_init) from [<c00096bc>] (do_one_initcall+0x98/0x1e4)
    [    1.588670] [<c0009624>] (do_one_initcall) from [<c08c8e80>] (kernel_init_freeable+0x138/0x1cc)
    [    1.597428]  r10:00000007 r9:c08c8600 r8:000000a9 r7:c08fc830 r6:c0908f7c r5:c09595c0
    [    1.605378]  r4:c09595c0
    [    1.607941] [<c08c8d48>] (kernel_init_freeable) from [<c06767cc>] (kernel_init+0x18/0xf4)
    [    1.616201]  r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c06767b4
    [    1.624124]  r4:c09595c0
    [    1.626682] [<c06767b4>] (kernel_init) from [<c000fab8>] (ret_from_fork+0x14/0x3c)
    [    1.634332]  r5:c06767b4 r4:00000000
    [    1.637972] ---[ end trace ff4fcac48061668a ]---  

    I have attached complete boot log for your reference.

    U-Boot SPL 2016.05-00319-ga0faac0-dirty (Jun 22 2017 - 12:43:55)
    Trying to boot from NAND
    The Expected Linux image was not found. Please check your NAND configuration.
    Trying to start u-boot now...
    
    
    U-Boot 2016.05-00319-ga0faac0-dirty (Jun 22 2017 - 12:43:55 +0530)
    
    CPU  : AM335X-GP rev 2.1
    Model: TI AM335x EVM
           Watchdog enabled
    I2C:   ready
    DRAM:  512 MiB
    NAND:  256 MiB
    MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
    MMC: no card present
    ** Bad device mmc 0 **
    Using default environment
    
    <ethaddr> not set. Validating first E-fuse MAC
    Net:   eth0: ethernet@4a100000
    Warning: usb_ether MAC addresses don't match:
    Address in SROM is         de:ad:be:ef:00:01
    Address in environment is  68:9e:19:81:98:50
    , eth1: usb_ether
    Press SPACE to abort autoboot in 2 seconds
    Booting from nand ...
    
    NAND read: device 0 offset 0x80000, size 0x40000
     262144 bytes read: OK
    
    NAND read: device 0 offset 0x200000, size 0x800000
     8388608 bytes read: OK
    Kernel image @ 0x82000000 [ 0x000000 - 0x351160 ]
    ## Flattened Device Tree blob at 88000000
       Booting using the fdt blob at 0x88000000
       Loading Device Tree to 8fff2000, end 8ffff4e9 ... OK
    
    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.41-gf9f6f0db2d (root@EMMYS0683) (gcc version 5.3.1 20160113 (Linaro GCC 5.3-2016.02) ) #1 PREEMPT Thu Jun 29 13:02:13 IST 2017
    [    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 EVM
    [    0.000000] cma: Reserved 48 MiB at 0x9d000000
    [    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 pages: 129920
    [    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: 2048 (order: 1, 8192 bytes)
    [    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
    [    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
    [    0.000000] Memory: 459972K/524288K available (6611K kernel code, 317K rwdata, 2344K rodata, 264K init, 265K bss, 15164K reserved, 49152K cma-reserved, 0K highmem)
    [    0.000000] Virtual kernel memory layout:
    [    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    [    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    [    0.000000]     vmalloc : 0xe0800000 - 0xff800000   ( 496 MB)
    [    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
    [    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    [    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
    [    0.000000]       .text : 0xc0008000 - 0xc08c704c   (8957 kB)
    [    0.000000]       .init : 0xc08c8000 - 0xc090a000   ( 264 kB)
    [    0.000000]       .data : 0xc090a000 - 0xc09595b0   ( 318 kB)
    [    0.000000]        .bss : 0xc09595b0 - 0xc099bcd8   ( 266 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 24000000 Hz
    [    0.000019] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
    [    0.000046] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
    [    0.000058] OMAP clocksource: timer1 at 24000000 Hz
    [    0.000290] clocksource_probe: no matching clocksources found
    [    0.000503] Console: colour dummy device 80x30
    [    0.000534] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
    [    0.000543] This ensures that you still see kernel messages. Please
    [    0.000550] update your kernel commandline.
    [    0.000571] Calibrating delay loop... 597.60 BogoMIPS (lpj=2988032)
    [    0.058728] pid_max: default: 32768 minimum: 301
    [    0.058901] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.058915] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.059765] Initializing cgroup subsys io
    [    0.059800] Initializing cgroup subsys memory
    [    0.059845] Initializing cgroup subsys devices
    [    0.059863] Initializing cgroup subsys freezer
    [    0.059882] Initializing cgroup subsys perf_event
    [    0.059897] Initializing cgroup subsys pids
    [    0.059933] CPU: Testing write buffer coherency: ok
    [    0.060392] Setting up static identity map for 0x80008200 - 0x80008260
    [    0.063136] devtmpfs: initialized
    [    0.080411] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    [    0.099916] omap_hwmod: debugss: _wait_target_disable failed
    [    0.156945] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    [    0.161675] pinctrl core: initialized pinctrl subsystem
    [    0.163270] NET: Registered protocol family 16
    [    0.166006] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [    0.188793] cpuidle: using governor ladder
    [    0.218781] cpuidle: using governor menu
    [    0.224619] OMAP GPIO hardware version 0.1
    [    0.235417] omap-gpmc 50000000.gpmc: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/nandflash_pins_s0, deferring probe
    [    0.239252] hw-breakpoint: debug architecture 0x4 unsupported.
    [    0.279783] edma 49000000.edma: TI EDMA DMA engine driver
    [    0.285426] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, deferring probe
    [    0.285624] media: Linux media interface: v0.10
    [    0.285706] Linux video capture interface: v2.00
    [    0.285781] pps_core: LinuxPPS API ver. 1 registered
    [    0.285792] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [    0.285829] PTP clock support registered
    [    0.285903] EDAC MC: Ver: 3.0.0
    [    0.287364] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
    [    0.287796] Advanced Linux Sound Architecture Driver Initialized.
    [    0.289375] clocksource: Switched to clocksource timer1
    [    0.303660] NET: Registered protocol family 2
    [    0.304622] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
    [    0.304696] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
    [    0.304757] TCP: Hash tables configured (established 4096 bind 4096)
    [    0.304843] UDP hash table entries: 256 (order: 0, 4096 bytes)
    [    0.304870] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    [    0.305066] NET: Registered protocol family 1
    [    0.305534] RPC: Registered named UNIX socket transport module.
    [    0.305556] RPC: Registered udp transport module.
    [    0.305564] RPC: Registered tcp transport module.
    [    0.305572] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    0.306702] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
    [    0.309257] futex hash table entries: 256 (order: -1, 3072 bytes)
    [    0.320174] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [    0.321208] NFS: Registering the id_resolver key type
    [    0.321289] Key type id_resolver registered
    [    0.321300] Key type id_legacy registered
    [    0.321391] ntfs: driver 2.1.32 [Flags: R/O].
    [    0.325806] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
    [    0.325842] io scheduler noop registered
    [    0.325860] io scheduler deadline registered
    [    0.326071] io scheduler cfq registered (default)
    [    0.327889] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
    [    0.332032] backlight supply power not found, using dummy regulator
    [    0.413829] Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
    [    0.418897] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 158, base_baud = 3000000) is a 8250
    [    1.034386] console [ttyS0] enabled
    [    1.039482] 48022000.serial: ttyS1 at MMIO 0x48022000 (irq = 159, base_baud = 3000000) is a 8250
    [    1.049857] [drm] Initialized drm 1.1.0 20060810
    [    1.055922] panel panel: found backlight
    [    1.061710] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
    [    1.068367] [drm] No driver support for vblank timestamp query.
    [    1.106513] Console: switching to colour frame buffer device 100x30
    [    1.121000] tilcdc 4830e000.lcdc: fb0:  frame buffer device
    [    1.149606] [drm] Initialized tilcdc 1.0.0 20121205 on minor 0
    [    1.164433] loop: module loaded
    [    1.171100] spidev spi1.0: buggy DT: spidev listed directly in DT
    [    1.177233] ------------[ cut here ]------------
    [    1.182059] WARNING: CPU: 0 PID: 1 at drivers/spi/spidev.c:719 spidev_probe+0x1cc/0x1dc()
    [    1.190300] Modules linked in:
    [    1.193390] CPU: 0 PID: 1 Comm: swapper Not tainted 4.4.41-gf9f6f0db2d #1
    [    1.200262] Hardware name: Generic AM33XX (Flattened Device Tree)
    [    1.206384] Backtrace: 
    [    1.208875] [<c0013508>] (dump_backtrace) from [<c0013704>] (show_stack+0x18/0x1c)
    [    1.216528]  r7:c0440594 r6:000002cf r5:00000009 r4:00000000
    [    1.222279] [<c00136ec>] (show_stack) from [<c02a8aa8>] (dump_stack+0x24/0x28)
    [    1.229603] [<c02a8a84>] (dump_stack) from [<c0031d64>] (warn_slowpath_common+0x88/0xb4)
    [    1.237742] [<c0031cdc>] (warn_slowpath_common) from [<c0031e34>] (warn_slowpath_null+0x24/0x2c)
    [    1.246610]  r8:00000000 r7:c0945da0 r6:c0945d90 r5:dc430000 r4:dc430000
    [    1.253416] [<c0031e10>] (warn_slowpath_null) from [<c0440594>] (spidev_probe+0x1cc/0x1dc)
    [    1.261774] [<c04403c8>] (spidev_probe) from [<c043d540>] (spi_drv_probe+0x84/0xb0)
    [    1.269545]  r8:00000000 r7:c0945da0 r6:c0945d90 r5:00000000 r4:dc430000
    [    1.276361] [<c043d4bc>] (spi_drv_probe) from [<c03e35d8>] (driver_probe_device+0x204/0x2f8)
    [    1.284857]  r7:c0945da0 r6:00000000 r5:dc430000 r4:c0991408
    [    1.290596] [<c03e33d4>] (driver_probe_device) from [<c03e37f0>] (__device_attach_driver+0x8c/0xb4)
    [    1.299729]  r9:00000000 r8:c09913e4 r7:00000001 r6:dc430000 r5:dc057c48 r4:c0945da0
    [    1.307569] [<c03e3764>] (__device_attach_driver) from [<c03e17a0>] (bus_for_each_drv+0x68/0x9c)
    [    1.316438]  r7:00000001 r6:c03e3764 r5:dc057c48 r4:00000000
    [    1.322184] [<c03e1738>] (bus_for_each_drv) from [<c03e332c>] (__device_attach+0xb8/0x11c)
    [    1.330528]  r6:dc430034 r5:dc430000 r4:dc430000
    [    1.335196] [<c03e3274>] (__device_attach) from [<c03e3864>] (device_initial_probe+0x14/0x18)
    [    1.343801]  r7:00000000 r6:c0945840 r5:dc430000 r4:dc430008
    [    1.349543] [<c03e3850>] (device_initial_probe) from [<c03e2844>] (bus_probe_device+0x8c/0x94)
    [    1.358228] [<c03e27b8>] (bus_probe_device) from [<c03e0958>] (device_add+0x3f4/0x57c)
    [    1.366199]  r7:00000000 r6:dc430000 r5:dc3a9c00 r4:dc430008
    [    1.371943] [<c03e0564>] (device_add) from [<c043df80>] (spi_add_device+0xa4/0x160)
    [    1.379677]  r10:dc3a9d72 r9:dc112610 r8:dcb57208 r7:dc112610 r6:dc3a9c00 r5:00000000
    [    1.387580]  r4:dc430000
    [    1.390186] [<c043dedc>] (spi_add_device) from [<c043e490>] (of_register_spi_device+0x22c/0x2f4)
    [    1.399010]  r7:dc3a9c00 r6:dcb57550 r5:dc430000 r4:00000000
    [    1.404754] [<c043e264>] (of_register_spi_device) from [<c043fd9c>] (spi_register_master+0x29c/0x484)
    [    1.414057]  r7:c085c6f8 r6:00000000 r5:dcb57550 r4:dc3a9c00
    [    1.419803] [<c043fb00>] (spi_register_master) from [<c043ffc4>] (devm_spi_register_master+0x40/0x78)
    [    1.429088]  r10:dc3a9d72 r9:c085cc60 r8:dc3a9c00 r7:dc112610 r6:dc3a9c00 r5:dc372d90
    [    1.437011]  r4:00000000
    [    1.439616] [<c043ff84>] (devm_spi_register_master) from [<c04431c4>] (omap2_mcspi_probe+0x2d4/0x364)
    [    1.448875]  r7:dc112610 r6:dc3a9c00 r5:dc3a9eb0 r4:00000000
    [    1.454648] [<c0442ef0>] (omap2_mcspi_probe) from [<c03e50c8>] (platform_drv_probe+0x54/0xb8)
    [    1.463230]  r10:00000000 r9:c08c8600 r8:00000000 r7:fffffdfb r6:c0945df4 r5:dc112610
    [    1.471205]  r4:c0991408
    [    1.473763] [<c03e5074>] (platform_drv_probe) from [<c03e35d8>] (driver_probe_device+0x204/0x2f8)
    [    1.482694]  r7:c0945df4 r6:00000000 r5:dc112610 r4:c0991408
    [    1.488445] [<c03e33d4>] (driver_probe_device) from [<c03e3760>] (__driver_attach+0x94/0x98)
    [    1.496938]  r9:c08c8600 r8:000000a9 r7:00000000 r6:dc112644 r5:c0945df4 r4:dc112610
    [    1.504812] [<c03e36cc>] (__driver_attach) from [<c03e16e0>] (bus_for_each_dev+0x70/0xa4)
    [    1.513044]  r7:00000000 r6:c03e36cc r5:c0945df4 r4:00000000
    [    1.518795] [<c03e1670>] (bus_for_each_dev) from [<c03e2ec4>] (driver_attach+0x24/0x28)
    [    1.526854]  r6:c093fb20 r5:dc376980 r4:c0945df4
    [    1.531538] [<c03e2ea0>] (driver_attach) from [<c03e2b00>] (bus_add_driver+0x1a8/0x220)
    [    1.539630] [<c03e2958>] (bus_add_driver) from [<c03e3f78>] (driver_register+0x80/0x100)
    [    1.547757]  r7:dc372980 r6:c090ed20 r5:c08eb9a4 r4:c0945df4
    [    1.553527] [<c03e3ef8>] (driver_register) from [<c03e4ff0>] (__platform_driver_register+0x48/0x50)
    [    1.562632]  r5:c08eb9a4 r4:c093fb20
    [    1.566248] [<c03e4fa8>] (__platform_driver_register) from [<c08eb9c0>] (omap2_mcspi_driver_init+0x1c/0x20)
    [    1.576075]  r5:c08eb9a4 r4:c090ed20
    [    1.579709] [<c08eb9a4>] (omap2_mcspi_driver_init) from [<c00096bc>] (do_one_initcall+0x98/0x1e4)
    [    1.588670] [<c0009624>] (do_one_initcall) from [<c08c8e80>] (kernel_init_freeable+0x138/0x1cc)
    [    1.597428]  r10:00000007 r9:c08c8600 r8:000000a9 r7:c08fc830 r6:c0908f7c r5:c09595c0
    [    1.605378]  r4:c09595c0
    [    1.607941] [<c08c8d48>] (kernel_init_freeable) from [<c06767cc>] (kernel_init+0x18/0xf4)
    [    1.616201]  r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c06767b4
    [    1.624124]  r4:c09595c0
    [    1.626682] [<c06767b4>] (kernel_init) from [<c000fab8>] (ret_from_fork+0x14/0x3c)
    [    1.634332]  r5:c06767b4 r4:00000000
    [    1.637972] ---[ end trace ff4fcac48061668a ]---
    [    1.644546] libphy: Fixed MDIO Bus: probed
    [    1.651516] mousedev: PS/2 mouse device common for all mice
    [    1.657925] i2c /dev entries driver
    [    1.662944] cpuidle: enable-method property 'ti,am3352' found operations
    [    1.699684] pinctrl-single 44e10800.pinmux: pin 44e1099c.0 already requested by 481a0000.spi; cannot claim for 47810000.mmc
    [    1.710966] pinctrl-single 44e10800.pinmux: pin-103 (47810000.mmc) status -22
    [    1.718185] pinctrl-single 44e10800.pinmux: could not request pin 103 (44e1099c.0) from group pinmux_wlan_pins  on device pinctrl-single
    [    1.730574] omap_hsmmc 47810000.mmc: Error applying setting, reverse things back
    [    1.858374] ledtrig-cpu: registered to indicate activity on CPUs
    [    1.881168] NET: Registered protocol family 10
    [    1.890010] sit: IPv6 over IPv4 tunneling driver
    [    1.895670] NET: Registered protocol family 17
    [    1.909810] Key type dns_resolver registered
    [    1.914415] omap_voltage_late_init: Voltage driver support not added
    [    1.942270] omap-gpmc 50000000.gpmc: GPMC revision 6.0
    [    1.947463] gpmc_mem_init: disabling cs 0 mapped at 0x0-0x1000000
    [    1.971053] nand: device found, Manufacturer ID: 0x98, Chip ID: 0xda
    [    1.977440] nand: Toshiba NAND 256MiB 3,3V 8-bit
    [    1.986698] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 128
    [    2.002866] nand: using OMAP_ECC_BCH8_CODE_HW ECC scheme
    [    2.008324] 10 ofpart partitions found on MTD device 8000000.nand
    [    2.029384] Creating 10 MTD partitions on "8000000.nand":
    [    2.034835] 0x000000000000-0x000000020000 : "NAND.SPL"
    [    2.051055] 0x000000020000-0x000000040000 : "NAND.SPL.backup1"
    [    2.068929] 0x000000040000-0x000000060000 : "NAND.SPL.backup2"
    [    2.080866] 0x000000060000-0x000000080000 : "NAND.SPL.backup3"
    [    2.100872] 0x000000080000-0x0000000c0000 : "NAND.u-boot-spl-os"
    [    2.116778] 0x0000000c0000-0x0000001c0000 : "NAND.u-boot"
    [    2.124081] 0x0000001c0000-0x0000001e0000 : "NAND.u-boot-env"
    [    2.140879] 0x0000001e0000-0x000000200000 : "NAND.u-boot-env.backup1"
    [    2.160507] 0x000000200000-0x000000a00000 : "NAND.kernel"
    [    2.180467] 0x000000a00000-0x000010000000 : "NAND.file-system"
    [    2.399621] tps65910 0-002d: No interrupt support, no core IRQ
    [    2.442209] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
    [    2.456504] vmmc: supplied by vbat
    [    2.509748] vdd_mpu: supplied by vbat
    [    2.514859] ubi0: attaching mtd9
    [    3.872256] mmc1: MAN_BKOPS_EN bit is not set
    [    3.891154] mmc1: new high speed MMC card at address 0001
    [    3.909784] mmcblk0: mmc1:0001 004G60 3.69 GiB 
    [    3.914674] mmcblk0boot0: mmc1:0001 004G60 partition 1 2.00 MiB
    [    3.925822] mmcblk0boot1: mmc1:0001 004G60 partition 2 2.00 MiB
    [    4.188580] ubi0: scanning is finished
    [    4.202673] ubi0: attached mtd9 (name "NAND.file-system", size 246 MiB)
    [    4.209339] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
    [    4.216377] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 512
    [    4.223137] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
    [    4.230147] ubi0: good PEBs: 1965, bad PEBs: 3, corrupted PEBs: 0
    [    4.236297] ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128
    [    4.243573] ubi0: max/mean erase counter: 2/0, WL threshold: 4096, image sequence number: 71294218
    [    4.252617] ubi0: available PEBs: 0, total reserved PEBs: 1965, PEBs reserved for bad PEB handling: 37
    [    4.261996] ubi0: background thread "ubi_bgt0d" started, PID 66
    [    4.269101] input: volume_keys@0 as /devices/platform/volume_keys@0/input/input0
    [    4.277337] hctosys: unable to open rtc device (rtc0)
    [    4.286962] lis3_reg: disabling
    [    4.290252] wlan-en-regulator: disabling
    [    4.294642] ALSA device list:
    [    4.297706]   No soundcards found.
    [    4.309506] UBIFS (ubi0:0): background thread "ubifs_bgt0_0" started, PID 67
    [    4.340782] UBIFS (ubi0:0): recovery needed
    [    4.409476] UBIFS (ubi0:0): recovery completed
    [    4.414146] UBIFS (ubi0:0): UBIFS: mounted UBI device 0, volume 0, name "rootfs"
    [    4.421619] UBIFS (ubi0:0): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
    [    4.431690] UBIFS (ubi0:0): FS size: 242905088 bytes (231 MiB, 1913 LEBs), journal size 9023488 bytes (8 MiB, 72 LEBs)
    [    4.442490] UBIFS (ubi0:0): reserved for root: 0 bytes (0 KiB)
    [    4.448360] UBIFS (ubi0:0): media format: w4/r0 (latest is w4/r0), UUID E729169E-45DF-4695-84C1-89D864A4AF44, small LPT model
    [    4.461311] VFS: Mounted root (ubifs filesystem) on device 0:15.
    [    4.468885] devtmpfs: mounted
    [    4.472443] Freeing unused kernel memory: 264K (c08c8000 - c090a000)
    [    4.478874] This architecture does not have kernel memory protection.
    [    4.689602] systemd[1]: System time before build time, advancing clock.
    [    4.746844] random: systemd: uninitialized urandom read (16 bytes read, 28 bits of entropy available)
    [    4.779696] random: systemd: uninitialized urandom read (16 bytes read, 29 bits of entropy available)
    [    4.803089] systemd[1]: systemd 229 running in system mode. (+PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCRYPT +GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID -ELFUTILS +KMOD -IDN)
    [    4.822961] systemd[1]: Detected architecture arm.
    
    Welcome to Arago 2016.10!
    
    [    4.852182] systemd[1]: Set hostname to <am335x-evm>.
    [    5.051521] random: systemd-sysv-ge: uninitialized urandom read (16 bytes read, 29 bits of entropy available)
    [    5.084561] random: systemd-sysv-ge: uninitialized urandom read (16 bytes read, 29 bits of entropy available)
    [    5.146025] random: systemd: uninitialized urandom read (16 bytes read, 30 bits of entropy available)
    [    5.207310] random: systemd: uninitialized urandom read (16 bytes read, 30 bits of entropy available)
    [    5.217378] random: systemd: uninitialized urandom read (16 bytes read, 30 bits of entropy available)
    [    5.228087] random: systemd: uninitialized urandom read (16 bytes read, 30 bits of entropy available)
    [    5.296276] random: systemd: uninitialized urandom read (16 bytes read, 30 bits of entropy available)
    [    5.332278] random: systemd: uninitialized urandom read (16 bytes read, 30 bits of entropy available)
    [    5.617595] systemd[1]: Listening on udev Control Socket.
    [  OK  ] Listening on udev Control Socket.
    [    5.651373] systemd[1]: Listening on Network Service Netlink Socket.
    [  OK  ] Listening on Network Service Netlink Socket.
    [    5.680153] systemd[1]: Listening on udev Kernel Socket.
    [  OK  ] Listening on udev Kernel Socket.
    [    5.709870] systemd[1]: Reached target Remote File Systems.
    [  OK  ] Reached target Remote File Systems.
    [    5.740135] systemd[1]: Listening on Syslog Socket.
    [  OK  ] Listening on Syslog Socket.
    [    5.770172] systemd[1]: Listening on Journal Socket.
    [  OK  ] Listening on Journal Socket.
    [    5.827845] systemd[1]: Created slice System Slice.
    [  OK  ] Created slice System Slice.
    [    5.856652] systemd[1]: Mounting POSIX Message Queue File System...
             Mounting POSIX Message Queue File System...
    [    5.896989] systemd[1]: Created slice system-getty.slice.
    [  OK  ] Created slice system-getty.slice.
    [    5.956517] systemd[1]: Mounting Temporary Directory...
             Mounting Temporary Directory...
    [    6.007869] systemd[1]: Starting Setup Virtual Console...
             Starting Setup Virtual Console...
    [    6.082787] systemd[1]: Created slice system-serial\x2dgetty.slice.
    [  OK  ] Created slice system-serial\x2dgetty.slice.
    [    6.110432] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
    [  OK  ] Started Dispatch Password Requests to Console Directory Watch.
    [    6.144977] systemd[1]: Mounting Debug File System...
             Mounting Debug File System...
    [    6.180422] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
    [  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
    [    6.220960] systemd[1]: Listening on Journal Socket (/dev/log).
    [  OK  ] Listening on Journal Socket (/dev/log).
    [    6.255258] systemd[1]: Starting Journal Service...
             Starting Journal Service...
    [    6.295691] systemd[1]: Starting Create Static Device Nodes in /dev...
             Starting Create Static Device Nodes in /dev...
    [    6.360467] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
    [  OK  ] Started Forward Password Requests to Wall Directory Watch.
    [    6.389997] systemd[1]: Reached target Paths.
    [  OK  ] Reached target Paths.
    [    6.415136] systemd[1]: Starting Apply Kernel Variables...
             Starting Apply Kernel Variables...
    [    6.449964] systemd[1]: Reached target Swap.
    [  OK  ] Reached target Swap.
    [    6.495386] systemd[1]: Starting Remount Root and Kernel File Systems...
             Starting Remount Root and Kernel File Systems...
    [    6.591763] systemd[1]: Created slice User and Session Slice.
    [  OK  ] Created slice User and Session Slice.
    [    6.620096] systemd[1]: Reached target Slices.
    [  OK  ] Reached target Slices.
    [    6.727395] systemd[1]: Mounted Debug File System.
    [  OK  ] Mounted Debug File System.
    [    6.760256] systemd[1]: Mounted POSIX Message Queue File System.
    [  OK  ] Mounted POSIX Message Queue File System.
    [    6.780204] systemd[1]: Mounted Temporary Directory.
    [  OK  ] Mounted Temporary Directory.
    [    6.813677] systemd[1]: Started Setup Virtual Console.
    [  OK  ] Started Setup Virtual Console.
    [    6.852946] systemd[1]: Started Create Static Device Nodes in /dev.
    [  OK  ] Started Create Static Device Nodes in /dev.
    [    6.892399] systemd[1]: Started Apply Kernel Variables.
    [  OK  ] Started Apply Kernel Variables.
    [    6.912520] systemd[1]: Started Remount Root and Kernel File Systems.
    [  OK  ] Started Remount Root and Kernel File Systems.
    [    6.940953] systemd[1]: Started Journal Service.
    [  OK  ] Started Journal Service.
             Starting Flush Journal to Persistent Storage...
             Starting udev Coldplug all Devices...
    [  OK  ] Reached target Local File Systems (Pre).
             Mounting /media/ram...
             Mounting /var/volatile...
             Starting udev Kernel Device Manager...
    [  OK  ] Mounted /var/volatile.
    [  OK  ] Mounted /media/ram.
    [  OK  ] Started udev Kernel Device Manager.
    [    9.352377] systemd-journald[97]: Received request to flush runtime journal from PID 1
    [  OK  ] Started Flush Journal to Persistent Storage.
             Starting Load/Save Random Seed...
    [  OK  ] Reached target Local File Systems.
             Starting Create Volatile Files and Directories...
    [  OK  ] Started Load/Save Random Seed.
    [  OK  ] Started Create Volatile Files and Directories.
    [  OK  ] Found device /dev/ttyS0.
    [  OK  ] Created slice system-systemd\x2dbacklight.slice.
             Starting Load/Save Screen Backlight...htness of backlight:backlight...
             Starting Network Time Synchronization...
             Starting Update UTMP about System Boot/Shutdown...
    [  OK  ] Started udev Coldplug all Devices.
    [  OK  ] Started Load/Save Screen Backlight Brightness of backlight:backlight.
    [  OK  ] Started Network Time Synchronization.
    [   14.658291] EXT4-fs (mmcblk0): mounting ext3 file system using the ext4 subsystem
    [   14.783525] EXT4-fs (mmcblk0): recovery complete
    [   14.788215] EXT4-fs (mmcblk0): mounted filesystem with ordered data mode. Opts: (null)
    [  OK  ] Started Update UTMP about System Boot/Shutdown.
    [  OK  ] Found device /dev/ttyS3.
    [  OK  ] Listening on Load/Save RF Kill Switch Status /dev/rfkill Watch.
    [  OK  ] Reached target System Time Synchronized.
             Starting Synchronize System and HW clocks...
    [FAILED] Failed to start Synchronize System and HW clocks.
    See 'systemctl status sync-clocks.service' for details.
    [  OK  ] Reached target System Initialization.
    [  OK  ] Listening on RPCbind Server Activation Socket.
    [  OK  ] Started Daily Cleanup of Temporary Directories.
    [  OK  ] Reached target Timers.
    [  OK  ] Listening on D-Bus System Message Bus Socket.
    [  OK  ] Reached target Sockets.
    [  OK  ] Reached target Basic System.
    [  OK  ] Started D-Bus System Message Bus.
             Starting Network Service...
             Starting telnetd.service...
    [  OK  ] Started System Logging Service.
             Starting Login Service...
             Starting Print notice about GPLv3 packages...
             Starting Permit User Sessions...
    [  OK  ] Started Kernel Logging Service.
    [  OK  ] Started telnetd.service.
    [  OK  ] Started Permit User Sessions.
    [  OK  ] Started Network Service.
    [  OK  ] Reached target Network.
             Starting Network Name Resolution...
    [  OK  ] Started Serial Getty on ttyS0.
    [  OK  ] Started Getty on tty1.
    [  OK  ] Started Serial Getty on ttyS3.
             Starting thttpd.service...
    [  OK  ] Started Login Service.
    [  OK  ] Started thttpd.service.
    [  OK  ] Started Network Name Resolution.
             Starting rng-tools.service...
    [  OK  ] Started rng-tools.service.
    [   22.482071] random: nonblocking pool is initialized
             Starting thermal-zone-init.service...
    [  OK  ] Started thermal-zone-init.service.
    ***************************************************************
    ***************************************************************
    NOTICE: This file system contains the following GPLv3 packages:
    	binutils
    	dosfstools
    	m4
    
    If you do not wish to distribute GPLv3 components please remove
    the above packages prior to distribution.  This can be done using
    the opkg remove command.  i.e.:
        opkg remove <package>
    Where <package> is the name printed in the list above
    
    NOTE: If the package is a dependency of another package you
          will be notified of the dependent packages.  You should
          use the --force-removal-of-dependent-packages option to
          also remove the dependent packages as well
    ***************************************************************
    ***************************************************************
    [  OK  ] Started Print notice about GPLv3 packages.
    
     _____                    _____           _         _   
    |  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_ 
    |     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
    |__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|  
                  |___|                    |___|          
    

    Please suggest to resolve this problem and do we have any test utility to verify the spi driver ?

    Thanks,

    Anil

  • Hello,

    In your DT file you need to replace "compatible = "spidev";" to compatible = "rohm,dh2228fv";, so your new DT node should like this :

    &spi1{
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&spi1_pins>;
    /* DO is MOSI, D1 is MISO */
    ti,pindir-d0-out-d1-in = <1>;
    spidev {
    compatible = "rohm,dh2228fv";
    /* We use SPI CS 0; register the same */
    reg = <0>;
    spi-max-frequency = <1000000>;
    spi-cs-high;
    /* Operate with CPOL and CPHA set to zero */
    /* spi-cpol; */
    /* spi-cpha; */
    };
    };

    In later version of kernels the compatible string was changed from "spidev" to "rohm,dh2228fv".

    Cheers,
    --Prabhakar Lad
  • Hi Prabhakar ,

    Thanks for you valuable support...
    Now we are not getting above maintained warning.

    We have requirement to interface external RTC using SPI . Our RTC part number is MCP79510 and which is based on SPI interface.we observed that MCP795 RTC SPI Driver already available in kernel.Please let us know what changes needed in device tree and kernel to make use external RTC in the kernel space using MCP795 RTC driver to get and set the external RTC parameters.


    Thanks,
    Anil
  • Hello,

    You need to apply the following patch:

    1]

    diff --git a/drivers/rtc/rtc-mcp795.c b/drivers/rtc/rtc-mcp795.c
    index 1c91ce8..495c92a 100644
    --- a/drivers/rtc/rtc-mcp795.c
    +++ b/drivers/rtc/rtc-mcp795.c
    @@ -21,6 +21,8 @@
    #include <linux/spi/spi.h>
    #include <linux/rtc.h>

    +#include <linux/io.h>
    +
    /* MCP795 Instructions, see datasheet table 3-1 */
    #define MCP795_EEREAD 0x03
    #define MCP795_EEWRITE 0x02
    @@ -183,9 +185,18 @@ static int mcp795_probe(struct spi_device *spi)
    return 0;
    }

    +#ifdef CONFIG_OF
    +static const struct of_device_id mcp795_rtc_match[] = {
    + { .compatible = "microchip,mcp795-rtc", },
    + {},
    +};
    +MODULE_DEVICE_TABLE(of, mcp795_rtc_match);
    +#endif
    +
    static struct spi_driver mcp795_driver = {
    .driver = {
    - .name = "rtc-mcp795",
    + .name = "rtc-mcp795",
    + .of_match_table = of_match_ptr(mcp795_rtc_match),
    },
    .probe = mcp795_probe,
    };

    2] You need to enable RTC_DRV_MCP795 for your linux config, you can do this by menuconfig.
    tristate "Microchip MCP795"

    3] Recompile your kernel.

    4] You meed to modify your DT, and it should look as below:

    &spi1{
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&spi1_pins>;
    /* DO is MOSI, D1 is MISO */
    ti,pindir-d0-out-d1-in = <1>;
    spidev {
    compatible = "microchip,mcp795-rtc";
    /* We use SPI CS 0; register the same */
    reg = <0>;
    spi-max-frequency = <1000000>;
    spi-cs-high;
    /* Operate with CPOL and CPHA set to zero */
    /* spi-cpol; */
    /* spi-cpha; */
    };
    };

    5] Recompile the DT and use it.

    Cheers,
    --Prabhakar Lad

  • Hi Prabhakar ,

    Thanks for you valuable support.

    As per your suggestion changed RTC driver &  device tree then updated  new images (kernel and device tree) in board.
    We found that during boot hw clock not working and when execute "hwclock" in kernel that time its shows error "hwclock: RTC_RD_TIME: Invalid argument".

    Please refer the following and attached compete boot log .


    [1.164475] loop: module loaded
    [    1.172521] libphy: Fixed MDIO Bus: probed
    [    1.179610] mousedev: PS/2 mouse device common for all mice
    [    1.191812] rtc-mcp795 spi1.0: rtc core: registered rtc-mcp795 as rtc0
    [    1.204785] i2c /dev entries driver
    [    1.209781] cpuidle: enable-method property 'ti,am3352' found operations
    [    1.239740] pinctrl-single 44e10800.pinmux: pin 44e1099c.0 already requested by 481a0000.spi; cannot claim for 47810000.mmc
    [    1.251052] pinctrl-single 44e10800.pinmux: pin-103 (47810000.mmc) status -22
    [    1.258230] pinctrl-single 44e10800.pinmux: could not request pin 103 (44e1099c.0) from group pinmux_wlan_pins  on device pinctrl-single
    [    1.270672] omap_hsmmc 47810000.mmc: Error applying setting, reverse things back
    [    1.400261] ledtrig-cpu: registered to indicate activity on CPUs
    [    1.421595] NET: Registered protocol family 10
    [    1.430232] sit: IPv6 over IPv4 tunneling driver
    [    1.435897] NET: Registered protocol family 17
    [    1.449853] Key type dns_resolver registered
    [    1.459776] omap_voltage_late_init: Voltage driver support not added
    [    1.481981] omap-gpmc 50000000.gpmc: GPMC revision 6.0
    [    1.489547] gpmc_mem_init: disabling cs 0 mapped at 0x0-0x1000000
    [    1.497203] nand: device found, Manufacturer ID: 0x98, Chip ID: 0xda
    [    1.517678] nand: Toshiba NAND 256MiB 3,3V 8-bit
    [    1.529447] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 128
    [    1.549480] nand: using OMAP_ECC_BCH8_CODE_HW ECC scheme
    [    1.554981] 10 ofpart partitions found on MTD device 8000000.nand
    [    1.566150] Creating 10 MTD partitions on "8000000.nand":
    [    1.579457] 0x000000000000-0x000000020000 : "NAND.SPL"
    [    1.591130] 0x000000020000-0x000000040000 : "NAND.SPL.backup1"
    [    1.610610] 0x000000040000-0x000000060000 : "NAND.SPL.backup2"
    [    1.630243] 0x000000060000-0x000000080000 : "NAND.SPL.backup3"
    [    1.637613] 0x000000080000-0x0000000c0000 : "NAND.u-boot-spl-os"
    [    1.648479] 0x0000000c0000-0x0000001c0000 : "NAND.u-boot"
    [    1.663901] 0x0000001c0000-0x0000001e0000 : "NAND.u-boot-env"
    [    1.680812] 0x0000001e0000-0x000000200000 : "NAND.u-boot-env.backup1"
    [    1.696514] 0x000000200000-0x000000a00000 : "NAND.kernel"
    [    1.713872] 0x000000a00000-0x000010000000 : "NAND.file-system"
    [    1.939668] tps65910 0-002d: No interrupt support, no core IRQ
    [    1.976681] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
    [    1.987549] vmmc: supplied by vbat
    [    2.039807] vdd_mpu: supplied by vbat
    [    2.044897] ubi0: attaching mtd9
    [    3.402158] mmc1: MAN_BKOPS_EN bit is not set
    [    3.421222] mmc1: new high speed MMC card at address 0001
    [    3.440406] mmcblk0: mmc1:0001 004G60 3.69 GiB
    [    3.445334] mmcblk0boot0: mmc1:0001 004G60 partition 1 2.00 MiB
    [    3.456831] mmcblk0boot1: mmc1:0001 004G60 partition 2 2.00 MiB
    [    3.470999]  mmcblk0:
    [    3.730790] ubi0: scanning is finished
    [    3.744974] ubi0: attached mtd9 (name "NAND.file-system", size 246 MiB)
    [    3.751791] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
    [    3.758700] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 512
    [    3.765483] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
    [    3.772498] ubi0: good PEBs: 1965, bad PEBs: 3, corrupted PEBs: 0
    [    3.778619] ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128
    [    3.785916] ubi0: max/mean erase counter: 2/0, WL threshold: 4096, image sequence number: 71294218
    [    3.794936] ubi0: available PEBs: 0, total reserved PEBs: 1965, PEBs reserved for bad PEB handling: 37
    [    3.804340] ubi0: background thread "ubi_bgt0d" started, PID 66
    [    3.811454] input: volume_keys@0 as /devices/platform/volume_keys@0/input/input0
    [    3.819946] rtc-mcp795 spi1.0: hctosys: unable to read the hardware clock
    [    3.831415] lis3_reg: disabling

    -> when execute "hwclock" command in kernel,following error occured

     am335x-evm login: root
    root@am335x-evm:~# hwclock
    hwclock: RTC_RD_TIME: Invalid argument

     

    Please provide your valuable suggest to resolve this issue.

     

    U-Boot SPL 2016.05-00319-ga0faac0-dirty (Jun 22 2017 - 12:43:55)
    Trying to boot from NAND
    The Expected Linux image was not found. Please check your NAND configuration.
    Trying to start u-boot now...
    
    
    U-Boot 2016.05-00319-ga0faac0-dirty (Jun 22 2017 - 12:43:55 +0530)
    
    CPU  : AM335X-GP rev 2.1
    Model: TI AM335x EVM
           Watchdog enabled
    I2C:   ready
    DRAM:  512 MiB
    NAND:  256 MiB
    MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
    MMC: no card present
    ** Bad device mmc 0 **
    Using default environment
    
    <ethaddr> not set. Validating first E-fuse MAC
    Net:   eth0: ethernet@4a100000
    Warning: usb_ether MAC addresses don't match:
    Address in SROM is         de:ad:be:ef:00:01
    Address in environment is  68:9e:19:81:98:50
    , eth1: usb_ether
    Press SPACE to abort autoboot in 2 seconds
    Booting from nand ...
    
    NAND read: device 0 offset 0x80000, size 0x40000
     262144 bytes read: OK
    
    NAND read: device 0 offset 0x200000, size 0x800000
     8388608 bytes read: OK
    Kernel image @ 0x82000000 [ 0x000000 - 0x350fc0 ]
    ## Flattened Device Tree blob at 88000000
       Booting using the fdt blob at 0x88000000
       Loading Device Tree to 8fff2000, end 8ffff4f9 ... OK
    
    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.41-gf9f6f0db2d (root@EMMYS0683) (gcc version 5.3.1 20160113 (Linaro GCC 5.3-2016.02) ) #1 PREEMPT Mon Jul 3 18:46:15 IST 2017
    [    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 EVM
    [    0.000000] cma: Reserved 48 MiB at 0x9d000000
    [    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 pages: 129920
    [    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: 2048 (order: 1, 8192 bytes)
    [    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
    [    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
    [    0.000000] Memory: 459972K/524288K available (6607K kernel code, 317K rwdata, 2344K rodata, 268K init, 265K bss, 15164K reserved, 49152K cma-reserved, 0K highmem)
    [    0.000000] Virtual kernel memory layout:
    [    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    [    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    [    0.000000]     vmalloc : 0xe0800000 - 0xff800000   ( 496 MB)
    [    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
    [    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    [    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
    [    0.000000]       .text : 0xc0008000 - 0xc08c604c   (8953 kB)
    [    0.000000]       .init : 0xc08c7000 - 0xc090a000   ( 268 kB)
    [    0.000000]       .data : 0xc090a000 - 0xc09595b0   ( 318 kB)
    [    0.000000]        .bss : 0xc09595b0 - 0xc099bcd8   ( 266 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 24000000 Hz
    [    0.000017] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
    [    0.000045] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
    [    0.000057] OMAP clocksource: timer1 at 24000000 Hz
    [    0.000285] clocksource_probe: no matching clocksources found
    [    0.000497] Console: colour dummy device 80x30
    [    0.000528] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
    [    0.000536] This ensures that you still see kernel messages. Please
    [    0.000543] update your kernel commandline.
    [    0.000562] Calibrating delay loop... 597.60 BogoMIPS (lpj=2988032)
    [    0.058741] pid_max: default: 32768 minimum: 301
    [    0.058911] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.058927] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.059773] Initializing cgroup subsys io
    [    0.059808] Initializing cgroup subsys memory
    [    0.059850] Initializing cgroup subsys devices
    [    0.059869] Initializing cgroup subsys freezer
    [    0.059886] Initializing cgroup subsys perf_event
    [    0.059901] Initializing cgroup subsys pids
    [    0.059935] CPU: Testing write buffer coherency: ok
    [    0.060393] Setting up static identity map for 0x80008200 - 0x80008260
    [    0.063156] devtmpfs: initialized
    [    0.080474] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    [    0.099933] omap_hwmod: debugss: _wait_target_disable failed
    [    0.158142] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    [    0.162830] pinctrl core: initialized pinctrl subsystem
    [    0.164427] NET: Registered protocol family 16
    [    0.167153] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [    0.188804] cpuidle: using governor ladder
    [    0.218792] cpuidle: using governor menu
    [    0.224604] OMAP GPIO hardware version 0.1
    [    0.235367] omap-gpmc 50000000.gpmc: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/nandflash_pins_s0, deferring probe
    [    0.239200] hw-breakpoint: debug architecture 0x4 unsupported.
    [    0.279822] edma 49000000.edma: TI EDMA DMA engine driver
    [    0.285462] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, deferring probe
    [    0.285664] media: Linux media interface: v0.10
    [    0.285746] Linux video capture interface: v2.00
    [    0.285820] pps_core: LinuxPPS API ver. 1 registered
    [    0.285830] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [    0.285868] PTP clock support registered
    [    0.285943] EDAC MC: Ver: 3.0.0
    [    0.287412] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
    [    0.287851] Advanced Linux Sound Architecture Driver Initialized.
    [    0.289435] clocksource: Switched to clocksource timer1
    [    0.303650] NET: Registered protocol family 2
    [    0.304595] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
    [    0.304666] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
    [    0.304727] TCP: Hash tables configured (established 4096 bind 4096)
    [    0.304816] UDP hash table entries: 256 (order: 0, 4096 bytes)
    [    0.304842] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    [    0.305032] NET: Registered protocol family 1
    [    0.305502] RPC: Registered named UNIX socket transport module.
    [    0.305522] RPC: Registered udp transport module.
    [    0.305530] RPC: Registered tcp transport module.
    [    0.305538] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    0.306661] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
    [    0.309210] futex hash table entries: 256 (order: -1, 3072 bytes)
    [    0.320109] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [    0.321155] NFS: Registering the id_resolver key type
    [    0.321231] Key type id_resolver registered
    [    0.321242] Key type id_legacy registered
    [    0.321334] ntfs: driver 2.1.32 [Flags: R/O].
    [    0.325780] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
    [    0.325817] io scheduler noop registered
    [    0.325835] io scheduler deadline registered
    [    0.326049] io scheduler cfq registered (default)
    [    0.327889] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
    [    0.332031] backlight supply power not found, using dummy regulator
    [    0.413463] Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
    [    0.418537] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 158, base_baud = 3000000) is a 8250
    [    1.033914] console [ttyS0] enabled
    [    1.038925] 48022000.serial: ttyS1 at MMIO 0x48022000 (irq = 159, base_baud = 3000000) is a 8250
    [    1.049292] [drm] Initialized drm 1.1.0 20060810
    [    1.055495] panel panel: found backlight
    [    1.061268] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
    [    1.067928] [drm] No driver support for vblank timestamp query.
    [    1.106054] Console: switching to colour frame buffer device 100x30
    [    1.120538] tilcdc 4830e000.lcdc: fb0:  frame buffer device
    [    1.149663] [drm] Initialized tilcdc 1.0.0 20121205 on minor 0
    [    1.164475] loop: module loaded
    [    1.172521] libphy: Fixed MDIO Bus: probed
    [    1.179610] mousedev: PS/2 mouse device common for all mice
    [    1.186055] rtc-mcp795 spi1.0: 1.SPI setup done....
    [    1.191812] rtc-mcp795 spi1.0: rtc core: registered rtc-mcp795 as rtc0
    [    1.198440] rtc-mcp795 spi1.0: 2.devm_rtc_device_register done....
    [    1.204785] i2c /dev entries driver
    [    1.209781] cpuidle: enable-method property 'ti,am3352' found operations
    [    1.239740] pinctrl-single 44e10800.pinmux: pin 44e1099c.0 already requested by 481a0000.spi; cannot claim for 47810000.mmc
    [    1.251052] pinctrl-single 44e10800.pinmux: pin-103 (47810000.mmc) status -22
    [    1.258230] pinctrl-single 44e10800.pinmux: could not request pin 103 (44e1099c.0) from group pinmux_wlan_pins  on device pinctrl-single
    [    1.270672] omap_hsmmc 47810000.mmc: Error applying setting, reverse things back
    [    1.400261] ledtrig-cpu: registered to indicate activity on CPUs
    [    1.421595] NET: Registered protocol family 10
    [    1.430232] sit: IPv6 over IPv4 tunneling driver
    [    1.435897] NET: Registered protocol family 17
    [    1.449853] Key type dns_resolver registered
    [    1.459776] omap_voltage_late_init: Voltage driver support not added
    [    1.481981] omap-gpmc 50000000.gpmc: GPMC revision 6.0
    [    1.489547] gpmc_mem_init: disabling cs 0 mapped at 0x0-0x1000000
    [    1.497203] nand: device found, Manufacturer ID: 0x98, Chip ID: 0xda
    [    1.517678] nand: Toshiba NAND 256MiB 3,3V 8-bit
    [    1.529447] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 128
    [    1.549480] nand: using OMAP_ECC_BCH8_CODE_HW ECC scheme
    [    1.554981] 10 ofpart partitions found on MTD device 8000000.nand
    [    1.566150] Creating 10 MTD partitions on "8000000.nand":
    [    1.579457] 0x000000000000-0x000000020000 : "NAND.SPL"
    [    1.591130] 0x000000020000-0x000000040000 : "NAND.SPL.backup1"
    [    1.610610] 0x000000040000-0x000000060000 : "NAND.SPL.backup2"
    [    1.630243] 0x000000060000-0x000000080000 : "NAND.SPL.backup3"
    [    1.637613] 0x000000080000-0x0000000c0000 : "NAND.u-boot-spl-os"
    [    1.648479] 0x0000000c0000-0x0000001c0000 : "NAND.u-boot"
    [    1.663901] 0x0000001c0000-0x0000001e0000 : "NAND.u-boot-env"
    [    1.680812] 0x0000001e0000-0x000000200000 : "NAND.u-boot-env.backup1"
    [    1.696514] 0x000000200000-0x000000a00000 : "NAND.kernel"
    [    1.713872] 0x000000a00000-0x000010000000 : "NAND.file-system"
    [    1.939668] tps65910 0-002d: No interrupt support, no core IRQ
    [    1.976681] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
    [    1.987549] vmmc: supplied by vbat
    [    2.039807] vdd_mpu: supplied by vbat
    [    2.044897] ubi0: attaching mtd9
    [    3.402158] mmc1: MAN_BKOPS_EN bit is not set
    [    3.421222] mmc1: new high speed MMC card at address 0001
    [    3.440406] mmcblk0: mmc1:0001 004G60 3.69 GiB 
    [    3.445334] mmcblk0boot0: mmc1:0001 004G60 partition 1 2.00 MiB
    [    3.456831] mmcblk0boot1: mmc1:0001 004G60 partition 2 2.00 MiB
    [    3.470999]  mmcblk0:
    [    3.730790] ubi0: scanning is finished
    [    3.744974] ubi0: attached mtd9 (name "NAND.file-system", size 246 MiB)
    [    3.751791] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
    [    3.758700] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 512
    [    3.765483] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
    [    3.772498] ubi0: good PEBs: 1965, bad PEBs: 3, corrupted PEBs: 0
    [    3.778619] ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128
    [    3.785916] ubi0: max/mean erase counter: 2/0, WL threshold: 4096, image sequence number: 71294218
    [    3.794936] ubi0: available PEBs: 0, total reserved PEBs: 1965, PEBs reserved for bad PEB handling: 37
    [    3.804340] ubi0: background thread "ubi_bgt0d" started, PID 66
    [    3.811454] input: volume_keys@0 as /devices/platform/volume_keys@0/input/input0
    [    3.819946] rtc-mcp795 spi1.0: hctosys: unable to read the hardware clock
    [    3.831415] lis3_reg: disabling
    [    3.834602] wlan-en-regulator: disabling
    [    3.839014] ALSA device list:
    [    3.842062]   No soundcards found.
    [    3.859490] UBIFS (ubi0:0): background thread "ubifs_bgt0_0" started, PID 67
    [    3.915419] UBIFS (ubi0:0): UBIFS: mounted UBI device 0, volume 0, name "rootfs"
    [    3.922928] UBIFS (ubi0:0): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
    [    3.932974] UBIFS (ubi0:0): FS size: 242905088 bytes (231 MiB, 1913 LEBs), journal size 9023488 bytes (8 MiB, 72 LEBs)
    [    3.943767] UBIFS (ubi0:0): reserved for root: 0 bytes (0 KiB)
    [    3.949664] UBIFS (ubi0:0): media format: w4/r0 (latest is w4/r0), UUID E729169E-45DF-4695-84C1-89D864A4AF44, small LPT model
    [    3.962460] VFS: Mounted root (ubifs filesystem) on device 0:15.
    [    3.969354] devtmpfs: mounted
    [    3.972841] Freeing unused kernel memory: 268K (c08c7000 - c090a000)
    [    3.979282] This architecture does not have kernel memory protection.
    [    4.192050] systemd[1]: System time before build time, advancing clock.
    [    4.249871] random: systemd: uninitialized urandom read (16 bytes read, 27 bits of entropy available)
    [    4.282682] random: systemd: uninitialized urandom read (16 bytes read, 27 bits of entropy available)
    [    4.306024] systemd[1]: systemd 229 running in system mode. (+PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCRYPT +GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID -ELFUTILS +KMOD -IDN)
    [    4.325881] systemd[1]: Detected architecture arm.
    
    Welcome to Arago 2016.10!
    
    [    4.351590] systemd[1]: Set hostname to <am335x-evm>.
    [    4.533387] random: systemd-sysv-ge: uninitialized urandom read (16 bytes read, 28 bits of entropy available)
    [    4.586374] random: systemd-sysv-ge: uninitialized urandom read (16 bytes read, 28 bits of entropy available)
    [    4.647954] random: systemd: uninitialized urandom read (16 bytes read, 28 bits of entropy available)
    [    4.709405] random: systemd: uninitialized urandom read (16 bytes read, 28 bits of entropy available)
    [    4.719598] random: systemd: uninitialized urandom read (16 bytes read, 29 bits of entropy available)
    [    4.730279] random: systemd: uninitialized urandom read (16 bytes read, 29 bits of entropy available)
    [    4.798268] random: systemd: uninitialized urandom read (16 bytes read, 29 bits of entropy available)
    [    4.834079] random: systemd: uninitialized urandom read (16 bytes read, 29 bits of entropy available)
    [    5.121565] systemd[1]: Listening on Journal Socket.
    [  OK  ] Listening on Journal Socket.
    [    5.150286] systemd[1]: Listening on Journal Socket (/dev/log).
    [  OK  ] Listening on Journal Socket (/dev/log).
    [    5.185123] systemd[1]: Created slice System Slice.
    [  OK  ] Created slice System Slice.
    [    5.210434] systemd[1]: Listening on udev Control Socket.
    [  OK  ] Listening on udev Control Socket.
    [    5.239936] systemd[1]: Reached target Remote File Systems.
    [  OK  ] Reached target Remote File Systems.
    [    5.277264] systemd[1]: Mounting Debug File System...
             Mounting Debug File System...
    [    5.321681] systemd[1]: Created slice User and Session Slice.
    [  OK  ] Created slice User and Session Slice.
    [    5.342156] systemd[1]: Reached target Slices.
    [  OK  ] Reached target Slices.
    [    5.423037] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
    [  OK  ] Started Forward Password Requests to Wall Directory Watch.
    [    5.457541] systemd[1]: Starting Remount Root and Kernel File Systems...
             Starting Remount Root and Kernel File Systems...
    [    5.496024] systemd[1]: Starting Setup Virtual Console...
             Starting Setup Virtual Console...
    [    5.549817] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
    [  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
    [    5.636224] systemd[1]: Mounting Temporary Directory...
             Mounting Temporary Directory...
    [    5.671053] systemd[1]: Listening on Network Service Netlink Socket.
    [  OK  ] Listening on Network Service Netlink Socket.
    [    5.686985] systemd[1]: Listening on udev Kernel Socket.
    [  OK  ] Listening on udev Kernel Socket.
    [    5.710005] systemd[1]: Reached target Swap.
    [  OK  ] Reached target Swap.
    [    5.731642] systemd[1]: Created slice system-getty.slice.
    [  OK  ] Created slice system-getty.slice.
    [    5.760267] systemd[1]: Listening on Syslog Socket.
    [  OK  ] Listening on Syslog Socket.
    [    5.795095] systemd[1]: Mounting POSIX Message Queue File System...
             Mounting POSIX Message Queue File System...
    [    5.831973] systemd[1]: Created slice system-serial\x2dgetty.slice.
    [  OK  ] Created slice system-serial\x2dgetty.slice.
    [    5.880406] systemd[1]: Starting Apply Kernel Variables...
             Starting Apply Kernel Variables...
    [    5.926144] systemd[1]: Starting Journal Service...
             Starting Journal Service...
    [    6.002694] systemd[1]: Starting Create Static Device Nodes in /dev...
             Starting Create Static Device Nodes in /dev...
    [    6.040557] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
    [  OK  ] Started Dispatch Password Requests to Console Directory Watch.
    [    6.100156] systemd[1]: Reached target Paths.
    [  OK  ] Reached target Paths.
    [    6.142469] systemd[1]: Mounted Debug File System.
    [  OK  ] Mounted Debug File System.
    [    6.190230] systemd[1]: Mounted POSIX Message Queue File System.
    [  OK  ] Mounted POSIX Message Queue File System.
    [    6.230253] systemd[1]: Mounted Temporary Directory.
    [  OK  ] Mounted Temporary Directory.
    [    6.263426] systemd[1]: Started Remount Root and Kernel File Systems.
    [  OK  ] Started Remount Root and Kernel File Systems.
    [    6.302508] systemd[1]: Started Setup Virtual Console.
    [  OK  ] Started Setup Virtual Console.
    [    6.330876] systemd[1]: Started Apply Kernel Variables.
    [  OK  ] Started Apply Kernel Variables.
    [    6.362621] systemd[1]: Started Create Static Device Nodes in /dev.
    
    [    6.448340] systemd[1]: Started Journal Service..
    [  OK  ] Started Journal Service.
             Starting udev Kernel Device Manager...
    [  OK  ] Reached target Local File Systems (Pre).
             Mounting /var/volatile...
             Mounting /media/ram...
             Starting udev Coldplug all Devices...
             Starting Flush Journal to Persistent Storage...
    [  OK  ] Mounted /var/volatile.
    [  OK  ] Mounted /media/ram.
    [  OK  ] Started udev Kernel Device Manager.
    [    9.260296] systemd-journald[107]: Received request to flush runtime journal from PID 1
    [  OK  ] Started Flush Journal to Persistent Storage.
    [  OK  ] Reached target Local File Systems.
             Starting Create Volatile Files and Directories...
             Starting Load/Save Random Seed...
    [  OK  ] Started Load/Save Random Seed.
    [  OK  ] Started Create Volatile Files and Directories.
    [  OK  ] Found device /dev/ttyS0.
    [  OK  ] Created slice system-systemd\x2dbacklight.slice.
             Starting Load/Save Screen Backlight...htness of backlight:backlight...
             Starting Update UTMP about System Boot/Shutdown...
             Starting Network Time Synchronization...
    [  OK  ] Started udev Coldplug all Devices.
    [  OK  ] Started Load/Save Screen Backlight Brightness of backlight:backlight.
    [  OK  ] Started Network Time Synchronization.
    [   14.271219] EXT4-fs (mmcblk0): mounting ext3 file system using the ext4 subsystem
    [   14.385554] EXT4-fs (mmcblk0): mounted filesystem with ordered data mode. Opts: (null)
    [  OK  ] Started Update UTMP about System Boot/Shutdown.
    [  OK  ] Found device /dev/ttyS3.
    [  OK  ] Listening on Load/Save RF Kill Switch Status /dev/rfkill Watch.
    [  OK  ] Reached target System Time Synchronized.
             Starting Synchronize System and HW clocks...
    [  OK  ] Started Synchronize System and HW clocks.
    [  OK  ] Reached target System Initialization.
    [  OK  ] Listening on RPCbind Server Activation Socket.
    [  OK  ] Listening on D-Bus System Message Bus Socket.
    [  OK  ] Reached target Sockets.
    [  OK  ] Reached target Basic System.
    [  OK  ] Started D-Bus System Message Bus.
             Starting Network Service...
             Starting Print notice about GPLv3 packages...
             Starting Login Service...
    [  OK  ] Started System Logging Service.
    [  OK  ] Started Daily Cleanup of Temporary Directories.
    [  OK  ] Reached target Timers.
             Starting telnetd.service...
             Starting Permit User Sessions...
    [  OK  ] Started Kernel Logging Service.
    [  OK  ] Started Permit User Sessions.
    [  OK  ] Started telnetd.service.
    [  OK  ] Started Network Service.
    [  OK  ] Reached target Network.
             Starting Network Name Resolution...
             Starting thttpd.service...
    [  OK  ] Started Serial Getty on ttyS0.
    [  OK  ] Started Getty on tty1.
    [  OK  ] Started Serial Getty on ttyS3.
    [  OK  ] Started Login Service.
    [  OK  ] Started thttpd.service.
    [  OK  ] Started Network Name Resolution.
             Starting rng-tools.service...
    [  OK  ] Started rng-tools.service.
    [   21.962888] random: nonblocking pool is initialized
             Starting thermal-zone-init.service...
    [  OK  ] Started thermal-zone-init.service.
    ***************************************************************
    ***************************************************************
    NOTICE: This file system contains the following GPLv3 packages:
    	binutils
    	dosfstools
    	m4
    
    If you do not wish to distribute GPLv3 components please remove
    the above packages prior to distribution.  This can be done using
    the opkg remove command.  i.e.:
        opkg remove <package>
    Where <package> is the name printed in the list above
    
    NOTE: If the package is a dependency of another package you
          will be notified of the dependent packages.  You should
          use the --force-removal-of-dependent-packages option to
          also remove the dependent packages as well
    ***************************************************************
    ***************************************************************
    [  OK  ] Started Print notice about GPLv3 packages.
    [   26.171814] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underfow
    [   26.173186] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [   26.174141] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [   26.189381] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [   26.190301] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [   26.205155] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000104): Sync lost
    [   26.205488] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [   26.206453] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [   26.221328] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000104): Sync lost
    [   26.221647] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [   26.222612] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [   26.234873] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underfow
    
     _____                    _____           _         _   
    |  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_ 
    |     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
    |__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|  
                  |___|                    |___|            
    
    
    am335x-evm login: root
    root@am335x-evm:~# hwclock
    hwclock: RTC_RD_TIME: Invalid argument
    
    
    
    
    

     

    Thanks,

    Anil

     

     

     

     

     

  • Hello,

    1: Can you post your DT node ?
    2: Is your CS pin active high ?
    3: Is the chip on your hardware actually mcp795 ?
    4: mcp795 chip what SPI mode does it support ?
    5: In your hardware is d0 output and d1 input ?

    Cheers,
    --Prabhakar Lad
  • Hi Prabhakar ,

    1: Can you post your DT node ?

    -> Please refer the attached dts file but uploaded in .txt format for your reference.

    /*
     * 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.
     */
    /dts-v1/;
    
    #include "am33xx.dtsi"
    #include <dt-bindings/interrupt-controller/irq.h>
    
    / {
    	model = "TI AM335x EVM";
    	compatible = "ti,am335x-evm", "ti,am33xx";
    
    	cpus {
    		cpu@0 {
    			cpu0-supply = <&vdd1_reg>;
    		};
    	};
    
    	memory {
    		device_type = "memory";
    		reg = <0x80000000 0x20000000>; /* 256 MB */
    	};
    
    	vbat: fixedregulator@0 {
    		compatible = "regulator-fixed";
    		regulator-name = "vbat";
    		regulator-min-microvolt = <5000000>;
    		regulator-max-microvolt = <5000000>;
    		regulator-boot-on;
    	};
    
    	lis3_reg: fixedregulator@1 {
    		compatible = "regulator-fixed";
    		regulator-name = "lis3_reg";
    		regulator-boot-on;
    	};
    
    	wlan_en_reg: fixedregulator@2 {
    		compatible = "regulator-fixed";
    		regulator-name = "wlan-en-regulator";
    		regulator-min-microvolt = <1800000>;
    		regulator-max-microvolt = <1800000>;
    
    		/* WLAN_EN GPIO for this board - Bank1, pin16 */
    		gpio = <&gpio1 16 0>;
    
    		/* WLAN card specific delay */
    		startup-delay-us = <70000>;
    		enable-active-high;
    	};
    
    	matrix_keypad: matrix_keypad@0 {
    		compatible = "gpio-matrix-keypad";
    		debounce-delay-ms = <5>;
    		col-scan-delay-us = <2>;
    
    		row-gpios = <&gpio1 25 GPIO_ACTIVE_HIGH		/* Bank1, pin25 */
    			     &gpio1 26 GPIO_ACTIVE_HIGH		/* Bank1, pin26 */
    			     &gpio1 27 GPIO_ACTIVE_HIGH>;	/* Bank1, pin27 */
    
    		col-gpios = <&gpio1 21 GPIO_ACTIVE_HIGH		/* Bank1, pin21 */
    			     &gpio1 22 GPIO_ACTIVE_HIGH>;	/* Bank1, pin22 */
    
    		linux,keymap = <0x0000008b	/* MENU */
    				0x0100009e	/* BACK */
    				0x02000069	/* LEFT */
    				0x0001006a	/* RIGHT */
    				0x0101001c	/* ENTER */
    				0x0201006c>;	/* DOWN */
    	};
    
    	gpio_keys: volume_keys@0 {
    		compatible = "gpio-keys";
    		#address-cells = <1>;
    		#size-cells = <0>;
    		autorepeat;
    
    		switch@9 {
    			label = "volume-up";
    			linux,code = <115>;
    			gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
    			gpio-key,wakeup;
    		};
    
    		switch@10 {
    			label = "volume-down";
    			linux,code = <114>;
    			gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
    			gpio-key,wakeup;
    		};
    	};
    
    	lcd_bl: backlight {
    		compatible = "pwm-backlight";
    		pwms = <&ecap0 0 50000 0>;
    		brightness-levels = <0 51 53 56 62 75 101 152 255>;
    		default-brightness-level = <8>;
    	};
    
    	panel {
    		compatible = "ti,tilcdc,panel";
    		status = "okay";
    		pinctrl-names = "default";
    		pinctrl-0 = <&lcd_pins_s0>;
    		backlight = <&lcd_bl>;
    		panel-info {
    			ac-bias           = <255>;
    			ac-bias-intrpt    = <0>;
    			dma-burst-sz      = <16>;
    			bpp               = <32>;
    			fdd               = <0x80>;
    			sync-edge         = <0>;
    			sync-ctrl         = <1>;
    			raster-order      = <0>;
    			fifo-th           = <0>;
    		};
    
    		display-timings {
    			800x480p62 {
    				clock-frequency = <30000000>;
    				hactive = <800>;
    				vactive = <480>;
    				hfront-porch = <39>;
    				hback-porch = <39>;
    				hsync-len = <47>;
    				vback-porch = <29>;
    				vfront-porch = <13>;
    				vsync-len = <2>;
    				hsync-active = <1>;
    				vsync-active = <1>;
    			};
    		};
    	};
    
    	sound {
    		compatible = "simple-audio-card";
    		simple-audio-card,name = "AM335x-EVM";
    		simple-audio-card,widgets =
    			"Headphone", "Headphone Jack",
    			"Line", "Line In";
    		simple-audio-card,routing =
    			"Headphone Jack",	"HPLOUT",
    			"Headphone Jack",	"HPROUT",
    			"LINE1L",		"Line In",
    			"LINE1R",		"Line In";
    		simple-audio-card,format = "dsp_b";
    		simple-audio-card,bitclock-master = <&sound_master>;
    		simple-audio-card,frame-master = <&sound_master>;
    		simple-audio-card,bitclock-inversion;
    
    		simple-audio-card,cpu {
    			sound-dai = <&mcasp1>;
    		};
    
    		sound_master: simple-audio-card,codec {
    			sound-dai = <&tlv320aic3106>;
    			system-clock-frequency = <12000000>;
    		};
    	};
    };
    
    &am33xx_pinmux {
    	pinctrl-names = "default";
    	pinctrl-0 = <&matrix_keypad_s0 &volume_keys_s0 &clkout2_pin &ddr3_vtt_toggle>;
    
            ddr3_vtt_toggle: ddr3_vtt_toggle {
                    pinctrl-single,pins = <
                            0x1AC (PIN_OUTPUT | MUX_MODE7)  /* gpio3_21 */
                    >;
            };
    
    	matrix_keypad_s0: matrix_keypad_s0 {
    		pinctrl-single,pins = <
    			0x54 (PIN_OUTPUT_PULLDOWN | MUX_MODE7)	/* gpmc_a5.gpio1_21 */
    			0x58 (PIN_OUTPUT_PULLDOWN | MUX_MODE7)	/* gpmc_a6.gpio1_22 */
    			0x64 (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* gpmc_a9.gpio1_25 */
    			0x68 (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* gpmc_a10.gpio1_26 */
    			0x6c (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* gpmc_a11.gpio1_27 */
    		>;
    	};
    
    	volume_keys_s0: volume_keys_s0 {
    		pinctrl-single,pins = <
    			0x150 (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* spi0_sclk.gpio0_2 */
    			0x154 (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* spi0_d0.gpio0_3 */
    		>;
    	};
    
    	i2c0_pins: pinmux_i2c0_pins {
    		pinctrl-single,pins = <
    			0x188 (PIN_INPUT_PULLUP | MUX_MODE0)	/* i2c0_sda.i2c0_sda */
    			0x18c (PIN_INPUT_PULLUP | MUX_MODE0)	/* i2c0_scl.i2c0_scl */
    		>;
    	};
    
    	i2c1_pins: pinmux_i2c1_pins {
    		pinctrl-single,pins = <
    			0x158 (PIN_INPUT_PULLUP | MUX_MODE2)	/* spi0_d1.i2c1_sda */
    			0x15c (PIN_INPUT_PULLUP | MUX_MODE2)	/* spi0_cs0.i2c1_scl */
    		>;
    	};
    
    	uart0_pins: pinmux_uart0_pins {
    		pinctrl-single,pins = <
    			0x170 (PIN_INPUT_PULLUP | MUX_MODE0)	/* uart0_rxd.uart0_rxd */
    			0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* uart0_txd.uart0_txd */
    		>;
    	};
    
    	uart1_pins: pinmux_uart1_pins {
    		pinctrl-single,pins = <
    			0x178 (PIN_INPUT | MUX_MODE0)		/* uart1_ctsn.uart1_ctsn */
    			0x17C (PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* uart1_rtsn.uart1_rtsn */
    			0x180 (PIN_INPUT_PULLUP | MUX_MODE0)	/* uart1_rxd.uart1_rxd */
    			0x184 (PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* uart1_txd.uart1_txd */
    		>;
    	};
    
    	clkout2_pin: pinmux_clkout2_pin {
    		pinctrl-single,pins = <
    			0x1b4 (PIN_OUTPUT_PULLDOWN | MUX_MODE3)	/* xdma_event_intr1.clkout2 */
    		>;
    	};
    
    	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 */
    		>;
    	};
    
    	ecap0_pins: backlight_pins {
    		pinctrl-single,pins = <
    			0x164 0x0	/* eCAP0_in_PWM0_out.eCAP0_in_PWM0_out MODE0 */
    		>;
    	};
    
    	cpsw_default: cpsw_default {
    		pinctrl-single,pins = <
    			/* Slave 1 */
    			0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE2)	/* mii1_txen.rgmii1_tctl */
    			0x118 (PIN_INPUT_PULLDOWN | MUX_MODE2)	/* mii1_rxdv.rgmii1_rctl */
    			0x11c (PIN_OUTPUT_PULLDOWN | MUX_MODE2)	/* mii1_txd3.rgmii1_td3 */
    			0x120 (PIN_OUTPUT_PULLDOWN | MUX_MODE2)	/* mii1_txd2.rgmii1_td2 */
    			0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE2)	/* mii1_txd1.rgmii1_td1 */
    			0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE2)	/* mii1_txd0.rgmii1_td0 */
    			0x12c (PIN_OUTPUT_PULLDOWN | MUX_MODE2)	/* mii1_txclk.rgmii1_tclk */
    			0x130 (PIN_INPUT_PULLDOWN | MUX_MODE2)	/* mii1_rxclk.rgmii1_rclk */
    			0x134 (PIN_INPUT_PULLDOWN | MUX_MODE2)	/* mii1_rxd3.rgmii1_rd3 */
    			0x138 (PIN_INPUT_PULLDOWN | MUX_MODE2)	/* mii1_rxd2.rgmii1_rd2 */
    			0x13c (PIN_INPUT_PULLDOWN | MUX_MODE2)	/* mii1_rxd1.rgmii1_rd1 */
    			0x140 (PIN_INPUT_PULLDOWN | MUX_MODE2)	/* mii1_rxd0.rgmii1_rd0 */
    		>;
    	};
    
    	cpsw_sleep: cpsw_sleep {
    		pinctrl-single,pins = <
    			/* Slave 1 reset value */
    			0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7)
    			0x118 (PIN_INPUT_PULLDOWN | MUX_MODE7)
    			0x11c (PIN_INPUT_PULLDOWN | MUX_MODE7)
    			0x120 (PIN_INPUT_PULLDOWN | MUX_MODE7)
    			0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7)
    			0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7)
    			0x12c (PIN_INPUT_PULLDOWN | MUX_MODE7)
    			0x130 (PIN_INPUT_PULLDOWN | MUX_MODE7)
    			0x134 (PIN_INPUT_PULLDOWN | MUX_MODE7)
    			0x138 (PIN_INPUT_PULLDOWN | MUX_MODE7)
    			0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7)
    			0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7)
    		>;
    	};
    
    	davinci_mdio_default: davinci_mdio_default {
    		pinctrl-single,pins = <
    			/* MDIO */
    			0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)	/* mdio_data.mdio_data */
    			0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0)			/* mdio_clk.mdio_clk */
    		>;
    	};
    
    	davinci_mdio_sleep: davinci_mdio_sleep {
    		pinctrl-single,pins = <
    			/* MDIO reset value */
    			0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7)
    			0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
    		>;
    	};
    
    	mmc1_pins: pinmux_mmc1_pins {
    		pinctrl-single,pins = <
    	//		0x160 (PIN_INPUT | MUX_MODE7) /* spi0_cs1.gpio0_6 */
            	0x100 ( PIN_INPUT_PULLUP | MUX_MODE0 ) /* (G17) mmc0_clk.mmc0_clk */
                    0x104 ( PIN_INPUT_PULLUP | MUX_MODE0 ) /* (G18) mmc0_cmd.mmc0_cmd */
                    0xfc ( PIN_INPUT_PULLUP | MUX_MODE0 ) /* (G16) mmc0_dat0.mmc0_dat0 */
                    0xf8 ( PIN_INPUT_PULLUP | MUX_MODE0 ) /* (G15) mmc0_dat1.mmc0_dat1 */
                    0xf4 ( PIN_INPUT_PULLUP | MUX_MODE0 ) /* (F18) mmc0_dat2.mmc0_dat2 */
                    0xf0 ( PIN_INPUT_PULLUP | MUX_MODE0 ) /* (F17) mmc0_dat3.mmc0_dat3 */
                    0x138 ( PIN_INPUT_PULLUP | MUX_MODE3 ) /* (L16) gmii1_rxd2.mmc0_dat4 */
                    0x134 ( PIN_INPUT_PULLUP | MUX_MODE3 ) /* (L17) gmii1_rxd3.mmc0_dat5 */
                    0x130 ( PIN_INPUT_PULLUP | MUX_MODE3 ) /* (L18) gmii1_rxclk.mmc0_dat6 */
                    0x12c ( PIN_INPUT_PULLUP | MUX_MODE3 ) /* (K18) gmii1_txclk.mmc0_dat7 */
    		>;
    	};
    
    	mmc3_pins: pinmux_mmc3_pins {
    		pinctrl-single,pins = <
    			0x44 (PIN_INPUT_PULLUP | MUX_MODE3)	/* gpmc_a1.mmc2_dat0, INPUT_PULLUP | MODE3 */
    			0x48 (PIN_INPUT_PULLUP | MUX_MODE3)	/* gpmc_a2.mmc2_dat1, INPUT_PULLUP | MODE3 */
    			0x4C (PIN_INPUT_PULLUP | MUX_MODE3)	/* gpmc_a3.mmc2_dat2, INPUT_PULLUP | MODE3 */
    			0x78 (PIN_INPUT_PULLUP | MUX_MODE3)	/* gpmc_ben1.mmc2_dat3, INPUT_PULLUP | MODE3 */
    			0x88 (PIN_INPUT_PULLUP | MUX_MODE3)	/* gpmc_csn3.mmc2_cmd, INPUT_PULLUP | MODE3 */
    			0x8C (PIN_INPUT_PULLUP | MUX_MODE3)	/* gpmc_clk.mmc2_clk, INPUT_PULLUP | MODE3 */
    		>;
    	};
    
    	wlan_pins: pinmux_wlan_pins {
    		pinctrl-single,pins = <
    			0x40 (PIN_OUTPUT_PULLDOWN | MUX_MODE7)	/* gpmc_a0.gpio1_16 */
    			0x19C (PIN_INPUT | MUX_MODE7)		/* mcasp0_ahclkr.gpio3_17 */
    			0x1AC (PIN_OUTPUT_PULLDOWN | MUX_MODE7)	/* mcasp0_ahclkx.gpio3_21 */
    		>;
    	};
    
    	lcd_pins_s0: lcd_pins_s0 {
    		pinctrl-single,pins = <
    			0x20 (PIN_OUTPUT | MUX_MODE1)		/* gpmc_ad8.lcd_data23 */
    			0x24 (PIN_OUTPUT | MUX_MODE1)		/* gpmc_ad9.lcd_data22 */
    			0x28 (PIN_OUTPUT | MUX_MODE1)		/* gpmc_ad10.lcd_data21 */
    			0x2c (PIN_OUTPUT | MUX_MODE1)		/* gpmc_ad11.lcd_data20 */
    			0x30 (PIN_OUTPUT | MUX_MODE1)		/* gpmc_ad12.lcd_data19 */
    			0x34 (PIN_OUTPUT | MUX_MODE1)		/* gpmc_ad13.lcd_data18 */
    			0x38 (PIN_OUTPUT | MUX_MODE1)		/* gpmc_ad14.lcd_data17 */
    			0x3c (PIN_OUTPUT | MUX_MODE1)		/* gpmc_ad15.lcd_data16 */
    			0xa0 (PIN_OUTPUT | MUX_MODE0)		/* lcd_data0.lcd_data0 */
    			0xa4 (PIN_OUTPUT | MUX_MODE0)		/* lcd_data1.lcd_data1 */
    			0xa8 (PIN_OUTPUT | MUX_MODE0)		/* lcd_data2.lcd_data2 */
    			0xac (PIN_OUTPUT | MUX_MODE0)		/* lcd_data3.lcd_data3 */
    			0xb0 (PIN_OUTPUT | MUX_MODE0)		/* lcd_data4.lcd_data4 */
    			0xb4 (PIN_OUTPUT | MUX_MODE0)		/* lcd_data5.lcd_data5 */
    			0xb8 (PIN_OUTPUT | MUX_MODE0)		/* lcd_data6.lcd_data6 */
    			0xbc (PIN_OUTPUT | MUX_MODE0)		/* lcd_data7.lcd_data7 */
    			0xc0 (PIN_OUTPUT | MUX_MODE0)		/* lcd_data8.lcd_data8 */
    			0xc4 (PIN_OUTPUT | MUX_MODE0)		/* lcd_data9.lcd_data9 */
    			0xc8 (PIN_OUTPUT | MUX_MODE0)		/* lcd_data10.lcd_data10 */
    			0xcc (PIN_OUTPUT | MUX_MODE0)		/* lcd_data11.lcd_data11 */
    			0xd0 (PIN_OUTPUT | MUX_MODE0)		/* lcd_data12.lcd_data12 */
    			0xd4 (PIN_OUTPUT | MUX_MODE0)		/* lcd_data13.lcd_data13 */
    			0xd8 (PIN_OUTPUT | MUX_MODE0)		/* lcd_data14.lcd_data14 */
    			0xdc (PIN_OUTPUT | MUX_MODE0)		/* lcd_data15.lcd_data15 */
    			0xe0 (PIN_OUTPUT | MUX_MODE0)		/* lcd_vsync.lcd_vsync */
    			0xe4 (PIN_OUTPUT | MUX_MODE0)		/* lcd_hsync.lcd_hsync */
    			0xe8 (PIN_OUTPUT | MUX_MODE0)		/* lcd_pclk.lcd_pclk */
    			0xec (PIN_OUTPUT | MUX_MODE0)		/* lcd_ac_bias_en.lcd_ac_bias_en */
    		>;
    	};
    
    	mcasp1_pins: mcasp1_pins {
    		pinctrl-single,pins = <
    			0x10c (PIN_INPUT_PULLDOWN | MUX_MODE4) /* mii1_crs.mcasp1_aclkx */
    			0x110 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* mii1_rxerr.mcasp1_fsx */
    			0x108 (PIN_OUTPUT_PULLDOWN | MUX_MODE4) /* mii1_col.mcasp1_axr2 */
    			0x144 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* rmii1_ref_clk.mcasp1_axr3 */
    		>;
    	};
    
    	mcasp1_pins_sleep: mcasp1_pins_sleep {
    		pinctrl-single,pins = <
    			0x10c (PIN_INPUT_PULLDOWN | MUX_MODE7)
    			0x110 (PIN_INPUT_PULLDOWN | MUX_MODE7)
    			0x108 (PIN_INPUT_PULLDOWN | MUX_MODE7)
    			0x144 (PIN_INPUT_PULLDOWN | MUX_MODE7)
    		>;
    	};
    
    	dcan1_pins_default: dcan1_pins_default {
    		pinctrl-single,pins = <
    			0x168 (PIN_OUTPUT | MUX_MODE2) /* uart0_ctsn.d_can1_tx */
    			0x16c (PIN_INPUT_PULLDOWN | MUX_MODE2) /* uart0_rtsn.d_can1_rx */
    		>;
    	};
    
           spi1_pins: pinmux_spi1_pins {
    	pinctrl-single,pins = <
    		0x190 ( PIN_INPUT | MUX_MODE3 ) /* (A13) mcasp0_aclkx.spi1_sclk */
    		0x194 ( PIN_INPUT | MUX_MODE3 ) /* (B13) mcasp0_fsx.spi1_d0 */
    		0x198 ( PIN_OUTPUT | MUX_MODE3 ) /* (D12) mcasp0_axr0.spi1_d1 */
    		0x19c ( PIN_OUTPUT | MUX_MODE3 ) /* (C12) mcasp0_ahclkr.spi1_cs0 */
    	>;
     };
    
    
    };
    
    &uart0 {
    	pinctrl-names = "default";
    	pinctrl-0 = <&uart0_pins>;
    
    	status = "okay";
    };
    
    &uart1 {
    	pinctrl-names = "default";
    	pinctrl-0 = <&uart1_pins>;
    
    	status = "okay";
    };
    
    &i2c0 {
    	pinctrl-names = "default";
    	pinctrl-0 = <&i2c0_pins>;
    
    	status = "okay";
    	clock-frequency = <400000>;
    
    	tps: tps@2d {
    		reg = <0x2d>;
    	};
    };
    
    
    &spi1{
        status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <&spi1_pins>;
        /* DO is MOSI, D1 is MISO */    
        ti,pindir-d0-out-d1-in = <1>;     
        spidev {
            compatible = "microchip,mcp795-rtc";
            /* We use SPI CS 0; register the same */
            reg = <0>;
            spi-max-frequency = <1000000>; 
            spi-cs-high;
            /* Operate with CPOL and CPHA set to zero */
            /* spi-cpol; */
            /* spi-cpha; */
        };
        
    };
    
    &usb {
    	status = "okay";
    };
    
    &usb_ctrl_mod {
    	status = "okay";
    };
    
    &usb0_phy {
    	status = "okay";
    };
    
    &usb1_phy {
    	status = "okay";
    };
    
    &usb0 {
    	status = "okay";
    };
    
    &usb1 {
    	status = "okay";
    	dr_mode = "host";
    };
    
    &cppi41dma  {
    	status = "okay";
    };
    
    &i2c1 {
    	pinctrl-names = "default";
    	pinctrl-0 = <&i2c1_pins>;
    
    	status = "disabled";
    	clock-frequency = <100000>;
    
    	lis331dlh: lis331dlh@18 {
    		compatible = "st,lis331dlh", "st,lis3lv02d";
    		reg = <0x18>;
    		Vdd-supply = <&lis3_reg>;
    		Vdd_IO-supply = <&lis3_reg>;
    
    		st,click-single-x;
    		st,click-single-y;
    		st,click-single-z;
    		st,click-thresh-x = <10>;
    		st,click-thresh-y = <10>;
    		st,click-thresh-z = <10>;
    		st,irq1-click;
    		st,irq2-click;
    		st,wakeup-x-lo;
    		st,wakeup-x-hi;
    		st,wakeup-y-lo;
    		st,wakeup-y-hi;
    		st,wakeup-z-lo;
    		st,wakeup-z-hi;
    		st,min-limit-x = <120>;
    		st,min-limit-y = <120>;
    		st,min-limit-z = <140>;
    		st,max-limit-x = <550>;
    		st,max-limit-y = <550>;
    		st,max-limit-z = <750>;
    	};
    
    	tsl2550: tsl2550@39 {
    		compatible = "taos,tsl2550";
    		reg = <0x39>;
    	};
    
    	tmp275: tmp275@48 {
    		compatible = "ti,tmp275";
    		reg = <0x48>;
    	};
    
    	tlv320aic3106: tlv320aic3106@1b {
    		#sound-dai-cells = <0>;
    		compatible = "ti,tlv320aic3106";
    		reg = <0x1b>;
    		status = "okay";
    
    		/* Regulators */
    		AVDD-supply = <&vaux2_reg>;
    		IOVDD-supply = <&vaux2_reg>;
    		DRVDD-supply = <&vaux2_reg>;
    		DVDD-supply = <&vbat>;
    	};
    };
    
    &lcdc {
    	status = "okay";
    
    	blue-and-red-wiring = "crossed";
    };
    
    &elm {
    	status = "okay";
    };
    
    &epwmss0 {
    	status = "okay";
    
    	ecap0: ecap@48300100 {
    		status = "okay";
    		pinctrl-names = "default";
    		pinctrl-0 = <&ecap0_pins>;
    	};
    };
    
    &gpmc {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&nandflash_pins_s0>;
    	ranges = <0 0 0x08000000 0x1000000>;	/* 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 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>;
    		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>;
    		};
    	};
    };
    
    #include "tps65910.dtsi"
    
    &mcasp1 {
    	#sound-dai-cells = <0>;
    	pinctrl-names = "default", "sleep";
    	pinctrl-0 = <&mcasp1_pins>;
    	pinctrl-1 = <&mcasp1_pins_sleep>;
    
    	status = "okay";
    
    	op-mode = <0>;          /* MCASP_IIS_MODE */
    	tdm-slots = <2>;
    	/* 4 serializers */
    	serial-dir = <  /* 0: INACTIVE, 1: TX, 2: RX */
    		0 0 1 2
    	>;
    	tx-num-evt = <32>;
    	rx-num-evt = <32>;
    };
    
    &tps {
    	vcc1-supply = <&vbat>;
    	vcc2-supply = <&vbat>;
    	vcc3-supply = <&vbat>;
    	vcc4-supply = <&vbat>;
    	vcc5-supply = <&vbat>;
    	vcc6-supply = <&vbat>;
    	vcc7-supply = <&vbat>;
    	vccio-supply = <&vbat>;
    
    	regulators {
    		vrtc_reg: regulator@0 {
    			regulator-always-on;
    		};
    
    		vio_reg: regulator@1 {
    			regulator-always-on;
    		};
    
    		vdd1_reg: regulator@2 {
    			/* VDD_MPU voltage limits 0.95V - 1.26V with +/-4% tolerance */
    			regulator-name = "vdd_mpu";
    			regulator-min-microvolt = <912500>;
    			regulator-max-microvolt = <1351500>;
    			regulator-boot-on;
    			regulator-always-on;
    		};
    
    		vdd2_reg: regulator@3 {
    			/* VDD_CORE voltage limits 0.95V - 1.1V with +/-4% tolerance */
    			regulator-name = "vdd_core";
    			regulator-min-microvolt = <912500>;
    			regulator-max-microvolt = <1150000>;
    			regulator-boot-on;
    			regulator-always-on;
    		};
    
    		vdd3_reg: regulator@4 {
    			regulator-always-on;
    		};
    
    		vdig1_reg: regulator@5 {
    			regulator-always-on;
    		};
    
    		vdig2_reg: regulator@6 {
    			regulator-always-on;
    		};
    
    		vpll_reg: regulator@7 {
    			regulator-always-on;
    		};
    
    		vdac_reg: regulator@8 {
    			regulator-always-on;
    		};
    
    		vaux1_reg: regulator@9 {
    			regulator-always-on;
    		};
    
    		vaux2_reg: regulator@10 {
    			regulator-always-on;
    		};
    
    		vaux33_reg: regulator@11 {
    			regulator-always-on;
    		};
    
    		vmmc_reg: regulator@12 {
    			regulator-min-microvolt = <1800000>;
    			regulator-max-microvolt = <3300000>;
    			regulator-always-on;
    		};
    	};
    };
    
    #if 0
    &mac {
    	pinctrl-names = "default", "sleep";
    	pinctrl-0 = <&cpsw_default>;
    	pinctrl-1 = <&cpsw_sleep>;
    	status = "okay";
    };
    
    &davinci_mdio {
    	pinctrl-names = "default", "sleep";
    	pinctrl-0 = <&davinci_mdio_default>;
    	pinctrl-1 = <&davinci_mdio_sleep>;
    	status = "okay";
    };
    
    &cpsw_emac0 {
    	phy_id = <&davinci_mdio>, <0>;
    	phy-mode = "rgmii-txid";
    };
    
    &cpsw_emac1 {
    	phy_id = <&davinci_mdio>, <1>;
    	phy-mode = "rgmii-txid";
    };
    #endif
    &tscadc {
    	status = "okay";
    	tsc {
    		ti,wires = <4>;
    		ti,x-plate-resistance = <200>;
    		ti,coordinate-readouts = <5>;
    		ti,wire-config = <0x00 0x11 0x22 0x33>;
    		ti,charge-delay = <0x400>;
    	};
    
    	adc {
    		ti,adc-channels = <4 5 6 7>;
    	};
    };
    
    &mmc1 {
    	status = "okay";
    	vmmc-supply = <&vmmc_reg>;
    	bus-width = <8>;
    	pinctrl-names = "default";
    	pinctrl-0 = <&mmc1_pins>;
    //	cd-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
    };
    
    &mmc3 {
    	/* these are on the crossbar and are outlined in the
    	   xbar-event-map element */
    	dmas = <&edma_xbar 12 0 1
    		&edma_xbar 13 0 2>;
    	dma-names = "tx", "rx";
    	status = "okay";
    	vmmc-supply = <&wlan_en_reg>;
    	bus-width = <4>;
    	pinctrl-names = "default";
    	pinctrl-0 = <&mmc3_pins &wlan_pins>;
    	ti,non-removable;
    	ti,needs-special-hs-handling;
    	cap-power-off-card;
    	keep-power-in-suspend;
    
    	#address-cells = <1>;
    	#size-cells = <0>;
    	wlcore: wlcore@0 {
    		compatible = "ti,wl1835";
    		reg = <2>;
    		interrupt-parent = <&gpio3>;
    		interrupts = <17 IRQ_TYPE_LEVEL_HIGH>;
    	};
    };
    
    &gpio3 {
            ti,no-reset-on-init;
    };
    
    &sham {
    	status = "okay";
    };
    
    &aes {
    	status = "okay";
    };
    
    &dcan1 {
    	status = "disabled";	/* Enable only if Profile 1 is selected */
    	pinctrl-names = "default";
    	pinctrl-0 = <&dcan1_pins_default>;
    };
    
    &wkup_m3_ipc {
    	ti,scale-data-fw = "am335x-evm-scale-data.bin";
    };
    
    &rtc {
    	clocks = <&clk_32768_ck>, <&clkdiv32k_ick>;
    	clock-names = "ext-clk", "int-clk";
    };
    
    
    &sgx {
    	status = "okay";
    };
    

    2: Is your CS pin active high ?

    -> It's Active Low when processor communicate with RTC remaining time it always High.

    3: Is the chip on your hardware actually mcp795?

    -> yes , RTC chip mounted on the board is "mcp79510"


    4: mcp795 chip what SPI mode does it support ?

    -> It supports SPI 0 Mode.


    5: In your hardware is d0 output and d1 input ?

    Yes you are correct. 

    processor - D0 is connected to MCP79510 - MISO

    processor - D1 is connected to MCP79510 - MOSI.

    Regards,

    Anil

  • Hello,

    &spi1{
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&spi1_pins>;
    ti,pindir-d0-out-d1-in = <1>;
    spidev {
    compatible = "microchip,mcp795-rtc";
    reg = <0>;
    spi-max-frequency = <1000000>;
    spi-cs-high;
    };
    };

    DT node seems correct, in your linux source in Documentation/devicetree/bindings folder can you grep for "ti,pindir-d0-out-d1-in"
    and see how it needs to be. As in the later kernel it needs to just ti,pindir-d0-out-d1-in; and not ti,pindir-d0-out-d1-in = <1>;

    &spi1{
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&spi1_pins>;
    ti,pindir-d0-out-d1-in;
    spidev {
    compatible = "microchip,mcp795-rtc";
    reg = <0>;
    spi-max-frequency = <1000000>;
    spi-cs-high;
    };
    };

    Also can you check if you are getting clock and MISO /MOSI ?

    Cheers,
    --Prabhakar Lad
  • Hi Prabhakar,

    I use grep for "ti,pindir-d0-out-d1-in" to understand how it needs to be used in the DT and modified to ti,pindir-d0-out-d1-in; in place of ti,pindir-d0-out-d1-in = <1>;

    Loaded the updated DTB file and rebooted the system. we are getting the same kernel messages as above.

    Below is the strace for hwclock -w command.

    This command is trying to write and read from RTC module. Added debug statement "Write RTC called.....!!!!!" and "Read RTC called.....!!!!!". I don't understand that why the command is not setting the hwclock.

    I will probe and update you that am i getting Clock, MISO and MOSI lines.


    STRACE for HWCLOCK - W command:

    root@am335x-evm:~# strace hwclock -w
    execve("/sbin/hwclock", ["hwclock", "-w"], [/* 16 vars */]) = 0
    brk(NULL) = 0xbd000
    uname({sysname="Linux", nodename="am335x-evm", ...}) = 0
    mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f6b000
    access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
    open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
    fstat64(3, {st_mode=S_IFREG|0644, st_size=9558, ...}) = 0
    mmap2(NULL, 9558, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb6f68000
    close(3) = 0
    open("/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
    read(3, "\177ELF\1\1\1\3\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\235h\1\0004\0\0\0"..., 512) = 512
    fstat64(3, {st_mode=S_IFREG|0755, st_size=9161320, ...}) = 0
    mmap2(NULL, 968040, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6e58000
    mprotect(0xb6f30000, 61440, PROT_NONE) = 0
    mmap2(0xb6f3f000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xd7000) = 0xb6f3f000
    mmap2(0xb6f42000, 9576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb6f42000
    close(3) = 0
    mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f67000778.559220] rtc-mcp795 spi1.0: 2.Write RTC called.....!!!!!

    _tls(0xb6f674c0, 0xb6f67b98, 0xb6f6d050, 0xb6f674c0, 0xb6f6d50) = 0
    mprotect(0xb6f3f000, 8192, PROT_READ) = 0
    mprotect(0xb6f6c000, 4096, PROT_READ) = 0
    munmap(0xb6f68000, 9558) = 0
    getuid32() = 0
    brk(NULL) = 0xbd000
    brk(0xde000) = 0xde000
    open("/usr/share/zoneinfo/UTC", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
    open("/var/lib/hwclock/adjtime", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
    open("/dev/rtc", O_WRONLY|O_LARGEFILE) = 3
    gettimeofday({1481758083, 144750}, NULL) = 0
    ioctl(3, RTC_SET_TIME, {tm_sec=3, tm_min=28, tm_hour=23, tm_mday=14, tm_mon=11, tm_year=116, ...}778.641565] rtc-mcp795 spi1.0: 1. Read RTC called.....!!!!!
    = )0
    xit_group(0) = ?
    ++ +exited with 0 +++



    Regards,
    Anil
  • Hi Prabhakar,

    Thanks you for your timely support to make up SPI-RTC module.

    We have changed  MOSI & MISO from "ti,pindir-d0-out-d1-in" to "ti,pindir-d0-in-d1-out" in device tree.now we are able read and write RTC.

    Thanks once again.....!!!!

    Thanks,

    Anil



  • HI Prabhakar,

    I have posted issue related to the touch screen.Please look in this issue if possible
    e2e.ti.com/.../606313


    Thanks,
    Anil