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

Merged
merged 10 commits into from
Jan 22, 2025

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 zephyrproject-rtos/hal_adi@a9ca7d1 (main) zephyrproject-rtos/[email protected]

All manifest checks OK

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
@kartben
Copy link
Collaborator

kartben commented Jan 21, 2025

this can be safely re-assigned to ADI platform maintainers :) Still needs a second +1 though

Comment on lines 44 to 70
&timer0 {
pwm {
pinctrl-0 = <&tmr0a_ioa_p0_2>;
pinctrl-names = "default";
};
};

&timer1 {
pwm {
pinctrl-0 = <&tmr1a_ioa_p0_14>;
pinctrl-names = "default";
};
};

&timer2 {
pwm {
pinctrl-0 = <&tmr2_ioa_p0_26>;
pinctrl-names = "default";
};
};

&timer3 {
pwm {
pinctrl-0 = <&tmr3a_ioa_p1_6>;
pinctrl-names = "default";
};
};
Copy link
Collaborator

Choose a reason for hiding this comment

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

Timer default pin setting shall not be part of SoC part, might be part of the board file.
There are multiple pin option for timer output, like for timer0
image
I think it shall not be restricted in SoC layer.

Copy link
Author

Choose a reason for hiding this comment

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

Hi @ozersa,

Removed, thanks.

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]>
Comment on lines 17 to 18
pinctrl-0 = <&owm_io_p0_6 &owm_pe_p0_7>;
pinctrl-names = "default";
Copy link
Collaborator

Choose a reason for hiding this comment

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

Will be better if it be moved into board file as spi/i2c....
Also while moving this to the board you should change the owm pins to P0.18 & P0.19 due to P0.6 & P0.7 conflicts with SPI.

Copy link
Author

Choose a reason for hiding this comment

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

Hi @ozersa ,

Done

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks for moving them to the board files, it is better.
Regarding my pin check request, I just checked EvKit and FTHR schematic,
For MAX78000FTHR there is no P0.18 pin out, so it is need to be P0.6 & P0.7

Copy link
Author

Choose a reason for hiding this comment

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

Fixed, thanks.

@yasinustunerg yasinustunerg force-pushed the Add-MAX78000-Board branch 2 times, most recently from 48eaa21 to 5714641 Compare January 22, 2025 14:07
@yasinustunerg yasinustunerg requested a review from ozersa January 22, 2025 14:14

board_runner_args(openocd --cmd-pre-init "source [find interface/cmsis-dap.cfg]")
board_runner_args(openocd --cmd-pre-init "source [find target/max78000.cfg]")
board_runner_args(openocd --cmd-pre-init "allow_low_pwr_dbg")
Copy link
Collaborator

@ozersa ozersa Jan 22, 2025

Choose a reason for hiding this comment

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

Just a note requires final version ADI openocd been used for "allow_low_pwr_dbg" parameter.

Copy link
Author

Choose a reason for hiding this comment

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

Removed

ozersa
ozersa previously approved these changes Jan 22, 2025
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]>
@kartben kartben merged commit 0689d6d into zephyrproject-rtos:main Jan 22, 2025
28 checks passed
Copy link

Hi @yasinustunerg!
Congratulations on getting your very first Zephyr pull request merged 🎉🥳. This is a fantastic achievement, and we're thrilled to have you as part of our community!

To celebrate this milestone and showcase your contribution, we'd love to award you the Zephyr Technical Contributor badge. If you're interested, please claim your badge by filling out this form: Claim Your Zephyr Badge.

Thank you for your valuable input, and we look forward to seeing more of your contributions in the future! 🪁

@yasinustunerg yasinustunerg deleted the Add-MAX78000-Board branch January 23, 2025 07:46
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 manifest manifest-hal_adi platform: ADI Analog Devices, Inc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants