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: I2C EEPROM not working

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

Tool/software: Linux

We are using TI SDK 03.03 kernel:4.41, AM3354 processor The schematic EEPROM is connected in “I2C-0” in Linux. EEPROM Chip details: Party no: CAT24C256WI-GT3 Link: www.digikey.com/.../2704982 The i2c eeprom section of dts file The commands i have tried i2cset i2cget i2cdump Output I am getting But I am writing to the 0x50 memory address but it is not writing. Please help me to solve this. Thanks in advance!

  • Please post your DTS and boot log files.
  • DTS: &i2c0 { pinctrl-names = "default"; pinctrl-0 = ; status = "okay"; clock-frequency = ; tps: tps@2d { reg = ; }; eeprom: eeprom@50 { compatible = "at,24c256"; reg = ; }; }; Terminal output for the commands: root@am335x-evm:~/eeprom# i2cdump -f -y -r 0x00-0xff 0 0x50 c 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef 00: 56 69 6e 61 79 6b 75 6d 61 72 0a 7a 7a 0a 5c 30 Vinaykumar?zz?\0 10: 5c 30 5c 30 5c 30 5c 30 5c 30 0a ff ff ff ff ff \0\0\0\0\0?..... 20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ root@am335x-evm:~/eeprom# i2cset -f 0 0x50 0x50 0x65 w WARNING! This program can confuse your I2C bus, cause data loss and worse! DANGEROUS! Writing to a serial EEPROM on a memory DIMM may render your memory USELESS and make your system UNBOOTABLE! I will write to device file /dev/i2c-0, chip address 0x50, data address 0x50, data 0x65, mode word. Continue? [y/N] y root@am335x-evm:~/eeprom# i2cget -f 0 0x50 0x50 w WARNING! This program can confuse your I2C bus, cause data loss and worse! I will read from device file /dev/i2c-0, chip address 0x50, data address 0x50, using read word data. Continue? [Y/n] Y 0xffff root@am335x-evm:~/eeprom#
  • Boot log:
    [ 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@user-bltsp01373) (gcc version 5.3.1 20160113 (Linaro GCC 5.3-2016.02) ) #112 P7
    [ 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] On node 0 totalpages: 131072
    [ 0.000000] free_area_init_node: node 0, pgdat c090c064, node_mem_map dcb61000
    [ 0.000000] Normal zone: 1152 pages used for memmap
    [ 0.000000] Normal zone: 0 pages reserved
    [ 0.000000] Normal zone: 131072 pages, LIFO batch:31
    [ 0.000000] CPU: All CPU(s) started in SVC mode.
    [ 0.000000] AM335X ES2.1 (sgx neon )
    [ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
    [ 0.000000] pcpu-alloc: [0] 0
    [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 129920
    [ 0.000000] Kernel command line: console=ttyO0,115200n8 quiet lpj=3590144 root=PARTUUID=cf53a43f-02 rw rootfstype=ext4 rootwait
    [ 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: 460284K/524288K available (6403K kernel code, 313K rwdata, 2264K rodata, 256K init, 254K bss, 14852K reserved)
    [ 0.000000] Virtual kernel memory layout:
    vector : 0xffff0000 - 0xffff1000 ( 4 kB)
    fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
    vmalloc : 0xe0800000 - 0xff800000 ( 496 MB)
    lowmem : 0xc0000000 - 0xe0000000 ( 512 MB)
    pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
    modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
    .text : 0xc0008000 - 0xc087f04c (8669 kB)
    .init : 0xc0880000 - 0xc08c0000 ( 256 kB)
    .data : 0xc08c0000 - 0xc090e4f0 ( 314 kB)
    .bss : 0xc090e4f0 - 0xc094dd98 ( 255 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.000016] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
    [ 0.000043] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
    [ 0.000056] OMAP clocksource: timer1 at 24000000 Hz
    [ 0.000297] clocksource_probe: no matching clocksources found
    [ 0.000513] Console: colour dummy device 80x30
    [ 0.000545] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
    [ 0.000553] This ensures that you still see kernel messages. Please
    [ 0.000561] update your kernel commandline.
    [ 0.000578] Calibrating delay loop (skipped) preset value.. 718.02 BogoMIPS (lpj=3590144)
    [ 0.000599] pid_max: default: 32768 minimum: 301
    [ 0.000751] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [ 0.000766] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [ 0.001618] Initializing cgroup subsys io
    [ 0.001657] Initializing cgroup subsys memory
    [ 0.001699] Initializing cgroup subsys devices
    [ 0.001718] Initializing cgroup subsys freezer
    [ 0.001736] Initializing cgroup subsys perf_event
    [ 0.001751] Initializing cgroup subsys pids
    [ 0.001784] CPU: Testing write buffer coherency: ok
    [ 0.002255] Setting up static identity map for 0x80008200 - 0x80008260
    [ 0.005002] devtmpfs: initialized
    [ 0.022462] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    [ 0.027475] omap_hwmod: rtc: Missing dt reg0 for /ocp/rtc@44e3e000
    [ 0.027497] ------------[ cut here ]------------
    [ 0.027525] WARNING: CPU: 0 PID: 1 at arch/arm/mach-omap2/omap_hwmod.c:2523 _init.constprop.22+0x1fc/0x424()
    [ 0.027535] omap_hwmod: rtc: doesn't have mpu register target base
    [ 0.027544] Modules linked in:
    [ 0.027566] CPU: 0 PID: 1 Comm: swapper Not tainted 4.4.41-gf9f6f0db2d #112
    [ 0.027575] Hardware name: Generic AM33XX (Flattened Device Tree)
    [ 0.027584] Backtrace:
    [ 0.027622] [<c0013508>] (dump_backtrace) from [<c0013704>] (show_stack+0x18/0x1c)
    [ 0.027632] r7:c088b7c4 r6:000009db r5:00000009 r4:00000000
    [ 0.027664] [<c00136ec>] (show_stack) from [<c02a8aa8>] (dump_stack+0x24/0x28)
    [ 0.027689] [<c02a8a84>] (dump_stack) from [<c0031d64>] (warn_slowpath_common+0x88/0xb4)
    [ 0.027707] [<c0031cdc>] (warn_slowpath_common) from [<c0031dc8>] (warn_slowpath_fmt+0x38/0x40)
    [ 0.027716] r8:000000a3 r7:dc0dcbc0 r6:00000000 r5:dcb56c98 r4:c07c49f0
    [ 0.027747] [<c0031d94>] (warn_slowpath_fmt) from [<c088b7c4>] (_init.constprop.22+0x1fc/0x424)
    [ 0.027756] r3:c08031bc r2:c07c49f0
    [ 0.027768] r4:c08c9e60
    [ 0.027785] [<c088b5c8>] (_init.constprop.22) from [<c088bb1c>] (__omap_hwmod_setup_all+0x48/0x98)
    [ 0.027794] r10:00000000 r9:c0880600 r8:000000a3 r7:dc0dcbc0 r6:c08c4d20 r5:c08c6fd8
    [ 0.027817] r4:c08c9e60
    [ 0.027836] [<c088bad4>] (__omap_hwmod_setup_all) from [<c00096bc>] (do_one_initcall+0x98/0x1e4)
    [ 0.027845] r5:c088bad4 r4:c08c4d20
    [ 0.027869] [<c0009624>] (do_one_initcall) from [<c0880e80>] (kernel_init_freeable+0x138/0x1cc)
    [ 0.027878] r10:00000002 r9:c0880600 r8:000000a3 r7:c08b381c r6:c08bf48c r5:c090e500
    [ 0.027900] r4:c090e500
    [ 0.027929] [<c0880d48>] (kernel_init_freeable) from [<c0642794>] (kernel_init+0x18/0xf4)
    [ 0.027938] r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c064277c
    [ 0.027960] r4:c090e500
    [ 0.027979] [<c064277c>] (kernel_init) from [<c000fab8>] (ret_from_fork+0x14/0x3c)
    [ 0.027988] r5:c064277c r4:00000000
    [ 0.028042] ---[ end trace 41372e4a47dea3d8 ]---
    [ 0.042959] omap_hwmod: debugss: _wait_target_disable failed
    [ 0.109187] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    [ 0.113799] pinctrl core: initialized pinctrl subsystem
    [ 0.115388] NET: Registered protocol family 16
    [ 0.118144] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [ 0.148712] cpuidle: using governor ladder
    [ 0.178701] cpuidle: using governor menu
    [ 0.184185] gpiochip_add: registered GPIOs 0 to 31 on device: gpio
    [ 0.184563] OMAP GPIO hardware version 0.1
    [ 0.185524] gpiochip_add: registered GPIOs 32 to 63 on device: gpio
    [ 0.186516] gpiochip_add: registered GPIOs 64 to 95 on device: gpio
    [ 0.187490] gpiochip_add: registered GPIOs 96 to 127 on device: gpio
    [ 0.195532] omap-gpmc 50000000.gpmc: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/nandflash_pins_se
    [ 0.199298] hw-breakpoint: debug architecture 0x4 unsupported.
    [ 0.239711] edma 49000000.edma: TI EDMA DMA engine driver
    [ 0.240177] of_get_named_gpiod_flags: can't parse 'gpio' property of node '/fixedregulator@0[0]'
    [ 0.240564] of_get_named_gpiod_flags: can't parse 'gpio' property of node '/fixedregulator@1[0]'
    [ 0.244114] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, e
    [ 0.244189] omap_i2c 4819c000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c2_pins, e
    [ 0.244369] media: Linux media interface: v0.10
    [ 0.244459] Linux video capture interface: v2.00
    [ 0.244524] pps_core: LinuxPPS API ver. 1 registered
    [ 0.244535] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [ 0.244576] PTP clock support registered
    [ 0.244665] EDAC MC: Ver: 3.0.0
    [ 0.246125] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
    [ 0.246547] Advanced Linux Sound Architecture Driver Initialized.
    [ 0.248074] clocksource: Switched to clocksource timer1
    [ 0.262353] NET: Registered protocol family 2
    [ 0.263306] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
    [ 0.263379] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
    [ 0.263439] TCP: Hash tables configured (established 4096 bind 4096)
    [ 0.263527] UDP hash table entries: 256 (order: 0, 4096 bytes)
    [ 0.263552] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    [ 0.263746] NET: Registered protocol family 1
    [ 0.264222] RPC: Registered named UNIX socket transport module.
    [ 0.264239] RPC: Registered udp transport module.
    [ 0.264249] RPC: Registered tcp transport module.
    [ 0.264257] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [ 0.264287] PCI: CLS 0 bytes, default 64
    [ 0.265420] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
    [ 0.267976] futex hash table entries: 256 (order: -1, 3072 bytes)
    [ 0.278958] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [ 0.279994] NFS: Registering the id_resolver key type
    [ 0.280090] Key type id_resolver registered
    [ 0.280100] Key type id_legacy registered
    [ 0.280202] ntfs: driver 2.1.32 [Flags: R/O].
    [ 0.284637] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
    [ 0.284674] io scheduler noop registered
    [ 0.284694] io scheduler deadline registered
    [ 0.284921] io scheduler cfq registered (default)
    [ 0.286764] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
    [ 0.290802] pwm-backlight backlight: GPIO lookup for consumer enable
    [ 0.290833] pwm-backlight backlight: using device tree for GPIO lookup
    [ 0.290852] of_get_named_gpiod_flags: can't parse 'enable-gpios' property of node '/backlight[0]'
    [ 0.290866] of_get_named_gpiod_flags: can't parse 'enable-gpio' property of node '/backlight[0]'
    [ 0.290879] pwm-backlight backlight: using lookup tables for GPIO lookup
    [ 0.290894] pwm-backlight backlight: lookup for GPIO enable failed
    [ 0.290923] backlight supply power not found, using dummy regulator
    [ 0.372751] Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
    [ 0.377854] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 158, base_baud = 3000000) is a 8250
    [ 0.407846] console [ttyS0] enabled
    [ 0.409401] 48022000.serial: ttyS1 at MMIO 0x48022000 (irq = 159, base_baud = 3000000) is a 8250
    [ 0.410780] [drm] Initialized drm 1.1.0 20060810
    [ 0.411281] panel panel: found backlight
    [ 0.411305] panel panel: GPIO lookup for consumer enable
    [ 0.411319] panel panel: using device tree for GPIO lookup
    [ 0.411336] of_get_named_gpiod_flags: can't parse 'enable-gpios' property of node '/panel[0]'
    [ 0.411349] of_get_named_gpiod_flags: can't parse 'enable-gpio' property of node '/panel[0]'
    [ 0.411362] panel panel: using lookup tables for GPIO lookup
    [ 0.411376] panel panel: lookup for GPIO enable failed
    [ 0.412986] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
    [ 0.413005] [drm] No driver support for vblank timestamp query.
    [ 0.446100] Console: switching to colour frame buffer device 100x30
    [ 0.454218] tilcdc 4830e000.lcdc: fb0: frame buffer device
    [ 0.478290] [drm] Initialized tilcdc 1.0.0 20121205 on minor 0
    [ 0.487030] loop: module loaded
    [ 0.492068] libphy: Fixed MDIO Bus: probed
    [ 0.558118] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
    [ 0.558148] davinci_mdio 4a101000.mdio: detected phy mask fffffffe
    [ 0.559047] libphy: 4a101000.mdio: probed
    [ 0.559075] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver SMSC LAN8710/LAN8720
    [ 0.559922] cpsw 4a100000.ethernet: Detected MACID = 6c:ec:eb:f9:6f:96
    [ 0.560099] cpsw 4a100000.ethernet: cpts: overflow check period 850
    [ 0.562387] mousedev: PS/2 mouse device common for all mice
    [ 0.563265] rtc-mcp795 spi1.0: SPI-RTC setup done....
    [ 0.568987] rtc-mcp795 spi1.0: Read RTC called....!!!!
    [ 0.574160] rtc-mcp795 spi1.0: Read from mcp795: 2017-11-28 18:36:18
    [ 0.574468] rtc rtc0: rtc-mcp795: dev (254:0)
    [ 0.574503] rtc-mcp795 spi1.0: rtc core: registered rtc-mcp795 as rtc0
    [ 0.574583] i2c /dev entries driver
    [ 0.576183] cpuidle: enable-method property 'ti,am3352' found operations
    [ 0.577030] omap_hsmmc 48060000.mmc: GPIO lookup for consumer cd
    [ 0.577050] omap_hsmmc 48060000.mmc: using device tree for GPIO lookup
    [ 0.577068] of_get_named_gpiod_flags: can't parse 'cd-gpios' property of node '/ocp/mmc@48060000[0]'
    [ 0.577082] of_get_named_gpiod_flags: can't parse 'cd-gpio' property of node '/ocp/mmc@48060000[0]'
    [ 0.577095] omap_hsmmc 48060000.mmc: using lookup tables for GPIO lookup
    [ 0.577110] omap_hsmmc 48060000.mmc: lookup for GPIO cd failed
    [ 0.577126] omap_hsmmc 48060000.mmc: GPIO lookup for consumer wp
    [ 0.577138] omap_hsmmc 48060000.mmc: using device tree for GPIO lookup
    [ 0.577151] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/ocp/mmc@48060000[0]'
    [ 0.577163] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/ocp/mmc@48060000[0]'
    [ 0.577175] omap_hsmmc 48060000.mmc: using lookup tables for GPIO lookup
    [ 0.577187] omap_hsmmc 48060000.mmc: lookup for GPIO wp failed
    [ 0.598978] ledtrig-cpu: registered to indicate activity on CPUs
    [ 0.603766] NET: Registered protocol family 10
    [ 0.605410] sit: IPv6 over IPv4 tunneling driver
    [ 0.606471] NET: Registered protocol family 17
    [ 0.606857] Key type dns_resolver registered
    [ 0.607191] omap_voltage_late_init: Voltage driver support not added
    [ 0.617380] omap-gpmc 50000000.gpmc: GPMC revision 6.0
    [ 0.617416] gpmc_mem_init: disabling cs 0 mapped at 0x0-0x1000000
    [ 0.617432] gpiochip_find_base: found new base at 510
    [ 0.617632] gpiochip_add: registered GPIOs 510 to 511 on device: omap-gpmc
    [ 0.618983] omap2-nand 8000000.nand: GPIO lookup for consumer rb
    [ 0.619009] omap2-nand 8000000.nand: using device tree for GPIO lookup
    [ 0.619059] of_get_named_gpiod_flags: parsed 'rb-gpios' property of node '/ocp/gpmc@50000000/nand@0,0[0]' - status (0)
    [ 0.619128] nand: device found, Manufacturer ID: 0x98, Chip ID: 0xda
    [ 0.619138] nand: Toshiba NAND 256MiB 3,3V 8-bit
    [ 0.619150] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 128
    [ 0.619201] nand: using OMAP_ECC_BCH8_CODE_HW ECC scheme
    [ 0.619337] 10 ofpart partitions found on MTD device 8000000.nand
    [ 0.619348] Creating 10 MTD partitions on "8000000.nand":
    [ 0.619369] 0x000000000000-0x000000080000 : "NAND.SPL"
    [ 0.621276] 0x000000080000-0x000000100000 : "NAND.SPL.backup1"
    [ 0.622919] 0x000000100000-0x000000180000 : "NAND.SPL.backup2"
    [ 0.624481] 0x000000180000-0x000000200000 : "NAND.SPL.backup3"
    [ 0.626060] 0x000000200000-0x000000280000 : "NAND.u-boot-spl-os"
    [ 0.627858] 0x000000280000-0x000000380000 : "NAND.u-boot"
    [ 0.629932] 0x000000380000-0x000000400000 : "NAND.u-boot-env"
    [ 0.631590] 0x000000400000-0x000000480000 : "NAND.u-boot-env.backup1"
    [ 0.633100] 0x000000480000-0x000000b80000 : "NAND.kernel"
    [ 0.637233] 0x000000b80000-0x000040000000 : "NAND.file-system"
    [ 0.637253] mtd: partition "NAND.file-system" extends beyond the end of device "8000000.nand" -- size truncated to 0xf480000
    [ 0.758343] tps65910 0-002d: No interrupt support, no core IRQ
    [ 0.758594] tps65910-gpio tps65910-gpio: ti,en-gpio-sleep not specified
    [ 0.758617] gpiochip_find_base: found new base at 504
    [ 0.758784] gpiochip_add: registered GPIOs 504 to 509 on device: tps65910
    [ 0.784333] at24 0-0050: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
    [ 0.784395] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
    [ 0.786019] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 400 kHz
    [ 0.786714] omap_hsmmc 48060000.mmc: GPIO lookup for consumer cd
    [ 0.786738] omap_hsmmc 48060000.mmc: using device tree for GPIO lookup
    [ 0.786759] of_get_named_gpiod_flags: can't parse 'cd-gpios' property of node '/ocp/mmc@48060000[0]'
    [ 0.786774] of_get_named_gpiod_flags: can't parse 'cd-gpio' property of node '/ocp/mmc@48060000[0]'
    [ 0.786788] omap_hsmmc 48060000.mmc: using lookup tables for GPIO lookup
    [ 0.786803] omap_hsmmc 48060000.mmc: lookup for GPIO cd failed
    [ 0.786821] omap_hsmmc 48060000.mmc: GPIO lookup for consumer wp
    [ 0.786833] omap_hsmmc 48060000.mmc: using device tree for GPIO lookup
    [ 0.786845] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/ocp/mmc@48060000[0]'
    [ 0.786858] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/ocp/mmc@48060000[0]'
    [ 0.786870] omap_hsmmc 48060000.mmc: using lookup tables for GPIO lookup
    [ 0.786883] omap_hsmmc 48060000.mmc: lookup for GPIO wp failed
    [ 0.787330] vmmc: supplied by vbat
    [ 0.818582] vdd_mpu: supplied by vbat
    [ 0.824234] of_get_named_gpiod_flags: parsed 'gpios' property of node '/volume_keys@0/switch@9[0]' - status (0)
    [ 0.824289] of_get_named_gpiod_flags: parsed 'gpios' property of node '/volume_keys@0/switch@10[0]' - status (0)
    [ 0.824878] input: volume_keys@0 as /devices/platform/volume_keys@0/input/input0
    [ 0.825735] rtc-mcp795 spi1.0: Read RTC called....!!!!
    [ 0.831105] rtc-mcp795 spi1.0: Read from mcp795: 2017-11-28 18:36:18
    [ 0.831154] rtc-mcp795 spi1.0: setting system clock to 2017-12-28 18:36:18 UTC (1514486178)
    [ 0.839924] lis3_reg: disabling
    [ 0.840336] ALSA device list:
    [ 0.840352] No soundcards found.
    [ 0.841824] Waiting for root device PARTUUID=cf53a43f-02...
    [ 0.908747] mmc0: host does not support reading read-only switch, assuming write-enable
    [ 0.911049] mmc0: new high speed SDHC card at address aaaa
    [ 0.911914] mmcblk0: mmc0:aaaa SU04G 3.69 GiB
    [ 0.913445] mmcblk0: p1 p2
    [ 0.966181] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
    [ 0.966285] VFS: Mounted root (ext4 filesystem) on device 179:2.
    [ 0.975771] devtmpfs: mounted
    [ 0.976231] Freeing unused kernel memory: 256K (c0880000 - c08c0000)
    [ 0.976241] This architecture does not have kernel memory protection.
    [ 1.253115] systemd[1]: RTC configured in localtime, applying delta of 0 minutes to system time.
    [ 1.327110] random: systemd: uninitialized urandom read (16 bytes read, 28 bits of entropy available)
    [ 1.337066] random: systemd: uninitialized urandom read (16 bytes read, 28 bits of entropy available)
    [ 1.364567] systemd[1]: systemd 229 running in system mode. (+PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP -LIBCRYPT)
    [ 1.366264] systemd[1]: Detected architecture arm.
    [ 1.370419] systemd[1]: Set hostname to <am335x-evm>.
    [ 1.513179] random: systemd-gpt-aut: uninitialized urandom read (16 bytes read, 31 bits of entropy available)
    [ 1.513617] random: systemd-gpt-aut: uninitialized urandom read (16 bytes read, 31 bits of entropy available)
    [ 1.516599] random: systemd-sysv-ge: uninitialized urandom read (16 bytes read, 31 bits of entropy available)
    [ 1.541948] random: systemd-sysv-ge: uninitialized urandom read (16 bytes read, 32 bits of entropy available)
    [ 1.567350] random: systemd-sysv-ge: uninitialized urandom read (16 bytes read, 33 bits of entropy available)
    [ 1.649763] random: systemd: uninitialized urandom read (16 bytes read, 37 bits of entropy available)
    [ 1.650386] random: systemd: uninitialized urandom read (16 bytes read, 37 bits of entropy available)
    [ 1.652309] random: systemd: uninitialized urandom read (16 bytes read, 37 bits of entropy available)
    [ 2.066947] systemd[1]: [/lib/systemd/system/gadget-init.service:15] Unknown lvalue 'ExecStopPre' in section 'Service'
    [ 2.204731] systemd[1]: Configuration file /lib/systemd/system/psplash-stop.service is marked executable. Please remove executabl.
    [ 2.310498] systemd[1]: Configuration file /lib/systemd/system/psplash-start.service is marked executable. Please remove executab.
    [ 2.311738] systemd[1]: [/lib/systemd/system/psplash-start.service:4] Unknown lvalue 'OnBootSec' in section 'Unit'
    [ 2.372590] systemd[1]: basic.target: Found ordering cycle on basic.target/start
    [ 2.372653] systemd[1]: basic.target: Found dependency on sockets.target/start
    [ 2.372691] systemd[1]: basic.target: Found dependency on dbus.socket/start
    [ 2.372720] systemd[1]: basic.target: Found dependency on sysinit.target/start
    [ 2.372747] systemd[1]: basic.target: Found dependency on alignment.service/start
    [ 2.372773] systemd[1]: basic.target: Found dependency on basic.target/start
    [ 2.372803] systemd[1]: basic.target: Breaking ordering cycle by deleting job sockets.target/start
    [ 2.372835] systemd[1]: sockets.target: Job sockets.target/start deleted to break ordering cycle starting with basic.target/start
    [ 2.385658] systemd[1]: basic.target: Found ordering cycle on basic.target/start
    [ 2.385704] systemd[1]: basic.target: Found dependency on sysinit.target/start
    [ 2.385738] systemd[1]: basic.target: Found dependency on alignment.service/start
    [ 2.385771] systemd[1]: basic.target: Found dependency on basic.target/start
    [ 2.385799] systemd[1]: basic.target: Breaking ordering cycle by deleting job alignment.service/start
    [ 2.385833] systemd[1]: alignment.service: Job alignment.service/start deleted to break ordering cycle starting with basic.targett
    [ 2.405865] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
    [ 2.409374] systemd[1]: Created slice System Slice.
    [ 2.435718] systemd[1]: Listening on Journal Socket (/dev/log).
    [ 2.436284] systemd[1]: Listening on Journal Socket.
    [ 2.442179] systemd[1]: Mounting Debug File System...
    [ 2.458998] systemd[1]: Mounting POSIX Message Queue File System...
    [ 2.473663] systemd[1]: Mounting Temporary Directory...
    [ 2.552122] systemd[1]: Starting Load Kernel Modules...
    [ 2.557915] systemd[1]: Starting Setup Virtual Console...
    [ 2.587446] systemd[1]: Reached target Swap.
    [ 2.608939] systemd[1]: Created slice system-getty.slice.
    [ 2.614568] systemd[1]: Starting Remount Root and Kernel File Systems...
    [ 2.615624] systemd[1]: Listening on Network Service Netlink Socket.
    [ 2.652733] systemd[1]: Starting Synchronize System and HW clocks...
    [ 2.653377] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
    [ 2.674274] cryptodev: driver 1.8 loaded.
    [ 2.694565] systemd[1]: Listening on Syslog Socket.
    [ 2.726815] systemd[1]: Starting Journal Service...
    [ 2.767287] systemd[1]: Starting Create list of required static device nodes for the current kernel...
    [ 2.767985] systemd[1]: Listening on udev Control Socket.
    [ 2.773653] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
    [ 2.780597] rtc-mcp795 spi1.0: Set mcp795: 1917-11-28 18:36:20
    [ 2.780629] rtc-mcp795 spi1.0: Write RTC called.....!!!!!
    [ 2.786197] rtc-mcp795 spi1.0: Read RTC called....!!!!
    [ 2.825457] rtc-mcp795 spi1.0: Read from mcp795: 2017-11-28 18:36:20
    [ 2.871177] systemd[1]: Starting Psplash Boot Screen...
    [ 2.871425] systemd[1]: Reached target Remote File Systems.
    [ 2.872859] systemd[1]: Listening on udev Kernel Socket.
    [ 2.874922] systemd[1]: Created slice system-serial\x2dgetty.slice.
    [ 2.875684] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
    [ 2.875902] systemd[1]: Reached target Paths.
    [ 2.912057] systemd[1]: Created slice User and Session Slice.
    [ 2.912335] systemd[1]: Reached target Slices.
    [ 2.999532] systemd[1]: Mounted Debug File System.
    [ 2.999820] systemd[1]: Mounted POSIX Message Queue File System.
    [ 3.000035] systemd[1]: Mounted Temporary Directory.
    [ 3.004229] systemd[1]: Started Load Kernel Modules.
    [ 3.006487] systemd[1]: Started Setup Virtual Console.
    [ 3.019584] systemd[1]: Started Remount Root and Kernel File Systems.
    [ 3.022025] systemd[1]: Started Synchronize System and HW clocks.
    [ 3.024209] systemd[1]: Started Create list of required static device nodes for the current kernel.
    [ 3.034337] systemd[1]: Started Psplash Boot Screen.
    [ 3.333301] systemd[1]: Started Journal Service.
    [ 4.975205] systemd-journald[105]: Received request to flush runtime journal from PID 1
    [ 7.160248] of_get_named_gpiod_flags: parsed 'row-gpios' property of node '/matrix_keypad@0[0]' - status (0)
    [ 7.160304] of_get_named_gpiod_flags: parsed 'row-gpios' property of node '/matrix_keypad@0[1]' - status (0)
    [ 7.160343] of_get_named_gpiod_flags: parsed 'row-gpios' property of node '/matrix_keypad@0[2]' - status (0)
    [ 7.160388] of_get_named_gpiod_flags: parsed 'row-gpios' property of node '/matrix_keypad@0[3]' - status (0)
    [ 7.160410] of_get_named_gpiod_flags: parsed 'col-gpios' property of node '/matrix_keypad@0[0]' - status (0)
    [ 7.160439] of_get_named_gpiod_flags: parsed 'col-gpios' property of node '/matrix_keypad@0[1]' - status (0)
    [ 7.161103] input: matrix_keypad@0 as /devices/platform/matrix_keypad@0/input/input1
    [ 7.502188] input: ti-tsc as /devices/platform/ocp/44e0d000.tscadc/TI-am335x-tsc/input/input2
    [ 7.534058] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
    [ 7.599576] am335x-phy-driver 47401300.usb-phy: GPIO lookup for consumer reset
    [ 7.599617] am335x-phy-driver 47401300.usb-phy: using device tree for GPIO lookup
    [ 7.599641] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/usb@47400000/usb-phy@47401300[0]'
    [ 7.599656] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp/usb@47400000/usb-phy@47401300[0]'
    [ 7.599670] am335x-phy-driver 47401300.usb-phy: using lookup tables for GPIO lookup
    [ 7.599685] am335x-phy-driver 47401300.usb-phy: lookup for GPIO reset failed
    [ 7.599700] am335x-phy-driver 47401300.usb-phy: GPIO lookup for consumer vbus-detect
    [ 7.599713] am335x-phy-driver 47401300.usb-phy: using device tree for GPIO lookup
    [ 7.599727] of_get_named_gpiod_flags: can't parse 'vbus-detect-gpios' property of node '/ocp/usb@47400000/usb-phy@47401300[0]'
    [ 7.599740] of_get_named_gpiod_flags: can't parse 'vbus-detect-gpio' property of node '/ocp/usb@47400000/usb-phy@47401300[0]'
    [ 7.599753] am335x-phy-driver 47401300.usb-phy: using lookup tables for GPIO lookup
    [ 7.599766] am335x-phy-driver 47401300.usb-phy: lookup for GPIO vbus-detect failed
    [ 7.599859] 47401300.usb-phy supply vcc not found, using dummy regulator
    [ 7.670858] am335x-phy-driver 47401b00.usb-phy: GPIO lookup for consumer reset
    [ 7.670897] am335x-phy-driver 47401b00.usb-phy: using device tree for GPIO lookup
    [ 7.670920] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/usb@47400000/usb-phy@47401b00[0]'
    [ 7.670934] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp/usb@47400000/usb-phy@47401b00[0]'
    [ 7.670948] am335x-phy-driver 47401b00.usb-phy: using lookup tables for GPIO lookup
    [ 7.670963] am335x-phy-driver 47401b00.usb-phy: lookup for GPIO reset failed
    [ 7.670978] am335x-phy-driver 47401b00.usb-phy: GPIO lookup for consumer vbus-detect
    [ 7.670991] am335x-phy-driver 47401b00.usb-phy: using device tree for GPIO lookup
    [ 7.671005] of_get_named_gpiod_flags: can't parse 'vbus-detect-gpios' property of node '/ocp/usb@47400000/usb-phy@47401b00[0]'
    [ 7.671018] of_get_named_gpiod_flags: can't parse 'vbus-detect-gpio' property of node '/ocp/usb@47400000/usb-phy@47401b00[0]'
    [ 7.671031] am335x-phy-driver 47401b00.usb-phy: using lookup tables for GPIO lookup
    [ 7.671044] am335x-phy-driver 47401b00.usb-phy: lookup for GPIO vbus-detect failed
    [ 7.671159] 47401b00.usb-phy supply vcc not found, using dummy regulator
    [ 8.216968] edt_ft5x06 2-0038: GPIO lookup for consumer reset
    [ 8.217005] edt_ft5x06 2-0038: using device tree for GPIO lookup
    [ 8.217027] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/i2c@4819c000/edt-ft5406@38[0]'
    [ 8.217043] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp/i2c@4819c000/edt-ft5406@38[0]'
    [ 8.217056] edt_ft5x06 2-0038: using lookup tables for GPIO lookup
    [ 8.217070] edt_ft5x06 2-0038: lookup for GPIO reset failed
    [ 8.217085] edt_ft5x06 2-0038: GPIO lookup for consumer wake
    [ 8.217097] edt_ft5x06 2-0038: using device tree for GPIO lookup
    [ 8.217110] of_get_named_gpiod_flags: can't parse 'wake-gpios' property of node '/ocp/i2c@4819c000/edt-ft5406@38[0]'
    [ 8.217123] of_get_named_gpiod_flags: can't parse 'wake-gpio' property of node '/ocp/i2c@4819c000/edt-ft5406@38[0]'
    [ 8.217135] edt_ft5x06 2-0038: using lookup tables for GPIO lookup
    [ 8.217148] edt_ft5x06 2-0038: lookup for GPIO wake failed
    [ 8.248869] input: EP0790M09 as /devices/platform/ocp/4819c000.i2c/i2c-2/2-0038/input/input3
    [ 8.329581] omap_rng 48310000.rng: OMAP Random Number Generator ver. 20
    [ 8.869921] omap_hwmod: pruss: _wait_target_ready failed: -16
    [ 8.979735] ti-pruss 4a300000.pruss: couldn't enable pruss
    [ 8.985388] ti-pruss: probe of 4a300000.pruss failed with error -16
    [ 10.140512] omap-sham 53100000.sham: hw accel on OMAP rev 4.3
    [ 10.261376] random: nonblocking pool is initialized
    [ 10.439829] remoteproc0: wkup_m3 is available
    [ 10.439860] remoteproc0: Note: remoteproc is still under development and considered experimental.
    [ 10.439873] remoteproc0: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.
    [ 10.939589] remoteproc0: powering up wkup_m3
    [ 10.940810] remoteproc0: Booting fw image am335x-pm-firmware.elf, size 217232
    [ 10.941134] remoteproc0: remote processor wkup_m3 is now up
    [ 10.941171] wkup_m3_ipc 44e11324.wkup_m3_ipc: CM3 Firmware Version = 0x192
    [ 11.019430] omap-aes 53500000.aes: OMAP AES hw accel rev: 3.2
    [ 11.643941] [drm] Initialized pvr 1.14.3699939 20110701 on minor 1
    [ 11.650274] PM: no-rtc available, rtc-only mode disabled.
    [ 11.916940] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
    [ 15.470314] NET: Registered protocol family 15
    [ 16.206243] Bluetooth: Core ver 2.21
    [ 16.206382] NET: Registered protocol family 31
    [ 16.206394] Bluetooth: HCI device and connection manager initialized
    [ 16.206426] Bluetooth: HCI socket layer initialized
    [ 16.206445] Bluetooth: L2CAP socket layer initialized
    [ 16.206490] Bluetooth: SCO socket layer initialized
    [ 16.886357] Initializing XFRM netlink socket
    [ 17.278724] net eth0: initializing cpsw version 1.12 (0)
    [ 17.278777] net eth0: initialized cpsw ale version 1.4
    [ 17.278792] net eth0: ALE Table size 1024
    [ 17.281637] net eth0: phy found : id is : 0x7c0f1
    [ 17.281737] libphy: PHY 4a101000.mdio:01 not found
    [ 17.286567] net eth0: phy "4a101000.mdio:01" not found on slave 1, err -19
    [ 17.312604] usbcore: registered new interface driver usbfs
    [ 17.312743] usbcore: registered new interface driver hub
    [ 17.353004] usbcore: registered new device driver usb
    [ 17.559028] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    [ 17.581450] musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
    [ 17.581486] musb-hdrc: MHDRC RTL version 2.0
    [ 17.581500] musb-hdrc: setup fifo_mode 4
    [ 17.581526] musb-hdrc: 28/31 max ep, 16384/16384 memory
    [ 17.581712] musb-hdrc musb-hdrc.0.auto: MUSB HDRC host driver
    [ 17.581765] musb-hdrc musb-hdrc.0.auto: new USB bus registered, assigned bus number 1
    [ 17.596362] hub 1-0:1.0: USB hub found
    [ 17.596465] hub 1-0:1.0: 1 port detected
    [ 17.739003] musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
    [ 17.739041] musb-hdrc: MHDRC RTL version 2.0
    [ 17.739054] musb-hdrc: setup fifo_mode 4
    [ 17.739081] musb-hdrc: 28/31 max ep, 16384/16384 memory
    [ 17.739274] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
    [ 17.739320] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 2
    [ 17.749201] musb-hdrc musb-hdrc.0.auto: VBUS_ERROR in a_wait_vrise (89, <AValid), retry #1, port1 00000104
    [ 17.755102] hub 2-0:1.0: USB hub found
    [ 17.755179] hub 2-0:1.0: 1 port detected
    [ 17.901643] musb-hdrc musb-hdrc.0.auto: VBUS_ERROR in a_wait_vrise (89, <AValid), retry #2, port1 00000104
    [ 18.054073] musb-hdrc musb-hdrc.0.auto: VBUS_ERROR in a_wait_vrise (89, <AValid), retry #3, port1 00000104
    [ 18.206493] musb-hdrc musb-hdrc.0.auto: VBUS_ERROR in a_wait_vrise (88, <AValid), retry #3, port1 0008010c
    [ 27.164729] PVR_K: UM DDK-(3699939) and KM DDK-(3699939) match. [ OK ]
  • DTS:

    &i2c0 {
    pinctrl-names = "default";
    pinctrl-0 = <&i2c0_pins>;

    status = "okay";
    clock-frequency = <400000>;

    tps: tps@2d {
    reg = <0x2d>;
    };

    eeprom: eeprom@50 {
    compatible = "at,24c256";
    reg = <0x50>;
    };
    };
  • Hi Thejeswarareddy,

    Do you use AM335x TI EVM or custom board?

    Have you verified your I2C0 pinmux is correct? You can do this checking the related Control Module registers with devmem2 tool.

    Check also if your EEPROM is properly detected with "i2cdetect" command, see below wiki for more info:

    processors.wiki.ti.com/.../Processor_SDK_Linux_Training:_Introduction_to_Device_Driver_Development

    Regards,
    Pavel
  • Hi Pavel,

    I am colleague of Thejeswarareddy

    Yes, we have verified the PINMUX. Also we have checked that i2cdetect is working fine its is detecting 2 I2C (0 and 2). I2C 0 is connected with EEPROM

    I am able to write in EEPROM using direct echo as per below

    Echo “hello” > /sys/bus/i2c/devices/1-0050/eeprom

    Here is the log for your ref for few commands:

    root@am335x-evm:~/bin# eeprom -f data -w
    -sh: ./eeprom: No such file or directory
    root@am335x-evm:~/bin# eeprom -f data -w
    base-address of eeproms       : 0x50
    number of pages to read       : 8 (0x50 .. 0x57)
    file opened for reading       : data
                on filedescriptor : 3
    i2c-devicenode is             : /dev/i2c-0
                on filedescriptor : 4

    **WARNING**
     -      You have chosen to WRITE to this eeprom.
            Make sure that this tiny chip is *NOT* vital to the
            operation of your computer as you can easily corrupt
            the configuration memory of your SDRAM-memory-module,
            your IBM ThinkPad or whatnot...! Fixing these errors can be
            a time-consuming and very costly process!

    Things to consider:
     -      You can have more than one i2c-bus, check in /proc/bus/i2c
            and specify the correct one with -d
            right now you have chosen to use '/dev/i2c-0'
     -      A eeprom can occupy several i2c-addresses (one per page)
            so please make sure that there is no vital eeprom in your computer
            sitting at addresses between 0x50 and 0x57
    Enter 'yes' to continue:yes
    Wrote 8 bytes to eeprom at 0x50, offset 00000000
    ioctl(): Remote I/O error
    ioctl returned -1

     

    Note: Even after eeprom read (eeprom –r –f data) I am getting same ioctl error

    root@am335x-evm:~# i2cget -f -y 0 0x50 0x00

    0xff

     

     

    root@am335x-evm:~# i2cset -f -y -r 0 0x50 0x00 0x32 b

    Warning - data mismatch - wrote 0x32, read back 0xff

     

     

    root@am335x-evm:~# i2cget -f -y 0 0x50 0x00

    0xff

    root@am335x-evm:~# i2cdump -f -y -r 0x00-0xff 0 0x50

    No size specified (using byte-data access)

    0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef

    00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................

    10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................

    20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................

    30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................

    40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................

    50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................

    60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................

    70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................

    80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................

    90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................

    a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................

    b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................

    c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................

    d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................

    e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................

    f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................

    root@am335x-evm:~# 

  • Hi Biplab,

    Do you use TI board (EVM, SK, BBB) or custom board?

    You can first verify your EEPROM at u-boot stage. I am using AM335x TI SK (StarterKit), which comes with EEPROM cat24c256 at i2c0 addr 0x50. I am able to write there successful.

    CPU : AM335X-GP rev 2.1
    Model: TI AM335x EVM-SK
    Press SPACE to abort autoboot in 2 seconds
    => i2c bus
    Bus 0: i2c@44e0b000
    => i2c dev 0
    Setting bus to 0
    => i2c probe 0x50
    Valid chip addresses: 50
    => i2c speed
    Current bus speed=400000
    => i2c md 0x50 0
    0000: aa 55 33 ee 41 33 33 35 58 5f 53 4b 31 2e 32 42 .U3.A335X_SK1.2B
    => i2c md 0x50 0 1
    0000: aa .
    => i2c mw 0x50 0 0xab
    => i2c md 0x50 0 1
    0000: ab .
    => i2c mw 0x50 0 0x32
    => i2c md 0x50 0 1
    0000: 32 2
    => i2c md 0x50 0 10
    0000: 32 55 33 ee 41 33 33 35 58 5f 53 4b 31 2e 32 42 2U3.A335X_SK1.2B


    Please try the same on your side and report the result.

    Regards,
    Pavel

  • Hi Pavel,

    I tried all the things but it is not writing, for more info please go through the below results.

    => i2c bus
    Bus 0: i2c@44e0b000
    Bus 1: i2c@4802a000
    => i2c dev 0
    Setting bus to 0
    => i2c probe 0x50
    Valid chip addresses: 50
    => i2c speed
    Current bus speed=400000
    => i2c md 0x50 0
    0000: 68 65 6c 6c 6f 5c 6e 0a 69 5c 6e 31 32 33 34 2d hello\n.i\n1234-
    => i2c md 0x50 0 1
    0000: 68 h
    => i2c mw 0x50 0 0xab
    => i2c md 0x50 0 1
    0000: 68 h
    => i2c mw 0x50 0 0x32
    => i2c md 0x50 0 1
    0000: 68 h
    => i2c md 0x50 0 10
    0000: 68 65 6c 6c 6f 5c 6e 0a 69 5c 6e 31 32 33 34 2d hello\n.i\n1234-
    =>

    Thanks in Advance!
    Thejeswara Reddy R
  • Do you use TI board (EVM, SK, BBB) or custom board?
  • Hi Pavel,

    We are using custom board which is having AM3354 SOC (AM335x EVM Link: www.ti.com/.../TMDXEVM3358).

    Thanks in Advance!
    Thejeswara Reddy R
  • Thejeswara,

    This seems to me a HW malfunction of your custom board. Because I have the same EEPROM chip (cat24c256) in AM335x TI SK board, on i2c0 (addr 0x50), and it is working fine with the default u-boot code base. Have you change anything in the u-boot code base regarding cat24c256 and i2c?

    ti-processor-sdk-linux-am335x-evm-x/board-support/u-boot-x/

    I would suggest you to probe the I2C0 pins with scope to check if you have valid and expected signals when doing u-boot read/write commands to the eeprom chip.

    We have also I2C diagnostic test that you might try to re-use for your custom board:

    processors.wiki.ti.com/.../AM335x_Starter_Kit_Diagnostics

    You can also compare the schematics of AM335x TI SK and your custom board (in the I2C part) and check for differences.

    Regards,
    Pavel