-
Notifications
You must be signed in to change notification settings - Fork 7.8k
board: xhsc: hc32f4a0_evb: Add minimal supprot for hc32f4a0_evb board #94044
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?
Conversation
The following west manifest projects have changed revision in this Pull Request:
⛔ DNM label due to: 1 added project Note: This message is automatically posted and updated by the Manifest GitHub Action. |
4fffc40
to
d411de8
Compare
drivers/clock_control/Kconfig.hc32
Outdated
config CLOCK_CONTROL_HC32 | ||
bool "HC32 Clock Control" | ||
|
||
if CLOCK_CONTROL_HC32 | ||
|
||
config HC32_LL_CLK | ||
bool | ||
default 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.
I have no clue what is going on here but no, fix properly and use proper dependency
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 defined in modules/Kconfig.xhsc, and its default value is 'y'. Therefore, I deleted lines 7 to 14 in this file.
drivers/clock_control/Kconfig.hc32
Outdated
Select High Driver for XTAL32 | ||
|
||
config HC32_XTAL32_DRV_M | ||
bool "medium 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.
Capitalise first letter of prompt
drivers/clock_control/Kconfig.hc32
Outdated
bool "medium Driver" | ||
help | ||
Select medium Driver for XTAL32 | ||
endchoice |
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 missing on line 26
drivers/clock_control/Kconfig.hc32
Outdated
config HC32_XTAL32_DRV | ||
int | ||
default 0 if HC32_XTAL32_DRV_M | ||
default 1 if HC32_XTAL32_DRV_H |
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?
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.
These options configure the drive current strength of the external low-speed crystal based on varying capacitances.
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.
make them dts properties
drivers/serial/Kconfig.hc32
Outdated
default y | ||
depends on DT_HAS_XHSC_HC32_UART_ENABLED | ||
select SERIAL_HAS_DRIVER | ||
select HC32_LL_USART |
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.
tab not spaces for ident
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.
file is way too huge, needs to be far smaller, then save as webp and put through https://tinypng.com/
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.
Reduce the image file size from its original 716KB (1128x828, jpg) to a smaller size of 61KB (789x579, webp).
The board configuration supports the following hardware features: | ||
|
||
.. list-table:: | ||
:header-rows: 1 | ||
|
||
* - Peripheral | ||
- Kconfig option | ||
- Devicetree compatible | ||
* - GPIO | ||
- :kconfig:option:`CONFIG_GPIO` | ||
- :dtcompatible:`xhsc,hc32-gpio` | ||
* - NVIC | ||
- N/A | ||
- :dtcompatible:`arm,v7m-nvic` | ||
* - PINMUX | ||
- :kconfig:option:`CONFIG_PINCTRL` | ||
- :dtcompatible:`xhsc,hc32-pinctrl` | ||
* - USART | ||
* - :kconfig:option:`CONFIG_SERIAL` | ||
- :dtcompatible:`xhsc,hc32-uart` | ||
|
||
Other hardware features are not yet supported on this Zephyr port. |
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.
use hw directive tag
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=240000000 | ||
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000 | ||
CONFIG_HC32_DDL_DEBUG=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.
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=240000000 | |
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000 | |
CONFIG_HC32_DDL_DEBUG=y |
CONFIG_CONSOLE=y | ||
CONFIG_UART_CONSOLE=y | ||
CONFIG_SERIAL=y | ||
CONFIG_PINCTRL=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.
CONFIG_PINCTRL=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.
Moved to the soc/xhsc/hc32/hc32f4xx/Kconfig.
- name: hal_xhsc | ||
revision: 45f9eec3064663b992da9f1497aaaa8371bcb821 | ||
path: modules/hal/xhsc | ||
groups: | ||
- hal |
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 needs to come before things that need it
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,
May I ask, do you mean that we should first submit a PR for the manifest and MAINTAINERS files? After that pull request is merged, can we then submit the pull request for adding the board and SoC?
Or, do we simply need to adjust the commit sequence to move the manifest and MAINTAINERS to the first two commits?
Hi @nordicjm, thanks for your efficient checking and quick comments. Being new contributors, we made a lot of mistakes in the code. We will fix these bugs as soon as possible, and the fixed issues will be marked with a thumbs-up emoji! |
…_xhsc. Add levizh as maintainers, add Pengbiao12345, ETRD, greya5, JamieTx, TrackingRobot as collaborators for hal_xhsc. Signed-off-by: TrackingRobot <code9527@126.com>
Add HAL repository information for the first supported HC32F4A0_EVB and HC32F460_EVB. Signed-off-by: TrackingRobot <code9527@126.com>
This is the initial commit to support clock_control driver for XHSC HC32F4A0 Signed-off-by: TrackingRobot <code9527@126.com>
This is the initial commit to support gpio driver for XHSC HC32F4A0 Signed-off-by: TrackingRobot <code9527@126.com>
This is the initial commit to support pinctrl driver for XHSC HC32F4A0 Signed-off-by: TrackingRobot <code9527@126.com>
This is the initial commit to support interrupt controller Signed-off-by: TrackingRobot <code9527@126.com>
This is the initial commit to support USART driver for XHSC HC32F4A0 Signed-off-by: TrackingRobot <code9527@126.com>
Add support for XHSC HC32F4A0 Signed-off-by: TrackingRobot <code9527@126.com>
This adds minimal support for board HC32F4A0_EVB Signed-off-by: TrackingRobot <code9527@126.com>
bafafbc
to
dc898cb
Compare
|
In order to maintain the cleanliness of the submission, we had to use rebase and force push. |
This commit adds support for the hc32f4a0_evb board to print info by usart, including the necessary devicetree files, Kconfig configurations, peripherals and board-specific documentation.
The following changes about the board are included:
To implement console output, the following peripheral are supported: