-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
zjian-zhang
wants to merge
8
commits into
zephyrproject-rtos:main
Choose a base branch
from
zjian-zhang:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
f7a6d37
west.yml: Add Realtek HAL as a new HAL module
zjian-zhang ad169d9
dts: arm: introduce amebadplus SOC Devicetree
zjian-zhang e21fd8f
soc: add realtek amebadplus SOC integration
zjian-zhang 52a1f61
drivers: pinctrl: add amebadplus pin controller driver
zjian-zhang c4cd77e
drivers: serial: add amebadplus loguart driver
zjian-zhang 2d9ed52
drivers: gpio: add amebadplus gpio driver
zjian-zhang f4e0e89
boards: add rtl872xda_evb board
zjian-zhang 8deea8d
MAINTAINERS: Add hal_realtek as a new HAL module
zjian-zhang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Copyright (c) 2024 Realtek Semiconductor Corp. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config BOARD_RTL872XDA_EVB | ||
select SOC_AMEBADPLUS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Copyright (c) 2024 Realtek Semiconductor Corp. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
board_runner_args(jlink "--device=Cortex-M55" "--speed=4000") | ||
|
||
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
board: | ||
name: rtl872xda_evb | ||
vendor: realtek | ||
socs: | ||
- name: amebadplus |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
.. zephyr:board:: rtl872xda_evb | ||
|
||
Overview | ||
******** | ||
|
||
The Realtek RTL8721Dx Series is a Combo SoC that supports dual-band Wi-Fi 4 (2.4GHz + 5GHz) and | ||
BLE 5.0 specifications. With excellent ultra-low power consumption, enhanced encryption strategy | ||
(PSA Level 2), and abundant peripheral resources, it is widely used in smart home appliance, | ||
line controller, smart door lock, battery camera, smart remote controller, Wi-Fi Speaker, Wi-Fi | ||
Full MAC NIC, BLE gateway, and smart POS, etc. For more information, check `RTL872XDA-EVB`_. | ||
|
||
The features include the following: | ||
|
||
- Dual cores: Real-M300 and Real-M200 | ||
- 512KB on-chip SRAM | ||
- 802.11 a/b/g/n 1 x 1, 2.4GHz + 5GHz | ||
- Supports BLE 5.0 | ||
- Peripheral Interface: | ||
|
||
- Multi-communication interfaces: SPI x 2, UART x 4, I2C x 2 | ||
- Hardware Key-Scan interface supports up to 8*8 (64) keys | ||
- Hardware IR transceiver can easily adapt to various IR protocols | ||
- Supports Real-Time Clock timer together with 10 basic timers | ||
- Supports 8 channels of PWM timer and 1 capture timer | ||
- Supports 7 channels of general 12-bit ADC and 1 channel of VBAT | ||
- Supports 4 channels of touch pad | ||
- Supports 8 independent channels of GDMA | ||
- Supports USB 2.0 full-speed device mode | ||
- Supports SDIO device with 1-bit and 4-bit mode | ||
- Embeds a serial LEDC to control the external LED lamps | ||
- Integrated Pixel Processing Engine (PPE) to process pixel data faster | ||
- Integrated OSPI display interface supports screens with OSPI/QSPI/SPI interfaces | ||
- Integrated audio codec supports 2 channels DMIC interface | ||
- I2S x 2: up to 384kHz sampling rate | ||
|
||
- Cryptographic hardware acceleration (TRNG, ECC, SHA-2, AES) | ||
|
||
For more information, Get application note and datasheet at `RTL8721Dx Series`_ depending on chip you use. | ||
|
||
Supported Features | ||
================== | ||
|
||
.. zephyr:board-supported-hw:: | ||
|
||
Building | ||
******** | ||
|
||
Here is an example for building the :zephyr:code-sample:`hello_world` application. | ||
|
||
.. zephyr-app-commands:: | ||
:zephyr-app: samples/hello_world | ||
:board: rtl872xda_evb | ||
:goals: buil | ||
|
||
Flashing | ||
******** | ||
|
||
When the build finishes, downloading images into flash by `AmebaImageTool`_: | ||
|
||
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. | ||
#. Connect chip and PC with USB wire. | ||
#. Choose the Device profiles according to the chip you use. | ||
#. Select the corresponding serial port and transmission baud rate. The default baud rate is 1500000. | ||
#. Select the images to be programmed and set the start address and end address according to the flash layout, refer to [ameba_flashcfg.c/Flash_layout]. | ||
#. Click the Download button and start. The progress bar will show the download progress of each image and the log window will show the operation status. | ||
|
||
.. note:: | ||
|
||
For an empty chip, the bootloader and app image shall be downloaded. | ||
|
||
Debugging | ||
********* | ||
|
||
Using SWD through PA30(SWD_CLK) and PA31(SWD_DAT). | ||
|
||
References | ||
********** | ||
|
||
.. _`RTL872XDA-EVB`: https://www.realmcu.com/en/Home/Product/add965ea-d661-4a63-9514-d18b6912f8ab# | ||
.. _`RTL8721Dx Series`: https://www.realmcu.com | ||
.. _`AmebaImageTool`: https://github.com/Ameba-AIoT/ameba-rtos/blob/master/tools/ameba/ImageTool/AmebaImageTool.exe |
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* Copyright (c) 2024 Realtek Semiconductor Corp. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include <zephyr/dt-bindings/pinctrl/amebadplus-pinctrl.h> | ||
|
||
&pinctrl { | ||
compatible = "realtek,ameba-pinctrl"; | ||
|
||
/* PA30 is SWD_CLK, PA31 is SWD_DAT(both pull-up internally) */ | ||
loguart_default: loguart_default { | ||
group1 { | ||
pinmux = <AMEBA_PINMUX('B', 4, AMEBA_LOG_UART)>, /* RXD */ | ||
<AMEBA_PINMUX('B', 5, AMEBA_LOG_UART)>; /* TXD */ | ||
bias-pull-up; | ||
}; | ||
}; | ||
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Copyright (c) 2024 Realtek Semiconductor Corp. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/dts-v1/; | ||
|
||
#include <realtek/amebadplus/amebadplus.dtsi> | ||
#include "rtl872xda_evb-pinctrl.dtsi" | ||
|
||
/ { | ||
model = "RealTek AmebaDplus RTL872XDA EVB"; | ||
compatible = "realtek,rtl872xda_evb"; | ||
|
||
chosen { | ||
zephyr,console = &loguart; | ||
zephyr,shell-uart = &loguart; | ||
zephyr,sram = &sram0; | ||
zephyr,flash = &flash0; | ||
}; | ||
}; | ||
|
||
/* 4MB flash */ | ||
&flash0 { | ||
reg = <0x0e000020 DT_SIZE_M(4)>; | ||
}; | ||
|
||
&loguart { | ||
status = "okay"; | ||
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Copyright (c) 2024 Realtek Semiconductor Corp. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
identifier: rtl872xda_evb | ||
name: Realtek rtl872xda evaluation board | ||
vendor: realtek | ||
type: mcu | ||
arch: arm | ||
toolchain: | ||
- zephyr | ||
- gnuarmemb | ||
ram: 512 | ||
flash: 4096 | ||
supported: | ||
- pinctrl | ||
- serial |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Copyright (c) 2024 Realtek Semiconductor Corp. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# Console | ||
CONFIG_CONSOLE=y | ||
CONFIG_UART_CONSOLE=y | ||
|
||
# Enable LogUart | ||
CONFIG_SERIAL=y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Copyright (c) 2024 Realtek Semiconductor Corp. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config GPIO_AMEBA | ||
bool "GPIO controller driver for Realtek Ameba series SoC" | ||
default y | ||
depends on DT_HAS_REALTEK_AMEBA_GPIO_ENABLED | ||
help | ||
Enable GPIO controller driver for Realtek Ameba series SoC | ||
|
||
config GPIO_DEBOUNCE_EN | ||
bool "Ameba GPIO Interrupt Debounce Enable" | ||
depends on GPIO_AMEBA | ||
default y | ||
help | ||
When Enable GPIO Interrupt Debounce, the external signal can be debounced to | ||
remove any spurious glitches that are less than one period(about 32us) of | ||
the external debouncing clock. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
so this device is completely unusable on linux or mac?
west flash
also cannot work?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.
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.