Skip to content

boards: shields: add support for rtk0eg0019b01002bj #92434

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

thenguyenyf
Copy link
Contributor

This PR to add support for Renesas RTK0EG0019B01002BJ Capacitive Application shield

Signed-off-by: The Nguyen the.nguyen.yf@renesas.com

Update rev of hal_renesas to add support for CTSU

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
Copy link
Contributor Author

@thenguyenyf thenguyenyf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to draft for waiting these PRs to merge first:

Copy link

github-actions bot commented Jul 1, 2025

The following west manifest projects have changed revision in this Pull Request:

Name Old Revision New Revision Diff
hal_renesas zephyrproject-rtos/hal_renesas@0769fe1 zephyrproject-rtos/hal_renesas#115 zephyrproject-rtos/hal_renesas#115/files

DNM label due to: 1 project with PR revision

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@github-actions github-actions bot added manifest manifest-hal_renesas DNM (manifest) This PR should not be merged (controlled by action-manifest) labels Jul 1, 2025
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as other PR, this is 130KiB of images

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nordicjm nordicjm requested a review from fabiobaltieri July 1, 2025 08:58
@fabiobaltieri fabiobaltieri requested a review from kartben July 1, 2025 14:03
Comment on lines 4 to 5
board_set_debugger_ifnset(jlink)
board_set_flasher_ifnset(jlink)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drop, these are part of the *.board.cmake files below already

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#ifndef ZEPHYR_INCLUDE_ZEPHYR_INPUT_INPUT_RENESAS_RA_CTSU_H_
#define ZEPHYR_INCLUDE_ZEPHYR_INPUT_INPUT_RENESAS_RA_CTSU_H_

#include "rm_touch.h"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should probably be #include <rm_touch.h>, normally this format is for files in the same directory

* @retval -ENOSYS in case INPUT_RENESAS_RA_QE_TOUCH_CFG was not enabled
* @retval -errno on failure
*/
__syscall int renesas_ra_ctsu_group_configure(const struct device *dev,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does it need to be a syscall? you really want the userspace to configure it?

elements = <0>, <3>, <2>, <1>;
threshold = <711>;
event-code = <INPUT_ABS_WHEEL>;
status = "okay";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nodes are "okay" by default, no point specifying this in the example, this is designed to be instantiated on the board so this is redundant, same for the other ones

#define K_POLLING K_MSEC(CONFIG_INPUT_RENESAS_RA_CTSU_POLLING_INTERVAL_MS)
#define K_STABILIZATION K_USEC(CONFIG_INPUT_RENESAS_RA_CTSU_STABILIZATION_TIME_US)

static ALWAYS_INLINE void renesas_ra_ctsu_drv_handler(void *arg0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why always inline? I'd imagine the compiler is smart enough to optimize it by itself

the argument should probably just be aconst struct device * no point keep casting it back and forth

Comment on lines 561 to 568
static void renesas_ra_ctsu_thread##inst(void *dev, void *arg1, void *arg2) \
{ \
ARG_UNUSED(arg1); \
ARG_UNUSED(arg2); \
renesas_ra_ctsu_drv_handler(dev); \
} \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not just use renesas_ra_ctsu_drv_handler as argument for k_thread_create? there's no references to inst in the body

Comment on lines 107 to 108
#define K_POLLING K_MSEC(CONFIG_INPUT_RENESAS_RA_CTSU_POLLING_INTERVAL_MS)
#define K_STABILIZATION K_USEC(CONFIG_INPUT_RENESAS_RA_CTSU_STABILIZATION_TIME_US)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think K_ is the prefix for kernel function, no need to use it here, makes it sound like these are project-wide defines which they are not

This binding provides resources required for the LED matrix
on the RTK0EG0019B01002BJ board.

compatible: "rtk0eg0019b01002bj-led-matrix"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this meant to be here?

Comment on lines +7 to +33
/**************************************************************************************************
* File Name : qe_touch_config.c
* Description : This file includes module implementations.
**************************************************************************************************/
/**************************************************************************************************
* History : MM/DD/YYYY Version Description
* : 09/02/2019 1.00 First Release
* : 10/07/2019 1.00a Provisional Version for RA2L1
* : 12/26/2019 1.10 Corresponding for FSP V0.10.0
* : 02/20/2020 1.20 Corresponding for FSP V0.12.0
* : 02/26/2020 1.21 Adding information for Temperature Correction
* : 03/04/2020 1.30 Corresponding for FSP V1.0.0 RC0
* : 03/10/2020 1.31 Corresponding for FSP V1.0.0 RC1
* : 09/10/2020 1.40 Corresponding for FSP V2.0.0 Beta2
* : 05/26/2021 1.50 Adding Diagnosis Supporting
* : 06/01/2021 1.51 Fixing a Little
* : 07/15/2021 1.52 Fixing a Little
* : 08/20/2021 1.53 Fixing a Little
* : 11/13/2021 1.60 Adding information for Initial Offset Tuning
* : 03/31/2023 1.61 Improving Traceability
* : 04/18/2023 1.70 Adding 3 Frequency Judgement Supporting
* : 07/30/2024 1.80 Adding Auto Judgement Supporting
**************************************************************************************************/
/**************************************************************************************************
* Touch I/F Configuration File : quickstart_rssk_ra2l1_ep.tifcfg
* Tuning Log File : quickstart_rssk_ra2l1_ep_log_tuning20230904134024.log
**************************************************************************************************/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are not very relevant and very confusing, is this file generated? Just point that out

@thenguyenyf thenguyenyf force-pushed the renesas_rtk0eg0019b01002bj_shield_support branch 3 times, most recently from a2f9729 to 5d3ce19 Compare July 4, 2025 09:01
First commit to add support for Renesas RA Capasitive Sensing Unit

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
Add CTSU pin function selection for Renesas RA devices

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
Add device node support for Renesas RA SoCs

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
Enable support for CTSU button on ek_ra2a1 board

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
First commit to initial support for RSSK-RA2L1

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
First commit to initial support for RSSK-RA2L1

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
Add Capacitive Touch Application Board RTK0EG0019B01002BJ

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
This commit to enable rssk_ra2l1 build with rtk0eg0019b01002bj
shield.

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
First commit to add rtk0eg0019b01002bj shield sample

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
@thenguyenyf thenguyenyf force-pushed the renesas_rtk0eg0019b01002bj_shield_support branch from 5d3ce19 to 3fc788c Compare July 14, 2025 09:09
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DNM (manifest) This PR should not be merged (controlled by action-manifest) manifest manifest-hal_renesas
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants