File tree Expand file tree Collapse file tree 7 files changed +38
-12
lines changed Expand file tree Collapse file tree 7 files changed +38
-12
lines changed Original file line number Diff line number Diff line change @@ -392,6 +392,12 @@ i2s1: &flexcomm3 {
392
392
/* Quick fix for 1.8V SD cards on RT600- disable 1.8V negotiation */
393
393
no-1-8-v;
394
394
pwr-gpios = <&gpio2 10 GPIO_ACTIVE_HIGH>;
395
+ cd-gpios = <&gpio2 9 GPIO_ACTIVE_LOW>;
396
+ mmc {
397
+ compatible = "zephyr,sdmmc-disk";
398
+ status = "okay";
399
+ label = "SDMMC_0";
400
+ };
395
401
};
396
402
397
403
&lpadc0 {
Original file line number Diff line number Diff line change @@ -770,7 +770,7 @@ static int mimxrt685_evk_pinmux_init(const struct device *dev)
770
770
771
771
#endif
772
772
773
- #if DT_NODE_HAS_STATUS (DT_NODELABEL (usdhc1 ), okay ) && CONFIG_DISK_DRIVER_SDMMC
773
+ #if DT_NODE_HAS_STATUS (DT_NODELABEL (usdhc1 ), okay ) && CONFIG_IMX_USDHC
774
774
uint32_t port1_pin30_config = (/* Pin is configured as SD0_CLK */
775
775
IOPCTL_PIO_FUNC1 |
776
776
/* Disable pull-up / pull-down function */
Original file line number Diff line number Diff line change 369
369
};
370
370
371
371
usdhc1: usdhc@136000 {
372
- compatible = "nxp,imx-usdhc ";
372
+ compatible = "nxp,imx-sdhc ";
373
373
reg = <0x136000 0x1000>;
374
374
status = "disabled";
375
375
interrupts = <45 0>;
376
376
clocks = <&clkctl1 MCUX_USDHC1_CLK>;
377
- label = "USDHC_1";
377
+ label = "SDHC_0";
378
+ max-current-330 = <1020>;
379
+ max-current-180 = <1020>;
380
+ max-bus-freq = <208000000>;
381
+ min-bus-freq = <400000>;
378
382
};
379
383
380
384
usdhc2: usdhc@137000 {
381
- compatible = "nxp,imx-usdhc ";
385
+ compatible = "nxp,imx-sdhc ";
382
386
reg = <0x137000 0x1000>;
383
387
status = "disabled";
384
388
interrupts = <46 0>;
385
389
clocks = <&clkctl1 MCUX_USDHC2_CLK>;
386
- label = "USDHC_2";
390
+ label = "SDHC_1";
391
+ max-current-330 = <1020>;
392
+ max-current-180 = <1020>;
393
+ max-bus-freq = <208000000>;
394
+ min-bus-freq = <400000>;
387
395
};
388
396
389
397
lpadc0: lpadc@13A0000 {
Original file line number Diff line number Diff line change 321
321
};
322
322
323
323
usdhc1: usdhc@136000 {
324
- compatible = "nxp,imx-usdhc ";
324
+ compatible = "nxp,imx-sdhc ";
325
325
reg = <0x136000 0x1000>;
326
326
status = "disabled";
327
327
interrupts = <45 0>;
328
328
clocks = <&clkctl1 MCUX_USDHC1_CLK>;
329
- label = "USDHC_1";
329
+ label = "SDHC_0";
330
+ max-current-330 = <1020>;
331
+ max-current-180 = <1020>;
332
+ max-bus-freq = <208000000>;
333
+ min-bus-freq = <400000>;
330
334
};
331
335
332
336
usdhc2: usdhc@137000 {
333
- compatible = "nxp,imx-usdhc ";
337
+ compatible = "nxp,imx-sdhc ";
334
338
reg = <0x137000 0x1000>;
335
339
status = "disabled";
336
340
interrupts = <46 0>;
337
341
clocks = <&clkctl1 MCUX_USDHC2_CLK>;
338
- label = "USDHC_2";
342
+ label = "SDHC_1";
343
+ max-current-330 = <1020>;
344
+ max-current-180 = <1020>;
345
+ max-bus-freq = <208000000>;
346
+ min-bus-freq = <400000>;
339
347
};
340
348
341
349
lpadc0: lpadc@13A0000 {
Original file line number Diff line number Diff line change @@ -41,6 +41,10 @@ config CLOCK_CONTROL_MCUX_SYSCON
41
41
default y if HAS_MCUX_SYSCON
42
42
depends on CLOCK_CONTROL
43
43
44
+ config IMX_USDHC
45
+ default y if (HAS_MCUX_USDHC1 || HAS_MCUX_USDHC2)
46
+ depends on SDHC
47
+
44
48
if MCUX_OS_TIMER
45
49
46
50
config SYS_CLOCK_HW_CYCLES_PER_SEC
Original file line number Diff line number Diff line change @@ -263,7 +263,7 @@ static ALWAYS_INLINE void clock_init(void)
263
263
CLOCK_AttachClk (kNONE_to_WDT0_CLK );
264
264
#endif
265
265
266
- #if DT_NODE_HAS_STATUS (DT_NODELABEL (usdhc1 ), okay ) && CONFIG_DISK_DRIVER_SDMMC
266
+ #if DT_NODE_HAS_STATUS (DT_NODELABEL (usdhc1 ), okay ) && CONFIG_IMX_USDHC
267
267
/* Make sure USDHC ram buffer has been power up*/
268
268
POWER_DisablePD (kPDRUNCFG_APD_USDHC0_SRAM );
269
269
POWER_DisablePD (kPDRUNCFG_PPD_USDHC0_SRAM );
@@ -283,7 +283,7 @@ static ALWAYS_INLINE void clock_init(void)
283
283
#endif /* CONFIG_SOC_MIMXRT685S_CM33 */
284
284
}
285
285
286
- #if (DT_NODE_HAS_STATUS (DT_NODELABEL (usdhc1 ), okay ) && CONFIG_DISK_DRIVER_SDMMC )
286
+ #if (DT_NODE_HAS_STATUS (DT_NODELABEL (usdhc1 ), okay ) && CONFIG_IMX_USDHC )
287
287
288
288
void imxrt_usdhc_pinmux (uint16_t nusdhc , bool init ,
289
289
uint32_t speed , uint32_t strength )
Original file line number Diff line number Diff line change 79
79
extern "C" {
80
80
#endif
81
81
82
- #if CONFIG_DISK_DRIVER_SDMMC && \
82
+ #if CONFIG_IMX_USDHC && \
83
83
(DT_NODE_HAS_STATUS (DT_NODELABEL (usdhc1 ), okay ) || \
84
84
DT_NODE_HAS_STATUS (DT_NODELABEL (usdhc2 ), okay ))
85
85
You can’t perform that action at this time.
0 commit comments