Skip to content

Add realtek rts5817 soc #91486

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

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Conversation

RtkFP
Copy link

@RtkFP RtkFP commented Jun 12, 2025

This PR adds support for the RTS5817 fingerprint chip from Reatek, which is specially designed for fingerprint applications.

This PR includes initial support for the RTS5817 MAA evaluation board, with drivers as follows:

  • clock_control
  • reset
  • pinctrl
  • watchdog

Please review these commits.
Thanks!

Copy link

Hello @RtkFP, and thank you very much for your first pull request to the Zephyr project!
Our Continuous Integration pipeline will execute a series of checks on your Pull Request commit messages and code, and you are expected to address any failures by updating the PR. Please take a look at our commit message guidelines to find out how to format your commit messages, and at our contribution workflow to understand how to update your Pull Request. If you haven't already, please make sure to review the project's Contributor Expectations and update (by amending and force-pushing the commits) your pull request if necessary.
If you are stuck or need help please join us on Discord and ask your question there. Additionally, you can escalate the review when applicable. 😊

@RtkFP RtkFP force-pushed the add_rts5817_soc branch 2 times, most recently from a20c396 to 124c8a0 Compare June 12, 2025 11:08
Comment on lines 3 to 4
series:
- name: rts5817
Copy link
Collaborator

@nordicjm nordicjm Jun 12, 2025

Choose a reason for hiding this comment

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

(non blocking comment) note you don't need a series, you can just have soc, or family and soc

Copy link
Author

Choose a reason for hiding this comment

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

We change it to family and soc

family:
- name: fingerprint
  socs:
  - name: rts5817


if BOARD_RTS5817_MAA_EVB

config BOARD
Copy link
Collaborator

Choose a reason for hiding this comment

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

file to go

Copy link
Author

Choose a reason for hiding this comment

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

I delete the BOARD config, is it right?

Copy link
Collaborator

Choose a reason for hiding this comment

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

convert to webp, put through https://tinypng.com/

Copy link
Author

Choose a reason for hiding this comment

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

Done

Comment on lines 39 to 61
For now, the following board hardware features are supported by implemented drivers:

+-------------------+------------+----------------------+
| Interface | Controller | Driver/Component |
+===================+============+======================+
| CLOCK | on-chip | clock_control |
+-------------------+------------+----------------------+
| FLASH | on-chip | flash |
+-------------------+------------+----------------------+
| GPIO | on-chip | gpio |
+-------------------+------------+----------------------+
| SPI(M/S) | on-chip | spi |
+-------------------+------------+----------------------+
| UART | on-chip | serial |
+-------------------+------------+----------------------+
| USB | on-chip | USB device |
+-------------------+------------+----------------------+
| WDT | on-chip | watchdog |
+-------------------+------------+----------------------+
| PUF | on-chip | puf |
+-------------------+------------+----------------------+
| Temperature sensor| on-chip | sensor |
+-------------------+------------+----------------------+
Copy link
Collaborator

Choose a reason for hiding this comment

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

replace with hw directive block

Copy link
Author

Choose a reason for hiding this comment

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

I have replaced it

# Copyright (c) 2024 Realtek Semiconductor, Inc.
# SPDX-License-Identifier: Apache-2.0

# enable clocks
Copy link
Collaborator

Choose a reason for hiding this comment

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

capitalise first letter of comments

Copy link
Author

Choose a reason for hiding this comment

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

Done

Comment on lines 7 to 17
# enable reset
CONFIG_RESET=y

# enable serial console
CONFIG_SERIAL=y
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y

# enable watchdog
CONFIG_WATCHDOG=y
CONFIG_WDT_DISABLE_AT_BOOT=y
Copy link
Collaborator

Choose a reason for hiding this comment

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

why is reset and watchdog needed?

Copy link
Author

Choose a reason for hiding this comment

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

Becase the watchdog is enabled by default, we have to disable it if we don`t use it, or the system will be reset by the watchdog.
And the reset driver is needed by uart, because it needs to be released from reset state before using it.

@RtkFP
Copy link
Author

RtkFP commented Jun 16, 2025

Hi, @nordicjm sorry to bother you.
I have modified some code and force pushed 3 days ago, but some CI checks are still pending. Do you know why?
Thanks!

@nordicjm
Copy link
Collaborator

Hi, @nordicjm sorry to bother you. I have modified some code and force pushed 3 days ago, but some CI checks are still pending. Do you know why? Thanks!

Needs to be manually approved, have approved it and results should available soon

@nordicjm nordicjm self-requested a review June 16, 2025 07:43
@decsny decsny removed their request for review June 17, 2025 14:35
@RtkFP RtkFP force-pushed the add_rts5817_soc branch from 84adb48 to 85e6e29 Compare June 18, 2025 09:14
@github-actions github-actions bot added the area: UART Universal Asynchronous Receiver-Transmitter label Jun 18, 2025
@github-actions github-actions bot requested a review from dcpleung June 18, 2025 09:15
@RtkFP RtkFP force-pushed the add_rts5817_soc branch 2 times, most recently from c09a47e to 34f320d Compare June 20, 2025 10:11
Comment on lines 10 to 12
set(VERSION ${APPVERSION})
else()
set(VERSION 0)
Copy link
Collaborator

Choose a reason for hiding this comment

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

use a lowercase variable for this, uppercase is global

Copy link
Author

Choose a reason for hiding this comment

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

done

Comment on lines 1 to 2
# Copyright (c) 2024 Realtek Semiconductor, Inc.
# SPDX-License-Identifier: Apache-2.0
Copy link
Collaborator

Choose a reason for hiding this comment

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

delete file

Copy link
Author

Choose a reason for hiding this comment

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

done

@RtkFP
Copy link
Author

RtkFP commented Jun 23, 2025

Hi, @nordicjm , this PR is failed at the Maintainer file check[https://github.com/zephyrproject-rtos/zephyr/actions/runs/15776606080/job/44474298748?pr=91486], and I notice that this check is recently added. What can I do to pass the check?
Thanks!

@nordicjm
Copy link
Collaborator

Hi, @nordicjm , this PR is failed at the Maintainer file check[https://github.com/zephyrproject-rtos/zephyr/actions/runs/15776606080/job/44474298748?pr=91486], and I notice that this check is recently added. What can I do to pass the check? Thanks!

You have added yourself to the file but you are not part of the zephyr organisation, you would need to request access under issues

@keith-zephyr
Copy link
Collaborator

@nashif - here is an instance matching the discussion at the Process WG. A new SoC added by a brand new contributor.

This PR won't make the 4.2 release cutoff, so we can potentially decide on the new process and use this PR as a proof of concept.

@RtkFP RtkFP force-pushed the add_rts5817_soc branch from 34f320d to 1112726 Compare July 10, 2025 02:21
@RtkFP RtkFP requested a review from nordicjm July 10, 2025 02:22
Copy link
Collaborator

@nordicjm nordicjm left a comment

Choose a reason for hiding this comment

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

changes OK after update to use soc hook

Comment on lines 33 to 40
static int realtek_rts5817_init(void)
{
cache_init();

return 0;
}

SYS_INIT(realtek_rts5817_init, PRE_KERNEL_1, 0);
Copy link
Collaborator

Choose a reason for hiding this comment

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

use soc hooks

Copy link
Author

Choose a reason for hiding this comment

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

done

RtkFP added 11 commits July 15, 2025 14:23
Add support for the rts5817 MCU

Signed-off-by: Darcy Lu <darcy_lu@realsil.com.cn>
Add clock/interrupt/pinctrl/reset dt-bindings headers for RTS5817

Signed-off-by: Darcy Lu <darcy_lu@realsil.com.cn>
Add Device Tree include files for RTS5817.

Signed-off-by: Darcy Lu <darcy_lu@realsil.com.cn>
Add tool to genarate images of RTS5817 after post build stage

Signed-off-by: Darcy Lu <darcy_lu@realsil.com.cn>
Add flash runner script to support west flash for rts5817

Signed-off-by: Darcy Lu <darcy_lu@realsil.com.cn>
Add clock control driver for RTS5817

Signed-off-by: Darcy Lu <darcy_lu@realsil.com.cn>
Add reset driver for RTS5817

Signed-off-by: Darcy Lu <darcy_lu@realsil.com.cn>
Add pin controller driver for RTS5817

Signed-off-by: Darcy Lu <darcy_lu@realsil.com.cn>
Add watchdog driver for RTS5817

Signed-off-by: Darcy Lu <darcy_lu@realsil.com.cn>
Add support for rts5817_maa_evb board

Signed-off-by: Darcy Lu <darcy_lu@realsil.com.cn>
This commit adds maintainer of Realtek fingerprint SoC to maintainers.yml

Signed-off-by: Darcy Lu <darcy_lu@realsil.com.cn>
@RtkFP RtkFP force-pushed the add_rts5817_soc branch from 1112726 to 867caa7 Compare July 15, 2025 06:25
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants