Skip to content

Commit f72f1eb

Browse files
FPlohlkartben
authored andcommitted
boards: mimxrt1170_evk: Enable DAC
Enable DAC on MIMXRT1170-EVK for both Cortex M7 and M4. Signed-off-by: Florijan Plohl <florijan.plohl@norik.com>
1 parent f4d2757 commit f72f1eb

File tree

7 files changed

+29
-0
lines changed

7 files changed

+29
-0
lines changed

boards/nxp/mimxrt1170_evk/mimxrt1170_evk_mimxrt1176_cm4.dts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,17 @@
3535
device_type = "memory";
3636
reg = <0x80000000 DT_SIZE_M(64)>;
3737
};
38+
39+
zephyr,user {
40+
dac = <&dac>;
41+
dac-channel-id = <0>;
42+
dac-resolution = <12>;
43+
};
3844
};
3945

46+
&dac {
47+
status = "okay";
48+
};
4049

4150
&lpuart1 {
4251
status = "okay";

boards/nxp/mimxrt1170_evk/mimxrt1170_evk_mimxrt1176_cm4.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ toolchain:
1414
ram: 128
1515
flash: 128
1616
supported:
17+
- dac
1718
- dma
1819
- flash
1920
- gpio

boards/nxp/mimxrt1170_evk/mimxrt1170_evk_mimxrt1176_cm4_B.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ toolchain:
1414
ram: 128
1515
flash: 128
1616
supported:
17+
- dac
1718
- dma
1819
- flash
1920
- gpio

boards/nxp/mimxrt1170_evk/mimxrt1170_evk_mimxrt1176_cm7.dts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,16 @@
7575
gpio-map = <9 0 &gpio11 15 0>, /* Pin 9, RESETB */
7676
<17 0 &gpio9 25 0>; /* Pin 17, PWDN */
7777
};
78+
79+
zephyr,user {
80+
dac = <&dac>;
81+
dac-channel-id = <0>;
82+
dac-resolution = <12>;
83+
};
84+
};
85+
86+
&dac {
87+
status = "okay";
7888
};
7989

8090
zephyr_lcdif: &lcdif {};

boards/nxp/mimxrt1170_evk/mimxrt1170_evk_mimxrt1176_cm7.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ supported:
1717
- adc
1818
- can
1919
- counter
20+
- dac
2021
- display
2122
- dma
2223
- flash

boards/nxp/mimxrt1170_evk/mimxrt1170_evk_mimxrt1176_cm7_B.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ supported:
1717
- adc
1818
- can
1919
- counter
20+
- dac
2021
- dma
2122
- flash
2223
- gpio

tests/drivers/dac/dac_api/src/test_dac.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,12 @@
106106
#define DAC_RESOLUTION 12
107107
#define DAC_CHANNEL_ID 0
108108

109+
#elif defined(CONFIG_BOARD_MIMXRT1170_EVK)
110+
111+
#define DAC_DEVICE_NODE DT_NODELABEL(dac)
112+
#define DAC_RESOLUTION 12
113+
#define DAC_CHANNEL_ID 0
114+
109115
#else
110116
#error "Unsupported board."
111117
#endif

0 commit comments

Comments
 (0)