Hello,
I have the AM6548IDK and would like to communicate from Linux userspace as master to a external slave devices via SPI1 Header J20. (SPI)
My plan was to use Linux kernel driver "spidev", which expose a simple SPI-interface to userspace (/dev/spidevX.X), which points to SPI1 Header (J20) on the evaulation board.
My problem: I cannot detect any signal on J20 (SPI1_CS/SPI1_CLK/SPI1MOSI) during writing on "/dev/spidev3.0". I think at some point my configuration is wrong, but I don't know where. Can you help me out please?
This is what I have done so far:
I use Processor SDK Linux 06_02_00_81 and build the linux sd-card image with yocto (arago).
1. Route SPI1_CS0 to Test Header J20 via placing resistor R317
2. Configured linux kernel ti-staging as following
Device Drivers ---> [*] SPI support <*> User mode SPI device driver support
and
Device Drivers ---> [*] SPI support [*] McSPI driver for OMAP
3. Created following Pinmux settings for SPI1 master mode Full duplex and add it to arch/arm64/boot/dts/ti/k3-am654-idk.dtso
mcspi1_pins_default: mcspi1_pins_default { pinctrl-single,pins = < AM65X_IOPAD(0x01d8, PIN_INPUT, 0) /* (AH12) SPI1_CLK */ AM65X_IOPAD(0x01dc, PIN_INPUT, 0) /* (AE12) SPI1_D0 */ AM65X_IOPAD(0x01e0, PIN_INPUT, 0) /* (AF12) SPI1_D1 */ AM65X_IOPAD(0x01d0, PIN_OUTPUT, 0) /* (AD12) SPI1_CS0 */ >; };
4. I changed arch/arm64/boot/dts/ti/k3-am65-main.dtsi as following to register MCSPI1 to kernel driver spidev
1513 main_spi1: spi@2110000 { 1514 compatible = "ti,am654-mcspi","ti,omap4-mcspi"; 1515 #compatible = "linux,spidev"; 1516 reg = <0x0 0x2110000 0x0 0x400>; 1517 interrupts = <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>; 1518 clocks = <&k3_clks 138 1>; 1519 power-domains = <&k3_pds 138 TI_SCI_PD_EXCLUSIVE>; 1520 #address-cells = <1>; 1521 #size-cells = <0>; 1522 assigned-clocks = <&k3_clks 137 1>; 1523 #assigned-clock-rates = <48000000>; 1524 1525 spidev@1 { 1526 spi-max-frequency = <24000000>; 1527 reg = <0>; 1528 compatible = "rohm,dh2228fv"; 1529 }; 1530 };
I suspect some problems here, because the values are just are best guesses from what I could find here in the wiki/forum.
First of all, I changed the line 1517 to <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH> since I found following in the TRM:
Is this correct?
Furthmore, lines 1525 to 1529 extend the main_spi1 devicetree-node for spidev. I set reg to 0, since I plan to use SPI1_CS0 to address my SPI slave devices.
However, I'm not sure if this devicetree-configuration is sufficient / correct?
5. Additional informations
This is the dmesg from AM6548IDK:
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034] [ 0.000000] Linux version 4.19.79-g77dfab56c6 (oe-user@oe-host) (gcc version 8.3.0 (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36))) #1 SMP PREEMPT Wed Jan 15 13:38:26 UTC 2020 [ 0.000000] Machine model: Texas Instruments AM654 Base Board [ 0.000000] earlycon: ns16550a0 at MMIO32 0x0000000002800000 (options '') [ 0.000000] bootconsole [ns16550a0] enabled [ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a0000000, size 1 MiB [ 0.000000] OF: reserved mem: initialized node r5f-dma-memory@a0000000, compatible id shared-dma-pool [ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a0100000, size 15 MiB [ 0.000000] OF: reserved mem: initialized node r5f-memory@a0100000, compatible id shared-dma-pool [ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a1000000, size 1 MiB [ 0.000000] OF: reserved mem: initialized node r5f-dma-memory@a1000000, compatible id shared-dma-pool [ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a1100000, size 15 MiB [ 0.000000] OF: reserved mem: initialized node r5f-memory@a1100000, compatible id shared-dma-pool [ 0.000000] cma: Reserved 512 MiB at 0x00000000c0000000 [ 0.000000] On node 0 totalpages: 64608 [ 0.000000] DMA32 zone: 32 pages used for memmap [ 0.000000] DMA32 zone: 0 pages reserved [ 0.000000] DMA32 zone: 31840 pages, LIFO batch:3 [ 0.000000] Normal zone: 32 pages used for memmap [ 0.000000] Normal zone: 32768 pages, LIFO batch:3 [ 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.1 [ 0.000000] random: get_random_bytes called from start_kernel+0x94/0x3e4 with crng_init=0 [ 0.000000] percpu: Embedded 2 pages/cpu s48536 r8192 d74344 u131072 [ 0.000000] pcpu-alloc: s48536 r8192 d74344 u131072 alloc=2*65536 [ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 [ 0.000000] Detected VIPT I-cache on CPU0 [ 0.000000] CPU features: enabling workaround for ARM erratum 845719 [ 0.000000] Speculative Store Bypass Disable mitigation not required [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 64544 [ 0.000000] Kernel command line: console=ttyS2,115200n8 earlycon=ns16550a,mmio32,0x02800000 mtdparts=47040000.spi.0:512k(ospi.tiboot3),2m(ospi.tispl),4m(ospi.u-boot),128k(ospi.env),128k(ospi.env.backup),1m(ospi.sysfw),-@8m(ospi.rootfs) root=PARTUUID=f0a0db55-02 rw rootfstype=ext4 rootwait [ 0.000000] Dentry cache hash table entries: 524288 (order: 6, 4194304 bytes) [ 0.000000] Inode-cache hash table entries: 262144 (order: 5, 2097152 bytes) [ 0.000000] software IO TLB: mapped [mem 0xf9db0000-0xfddb0000] (64MB) [ 0.000000] Memory: 3518720K/4134912K available (8574K kernel code, 804K rwdata, 3136K rodata, 576K init, 640K bss, 91904K reserved, 524288K 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=64 to nr_cpu_ids=4. [ 0.000000] Tasks RCU enabled. [ 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: Distributor has no Range Selector support [ 0.000000] GICv3: no VLPI support, no direct LPI support [ 0.000000] ITS [mem 0x01820000-0x0182ffff] [ 0.000000] GIC: enabling workaround for ITS: Socionext Synquacer pre-ITS [ 0.000000] ITS@0x0000000001820000: allocated 1048576 Devices @8c0800000 (flat, esz 8, psz 64K, shr 0) [ 0.000000] ITS: using cache flushing for cmd queue [ 0.000000] GIC: using LPI property table @0x00000008c00c0000 [ 0.000000] GICv3: CPU0: found redistributor 0 region 0:0x0000000001880000 [ 0.000000] CPU0: using LPI pending table @0x00000008c00d0000 [ 0.000000] GIC: using cache flushing for LPI property table [ 0.000000] arch_timer: cp15 timer(s) running at 200.00MHz (phys). [ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x2e2049d3e8, max_idle_ns: 440795210634 ns [ 0.000006] sched_clock: 56 bits at 200MHz, resolution 5ns, wraps every 4398046511102ns [ 0.008706] Console: colour dummy device 80x25 [ 0.013301] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=800000) [ 0.023989] pid_max: default: 32768 minimum: 301 [ 0.028816] Security Framework initialized [ 0.033078] Mount-cache hash table entries: 8192 (order: 0, 65536 bytes) [ 0.039958] Mountpoint-cache hash table entries: 8192 (order: 0, 65536 bytes) [ 0.071396] ASID allocator initialised with 32768 entries [ 0.084965] rcu: Hierarchical SRCU implementation. [ 0.098060] Platform MSI: gic-its@1820000 domain created [ 0.103838] PCI/MSI: /interconnect@100000/interrupt-controller@1800000/gic-its@1820000 domain created [ 0.121317] smp: Bringing up secondary CPUs ... [ 0.158441] Detected VIPT I-cache on CPU1 [ 0.158480] GICv3: CPU1: found redistributor 1 region 0:0x00000000018a0000 [ 0.158538] CPU1: using LPI pending table @0x00000008c0330000 [ 0.158584] CPU1: Booted secondary processor 0x0000000001 [0x410fd034] [ 0.220156] Detected VIPT I-cache on CPU2 [ 0.220198] GICv3: CPU2: found redistributor 100 region 0:0x00000000018c0000 [ 0.220258] CPU2: using LPI pending table @0x00000008c03c0000 [ 0.220309] CPU2: Booted secondary processor 0x0000000100 [0x410fd034] [ 0.252554] Detected VIPT I-cache on CPU3 [ 0.252581] GICv3: CPU3: found redistributor 101 region 0:0x00000000018e0000 [ 0.252637] CPU3: using LPI pending table @0x00000008c0450000 [ 0.252673] CPU3: Booted secondary processor 0x0000000101 [0x410fd034] [ 0.252822] smp: Brought up 1 node, 4 CPUs [ 0.328459] SMP: Total of 4 processors activated. [ 0.333280] CPU features: detected: GIC system register CPU interface [ 0.339890] CPU features: detected: 32-bit EL0 Support [ 0.345611] CPU: All CPU(s) started at EL2 [ 0.349844] alternatives: patching kernel code [ 0.355857] devtmpfs: initialized [ 0.371195] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns [ 0.381200] futex hash table entries: 1024 (order: 0, 65536 bytes) [ 0.388942] pinctrl core: initialized pinctrl subsystem [ 0.395241] NET: Registered protocol family 16 [ 0.401030] vdso: 2 pages (1 code @ (____ptrval____), 1 data @ (____ptrval____)) [ 0.408618] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers. [ 0.421968] DMA: preallocated 256 KiB pool for atomic allocations [ 0.450575] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages [ 0.457466] HugeTLB registered 512 MiB page size, pre-allocated 0 pages [ 0.466245] cryptd: max_cpu_qlen set to 1000 [ 0.472757] SCSI subsystem initialized [ 0.477279] media: Linux media interface: v0.10 [ 0.481956] videodev: Linux video capture interface: v2.00 [ 0.487612] pps_core: LinuxPPS API ver. 1 registered [ 0.492697] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it> [ 0.502059] PTP clock support registered [ 0.506099] EDAC MC: Ver: 3.0.0 [ 0.510716] Advanced Linux Sound Architecture Driver Initialized. [ 0.517922] clocksource: Switched to clocksource arch_sys_counter [ 0.524384] VFS: Disk quotas dquot_6.6.0 [ 0.528498] VFS: Dquot-cache hash table entries: 8192 (order 0, 65536 bytes) [ 0.542901] NET: Registered protocol family 2 [ 0.548112] tcp_listen_portaddr_hash hash table entries: 4096 (order: 0, 65536 bytes) [ 0.556267] TCP established hash table entries: 32768 (order: 2, 262144 bytes) [ 0.563962] TCP bind hash table entries: 32768 (order: 3, 524288 bytes) [ 0.571314] TCP: Hash tables configured (established 32768 bind 32768) [ 0.578147] UDP hash table entries: 2048 (order: 0, 65536 bytes) [ 0.584426] UDP-Lite hash table entries: 2048 (order: 0, 65536 bytes) [ 0.591313] NET: Registered protocol family 1 [ 0.596419] RPC: Registered named UNIX socket transport module. [ 0.602503] RPC: Registered udp transport module. [ 0.607321] RPC: Registered tcp transport module. [ 0.612143] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 0.618744] PCI: CLS 0 bytes, default 64 [ 0.619920] hw perfevents: enabled with armv8_pmuv3 PMU driver, 7 counters available [ 0.633084] Initialise system trusted keyrings [ 0.637931] workingset: timestamp_bits=46 max_order=16 bucket_order=0 [ 0.649858] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 0.656518] NFS: Registering the id_resolver key type [ 0.661730] Key type id_resolver registered [ 0.666017] Key type id_legacy registered [ 0.670139] nfs4filelayout_init: NFSv4 File Layout Driver Registering... [ 0.677279] 9p: Installing v9fs 9p2000 file system support [ 0.688052] Key type asymmetric registered [ 0.692266] Asymmetric key parser 'x509' registered [ 0.697324] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245) [ 0.704907] io scheduler noop registered [ 0.708931] io scheduler deadline registered [ 0.713484] io scheduler cfq registered (default) [ 0.718313] io scheduler mq-deadline registered [ 0.722954] io scheduler kyber registered [ 0.729318] pinctrl-single 4301c000.pinmux: 70 pins, size 280 [ 0.735895] pinctrl-single 11c000.pinmux: 185 pins, size 740 [ 0.741858] pinctrl-single 11c2e8.pinmux: 9 pins, size 36 [ 0.748656] pinctrl-single a40000.timesync_router: 512 pins, size 2048 [ 0.765994] Serial: 8250/16550 driver, 10 ports, IRQ sharing enabled [ 0.789226] brd: module loaded [ 0.799864] loop: module loaded [ 0.806487] libphy: Fixed MDIO Bus: probed [ 0.811248] tun: Universal TUN/TAP device driver, 1.6 [ 0.817227] igbvf: Intel(R) Gigabit Virtual Function Network Driver - version 2.4.0-k [ 0.825255] igbvf: Copyright (c) 2009 - 2012 Intel Corporation. [ 0.831373] sky2: driver version 1.30 [ 0.836695] VFIO - User Level meta-driver version: 0.3 [ 0.842862] i2c /dev entries driver [ 0.847841] sdhci: Secure Digital Host Controller Interface driver [ 0.854179] sdhci: Copyright(c) Pierre Ossman [ 0.859201] sdhci-pltfm: SDHCI platform and OF driver helper [ 0.866366] ledtrig-cpu: registered to indicate activity on CPUs [ 0.872623] ti-sci interconnect@100000:interconnect@28380000:interconnect@42040000:dmsc: invalid resource [ 0.884292] optee: probing for conduit method from DT. [ 0.889607] optee: revision 3.7 (5208e5c1) [ 0.889898] optee: initialized driver [ 0.899344] NET: Registered protocol family 17 [ 0.904062] 9pnet: Installing 9P2000 support [ 0.908493] Key type dns_resolver registered [ 0.913632] registered taskstats version 1 [ 0.917833] Loading compiled-in X.509 certificates [ 0.936126] ti-sci interconnect@100000:interconnect@28380000:interconnect@42040000:dmsc: invalid resource [ 0.946140] ti-sci interconnect@100000:interconnect@28380000:interconnect@42040000:dmsc: ABI: 2.7 (firmware rev 0x0013 '19.9.0-v2019.09 (Terrific Llama') [ 0.980385] random: fast init done [ 1.416404] omap_i2c 42120000.i2c: bus 0 rev0.12 at 400 kHz [ 1.422850] omap_i2c 40b00000.i2c: bus 1 rev0.12 at 100 kHz [ 1.429368] pca953x 2-0041: 2-0041 supply vcc not found, using dummy regulator [ 1.436836] pca953x 2-0041: Linked as a consumer to regulator.0 [ 1.466660] pca953x 2-0021: 2-0021 supply vcc not found, using dummy regulator [ 1.474105] pca953x 2-0021: Linked as a consumer to regulator.0 [ 1.480839] omap_i2c 2000000.i2c: bus 2 rev0.12 at 400 kHz [ 1.487138] omap_i2c 2010000.i2c: bus 3 rev0.12 at 400 kHz [ 1.493468] omap_i2c 2020000.i2c: bus 4 rev0.12 at 400 kHz [ 1.499761] omap_i2c 2030000.i2c: bus 5 rev0.12 at 100 kHz [ 1.514358] keystone-pcie 5500000.pcie: Linked as a consumer to phy-900000.serdes.0 [ 1.522230] keystone-pcie 5500000.pcie: Linked as a consumer to phy-910000.serdes.1 [ 1.535301] keystone-pcie 5500000.pcie: host bridge /interconnect@100000/pcie@5500000 ranges: [ 1.544067] keystone-pcie 5500000.pcie: IO 0x10020000..0x1002ffff -> 0x00000000 [ 1.551836] keystone-pcie 5500000.pcie: MEM 0x10030000..0x17ffffff -> 0x10030000 [ 2.559917] keystone-pcie 5500000.pcie: Phy link never came up [ 2.566052] keystone-pcie 5500000.pcie: PCI host bridge to bus 0000:00 [ 2.572748] pci_bus 0000:00: root bus resource [bus 00-ff] [ 2.578372] pci_bus 0000:00: root bus resource [io 0x0000-0xffff] [ 2.584705] pci_bus 0000:00: root bus resource [mem 0x10030000-0x17ffffff] [ 2.591777] pci 0000:00:00.0: [104c:b00c] type 01 class 0x060400 [ 2.591817] pci 0000:00:00.0: reg 0x38: [mem 0x00000000-0x0000ffff pref] [ 2.591875] pci 0000:00:00.0: supports D1 [ 2.591881] pci 0000:00:00.0: PME# supported from D0 D1 D3hot [ 2.600728] pci 0000:00:00.0: BAR 6: assigned [mem 0x10030000-0x1003ffff pref] [ 2.608138] pci 0000:00:00.0: PCI bridge to [bus 01-ff] [ 2.614712] k3-ringacc 2b800000.ringacc: Ring Accelerator probed rings:286, gp-rings[96,160] sci-dev-id:195 [ 2.624704] k3-ringacc 2b800000.ringacc: dma-ring-reset-quirk: enabled [ 2.631395] k3-ringacc 2b800000.ringacc: RA Proxy rev. 66344100, num_proxies:64 [ 2.639272] k3-ringacc 3c000000.ringacc: Ring Accelerator probed rings:818, gp-rings[304,464] sci-dev-id:187 [ 2.649354] k3-ringacc 3c000000.ringacc: dma-ring-reset-quirk: enabled [ 2.656042] k3-ringacc 3c000000.ringacc: RA Proxy rev. 66344100, num_proxies:64 [ 2.663855] omap8250 40a00000.serial: PM domain pd:149 will not be powered off [ 2.671591] 40a00000.serial: ttyS1 at MMIO 0x40a00000 (irq = 8, base_baud = 6000000) is a 8250 [ 2.681309] 2800000.serial: ttyS2 at MMIO 0x2800000 (irq = 22, base_baud = 3000000) is a 8250 [ 2.690095] console [ttyS2] enabled [ 2.697146] bootconsole [ns16550a0] disabled [ 2.706524] 2810000.serial: ttyS3 at MMIO 0x2810000 (irq = 23, base_baud = 3000000) is a 8250 [ 2.715742] 2820000.serial: ttyS4 at MMIO 0x2820000 (irq = 24, base_baud = 3000000) is a 8250 [ 2.727549] cadence-qspi 47040000.spi: mt35xu512aba (65536 Kbytes) [ 2.733755] 7 cmdlinepart partitions found on MTD device 47040000.spi.0 [ 2.740373] Creating 7 MTD partitions on "47040000.spi.0": [ 2.745865] 0x000000000000-0x000000080000 : "ospi.tiboot3" [ 2.752212] 0x000000080000-0x000000280000 : "ospi.tispl" [ 2.758196] 0x000000280000-0x000000680000 : "ospi.u-boot" [ 2.764311] 0x000000680000-0x0000006a0000 : "ospi.env" [ 2.770101] 0x0000006a0000-0x0000006c0000 : "ospi.env.backup" [ 2.776515] 0x0000006c0000-0x0000007c0000 : "ospi.sysfw" [ 2.782483] 0x000000800000-0x000004000000 : "ospi.rootfs" [ 2.994195] cadence-qspi 47040000.spi: Cadence QSPI NOR probe failed -517 [ 3.008478] am65-cpsw-nuss 46000000.ethernet: rx-flow-id-base is not set -22 [ 3.015618] am65-cpsw-nuss 46000000.ethernet: initializing am65 cpsw nuss version 0x6BA07100, cpsw version 0x6BA80100 Ports: 2 [ 3.027152] UDMA has not been proped [ 3.030831] am65-cpsw-nuss 46000000.ethernet: Failed to request tx dma channel -517 [ 3.040848] am65-cpts 310d0000.cpts: CPTS ver 0x4e8a2109, freq:200000000, add_val:4 pps:0 [ 3.049608] thermal thermal_zone1: failed to read out thermal zone (-22) [ 3.056339] thermal thermal_zone2: failed to read out thermal zone (-22) [ 3.063903] keystone-wdt 40610000.rti: heartbeat 60 sec [ 3.070164] mmc0: Unknown controller version (4). You may experience problems. [ 3.108565] mmc0: SDHCI controller on 4f80000.sdhci [4f80000.sdhci] using ADMA 64-bit [ 3.117254] mmc1: Unknown controller version (4). You may experience problems. [ 3.155655] mmc1: SDHCI controller on 4fa0000.sdhci [4fa0000.sdhci] using ADMA 64-bit [ 3.171677] mmc0: new HS200 MMC card at address 0001 [ 3.177816] mmcblk0: mmc0:0001 R1J56L 14.7 GiB [ 3.183170] mmcblk0boot0: mmc0:0001 R1J56L partition 1 8.00 MiB [ 3.190840] mmcblk0boot1: mmc0:0001 R1J56L partition 2 8.00 MiB [ 3.197170] mmcblk0rpmb: mmc0:0001 R1J56L partition 3 4.00 MiB, chardev (243:0) [ 3.207231] pca953x 0-0039: 0-0039 supply vcc not found, using dummy regulator [ 3.214527] pca953x 0-0039: Linked as a consumer to regulator.0 [ 3.243708] omap-mailbox 31f80000.mailbox: omap mailbox rev 0x66fc5900 [ 3.250722] omap-mailbox 31f81000.mailbox: omap mailbox rev 0x66fc5900 [ 3.258275] ti-udma 285c0000.udmap: Channels: 96 (tchan: 48, echan: 0, rchan: 48, rflow: 96) [ 3.272941] ti-udma 31150000.udmap: Channels: 267 (tchan: 120, echan: 32, rchan: 150, rflow: 300) [ 3.298837] cadence-qspi 47040000.spi: mt35xu512aba (65536 Kbytes) [ 3.305037] 7 cmdlinepart partitions found on MTD device 47040000.spi.0 [ 3.311660] Creating 7 MTD partitions on "47040000.spi.0": [ 3.317154] 0x000000000000-0x000000080000 : "ospi.tiboot3" [ 3.323505] 0x000000080000-0x000000280000 : "ospi.tispl" [ 3.329530] 0x000000280000-0x000000680000 : "ospi.u-boot" [ 3.335550] 0x000000680000-0x0000006a0000 : "ospi.env" [ 3.341331] 0x0000006a0000-0x0000006c0000 : "ospi.env.backup" [ 3.347736] 0x0000006c0000-0x0000007c0000 : "ospi.sysfw" [ 3.353689] 0x000000800000-0x000004000000 : "ospi.rootfs" [ 3.367346] m25p80 spi7.0: n25q128a13 (16384 Kbytes) [ 3.373764] am65-cpsw-nuss 46000000.ethernet: rx-flow-id-base is not set -22 [ 3.380878] am65-cpsw-nuss 46000000.ethernet: initializing am65 cpsw nuss version 0x6BA07100, cpsw version 0x6BA80100 Ports: 2 [ 3.401990] am65-cpsw-nuss 46000000.ethernet: set new flow-id-base 48 [ 3.415945] pps pps0: new PPS source ptp1 [ 3.420178] am65-cpsw-nuss 46000000.ethernet: CPTS ver 0x4e8a2109, freq:200000000, add_val:4 pps:1 [ 3.429159] am65-cpsw-nuss 46000000.ethernet: initialized cpsw ale version 0.4 [ 3.436381] am65-cpsw-nuss 46000000.ethernet: ALE Table size 64 [ 3.481941] am65-cpsw-nuss 46000000.ethernet: davinci mdio revision 9.7, bus freq 1000000 [ 3.490120] libphy: 46000000.ethernet: probed [ 3.498292] input: gpio-keys as /devices/platform/gpio-keys/input/input0 [ 3.505270] hctosys: unable to open rtc device (rtc0) [ 3.608892] ALSA device list: [ 3.611881] No soundcards found. [ 3.615928] Waiting for root device PARTUUID=f0a0db55-02... [ 4.357936] mmc1: Problem switching card into high-speed mode! [ 4.363922] mmc1: new SDHC card at address 0001 [ 4.369611] mmcblk1: mmc1:0001 SD 29.1 GiB [ 4.380573] mmcblk1: p1 p2 [ 9.880932] EXT4-fs (mmcblk1p2): recovery complete [ 9.890443] EXT4-fs (mmcblk1p2): mounted filesystem with ordered data mode. Opts: (null) [ 9.898602] VFS: Mounted root (ext4 filesystem) on device 179:98. [ 9.904817] devtmpfs: mounted [ 9.908076] Freeing unused kernel memory: 576K [ 9.912567] Run /sbin/init as init process [ 10.407635] systemd[1]: System time before build time, advancing clock. [ 10.560712] NET: Registered protocol family 10 [ 10.566499] Segment Routing with IPv6 [ 10.619290] systemd[1]: systemd 239 running in system mode. (+PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCRYPT -GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID -ELFUTILS +KMOD -IDN2 -IDN -PCRE2 default-hierarchy=hybrid) [ 10.641019] systemd[1]: Detected architecture arm64. [ 10.683236] systemd[1]: Set hostname to <am65xx-evm>. [ 10.700211] random: systemd: uninitialized urandom read (16 bytes read) [ 10.706861] systemd[1]: Initializing machine ID from random generator. [ 10.994237] systemd[1]: File /lib/systemd/system/systemd-journald.service:36 configures an IP firewall (IPAddressDeny=any), but the local system does not support BPF/cgroup based firewalling. [ 11.011293] systemd[1]: Proceeding WITHOUT firewalling in effect! (This warning is only shown for the first loaded unit using IP firewalling.) [ 11.301283] random: systemd: uninitialized urandom read (16 bytes read) [ 11.308476] systemd[1]: Listening on Journal Socket (/dev/log). [ 11.326099] random: systemd: uninitialized urandom read (16 bytes read) [ 11.347359] systemd[1]: Listening on Process Core Dump Socket. [ 11.366456] systemd[1]: Listening on udev Kernel Socket. [ 11.382083] systemd[1]: Reached target Remote File Systems. [ 11.759352] EXT4-fs (mmcblk1p2): re-mounted. Opts: (null) [ 12.000955] systemd-journald[159]: Received request to flush runtime journal from PID 1 [ 15.485549] input: gpio-decoder as /devices/platform/gpio-decoder/input/input1 [ 15.861573] CAN device driver interface [ 15.887412] m_can 40528000.mcan: m_can device registered (irq=17, version=32) [ 15.936022] m_can 40568000.mcan: m_can device registered (irq=19, version=32) [ 15.997415] k3_r5_rproc interconnect@100000:interconnect@28380000:r5fss@41000000: creating child devices for R5F cores [ 16.061531] platform 41000000.r5f: configured R5F for remoteproc mode [ 16.091534] platform 41000000.r5f: assigned reserved memory node r5f-dma-memory@a0000000 [ 16.114694] remoteproc remoteproc0: 41000000.r5f is available [ 16.189775] remoteproc remoteproc0: powering up 41000000.r5f [ 16.195613] remoteproc remoteproc0: Booting fw image am65x-mcu-r5f0_0-fw, size 499704 [ 16.211081] platform 41000000.r5f: booting R5F core using boot addr = 0x0 [ 16.219183] remoteproc remoteproc0: remote processor 41000000.r5f is now up [ 16.245015] TI DP83867 k3-cpsw-mdio:00: attached PHY driver [TI DP83867] (mii_bus:phy_addr=k3-cpsw-mdio:00, irq=POLL) [ 16.263258] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready [ 16.810066] davinci_mdio b032400.mdio: davinci mdio revision 1.7, bus freq 1000000 [ 16.817798] libphy: b032400.mdio: probed [ 16.850722] davinci_mdio b032400.mdio: phy[0]: device b032400.mdio:00, driver TI DP83867 [ 16.870006] davinci_mdio b032400.mdio: phy[3]: device b032400.mdio:03, driver TI DP83867 [ 17.002060] davinci_mdio b132400.mdio: davinci mdio revision 1.7, bus freq 1000000 [ 17.021164] libphy: b132400.mdio: probed [ 17.077691] davinci_mdio b132400.mdio: phy[0]: device b132400.mdio:00, driver TI DP83867 [ 17.137416] davinci_mdio b132400.mdio: phy[3]: device b132400.mdio:03, driver TI DP83867 [ 17.284448] am65-cpsw-nuss 46000000.ethernet eth0: Link is Down [ 17.299998] davinci_mdio b232400.mdio: davinci mdio revision 1.7, bus freq 1000000 [ 17.310851] libphy: b232400.mdio: probed [ 17.400743] davinci_mdio b232400.mdio: phy[0]: device b232400.mdio:00, driver TI DP83867 [ 17.408988] davinci_mdio b232400.mdio: phy[3]: device b232400.mdio:03, driver TI DP83867 [ 17.458585] remoteproc remoteproc1: b034000.pru is available [ 17.475249] pru-rproc b034000.pru: PRU rproc node pru@b034000 probed successfully [ 17.506371] remoteproc remoteproc2: b004000.rtu is available [ 17.523467] pru-rproc b004000.rtu: PRU rproc node rtu@b004000 probed successfully [ 17.548128] remoteproc remoteproc3: b038000.pru is available [ 17.566568] pru-rproc b038000.pru: PRU rproc node pru@b038000 probed successfully [ 17.603220] remoteproc remoteproc4: b006000.rtu is available [ 17.626994] pru-rproc b006000.rtu: PRU rproc node rtu@b006000 probed successfully [ 17.645760] remoteproc remoteproc5: b134000.pru is available [ 17.656040] pru-rproc b134000.pru: PRU rproc node pru@b134000 probed successfully [ 17.669410] remoteproc remoteproc6: b104000.rtu is available [ 17.678983] pru-rproc b104000.rtu: PRU rproc node rtu@b104000 probed successfully [ 17.691866] remoteproc remoteproc7: b138000.pru is available [ 17.698851] pru-rproc b138000.pru: PRU rproc node pru@b138000 probed successfully [ 17.715040] remoteproc remoteproc8: b106000.rtu is available [ 17.722768] pru-rproc b106000.rtu: PRU rproc node rtu@b106000 probed successfully [ 17.733710] remoteproc remoteproc9: b234000.pru is available [ 17.739866] pru-rproc b234000.pru: PRU rproc node pru@b234000 probed successfully [ 17.749443] remoteproc remoteproc10: b204000.rtu is available [ 17.761266] pru-rproc b204000.rtu: PRU rproc node rtu@b204000 probed successfully [ 17.773467] remoteproc remoteproc11: b238000.pru is available [ 17.780610] pru-rproc b238000.pru: PRU rproc node pru@b238000 probed successfully [ 17.791896] remoteproc remoteproc12: b206000.rtu is available [ 17.797951] pru-rproc b206000.rtu: PRU rproc node rtu@b206000 probed successfully [ 17.830751] dwc3 4010000.usb: Failed to get clk 'ref': -2 [ 17.836474] random: crng init done [ 17.839988] random: 7 urandom warning(s) missed due to ratelimiting [ 17.846834] omap_rng 4e10000.trng: Random Number Generator ver. 230b34c [ 17.875962] dwc3 4030000.usb: Failed to get clk 'ref': -2 [ 17.909596] OF: graph: no port node found in /interconnect@100000/phy@4110000 [ 17.977611] icssg-prueth pruss1_eth: TI PRU ethernet driver initialized: dual EMAC mode [ 18.058368] icssg-prueth pruss0_eth: TI PRU ethernet driver initialized: dual EMAC mode [ 18.126461] icssg-prueth pruss2_eth: TI PRU ethernet driver initialized: dual EMAC mode [ 18.236102] usbcore: registered new interface driver usbfs [ 18.241866] usbcore: registered new interface driver hub [ 18.247602] usbcore: registered new device driver usb [ 18.304618] remoteproc remoteproc7: powering up b138000.pru [ 18.320405] remoteproc remoteproc7: Booting fw image ti-pruss/am65x-pru1-prueth-fw.elf, size 16464 [ 18.329624] remoteproc remoteproc7: remote processor b138000.pru is now up [ 18.338132] remoteproc remoteproc8: powering up b106000.rtu [ 18.347190] remoteproc remoteproc8: Booting fw image ti-pruss/am65x-rtu1-prueth-fw.elf, size 15540 [ 18.352354] xhci-hcd xhci-hcd.2.auto: xHCI Host Controller [ 18.356525] remoteproc remoteproc8: remote processor b106000.rtu is now up [ 18.364693] xhci-hcd xhci-hcd.2.auto: new USB bus registered, assigned bus number 1 [ 18.370155] net eth2: started [ 18.380039] xhci-hcd xhci-hcd.2.auto: hcc params 0x0298fe6d hci version 0x110 quirks 0x0000000000010010 [ 18.380654] IPv6: ADDRCONF(NETDEV_UP): eth2: link is not ready [ 18.390693] xhci-hcd xhci-hcd.2.auto: irq 308, io mem 0x04010000 [ 18.402301] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.19 [ 18.410750] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 18.418081] usb usb1: Product: xHCI Host Controller [ 18.423035] usb usb1: Manufacturer: Linux 4.19.79-g77dfab56c6 xhci-hcd [ 18.429757] usb usb1: SerialNumber: xhci-hcd.2.auto [ 18.435435] hub 1-0:1.0: USB hub found [ 18.439348] hub 1-0:1.0: 1 port detected [ 18.443912] xhci-hcd xhci-hcd.2.auto: xHCI Host Controller [ 18.449481] xhci-hcd xhci-hcd.2.auto: new USB bus registered, assigned bus number 2 [ 18.457211] xhci-hcd xhci-hcd.2.auto: Host supports USB 3.0 SuperSpeed [ 18.463871] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM. [ 18.472170] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 4.19 [ 18.480485] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 18.487845] usb usb2: Product: xHCI Host Controller [ 18.492812] usb usb2: Manufacturer: Linux 4.19.79-g77dfab56c6 xhci-hcd [ 18.499547] usb usb2: SerialNumber: xhci-hcd.2.auto [ 18.505448] hub 2-0:1.0: USB hub found [ 18.509415] hub 2-0:1.0: 1 port detected [ 18.514326] xhci-hcd xhci-hcd.3.auto: xHCI Host Controller [ 18.519914] xhci-hcd xhci-hcd.3.auto: new USB bus registered, assigned bus number 3 [ 18.528479] xhci-hcd xhci-hcd.3.auto: hcc params 0x0298fe6d hci version 0x110 quirks 0x0000000000010010 [ 18.538084] xhci-hcd xhci-hcd.3.auto: irq 310, io mem 0x04030000 [ 18.544461] remoteproc remoteproc5: powering up b134000.pru [ 18.544541] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.19 [ 18.558566] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 18.560128] remoteproc remoteproc5: Booting fw image ti-pruss/am65x-pru0-prueth-fw.elf, size 16464 [ 18.565966] usb usb3: Product: xHCI Host Controller [ 18.575348] remoteproc remoteproc5: remote processor b134000.pru is now up [ 18.580063] usb usb3: Manufacturer: Linux 4.19.79-g77dfab56c6 xhci-hcd [ 18.587005] remoteproc remoteproc6: powering up b104000.rtu [ 18.593555] usb usb3: SerialNumber: xhci-hcd.3.auto [ 18.604413] remoteproc remoteproc6: Booting fw image ti-pruss/am65x-rtu0-prueth-fw.elf, size 15540 [ 18.605109] hub 3-0:1.0: USB hub found [ 18.615153] remoteproc remoteproc6: remote processor b104000.rtu is now up [ 18.619274] hub 3-0:1.0: 1 port detected [ 18.631269] net eth1: started [ 18.634672] xhci-hcd xhci-hcd.3.auto: xHCI Host Controller [ 18.638131] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready [ 18.642544] xhci-hcd xhci-hcd.3.auto: new USB bus registered, assigned bus number 4 [ 18.656249] xhci-hcd xhci-hcd.3.auto: Host supports USB 3.0 SuperSpeed [ 18.663242] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM. [ 18.671722] usb usb4: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 4.19 [ 18.680065] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 18.687343] usb usb4: Product: xHCI Host Controller [ 18.692268] usb usb4: Manufacturer: Linux 4.19.79-g77dfab56c6 xhci-hcd [ 18.698844] usb usb4: SerialNumber: xhci-hcd.3.auto [ 18.704517] hub 4-0:1.0: USB hub found [ 18.708373] hub 4-0:1.0: 1 port detected [ 18.721198] remoteproc remoteproc9: powering up b234000.pru [ 18.731473] remoteproc remoteproc9: Booting fw image ti-pruss/am65x-pru0-prueth-fw.elf, size 16464 [ 18.740860] remoteproc remoteproc9: remote processor b234000.pru is now up [ 18.747871] remoteproc remoteproc10: powering up b204000.rtu [ 18.754072] remoteproc remoteproc10: Booting fw image ti-pruss/am65x-rtu0-prueth-fw.elf, size 15540 [ 18.763187] remoteproc remoteproc10: remote processor b204000.rtu is now up [ 18.771392] net eth5: started [ 18.775310] IPv6: ADDRCONF(NETDEV_UP): eth5: link is not ready [ 18.796507] remoteproc remoteproc11: powering up b238000.pru [ 18.802379] remoteproc remoteproc11: Booting fw image ti-pruss/am65x-pru1-prueth-fw.elf, size 16464 [ 18.811514] remoteproc remoteproc11: remote processor b238000.pru is now up [ 18.818532] remoteproc remoteproc12: powering up b206000.rtu [ 18.824373] remoteproc remoteproc12: Booting fw image ti-pruss/am65x-rtu1-prueth-fw.elf, size 15540 [ 18.833720] remoteproc remoteproc12: remote processor b206000.rtu is now up [ 18.842168] net eth6: started [ 18.845836] IPv6: ADDRCONF(NETDEV_UP): eth6: link is not ready [ 18.867323] remoteproc remoteproc1: powering up b034000.pru [ 18.873354] remoteproc remoteproc1: Booting fw image ti-pruss/am65x-pru0-prueth-fw.elf, size 16464 [ 18.882399] remoteproc remoteproc1: remote processor b034000.pru is now up [ 18.889324] remoteproc remoteproc2: powering up b004000.rtu [ 18.895008] remoteproc remoteproc2: Booting fw image ti-pruss/am65x-rtu0-prueth-fw.elf, size 15540 [ 18.904032] remoteproc remoteproc2: remote processor b004000.rtu is now up [ 18.912063] net eth3: started [ 18.915459] IPv6: ADDRCONF(NETDEV_UP): eth3: link is not ready [ 18.934224] remoteproc remoteproc3: powering up b038000.pru [ 18.940161] remoteproc remoteproc3: Booting fw image ti-pruss/am65x-pru1-prueth-fw.elf, size 16464 [ 18.949202] remoteproc remoteproc3: remote processor b038000.pru is now up [ 18.956140] remoteproc remoteproc4: powering up b006000.rtu [ 18.961878] remoteproc remoteproc4: Booting fw image ti-pruss/am65x-rtu1-prueth-fw.elf, size 15540 [ 18.970960] remoteproc remoteproc4: remote processor b006000.rtu is now up [ 18.979465] net eth4: started [ 18.982898] IPv6: ADDRCONF(NETDEV_UP): eth4: link is not ready [ 20.355302] am65-cpsw-nuss 46000000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off [ 20.364041] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
This is how /sys/classes/spi_master looks like:
root@am65xx-evm:/sys/class/spi_master# ls -la drwxr-xr-x 2 root root 0 Jan 14 09:37 . drwxr-xr-x 57 root root 0 Jan 14 09:37 .. lrwxrwxrwx 1 root root 0 Jan 14 09:37 spi0 -> ../../devices/platform/interconnect@100000/interconnect@100000:interconnect@28380000/40300000.spi/spi_master/spi0 lrwxrwxrwx 1 root root 0 Jan 14 09:37 spi1 -> ../../devices/platform/interconnect@100000/interconnect@100000:interconnect@28380000/40310000.spi/spi_master/spi1 lrwxrwxrwx 1 root root 0 Jan 14 09:37 spi2 -> ../../devices/platform/interconnect@100000/interconnect@100000:interconnect@28380000/40320000.spi/spi_master/spi2 lrwxrwxrwx 1 root root 0 Jan 14 09:37 spi3 -> ../../devices/platform/interconnect@100000/2110000.spi/spi_master/spi3 lrwxrwxrwx 1 root root 0 Jan 14 09:37 spi4 -> ../../devices/platform/interconnect@100000/2120000.spi/spi_master/spi4 lrwxrwxrwx 1 root root 0 Jan 14 09:37 spi5 -> ../../devices/platform/interconnect@100000/2130000.spi/spi_master/spi5 lrwxrwxrwx 1 root root 0 Jan 14 09:37 spi6 -> ../../devices/platform/interconnect@100000/2140000.spi/spi_master/spi6 lrwxrwxrwx 1 root root 0 Jan 14 09:37 spi7 -> ../../devices/platform/interconnect@100000/2100000.spi/spi_master/spi7
Same for /sys/classes/spidev:
root@am65xx-evm:/sys/class/spidev# ls -la
drwxr-xr-x 2 root root 0 Jan 14 09:37 .
drwxr-xr-x 57 root root 0 Jan 14 09:37 ..
lrwxrwxrwx 1 root root 0 Jan 14 09:37 spidev3.0 -> ../../devices/platform/interconnect@100000/2110000.spi/spi_master/spi3/spi3.0/spidev/spidev3.0
For me, it seems fine. It seems spidev3.0 points to 0x2110000 which should be the correct MCSPI1 according TRM:
For writing/testing on /dev/spidev3.0 I installed spitools ( https ://github.com/cpb-/spi-tools)
Writing:
root@am65xx-evm:/sys/class/spidev# echo 1 | spi-pipe -d /dev/spidev3.0
At this point I can see no signals on J20 header!!
Reading status:
root@am65xx-evm:/sys/class/spidev# spi-config -q -d /dev/spidev3.0
/dev/spidev3.0: mode=0, lsb=0, bits=8, speed=24000000, spiready=0
Can someone help me out of here? I've read TRM, User's Guide, Processor SDK Linux, files in linux/Documentation/devicetree/bindings/spi and here in the forum.
I cannot find the missing piece it seems.
Best Regards,
Thomas