Skip to content

soc: dts: drivers: add SoCs for amebadplus series #78036

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 8 commits into
base: main
Choose a base branch
from

Conversation

zjian-zhang
Copy link

@zjian-zhang zjian-zhang commented Sep 5, 2024

The amebadplus microcontroller (MCU) is an advanced system-on-chip (SoC) featuring an Arm® Cortex®-M55 and Cortex®-M23, large Flash and SRAM memories, and supports dual-band Wi-Fi 4(2.4GHz + 5GHz) and BLE5.0 specifications.

The initial support for the board includes GPIO, PINCTRL and Loguart(serial).

Copy link

github-actions bot commented Sep 5, 2024

Hello @zjian-zhang, 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. 😊

@zephyrbot
Copy link
Collaborator

zephyrbot commented Sep 5, 2024

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

Name Old Revision New Revision Diff
hal_realtek 🆕 N/A (Added) zjian-zhang/hal_realtek@fc06336 (main) N/A

DNM label due to: 1 added project

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

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.

Please read and follow the contribution guidelines https://docs.zephyrproject.org/latest/contribute/guidelines.html#contribute-guidelines we do not shove everything into a single commit for multiple areas, they must be distinct

@decsny decsny removed their request for review September 5, 2024 14:54
@jukkar jukkar removed their request for review September 10, 2024 08:29
@zephyrbot zephyrbot requested a review from de-nordic September 11, 2024 13:19
@zjian-zhang
Copy link
Author

Please help to check again if there are any problems. thanks.

@henrikbrixandersen henrikbrixandersen dismissed their stale review December 16, 2024 09:42

PR reduced to MVP as requested.

reg = <0x4100f000 0x100>;
interrupts = <27 0>;
current-speed = <1500000>;
status = "okay";
Copy link
Collaborator

Choose a reason for hiding this comment

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

disabled

compatible = "soc-nv-flash";
erase-block-size = <DT_SIZE_K(4)>;
write-block-size = <4>;
/* Flash size is specified in board dts */
Copy link
Collaborator

Choose a reason for hiding this comment

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

how can a board set the size of flash on a soc?

Copy link
Author

Choose a reason for hiding this comment

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

in 'boards/realtek/rtl872xda_evb/rtl872xda_evb.dts' we use

/* 4MB flash */
&flash0 {
	reg = <0x0e000020 DT_SIZE_M(4)>;
};

Copy link
Collaborator

Choose a reason for hiding this comment

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

But how? The flash is part of the SoC itself, how can it be defined at a board level?

Copy link
Author

Choose a reason for hiding this comment

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

The flash is part of the board, not the SoC.

return 0;
}

SYS_INIT(amebadplus_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


zephyr_include_directories(include)

# add_subdirectory(source)
Copy link
Collaborator

Choose a reason for hiding this comment

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

can go?

Comment on lines 11 to 12
* @brief Allocate memory from the heap. For FreeRTOS, map to pvPortMalloc
* The buffer value is random
Copy link
Collaborator

Choose a reason for hiding this comment

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

why are there comments about freertos?

Copy link
Author

Choose a reason for hiding this comment

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

already removed

* handle.
* @retval
*/
int rtos_mutex_create(rtos_mutex_t *pp_handle);
Copy link
Collaborator

Choose a reason for hiding this comment

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

@gmarull can you make heads or tails of this?

Copy link
Author

Choose a reason for hiding this comment

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

Our driver requires semaphore services provided by the OS. By using this interface, our driver can support different operating systems.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Why are the drivers not in zephyr in the drivers folder like every other vendor?

Copy link
Author

Choose a reason for hiding this comment

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

Apologies for the misunderstanding. The code in the HAL repositories requires these APIs, and the review comment in the HAL module request stating ‘Zephyr glue code is NOT allowed in HAL repositories’ necessitates moving these APIs to the Zephyr repository.

Supported Features
==================

Current Zephyr's board target ``rtl872xda_evb`` supports the following features:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Current Zephyr's board target ``rtl872xda_evb`` supports the following features:
Currently Zephyr's ``rtl872xda_evb`` board supports the following features:


See the ApplicationNote chapter Image Tool from documentation links for more details.

#. Environment Requirements: EX. WinXP, Win 7 or later, Microsoft .NET Framework 4.0.
Copy link
Collaborator

Choose a reason for hiding this comment

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

so this device is completely unusable on linux or mac? west flash also cannot work?

Copy link
Author

Choose a reason for hiding this comment

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

We currently do not support the ‘west flash’ command. In the future, we will provide a Python script to enable downloading across all platforms by loguart.

@@ -212,6 +214,12 @@ manifest:
path: modules/hal/quicklogic
groups:
- hal
- name: hal_realtek
Copy link
Collaborator

Choose a reason for hiding this comment

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

module commit needs to be before everything else, can't add code that uses a module before the module is present

Copy link
Author

@zjian-zhang zjian-zhang Dec 24, 2024

Choose a reason for hiding this comment

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

We submitted a HAL module request for hal_realtek, but it was not approved yet.

Copy link
Collaborator

Choose a reason for hiding this comment

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

it still needs to be the first commit here, you can amend the commit later when the HAL is approved and merged

Copy link
Author

Choose a reason for hiding this comment

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

Thank you, I have adjusted the submission order, but the HAL has not been approved by the TSC yet. Could you help prioritize the review with the TSC?

@zjian-zhang zjian-zhang force-pushed the main branch 2 times, most recently from 3dffaab to 8a6eadc Compare December 24, 2024 08:39
@fabiobaltieri fabiobaltieri added DNM (manifest) This PR should not be merged (controlled by action-manifest) and removed DNM This PR should not be merged (Do Not Merge) labels Feb 4, 2025
spic: flash-controller@40128000 {
compatible = "realtek,ameba-flash-controller";
reg = <0x40128000 0x200>;
/* interrupts = <51 0>; */
Copy link
Collaborator

Choose a reason for hiding this comment

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

line to go?

@@ -212,6 +214,12 @@ manifest:
path: modules/hal/quicklogic
groups:
- hal
- name: hal_realtek
Copy link
Collaborator

Choose a reason for hiding this comment

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

it still needs to be the first commit here, you can amend the commit later when the HAL is approved and merged

@zjian-zhang zjian-zhang force-pushed the main branch 2 times, most recently from 26bcfe3 to 9a62417 Compare February 17, 2025 12:35
@Kludentwo Kludentwo removed their request for review March 3, 2025 19:56
@zjian-zhang
Copy link
Author

Please help to check the issue. thanks a lot.

Realtek HAL (Hardware Abstraction Layer) provides
a low level peripheral configuration function.

Signed-off-by: zjian zhang <zjian_zhang@realsil.com.cn>
add initial version of devicetree for amebadplus SOC.
amebadplus devicetree file is main platform dtsi file, which should
be included from board dts (e.g rtl872xda_evb.dts)

Signed-off-by: zjian zhang <zjian_zhang@realsil.com.cn>
Add initial version of Amebadplus Soc integration

Signed-off-by: zjian zhang <zjian_zhang@realsil.com.cn>
add amebadplus pin controller driver

Signed-off-by: zjian zhang <zjian_zhang@realsil.com.cn>
loguart driver for amebadplus

Signed-off-by: zjian zhang <zjian_zhang@realsil.com.cn>
GPIO driver for amebadplus

Signed-off-by: zjian zhang <zjian_zhang@realsil.com.cn>
add initial version of rtl872xda_evb board

Signed-off-by: zjian zhang <zjian_zhang@realsil.com.cn>
This commit adds maintainers for hal_realtek repository

Signed-off-by: zjian zhang <zjian_zhang@realsil.com.cn>
Copy link

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

Successfully merging this pull request may close these issues.

10 participants