soc: stm32l1: Enable DAC support
Enable STM32 DAC driver for STM32L1 series. Signed-off-by: Ilya Tagunov <tagunil@gmail.com>
This commit is contained in:
parent
6c798aa31c
commit
b899bbf9b9
3 changed files with 17 additions and 0 deletions
|
@ -41,10 +41,14 @@
|
|||
(STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_PULLUP)
|
||||
#define STM32L1X_PINMUX_FUNC_PA4_ADC1_IN4 \
|
||||
STM32_MODER_ANALOG_MODE
|
||||
#define STM32L1X_PINMUX_FUNC_PA4_DAC_OUT1 \
|
||||
STM32_MODER_ANALOG_MODE
|
||||
#define STM32L1X_PINMUX_FUNC_PA5_SPI1_SCK \
|
||||
(STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL)
|
||||
#define STM32L1X_PINMUX_FUNC_PA5_ADC1_IN5 \
|
||||
STM32_MODER_ANALOG_MODE
|
||||
#define STM32L1X_PINMUX_FUNC_PA5_DAC_OUT2 \
|
||||
STM32_MODER_ANALOG_MODE
|
||||
#define STM32L1X_PINMUX_FUNC_PA6_SPI1_MISO \
|
||||
(STM32_PINMUX_ALT_FUNC_5 | STM32_PUPDR_PULL_DOWN)
|
||||
#define STM32L1X_PINMUX_FUNC_PA6_ADC1_IN6 \
|
||||
|
|
|
@ -144,6 +144,15 @@
|
|||
#io-channel-cells = <1>;
|
||||
};
|
||||
|
||||
dac1: dac@40007400 {
|
||||
compatible = "st,stm32-dac";
|
||||
reg = <0x40007400 0x400>;
|
||||
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x20000000>;
|
||||
status = "disabled";
|
||||
label = "DAC_1";
|
||||
#io-channel-cells = <1>;
|
||||
};
|
||||
|
||||
pinctrl: pin-controller@40020000 {
|
||||
compatible = "st,stm32-pinmux";
|
||||
#address-cells = <1>;
|
||||
|
|
|
@ -55,6 +55,10 @@
|
|||
#include <stm32l1xx_ll_adc.h>
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DAC_STM32
|
||||
#include <stm32l1xx_ll_dac.h>
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_COUNTER_RTC_STM32)
|
||||
#include <stm32l1xx_ll_rtc.h>
|
||||
#include <stm32l1xx_ll_exti.h>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue