s4sk: Add Linux CANFD driver 88/29988/3
authorDuy Dang <duy.dang.yw@renesas.com>
Wed, 12 Jun 2024 07:01:22 +0000 (14:01 +0700)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Tue, 25 Jun 2024 10:13:42 +0000 (10:13 +0000)
commitce55e2d760c3877ca754e24dfe76c16eb09ada68
tree91edc6d70b58be42a59ea06144434f7d561d7863
parent2676c9fe38d813cfdb38ba67da2377e798559850
s4sk: Add Linux CANFD driver

Add a patch to support CANFD driver for S4SK. Since CANFD does
not work without bus protection unlock program running on G4MH,
this feature is disabled by default.

To enable this patch, add to local.conf:
MACHINE_FEATURES:append = " canfd"

Unlock program on TrampolineOS:
https://github.com/renesas-rcar/whitebox-sdk/tree/wip/v5.x_CAN_unlock_app
Please clone this repo and follow the guideline to build:
- Download CC-RH compiler:
https://www.renesas.com/us/en/software-tool/c-compiler-package-rh850-family#downloads
- Move it to tool directory:
  $ cp CC-RH_V20500_setup-doc.zip ./whitebox-sdk/tool
- Install compiler and tools:
  $ cd ./whitebox-sdk/tool
  $ ./setup_wine.sh
  $ ./setup_csp.sh CC-RH_V20500_setup-doc.zip
- Build unlock program:
  $ cd ./whitebox-sdk/mcu/
  $ ./build_trampoline.sh s4sk

The output file is: whitebox-sdk/mcu/deploy/g4mh_can_unlock.srec
Follow flashing guideline in: https://elinux.org/R-Car/Boards/S4SK#How_to_flash.2Fupdate_the_loader
and replace the file dummy_g4mh_case0.srec with the output file.

Bug-AGL: SPEC-5175
Change-Id: If43d857e7dbd6abe0fa928894e036ffedba80234
Signed-off-by: Duy Dang <duy.dang.yw@renesas.com>
Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/29988
Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Tested-by: Jenkins Job builder account
ci-image-build: Jenkins Job builder account
ci-image-boot-test: Jenkins Job builder account
meta-agl-bsp/conf/include/agl_s4sk.inc
meta-agl-bsp/meta-rcar-gateway/recipes-kernel/linux/linux-renesas/0001-Porting-to-support-device-driver-Canfd-from-Control-.patch [new file with mode: 0644]
meta-agl-bsp/meta-rcar-gateway/recipes-kernel/linux/linux-renesas_%.bbappend