I2C broken in demo images?

For SAMA5D2 Xplained, SAMA5D3 Xplained and SAMA5D4 Xplained

Moderator: nferre

don.schoppe@connecteddev.com
Posts: 1
Joined: Tue Apr 05, 2016 9:46 pm

I2C broken in demo images?

Thu Jul 21, 2016 9:38 pm

Hi,

With the pre-flashed image on the SAMA5D3-Xplained board, I am able to successfully issue I2C commands for example to detect the PMIC and access its registers:

Code: Select all

root@sama5d3_xplained:~# i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- 5b -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
root@sama5d3_xplained:~# i2cget -y 1 0x5b 0x54 
0x39
root@sama5d3_xplained:~# i2cget -y 1 0x5b 0x55 
0xc1

root@sama5d3_xplained:~# dmesg
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 3.10.0-yocto-standard (nferre@tenerife) (gcc version 4.8.1 (GCC) ) #1 Wed Feb 5 10:03:20 CET 2014
[    0.000000] CPU: ARMv7 Processor [410fc051] revision 1 (ARMv7), cr=50c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine: Atmel SAMA5 (Device Tree), model: SAMA5D3 Xplained
[    0.000000] bootconsole [earlycon0] enabled
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] AT91: Detected soc type: sama5d3
[    0.000000] AT91: Detected soc subtype: sama5d36
[    0.000000] AT91: sram at 0x300000 of 0x20000 mapped at 0xfef58000
[    0.000000] On node 0 totalpages: 65536
[    0.000000] free_area_init_node: node 0, pgdat c0639dd8, node_mem_map c0664000
[    0.000000]   Normal zone: 512 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 65536 pages, LIFO batch:15
[    0.000000] CPU: All CPU(s) started in SVC mode.
[    0.000000] Clocks: CPU 528 MHz, master 132 MHz, main 12.000 MHz
[    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: 65024
[    0.000000] Kernel command line: console=ttyS0,115200 earlyprintk mtdparts=atmel_nand:256k(bootstrap)ro,512k(uboot)ro,256K(env),256k(evn_redundent),256k(spare),512k(dtb),6M(kernel)ro,-(rootfs) rootfstype=ubifs ubi.mtd=7 root=ubi0:rootfs
[    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] allocated 524288 bytes of page_cgroup
[    0.000000] please try 'cgroup_disable=memory' option if you don't want memory cgroups
[    0.000000] Memory: 256MB = 256MB total
[    0.000000] Memory: 252736k/252736k available, 9408k reserved, 0K highmem
[    0.000000] Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    vmalloc : 0xd0800000 - 0xff000000   ( 744 MB)
    lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
    modules : 0xbf800000 - 0xc0000000   (   8 MB)
      .text : 0xc0008000 - 0xc05b4fc8   (5812 kB)
      .init : 0xc05b5000 - 0xc05d2d60   ( 120 kB)
      .data : 0xc05d4000 - 0xc063a9f8   ( 411 kB)
       .bss : 0xc063a9f8 - 0xc0663820   ( 164 kB)
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 4294967286ms
[    0.000000] Console: colour dummy device 80x30
[    0.010000] Calibrating delay loop... 351.43 BogoMIPS (lpj=1757184)
[    0.070000] pid_max: default: 32768 minimum: 301
[    0.070000] Mount-cache hash table entries: 512
[    0.080000] Initializing cgroup subsys memory
[    0.090000] Initializing cgroup subsys devices
[    0.090000] Initializing cgroup subsys freezer
[    0.090000] Initializing cgroup subsys blkio
[    0.100000] CPU: Testing write buffer coherency: ok
[    0.100000] Setting up static identity map for 0xc0350648 - 0xc0350694
[    0.110000] devtmpfs: initialized
[    0.110000] pinctrl core: initialized pinctrl subsystem
[    0.120000] NET: Registered protocol family 16
[    0.120000] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.150000] AT91: Power Management
[    0.150000] gpio-at91 fffff200.gpio: at address fefff200
[    0.160000] gpio-at91 fffff400.gpio: at address fefff400
[    0.160000] gpio-at91 fffff600.gpio: at address fefff600
[    0.170000] gpio-at91 fffff800.gpio: at address fefff800
[    0.170000] gpio-at91 fffffa00.gpio: at address fefffa00
[    0.180000] pinctrl-at91 pinctrl.2: initialized AT91 pinctrl driver
[    0.190000] tcb_clksrc: tc0 at 8.750 MHz
[    0.220000] bio: create slab <bio-0> at 0
[    0.220000] at_hdmac ffffe600.dma-controller: Atmel AHB DMA Controller ( cpy slave ), 8 channels
[    0.240000] at_hdmac ffffe800.dma-controller: Atmel AHB DMA Controller ( cpy slave ), 8 channels
[    0.250000] SCSI subsystem initialized
[    0.250000] usbcore: registered new interface driver usbfs
[    0.260000] usbcore: registered new interface driver hub
[    0.260000] usbcore: registered new device driver usb
[    0.270000] of_dma_request_slave_channel: dma-names property missing or empty
[    0.280000] at91_i2c f0014000.i2c: can't get a DMA channel for tx
[    0.280000] at91_i2c f0014000.i2c: can't use DMA
[    0.280000] at91_i2c f0014000.i2c: AT91 i2c bus driver.
[    0.290000] at91_i2c f0018000.i2c: using dma0chan0 (tx) and dma0chan1 (rx) for DMA transfers
[    0.300000] at91_i2c f0018000.i2c: AT91 i2c bus driver.
[    0.300000] at91_i2c f801c000.i2c: can't get a DMA channel for tx
[    0.310000] at91_i2c f801c000.i2c: can't use DMA
[    0.310000] at91_i2c f801c000.i2c: AT91 i2c bus driver.
[    0.320000] media: Linux media interface: v0.10
[    0.320000] Linux video capture interface: v2.00
[    0.330000] Advanced Linux Sound Architecture Driver Initialized.
[    0.340000] Bluetooth: Core ver 2.16
[    0.340000] NET: Registered protocol family 31
[    0.340000] Bluetooth: HCI device and connection manager initialized
[    0.350000] Bluetooth: HCI socket layer initialized
[    0.350000] Bluetooth: L2CAP socket layer initialized
[    0.360000] Bluetooth: SCO socket layer initialized
[    0.360000] cfg80211: Calling CRDA to update world regulatory domain
[    0.370000] Switching to clocksource tcb_clksrc
[    0.410000] NET: Registered protocol family 2
[    0.410000] TCP established hash table entries: 2048 (order: 2, 16384 bytes)
[    0.420000] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[    0.420000] TCP: Hash tables configured (established 2048 bind 2048)
[    0.430000] TCP: reno registered
[    0.430000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.440000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.440000] NET: Registered protocol family 1
[    0.450000] RPC: Registered named UNIX socket transport module.
[    0.450000] RPC: Registered udp transport module.
[    0.460000] RPC: Registered tcp transport module.
[    0.460000] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.470000] jffs2: version 2.2. (NAND) \xffffffc2\xffffffa9 2001-2006 Red Hat, Inc.
[    0.480000] msgmni has been set to 493
[    0.480000] io scheduler noop registered (default)
[    0.490000] f001c000.serial: ttyS1 at MMIO 0xf001c000 (irq = 23) is a ATMEL_SERIAL
[    0.500000] f0020000.serial: ttyS2 at MMIO 0xf0020000 (irq = 24) is a ATMEL_SERIAL
[    0.510000] f0024000.serial: ttyS5 at MMIO 0xf0024000 (irq = 25) is a ATMEL_SERIAL
[    0.510000] ffffee00.serial: ttyS0 at MMIO 0xffffee00 (irq = 39) is a ATMEL_SERIAL
[    0.520000] console [ttyS0] enabled, bootconsole disabled
[    0.540000] brd: module loaded
[    0.550000] loop: module loaded
[    0.560000] atmel_nand_nfc 70000000.nfc: NFC is probed.
[    0.560000] atmel_nand: Use On Flash BBT
[    0.560000] atmel_nand 60000000.nand: Using dma0chan2 for DMA transfers.
[    0.570000] ONFI param page 0 valid
[    0.570000] ONFI flash detected
[    0.570000] NAND device: Manufacturer ID: 0x2c, Chip ID: 0xda (Micron MT29F2G08ABAEAWP), 256MiB, page size: 2048, OOB size: 64
[    0.580000] atmel_nand 60000000.nand: ONFI params, minimum required ECC: 4 bits in 512 bytes
[    0.590000] atmel_nand 60000000.nand: Initialize PMECC params, cap: 4, sector: 512
[    0.600000] atmel_nand 60000000.nand: Using NFC Sram read and write
[    0.600000] Bad block table found at page 131008, version 0x01
[    0.610000] Bad block table found at page 130944, version 0x01
[    0.610000] 8 cmdlinepart partitions found on MTD device atmel_nand
[    0.620000] Creating 8 MTD partitions on "atmel_nand":
[    0.620000] 0x000000000000-0x000000040000 : "bootstrap"
[    0.630000] 0x000000040000-0x0000000c0000 : "uboot"
[    0.630000] 0x0000000c0000-0x000000100000 : "env"
[    0.640000] 0x000000100000-0x000000140000 : "evn_redundent"
[    0.640000] 0x000000140000-0x000000180000 : "spare"
[    0.650000] 0x000000180000-0x000000200000 : "dtb"
[    0.660000] 0x000000200000-0x000000800000 : "kernel"
[    0.660000] 0x000000800000-0x000010000000 : "rootfs"
[    0.670000] atmel_spi f0004000.spi: version: 0x213
[    0.670000] atmel_spi f0004000.spi: Using dma0chan3 (tx) and dma0chan4 (rx) for DMA transfers
[    0.680000] atmel_spi f0004000.spi: Atmel SPI Controller at 0xf0004000 (irq 18)
[    0.690000] atmel_spi f0004000.spi: master is unqueued, this is deprecated
[    0.690000] atmel_spi f8008000.spi: version: 0x213
[    0.700000] atmel_spi f8008000.spi: Using dma1chan0 (tx) and dma1chan1 (rx) for DMA transfers
[    0.700000] atmel_spi f8008000.spi: Atmel SPI Controller at 0xf8008000 (irq 28)
[    0.710000] atmel_spi f8008000.spi: master is unqueued, this is deprecated
[    0.720000] CAN device driver interface
[    0.720000] at91_can f000c000.can: device registered (reg_base=d08ea000, irq=19)
[    0.730000] at91_can f8010000.can: device registered (reg_base=d08ec000, irq=29)
[    0.740000] macb f0028000.ethernet (unregistered net_device): invalid hw address, using random
[    0.750000] libphy: MACB_mii_bus: probed
[    0.750000] macb f0028000.ethernet eth0: Cadence GEM at 0xf0028000 irq 26 (3a:dc:64:c9:85:a7)
[    0.760000] macb f0028000.ethernet eth0: attached PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=f0028000.etherne:07, irq=-1)
[    0.770000] macb f802c000.ethernet (unregistered net_device): invalid hw address, using random
[    0.790000] libphy: MACB_mii_bus: probed
[    0.790000] macb f802c000.ethernet eth1: Cadence MACB at 0xf802c000 irq 33 (26:ef:6a:4c:1a:45)
[    0.800000] macb f802c000.ethernet eth1: attached PHY driver [Micrel KSZ8081 or KSZ8091] (mii_bus:phy_addr=f802c000.etherne:00, irq=-1)
[    0.810000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.810000] ehci-atmel: EHCI Atmel driver
[    0.820000] atmel-ehci 700000.ehci: EHCI Host Controller
[    0.820000] atmel-ehci 700000.ehci: new USB bus registered, assigned bus number 1
[    0.830000] atmel-ehci 700000.ehci: irq 47, io mem 0x00700000
[    0.850000] atmel-ehci 700000.ehci: USB 2.0 started, EHCI 1.00
[    0.850000] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    0.860000] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.860000] usb usb1: Product: EHCI Host Controller
[    0.860000] usb usb1: Manufacturer: Linux 3.10.0-yocto-standard ehci_hcd
[    0.870000] usb usb1: SerialNumber: 700000.ehci
[    0.870000] hub 1-0:1.0: USB hub found
[    0.880000] hub 1-0:1.0: 3 ports detected
[    0.880000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.890000] at91_ohci 600000.ohci: AT91 OHCI
[    0.890000] at91_ohci 600000.ohci: new USB bus registered, assigned bus number 2
[    0.900000] at91_ohci 600000.ohci: irq 47, io mem 0x00600000
[    0.960000] usb usb2: New USB device found, idVendor=1d6b, idProduct=0001
[    0.960000] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.970000] usb usb2: Product: AT91 OHCI
[    0.970000] usb usb2: Manufacturer: Linux 3.10.0-yocto-standard ohci_hcd
[    0.980000] usb usb2: SerialNumber: at91
[    0.980000] hub 2-0:1.0: USB hub found
[    0.980000] hub 2-0:1.0: 3 ports detected
[    0.990000] usbcore: registered new interface driver usb-storage
[    0.990000] usbcore: registered new interface driver usbserial
[    1.000000] usbcore: registered new interface driver usbserial_generic
[    1.000000] usbserial: USB Serial support registered for generic
[    1.010000] at91_rtc fffffeb0.rtc: rtc core: registered fffffeb0.rtc as rtc0
[    1.020000] at91_rtc fffffeb0.rtc: AT91 Real Time Clock driver.
[    1.020000] i2c /dev entries driver
[    1.030000] Driver for 1-wire Dallas network protocol.
[    1.030000] cpuidle: using governor ladder
[    1.040000] leds-gpio leds.4: pins are not configured from the driver
[    1.040000] atmel_aes f8038000.aes: version: 0x135
[    1.050000] atmel_aes f8038000.aes: Atmel AES - Using dma1chan2, dma1chan3 for DMA transfers
[    1.060000] atmel_tdes f803c000.tdes: version: 0x701
[    1.060000] atmel_tdes f803c000.tdes: using dma1chan4, dma1chan5 for DMA transfers
[    1.070000] atmel_tdes f803c000.tdes: Atmel DES/TDES
[    1.070000] atmel_sha f8034000.sha: version: 0x410
[    1.080000] atmel_sha f8034000.sha: using dma1chan6 for DMA transfers
[    1.080000] atmel_sha f8034000.sha: Atmel SHA1/SHA256/SHA224/SHA384/SHA512
[    1.090000] hidraw: raw HID events driver (C) Jiri Kosina
[    1.090000] iio iio:device0: Resolution used: 12 bits
[    1.100000] iio iio:device0: ADC Touch screen is disabled.
[    1.140000] TCP: cubic registered
[    1.150000] NET: Registered protocol family 10
[    1.150000] sit: IPv6 over IPv4 tunneling driver
[    1.150000] NET: Registered protocol family 17
[    1.160000] can: controller area network core (rev 20120528 abi 9)
[    1.160000] NET: Registered protocol family 29
[    1.170000] can: raw protocol (rev 20120528)
[    1.170000] can: broadcast manager protocol (rev 20120528 t)
[    1.170000] can: netlink gateway (rev 20130117) max_hops=1
[    1.180000] VFP support v0.3: implementor 41 architecture 2 part 30 variant 5 rev 1
[    1.180000] ThumbEE CPU extension supported.
[    1.190000] Registering SWP/SWPB emulation handler
[    1.190000] UBI: attaching mtd7 to ubi0
[    1.560000] atmel_nand 60000000.nand: Bit flip in data area, byte_pos: 512, bit_pos: 4, 0x10 -> 0x00
[    2.090000] UBI: scanning is finished
[    2.100000] UBI: attached mtd7 (name "rootfs", size 248 MiB) to ubi0
[    2.110000] UBI: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    2.110000] UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    2.120000] UBI: VID header offset: 2048 (aligned 2048), data offset: 4096
[    2.130000] UBI: good PEBs: 1980, bad PEBs: 4, corrupted PEBs: 0
[    2.130000] UBI: user volume: 1, internal volumes: 1, max. volumes count: 128
[    2.140000] UBI: max/mean erase counter: 2/0, WL threshold: 4096, image sequence number: 325403341
[    2.140000] UBI: available PEBs: 0, total reserved PEBs: 1980, PEBs reserved for bad PEB handling: 36
[    2.150000] UBI: background thread "ubi_bgt0d" started, PID 681
[    2.160000] input: gpio_keys.3 as /devices/gpio_keys.3/input/input0
[    2.170000] at91_rtc fffffeb0.rtc: setting system clock to 2016-04-16 11:20:02 UTC (1460805602)
[    2.170000] atmel_mci f0000000.mmc: version: 0x505
[    2.180000] atmel_mci f0000000.mmc: using dma0chan5 for DMA transfers
[    2.220000] atmel_mci f0000000.mmc: Atmel MCI controller at 0xf0000000 irq 17, 1 slots
[    2.220000] atmel_mci f8000000.mmc: version: 0x505
[    2.230000] atmel_mci f8000000.mmc: using dma1chan7 for DMA transfers
[    2.270000] atmel_mci f8000000.mmc: Atmel MCI controller at 0xf8000000 irq 27, 1 slots
[    2.270000] ALSA device list:
[    2.280000]   No soundcards found.
[    2.310000] UBIFS: recovery needed
[    2.350000] UBIFS: recovery deferred
[    2.350000] UBIFS: mounted UBI device 0, volume 0, name "rootfs", R/O mode
[    2.350000] UBIFS: LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[    2.360000] UBIFS: FS size: 244936704 bytes (233 MiB, 1929 LEBs), journal size 9023488 bytes (8 MiB, 72 LEBs)
[    2.370000] UBIFS: reserved for root: 0 bytes (0 KiB)
[    2.380000] UBIFS: media format: w4/r0 (latest is w4/r0), UUID 5CA0915B-7DF9-4652-92C0-71B9DA8B6615, small LPT model
[    2.390000] VFS: Mounted root (ubifs filesystem) readonly on device 0:12.
[    2.390000] devtmpfs: mounted
[    2.390000] Freeing unused kernel memory: 116K (c05b5000 - c05d2000)
[    3.540000] udevd[717]: starting version 182
[    4.110000] atmel_usba_udc 500000.gadget: MMIO registers at 0xf8030000 mapped at d09a8000
[    4.110000] atmel_usba_udc 500000.gadget: FIFO at 0x00500000 mapped at d2400000
[    4.420000] UBI error: ubi_open_volume: cannot open device 0, volume 0, error -16
[    4.560000] g_serial gadget: Gadget Serial v2.4
[    4.560000] g_serial gadget: g_serial ready
[    4.670000] UBIFS: completing deferred recovery
[    4.700000] UBIFS: background thread "ubifs_bgt0_0" started, PID 773
[    4.700000] UBIFS: deferred recovery completed
[    4.800000] g_serial gadget: high-speed config #2: CDC ACM config
[    5.050000] atmel_nand 60000000.nand: Bit flip in data area, byte_pos: 1995, bit_pos: 4, 0x9a -> 0x8a
[    5.060000] atmel_nand 60000000.nand: Bit flip in data area, byte_pos: 1995, bit_pos: 4, 0x9a -> 0x8a
[    6.110000] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
However, when I load the linux4sam_5.3 demo image from (linux4sam/bin/view/Linux4SAM/Sama5d3Xpl ... o_archives) I2C appears broken. I also tried the older 5.2 image still available on the ftp site (ftp://www.at91.com/pub/demo/linux4sam_5 ... .2.img.bz2), as well as building/flashing 5.3 myself. Is this a known issue and/or has anyone patched it since?

Code: Select all

root@sama5d3-xplained-sd:~# i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
root@sama5d3-xplained-sd:~# i2cget -y 1 0x5b 0x54
Error: Read failed
root@sama5d3-xplained-sd:~# i2cget -y 1 0x5b 0x55
Error: Read failed

root@sama5d3-xplained-sd:~# dmesg
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.1.0-linux4sam_5.3 (ldesroches@ibiza) (gcc version 5.2.0 (GCC) ) #1 Sat Apr 16 11:28:00 CEST 2016
[    0.000000] CPU: ARMv7 Processor [410fc051] revision 1 (ARMv7), cr=10c53c7d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine model: SAMA5D3 Xplained
[    0.000000] cma: Reserved 64 MiB at 0x28000000
[    0.000000] Memory policy: Data cache writeback
[    0.000000] On node 0 totalpages: 65536
[    0.000000] free_area_init_node: node 0, pgdat c06e20c4, node_mem_map cfdda000
[    0.000000]   Normal zone: 512 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 65536 pages, LIFO batch:15
[    0.000000] CPU: All CPU(s) started in SVC mode.
[    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 off.  Total pages: 65024
[    0.000000] Kernel command line: console=ttyS0,115200 root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait
[    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Memory: 186828K/262144K available (4985K kernel code, 179K rwdata, 1664K rodata, 188K init, 159K bss, 9780K reserved, 65536K cma-reserved)
[    0.000000] Virtual kernel memory layout:
                   vector  : 0xffff0000 - 0xffff1000   (   4 kB)
                   fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
                   vmalloc : 0xd0800000 - 0xff000000   ( 744 MB)
                   lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
                   modules : 0xbf000000 - 0xc0000000   (  16 MB)
                     .text : 0xc0008000 - 0xc0686928   (6651 kB)
                     .init : 0xc0687000 - 0xc06b6000   ( 188 kB)
                     .data : 0xc06b6000 - 0xc06e2ed8   ( 180 kB)
                      .bss : 0xc06e2ed8 - 0xc070ad3c   ( 160 kB)
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] clocksource pit: mask: 0xfffffff max_cycles: 0xfffffff, max_idle_ns: 14479245754 ns
[    0.000000] sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 21474836475000000ns
[    0.000000] Console: colour dummy device 80x30
[    0.050000] Calibrating delay loop... 351.43 BogoMIPS (lpj=1757184)
[    0.060000] pid_max: default: 32768 minimum: 301
[    0.060000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.060000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.060000] CPU: Testing write buffer coherency: ok
[    0.060000] Setting up static identity map for 0x20008200 - 0x20008258
[    0.060000] devtmpfs: initialized
[    0.070000] VFP support v0.3: implementor 41 architecture 2 part 30 variant 5 rev 1
[    0.070000] clocksource jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.080000] pinctrl core: initialized pinctrl subsystem
[    0.080000] NET: Registered protocol family 16
[    0.110000] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.110000] cpuidle: using governor ladder
[    0.110000] cpuidle: using governor menu
[    0.110000] AT91: Detected SoC family: sama5d3
[    0.110000] AT91: Detected SoC: sama5d36, revision 2
[    0.130000] gpio-at91 fffff200.gpio: at address d0818200
[    0.130000] gpio-at91 fffff400.gpio: at address d081a400
[    0.130000] gpio-at91 fffff600.gpio: at address d081c600
[    0.130000] gpio-at91 fffff800.gpio: at address d081e800
[    0.130000] gpio-at91 fffffa00.gpio: at address d0820a00
[    0.140000] pinctrl-at91 ahb:apb:pinctrl@fffff200: initialized AT91 pinctrl driver
[    0.140000] tcb_clksrc: tc0 at 16.000 MHz
[    0.140000] clocksource tcb_clksrc: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 115833966437 ns
[    1.380000] at_hdmac ffffe600.dma-controller: Atmel AHB DMA Controller ( cpy set slave sg-cpy ), 8 channels
[    1.380000] at_hdmac ffffe800.dma-controller: Atmel AHB DMA Controller ( cpy set slave sg-cpy ), 8 channels
[    1.390000] SCSI subsystem initialized
[    1.390000] usbcore: registered new interface driver usbfs
[    1.390000] usbcore: registered new interface driver hub
[    1.390000] usbcore: registered new device driver usb
[    1.400000] at91_i2c f0014000.i2c: using dma0chan0 (tx) and dma0chan1 (rx) for DMA transfers
[    1.400000] at91_i2c f0014000.i2c: AT91 i2c bus driver (hw version: 0x402).
[    1.400000] at91_i2c f0018000.i2c: using dma0chan2 (tx) and dma0chan3 (rx) for DMA transfers
[    1.400000] at91_i2c f0018000.i2c: AT91 i2c bus driver (hw version: 0x402).
[    1.400000] at91_i2c f801c000.i2c: can't use DMA, error -19
[    1.400000] at91_i2c f801c000.i2c: AT91 i2c bus driver (hw version: 0x402).
[    1.400000] media: Linux media interface: v0.10
[    1.400000] Linux video capture interface: v2.00
[    1.400000] Advanced Linux Sound Architecture Driver Initialized.
[    1.410000] Switched to clocksource tcb_clksrc
[    1.450000] NET: Registered protocol family 2
[    1.450000] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
[    1.450000] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[    1.450000] TCP: Hash tables configured (established 2048 bind 2048)
[    1.450000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    1.450000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    1.450000] NET: Registered protocol family 1
[    1.450000] RPC: Registered named UNIX socket transport module.
[    1.450000] RPC: Registered udp transport module.
[    1.450000] RPC: Registered tcp transport module.
[    1.450000] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    1.460000] futex hash table entries: 256 (order: -1, 3072 bytes)
[    1.470000] io scheduler noop registered (default)
[    1.480000] f001c000.serial: ttyS1 at MMIO 0xf001c000 (irq = 30, base_baud = 4125000) is a ATMEL_SERIAL
[    1.480000] f0020000.serial: ttyS2 at MMIO 0xf0020000 (irq = 31, base_baud = 4125000) is a ATMEL_SERIAL
[    1.480000] f0024000.serial: ttyS5 at MMIO 0xf0024000 (irq = 32, base_baud = 4125000) is a ATMEL_SERIAL
[    1.480000] ffffee00.serial: ttyS0 at MMIO 0xffffee00 (irq = 43, base_baud = 8250000) is a ATMEL_SERIAL
[    1.860000] console [ttyS0] enabled
[    1.870000] [drm] Initialized drm 1.1.0 20060810
[    1.880000] brd: module loaded
[    1.900000] loop: module loaded
[    1.900000] atmel_nand_nfc 70000000.nfc: NFC is probed.
[    1.910000] atmel_nand 60000000.nand: Use On Flash BBT
[    1.910000] atmel_nand 60000000.nand: Using dma0chan4 for DMA transfers.
[    1.920000] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xda
[    1.920000] nand: Micron MT29F2G08ABAEAWP
[    1.930000] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    1.930000] atmel_nand 60000000.nand: minimum ECC: 4 bits in 512 bytes
[    1.940000] atmel_nand 60000000.nand: Initialize PMECC params, cap: 4, sector: 512
[    1.950000] atmel_nand 60000000.nand: Using NFC Sram read
[    1.950000] Bad block table found at page 131008, version 0x01
[    1.950000] Bad block table found at page 130944, version 0x01
[    1.960000] 6 ofpart partitions found on MTD device atmel_nand
[    1.960000] Creating 6 MTD partitions on "atmel_nand":
[    1.970000] 0x000000000000-0x000000040000 : "at91bootstrap"
[    1.970000] 0x000000040000-0x0000000c0000 : "bootloader"
[    1.980000] 0x0000000c0000-0x000000180000 : "bootloader env"
[    1.990000] 0x000000180000-0x000000200000 : "device tree"
[    2.000000] 0x000000200000-0x000000800000 : "kernel"
[    2.000000] 0x000000800000-0x000010000000 : "rootfs"
[    2.010000] atmel_spi f0004000.spi: version: 0x213
[    2.010000] atmel_spi f0004000.spi: Using dma0chan5 (tx) and dma0chan6 (rx) for DMA transfers
[    2.020000] atmel_spi f0004000.spi: Atmel SPI Controller at 0xf0004000 (irq 26)
[    2.030000] atmel_spi f8008000.spi: version: 0x213
[    2.030000] atmel_spi f8008000.spi: Using dma1chan0 (tx) and dma1chan1 (rx) for DMA transfers
[    2.040000] atmel_spi f8008000.spi: Atmel SPI Controller at 0xf8008000 (irq 35)
[    2.050000] CAN device driver interface
[    2.050000] at91_can f000c000.can: device registered (reg_base=d0896000, irq=49)
[    2.060000] macb f0028000.ethernet: invalid hw address, using random
[    2.070000] libphy: MACB_mii_bus: probed
[    2.150000] macb f0028000.ethernet eth0: Cadence GEM rev 0x00020119 at 0xf0028000 irq 50 (6e:f9:4a:bc:13:fd)
[    2.150000] macb f0028000.ethernet eth0: attached PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=f0028000.etherne:07, irq=-1)
[    2.170000] macb f802c000.ethernet: invalid hw address, using random
[    2.170000] libphy: MACB_mii_bus: probed
[    2.260000] macb f802c000.ethernet eth1: Cadence MACB rev 0x0001010c at 0xf802c000 irq 51 (82:5a:02:a9:18:ae)
[    2.260000] macb f802c000.ethernet eth1: attached PHY driver [Micrel KSZ8081 or KSZ8091] (mii_bus:phy_addr=f802c000.etherne:01, irq=-1)
[    2.270000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    2.280000] ehci-atmel: EHCI Atmel driver
[    2.290000] atmel-ehci 700000.ehci: EHCI Host Controller
[    2.290000] atmel-ehci 700000.ehci: new USB bus registered, assigned bus number 1
[    2.300000] atmel-ehci 700000.ehci: irq 54, io mem 0x00700000
[    2.320000] atmel-ehci 700000.ehci: USB 2.0 started, EHCI 1.00
[    2.320000] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    2.330000] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.330000] usb usb1: Product: EHCI Host Controller
[    2.330000] usb usb1: Manufacturer: Linux 4.1.0-linux4sam_5.3 ehci_hcd
[    2.340000] usb usb1: SerialNumber: 700000.ehci
[    2.340000] hub 1-0:1.0: USB hub found
[    2.350000] hub 1-0:1.0: 3 ports detected
[    2.350000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    2.360000] ohci-atmel: OHCI Atmel driver
[    2.360000] at91_ohci 600000.ohci: USB Host Controller
[    2.360000] at91_ohci 600000.ohci: new USB bus registered, assigned bus number 2
[    2.370000] at91_ohci 600000.ohci: irq 54, io mem 0x00600000
[    2.430000] usb usb2: New USB device found, idVendor=1d6b, idProduct=0001
[    2.430000] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.440000] usb usb2: Product: USB Host Controller
[    2.440000] usb usb2: Manufacturer: Linux 4.1.0-linux4sam_5.3 ohci_hcd
[    2.450000] usb usb2: SerialNumber: at91
[    2.450000] hub 2-0:1.0: USB hub found
[    2.460000] hub 2-0:1.0: 3 ports detected
[    2.460000] usbcore: registered new interface driver cdc_acm
[    2.470000] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[    2.470000] usbcore: registered new interface driver usb-storage
[    2.480000] usbcore: registered new interface driver usbserial
[    2.480000] usbcore: registered new interface driver usbserial_generic
[    2.490000] usbserial: USB Serial support registered for generic
[    2.490000] usbcore: registered new interface driver ftdi_sio
[    2.500000] usbserial: USB Serial support registered for FTDI USB Serial Device
[    2.500000] usbcore: registered new interface driver pl2303
[    2.510000] usbserial: USB Serial support registered for pl2303
[    2.510000] rtc rtc0: alarm rollover not handled
[    2.520000] rtc rtc0: invalid alarm value: 1900-1-1 0:0:0
[    2.520000] at91_rtc fffffeb0.rtc: rtc core: registered fffffeb0.rtc as rtc0
[    2.530000] at91_rtc fffffeb0.rtc: AT91 Real Time Clock driver.
[    2.530000] i2c /dev entries driver
[    2.540000] AT91: Starting after wakeup
[    2.540000] sdhci: Secure Digital Host Controller Interface driver
[    2.550000] sdhci: Copyright(c) Pierre Ossman
[    2.550000] atmel_mci f0000000.mmc: version: 0x505
[    2.560000] atmel_mci f0000000.mmc: using dma0chan7 for DMA transfers
[    2.600000] atmel_mci f0000000.mmc: Atmel MCI controller at 0xf0000000 irq 25, 1 slots
[    2.600000] atmel_mci f8000000.mmc: version: 0x505
[    2.610000] atmel_mci f8000000.mmc: using dma1chan2 for DMA transfers
[    2.640000] mmc0: host does not support reading read-only switch, assuming write-enable
[    2.650000] atmel_mci f8000000.mmc: Atmel MCI controller at 0xf8000000 irq 34, 1 slots
[    2.660000] sdhci-pltfm: SDHCI platform and OF driver helper
[    2.660000] ledtrig-cpu: registered to indicate activity on CPUs
[    2.670000] atmel_aes f8038000.aes: version: 0x135
[    2.670000] mmc0: new high speed SDHC card at address 59b4
[    2.680000] mmcblk0: mmc0:59b4 USD   14.7 GiB
[    2.680000]  mmcblk0: p1 p2
[    2.690000] atmel_aes f8038000.aes: Atmel AES - Using dma1chan3, dma1chan4 for DMA transfers
[    2.700000] atmel_sha f8034000.sha: version: 0x410
[    2.700000] atmel_sha f8034000.sha: using dma1chan5 for DMA transfers
[    2.710000] atmel_sha f8034000.sha: Atmel SHA1/SHA256/SHA224/SHA384/SHA512
[    2.710000] atmel_tdes f803c000.tdes: version: 0x701
[    2.720000] atmel_tdes f803c000.tdes: using dma1chan6, dma1chan7 for DMA transfers
[    2.730000] atmel_tdes f803c000.tdes: Atmel DES/TDES
[    2.730000] usbcore: registered new interface driver usbhid
[    2.740000] usbhid: USB HID core driver
[    2.740000] iio iio:device0: Resolution used: 12 bits
[    2.740000] iio iio:device0: ADC Touch screen is disabled.
[    2.760000] NET: Registered protocol family 17
[    2.760000] can: controller area network core (rev 20120528 abi 9)
[    2.760000] NET: Registered protocol family 29
[    2.770000] can: raw protocol (rev 20120528)
[    2.770000] can: broadcast manager protocol (rev 20120528 t)
[    2.770000] can: netlink gateway (rev 20130117) max_hops=1
[    2.790000] input: gpio_keys as /devices/soc0/gpio_keys/input/input0
[    2.790000] at91_rtc fffffeb0.rtc: setting system clock to 2007-01-01 00:00:06 UTC (1167609606)
[    2.810000] ALSA device list:
[    2.810000]   No soundcards found.
[    3.080000] EXT4-fs (mmcblk0p2): recovery complete
[    3.090000] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    3.100000] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    3.100000] devtmpfs: mounted
[    3.110000] Freeing unused kernel memory: 188K (c0687000 - c06b6000)
[    4.090000] udevd[674]: starting version 182
[    4.400000] atmel_usba_udc 500000.gadget: MMIO registers at 0xf8030000 mapped at d0950000
[    4.400000] atmel_usba_udc 500000.gadget: FIFO at 0x00500000 mapped at d2200000
[    5.820000] g_serial gadget: Gadget Serial v2.4
[    5.820000] g_serial gadget: g_serial ready
[    5.920000] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[    6.180000] random: dd urandom read with 78 bits of entropy available
[    6.280000] g_serial gadget: high-speed config #2: CDC ACM config
[   19.010000] random: nonblocking pool is initialized
Thanks!
Don
donws
Posts: 3
Joined: Thu Jul 21, 2016 9:20 pm

Re: I2C broken in demo images?

Fri Jul 22, 2016 10:14 pm

Progress update:

This doesn't appear to be a general issue with the I2C bus, more so specifically a problem of the PMIC not being accessible via I2C.

I found one of these Raspberry Pi RTC modules (http://www.cjemicros.co.uk/micros/products/rpirtc.shtml) in my junk box and wired it up to SDA/SCL on J18. The device is detected and is accessible.

Code: Select all

root@sama5d3-xplained-sd:/sys/class/i2c-dev# uname -a
Linux sama5d3-xplained-sd 4.1.0-linux4sam_5.3 #1 Sat Apr 16 11:28:00 CEST 2016 armv7l GNU/Linux

root@sama5d3-xplained-sd:/sys/class/i2c-dev# i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
root@sama5d3-xplained-sd:/sys/class/i2c-dev# i2cget -y 1 0x68
0x04
I need to be able to access the PMIC to setup VDDANA in order to be able to read the ADC's.

Is anyone else seeing this issue?

Thanks,
Don
blue_z
Location: USA
Posts: 1507
Joined: Thu Apr 19, 2007 10:15 pm

Re: I2C broken in demo images?

Sat Jul 23, 2016 12:53 am

don.schoppe@connecteddev.com wrote:However, when I load the linux4sam_5.3 demo image from (linux4sam/bin/view/Linux4SAM/Sama5d3Xpl ... o_archives) I2C appears broken. I also tried the older 5.2 image still available on the ftp site (ftp://www.at91.com/pub/demo/linux4sam_5 ... .2.img.bz2), as well as building/flashing 5.3 myself. Is this a known issue and/or has anyone patched it since?
The Device Tree node for the act8865 is disabled in the at91-sama5d3_xplained.dts file of recent Linux4SAM kernels.


I don't have a SAMA5D3 Xplained, but on a SAMA5D4-XULT the I2C stuff seems to be similar for the original Linux 3.10 version and the Linux4SAM 5.3 version.
There is no DT node for the act8865 driver at all, although the board does have an ACT8865 chip.
In both the boot log has

Code: Select all

at91_i2c f8014000.i2c: using dma0chan0 (tx) and dma0chan1 (rx) for DMA transfers
at91_i2c f8014000.i2c: AT91 i2c bus driver (hw version: 0x502).                 
Only bus 0 is used, and both display:

Code: Select all

root@sama5d4-xplained:~# i2cdetect -y 0                                         
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f                             
00:          -- -- -- -- -- -- -- -- -- -- -- -- --                             
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                             
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                             
30: -- -- -- -- 34 -- -- -- -- UU -- -- -- -- -- --                             
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                             
50: -- -- -- -- 54 -- -- -- -- -- -- -- 5c -- -- --                             
60: 60 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                             
70: -- -- -- -- -- -- -- --                                                     
root@sama5d4-xplained:~# 
Regards
donws
Posts: 3
Joined: Thu Jul 21, 2016 9:20 pm

Re: I2C broken in demo images?

Mon Jul 25, 2016 11:46 pm

Blue_z,

Thanks, you're right. Here's the commit disabling it in DT:

https://github.com/linux4sam/linux-at91 ... 33fec6b140

It appears the change was made to address an ACT8865 I2C errata. This note is from the SAMA5D3-Xplained user's guide:

Code: Select all

There is a known error on the ACT8865 I²C implementation. The port must be shut
off after configuration or problems may occur with devices using the same I²C 
channel, e.g., TM43xx LCD display.
Refer to the ACT8865 datasheet at http://www.active-semi.com/ for more details.
So at91bootstrap should configure the ACT8865, e.g., enabling the regulator for VDDANA, before commanding it to disable its I2C I/F.

Thanks,
Don
nferre
Site Admin
Posts: 156
Joined: Wed Feb 14, 2007 11:17 am

Re: I2C broken in demo images?

Tue Oct 04, 2016 12:18 pm

Hi

donws: you found exactly the reason for this and yes, you must enable VDDANA before closing the i2c interface of the PMIC. I do think that we do this in recent AT91Bootstrap revisions.

Best regards,

Return to “SAMA5 Xplained”

Who is online

Users browsing this forum: No registered users and 1 guest