Skip to content
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

Add MAX78000 SoC and its EVKIT and FTHR boards. #83976

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

Conversation

yasinustunerg
Copy link

This PR adds MAX78000 and its EVKIT and FTHR boards.

Supported interfaces:

  • UART
  • GPIO
  • Clock control
  • Flash
  • Watchdog
  • TRNG
  • DMA
  • PWM
  • ADC
  • SPI
  • I2C
  • Counter
  • 1-Wire

Signed-off-by: Yasin Ustuner [email protected]

Copy link

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

@yasinustunerg yasinustunerg changed the title soc: adi: Add the MAX78000 SoC Add MAX78000 SoC and its EVKIT and FTHR boards. Jan 14, 2025
@zephyrbot
Copy link
Collaborator

zephyrbot commented Jan 14, 2025

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

Name Old Revision New Revision Diff
hal_adi zephyrproject-rtos/hal_adi@b1a1023 (main) zephyrproject-rtos/hal_adi#13 zephyrproject-rtos/hal_adi#13/files

DNM label due to: 1 project with PR revision

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

@zephyrbot zephyrbot added manifest manifest-hal_adi DNM This PR should not be merged (Do Not Merge) labels Jan 14, 2025
@yasinustunerg yasinustunerg marked this pull request as ready for review January 14, 2025 21:45
@zephyrbot zephyrbot added area: DMA Direct Memory Access area: PWM Pulse Width Modulation platform: ADI Analog Devices, Inc. area: ADC Analog-to-Digital Converter (ADC) area: W1 1-Wire area: GPIO area: SPI SPI bus area: Counter area: Samples Samples labels Jan 14, 2025
/ {
soc {
pinctrl: pin-controller@40008000 {

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

Copy link
Author

Choose a reason for hiding this comment

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

Done

/omit-if-no-ref/ wakeup_p3_1: wakeup_p3_1 {
pinmux = <MAX32_PINMUX(3, 1, AF2)>;
};

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

Copy link
Author

Choose a reason for hiding this comment

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

Done

clocks = <&gcr ADI_MAX32_CLOCK_BUS2 2>;
clock-source = <ADI_MAX32_PRPH_CLK_SRC_IBRO>;
prescaler = <1>;
pwm {
Copy link
Collaborator

Choose a reason for hiding this comment

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

non-uniform spacing here and below

Copy link
Author

Choose a reason for hiding this comment

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

Done

# SPDX-License-Identifier: Apache-2.0

zephyr_include_directories(${ZEPHYR_BASE}/drivers)
zephyr_include_directories(common)
zephyr_sources(soc.c)

zephyr_linker_sources_ifdef(CONFIG_SOC_FLASH_MAX32 SECTIONS flash.ld)
zephyr_linker_sources_ifdef(CONFIG_SOC_MAX78002 SECTIONS max78002.ld)
if (CONFIG_SOC_MAX78000 OR CONFIG_SOC_MAX78002)
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
if (CONFIG_SOC_MAX78000 OR CONFIG_SOC_MAX78002)
if(CONFIG_SOC_MAX78000 OR CONFIG_SOC_MAX78002)

Copy link
Author

Choose a reason for hiding this comment

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

Done

* Copyright (c) 2024 Analog Devices, Inc.
* Copyright (c) 2025 Analog Devices, Inc.
Copy link
Collaborator

Choose a reason for hiding this comment

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

but the file hasn't had any changes?

Copy link
Author

Choose a reason for hiding this comment

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

The name of the file is changed so I changed the date. Do we need to change the date when only change the content of the file?


leds {
compatible = "gpio-leds";
led1: led_1 {
Copy link
Collaborator

Choose a reason for hiding this comment

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

non-uniform spacing here and below

Copy link
Author

Choose a reason for hiding this comment

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

Done

};
pb_wakeup: pb_wakeup {
gpios = <&gpio3 1 (GPIO_PULL_UP | GPIO_ACTIVE_LOW
| MAX32_GPIO_VSEL_VDDIOH)>;
Copy link
Collaborator

Choose a reason for hiding this comment

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

indent is off

Copy link
Author

Choose a reason for hiding this comment

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

Done


leds {
compatible = "gpio-leds";
led1: led_1 {
Copy link
Collaborator

Choose a reason for hiding this comment

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

non-uniform spacing

Copy link
Author

Choose a reason for hiding this comment

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

Done

Add MAX78000 SoC files to the hal_adi repository.

Signed-off-by: Yasin Ustuner <[email protected]>
This commit adds MAX78000 SoC
and dts files.

Signed-off-by: Yasin Ustuner <[email protected]>
The SystemCoreClock variable must be placed in the '.shared' section for
the MAX78000 and MAX78002 because the ARM core is responsible for changing
the System Clock and updating the SystemCoreClock variable, and the
RISC-V core knows what the System Clock frequency is through the
shared variable.

Signed-off-by: Yasin Ustuner <[email protected]>
This commit adds binding file for DMA slots.

Signed-off-by: Yasin Ustuner <[email protected]>
This commit adds MAX78000EVKIT board.

Signed-off-by: Yasin Ustuner <[email protected]>
Enable following tests for MAX78000EVKIT:
 - tests/drivers/adc/adc_api
 - tests/drivers/counter/counter_basic_api
 - tests/drivers/dma/chan_blen_transfer
 - tests/drivers/dma/loop_transfer
 - tests/drivers/gpio/gpio_basic_api
 - tests/drivers/pwm/pwm_api
 - tests/drivers/w1/w1_api

Signed-off-by: Yasin Ustuner <[email protected]>
Enable following sample for MAX78000EVKIT:
 - samples/drivers/counter/alarm

Signed-off-by: Yasin Ustuner <[email protected]>
This commit adds MAX78000FTHR board.

Signed-off-by: Yasin Ustuner <[email protected]>
Enable the following tests for MAX78000FTHR:

 - tests/drivers/adc/adc_api
 - tests/drivers/counter/counter_basic_api
 - tests/drivers/dma/chan_blen_transfer
 - tests/drivers/dma/loop_transfer
 - tests/drivers/gpio/gpio_basic_api
 - tests/drivers/pwm/pwm_api
 - tests/drivers/spi/spi_loopback
 - tests/drivers/w1/w1_api

Signed-off-by: Yasin Ustuner <[email protected]>
Enable following sample for MAX78000FTHR:
 - samples/drivers/counter/alarm

Signed-off-by: Yasin Ustuner <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ADC Analog-to-Digital Converter (ADC) area: Boards area: Counter area: DMA Direct Memory Access area: GPIO area: PWM Pulse Width Modulation area: Samples Samples area: SPI SPI bus area: W1 1-Wire DNM This PR should not be merged (Do Not Merge) manifest manifest-hal_adi platform: ADI Analog Devices, Inc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants