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

hwmv2: atmel_sam: Port to HWMv2 #68838

Merged
merged 12 commits into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 4 additions & 19 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,7 @@
# entries that are not covered by the MAINTAINERS file.

/soc/arm/aspeed/ @aspeeddylan
/soc/arm/atmel_sam/common/*_sam4l_*.c @nandojve
/soc/arm/atmel_sam/sam3x/ @ioannisg
/soc/arm/atmel_sam/sam4e/ @nandojve
/soc/arm/atmel_sam/sam4l/ @nandojve
/soc/arm/atmel_sam/sam4s/ @fallrisk
/soc/arm/atmel_sam/same70/ @nandojve
/soc/arm/atmel_sam/samv71/ @nandojve
/soc/atmel/ @nandojve
/soc/arm/bcm*/ @sbranden
/soc/arm/infineon_cat1/ @ifyall @npal-cy
/soc/arm/infineon_xmc/ @parthitce
Expand Down Expand Up @@ -101,11 +95,7 @@
/boards/arm/rpi_pico/ @yonsch
/boards/arm/ronoth_lodev/ @NorthernDean
/boards/arm/xmc45_relax_kit/ @parthitce
/boards/arm/sam4e_xpro/ @nandojve
/boards/arm/sam4l_ek/ @nandojve
/boards/arm/sam4s_xplained/ @fallrisk
/boards/arm/sam_e70_xplained/ @nandojve
/boards/arm/sam_v71_xult/ @nandojve
/boards/atmel/ @nandojve
/boards/arm/scobc_module1/ @yashi
/boards/arm/v2m_beetle/ @fvincenzo
/boards/arm/olimexino_stm32/ @ydamigos
Expand Down Expand Up @@ -411,13 +401,7 @@
/dts/arc/ @abrodkin @ruuddw @iriszzw @evgeniy-paltsev
/dts/arm/acsip/ @NorthernDean
/dts/arm/aspeed/ @aspeeddylan
/dts/arm/atmel/sam4e* @nandojve
/dts/arm/atmel/sam4l* @nandojve
/dts/arm/atmel/samr21.dtsi @benpicco
/dts/arm/atmel/sam*5*.dtsi @benpicco
/dts/arm/atmel/same70* @nandojve
/dts/arm/atmel/samv71* @nandojve
/dts/arm/atmel/ @galak
/dts/arm/atmel/ @galak @nandojve
/dts/arm/broadcom/ @sbranden
/dts/arm/cypress/ @ifyall @npal-cy
/dts/arm/gd/ @nandojve
Expand Down Expand Up @@ -475,6 +459,7 @@
/dts/bindings/counter/snps,dw-timers.yaml @pbalsundar
/dts/bindings/wifi/*esp-at.yaml @mniestroj
/dts/bindings/*/*gd32* @nandojve
/dts/bindings/*/*sam* @nandojve
/dts/bindings/*/*npcx* @MulinChao @ChiHuaL
/dts/bindings/*/*psoc6* @ifyall @npal-cy
/dts/bindings/*/*infineon*cat1* @ifyall @npal-cy
Expand Down
5 changes: 2 additions & 3 deletions MAINTAINERS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3383,10 +3383,9 @@ Microchip SAM Platforms:
- mnkp
- stephanosio
files:
- boards/arm/atsam*/
- boards/arm/sam*/
- boards/atmel/
- dts/arm/atmel/
- soc/arm/atmel_sam*/
- soc/atmel/
- drivers/*/*sam*.c
- dts/bindings/*/atmel,*
labels:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# Arduino Due Board configuration

# Copyright (c) 2017 Justin Watson
# SPDX-License-Identifier: Apache-2.0

config BOARD_ARDUINO_DUE
bool "Arduino Due Board"
depends on SOC_PART_NUMBER_SAM3X8E
select SOC_SAM3X8E
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ identifier: arduino_due
name: Arduino Due
type: mcu
arch: arm
ram: 96
flash: 512
toolchain:
- zephyr
- gnuarmemb
- xtools
flash: 512
ram: 96
supported:
- watchdog
- gpio
- arduino_i2c
- gpio
- watchdog
vendor: arduino
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
# SPDX-License-Identifier: Apache-2.0

CONFIG_SOC_SERIES_SAM3X=y
CONFIG_SOC_PART_NUMBER_SAM3X8E=y
CONFIG_BOARD_ARDUINO_DUE=y
CONFIG_ARM_MPU=y
CONFIG_HW_STACK_PROTECTION=y
CONFIG_WDT_DISABLE_AT_BOOT=y

CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_SOC_ATMEL_SAM3X_EXT_MAINCK=y
CONFIG_WDT_DISABLE_AT_BOOT=y

# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
5 changes: 5 additions & 0 deletions boards/arduino/arduino_due/board.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
board:
name: arduino_due
vendor: arduino
socs:
- name: sam3x8e
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ See `Arduino Due website`_ and `Atmel SAM3X8E Datasheet`_ for a complete
list of Arduino Due board hardware features.

The default configuration can be found in the Kconfig
:zephyr_file:`boards/arm/arduino_due/arduino_due_defconfig`.
:zephyr_file:`boards/arduino/arduino_due/arduino_due_defconfig`.

.. note::
For I2C, pull-up resistors are required for using SCL1 and SDA1 (near IO13).
Expand Down
10 changes: 10 additions & 0 deletions boards/atmel/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. _boards-atmel:

Atmel Corporation
#################

.. toctree::
:maxdepth: 1
:glob:

**/*
9 changes: 9 additions & 0 deletions boards/atmel/sam/sam4e_xpro/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright (c) 2024 Gerson Fernando Budke <nandojve@gmail.com>
# SPDX-License-Identifier: Apache-2.0

if NETWORKING

config NET_L2_ETHERNET
default y

endif # NETWORKING
5 changes: 5 additions & 0 deletions boards/atmel/sam/sam4e_xpro/Kconfig.sam4e_xpro
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright (c) 2019-2024 Gerson Fernando Budke
# SPDX-License-Identifier: Apache-2.0

config BOARD_SAM4E_XPRO
select SOC_SAM4E16E
5 changes: 5 additions & 0 deletions boards/atmel/sam/sam4e_xpro/board.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
board:
name: sam4e_xpro
vendor: atmel
socs:
- name: sam4e16e
Original file line number Diff line number Diff line change
Expand Up @@ -44,25 +44,35 @@ features:
+-----------+------------+-------------------------------------+
| SYSTICK | on-chip | systick |
+-----------+------------+-------------------------------------+
| UART | on-chip | serial port |
| GPIO | on-chip | gpio |
+-----------+------------+-------------------------------------+
| USART | on-chip | serial port |
| AFEC | on-chip | adc |
+-----------+------------+-------------------------------------+
| COUNTER | on-chip | counter |
+-----------+------------+-------------------------------------+
| ETHERNET | on-chip | ethernet |
+-----------+------------+-------------------------------------+
| HWINFO | on-chip | hwinfo |
+-----------+------------+-------------------------------------+
| HSMCI | on-chip | sdhc |
+-----------+------------+-------------------------------------+
| I2C | on-chip | i2c |
+-----------+------------+-------------------------------------+
| PWM | on-chip | pwm |
+-----------+------------+-------------------------------------+
| SPI | on-chip | spi |
+-----------+------------+-------------------------------------+
| ETHERNET | on-chip | ethernet |
| UART | on-chip | serial port |
+-----------+------------+-------------------------------------+
| WATCHDOG | on-chip | watchdog |
| USART | on-chip | serial port |
+-----------+------------+-------------------------------------+
| GPIO | on-chip | gpio |
| WATCHDOG | on-chip | watchdog |
+-----------+------------+-------------------------------------+

Other hardware features are not currently supported by Zephyr.

The default configuration can be found in the Kconfig
:zephyr_file:`boards/arm/sam4e_xpro/sam4e_xpro_defconfig`.
:zephyr_file:`boards/atmel/sam/sam4e_xpro/sam4e_xpro_defconfig`.

Connections and IOs
===================
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022-2023, Gerson Fernando Budke <nandojve@gmail.com>
* Copyright (c) 2022-2024, Gerson Fernando Budke <nandojve@gmail.com>
* SPDX-License-Identifier: Apache-2.0
*/

Expand Down Expand Up @@ -105,5 +105,4 @@
<PA27C_HSMCI_MCDA3>;
};
};

};
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,19 @@ toolchain:
- zephyr
- gnuarmemb
- xtools
flash: 1024
ram: 128
supported:
- netif:eth
- adc
- counter
- gpio
- spi
- hwinfo
- i2c
- netif:eth
- pwm
- sdhc
- spi
- uart
- watchdog
- xpro_gpio
- xpro_i2c
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
# SPDX-License-Identifier: Apache-2.0

CONFIG_SOC_SERIES_SAM4L=y
CONFIG_SOC_PART_NUMBER_SAM4LC4C=y
CONFIG_BOARD_SAM4L_EK=y
CONFIG_BUILD_OUTPUT_HEX=y

CONFIG_ARM_MPU=y
CONFIG_HW_STACK_PROTECTION=y
CONFIG_WDT_DISABLE_AT_BOOT=y

CONFIG_CONSOLE=y
CONFIG_GPIO=y
CONFIG_SERIAL=y
CONFIG_UART_CONSOLE=y
5 changes: 5 additions & 0 deletions boards/atmel/sam/sam4l_ek/Kconfig.sam4l_ek
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright (c) 2020-2024 Gerson Fernando Budke <nandojve@gmail.com>
# SPDX-License-Identifier: Apache-2.0

config BOARD_SAM4L_EK
select SOC_SAM4LC4C
5 changes: 5 additions & 0 deletions boards/atmel/sam/sam4l_ek/board.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
board:
name: sam4l_ek
vendor: atmel
socs:
- name: sam4lc4c
Original file line number Diff line number Diff line change
Expand Up @@ -61,29 +61,33 @@ The sam4l_ek board configuration supports the following hardware features:
+-----------+------------+-------------------------------------+
| Interface | Controller | Driver/Component |
+===========+============+=====================================+
| GPIO | on-chip | gpio |
+-----------+------------+-------------------------------------+
| HWINFO | on-chip | Unique 120 bit serial number |
+-----------+------------+-------------------------------------+
| MPU | on-chip | arch/arm |
+-----------+------------+-------------------------------------+
| NVIC | on-chip | arch/arm |
+-----------+------------+-------------------------------------+
| SPI | on-chip | spi |
+-----------+------------+-------------------------------------+
| SYSTICK | on-chip | systick |
+-----------+------------+-------------------------------------+
| TRNG | on-chip | 32-bit True Random Number Generator |
| COUNTER | on-chip | counter |
+-----------+------------+-------------------------------------+
| GPIO | on-chip | gpio |
+-----------+------------+-------------------------------------+
| HWINFO | on-chip | Unique 120 bit serial number |
+-----------+------------+-------------------------------------+
| SPI | on-chip | spi |
+-----------+------------+-------------------------------------+
| TRNG | on-chip | entropy |
+-----------+------------+-------------------------------------+
| TWIM | on-chip | i2c master port-interrupt |
+-----------+------------+-------------------------------------+
| USART | on-chip | serial port |
+-----------+------------+-------------------------------------+
| USB | on-chip | usb device |
+-----------+------------+-------------------------------------+

Other hardware features are not currently supported by Zephyr.

The default configuration can be found in the Kconfig
:zephyr_file:`boards/arm/sam4l_ek/sam4l_ek_defconfig`.
:zephyr_file:`boards/atmel/sam/sam4l_ek/sam4l_ek_defconfig`.

Connections and IOs
===================
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,20 @@ identifier: sam4l_ek
name: SAM4L-EK
type: mcu
arch: arm
flash: 256
ram: 32
toolchain:
- zephyr
- gnuarmemb
- xtools
flash: 256
ram: 32
supported:
- counter
- gpio
- entropy
- hwinfo
- i2c
- spi
- usart
- uart
- usb
- usb_device
vendor: atmel
8 changes: 8 additions & 0 deletions boards/atmel/sam/sam4l_ek/sam4l_ek_defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# SPDX-License-Identifier: Apache-2.0

CONFIG_ARM_MPU=y
CONFIG_HW_STACK_PROTECTION=y

CONFIG_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_UART_CONSOLE=y
5 changes: 5 additions & 0 deletions boards/atmel/sam/sam4s_xplained/Kconfig.sam4s_xplained
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright (c) 2024 Gerson Fernando Budke <nandojve@gmail.com>
# SPDX-License-Identifier: Apache-2.0

config BOARD_SAM4S_XPLAINED
select SOC_SAM4S16C
5 changes: 5 additions & 0 deletions boards/atmel/sam/sam4s_xplained/board.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
board:
name: sam4s_xplained
vendor: atmel
socs:
- name: sam4s16c
Loading
Loading