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.

AM625SIP: I2C gets set up but does not output anything

Part Number: AM625SIP
Other Parts Discussed in Thread: TCA8418, SK-AM62-SIP

Tool/software:

Dear TI

I would like to use the I2C2 bus, but I can't measure anything on the pins.

I added this to the devicetree file:

&main_i2c2 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&main_i2c2_pins_default>;
	clock-frequency = <100000>;

	keypad@34 {
		compatible = "ti,tca8418";
		reg = <0x34>;
		interrupt-parent = <&main_gpio1>;
		interrupts = <16 IRQ_TYPE_EDGE_FALLING>;
		linux,keymap = <0x0000000a
		                0x0100000b
		                0x0200000c
		                0x0300000d>;
		keypad,num-rows = <4>;
		keypad,num-columns = <1>;
		status = "okay";
	};
};

where I define the pins as

	main_i2c2_pins_default: main-i2c2-pins-default {
		pinctrl-single,pins = <
			AM62X_IOPAD(0x0b0, PIN_INPUT_PULLUP, 1) /* (K22) I2C2_SCL */
			AM62X_IOPAD(0x0b4, PIN_INPUT_PULLUP, 1) /* (K24) I2C2_SDA */
			AM62X_IOPAD(0x1b8, PIN_INPUT_PULLUP, 7) /* (C13) GPIO1_16 */
		>;
	};

in the node main_pmx0. I am using kernel 6.1.69.

The device file /dev/i2c-2 is created and the devicetree seems to be parsed correctly according to /proc/device-tree. The probe function of the TCA8418 is also called.

However I don't see anything happening on the I2C bus, even when I use I2C-Tools to write something (on I2C0 and I2C1 it works). I am using the SK-AM62-SIP evaluation module, my analyzer is connected to pins 3, 5 and 6 (GND) on the 40 pin connector.

What could I be doing wrong?

Kind regards

Leon Rigoni

  • Hi Leon,

    Our domain expert is currently out-of-office, please expect some delay in response time.

    Regards,

    Nitika

  • Hello Leon,

    Your pinmuxing for I2C looks appropriate to me. The I2C2 pinmuxing is identical to what we see in k3-am62x-sk-common.dtsi.

    To verify, you are NOT using the 40 pin automation header, right? But the 40 pin user expansion connector?

    Could you please attach your terminal output on boot so we can see what the I2C driver is doing on initialization?

    What do you see from the terminal when you do i2cdetect -y -r <bus_number>? I suspect that bus_number is NOT fixed, i.e., your hardware I2C0 instance may not align with your /dev/i2c-0 instance.

    Regards,

    Nick

  • Hello Nick,

    Yes, I am using the 40 pin user expansion connector.

    Please find the additional info in the attachments.

    Kind regards,

    Leon

    root@phyboard-lyra-am62xx-3:dev# i2cdetect -y -r 0
         0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
    00:                         -- -- -- -- -- -- -- --
    10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    30: -- -- -- -- -- -- -- -- 38 -- -- -- -- -- -- UU
    40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    50: -- 51 -- -- -- -- -- -- -- -- -- -- -- -- -- --
    60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    70: -- -- -- -- -- -- -- --
    root@phyboard-lyra-am62xx-3:dev# i2cdetect -y -r 1
         0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
    00:                         -- -- -- -- -- -- -- --
    10: -- -- -- -- -- -- -- -- -- -- -- 1b -- -- -- --
    20: -- -- UU -- -- -- -- -- -- -- -- -- -- -- -- --
    30: -- -- -- -- -- -- -- -- -- -- -- 3b -- -- -- 3f
    40: 40 -- -- -- -- 45 -- 47 48 -- -- -- 4c 4d -- --
    50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    60: -- -- 62 -- -- -- -- -- -- -- -- -- -- -- -- --
    70: -- -- -- -- -- -- -- --
    root@phyboard-lyra-am62xx-3:dev# i2cdetect -y -r 2
         0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
    00:                         -- -- -- -- -- -- -- --
    10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    70: -- 71 -- -- -- -- -- --
    [    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
    [    0.000000] Linux version 6.1.69-rt21-1.0 (oe-user@oe-host) (aarch64-nse-linux-gcc (GCC) 11.4.0, GNU ld (GNU Binutils) 2.38.20220708) #1 SMP PREEMPT_RT Fri Nov 29 09:25:17 UTC 2024
    [    0.000000] Machine model: Texas Instruments AM625 SK
    [    0.000000] earlycon: ns16550a0 at MMIO32 0x0000000002800000 (options '')
    [    0.000000] printk: bootconsole [ns16550a0] enabled
    [    0.000000] efi: UEFI not found.
    [    0.000000] Reserved memory: created CMA memory pool at 0x0000000094600000, size 128 MiB
    [    0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created DMA memory pool at 0x000000009c800000, size 3 MiB
    [    0.000000] OF: reserved mem: initialized node ipc-memories@9c800000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created DMA memory pool at 0x000000009cb00000, size 1 MiB
    [    0.000000] OF: reserved mem: initialized node m4f-dma-memory@9cb00000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created DMA memory pool at 0x000000009cc00000, size 14 MiB
    [    0.000000] OF: reserved mem: initialized node m4f-memory@9cc00000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created DMA memory pool at 0x000000009da00000, size 1 MiB
    [    0.000000] OF: reserved mem: initialized node r5f-dma-memory@9da00000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created DMA memory pool at 0x000000009db00000, size 12 MiB
    [    0.000000] OF: reserved mem: initialized node r5f-memory@9db00000, compatible id shared-dma-pool
    [    0.000000] Zone ranges:
    [    0.000000]   DMA      [mem 0x0000000080000000-0x000000009fffffff]
    [    0.000000]   DMA32    empty
    [    0.000000]   Normal   empty
    [    0.000000] Movable zone start for each node
    [    0.000000] Early memory node ranges
    [    0.000000]   node   0: [mem 0x0000000080000000-0x000000009c7fffff]
    [    0.000000]   node   0: [mem 0x000000009c800000-0x000000009e6fffff]
    [    0.000000]   node   0: [mem 0x000000009e700000-0x000000009e77ffff]
    [    0.000000]   node   0: [mem 0x000000009e780000-0x000000009fffffff]
    [    0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x000000009fffffff]
    [    0.000000] psci: probing for conduit method from DT.
    [    0.000000] psci: PSCIv1.1 detected in firmware.
    [    0.000000] psci: Using standard PSCI v0.2 function IDs
    [    0.000000] psci: Trusted OS migration not required
    [    0.000000] psci: SMC Calling Convention v1.4
    [    0.000000] percpu: Embedded 18 pages/cpu s36352 r8192 d29184 u73728
    [    0.000000] pcpu-alloc: s36352 r8192 d29184 u73728 alloc=18*4096
    [    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
    [    0.000000] Detected VIPT I-cache on CPU0
    [    0.000000] CPU features: detected: GIC system register CPU interface
    [    0.000000] CPU features: kernel page table isolation disabled by kernel configuration
    [    0.000000] CPU features: detected: ARM erratum 845719
    [    0.000000] alternatives: applying boot alternatives
    [    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 129024
    [    0.000000] Kernel command line: console=ttyS2,115200n8 rauc.slot=system0 earlycon=ns16550a,mmio32,0x02800000 root=/dev/mmcblk0p5 rw rootfstype=ext4 rootwait
    [    0.000000] Dentry cache hash table entries: 65536 (order: 7, 524288 bytes, linear)
    [    0.000000] Inode-cache hash table entries: 32768 (order: 6, 262144 bytes, linear)
    [    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
    [    0.000000] Memory: 307740K/524288K available (11584K kernel code, 1332K rwdata, 2604K rodata, 1856K init, 453K bss, 85476K reserved, 131072K cma-reserved)
    [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
    [    0.000000] rcu: Preemptible hierarchical RCU implementation.
    [    0.000000] rcu: 	RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=4.
    [    0.000000] rcu: 	RCU_SOFTIRQ processing moved to rcuc kthreads.
    [    0.000000] 	No expedited grace period (rcu_normal_after_boot).
    [    0.000000] 	Trampoline variant of Tasks RCU enabled.
    [    0.000000] 	Tracing variant of Tasks RCU enabled.
    [    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 100 jiffies.
    [    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
    [    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
    [    0.000000] GICv3: GIC: Using split EOI/Deactivate mode
    [    0.000000] GICv3: 256 SPIs implemented
    [    0.000000] GICv3: 0 Extended SPIs implemented
    [    0.000000] Root IRQ handler: 0xffff8000084ed340
    [    0.000000] GICv3: GICv3 features: 16 PPIs
    [    0.000000] GICv3: CPU0: found redistributor 0 region 0:0x0000000001880000
    [    0.000000] ITS [mem 0x01820000-0x0182ffff]
    [    0.000000] GIC: enabling workaround for ITS: Socionext Synquacer pre-ITS
    [    0.000000] ITS@0x0000000001820000: Devices Table too large, reduce ids 20->19
    [    0.000000] ITS@0x0000000001820000: allocated 524288 Devices @80800000 (flat, esz 8, psz 64K, shr 0)
    [    0.000000] ITS: using cache flushing for cmd queue
    [    0.000000] GICv3: using LPI property table @0x0000000080040000
    [    0.000000] GIC: using cache flushing for LPI property table
    [    0.000000] GICv3: CPU0: using allocated LPI pending table @0x0000000080050000
    [    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
    [    0.000000] arch_timer: cp15 timer(s) running at 200.00MHz (phys).
    [    0.000000] clocksource: arch_sys_counter: mask: 0x3ffffffffffffff max_cycles: 0x2e2049d3e8, max_idle_ns: 440795210634 ns
    [    0.000001] sched_clock: 58 bits at 200MHz, resolution 5ns, wraps every 4398046511102ns
    [    0.000313] Console: colour dummy device 80x25
    [    0.465946] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=200000)
    [    0.465956] pid_max: default: 32768 minimum: 301
    [    0.466035] LSM: Security Framework initializing
    [    0.466155] Mount-cache hash table entries: 1024 (order: 1, 8192 bytes, linear)
    [    0.466166] Mountpoint-cache hash table entries: 1024 (order: 1, 8192 bytes, linear)
    [    0.468173] cblist_init_generic: Setting adjustable number of callback queues.
    [    0.511040] cblist_init_generic: Setting shift to 2 and lim to 1.
    [    0.517343] cblist_init_generic: Setting adjustable number of callback queues.
    [    0.524731] cblist_init_generic: Setting shift to 2 and lim to 1.
    [    0.531301] rcu: Hierarchical SRCU implementation.
    [    0.531305] rcu: 	Max phase no-delay instances is 400.
    [    0.531377] printk: bootconsole [ns16550a0] printing thread started
    [    0.548276] Platform MSI: msi-controller@1820000 domain created
    [    0.548546] PCI/MSI: /bus@f0000/interrupt-controller@1800000/msi-controller@1820000 domain created
    [    0.548632] EFI services will not be available.
    [    0.549012] smp: Bringing up secondary CPUs ...
    [    0.574418] Detected VIPT I-cache on CPU1
    [    0.574530] GICv3: CPU1: found redistributor 1 region 0:0x00000000018a0000
    [    0.574548] GICv3: CPU1: using allocated LPI pending table @0x0000000080060000
    [    0.574604] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
    [    0.600810] Detected VIPT I-cache on CPU2
    [    0.600902] GICv3: CPU2: found redistributor 2 region 0:0x00000000018c0000
    [    0.600917] GICv3: CPU2: using allocated LPI pending table @0x0000000080070000
    [    0.600958] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
    [    0.627125] Detected VIPT I-cache on CPU3
    [    0.627220] GICv3: CPU3: found redistributor 3 region 0:0x00000000018e0000
    [    0.627235] GICv3: CPU3: using allocated LPI pending table @0x0000000080080000
    [    0.627274] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
    [    0.627358] smp: Brought up 1 node, 4 CPUs
    [    0.627364] SMP: Total of 4 processors activated.
    [    0.661582] CPU features: detected: 32-bit EL0 Support
    [    0.661586] CPU features: detected: CRC32 instructions
    [    0.661644] CPU: All CPU(s) started at EL2
    [    0.661647] alternatives: applying system-wide alternatives
    [    0.666340] devtmpfs: initialized
    [    0.677373] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275000 ns
    [    0.677398] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
    [    0.682217] pinctrl core: initialized pinctrl subsystem
    [    0.682890] DMI not present or invalid.
    [    0.683598] NET: Registered PF_NETLINK/PF_ROUTE protocol family
    [    0.718356] DMA: preallocated 128 KiB GFP_KERNEL pool for atomic allocations
    [    0.718639] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
    [    0.718794] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
    [    0.719519] thermal_sys: Registered thermal governor 'step_wise'
    [    0.719790] ASID allocator initialised with 65536 entries
    [    0.732016] platform a40000.pinctrl: Fixed dependency cycle(s) with /bus@f0000/pinctrl@a40000/cpsw-cpts
    [    0.736080] KASLR disabled due to lack of seed
    [    0.745764] HugeTLB: registered 1.00 GiB page size, pre-allocated 0 pages
    [    0.745774] HugeTLB: 0 KiB vmemmap can be freed for a 1.00 GiB page
    [    0.745779] HugeTLB: registered 32.0 MiB page size, pre-allocated 0 pages
    [    0.745782] HugeTLB: 0 KiB vmemmap can be freed for a 32.0 MiB page
    [    0.745786] HugeTLB: registered 2.00 MiB page size, pre-allocated 0 pages
    [    0.745789] HugeTLB: 0 KiB vmemmap can be freed for a 2.00 MiB page
    [    0.745793] HugeTLB: registered 64.0 KiB page size, pre-allocated 0 pages
    [    0.745797] HugeTLB: 0 KiB vmemmap can be freed for a 64.0 KiB page
    [    0.747211] Leon: Inside fbmem_init()
    [    0.747756] k3-chipinfo 43000014.chipid: Family:AM62X rev:SR1.0 JTAGID[0x0bb7e02f] Detected
    [    0.750093] iommu: Default domain type: Translated 
    [    0.750102] iommu: DMA domain TLB invalidation policy: strict mode 
    [    0.750480] SCSI subsystem initialized
    [    0.750755] usbcore: registered new interface driver usbfs
    [    0.750800] usbcore: registered new interface driver hub
    [    0.750834] usbcore: registered new device driver usb
    [    0.751177] mc: Linux media interface: v0.10
    [    0.751224] videodev: Linux video capture interface: v2.00
    [    0.751271] pps_core: LinuxPPS API ver. 1 registered
    [    0.751275] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [    0.751291] PTP clock support registered
    [    0.751328] EDAC MC: Ver: 3.0.0
    [    0.752129] omap-mailbox 29000000.mailbox: omap mailbox rev 0x66fc9100
    [    0.752698] FPGA manager framework
    [    0.754117] clocksource: Switched to clocksource arch_sys_counter
    [    0.754396] VFS: Disk quotas dquot_6.6.0
    [    0.754440] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
    [    0.761458] NET: Registered PF_INET protocol family
    [    0.761635] IP idents hash table entries: 8192 (order: 4, 65536 bytes, linear)
    [    0.762691] tcp_listen_portaddr_hash hash table entries: 256 (order: 1, 10240 bytes, linear)
    [    0.762719] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
    [    0.762743] TCP established hash table entries: 4096 (order: 3, 32768 bytes, linear)
    [    0.762806] TCP bind hash table entries: 4096 (order: 6, 327680 bytes, linear)
    [    0.763194] TCP: Hash tables configured (established 4096 bind 4096)
    [    0.763389] UDP hash table entries: 256 (order: 2, 24576 bytes, linear)
    [    0.763436] UDP-Lite hash table entries: 256 (order: 2, 24576 bytes, linear)
    [    0.763692] NET: Registered PF_UNIX/PF_LOCAL protocol family
    [    0.764291] RPC: Registered named UNIX socket transport module.
    [    0.764298] RPC: Registered udp transport module.
    [    0.764302] RPC: Registered tcp transport module.
    [    0.764304] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    0.764313] NET: Registered PF_XDP protocol family
    [    0.764331] PCI: CLS 0 bytes, default 64
    [    0.782391] Initialise system trusted keyrings
    [    0.782627] workingset: timestamp_bits=46 max_order=17 bucket_order=0
    [    0.789355] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [    0.790009] NFS: Registering the id_resolver key type
    [    0.790049] Key type id_resolver registered
    [    0.790053] Key type id_legacy registered
    [    0.790166] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
    [    0.790181] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
    [    0.790466] 9p: Installing v9fs 9p2000 file system support
    [    0.827703] Key type asymmetric registered
    [    0.827710] Asymmetric key parser 'x509' registered
    [    0.827776] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 244)
    [    0.827984] io scheduler mq-deadline registered
    [    0.827989] io scheduler kyber registered
    [    0.846825] pinctrl-single 4084000.pinctrl: 34 pins, size 136
    [    0.847622] pinctrl-single f4000.pinctrl: 171 pins, size 684
    [    0.849892] pinctrl-single a40000.pinctrl: 512 pins, size 2048
    [    0.859738] Serial: 8250/16550 driver, 10 ports, IRQ sharing enabled
    [    0.892324] brd: module loaded
    [    0.899017] loop: module loaded
    [    0.923696] megasas: 07.719.03.00-rc1
    [    0.928474] tun: Universal TUN/TAP device driver, 1.6
    [    0.929246] igbvf: Intel(R) Gigabit Virtual Function Network Driver
    [    0.929252] igbvf: Copyright (c) 2009 - 2012 Intel Corporation.
    [    0.929315] sky2: driver version 1.30
    [    0.930153] VFIO - User Level meta-driver version: 0.3
    [    0.931324] i2c_dev: i2c /dev entries driver
    [    0.932838] device-mapper: ioctl: 4.47.0-ioctl (2022-07-28) initialised: dm-devel@redhat.com
    [    0.933521] sdhci: Secure Digital Host Controller Interface driver
    [    0.933526] sdhci: Copyright(c) Pierre Ossman
    [    0.934098] sdhci-pltfm: SDHCI platform and OF driver helper
    [    0.935714] SMCCC: SOC_ID: ARCH_SOC_ID not implemented, skipping ....
    [    0.936074] SPI driver fb_st7789v has no spi_device_id for sitronix,st7789v
    [    0.937639] optee: probing for conduit method.
    [    0.937676] optee: revision 4.1 (18b424c2)
    [    0.938004] optee: dynamic shared memory is enabled
    [    0.938531] optee: initialized driver
    [    0.939565] IPVS: Registered protocols (TCP, UDP)
    [    0.939614] IPVS: Connection hash table configured (size=4096, memory=32Kbytes)
    [    0.939832] IPVS: ipvs loaded.
    [    0.940018] NET: Registered PF_PACKET protocol family
    [    0.940172] 9pnet: Installing 9P2000 support
    [    0.940251] Key type dns_resolver registered
    [    0.940920] registered taskstats version 1
    [    0.940956] Loading compiled-in X.509 certificates
    [    0.952523] ti-sci 44043000.system-controller: ABI: 3.1 (firmware rev 0x0009 '9.2.1--v09.02.01 (Kool Koala)')
    [    1.005024] ti-sci-clk 44043000.system-controller:clock-controller: recalc-rate failed for dev=81, clk=20, ret=-19
    [    1.029339] omap_i2c 20000000.i2c: bus 0 rev0.12 at 100 kHz
    [    1.030808] omap_i2c 20010000.i2c: bus 1 rev0.12 at 100 kHz
    [    1.032379] omap_i2c 20020000.i2c: bus 2 rev0.12 at 100 kHz
    [    1.032766] ti-sci-intr bus@f0000:interrupt-controller@a00000: Interrupt Router 3 domain created
    [    1.033072] ti-sci-inta 48000000.interrupt-controller: Interrupt Aggregator domain 28 created
    [    1.038218] ti-udma 485c0100.dma-controller: Number of rings: 82
    [    1.040926] ti-udma 485c0100.dma-controller: Channels: 48 (bchan: 18, tchan: 12, rchan: 18)
    [    1.044247] ti-udma 485c0000.dma-controller: Number of rings: 150
    [    1.049304] ti-udma 485c0000.dma-controller: Channels: 35 (tchan: 20, rchan: 15)
    [    1.052630] printk: console [ttyS2] disabled
    [    1.056604] 2800000.serial: ttyS2 at MMIO 0x2800000 (irq = 239, base_baud = 3000000) is a 8250
    [    1.063571] printk: console [ttyS2] enabled
    [    1.063576] printk: bootconsole [ns16550a0] disabled
    [    1.063580] printk: console [ttyS2] printing thread started
    [    1.063590] printk: bootconsole [ns16550a0] printing thread stopped
    [    1.071516] davinci_mdio 8000f00.mdio: Configuring MDIO in manual mode
    [    1.105130] davinci_mdio 8000f00.mdio: davinci mdio revision 9.7, bus freq 1000000
    [    1.107891] davinci_mdio 8000f00.mdio: phy[0]: device 8000f00.mdio:00, driver TI DP83867
    [    1.107903] davinci_mdio 8000f00.mdio: phy[1]: device 8000f00.mdio:01, driver TI DP83867
    [    1.107951] am65-cpsw-nuss 8000000.ethernet: initializing am65 cpsw nuss version 0x6BA01103, cpsw version 0x6BA81103 Ports: 3 quirks:00000006
    [    1.108285] am65-cpsw-nuss 8000000.ethernet: Use random MAC address
    [    1.108298] am65-cpsw-nuss 8000000.ethernet: initialized cpsw ale version 1.5
    [    1.108304] am65-cpsw-nuss 8000000.ethernet: ALE Table size 512
    [    1.108964] pps pps0: new PPS source ptp0
    [    1.109325] am65-cpsw-nuss 8000000.ethernet: CPTS ver 0x4e8a010c, freq:500000000, add_val:1 pps:1
    [    1.130004] am65-cpsw-nuss 8000000.ethernet: set new flow-id-base 19
    [    1.235911] mmc0: CQHCI version 5.10
    [    1.243279] pca953x 1-0022: supply vcc not found, using dummy regulator
    [    1.243421] pca953x 1-0022: using AI
    [    1.258383] tca8418_keypad 2-0034: Leon: Probing keypad
    [    1.270259] tca8418_keypad 2-0034: tca8418_read_byte failed, reg: 3, error: -121
    [    1.274394] spi-nor spi0.0: s28hs512t (65536 Kbytes)
    [    1.274516] 7 fixed-partitions partitions found on MTD device fc40000.spi.0
    [    1.274527] Creating 7 MTD partitions on "fc40000.spi.0":
    [    1.274534] 0x000000000000-0x000000080000 : "ospi.tiboot3"
    [    1.276260] 0x000000080000-0x000000280000 : "ospi.tispl"
    [    1.277492] mmc0: SDHCI controller on fa10000.mmc [fa10000.mmc] using ADMA 64-bit
    [    1.277730] 0x000000280000-0x000000680000 : "ospi.u-boot"
    [    1.279234] 0x000000680000-0x0000006c0000 : "ospi.env"
    [    1.280682] 0x0000006c0000-0x000000700000 : "ospi.env.backup"
    [    1.282356] 0x000000800000-0x000003fc0000 : "ospi.rootfs"
    [    1.283731] 0x000003fc0000-0x000004000000 : "ospi.phypattern"
    [    1.291684] fb_st7789v spi1.0: fbtft_property_value: width = 240
    [    1.291700] fb_st7789v spi1.0: fbtft_property_value: height = 320
    [    1.291706] fb_st7789v spi1.0: fbtft_property_value: buswidth = 8
    [    1.291715] fb_st7789v spi1.0: fbtft_property_value: rotate = 90
    [    1.291727] fb_st7789v spi1.0: Leon: Probing framebuffer device
    [    1.359705] mmc0: Command Queue Engine enabled
    [    1.359725] mmc0: new HS200 MMC card at address 0001
    [    1.360569] mmcblk0: mmc0:0001 G1M15L 29.6 GiB 
    [    1.362879]  mmcblk0: p1 p2 p3 p4 < p5 p6 >
    [    1.364212] mmcblk0boot0: mmc0:0001 G1M15L 31.5 MiB 
    [    1.365686] mmcblk0boot1: mmc0:0001 G1M15L 31.5 MiB 
    [    1.366947] mmcblk0rpmb: mmc0:0001 G1M15L 4.00 MiB, chardev (238:0)
    [    1.896176] Console: switching to colour frame buffer device 40x30
    [    1.896567] graphics fb0: fb_st7789v frame buffer, 320x240, 150 KiB video memory, 4 KiB buffer memory, fps=20, spi1.0 at 20 MHz
    [    1.904576] debugfs: Directory 'pd:182' with parent 'pm_genpd' already present!
    [    1.904656] mmc1: CQHCI version 5.10
    [    1.907616] debugfs: Directory 'pd:186' with parent 'pm_genpd' already present!
    [    1.909064] mmc2: CQHCI version 5.10
    [    1.913750] ti-sci-clk 44043000.system-controller:clock-controller: is_prepared failed for dev=81, clk=20, ret=-19
    [    1.951427] mmc2: SDHCI controller on fa20000.mmc [fa20000.mmc] using ADMA 64-bit
    [    3.422204] sdhci-am654 fa00000.mmc: Power on failed
    [    3.452835] mmc1: SDHCI controller on fa00000.mmc [fa00000.mmc] using ADMA 64-bit
    [    3.642611] EXT4-fs (mmcblk0p5): recovery complete
    [    3.643219] EXT4-fs (mmcblk0p5): mounted filesystem with ordered data mode. Quota mode: none.
    [    3.643308] VFS: Mounted root (ext4 filesystem) on device 179:5.
    [    3.643843] devtmpfs: mounted
    [    3.645196] Freeing unused kernel memory: 1856K
    [    3.645330] Run /sbin/init as init process
    [    3.645334]   with arguments:
    [    3.645336]     /sbin/init
    [    3.645338]   with environment:
    [    3.645339]     HOME=/
    [    3.645341]     TERM=linux
    [    3.730559] systemd[1]: System time before build time, advancing clock.
    [    3.770325] NET: Registered PF_INET6 protocol family
    [    3.771839] Segment Routing with IPv6
    [    3.771878] In-situ OAM (IOAM) with IPv6
    [    3.791579] systemd[1]: systemd 250.5+ running in system mode (-PAM -AUDIT -SELINUX -APPARMOR -IMA -SMACK +SECCOMP -GCRYPT -GNUTLS -OPENSSL -ACL +BLKID -CURL -ELFUTILS -FIDO2 -IDN2 -IDN -IPTC +KMOD -LIBCRYPTSETUP +LIBFDISK -PCRE2 -PWQUALITY -P11KIT -QRENCODE -BZIP2 +LZ4 -XZ -ZLIB -ZSTD -BPF_FRAMEWORK +XKBCOMMON -UTMP -SYSVINIT default-hierarchy=hybrid)
    [    3.792234] systemd[1]: Detected architecture arm64.
    [    3.861835] systemd[1]: Hostname set to <phyboard-lyra-am62xx-3>.
    [    4.187075] systemd[1]: Queued start job for default target Multi-User System.
    [    4.365953] systemd[1]: Created slice Slice /system/getty.
    [    4.383846] systemd[1]: Created slice Slice /system/modprobe.
    [    4.401879] systemd[1]: Created slice Slice /system/serial-getty.
    [    4.419779] systemd[1]: Created slice Slice /system/syslog-ng.
    [    4.437213] systemd[1]: Created slice User and Session Slice.
    [    4.451765] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
    [    4.468622] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
    [    4.487615] systemd[1]: Reached target Path Units.
    [    4.498138] systemd[1]: Reached target Remote File Systems.
    [    4.512304] systemd[1]: Reached target Slice Units.
    [    4.522937] systemd[1]: Reached target Swaps.
    [    4.575244] systemd[1]: Listening on RPCbind Server Activation Socket.
    [    4.591490] systemd[1]: Reached target RPC Port Mapper.
    [    4.611768] systemd[1]: Journal Audit Socket was skipped because of a failed condition check (ConditionSecurity=audit).
    [    4.612917] systemd[1]: Listening on Journal Socket (/dev/log).
    [    4.638171] systemd[1]: Listening on Journal Socket.
    [    4.650071] systemd[1]: Listening on Network Service Netlink Socket.
    [    4.666258] systemd[1]: Listening on udev Control Socket.
    [    4.680907] systemd[1]: Listening on udev Kernel Socket.
    [    4.721799] systemd[1]: Mounting Huge Pages File System...
    [    4.740454] systemd[1]: Mounting POSIX Message Queue File System...
    [    4.761549] systemd[1]: Mounting Kernel Debug File System...
    [    4.773618] systemd[1]: Kernel Trace File System was skipped because of a failed condition check (ConditionPathExists=/sys/kernel/tracing).
    [    4.780588] systemd[1]: Mounting Temporary Directory /tmp...
    [    4.805355] systemd[1]: Starting Create List of Static Device Nodes...
    [    4.840079] systemd[1]: Starting Load Kernel Module configfs...
    [    4.858238] systemd[1]: Starting Load Kernel Module drm...
    [    4.875216] systemd[1]: Starting Load Kernel Module fuse...
    [    4.890462] fuse: init (API version 7.37)
    [    4.894444] systemd[1]: Starting RPC Bind...
    [    4.904170] systemd[1]: File System Check on Root Device was skipped because of a failed condition check (ConditionPathIsReadWrite=!/).
    [    4.914587] systemd[1]: Starting Journal Service...
    [    4.929621] systemd[1]: Load Kernel Modules was skipped because all trigger condition checks failed.
    [    4.936859] systemd[1]: Starting Generate network units from Kernel command line...
    [    4.962643] systemd[1]: Starting Remount Root and Kernel File Systems...
    [    4.989581] EXT4-fs (mmcblk0p5): re-mounted. Quota mode: none.
    [    5.000428] systemd[1]: Starting Apply Kernel Variables...
    [    5.019057] systemd[1]: Starting Coldplug All udev Devices...
    [    5.045405] systemd[1]: Started RPC Bind.
    [    5.055530] systemd[1]: Mounted Huge Pages File System.
    [    5.071248] systemd[1]: Mounted POSIX Message Queue File System.
    [    5.088008] systemd[1]: Started Journal Service.
    [    5.314037] systemd-journald[213]: Received client request to flush runtime journal.
    [    5.803594] random: crng init done
    [    5.952034] k3-m4-rproc 5000000.m4fss: assigned reserved memory node m4f-dma-memory@9cb00000
    [    5.960867] k3-m4-rproc 5000000.m4fss: configured M4 for remoteproc mode
    [    5.961024] k3-m4-rproc 5000000.m4fss: local reset is deasserted for device
    [    5.965625] remoteproc remoteproc0: 5000000.m4fss is available
    [    5.985194] rtc-ti-k3 2b1f0000.rtc: registered as rtc0
    [    5.985256] rtc-ti-k3 2b1f0000.rtc: setting system clock to 1970-01-01T00:00:11 UTC (11)
    [    5.987178] remoteproc remoteproc0: powering up 5000000.m4fss
    [    5.987208] remoteproc remoteproc0: Booting fw image am62-mcu-m4f0_0-fw, size 2623376
    [    5.989590] systemd-journald[213]: Time jumped backwards, rotating.
    [    6.003525] rproc-virtio rproc-virtio.1.auto: assigned reserved memory node m4f-dma-memory@9cb00000
    [    6.019939] rproc-virtio rproc-virtio.1.auto: registered virtio0 (type 7)
    [    6.019962] remoteproc remoteproc0: remote processor 5000000.m4fss is now up
    [    6.095763] virtio_rpmsg_bus virtio0: rpmsg host is online
    [    6.097457] virtio_rpmsg_bus virtio0: creating channel rpmsg_chrdev addr 0x1
    [    6.126776] pvrsrvkm: loading out-of-tree module taints kernel.
    [    6.131740] platform 78000000.r5f: R5F core may have been powered on by a different host, programmed state (0) != actual state (1)
    [    6.135288] platform 78000000.r5f: configured R5F for IPC-only mode
    [    6.135392] pvrsrvkm: Unknown symbol ___drm_dbg (err -2)
    [    6.135431] pvrsrvkm: Unknown symbol drm_open (err -2)
    [    6.135468] pvrsrvkm: Unknown symbol drm_poll (err -2)
    [    6.135471] platform 78000000.r5f: assigned reserved memory node r5f-dma-memory@9da00000
    [    6.135544] pvrsrvkm: Unknown symbol __drm_err (err -2)
    [    6.135837] pvrsrvkm: Unknown symbol drm_gem_prime_handle_to_fd (err -2)
    [    6.135856] pvrsrvkm: Unknown symbol drmm_mode_config_init (err -2)
    [    6.136049] pvrsrvkm: Unknown symbol drm_gem_private_object_init (err -2)
    [    6.136192] pvrsrvkm: Unknown symbol drm_gem_dmabuf_export (err -2)
    [    6.136295] pvrsrvkm: Unknown symbol drm_ioctl (err -2)
    [    6.136352] pvrsrvkm: Unknown symbol drm_gem_object_free (err -2)
    [    6.136531] pvrsrvkm: Unknown symbol drm_read (err -2)
    [    6.136568] pvrsrvkm: Unknown symbol drm_gem_object_release (err -2)
    [    6.136710] pvrsrvkm: Unknown symbol drm_gem_handle_create (err -2)
    [    6.136769] pvrsrvkm: Unknown symbol drm_dev_unregister (err -2)
    [    6.136830] pvrsrvkm: Unknown symbol drm_dev_put (err -2)
    [    6.137489] pvrsrvkm: Unknown symbol drm_mode_config_cleanup (err -2)
    [    6.137513] pvrsrvkm: Unknown symbol drm_gem_dmabuf_release (err -2)
    [    6.137593] pvrsrvkm: Unknown symbol drm_dev_alloc (err -2)
    [    6.137700] pvrsrvkm: Unknown symbol drm_compat_ioctl (err -2)
    [    6.137711] pvrsrvkm: Unknown symbol drm_dev_register (err -2)
    [    6.137789] pvrsrvkm: Unknown symbol drm_release (err -2)
    [    6.141235] remoteproc remoteproc1: 78000000.r5f is available
    [    6.141367] remoteproc remoteproc1: attaching to 78000000.r5f
    [    6.148603] platform 78000000.r5f: R5F core initialized in IPC-only mode
    [    6.148643] rproc-virtio rproc-virtio.2.auto: assigned reserved memory node r5f-dma-memory@9da00000
    [    6.160801] virtio_rpmsg_bus virtio1: rpmsg host is online
    [    6.160864] rproc-virtio rproc-virtio.2.auto: registered virtio1 (type 7)
    [    6.160872] remoteproc remoteproc1: remote processor 78000000.r5f is now attached
    [    6.161763] virtio_rpmsg_bus virtio1: creating channel ti.ipc4.ping-pong addr 0xd
    [    6.169331] virtio_rpmsg_bus virtio1: creating channel rpmsg_chrdev addr 0xe
    [    6.635521] EXT4-fs (mmcblk0p3): recovery complete
    [    6.636287] EXT4-fs (mmcblk0p3): mounted filesystem with ordered data mode. Quota mode: none.
    [    6.681377] remoteproc remoteproc2: 30074000.pru is available
    [    6.705774] remoteproc remoteproc3: 30078000.pru is available
    [    6.752945] tps6598x 0-003f: Unable to find the interrupt, switching to polling
    [    6.773232] cdns-csi2rx: probe of 30101000.csi-bridge failed with error -22
    [    6.822396] xhci-hcd xhci-hcd.3.auto: xHCI Host Controller
    [    6.822442] xhci-hcd xhci-hcd.3.auto: new USB bus registered, assigned bus number 1
    [    6.822701] xhci-hcd xhci-hcd.3.auto: USB3 root hub has no ports
    [    6.822713] xhci-hcd xhci-hcd.3.auto: hcc params 0x0258fe6d hci version 0x110 quirks 0x0000000000010010
    [    6.823012] xhci-hcd xhci-hcd.3.auto: irq 415, io mem 0x31100000
    [    6.828293] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.01
    [    6.828311] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [    6.828317] usb usb1: Product: xHCI Host Controller
    [    6.828322] usb usb1: Manufacturer: Linux 6.1.69-rt21-1.0 xhci-hcd
    [    6.828327] usb usb1: SerialNumber: xhci-hcd.3.auto
    [    6.832683] hub 1-0:1.0: USB hub found
    [    6.832770] hub 1-0:1.0: 1 port detected
    [    7.207511] systemd-journald[213]: Oldest entry in /run/log/journal/ef41ba8d547b4fbe831e56811c33aadf/system.journal is older than the configured file retention duration (1month), suggesting rotation.
    [    7.207542] systemd-journald[213]: /run/log/journal/ef41ba8d547b4fbe831e56811c33aadf/system.journal: Journal header limits reached or header out-of-date, rotating.
    [    7.954216] Loading modules backported from Summit Linux version LRD-REL-11.39.0.18-0-g5de64d7583da
    [    7.954233] Backport generated by backports.git v11.39.0.18
    [    8.061044] am65-cpsw-nuss 8000000.ethernet eth1: PHY [8000f00.mdio:01] driver [TI DP83867] (irq=POLL)
    [    8.061095] am65-cpsw-nuss 8000000.ethernet eth1: configuring for phy/rgmii-rxid link mode
    [    8.109851] am65-cpsw-nuss 8000000.ethernet eth0: PHY [8000f00.mdio:00] driver [TI DP83867] (irq=POLL)
    [    8.109892] am65-cpsw-nuss 8000000.ethernet eth0: configuring for phy/rgmii-rxid link mode
    [   12.196579] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
    [   12.196644] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
    

  • Hello Leon,

    I took another look at the schematic. Looks like there is an inline I2C switch that needs to be enabled in order to see the I2C signals at the user expansion connector:

    All the I2C outputs are disabled by default, so we'll need to add that switch to the Linux devicetree and enable output 0:

    Please refer to one of the device tree overlay files for a camera board. e.g., 
    /linux-5.10.168+gitAUTOINC+2c23e6c538-g2c23e6c538/arch/arm64/boot/dts/ti/k3-am625-sk-csi2-ov5640.dts

    Note that this is enabling output 1 to the CSI header, not output 0. So I would start by changing these 2 lines to say 0 instead of 1:

    &main_i2c2 {
            pinctrl-names = "default";
            pinctrl-0 = <&main_i2c2_pins_default>;
            #address-cells = <1>;
            #size-cells = <0>;
            status = "okay";
    
            clock-frequency = <400000>;
    
            i2c-switch@71 {
                    compatible = "nxp,pca9543";
                    #address-cells = <1>;
                    #size-cells = <0>;
                    reg = <0x71>;
    
                    /* CAM port */
                    i2c@1 {   <<---------------------change to @0
                            #address-cells = <1>;
                            #size-cells = <0>;
                            reg = <1>; <-------------change to <0>
    
                            // put your peripheral here
    
                            };
                    };
            };
    };
    

    Regards,

    Nick

  • Hello Nick,

    Thanks a lot, this worked!

    Kind regards,

    Leon

  • Hello Leon,

    Glad to hear that you were able to get it working! Were there any additional steps you needed to take other than placing the I2C peripheral node inside of i2c-switch{ i2c@0{peripheral_node}}?

    I will create an FAQ based on your input, since this additional step is not obvious without digging into the schematic.

    Regards,

    Nick

  • Hello Nick,

    I didn't try it with the device tree, instead I wrote a startup script which enables the switch for output 0 (i2cset -y 2 0x71 1) - I found it's simpler that way.

    Kind regards,

    Leon