Hi,
Our product use R-car S4 and whitebox 5.1.
How to enable SPI(MSPI0CSS0) in dts and config?
Thanks!
Best Regards,
Johnny
Hi Jonny
To enable SPI in Linux, you can follow the manual in "R-Car S4 SDK Linux PKG with GCC compiler v3.16.2" package. Download it from: https://www.renesas.com/us/en/products/automotive-products/automotive-system-chips-socs/r-car-s4-automotive-system-chip-soc-car-servercommunication-gateway
I created a patch to enable and give control to driver domain. You can refer to it.
0001-ca55-Enable-SPI-for-DomD.patch
Duy Dang
Thanks! I will try it.
I can't get into DomD.
Please refer to following log.
(XEN) GICv3: Mapping ITS translation register to d1:addr=0x00000000f1050000 size=0x0000000000010000(XEN) IRQ 262 is already used by domain 0(XEN) gnttab_mark_dirty not implemented yet[FAILED] Failed to start DomD.See 'systemctl status domd.service' for details.[ OK ] Reached target Multi-User System.[ OK ] Started Reboot system by guest domain request. Starting Update UTMP about System Runlevel Changes...[ OK ] Started Update UTMP about System Runlevel Changes.[ 5.984557] random: crng init done[ 5.984952] random: 7 urandom warning(s) missed due to ratelimiting[ OK ] Started Load/Save Random Seed.
Poky (Yocto Project Reference Distro) 3.1.16 generic-armv8-xt-dom0 hvc0
generic-armv8-xt-dom0 login: rootroot@generic-armv8-xt-dom0:~# xl console DomDDomD is an invalid domain identifier (rc=-6)root@generic-armv8-xt-dom0:~#
Hi Jonny,
Which S4 board are you using (Spider or S4 Starter Kit)?
Did you make any modification before?
Sorry, I do something wrong.
I can get into DomD.
Can you give an example to contorl driver or send any signal through SPI?
We just want to test SPI interface. So after I patch successfully, how can I send signal to test SPI interface like scan SPI.
You can use spidev-test tool to check SPI interface.
Modify this file application_cpu/aos-rcar-gen4-patch.yaml
--- a/application_cpu/aos-rcar-gen4-patch.yaml +++ b/application_cpu/aos-rcar-gen4-patch.yaml @@ -32,6 +32,7 @@ - [IMAGE_INSTALL_append, " rps-setup"] - [IMAGE_INSTALL_append, " hw-routing-script"] - [IMAGE_INSTALL_append, " pktgen-script"] + - [IMAGE_INSTALL_append, " spidev-test"] - [USE_UFS, "%{USE_UFS}"] layers: - "%{META_WB_LAYER_PATH}/meta-rcar-whitebox/meta-rcar-common"
Rebuild the image:
./build_xenhypervisor.sh <board>
Hi
Is G4MH need to modified or enable anything?
No. You don't need to modify in G4MH