Skip to content

Commit

Permalink
boards: arm: sam4s_xplained: Enable DAC support
Browse files Browse the repository at this point in the history
Enable DAC entry in device tree and pinctrl (PB13/PB14).
Update doc/yaml files to include ADC info.
Update the sample for sam4s_xplained.

Signed-off-by: Ibe Van de Veire <[email protected]>
  • Loading branch information
IVandeVeire authored and carlescufi committed Feb 6, 2025
1 parent 2880f45 commit 96a2354
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 0 deletions.
2 changes: 2 additions & 0 deletions boards/atmel/sam/sam4s_xplained/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ features:
+-----------+------------+-------------------------------------+
| COUNTER | on-chip | counter |
+-----------+------------+-------------------------------------+
| DAC | on-chip | dac |
+-----------+------------+-------------------------------------+
| GPIO | on-chip | gpio |
+-----------+------------+-------------------------------------+
| HWINFO | on-chip | Unique device serial number |
Expand Down
7 changes: 7 additions & 0 deletions boards/atmel/sam/sam4s_xplained/sam4s_xplained-pinctrl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@
};
};

dacc_default: dacc_default {
group1 {
pinmux = <PB13D_DACC_DAC0>,
<PB14D_DACC_DAC1>;
};
};

smc_default: smc_default {
group1 {
pinmux = <PC18A_EBI_A0>,
Expand Down
7 changes: 7 additions & 0 deletions boards/atmel/sam/sam4s_xplained/sam4s_xplained.dts
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,13 @@
tracking-time = <2>;
};

&dacc {
status = "okay";

pinctrl-0 = <&dacc_default>;
pinctrl-names = "default";
};

&wdt {
status = "okay";
};
Expand Down
1 change: 1 addition & 0 deletions boards/atmel/sam/sam4s_xplained/sam4s_xplained.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ ram: 128
supported:
- adc
- counter
- dac
- gpio
- hwinfo
- memc
Expand Down
7 changes: 7 additions & 0 deletions samples/drivers/dac/boards/sam4s_xplained.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/ {
zephyr,user {
dac = <&dacc>;
dac-channel-id = <0>;
dac-resolution = <12>;
};
};

0 comments on commit 96a2354

Please sign in to comment.