diff --git a/boards/adi/max32670evkit/Kconfig.max32670evkit b/boards/adi/max32670evkit/Kconfig.max32670evkit new file mode 100644 index 0000000000000..2ae479bd85614 --- /dev/null +++ b/boards/adi/max32670evkit/Kconfig.max32670evkit @@ -0,0 +1,7 @@ +# MAX32670EVKIT boards configuration + +# Copyright (c) 2024 Analog Devices, Inc. +# SPDX-License-Identifier: Apache-2.0 + +config BOARD_MAX32670EVKIT + select SOC_MAX32670 diff --git a/boards/adi/max32670evkit/board.cmake b/boards/adi/max32670evkit/board.cmake new file mode 100644 index 0000000000000..fc69d3635f195 --- /dev/null +++ b/boards/adi/max32670evkit/board.cmake @@ -0,0 +1,7 @@ +# Copyright (c) 2024 Analog Devices, Inc. +# SPDX-License-Identifier: Apache-2.0 + +board_runner_args(openocd --cmd-pre-init "source [find interface/cmsis-dap.cfg]") +board_runner_args(openocd --cmd-pre-init "source [find target/max32670.cfg]") + +include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake) diff --git a/boards/adi/max32670evkit/board.yml b/boards/adi/max32670evkit/board.yml new file mode 100644 index 0000000000000..1d0aabb39545d --- /dev/null +++ b/boards/adi/max32670evkit/board.yml @@ -0,0 +1,8 @@ +# Copyright (c) 2024 Analog Devices, Inc. +# SPDX-License-Identifier: Apache-2.0 + +board: + name: max32670evkit + vendor: adi + socs: + - name: max32670 diff --git a/boards/adi/max32670evkit/doc/img/max32670evkit.webp b/boards/adi/max32670evkit/doc/img/max32670evkit.webp new file mode 100644 index 0000000000000..9b5aa0a1f9061 Binary files /dev/null and b/boards/adi/max32670evkit/doc/img/max32670evkit.webp differ diff --git a/boards/adi/max32670evkit/doc/index.rst b/boards/adi/max32670evkit/doc/index.rst new file mode 100644 index 0000000000000..6a7fd87d800bd --- /dev/null +++ b/boards/adi/max32670evkit/doc/index.rst @@ -0,0 +1,194 @@ +.. _max32670_evkit: + +MAX32670EVKIT +############# + +Overview +******** +The MAX32670 evaluation kit (EV kit) provides a platform for evaluation capabilities +of the MAX32670. The MAX32670 is an ultra-low-power, cost-effective, highly reliable +32-bit microcontroller that enables designs with complex sensor processing without +compromising battery life. It combines a flexible and versatile power management unit +with the powerful Arm® Cortex®-M4 core with floating point unit (FPU). +The MAX32670 also offers legacy designs an easy and cost optimal upgradepath +from 8-bit or 16-bit microcontrollers. + +The Zephyr port is running on the MAX32670 MCU. + +.. image:: img/max32670evkit.webp + :align: center + :alt: MAX32670 EVKIT + +Hardware +******** + +- MAX32670 MCU: + + - High-Efficiency Microcontroller for Low-Power, High-Reliability Devices + + - Arm Cortex-M4 Core with FPU up to 100MHz + - 384KB Flash Memory with Error Correction + - 160KB SRAM (128KB with ECC Enabled),Optionally Preserved in Lowest Power Modes + - 16KB Unified Cache with ECC + + - UART Bootloader + + - Dual- or Single-Supply Operation + - Ultra-Low 0.9V to 1.1V VCORE Supply Voltage + - Internal LDO Operation from 1.7V to 3.6V SingleSupply + + - Wide Operating Temperature: -40°C to +105°C + + - Flexible Clocking Schemes + + - Internal High-Speed 100MHz Oscillator + - Internal Low-Power 7.3728MHz and Ultra-Low-Power 80kHz Oscillators + - 16MHz to 32MHz Oscillator (External CrystalRequired) + - 32.768kHz Oscillator (External Crystal Required) + - External Clock Input for the Core + - External Clock Input for the LPUART and LPTMR + + - Power Management Maximizes Uptime for Battery Applications + + - 44μA/MHz Active at 0.9V up to 12MHz + - 50μA/MHz Active at 1.1V up to 100MHz + - 2.6μA Full Memory Retention Power in BACKUPMode at VDD = 1.8V + - 350nA Ultra-Low-Power RTC at VDD = 1.8V + - Wake from LPUART or LPTMR + + - Optimal Peripheral Mix Provides Platform Scalability + + - Up to 31 General-Purpose I/O Pins + - Up to Three SPI Master/Slave (up to 50MHz) + - Up to Three 4-Wire UART + - One Low-Power UART (LPUART) + - Up to Three I2C Master/Slave 3.4Mbps High Speed + - 8-Channel Standard DMA Controller + - Up to Four 32-Bit Timers (TMR) + - Up to Two Low-Power 32-Bit Timers (LPTMR) + - Two Windowed Watchdog Timers + - One I2S Slave for Digital Audio Interface + + - Security and Integrity + + - Available Secure Boot + - AES 128/192/256 Hardware Acceleration Engine + - 32-Bit CRC Acceleration Engine + +- Benefits and Features of MAX32670EVKIT: + + - USB 2.0 Micro B to Serial UART Bridge + - UART0 and UART3 Interface is Selectable Through On-Board Jumpers + - On-Board MAX32625PICO-Based Debugger + - Boot Load Enable Circuitry + - SPI and I2C Signals Accessed Through 0.1in Headers + - GPIOs and Miscellaneous Signals Accessed Through 0.1in Headers + - Board Power Provided by USB Port + - On-Board SIMO Regulator and LDO for IC and Peripherals + - Individual Power Measurement on all IC Rails Through Jumpers + - Two General-Purpose LED and One GeneralPurpose Pushbutton Switch + +Supported Features +================== + +Below interfaces are supported by Zephyr on MAX32670EVKIT. + ++-----------+------------+-------------------------------------+ +| Interface | Controller | Driver/Component | ++===========+============+=====================================+ +| NVIC | on-chip | nested vector interrupt controller | ++-----------+------------+-------------------------------------+ +| SYSTICK | on-chip | systick | ++-----------+------------+-------------------------------------+ +| CLOCK | on-chip | clock and reset control | ++-----------+------------+-------------------------------------+ +| GPIO | on-chip | gpio | ++-----------+------------+-------------------------------------+ +| UART | on-chip | serial | ++-----------+------------+-------------------------------------+ + + +Connections and IOs +=================== + ++-----------+---------------+---------------+--------------------------------------------------------------------------------------------------+ +| Name | Name | Settings | Description | ++===========+===============+===============+==================================================================================================+ +| JP1 | P0_22 | | | +| | | +-----------+ | +-------------------------------------------------------------------------------+ | +| | | | Open | | | Disconnects red LED from P0_22. | | +| | | +-----------+ | +-------------------------------------------------------------------------------+ | +| | | | Close | | | Connects red to P0_22. | | +| | | +-----------+ | +-------------------------------------------------------------------------------+ | +| | | | | ++-----------+---------------+---------------+--------------------------------------------------------------------------------------------------+ +| JP2 | P0_23 | +-----------+ | +-------------------------------------------------------------------------------+ | +| | | | Open | | | Disconnects green LED from P0_23. | | +| | | +-----------+ | +-------------------------------------------------------------------------------+ | +| | | | Close | | | Connects green LED to P0_23. | | +| | | +-----------+ | +-------------------------------------------------------------------------------+ | +| | | | | ++-----------+---------------+---------------+--------------------------------------------------------------------------------------------------+ +| JP3 | P0_20 | +-----------+ | +-------------------------------------------------------------------------------+ | +| | P0_26 | | 2-1 | | | Connects the USB to serial port P0_8 (UART0_RX). | | +| | | +-----------+ | +-------------------------------------------------------------------------------+ | +| | | | 2-3 | | | Connects the USB to serial port P0_26 (LPUART0_RX). | | +| | | +-----------+ | +-------------------------------------------------------------------------------+ | +| | | | | ++-----------+---------------+---------------+--------------------------------------------------------------------------------------------------+ +| JP4 | P0_9 | +-----------+ | +-------------------------------------------------------------------------------+ | +| | P0_27 | | 2-1 | | | Connects the USB to serial port P0_9 (UART0_TX). | | +| | | +-----------+ | +-------------------------------------------------------------------------------+ | +| | | | 2-3 | | | Connects the USB to serial port P0_27 (LPUART0_TX). | | +| | | +-----------+ | +-------------------------------------------------------------------------------+ | +| | | | | ++-----------+---------------+---------------+--------------------------------------------------------------------------------------------------+ +| JP5 | VDD | +-----------+ | +-------------------------------------------------------------------------------+ | +| | | | Open | | | Disconnects power to VDD. | | +| | | +-----------+ | +-------------------------------------------------------------------------------+ | +| | | | Close | | | Connects power to VDD. | | +| | | +-----------+ | +-------------------------------------------------------------------------------+ | +| | | | | ++-----------+---------------+---------------+--------------------------------------------------------------------------------------------------+ +| JP6 | VCORE | +-----------+ | +-------------------------------------------------------------------------------+ | +| | | | Open | | | Disconnects power to VCORE. | | +| | | +-----------+ | +-------------------------------------------------------------------------------+ | +| | | | Close | | | Connects power to VCORE. | | +| | | +-----------+ | +-------------------------------------------------------------------------------+ | +| | | | | ++-----------+---------------+---------------+--------------------------------------------------------------------------------------------------+ +| JP7 | SIMO RSEL2 | +-----------+ | +-------------------------------------------------------------------------------+ | +| | | | 1-2 | | | Sets output 2 of the SIMO regulator to 0.9V. | | +| | | +-----------+ | +-------------------------------------------------------------------------------+ | +| | | | 3-4 | | | Sets output 2 of the SIMO regulator to 1.0V. | | +| | | +-----------+ | +-------------------------------------------------------------------------------+ | +| | | | 5-6 | | | Sets output 2 of the SIMO regulator to 1.1V. | | +| | | +-----------+ | +-------------------------------------------------------------------------------+ | +| | | | | ++-----------+---------------+---------------+--------------------------------------------------------------------------------------------------+ + +Programming and Debugging +************************* + +Flashing +======== + +The MAX32670 EVKIT integrates a MAX32625PICO based debugger for DAPLink functionality. + + +Once the debug probe is connected to your host computer, then you can simply run the +``west flash`` command to write a firmware image into flash. + +Debugging +========= + +Please refer to the `Flashing`_ section and run the ``west debug`` command +instead of ``west flash``. + +References +********** + +- `MAX32670EVKIT web page`_ + +.. _MAX32670EVKIT web page: + https://www.analog.com/en/design-center/evaluation-hardware-and-software/evaluation-boards-kits/max32670evkit.html diff --git a/boards/adi/max32670evkit/max32670evkit.dts b/boards/adi/max32670evkit/max32670evkit.dts new file mode 100644 index 0000000000000..5a2bb9afda866 --- /dev/null +++ b/boards/adi/max32670evkit/max32670evkit.dts @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2024 Analog Devices, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/dts-v1/; + +#include +#include +#include +#include + +/ { + model = "Analog Devices MAX32670EVKIT"; + compatible = "adi,max32670evkit"; + + chosen { + zephyr,console = &uart0; + zephyr,shell-uart = &uart0; + zephyr,sram = &sram3; + zephyr,flash = &flash0; + }; + + leds { + compatible = "gpio-leds"; + led1: led_1 { + gpios = <&gpio0 22 GPIO_ACTIVE_LOW>; + label = "Red LED"; + }; + led2: led_2 { + gpios = <&gpio0 23 GPIO_ACTIVE_LOW>; + label = "Blue LED"; + }; + }; + + buttons { + compatible = "gpio-keys"; + pb1: pb1 { + gpios = <&gpio0 21 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; + label = "SW2"; + zephyr,code = ; + }; + }; + + /* These aliases are provided for compatibility with samples */ + aliases { + led0 = &led1; + led1 = &led2; + sw0 = &pb1; + }; +}; + +&uart0 { + pinctrl-0 = <&uart0a_tx_p0_9 &uart0a_rx_p0_8>; + pinctrl-names = "default"; + current-speed = <115200>; + data-bits = <8>; + parity = "none"; + status = "okay"; +}; + +&clk_ipo { + status = "okay"; +}; + +&gpio0 { + status = "okay"; +}; + +&gpio1 { + status = "okay"; +}; diff --git a/boards/adi/max32670evkit/max32670evkit.yaml b/boards/adi/max32670evkit/max32670evkit.yaml new file mode 100644 index 0000000000000..1e7f8eb17f259 --- /dev/null +++ b/boards/adi/max32670evkit/max32670evkit.yaml @@ -0,0 +1,13 @@ +identifier: max32670evkit +name: max32670evkit +type: mcu +arch: arm +toolchain: + - zephyr + - gnuarmemb + - xtools +supported: + - gpio + - serial +ram: 160 +flash: 384 diff --git a/boards/adi/max32670evkit/max32670evkit_defconfig b/boards/adi/max32670evkit/max32670evkit_defconfig new file mode 100644 index 0000000000000..a048ab2608ff0 --- /dev/null +++ b/boards/adi/max32670evkit/max32670evkit_defconfig @@ -0,0 +1,13 @@ +# Copyright (c) 2024 Analog Devices, Inc. +# SPDX-License-Identifier: Apache-2.0 + +# Enable GPIO +CONFIG_GPIO=y + +# Console +CONFIG_CONSOLE=y +CONFIG_UART_CONSOLE=y + +# Enable UART +CONFIG_SERIAL=y +CONFIG_UART_INTERRUPT_DRIVEN=y diff --git a/dts/arm/adi/max32/max32670-pinctrl.dtsi b/dts/arm/adi/max32/max32670-pinctrl.dtsi new file mode 100644 index 0000000000000..29cf03f2aad9a --- /dev/null +++ b/dts/arm/adi/max32/max32670-pinctrl.dtsi @@ -0,0 +1,367 @@ +/* + * Copyright (c) 2024 Analog Devices, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include + +/ { + soc { + pinctrl: pin-controller@40008000 { + + /omit-if-no-ref/ swdio_p0_0: swdio_p0_0 { + pinmux = ; + }; + + /omit-if-no-ref/ tmr0c_ia_p0_0: tmr0c_ia_p0_0 { + pinmux = ; + }; + + /omit-if-no-ref/ swdclk_p0_1: swdclk_p0_1 { + pinmux = ; + }; + + /omit-if-no-ref/ tmr0c_o_p0_1: tmr0c_o_p0_1 { + pinmux = ; + }; + + /omit-if-no-ref/ spi0_miso_p0_2: spi0_miso_p0_2 { + pinmux = ; + }; + + /omit-if-no-ref/ uart1b_rx_p0_2: uart1b_rx_p0_2 { + pinmux = ; + }; + + /omit-if-no-ref/ tmr1c_ia_p0_2: tmr1c_ia_p0_2 { + pinmux = ; + }; + + /omit-if-no-ref/ spi0_mosi_p0_3: spi0_mosi_p0_3 { + pinmux = ; + }; + + /omit-if-no-ref/ uart1b_tx_p0_3: uart1b_tx_p0_3 { + pinmux = ; + }; + + /omit-if-no-ref/ tmr1c_oa_p0_3: tmr1c_oa_p0_3 { + pinmux = ; + }; + + /omit-if-no-ref/ spi0_sck_p0_4: spi0_sck_p0_4 { + pinmux = ; + }; + + /omit-if-no-ref/ uart1b_cts_p0_4: uart1b_cts_p0_4 { + pinmux = ; + }; + + /omit-if-no-ref/ tmr2c_ia_p0_4: tmr2c_ia_p0_4 { + pinmux = ; + }; + + /omit-if-no-ref/ spi0_ss0_p0_5: spi0_ss0_p0_5 { + pinmux = ; + }; + + /omit-if-no-ref/ uart1b_rts_p0_5: uart1b_rts_p0_5 { + pinmux = ; + }; + + /omit-if-no-ref/ tmr2c_oa_p0_5: tmr2c_oa_p0_5 { + pinmux = ; + }; + + /omit-if-no-ref/ div_clk_outa_p0_5: div_clk_outa_p0_5 { + pinmux = ; + }; + + /omit-if-no-ref/ i2c0_scl_p0_6: i2c0_scl_p0_6 { + pinmux = ; + }; + + /omit-if-no-ref/ lptmr0b_ia_p0_6: lptmr0b_ia_p0_6 { + pinmux = ; + }; + + /omit-if-no-ref/ tmr3c_ia_p0_6: tmr3c_ia_p0_6 { + pinmux = ; + }; + + /omit-if-no-ref/ i2c0_sda_p0_7: i2c0_sda_p0_7 { + pinmux = ; + }; + + /omit-if-no-ref/ lptmr0b_oa_p0_7: lptmr0b_oa_p0_7 { + pinmux = ; + }; + + /omit-if-no-ref/ tmr3c_oa_p0_7: tmr3c_oa_p0_7 { + pinmux = ; + }; + + /omit-if-no-ref/ uart0a_rx_p0_8: uart0a_rx_p0_8 { + pinmux = ; + }; + + /omit-if-no-ref/ i2s0_sdo_p0_8: i2s0_sdo_p0_8 { + pinmux = ; + }; + + /omit-if-no-ref/ tmr0c_ia_p0_8: tmr0c_ia_p0_8 { + pinmux = ; + }; + + /omit-if-no-ref/ uart0a_tx_p0_9: uart0a_tx_p0_9 { + pinmux = ; + }; + + /omit-if-no-ref/ i2s0_lrclk_p0_9: i2s0_lrclk_p0_9 { + pinmux = ; + }; + + /omit-if-no-ref/ tmr0c_oa_p0_9: tmr0c_oa_p0_9 { + pinmux = ; + }; + + /omit-if-no-ref/ uart0a_cts_p0_10: uart0a_cts_p0_10 { + pinmux = ; + }; + + /omit-if-no-ref/ i2s0_bclk_p0_10: i2s0_bclk_p0_10 { + pinmux = ; + }; + + /omit-if-no-ref/ tmr1c_ia_p0_10: tmr1c_ia_p0_10 { + pinmux = ; + }; + + /omit-if-no-ref/ div_clk_outb_p0_10: div_clk_outb_p0_10 { + pinmux = ; + }; + + /omit-if-no-ref/ uart0a_rts_p0_11: uart0a_rts_p0_11 { + pinmux = ; + }; + + /omit-if-no-ref/ i2s0_sdi_p0_11: i2s0_sdi_p0_11 { + pinmux = ; + }; + + /omit-if-no-ref/ tmr1c_oa_p0_11: tmr1c_oa_p0_11 { + pinmux = ; + }; + + /omit-if-no-ref/ i2c1_scl_p0_12: i2c1_scl_p0_12 { + pinmux = ; + }; + + /omit-if-no-ref/ ext_clk2_p0_12: ext_clk2_p0_12 { + pinmux = ; + }; + + /omit-if-no-ref/ tmr2c_ia_p0_12: tmr2c_ia_p0_12 { + pinmux = ; + }; + + /omit-if-no-ref/ ext_clk1_p0_12: ext_clk1_p0_12 { + pinmux = ; + }; + + /omit-if-no-ref/ i2c1_sda_p0_13: i2c1_sda_p0_13 { + pinmux = ; + }; + + /omit-if-no-ref/ cal32k_p0_13: cal32k_p0_13 { + pinmux = ; + }; + + /omit-if-no-ref/ tmr2c_oa_p0_13: tmr2c_oa_p0_13 { + pinmux = ; + }; + + /omit-if-no-ref/ spi1_ss0_p0_13: spi1_ss0_p0_13 { + pinmux = ; + }; + + /omit-if-no-ref/ spi1_miso_p0_14: spi1_miso_p0_14 { + pinmux = ; + }; + + /omit-if-no-ref/ uart2b_rx_p0_14: uart2b_rx_p0_14 { + pinmux = ; + }; + + /omit-if-no-ref/ tmr3c_ia_p0_14: tmr3c_ia_p0_14 { + pinmux = ; + }; + + /omit-if-no-ref/ spi1_mosi_p0_15: spi1_mosi_p0_15 { + pinmux = ; + }; + + /omit-if-no-ref/ uart2b_tx_p0_15: uart2b_tx_p0_15 { + pinmux = ; + }; + + /omit-if-no-ref/ tmr3c_oa_p0_15: tmr3c_oa_p0_15 { + pinmux = ; + }; + + /omit-if-no-ref/ spi1_sck_p0_16: spi1_sck_p0_16 { + pinmux = ; + }; + + /omit-if-no-ref/ uart2b_cts_p0_16: uart2b_cts_p0_16 { + pinmux = ; + }; + + /omit-if-no-ref/ tmr0c_ia_p0_16: tmr0c_ia_p0_16 { + pinmux = ; + }; + + /omit-if-no-ref/ spi1_ss0_p0_17: spi1_ss0_p0_17 { + pinmux = ; + }; + + /omit-if-no-ref/ uart2b_rts_p0_17: uart2b_rts_p0_17 { + pinmux = ; + }; + + /omit-if-no-ref/ tmr0c_oa_p0_17: tmr0c_oa_p0_17 { + pinmux = ; + }; + + /omit-if-no-ref/ i2c2_scl_p0_18: i2c2_scl_p0_18 { + pinmux = ; + }; + + /omit-if-no-ref/ tmr1c_ia_p0_18: tmr1c_ia_p0_18 { + pinmux = ; + }; + + /omit-if-no-ref/ i2c2_sda_p0_19: i2c2_sda_p0_19 { + pinmux = ; + }; + + /omit-if-no-ref/ tmr1c_oa_p0_19: tmr1c_oa_p0_19 { + pinmux = ; + }; + + /omit-if-no-ref/ cm4_rx_p0_20: cm4_rx_p0_20 { + pinmux = ; + }; + + /omit-if-no-ref/ tmr2c_ia_p0_20: tmr2c_ia_p0_20 { + pinmux = ; + }; + + /omit-if-no-ref/ swdclkb_p0_20: swdclkb_p0_20 { + pinmux = ; + }; + + /omit-if-no-ref/ cm4_tx_p0_21: cm4_tx_p0_21 { + pinmux = ; + }; + + /omit-if-no-ref/ tmr2c_oa_p0_21: tmr2c_oa_p0_21 { + pinmux = ; + }; + + /omit-if-no-ref/ lptmr1a_ia_p0_22: lptmr1a_ia_p0_22 { + pinmux = ; + }; + + /omit-if-no-ref/ tmr3c_ia_p0_22: tmr3c_ia_p0_22 { + pinmux = ; + }; + + /omit-if-no-ref/ swdiob_p0_22: swdiob_p0_22 { + pinmux = ; + }; + + /omit-if-no-ref/ lptmr1a_oa_p0_23: lptmr1a_oa_p0_23 { + pinmux = ; + }; + + /omit-if-no-ref/ tmr3c_oa_p0_23: tmr3c_oa_p0_23 { + pinmux = ; + }; + + /omit-if-no-ref/ lpuart0_cts_p0_24: lpuart0_cts_p0_24 { + pinmux = ; + }; + + /omit-if-no-ref/ uart0b_rx_p0_24: uart0b_rx_p0_24 { + pinmux = ; + }; + + /omit-if-no-ref/ tmr0c_ia_p0_24: tmr0c_ia_p0_24 { + pinmux = ; + }; + + /omit-if-no-ref/ lpuart0_rts_p0_25: lpuart0_rts_p0_25 { + pinmux = ; + }; + + /omit-if-no-ref/ uart0b_tx_p0_25: uart0b_tx_p0_25 { + pinmux = ; + }; + + /omit-if-no-ref/ tmr0c_oa_p0_25: tmr0c_oa_p0_25 { + pinmux = ; + }; + + /omit-if-no-ref/ lpuart0_rx_p0_26: lpuart0_rx_p0_26 { + pinmux = ; + }; + + /omit-if-no-ref/ uart0b_cts_p0_26: uart0b_cts_p0_26 { + pinmux = ; + }; + + /omit-if-no-ref/ tmr1c_ia_p0_26: tmr1c_ia_p0_26 { + pinmux = ; + }; + + /omit-if-no-ref/ lpuart0_tx_p0_27: lpuart0_tx_p0_27 { + pinmux = ; + }; + + /omit-if-no-ref/ uart0b_rts_p0_27: uart0b_rts_p0_27 { + pinmux = ; + }; + + /omit-if-no-ref/ tmr1c_oa_p0_27: tmr1c_oa_p0_27 { + pinmux = ; + }; + + /omit-if-no-ref/ uart1a_rx_p0_28: uart1a_rx_p0_28 { + pinmux = ; + }; + + /omit-if-no-ref/ tmr2c_ia_p0_28: tmr2c_ia_p0_28 { + pinmux = ; + }; + + /omit-if-no-ref/ uart1a_tx_p0_29: uart1a_tx_p0_29 { + pinmux = ; + }; + + /omit-if-no-ref/ tmr2c_oa_p0_29: tmr2c_oa_p0_29 { + pinmux = ; + }; + + /omit-if-no-ref/ uart1a_cts_p0_30: uart1a_cts_p0_30 { + pinmux = ; + }; + + /omit-if-no-ref/ tmr3c_ia_p0_30: tmr3c_ia_p0_30 { + pinmux = ; + }; + + }; + }; +}; diff --git a/dts/arm/adi/max32/max32670.dtsi b/dts/arm/adi/max32/max32670.dtsi new file mode 100644 index 0000000000000..f36c8758be29d --- /dev/null +++ b/dts/arm/adi/max32/max32670.dtsi @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2024 Analog Devices, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include + +&sram0 { + reg = <0x20000000 DT_SIZE_K(16)>; +}; + +&flash0 { + reg = <0x10000000 DT_SIZE_K(384)>; +}; + +&clk_inro { + clock-frequency = ; +}; + +/* MAX32670 extra peripherals. */ +/ { + soc { + sram1: memory@20004000 { + compatible = "mmio-sram"; + reg = <0x20004000 DT_SIZE_K(16)>; + }; + + sram2: memory@20008000 { + compatible = "mmio-sram"; + reg = <0x20008000 DT_SIZE_K(32)>; + }; + + sram3: memory@20010000 { + compatible = "mmio-sram"; + reg = <0x20010000 DT_SIZE_K(64)>; + }; + + sram4: memory@20020000 { + compatible = "mmio-sram"; + reg = <0x20020000 DT_SIZE_K(4)>; + }; + + sram5: memory@20021000 { + compatible = "mmio-sram"; + reg = <0x20021000 DT_SIZE_K(4)>; + }; + + sram6: memory@20022000 { + compatible = "mmio-sram"; + reg = <0x20022000 DT_SIZE_K(8)>; + }; + + sram7: memory@20024000 { + compatible = "mmio-sram"; + reg = <0x20024000 DT_SIZE_K(16)>; + }; + + uart3: serial@40145000 { + compatible = "adi,max32-uart"; + reg = <0x40145000 0x1000>; + clocks = <&gcr ADI_MAX32_CLOCK_BUS2 2>; + clock-source = ; + interrupts = <88 0>; + status = "disabled"; + }; + }; +}; diff --git a/soc/adi/max32/Kconfig b/soc/adi/max32/Kconfig index 7bfc9cff192d9..a6e6d06d4324d 100644 --- a/soc/adi/max32/Kconfig +++ b/soc/adi/max32/Kconfig @@ -14,6 +14,9 @@ config SOC_FAMILY_MAX32 config SOC_MAX32655 select CPU_CORTEX_M4 +config SOC_MAX32670 + select CPU_CORTEX_M4 + config SOC_MAX32672 select CPU_CORTEX_M4 diff --git a/soc/adi/max32/Kconfig.defconfig.max32670 b/soc/adi/max32/Kconfig.defconfig.max32670 new file mode 100644 index 0000000000000..a351d2706862d --- /dev/null +++ b/soc/adi/max32/Kconfig.defconfig.max32670 @@ -0,0 +1,14 @@ +# Analog Devices MAX32670 MCU + +# Copyright (c) 2024 Analog Devices, Inc. +# SPDX-License-Identifier: Apache-2.0 + +if SOC_MAX32670 + +config SYS_CLOCK_HW_CYCLES_PER_SEC + default $(dt_node_int_prop_int,/clocks/clk_ipo,clock-frequency) + +config NUM_IRQS + default 100 + +endif # SOC_MAX32670 diff --git a/soc/adi/max32/Kconfig.soc b/soc/adi/max32/Kconfig.soc index 53a4548fcaaf7..19743fc1a0d16 100644 --- a/soc/adi/max32/Kconfig.soc +++ b/soc/adi/max32/Kconfig.soc @@ -17,6 +17,10 @@ config SOC_MAX32655_M4 bool select SOC_MAX32655 +config SOC_MAX32670 + bool + select SOC_FAMILY_MAX32 + config SOC_MAX32672 bool select SOC_FAMILY_MAX32 @@ -39,6 +43,7 @@ config SOC_MAX32690_M4 config SOC default "max32655" if SOC_MAX32655 + default "max32670" if SOC_MAX32670 default "max32672" if SOC_MAX32672 default "max32680" if SOC_MAX32680 default "max32690" if SOC_MAX32690 diff --git a/soc/adi/max32/soc.yml b/soc/adi/max32/soc.yml index dd6f42d686087..65c999cc35cbe 100644 --- a/soc/adi/max32/soc.yml +++ b/soc/adi/max32/soc.yml @@ -7,6 +7,7 @@ family: - name: max32655 cpuclusters: - name: m4 + - name: max32670 - name: max32672 - name: max32680 cpuclusters: diff --git a/tests/drivers/gpio/gpio_basic_api/boards/max32670evkit.overlay b/tests/drivers/gpio/gpio_basic_api/boards/max32670evkit.overlay new file mode 100644 index 0000000000000..63d7fcd618125 --- /dev/null +++ b/tests/drivers/gpio/gpio_basic_api/boards/max32670evkit.overlay @@ -0,0 +1,13 @@ +/* + * Copyright (c) 2024 Analog Devices, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/ { + resources { + compatible = "test-gpio-basic-api"; + out-gpios = <&gpio0 2 0>; + in-gpios = <&gpio0 4 0>; + }; +};