Commit 2e30bbca authored by Rafael Aldo Hernández Luna's avatar Rafael Aldo Hernández Luna Committed by Alberto Escolar
Browse files

drivers: dac: Added dac driver for samd5x



Added driver and binding file for samd5x dac peripheral, the already
implemented dac_sam0.c lacks the configuration registers for this
microcontroller family and is fixed to only have one dac channel output,
also, the code gets too bulky when adding the samd5x dac configuration
using preprocessor directives that’s why I moved the implementation to its
own file.

Added dac to the supported list of same54_xpro.yaml, fixed Kconfig.samd5x
help spacing, added board defines to test_dac.c and test it out with
twister script on board.

Signed-off-by: default avatarRafael Aldo Hernández Luna <aldo.hernandez@daikincomfort.com>
parent 7d9fffae
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -60,4 +60,11 @@
				 <PA24H_USB_DM>;
		};
	};

	dac0_default: dac0_default {
		group1 {
			pinmux = <PA2B_DAC_VOUT0>,
				 <PA5B_DAC_VOUT1>;
		};
	};
};
+19 −0
Original line number Diff line number Diff line
@@ -122,6 +122,25 @@
	status = "okay";
};

&dac0 {
	status = "okay";
	reference = "intref";

	channel_0 {
		oversampling = "OSR_1";
		refresh-period = <1>;
		current-control = "CC1M";
	};
	channel_1 {
		oversampling = "OSR_1";
		refresh-period = <1>;
		current-control = "CC1M";
	};

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

zephyr_udc0: &usb0 {
	status = "okay";

+1 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@ flash: 1024
ram: 256
supported:
  - adc
  - dac
  - dma
  - flash
  - gpio
+1 −0
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@ zephyr_library_sources_ifdef(CONFIG_DAC_MCUX_DAC32 dac_mcux_dac32.c)
zephyr_library_sources_ifdef(CONFIG_DAC_STM32		dac_stm32.c)
zephyr_library_sources_ifdef(CONFIG_DAC_SAM		dac_sam.c)
zephyr_library_sources_ifdef(CONFIG_DAC_SAM0		dac_sam0.c)
zephyr_library_sources_ifdef(CONFIG_DAC_SAMD5X		dac_samd5x.c)
zephyr_library_sources_ifdef(CONFIG_DAC_DAC161S997	dac_dac161s997.c)
zephyr_library_sources_ifdef(CONFIG_DAC_DACX0501	dac_dacx0501.c)
zephyr_library_sources_ifdef(CONFIG_DAC_DACX0508	dac_dacx0508.c)
+2 −0
Original line number Diff line number Diff line
@@ -67,4 +67,6 @@ source "drivers/dac/Kconfig.max22017"

source "drivers/dac/Kconfig.renesas_ra"

source "drivers/dac/Kconfig.samd5x"

endif # DAC
Loading