Hi,
We want to make CAN work on CA55 on s4sk as well. I applied the two patches to the v5.4 tag code. However, there is an error in the kernel log under DomD as follows:
OF: /soc/can@dff50000: could not find phandle
Steps:
1. according to the CAN driver on CA55 sample apply the two patches to v5.4 tag source code.
2. change the build_trampoline.sh as following:
+++ b/mcu/build_trampoline.sh @@ -140,6 +140,12 @@ if [[ "${EXAMPLE_NAME}" == "" ]]; then cp -f G4MH_sample.srec ${SCRIPT_DIR}/deploy/g4mh_can_disable.srec fi + # Build CAN unlock sample + cd ${SOURCE_DIR}/examples/rh850/can_unlock + chmod +x ./build.sh + ./build.sh + cp -f G4MH_sample.srec ${SCRIPT_DIR}/deploy/g4mh_can_unlock.srec +
3. build with ./build_whitebox_v5.4.sh s4sk
4. flash the g4mh_can_unlock.srec with tool ipl_burning.py
5. flash the spider.ufs.full.img.gz to the board
Aside from that, no other configurations have been made. Today, I noticed some other changes on the branch wip/v5.x_can-test, and I'm not sure which ones are necessary. I would greatly appreciate any tips you can provide.
Thank you very much for your assistance.
I understand your procedure. However, it was not enough to make it work on Xen hypervisor.Please do the additional steps below:
1. Update DomD config to add CAN0 node to this domain:
Edit: whitebox-sdk/application_cpu/meta-rcar-whitebox/meta-dom0/recipes-guests/domd/files/domd-s4sk.cfg
diff --git a/application_cpu/meta-rcar-whitebox/meta-dom0/recipes-guests/domd/files/domd-s4sk.cfg b/application_cpu/meta-rcar-whitebox/meta-dom0/recipes-guests/domd/files/domd-s4sk.cfg index ec3a4e4..3e926b7 100644 --- a/application_cpu/meta-rcar-whitebox/meta-dom0/recipes-guests/domd/files/domd-s4sk.cfg +++ b/application_cpu/meta-rcar-whitebox/meta-dom0/recipes-guests/domd/files/domd-s4sk.cfg @@ -45,6 +45,7 @@ dt_passthrough_nodes = [ "/regulator-vcc-sdhi", "/reserved-memory", "/thermal-zones", + "/can", ] dtdev = [ @@ -57,6 +58,8 @@ dtdev = [ ] irqs = [ +# can@dff50000 + 566, 567, 568, 569, 570, 571, 572, 573, 574, # gpio@e6050180 854, # gpio@e6050980 @@ -121,6 +124,8 @@ irqs = [ ] iomem = [ +#can@dff50000 + "dff50,9", #watchdog@e6020000 "e6020,1", #pin-controller@e6050000
2. Update devicetree to passthrough CAN0 node to domd:
Edit: whitebox-sdk/application_cpu/work/yocto/meta-aos-rcar-gen4/meta-aos-rcar-gen4-domd/recipes-kernel/linux/linux-renesas/r8a779f0-s4sk-xen.dts
diff --git a/meta-aos-rcar-gen4-domd/recipes-kernel/linux/linux-renesas/r8a779f0-s4sk-xen.dts b/meta-aos-rcar-gen4-domd/recipes-kernel/linux/linux-renesas/r8a779f0-s4sk-xen.dts index a3a1db6..d551e0f 100644 --- a/meta-aos-rcar-gen4-domd/recipes-kernel/linux/linux-renesas/r8a779f0-s4sk-xen.dts +++ b/meta-aos-rcar-gen4-domd/recipes-kernel/linux/linux-renesas/r8a779f0-s4sk-xen.dts @@ -233,6 +233,7 @@ xen,passthrough; }; +&canfd0 { xen,passthrough; }; &dmac0 { xen,passthrough; }; &dmac1 { xen,passthrough; }; &rt_dmac0 { xen,passthrough; };
3. Clean a recipe to make the build re-run:
cd whitebox/whitebox-sdk/application_cpu/work/yocto/source poky/oe-init-build-env build-domd/bitbake linux-renesas -c clean
4. Rebuild the image:
cd whitebox/whitebox-sdk/application_cpu/./build_xenhypervisor.sh s4sk
Now you can use CAN in DomD, just make sure "CAN0/1 enable" and "CAN0/1 terminate" checkbox are selected on the Configurator GUI tool.
Thank you for your reply. I’ve already made the relevant changes. However, I also added passthrough for canfd1, gpio4, gpio5, and gpio6. The image built with these changes causes an Ethernet-related crash on the S4SK,
but on the Spider, it correctly displays the CAN device. However, the functionality doesn't work as expected. When connected to a physical CAN device and sending data, the opposite side shows an error, and the data sent from the opposite side is not received by spider. But the can status shows that data has been received.
root@spider-domd:~# ip -d link show can8 10: can8: <NOARP,UP,LOWER_UP,ECHO> mtu 72 qdisc pfifo_fast state UP mode DEFAULT group default qlen 10 link/can promiscuity 0 minmtu 0 maxmtu 0 can <FD> state ERROR-PASSIVE (berr-counter tx 0 rx 135) restart-ms 0 bitrate 500000 sample-point 0.875 tq 50 prop-seg 17 phase-seg1 17 phase-seg2 5 sjw 1 rcar_canfd: tseg1 2..128 tseg2 2..32 sjw 1..32 brp 1..1024 brp-inc 1 dbitrate 4000000 dsample-point 0.600 dtq 50 dprop-seg 1 dphase-seg1 1 dphase-seg2 2 dsjw 1 rcar_canfd: dtseg1 2..16 dtseg2 2..8 dsjw 1..8 dbrp 1..256 dbrp-inc 1 clock 20000000 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
The command used on Spider is:
ip link set can8 type can bitrate 500000 dbitrate 4000000 fd on ip link set can8 up candump can8 cansend can8 619##123
Sorry, I wanted to upload all the changes I made based on v5.4, but it seems that I’m not allowed to upload files.
Sure, take your time. I'll wait for your update.
Thanks
Hi Jinyuan,
Could you try this branch: renesas-rcar/whitebox-sdk at WIP/v5.4-support-canfd
This enabled CAN on S4SK and Spider. You can check the communication in the same board first.
Hi DuyDang,
I built the image using the WIP/v5.4-support-canfd branch and flashed it onto two development boards for testing, but both boards encountered the same error. The following files were used during the process:
WIP/v5.4-support-canfd
g4mh_can_unlock.srec
cr52_can_disable.srec
s4sk.ufs.full.img.gz
Additionally, I have attached the dmesg output for further analysis.
dmesg
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x412fd050] [ 0.000000] Linux version 5.10.41-yocto-standard (oe-user@oe-host) (aarch64-poky-linux-gcc (GCC) 9.3.0, GNU ld (GNU Binutils) 2.34.0.20200220) #1 SMP PREEMPT Thu Jul 15 12:11:21 UTC 2021 [ 0.000000] Machine model: XENVM-4.17 [ 0.000000] Xen 4.17 support found [ 0.000000] efi: UEFI not found. [ 0.000000] NUMA: No NUMA configuration found [ 0.000000] NUMA: Faking a node at [mem 0x0000000040000000-0x000000007fffffff] [ 0.000000] NUMA: NODE_DATA [mem 0x7fdc2b00-0x7fdc4fff] [ 0.000000] Zone ranges: [ 0.000000] DMA [mem 0x0000000040000000-0x000000007fffffff] [ 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 0x0000000040000000-0x000000007fffffff] [ 0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x000000007fffffff] [ 0.000000] On node 0 totalpages: 262144 [ 0.000000] DMA zone: 4096 pages used for memmap [ 0.000000] DMA zone: 0 pages reserved [ 0.000000] DMA zone: 262144 pages, LIFO batch:63 [ 0.000000] cma: Reserved 32 MiB at 0x000000007c000000 [ 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] percpu: Embedded 23 pages/cpu s56024 r8192 d29992 u94208 [ 0.000000] pcpu-alloc: s56024 r8192 d29992 u94208 alloc=23*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: detected: ARM errata 1165522, 1319367, or 1530923 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 258048 [ 0.000000] Policy zone: DMA [ 0.000000] Kernel command line: root=/dev/sda4 ro rootwait console=hvc0 clk_ignore_unused pci=pcie_bus_perf vardir.disk=/dev/sda5 opendisk.target=/dev/sda6 opendisk.pkcs11=optee aosupdate.disk=/dev/aosvg/downloads aosupdate.path=update_rootfs [ 0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes, linear) [ 0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes, linear) [ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off [ 0.000000] Memory: 955152K/1048576K available (14720K kernel code, 1276K rwdata, 5924K rodata, 2944K init, 541K bss, 60656K reserved, 32768K 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 event tracing is enabled. [ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=4. [ 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 25 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: 832 SPIs implemented [ 0.000000] GICv3: 0 Extended SPIs implemented [ 0.000000] GICv3: Distributor has no Range Selector support [ 0.000000] GICv3: 16 PPIs implemented [ 0.000000] GICv3: raw_spin_lock_init for SGI [ 0.000000] GICv3: CPU0: found redistributor 0 region 0:0x0000000003020000 [ 0.000000] ITS [mem 0x04020000-0x0403ffff] [ 0.000000] ITS@0x0000000004020000: allocated 65536 Devices @41c80000 (flat, esz 8, psz 64K, shr 1) [ 0.000000] ITS@0x0000000004020000: allocated 32768 Interrupt Collections @41c40000 (flat, esz 2, psz 64K, shr 1) [ 0.000000] GICv3: using LPI property table @0x0000000041c50000 [ 0.000000] GICv3: CPU0: using allocated LPI pending table @0x0000000041c60000 [ 0.000000] random: get_random_bytes called from start_kernel+0x32c/0x4ec with crng_init=0 [ 0.000000] arch_timer: cp15 timer(s) running at 16.66MHz (virt). [ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x3d80623e0, max_idle_ns: 440795202120 ns [ 0.000006] sched_clock: 56 bits at 16MHz, resolution 60ns, wraps every 2199023255541ns [ 0.000350] Console: colour dummy device 80x25 [ 0.001288] printk: console [hvc0] enabled [ 0.001432] Calibrating delay loop (skipped), value calculated using timer frequency.. 33.33 BogoMIPS (lpj=66666) [ 0.001481] pid_max: default: 32768 minimum: 301 [ 0.001582] LSM: Security Framework initializing [ 0.001679] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes, linear) [ 0.001713] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes, linear) [ 0.004584] xen:grant_table: Grant tables using version 1 layout [ 0.004691] Grant table initialized [ 0.004751] xen:events: Using FIFO-based ABI [ 0.004846] Xen: initializing cpu0 [ 0.005207] rcu: Hierarchical SRCU implementation. [ 0.005572] Platform MSI: its@4020000 domain created [ 0.005923] PCI/MSI: /interrupt-controller@3001000/its@4020000 domain created [ 0.006847] Detected Renesas R-Car Gen4 r8a779f0 ES1.2 [ 0.007323] EFI services will not be available. [ 0.007838] smp: Bringing up secondary CPUs ... [ 0.008740] Detected VIPT I-cache on CPU1 [ 0.008799] GICv3: raw_spin_lock_init for SGI [ 0.008807] GICv3: CPU1: found redistributor 1 region 0:0x0000000003040000 [ 0.009627] GICv3: CPU1: using allocated LPI pending table @0x0000000041c70000 [ 0.009728] Xen: initializing cpu1 [ 0.009801] CPU1: Booted secondary processor 0x0000000001 [0x412fd050] [ 0.010910] Detected VIPT I-cache on CPU2 [ 0.010975] GICv3: raw_spin_lock_init for SGI [ 0.010984] GICv3: CPU2: found redistributor 2 region 0:0x0000000003060000 [ 0.011798] GICv3: CPU2: using allocated LPI pending table @0x0000000041d00000 [ 0.011891] Xen: initializing cpu2 [ 0.011969] CPU2: Booted secondary processor 0x0000000002 [0x412fd050] [ 0.013183] Detected VIPT I-cache on CPU3 [ 0.013246] GICv3: raw_spin_lock_init for SGI [ 0.013254] GICv3: CPU3: found redistributor 3 region 0:0x0000000003080000 [ 0.014073] GICv3: CPU3: using allocated LPI pending table @0x0000000041d10000 [ 0.014169] Xen: initializing cpu3 [ 0.014241] CPU3: Booted secondary processor 0x0000000003 [0x412fd050] [ 0.014469] smp: Brought up 1 node, 4 CPUs [ 0.014749] SMP: Total of 4 processors activated. [ 0.014770] CPU features: detected: Privileged Access Never [ 0.014785] CPU features: detected: LSE atomic instructions [ 0.014801] CPU features: detected: User Access Override [ 0.014818] CPU features: detected: 32-bit EL0 Support [ 0.014835] CPU features: detected: Common not Private translations [ 0.014856] CPU features: detected: Data cache clean to the PoU not required for I/D coherence [ 0.014878] CPU features: detected: CRC32 instructions [ 0.014893] CPU features: detected: Speculative Store Bypassing Safe (SSBS) [ 0.014916] CPU features: detected: 32-bit EL1 Support [ 0.043113] CPU: All CPU(s) started at EL1 [ 0.043286] alternatives: patching kernel code [ 0.046793] devtmpfs: initialized [ 0.055845] KASLR disabled due to lack of seed [ 0.056174] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns [ 0.056232] futex hash table entries: 1024 (order: 4, 65536 bytes, linear) [ 0.057442] pinctrl core: initialized pinctrl subsystem [ 0.058237] DMI not present or invalid. [ 0.058947] NET: Registered protocol family 16 [ 0.061350] DMA: preallocated 128 KiB GFP_KERNEL pool for atomic allocations [ 0.061588] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations [ 0.061746] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations [ 0.061928] audit: initializing netlink subsys (disabled) [ 0.062358] audit: type=2000 audit(0.060:1): state=initialized audit_enabled=0 res=1 [ 0.063159] thermal_sys: Registered thermal governor 'power_allocator' [ 0.063556] thermal thermal_zone0: power_allocator: sustainable_power will be estimated [ 0.063703] thermal thermal_zone1: power_allocator: sustainable_power will be estimated [ 0.063813] thermal thermal_zone2: power_allocator: sustainable_power will be estimated [ 0.064276] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers. [ 0.064658] ASID allocator initialised with 65536 entries [ 0.065635] Serial: AMBA PL011 UART driver [ 0.091849] OF: /soc/i2c@e66e0000/vc7@9: could not find phandle [ 0.096979] OF: /soc/i2c@e66e0000/vc7@9: could not find phandle [ 0.108315] sh-pfc e6050000.pin-controller: r8a779f0_pfc support registered [ 0.120834] HugeTLB registered 1.00 GiB page size, pre-allocated 0 pages [ 0.120887] HugeTLB registered 32.0 MiB page size, pre-allocated 0 pages [ 0.120908] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages [ 0.120927] HugeTLB registered 64.0 KiB page size, pre-allocated 0 pages [ 0.123575] cryptd: max_cpu_qlen set to 1000 [ 0.130079] ACPI: Interpreter disabled. [ 0.133677] rcar_avs_init: cannot find compatible dts node [ 0.133741] xen:balloon: Initialising balloon driver [ 0.135493] iommu: Default domain type: Translated [ 0.135870] vgaarb: loaded [ 0.136290] SCSI subsystem initialized [ 0.136593] libata version 3.00 loaded. [ 0.136878] usbcore: registered new interface driver usbfs [ 0.136958] usbcore: registered new interface driver hub [ 0.137012] usbcore: registered new device driver usb [ 0.137802] mc: Linux media interface: v0.10 [ 0.137856] videodev: Linux video capture interface: v2.00 [ 0.137967] pps_core: LinuxPPS API ver. 1 registered [ 0.137987] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <[email protected]> [ 0.138020] PTP clock support registered [ 0.138711] EDAC MC: Ver: 3.0.0 [ 0.141821] FPGA manager framework [ 0.141973] Advanced Linux Sound Architecture Driver Initialized. [ 0.143493] clocksource: Switched to clocksource arch_sys_counter [ 0.143849] VFS: Disk quotas dquot_6.6.0 [ 0.143950] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes) [ 0.144184] pnp: PnP ACPI: disabled [ 0.154509] NET: Registered protocol family 2 [ 0.154715] IP idents hash table entries: 16384 (order: 5, 131072 bytes, linear) [ 0.155877] tcp_listen_portaddr_hash hash table entries: 512 (order: 1, 8192 bytes, linear) [ 0.156026] TCP established hash table entries: 8192 (order: 4, 65536 bytes, linear) [ 0.209229] TCP bind hash table entries: 8192 (order: 5, 131072 bytes, linear) [ 0.209413] TCP: Hash tables configured (established 8192 bind 8192) [ 0.209617] UDP hash table entries: 512 (order: 2, 16384 bytes, linear) [ 0.209670] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear) [ 0.209906] NET: Registered protocol family 1 [ 0.210806] RPC: Registered named UNIX socket transport module. [ 0.210850] RPC: Registered udp transport module. [ 0.210867] RPC: Registered tcp transport module. [ 0.210883] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 0.210915] PCI: CLS 0 bytes, default 64 [ 0.211179] Unpacking initramfs... [ 0.831345] Freeing initrd memory: 14476K [ 0.833749] kvm [1]: HYP mode not available [ 0.841618] Initialise system trusted keyrings [ 0.841998] workingset: timestamp_bits=42 max_order=18 bucket_order=0 [ 0.849056] NFS: Registering the id_resolver key type [ 0.849146] Key type id_resolver registered [ 0.849165] Key type id_legacy registered [ 0.849281] nfs4filelayout_init: NFSv4 File Layout Driver Registering... [ 0.849329] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering... [ 0.849658] 9p: Installing v9fs 9p2000 file system support [ 0.887101] Key type asymmetric registered [ 0.887160] Asymmetric key parser 'x509' registered [ 0.887258] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 244) [ 0.887801] io scheduler mq-deadline registered [ 0.887852] io scheduler kyber registered [ 0.895696] gpio_rcar e6050180.gpio: driving 21 GPIOs [ 0.896700] gpio_rcar e6050980.gpio: driving 25 GPIOs [ 0.897578] gpio_rcar e6051180.gpio: driving 17 GPIOs [ 0.898432] gpio_rcar e6051980.gpio: driving 19 GPIOs [ 0.899288] gpio_rcar dfd90180.gpio: driving 31 GPIOs [ 0.900228] gpio_rcar dfd90980.gpio: driving 20 GPIOs [ 0.901057] gpio_rcar dfd91180.gpio: driving 24 GPIOs [ 0.901841] gpio_rcar dfd91980.gpio: driving 32 GPIOs [ 0.904780] i2c /dev entries driver [ 0.906629] i2c-rcar e6510000.i2c: probed [ 0.908153] i2c-rcar e66d8000.i2c: probed [ 0.909727] OF: /soc/i2c@e66e0000/vc7@9: could not find phandle [ 0.910045] i2c-rcar e66e0000.i2c: probed [ 0.915061] renesas_pcie_init_rc: ----------- set for INTC 64bit [ 0.915271] pcie-renesas e65d0000.pcie: host bridge /soc/pcie@e65d0000 ranges: [ 0.915338] pcie-renesas e65d0000.pcie: IO 0x00fe000000..0x00fe3fffff -> 0x0000000000 [ 0.915386] pcie-renesas e65d0000.pcie: MEM 0x0030000000..0x003fffffff -> 0x0030000000 [ 0.915425] pcie-renesas e65d0000.pcie: IB MEM 0x0040000000..0x00bfffffff -> 0x0040000000 [ 0.915692] dw_pcie_host_init: ======== msi_init = 0 [ 1.916385] pcie-renesas e65d0000.pcie: Phy link never came up [ 1.916438] pcie-renesas e65d0000.pcie: PCIe link down [ 1.916459] dw_pcie_msi_init: msi_target = 452554f8 [ 1.916697] pcie-renesas e65d0000.pcie: PCI host bridge to bus 0000:00 [ 1.916739] pci_bus 0000:00: root bus resource [bus 00-ff] [ 1.916760] pci_bus 0000:00: root bus resource [io 0x0000-0x3fffff] [ 1.916781] pci_bus 0000:00: root bus resource [mem 0x30000000-0x3fffffff] [ 1.916900] pci 0000:00:00.0: [1912:0031] type 01 class 0x060400 [ 1.917237] pci 0000:00:00.0: supports D1 [ 1.917265] pci 0000:00:00.0: PME# supported from D0 D1 D3hot D3cold [ 1.926763] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring [ 1.980784] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01 [ 1.980885] pci 0000:00:00.0: PCI bridge to [bus 01] [ 1.980975] pci 0000:00:00.0: Max Payload Size set to 256/ 256 (was 256), Max Read Rq 256 [ 1.981280] pciback 0000:00:00.0: of_irq_parse_pci: failed with rc=-22 [ 1.981447] pcieport 0000:00:00.0: of_irq_parse_pci: failed with rc=-22 [ 1.984727] pcieport 0000:00:00.0: PME: Signaling with IRQ 216 [ 1.988833] EINJ: ACPI disabled. [ 2.010338] xen:xen_evtchn: Event-channel device installed [ 2.020684] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled [ 2.024776] SuperH (H)SCI(F) driver initialized [ 2.025482] e6550000.serial: ttySC1 at MMIO 0xe6550000 (irq = 34, base_baud = 0) is a hscif [ 2.036646] cacheinfo: Unable to detect cache hierarchy for CPU 0 [ 2.038713] megasas: 07.714.04.00-rc1 [ 2.040381] ufshcd-renesas e6860000.scsi: ufshcd_populate_vreg: Unable to find vdd-hba-supply regulator, assuming enabled [ 2.040449] ufshcd-renesas e6860000.scsi: ufshcd_populate_vreg: Unable to find vcc-supply regulator, assuming enabled [ 2.040479] ufshcd-renesas e6860000.scsi: ufshcd_populate_vreg: Unable to find vccq-supply regulator, assuming enabled [ 2.040509] ufshcd-renesas e6860000.scsi: ufshcd_populate_vreg: Unable to find vccq2-supply regulator, assuming enabled [ 2.040599] ufshcd-renesas e6860000.scsi: invalid UFS version 0x300 [ 2.041703] scsi host0: ufshcd [ 2.053312] libphy: Fixed MDIO Bus: probed [ 2.055140] tun: Universal TUN/TAP device driver, 1.6 [ 2.057303] thunder_xcv, ver 1.0 [ 2.057426] thunder_bgx, ver 1.0 [ 2.057477] nicpf, ver 1.0 [ 2.059091] hclge is initializing [ 2.059166] hns3: Hisilicon Ethernet Network Driver for Hip08 Family - version [ 2.059189] hns3: Copyright (c) 2017 Huawei Corporation. [ 2.059396] e1000: Intel(R) PRO/1000 Network Driver [ 2.059421] e1000: Copyright (c) 1999-2006 Intel Corporation. [ 2.059686] e1000e: Intel(R) PRO/1000 Network Driver [ 2.059713] e1000e: Copyright(c) 1999 - 2015 Intel Corporation. [ 2.059787] igb: Intel(R) Gigabit Ethernet Network Driver [ 2.059805] igb: Copyright (c) 2007-2014 Intel Corporation. [ 2.059878] igbvf: Intel(R) Gigabit Virtual Function Network Driver [ 2.059899] igbvf: Copyright (c) 2009 - 2012 Intel Corporation. [ 2.060655] sky2: driver version 1.30 [ 2.069487] renesas_eth_sw e68c0000.ethernet tsn0 (uninitialized): MAC address 74:90:50:b0:fe:91 [ 2.072580] renesas_eth_sw e68c0000.ethernet rmon0 (uninitialized): MAC address 7e:2e:fc:de:49:16 [ 2.075703] renesas_eth_sw e68c0000.ethernet tsn1 (uninitialized): MAC address 32:15:63:8a:fe:28 [ 2.075853] renesas_eth_sw e68c0000.ethernet rmon1 (uninitialized): MAC address fe:4d:1e:81:a1:8f [ 2.078645] renesas_eth_sw e68c0000.ethernet tsn2 (uninitialized): MAC address 7a:b1:09:04:b8:75 [ 2.078770] renesas_eth_sw e68c0000.ethernet rmon2 (uninitialized): MAC address c2:40:80:85:7a:ac [ 2.082305] ufshcd-renesas e6860000.scsi: ufshcd_print_pwr_info:[RX, TX]: gear=[1, 1], lane[1, 1], pwr[SLOWAUTO_MODE, SLOWAUTO_MODE], rate = 0 [ 2.109552] ufshcd-renesas e6860000.scsi: ufshcd_print_pwr_info:[RX, TX]: gear=[4, 4], lane[1, 1], pwr[FASTAUTO_MODE, FASTAUTO_MODE], rate = 2 [ 2.109663] ufshcd-renesas e6860000.scsi: ufshcd_find_max_sup_active_icc_level: Regulator capability was not set, actvIccLevel=0 [ 2.110507] scsi 0:0:0:49488: Well-known LUN WDC SDINFDO4-128G 1002 PQ: 0 ANSI: 6 [ 2.112221] scsi 0:0:0:49476: Well-known LUN WDC SDINFDO4-128G 1002 PQ: 0 ANSI: 6 [ 2.118537] ufshcd-renesas e6860000.scsi: ufshcd_scsi_add_wlus: BOOT WLUN not found [ 2.118985] scsi 0:0:0:0: Direct-Access WDC SDINFDO4-128G 1002 PQ: 0 ANSI: 6 [ 2.120029] sd 0:0:0:0: Power-on or device reset occurred [ 2.121423] sd 0:0:0:0: [sda] 31256576 4096-byte logical blocks: (128 GB/119 GiB) [ 2.121592] sd 0:0:0:0: [sda] Write Protect is off [ 2.121628] sd 0:0:0:0: [sda] Mode Sense: 00 32 00 10 [ 2.121857] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, supports DPO and FUA [ 2.125979] GPT:Primary header thinks Alt. header is not at the end of the disk. [ 2.126041] GPT:1908991 != 31256575 [ 2.126056] GPT:Alternate GPT header not at the end of the disk. [ 2.126073] GPT:1908991 != 31256575 [ 2.126085] GPT: Use GNU Parted to correct GPT errors. [ 2.126142] sda: sda1 sda2 sda3 sda4 sda5 sda6 [ 2.129608] sd 0:0:0:0: [sda] Attached SCSI disk [ 4.086334] VFIO - User Level meta-driver version: 0.3 [ 4.090978] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 4.091054] ehci-pci: EHCI PCI platform driver [ 4.091144] ehci-platform: EHCI generic platform driver [ 4.091969] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver [ 4.092068] ohci-pci: OHCI PCI platform driver [ 4.092219] ohci-platform: OHCI generic platform driver [ 4.094069] usbcore: registered new interface driver usb-storage [ 4.108525] rcar_gen3_thermal e6198000.thermal: is using FUSE values [ 4.113195] rcar_gen3_thermal e6198000.thermal: TSC0: Loaded 1 trip points [ 4.117816] rcar_gen3_thermal e6198000.thermal: TSC1: Loaded 1 trip points [ 4.122394] rcar_gen3_thermal e6198000.thermal: TSC2: Loaded 1 trip points [ 4.127645] device-mapper: ioctl: 4.43.0-ioctl (2020-10-01) initialised: [email protected] [ 4.130431] sdhci: Secure Digital Host Controller Interface driver [ 4.130498] sdhci: Copyright(c) Pierre Ossman [ 4.132676] Synopsys Designware Multimedia Card Interface Driver [ 4.132933] renesas_sdhi_internal_dmac ee140000.mmc: Got CD GPIO [ 4.134612] sdhci-pltfm: SDHCI platform and OF driver helper [ 4.137843] ledtrig-cpu: registered to indicate activity on CPUs [ 4.139868] usbcore: registered new interface driver usbhid [ 4.139923] usbhid: USB HID core driver [ 4.143583] optee: probing for conduit method. [ 4.143698] optee: revision 3.17 [ 4.144137] optee driver R-Car Rev.1.0.11 [ 4.144559] optee: dynamic shared memory is enabled [ 4.145059] optee: initialized driver [ 4.150706] GACT probability NOT on [ 4.150792] Mirror/redirect action on [ 4.151655] netem: version 1.3 [ 4.151722] u32 classifier [ 4.151734] input device check on [ 4.151747] Actions configured [ 4.152655] NET: Registered protocol family 10 [ 4.154312] Segment Routing with IPv6 [ 4.154496] NET: Registered protocol family 17 [ 4.154577] 8021q: 802.1Q VLAN Support v1.8 [ 4.154745] 9pnet: Installing 9P2000 support [ 4.154843] Key type dns_resolver registered [ 4.155824] registered taskstats version 1 [ 4.155871] Loading compiled-in X.509 certificates [ 4.162869] thermal emergency: not set value [ 4.167701] renesas_sdhi_internal_dmac ee140000.mmc: Got CD GPIO [ 4.168008] clk: Not disabling unused clocks [ 4.168057] ALSA device list: [ 4.168076] No soundcards found. [ 4.217305] renesas_sdhi_internal_dmac ee140000.mmc: mmc0 base at 0x00000000ee140000, max clock rate 200 MHz [ 4.218788] Freeing unused kernel memory: 2944K [ 4.239605] Run /init as init process [ 4.239634] with arguments: [ 4.239637] /init [ 4.239641] with environment: [ 4.239643] HOME=/ [ 4.239646] TERM=linux [ 5.130544] random: fast init done [ 5.381434] EXT4-fs (sda5): recovery complete [ 5.381950] EXT4-fs (sda5): mounted filesystem with ordered data mode. Opts: (null) [ 5.506681] random: lvscan: uninitialized urandom read (4 bytes read) [ 5.679159] EXT4-fs (sda4): mounted filesystem with ordered data mode. Opts: (null) [ 6.016925] systemd[1]: systemd 244.5+ 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) [ 6.018320] systemd[1]: Detected virtualization xen. [ 6.018403] systemd[1]: Detected architecture arm64. [ 6.039860] systemd[1]: Set hostname to <s4sk-domd>. [ 6.268673] systemd[1]: Configuration file /lib/systemd/system/xenpcid.service.d/xenpcid-xenstore.conf is marked executable. Please remove executable permission bits. Proceeding anyway. [ 6.334205] systemd[1]: /lib/systemd/system/docker.socket:6: ListenStream= references a path below legacy directory /var/run/, updating /var/run/docker.sock \xe2\x86\x92 /run/docker.sock; please update the unit file accordingly. [ 6.478209] random: systemd: uninitialized urandom read (16 bytes read) [ 6.483938] systemd[1]: Created slice system-getty.slice. [ 6.485143] random: systemd: uninitialized urandom read (16 bytes read) [ 6.487928] systemd[1]: Created slice system-serial\x2dgetty.slice. [ 6.490980] systemd[1]: Created slice User and Session Slice. [ 6.492347] systemd[1]: Started Dispatch Password Requests to Console Directory Watch. [ 6.493575] systemd[1]: Started Forward Password Requests to Wall Directory Watch. [ 6.494777] systemd[1]: Reached target Paths. [ 6.495852] systemd[1]: Reached target Slices. [ 6.496702] systemd[1]: Reached target Swap. [ 6.498472] systemd[1]: Listening on Syslog Socket. [ 6.499896] systemd[1]: Listening on initctl Compatibility Named Pipe. [ 6.501720] systemd[1]: Listening on Journal Audit Socket. [ 6.503236] systemd[1]: Listening on Journal Socket (/dev/log). [ 6.505033] systemd[1]: Listening on Journal Socket. [ 6.506896] systemd[1]: Listening on Network Service Netlink Socket. [ 6.508598] systemd[1]: Listening on udev Control Socket. [ 6.510010] systemd[1]: Listening on udev Kernel Socket. [ 6.517741] systemd[1]: Mounting Huge Pages File System... [ 6.525547] systemd[1]: Mounting POSIX Message Queue File System... [ 6.533633] systemd[1]: Mounting Kernel Debug File System... [ 6.541540] systemd[1]: Mounting Temporary Directory (/tmp)... [ 6.549866] systemd[1]: Starting Create list of static device nodes for the current kernel... [ 6.559766] systemd[1]: Starting Journal Service... [ 6.569778] systemd[1]: Starting Load Kernel Modules... [ 6.688258] systemd[1]: Starting Remount Root and Kernel File Systems... [ 6.696968] systemd[1]: Starting udev Coldplug all Devices... [ 6.705344] systemd[1]: Starting Bind mount volatile /etc/nvme... [ 6.726571] systemd[1]: Started Journal Service. [ 6.726836] EXT4-fs (sda4): re-mounted. Opts: (null) [ 6.805438] systemd-journald[459]: Received client request to flush runtime journal. [ 6.819440] systemd-journald[459]: File /var/log/journal/f646ddb57f224d938b3cc30cda5a43f1/system.journal corrupted or uncleanly shut down, renaming and replacing. [ 6.882332] audit: type=1334 audit(1600598651.477:2): prog-id=5 op=LOAD [ 6.882898] audit: type=1334 audit(1600598651.477:3): prog-id=6 op=LOAD [ 7.769689] CAN device driver interface [ 7.790461] iccom: loading out-of-tree module taints kernel. [ 7.791969] rcar_canfd dff50000.can: can_clk rate is 40000000 [ 7.792763] rcar_canfd dff50000.can: device registered (channel 0) [ 7.792892] rcar_canfd dff50000.can: can_clk rate is 40000000 [ 7.793532] rcar_canfd dff50000.can: device registered (channel 1) [ 7.793601] rcar_canfd dff50000.can: global operational state (clk 1, fdmode 1) [ 7.798353] ICCOM driver initialization(R-Car Rev.1.0.0) [ 7.798997] iccom e6260000.iccom00: Got IRQ=97 [ 7.801671] iccom e6260000.iccom00: CTA area: start at 0x37fc9000, total size 0x2000 [ 7.805178] iccom e6260000.iccom00: Probe completed [ 7.805638] iccom e6260000.iccom01: Got IRQ=98 [ 7.812784] iccom e6260000.iccom01: CTA area: start at 0x37fc7000, total size 0x2000 [ 7.813512] iccom e6260000.iccom01: Probe completed [ 7.876715] at24 5-0050: supply vcc not found, using dummy regulator [ 7.898985] at24 5-0050: 2048 byte m24c16 EEPROM, writable, 16 bytes/write [ 8.769958] audit: type=1325 audit(1745395065.076:4): table=filter family=2 entries=0 op=xt_register pid=533 comm="modprobe" [ 8.771560] audit: type=1325 audit(1745395065.076:5): table=filter family=2 entries=4 op=xt_replace pid=532 comm="iptables-restor" [ 8.817412] audit: type=1334 audit(1745395065.124:6): prog-id=7 op=LOAD [ 8.818305] audit: type=1334 audit(1745395065.124:7): prog-id=8 op=LOAD [ 9.124529] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this. [ 9.201745] audit: type=1325 audit(1745395065.508:8): table=filter family=2 entries=4 op=xt_replace pid=570 comm="iptables" [ 9.223080] audit: type=1325 audit(1745395065.528:9): table=filter family=2 entries=5 op=xt_replace pid=571 comm="iptables" [ 9.227370] rswitch_get_phy_node PHY interface = sgmii [ 9.607539] random: crng init done [ 9.607634] random: 7 urandom warning(s) missed due to ratelimiting [ 10.545111] libphy: rswitch_mii: probed [ 10.634081] mv88x2110 etha1:02: Firmware version 8.5.0.0 [ 10.675520] mv88x2110 etha1:02: attached PHY driver [mv88x2110] (mii_bus:phy_addr=etha1:02, irq=POLL) [ 10.727885] rswitch_get_phy_node PHY interface = sgmii [ 10.729470] libphy: rswitch_mii: probed [ 10.814262] mv88x2110 etha0:01: Firmware version 8.5.0.0 [ 10.855526] mv88x2110 etha0:01: attached PHY driver [mv88x2110] (mii_bus:phy_addr=etha0:01, irq=POLL) [ 15.035554] renesas_eth_sw e68c0000.ethernet tsn0: Link is Up - 1Gbps/Full - flow control off [ 15.035684] IPv6: ADDRCONF(NETDEV_CHANGE): tsn0: link becomes ready [ 30.488614] Bridge firewalling registered [ 30.501414] audit: type=1325 audit(1745395647.355:10): table=nat family=2 entries=0 op=xt_register pid=655 comm="modprobe" [ 30.659462] audit: type=1325 audit(1745395647.511:11): table=nat family=2 entries=5 op=xt_replace pid=676 comm="iptables" [ 30.671626] audit: type=1325 audit(1745395647.523:12): table=filter family=2 entries=6 op=xt_replace pid=678 comm="iptables" [ 30.683587] audit: type=1325 audit(1745395647.535:13): table=filter family=2 entries=8 op=xt_replace pid=680 comm="iptables" [ 30.695255] audit: type=1325 audit(1745395647.547:14): table=filter family=2 entries=10 op=xt_replace pid=682 comm="iptables" [ 30.707350] audit: type=1325 audit(1745395647.559:15): table=filter family=2 entries=12 op=xt_replace pid=684 comm="iptables" [ 30.720701] audit: type=1325 audit(1745395647.575:16): table=filter family=2 entries=13 op=xt_replace pid=686 comm="iptables" [ 30.735775] Initializing XFRM netlink socket [ 30.780693] audit: type=1325 audit(1745395647.635:17): table=nat family=2 entries=7 op=xt_replace pid=694 comm="iptables" [ 30.797153] audit: type=1325 audit(1745395647.651:18): table=nat family=2 entries=8 op=xt_replace pid=696 comm="iptables" [ 30.817059] audit: type=1325 audit(1745395647.671:19): table=filter family=2 entries=14 op=xt_replace pid=699 comm="iptables" [ 31.542023] process 'docker/tmp/qemu-check801876085/check' started with executable stack [ 35.811554] SDHI Vcc: disabling [ 570.529538] rcar_canfd dff50000.can can1: channel 1 communication state failed [ 570.529636] A link change request failed with some changes committed already. Interface can1 may have been left with an inconsistent configuration, please check.
I'm not sure about the issue. But can you try to replace cr52_can_disable.srec with dummy_rtos.srec in the ICUMX loader package?
Hi DuyDang
I tried modifying the Flash_Bootloader_S4SK.ttl file from the ICUMX_Loader_and_Flashwriter_Package_for_R-Car_S4_Starter_Kit_SDKv3.16.5.zip as follows:
1. Changed the value of ARRAY_NUM to 7 and commented out bl31-s4sk.srec, tee-s4sk.srec, and u-boot-elf-s4sk.srec.
2. Changed the value of IMGNM[5] from dummy_g4mh_case0.srec to g4mh_can_unlock.srec.
As shown in the image.
The verification steps were as follows:
1. Executed the Flash_Bootloader_S4SK.ttl script in Tera Term.
2. Flashed s4sk.ufs.full.img.gz, which was built from the WIP/v5.4-support-canfd branch.
3. Performed boot verification.
I'm still encountering the same error. Could this be hardware-related? The S4SK board we are using has the following markings:
The label on the board says: Y-ASK-RCAR-S4-1000BASE-T#WS12 D019651#0210T V2.10
The PCB itself is printed with: Y-ASK-RCAR-S4-1000BASE-T D019650 06
Hi DuaDang
I also verified it on Spider board and hit the "Failed to start DomD" error. It seems that IRQ566 has already been used by domain0, which is causing the issue.
I updated the branch again to fix issue with Spider: renesas-rcar/whitebox-sdk at WIP/v5.4-support-canfd
About S4 SK, I'm using the same board but don't see this issue. Could you check the IPL flashing procedure:
I tried modifying the Flash_Bootloader_S4SK.ttl file from the ICUMX_Loader_and_Flashwriter_Package_for_R-Car_S4_Starter_Kit_SDKv3.16.5.zip as follows: 1. Changed the value of ARRAY_NUM to 7 and commented out bl31-s4sk.srec, tee-s4sk.srec, and u-boot-elf-s4sk.srec.
Changing dummy_g4mh_case0.srec to g4mh_can_unlock.srec is OK.
Sorry for the late reply — today is the first day back at work after the May Day Golden Week holiday. Since I had already flashed those firmware versions previously, I skipped that step during the earlier verification. Today, I went through the entire process again and replaced all the firmware with the versions you recommended, but unfortunately, the same issue still occurred. I've asked a colleague to help verify the patch as well, just in case I made a mistake during the process. I’ll get back to you once we have the results.
Hi DuaDang,
My colleague has completed the testing and encountered the same error. After many reboots, the command ip link set can1 up succeeded only once. Even during that single successful attempt, a bus-off error occurred when sending CAN messages.
If possible, could you please share the files you used (such as s4sk.ufs.full.img.gz, the SRECs file, etc.)? I'd like to try testing with the same files on our side.
thanks
Sorry, I cannot share the binary here. But your log looks like CAN are not enabled in the configuration GUI tool. I disabled it and it show the same bus-off error.
Please make sure you check all the below options.
When I first got the board, I followed the documentation and did some initial configuration, but I haven't looked at it again since. I didn't expect that additional settings would still be needed for CAN. After applying your suggestions, I was able to bring up the CAN1 interface, and that errors disappeared.
However, I'm now facing a new issue: CAN0 is not receiving the CAN FD messages sent from CAN1. Looking at the CAN1 status, there have been 57,758 bus errors. This seems like it could be related to the CAN bus or CAN configuration.
I also conducted tests using CANoe, and encountered the same error. The issue also persists on the Spider board. Are there any other settings that need to be configured?
That error is the same as CAN wires are not connected. Could you check the cable and connector CN9?
Hi Duy Dang,
By connecting can0 and can1 with a wire, communication between them now works correctly. What puzzled me is that, according to the code, can0 and can1 are actually two channels of canfd0. This suggests they should already be on the same CAN bus, like two devices on the same network. So why was it necessary to physically connect them with a wire?
In any case, the CAN functionality is now working. I'm very grateful to Mr. Duy Dang for his patient and persistent help throughout this process.
Here is a summary of the correct steps:
1. On the S4SK board, both can0 and can1 need to be enabled using the configuration tool.
2. On the device, can0 and can1 are not physically on the same CAN bus. To test communication between them, a physical wire must be used to connect the corresponding CAN interfaces.
3. Apply the earliest provided patch or use the WIP/v5.4-support-canfd branch to build the load.
4. Flash the built g4mh_can_unlock.srec and s4sk.ufs.full.img.gz to the device.
5. Use the following commands to verify functionality:
# ip link set can0 up type can bitrate 1000000 sample-point 0.75 dbitrate 1000000 dsample-point 0.80 fd on # ip link set can1 up type can bitrate 1000000 sample-point 0.75 dbitrate 1000000 dsample-point 0.80 fd on # candump can0 & # cansend can1 213##3.11.22.33.44.55
I would like to sincerely thank you for your invaluable support and patience throughout this process. Your guidance and assistance have been essential in getting everything up and running. I truly appreciate the time and effort you’ve dedicated to helping me solve the issue.
Once again, thank you so much for your help!