File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change 318
318
status = "disabled";
319
319
};
320
320
321
+ adc0: adc@47000 {
322
+ compatible = "nxp,lpc-lpadc";
323
+ reg = <0x47000 0x1000>;
324
+ interrupts = <71 0>;
325
+ clocks = <&scg SCG_K4_FIRC_CLK 0x11c>;
326
+ voltage-ref= <1>;
327
+ calibration-average = <128>;
328
+ /* pwrlvl 0 is slow speed low power, 1 is opposite */
329
+ power-level = <0>;
330
+ offset-value-a = <0>;
331
+ offset-value-b = <0>;
332
+ #io-channel-cells = <1>;
333
+ nxp,references = <&vref 1800>;
334
+ status = "disabled";
335
+ };
336
+
321
337
vref: regulator@4a000 {
322
338
compatible = "nxp,vref";
323
339
regulator-name = "mcxw71-vref";
Original file line number Diff line number Diff line change @@ -121,6 +121,8 @@ static ALWAYS_INLINE void clock_init(void)
121
121
CLOCK_SetIpSrcDiv (kCLOCK_Lpi2c1 , kSCG_SysClkDivBy16 );
122
122
CLOCK_SetIpSrc (kCLOCK_Lpspi0 , kCLOCK_IpSrcFro192M );
123
123
CLOCK_SetIpSrc (kCLOCK_Lpspi1 , kCLOCK_IpSrcFro192M );
124
+ CLOCK_SetIpSrc (kCLOCK_Lpadc0 , kCLOCK_IpSrcFro192M );
125
+ CLOCK_SetIpSrcDiv (kCLOCK_Lpadc0 , kSCG_SysClkDivBy10 );
124
126
125
127
/* Ungate clocks if the peripheral is enabled in devicetree */
126
128
if (DT_NODE_HAS_COMPAT_STATUS (DT_NODELABEL (lpuart0 ), nxp_lpc_lpuart , okay )) {
@@ -162,6 +164,10 @@ static ALWAYS_INLINE void clock_init(void)
162
164
if (DT_NODE_HAS_COMPAT_STATUS (DT_NODELABEL (vref ), nxp_vref , okay )) {
163
165
CLOCK_EnableClock (kCLOCK_Vref0 );
164
166
}
167
+
168
+ if (DT_NODE_HAS_COMPAT_STATUS (adc0 , nxp_lpadc , okay )) {
169
+ CLOCK_EnableClock (kCLOCK_Lpadc0 );
170
+ }
165
171
}
166
172
167
173
static void vbat_init (void )
You can’t perform that action at this time.
0 commit comments