-
Notifications
You must be signed in to change notification settings - Fork 8.1k
soc: arm: add FocalTech FT9001 SoC and evaluation board support #95959
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
base: main
Are you sure you want to change the base?
soc: arm: add FocalTech FT9001 SoC and evaluation board support #95959
Conversation
Hello @robert-cheng-1127, and thank you very much for your first pull request to the Zephyr project! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
split into multiple comments before this gets reviewed e.g. one for soc, one for board
Got it. I’ll split into multiple commits before review. |
ebf7b84
to
33f5fdf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a reason you can't use the generic reset driver?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I followed the stm32 pattern. I’ll try the generic reset driver first and see if it works for our case.
Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @decsny,
I tried switching to reset-mmio, but I ran into two blockers:
-
Binding mismatch
The currentreset-mmio.yaml
doesn’t definereset-cells: [ id ]
or includereset-controller.yaml
.
Because of that, DTS parsing fails with:unexpected 'reset-cells:' length in binding … 0 instead of 1
whenever a peripheral uses resets = <&rst_xxx bit>.
-
Init ordering
Our UART driver is PRE_KERNEL_1, but reset-mmio gets POST_KERNEL priority, causing dependency validation to fail.
The reset-mmio driver works functionally (I tested with tests/drivers/reset/mmio), but these integration issues prevent using it on our platform.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this driver is using spinlocks is why someone made it post-kernel, and I don't know why the binding is like this. These things I guess were missed in review. So fair enough, I guess we need another generic one that is not like this
33f5fdf
to
91b9e01
Compare
Rebased onto main and resolved Kconfig conflict. |
soc/focaltech/ft9001/Kconfig.soc
Outdated
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config SOC_FT9001 | ||
bool "FocalTech FT9001 MCU" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kconfig uses tabs, also remove prompt from this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the oversight. I’ll review and fix all Kconfig files in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not fixed e54fa19
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed: removed prompt and used tabs.
soc/focaltech/ft9001/ft9001_core.h
Outdated
/****** Cortex-M4 Processor Exceptions Numbers ****************************************************************/ | ||
NonMaskableInt_IRQn = -14, /*!< 2 Non Maskable Interrupt */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indent here is wrong
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not fixed, I'm going to abandon this review, can you fix the issues everyone has commented, update the existing commits with the fixes, force push then ping people when the issues have been addressed and is it ready to review?
And before doing that, please read and ensure code complies with the coding standards available at:
https://docs.zephyrproject.org/latest/contribute/style/code.html
https://docs.zephyrproject.org/latest/contribute/style/cmake.html
https://docs.zephyrproject.org/latest/contribute/style/devicetree.html
https://docs.zephyrproject.org/latest/contribute/style/kconfig.html
And also the SoC/board porting guides available at:
https://docs.zephyrproject.org/latest/hardware/porting/soc_porting.html
https://docs.zephyrproject.org/latest/hardware/porting/board_porting.html
And finally details for submitting PRs including squashing of commits (have not looked in this PR to see if things need squashing but acquainting with this guide is good): https://docs.zephyrproject.org/latest/contribute/contributor_expectations.html#pr-requirements
- Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed from SoC and moved to HAL module as requested.
bool "ft9001 MCU serial driver" | ||
default y | ||
depends on SERIAL | ||
select SERIAL_HAS_DRIVER |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where is the dt depends on?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
added DT dependency.
drivers/serial/Kconfig.focaltech
Outdated
serial communication protocols. | ||
|
||
if UART_FOCALTECH | ||
config UART_INTERRUPT_DRIVEN |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
newline line 18
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated config content.
drivers/serial/Kconfig.focaltech
Outdated
bool "Runtime configuration for UART controllers" | ||
default y | ||
help | ||
Enable runtime configuration of UART controllers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong ident and you are redeclaring an existing Kconfig
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks. done
}; | ||
}; | ||
|
||
status = "okay"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this here? What does this have to do with pinctrl?
&pinctrl { | ||
status = "disabled"; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was my mistake. I removed the wrong status and fixed it.
# Copyright (c) 2025, FocalTech Systems CO.,Ltd | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
board: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is this file?
# Copyright (c) 2025, FocalTech Systems CO.,Ltd | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
CONFIG_FLASH_LOAD_OFFSET=0x1000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this set here line 4?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @nordicjm,
This is required by our MCU’s secure boot. The ROM checks the first 4 KB of flash for configuration, and only after that it jumps to the application. That’s why the application needs to start at 0x1000, so we set CONFIG_FLASH_LOAD_OFFSET=0x1000 in the defconfig.
Do you think this is the right place to set it, or would you recommend another location?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put it into dts as a partition with a chosen node for code partition and set the CONFIG_USE_DT_CODE_PARTITION
Kconfig
CONFIG_FLASH_LOAD_OFFSET=0x1000 | ||
CONFIG_ARM_MPU=y | ||
CONFIG_HW_STACK_PROTECTION=y | ||
CONFIG_LOG=y |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logging is not a default option
soc/focaltech/ft9001/ft9001_core.h
Outdated
@@ -0,0 +1,129 @@ | |||
/* | |||
* Copyright (c) 2025, FocalTech Systems CO.,Ltd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file needs to be removed from in-tree; it contains much redundant stuff (like IRQ definitions, addresses, etc.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed from soc
b7e4e84
to
b032dc8
Compare
b032dc8
to
fdfe2f8
Compare
soc/focaltech/ft9001/Kconfig.soc
Outdated
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config SOC_FT9001 | ||
bool "FocalTech FT9001 MCU" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not fixed e54fa19
soc/focaltech/ft9001/ft9001_core.h
Outdated
/****** Cortex-M4 Processor Exceptions Numbers ****************************************************************/ | ||
NonMaskableInt_IRQn = -14, /*!< 2 Non Maskable Interrupt */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not fixed, I'm going to abandon this review, can you fix the issues everyone has commented, update the existing commits with the fixes, force push then ping people when the issues have been addressed and is it ready to review?
And before doing that, please read and ensure code complies with the coding standards available at:
https://docs.zephyrproject.org/latest/contribute/style/code.html
https://docs.zephyrproject.org/latest/contribute/style/cmake.html
https://docs.zephyrproject.org/latest/contribute/style/devicetree.html
https://docs.zephyrproject.org/latest/contribute/style/kconfig.html
And also the SoC/board porting guides available at:
https://docs.zephyrproject.org/latest/hardware/porting/soc_porting.html
https://docs.zephyrproject.org/latest/hardware/porting/board_porting.html
And finally details for submitting PRs including squashing of commits (have not looked in this PR to see if things need squashing but acquainting with this guide is good): https://docs.zephyrproject.org/latest/contribute/contributor_expectations.html#pr-requirements
- Thanks!
fdfe2f8
to
44c5aa9
Compare
The following west manifest projects have changed revision in this Pull Request:
✅ All manifest checks OK Note: This message is automatically posted and updated by the Manifest GitHub Action. |
7294461
to
cf5d947
Compare
a3576b7
to
fefd013
Compare
fefd013
to
47fb90f
Compare
Hi @nordicjm, @decsny, @gmarull and @nordic-krch — thanks for the feedback so far. I’ve addressed most comments and updated the commits; a few items are still under review. Much appreciated! Changes since last review
|
47fb90f
to
dadd691
Compare
Add devicetree bindings for the FocalTech FT9001 SoC: - Clock controller - Reset controller - UART These bindings are required by the SoC and drivers added in subsequent commits. Headers are placed under include/zephyr/dt-bindings/. Signed-off-by: Robert Cheng <[email protected]>
dadd691
to
fb49b8c
Compare
Hi @kartben - thanks again for running the tests earlier. |
Add initial support for the FocalTech FT9001 ARM Cortex-M SoC including: - SoC Kconfig and dtsi integration points - Early init and core setup - Pinctrl base definitions This prepares the tree for the FT9001 board and drivers. Signed-off-by: Robert Cheng <[email protected]>
Add support for the FocalTech FT9001 evaluation board: - Board dts/dtsi and pinmux - defconfig and board.cmake - Basic documentation The board has been tested with the following Zephyr sample: – samples/hello_world Signed-off-by: Robert Cheng <[email protected]>
Introduce the base devicetree description for the FT9001 SoC. Signed-off-by: Robert Cheng <[email protected]>
Add clock control driver for the FocalTech FT9001 SoC. Signed-off-by: Robert Cheng <[email protected]>
Add reset controller driver for the FocalTech FT9001 SoC. Signed-off-by: Robert Cheng <[email protected]>
Add the UART driver for the FocalTech FT9001 SoC. Signed-off-by: Robert Cheng <[email protected]>
fb49b8c
to
03fd8d3
Compare
|
This PR adds support for the FT9001 fingerprint controller from FocalTech, which is specially designed for fingerprint sensor applications.
This PR includes initial support for the FT9001 evaluation board, with drivers as follows:
Note: Current implementation uses direct register operations as the FocalTech HAL is not yet integrated into modules/hal.