Skip to content
Open
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
22 changes: 22 additions & 0 deletions boards/arduino/nano_matter/arduino_nano_matter-pinctrl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,28 @@
};
};

iadc0_default: iadc0_default {
group0 {
silabs,analog-bus = <ABUS_AEVEN0_IADC0>;
};

group1 {
silabs,analog-bus = <ABUS_AODD0_IADC0>;
};

group2 {
silabs,analog-bus = <ABUS_BEVEN0_IADC0>;
};

group3 {
silabs,analog-bus = <ABUS_BODD0_IADC0>;
};

group4 {
silabs,analog-bus = <ABUS_CDEVEN0_IADC0>;
};
};

i2c0_default: i2c0_default {
group0 {
pins = <I2C0_SCL_PA7>, <I2C0_SDA_PA6>;
Expand Down
109 changes: 109 additions & 0 deletions boards/arduino/nano_matter/arduino_nano_matter.dts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
/dts-v1/;
#include <silabs/xg24/mgm240sd22vna.dtsi>
#include <zephyr/dt-bindings/input/input-event-codes.h>
#include <dt-bindings/adc/silabs-adc.h>
#include <zephyr/dt-bindings/pwm/pwm.h>
#include "arduino_nano_matter-pinctrl.dtsi"
#include "arduino_nano_matter_connector.dtsi"
Expand Down Expand Up @@ -36,6 +37,7 @@
pwm-led2 = &blue_pwm_led;
sw0 = &button0;
watchdog0 = &wdog0;
adc0 = &adc0;
};

leds {
Expand Down Expand Up @@ -84,6 +86,17 @@
zephyr,code = <INPUT_KEY_0>;
};
};

zephyr,user {
io-channels = <&adc0 0>,
<&adc0 1>,
<&adc0 2>,
<&adc0 3>,
<&adc0 4>,
<&adc0 5>,
<&adc0 6>,
<&adc0 7>;
};
Comment on lines +90 to +99
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess this is Arduino-specific. It should be moved to the variant overlay in arduino/ArduinoCore-zephyr#255 (or a separate PR).

Copy link
Contributor Author

@silabs-bozont silabs-bozont Nov 12, 2025

Choose a reason for hiding this comment

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

I've included it here so users can get an enumeration of io-channels even outside of the Arduino Core, because the hardware is the same. Also other Silabs boards include these like here. If you have a strong opinion against including this here, I'm open to debate :)

Edit: I don't think io-channels is Arduino specific - it has many occurrences in this repo too.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, I thought having board-defined zephyr,user was verboten in Zephyr. Nevermind then! 🙂

};

&timer0 {
Expand Down Expand Up @@ -203,6 +216,102 @@
status = "okay";
};

&adc0 {
pinctrl-0 = <&iadc0_default>;
pinctrl-names = "default";
#address-cells = <1>;
#size-cells = <0>;
status = "okay";

// A0 - PB0
channel@0 {
reg = <0>;
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
zephyr,gain = "ADC_GAIN_1";
zephyr,input-positive = <IADC_INPUT_PB0>;
zephyr,reference = "ADC_REF_VDD_1";
zephyr,resolution = <12>;
zephyr,vref-mv = <3300>;
};

// A1 - PB2
channel@1 {
reg = <1>;
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
zephyr,gain = "ADC_GAIN_1";
zephyr,input-positive = <IADC_INPUT_PB2>;
zephyr,reference = "ADC_REF_VDD_1";
zephyr,resolution = <12>;
zephyr,vref-mv = <3300>;
};

// A2 - PB5
channel@2 {
reg = <2>;
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
zephyr,gain = "ADC_GAIN_1";
zephyr,input-positive = <IADC_INPUT_PB5>;
zephyr,reference = "ADC_REF_VDD_1";
zephyr,resolution = <12>;
zephyr,vref-mv = <3300>;
};

// A3 - PC0
channel@3 {
reg = <3>;
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
zephyr,gain = "ADC_GAIN_1";
zephyr,input-positive = <IADC_INPUT_PC0>;
zephyr,reference = "ADC_REF_VDD_1";
zephyr,resolution = <12>;
zephyr,vref-mv = <3300>;
};

// A4 - PA6
channel@4 {
reg = <4>;
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
zephyr,gain = "ADC_GAIN_1";
zephyr,input-positive = <IADC_INPUT_PA6>;
zephyr,reference = "ADC_REF_VDD_1";
zephyr,resolution = <12>;
zephyr,vref-mv = <3300>;
};

// A5 - PA7
channel@5 {
reg = <5>;
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
zephyr,gain = "ADC_GAIN_1";
zephyr,input-positive = <IADC_INPUT_PA7>;
zephyr,reference = "ADC_REF_VDD_1";
zephyr,resolution = <12>;
zephyr,vref-mv = <3300>;
};

// A6 - PB1
channel@6 {
reg = <6>;
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
zephyr,gain = "ADC_GAIN_1";
zephyr,input-positive = <IADC_INPUT_PB1>;
zephyr,reference = "ADC_REF_VDD_1";
zephyr,resolution = <12>;
zephyr,vref-mv = <3300>;
};

// A7 - PB3
channel@7 {
reg = <7>;
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
zephyr,gain = "ADC_GAIN_1";
zephyr,input-positive = <IADC_INPUT_PB3>;
zephyr,reference = "ADC_REF_VDD_1";
zephyr,resolution = <12>;
zephyr,vref-mv = <3300>;
};
};

&flash0 {
partitions {
compatible = "fixed-partitions";
Expand Down