-
Notifications
You must be signed in to change notification settings - Fork 8k
boards: add Arduino UNO Q #97118
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
facchinm
wants to merge
1
commit into
zephyrproject-rtos:main
Choose a base branch
from
arduino:unoq-pr
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
boards: add Arduino UNO Q #97118
Changes from all commits
Commits
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Copyright (c) 2025 Arduino SA | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config BOARD_ARDUINO_UNO_Q | ||
select SOC_STM32U585XX |
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,21 @@ | ||
# Copyright (c) 2025 Arduino SA | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
if BOARD_ARDUINO_UNO_Q | ||
|
||
config SPI_STM32_INTERRUPT | ||
default y | ||
depends on SPI | ||
|
||
if BUILD_WITH_TFM | ||
|
||
# Initial Attestation key provisioned by the BL1 bootloader | ||
config TFM_INITIAL_ATTESTATION_KEY | ||
default y | ||
|
||
config TFM_DUMMY_PROVISIONING | ||
default n | ||
|
||
endif # BUILD_WITH_TFM | ||
|
||
endif # BOARD_ARDUINO_UNO_Q |
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,40 @@ | ||
/* | ||
* Copyright (c) 2025 Arduino SA | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/ { | ||
arduino_header: connector { | ||
compatible = "arduino-header-r3"; | ||
#gpio-cells = <2>; | ||
gpio-map-mask = <0xffffffff 0xffffffc0>; | ||
gpio-map-pass-thru = <0 0x3f>; | ||
gpio-map = <0 0 &gpioa 4 0>, /* A0 */ | ||
<1 0 &gpioa 5 0>, /* A1 */ | ||
<2 0 &gpioa 6 0>, /* A2 */ | ||
<3 0 &gpioa 7 0>, /* A3 */ | ||
<4 0 &gpioc 1 0>, /* A4 */ | ||
<5 0 &gpioc 0 0>, /* A5 */ | ||
<6 0 &gpiob 7 GPIO_ACTIVE_HIGH>, /* D0 */ | ||
<7 0 &gpiob 6 GPIO_ACTIVE_HIGH>, /* D1 */ | ||
<8 0 &gpiob 3 GPIO_ACTIVE_HIGH>, /* D2 */ | ||
<9 0 &gpiob 0 GPIO_ACTIVE_HIGH>, /* D3 */ | ||
<10 0 &gpioa 12 GPIO_ACTIVE_HIGH>, /* D4 */ | ||
<11 0 &gpioa 11 GPIO_ACTIVE_HIGH>, /* D5 */ | ||
<12 0 &gpiob 1 GPIO_ACTIVE_HIGH>, /* D6 */ | ||
<13 0 &gpiob 2 GPIO_ACTIVE_HIGH>, /* D7 */ | ||
<14 0 &gpiob 4 GPIO_ACTIVE_HIGH>, /* D8 */ | ||
<15 0 &gpiob 8 GPIO_ACTIVE_HIGH>, /* D9 */ | ||
<16 0 &gpiob 9 GPIO_ACTIVE_HIGH>, /* D10 */ | ||
<17 0 &gpiob 15 GPIO_ACTIVE_HIGH>, /* D11 */ | ||
<18 0 &gpiob 14 GPIO_ACTIVE_HIGH>, /* D12 */ | ||
<19 0 &gpiob 13 GPIO_ACTIVE_HIGH>; /* D13 */ | ||
}; | ||
}; | ||
|
||
arduino_spi: &spi2 {}; | ||
|
||
arduino_i2c: &i2c2 {}; | ||
|
||
arduino_serial: &usart1 {}; |
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,249 @@ | ||
/* | ||
* Copyright (c) 2021 Linaro Limited | ||
* Copyright (c) 2024 STMicroelectronics | ||
* Copyright (c) 2025 Arduino SA | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include <st/u5/stm32u585Xi.dtsi> | ||
#include <st/u5/stm32u585aiixq-pinctrl.dtsi> | ||
#include "arduino_r3_connector.dtsi" | ||
#include <zephyr/dt-bindings/input/input-event-codes.h> | ||
|
||
/ { | ||
leds { | ||
compatible = "gpio-leds"; | ||
|
||
led3_red: led3_red { | ||
gpios = <&gpioh 10 GPIO_ACTIVE_LOW>; | ||
label = "RGB LED 3 Red"; | ||
}; | ||
|
||
led3_green: led3_green { | ||
gpios = <&gpioh 11 GPIO_ACTIVE_LOW>; | ||
label = "RGB LED 3 Green"; | ||
}; | ||
|
||
led3_blue: led3_blue { | ||
gpios = <&gpioh 12 GPIO_ACTIVE_LOW>; | ||
label = "RGB LED 3 Blue"; | ||
}; | ||
|
||
led4_red: led4_red { | ||
gpios = <&gpioh 13 GPIO_ACTIVE_LOW>; | ||
label = "RGB LED 4 Red"; | ||
}; | ||
|
||
led4_green: led4_green { | ||
gpios = <&gpioh 14 GPIO_ACTIVE_LOW>; | ||
label = "RGB LED 4 Green"; | ||
}; | ||
|
||
led4_blue: led4_blue { | ||
gpios = <&gpioh 15 GPIO_ACTIVE_LOW>; | ||
label = "RGB LED 4 Blue"; | ||
}; | ||
}; | ||
|
||
aliases { | ||
watchdog0 = &iwdg; | ||
die-temp0 = &die_temp; | ||
volt-sensor0 = &vref1; | ||
volt-sensor1 = &vbat4; | ||
}; | ||
}; | ||
|
||
&clk_hsi48 { | ||
status = "okay"; | ||
}; | ||
|
||
&clk_hse { | ||
clock-frequency = <DT_FREQ_M(16)>; | ||
status = "okay"; | ||
}; | ||
|
||
&clk_lse { | ||
clock-frequency = <32768>; | ||
status = "okay"; | ||
}; | ||
|
||
&clk_msis { | ||
status = "okay"; | ||
msi-range = <4>; | ||
msi-pll-mode; | ||
}; | ||
|
||
&pll1 { | ||
div-m = <1>; | ||
mul-n = <80>; | ||
div-q = <2>; | ||
div-r = <2>; | ||
clocks = <&clk_msis>; | ||
status = "okay"; | ||
}; | ||
|
||
&rcc { | ||
clocks = <&pll1>; | ||
clock-frequency = <DT_FREQ_M(160)>; | ||
ahb-prescaler = <1>; | ||
apb1-prescaler = <1>; | ||
apb2-prescaler = <1>; | ||
apb3-prescaler = <1>; | ||
}; | ||
|
||
stm32_lp_tick_source: &lptim1 { | ||
clocks = <&rcc STM32_CLOCK_BUS_APB3 0x00000800>, | ||
<&rcc STM32_SRC_LSE LPTIM1_SEL(3)>; | ||
status = "okay"; | ||
}; | ||
|
||
&lpuart1 { | ||
pinctrl-0 = <&lpuart1_tx_pg7 &lpuart1_rx_pg8 &lpuart1_rts_pg6 &lpuart1_cts_pg5>; | ||
pinctrl-names = "default"; | ||
current-speed = <115200>; | ||
status = "okay"; | ||
}; | ||
|
||
&usart1 { | ||
status = "okay"; | ||
pinctrl-0 = <&usart1_tx_pb6 &usart1_rx_pb7>; | ||
pinctrl-names = "default"; | ||
current-speed = <115200>; | ||
}; | ||
|
||
&i2c2 { | ||
status = "okay"; | ||
pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb11>; | ||
pinctrl-names = "default"; | ||
clock-frequency = <I2C_BITRATE_FAST>; | ||
}; | ||
|
||
&i2c4 { | ||
status = "okay"; | ||
pinctrl-0 = <&i2c4_scl_pd12 &i2c4_sda_pd13>; | ||
/* use <&i2c4_scl_pf14 &i2c4_sda_pf15> for the JMISC connector */ | ||
pinctrl-names = "default"; | ||
clock-frequency = <I2C_BITRATE_FAST>; | ||
}; | ||
|
||
&spi2 { | ||
status = "okay"; | ||
pinctrl-0 = <&spi2_sck_pb13 &spi2_miso_pb14 &spi2_mosi_pb15 &spi2_nss_pb9>; | ||
/* use <&spi2_sck_pd1 &spi2_miso_pc2 &spi2_mosi_pc3> for the ICSP connector */ | ||
pinctrl-names = "default"; | ||
}; | ||
|
||
&spi3 { | ||
status = "okay"; | ||
pinctrl-0 = <&spi3_sck_pg9 &spi3_miso_pg10 &spi3_mosi_pb5 &spi3_nss_pg12>; | ||
pinctrl-names = "default"; | ||
}; | ||
|
||
&aes { | ||
status = "okay"; | ||
}; | ||
|
||
&rng { | ||
status = "okay"; | ||
}; | ||
|
||
zephyr_udc0: &usbotg_fs { | ||
pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12>; | ||
pinctrl-names = "default"; | ||
status = "disabled"; | ||
}; | ||
|
||
&adc1 { | ||
pinctrl-0 = <&adc1_in9_pa4 | ||
&adc1_in10_pa5 | ||
&adc1_in11_pa6 | ||
&adc1_in12_pa7 | ||
&adc1_in2_pc1 | ||
&adc1_in1_pc0>; | ||
pinctrl-names = "default"; | ||
status = "okay"; | ||
|
||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
|
||
channel@1 { | ||
reg = <1>; | ||
zephyr,gain = "ADC_GAIN_1"; | ||
zephyr,reference = "ADC_REF_INTERNAL"; | ||
zephyr,acquisition-time = <ADC_ACQ_TIME_MAX>; | ||
zephyr,resolution = <14>; | ||
}; | ||
|
||
channel@2 { | ||
reg = <2>; | ||
zephyr,gain = "ADC_GAIN_1"; | ||
zephyr,reference = "ADC_REF_INTERNAL"; | ||
zephyr,acquisition-time = <ADC_ACQ_TIME_MAX>; | ||
zephyr,resolution = <14>; | ||
}; | ||
|
||
channel@9 { | ||
reg = <9>; | ||
zephyr,gain = "ADC_GAIN_1"; | ||
zephyr,reference = "ADC_REF_INTERNAL"; | ||
zephyr,acquisition-time = <ADC_ACQ_TIME_MAX>; | ||
zephyr,resolution = <14>; | ||
}; | ||
|
||
channel@a { | ||
reg = <10>; | ||
zephyr,gain = "ADC_GAIN_1"; | ||
zephyr,reference = "ADC_REF_INTERNAL"; | ||
zephyr,acquisition-time = <ADC_ACQ_TIME_MAX>; | ||
zephyr,resolution = <14>; | ||
}; | ||
|
||
channel@b { | ||
reg = <11>; | ||
zephyr,gain = "ADC_GAIN_1"; | ||
zephyr,reference = "ADC_REF_INTERNAL"; | ||
zephyr,acquisition-time = <ADC_ACQ_TIME_MAX>; | ||
zephyr,resolution = <14>; | ||
}; | ||
|
||
channel@c { | ||
reg = <12>; | ||
zephyr,gain = "ADC_GAIN_1"; | ||
zephyr,reference = "ADC_REF_INTERNAL"; | ||
zephyr,acquisition-time = <ADC_ACQ_TIME_MAX>; | ||
zephyr,resolution = <14>; | ||
}; | ||
}; | ||
|
||
&die_temp { | ||
status = "okay"; | ||
}; | ||
|
||
&dac1 { | ||
pinctrl-0 = <&dac1_out1_pa4 &dac1_out2_pa5>; | ||
pinctrl-names = "default"; | ||
status = "okay"; | ||
}; | ||
|
||
&rtc { | ||
clocks = <&rcc STM32_CLOCK_BUS_APB3 0x00200000>, | ||
<&rcc STM32_SRC_LSE RTC_SEL(1)>; | ||
status = "okay"; | ||
}; | ||
|
||
&iwdg { | ||
status = "okay"; | ||
}; | ||
|
||
&vref1 { | ||
status = "okay"; | ||
}; | ||
|
||
&vbat4 { | ||
status = "okay"; | ||
}; | ||
|
||
&gpiog { | ||
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,76 @@ | ||
/* | ||
* Copyright (c) 2025 Arduino SA | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/dts-v1/; | ||
#include "arduino_uno_q-common.dtsi" | ||
#include <zephyr/dt-bindings/memory-attr/memory-attr.h> | ||
#include <zephyr/dt-bindings/memory-attr/memory-attr-arm.h> | ||
|
||
/ { | ||
model = "Arduino UNO Q"; | ||
compatible = "arduino,uno_q"; | ||
|
||
chosen { | ||
zephyr,console = &usart1; | ||
zephyr,shell-uart = &usart1; | ||
zephyr,sram = &sram0; | ||
zephyr,flash = &flash0; | ||
zephyr,code-partition = &slot0_partition; | ||
}; | ||
|
||
aliases { | ||
led0 = &led3_green; | ||
led1 = &led3_red; | ||
die-temp0 = &die_temp; | ||
}; | ||
}; | ||
|
||
&flash0 { | ||
partitions { | ||
compatible = "fixed-partitions"; | ||
#address-cells = <1>; | ||
#size-cells = <1>; | ||
|
||
/* | ||
* Following flash partition is dedicated to the use of stm32u585 | ||
* with TZEN=0 (so w/o TFM). | ||
* Set the partitions with first MB to make use of the whole Bank1 | ||
*/ | ||
boot_partition: partition@0 { | ||
label = "mcuboot"; | ||
reg = <0x00000000 DT_SIZE_K(64)>; | ||
}; | ||
|
||
slot0_partition: partition@10000 { | ||
label = "image-0"; | ||
reg = <0x00010000 DT_SIZE_K(416)>; | ||
}; | ||
|
||
slot1_partition: partition@78000 { | ||
label = "image-1"; | ||
reg = <0x00078000 DT_SIZE_K(416)>; | ||
}; | ||
|
||
scratch_partition: partition@e0000 { | ||
label = "image-scratch"; | ||
reg = <0x000e0000 DT_SIZE_K(64)>; | ||
}; | ||
|
||
storage_partition: partition@f0000 { | ||
label = "storage"; | ||
reg = <0x000f0000 DT_SIZE_K(64)>; | ||
}; | ||
}; | ||
}; | ||
|
||
&gpdma1 { | ||
status = "okay"; | ||
}; | ||
|
||
&adc1 { | ||
st,adc-prescaler = <4>; | ||
status = "okay"; | ||
}; |
Oops, something went wrong.
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.
not a change request but swap using scratch should only be used if you have different sector sizes in one slot or between both slots