@@ -396,6 +396,239 @@ static int mimxrt685_evk_pinmux_init(const struct device *dev)
396396 /* PORT0 PIN9 (coords: L3) is configured as FC1_RXD_SDA_MOSI_DATA */
397397 IOPCTL_PinMuxSet (IOPCTL , 0U , 9U , port0_pin9_config );
398398
399+ #endif
400+
401+ #if DT_NODE_HAS_STATUS (DT_NODELABEL (flexspi ), okay ) && CONFIG_FLASH
402+ const uint32_t port1_pin11_config = (/* Pin is configured as FLEXSPI0B_DATA0 */
403+ IOPCTL_PIO_FUNC6 |
404+ /* Disable pull-up / pull-down function */
405+ IOPCTL_PIO_PUPD_DI |
406+ /* Enable pull-down function */
407+ IOPCTL_PIO_PULLDOWN_EN |
408+ /* Enables input buffer function */
409+ IOPCTL_PIO_INBUF_EN |
410+ /* Normal mode */
411+ IOPCTL_PIO_SLEW_RATE_NORMAL |
412+ /* Full drive enable */
413+ IOPCTL_PIO_FULLDRIVE_EN |
414+ /* Analog mux is disabled */
415+ IOPCTL_PIO_ANAMUX_DI |
416+ /* Pseudo Output Drain is disabled */
417+ IOPCTL_PIO_PSEDRAIN_DI |
418+ /* Input function is not inverted */
419+ IOPCTL_PIO_INV_DI );
420+ /* PORT1 PIN11 (coords: L2) is configured as FLEXSPI0B_DATA0 */
421+ IOPCTL_PinMuxSet (IOPCTL , 1U , 11U , port1_pin11_config );
422+
423+ const uint32_t port1_pin12_config = (/* Pin is configured as FLEXSPI0B_DATA1 */
424+ IOPCTL_PIO_FUNC6 |
425+ /* Disable pull-up / pull-down function */
426+ IOPCTL_PIO_PUPD_DI |
427+ /* Enable pull-down function */
428+ IOPCTL_PIO_PULLDOWN_EN |
429+ /* Enables input buffer function */
430+ IOPCTL_PIO_INBUF_EN |
431+ /* Normal mode */
432+ IOPCTL_PIO_SLEW_RATE_NORMAL |
433+ /* Full drive enable */
434+ IOPCTL_PIO_FULLDRIVE_EN |
435+ /* Analog mux is disabled */
436+ IOPCTL_PIO_ANAMUX_DI |
437+ /* Pseudo Output Drain is disabled */
438+ IOPCTL_PIO_PSEDRAIN_DI |
439+ /* Input function is not inverted */
440+ IOPCTL_PIO_INV_DI );
441+ /* PORT1 PIN12 (coords: M2) is configured as FLEXSPI0B_DATA1 */
442+ IOPCTL_PinMuxSet (IOPCTL , 1U , 12U , port1_pin12_config );
443+
444+ const uint32_t port1_pin13_config = (/* Pin is configured as FLEXSPI0B_DATA2 */
445+ IOPCTL_PIO_FUNC6 |
446+ /* Disable pull-up / pull-down function */
447+ IOPCTL_PIO_PUPD_DI |
448+ /* Enable pull-down function */
449+ IOPCTL_PIO_PULLDOWN_EN |
450+ /* Enables input buffer function */
451+ IOPCTL_PIO_INBUF_EN |
452+ /* Normal mode */
453+ IOPCTL_PIO_SLEW_RATE_NORMAL |
454+ /* Full drive enable */
455+ IOPCTL_PIO_FULLDRIVE_EN |
456+ /* Analog mux is disabled */
457+ IOPCTL_PIO_ANAMUX_DI |
458+ /* Pseudo Output Drain is disabled */
459+ IOPCTL_PIO_PSEDRAIN_DI |
460+ /* Input function is not inverted */
461+ IOPCTL_PIO_INV_DI );
462+ /* PORT1 PIN13 (coords: N1) is configured as FLEXSPI0B_DATA2 */
463+ IOPCTL_PinMuxSet (IOPCTL , 1U , 13U , port1_pin13_config );
464+
465+ const uint32_t port1_pin14_config = (/* Pin is configured as FLEXSPI0B_DATA3 */
466+ IOPCTL_PIO_FUNC6 |
467+ /* Disable pull-up / pull-down function */
468+ IOPCTL_PIO_PUPD_DI |
469+ /* Enable pull-down function */
470+ IOPCTL_PIO_PULLDOWN_EN |
471+ /* Enables input buffer function */
472+ IOPCTL_PIO_INBUF_EN |
473+ /* Normal mode */
474+ IOPCTL_PIO_SLEW_RATE_NORMAL |
475+ /* Full drive enable */
476+ IOPCTL_PIO_FULLDRIVE_EN |
477+ /* Analog mux is disabled */
478+ IOPCTL_PIO_ANAMUX_DI |
479+ /* Pseudo Output Drain is disabled */
480+ IOPCTL_PIO_PSEDRAIN_DI |
481+ /* Input function is not inverted */
482+ IOPCTL_PIO_INV_DI );
483+ /* PORT1 PIN14 (coords: N2) is configured as FLEXSPI0B_DATA3 */
484+ IOPCTL_PinMuxSet (IOPCTL , 1U , 14U , port1_pin14_config );
485+
486+ const uint32_t port1_pin29_config = (/* Pin is configured as FLEXSPI0B_SCLK */
487+ IOPCTL_PIO_FUNC5 |
488+ /* Disable pull-up / pull-down function */
489+ IOPCTL_PIO_PUPD_DI |
490+ /* Enable pull-down function */
491+ IOPCTL_PIO_PULLDOWN_EN |
492+ /* Enables input buffer function */
493+ IOPCTL_PIO_INBUF_EN |
494+ /* Normal mode */
495+ IOPCTL_PIO_SLEW_RATE_NORMAL |
496+ /* Full drive enable */
497+ IOPCTL_PIO_FULLDRIVE_EN |
498+ /* Analog mux is disabled */
499+ IOPCTL_PIO_ANAMUX_DI |
500+ /* Pseudo Output Drain is disabled */
501+ IOPCTL_PIO_PSEDRAIN_DI |
502+ /* Input function is not inverted */
503+ IOPCTL_PIO_INV_DI );
504+ /* PORT1 PIN29 (coords: U3) is configured as FLEXSPI0B_SCLK */
505+ IOPCTL_PinMuxSet (IOPCTL , 1U , 29U , port1_pin29_config );
506+
507+ const uint32_t port2_pin12_config = (/* Pin is configured as PIO2_12 */
508+ IOPCTL_PIO_FUNC0 |
509+ /* Disable pull-up / pull-down function */
510+ IOPCTL_PIO_PUPD_DI |
511+ /* Enable pull-down function */
512+ IOPCTL_PIO_PULLDOWN_EN |
513+ /* Disable input buffer function */
514+ IOPCTL_PIO_INBUF_DI |
515+ /* Normal mode */
516+ IOPCTL_PIO_SLEW_RATE_NORMAL |
517+ /* Normal drive */
518+ IOPCTL_PIO_FULLDRIVE_DI |
519+ /* Analog mux is disabled */
520+ IOPCTL_PIO_ANAMUX_DI |
521+ /* Pseudo Output Drain is disabled */
522+ IOPCTL_PIO_PSEDRAIN_DI |
523+ /* Input function is not inverted */
524+ IOPCTL_PIO_INV_DI );
525+ /* PORT2 PIN12 (coords: T3) is configured as PIO2_12 */
526+ IOPCTL_PinMuxSet (IOPCTL , 2U , 12U , port2_pin12_config );
527+
528+ const uint32_t port2_pin17_config = (/* Pin is configured as FLEXSPI0B_DATA4 */
529+ IOPCTL_PIO_FUNC6 |
530+ /* Disable pull-up / pull-down function */
531+ IOPCTL_PIO_PUPD_DI |
532+ /* Enable pull-down function */
533+ IOPCTL_PIO_PULLDOWN_EN |
534+ /* Enables input buffer function */
535+ IOPCTL_PIO_INBUF_EN |
536+ /* Normal mode */
537+ IOPCTL_PIO_SLEW_RATE_NORMAL |
538+ /* Full drive enable */
539+ IOPCTL_PIO_FULLDRIVE_EN |
540+ /* Analog mux is disabled */
541+ IOPCTL_PIO_ANAMUX_DI |
542+ /* Pseudo Output Drain is disabled */
543+ IOPCTL_PIO_PSEDRAIN_DI |
544+ /* Input function is not inverted */
545+ IOPCTL_PIO_INV_DI );
546+ /* PORT2 PIN17 (coords: U1) is configured as FLEXSPI0B_DATA4 */
547+ IOPCTL_PinMuxSet (IOPCTL , 2U , 17U , port2_pin17_config );
548+
549+ const uint32_t port2_pin18_config = (/* Pin is configured as FLEXSPI0B_DATA5 */
550+ IOPCTL_PIO_FUNC6 |
551+ /* Disable pull-up / pull-down function */
552+ IOPCTL_PIO_PUPD_DI |
553+ /* Enable pull-down function */
554+ IOPCTL_PIO_PULLDOWN_EN |
555+ /* Enables input buffer function */
556+ IOPCTL_PIO_INBUF_EN |
557+ /* Normal mode */
558+ IOPCTL_PIO_SLEW_RATE_NORMAL |
559+ /* Full drive enable */
560+ IOPCTL_PIO_FULLDRIVE_EN |
561+ /* Analog mux is disabled */
562+ IOPCTL_PIO_ANAMUX_DI |
563+ /* Pseudo Output Drain is disabled */
564+ IOPCTL_PIO_PSEDRAIN_DI |
565+ /* Input function is not inverted */
566+ IOPCTL_PIO_INV_DI );
567+ /* PORT2 PIN18 (coords: R2) is configured as FLEXSPI0B_DATA5 */
568+ IOPCTL_PinMuxSet (IOPCTL , 2U , 18U , port2_pin18_config );
569+
570+ const uint32_t port2_pin19_config = (/* Pin is configured as FLEXSPI0B_SS0_N */
571+ IOPCTL_PIO_FUNC6 |
572+ /* Disable pull-up / pull-down function */
573+ IOPCTL_PIO_PUPD_DI |
574+ /* Enable pull-down function */
575+ IOPCTL_PIO_PULLDOWN_EN |
576+ /* Enables input buffer function */
577+ IOPCTL_PIO_INBUF_EN |
578+ /* Normal mode */
579+ IOPCTL_PIO_SLEW_RATE_NORMAL |
580+ /* Full drive enable */
581+ IOPCTL_PIO_FULLDRIVE_EN |
582+ /* Analog mux is disabled */
583+ IOPCTL_PIO_ANAMUX_DI |
584+ /* Pseudo Output Drain is disabled */
585+ IOPCTL_PIO_PSEDRAIN_DI |
586+ /* Input function is not inverted */
587+ IOPCTL_PIO_INV_DI );
588+ /* PORT2 PIN19 (coords: T2) is configured as FLEXSPI0B_SS0_N */
589+ IOPCTL_PinMuxSet (IOPCTL , 2U , 19U , port2_pin19_config );
590+
591+ const uint32_t port2_pin22_config = (/* Pin is configured as FLEXSPI0B_DATA6 */
592+ IOPCTL_PIO_FUNC6 |
593+ /* Disable pull-up / pull-down function */
594+ IOPCTL_PIO_PUPD_DI |
595+ /* Enable pull-down function */
596+ IOPCTL_PIO_PULLDOWN_EN |
597+ /* Enables input buffer function */
598+ IOPCTL_PIO_INBUF_EN |
599+ /* Normal mode */
600+ IOPCTL_PIO_SLEW_RATE_NORMAL |
601+ /* Full drive enable */
602+ IOPCTL_PIO_FULLDRIVE_EN |
603+ /* Analog mux is disabled */
604+ IOPCTL_PIO_ANAMUX_DI |
605+ /* Pseudo Output Drain is disabled */
606+ IOPCTL_PIO_PSEDRAIN_DI |
607+ /* Input function is not inverted */
608+ IOPCTL_PIO_INV_DI );
609+ /* PORT2 PIN22 (coords: P3) is configured as FLEXSPI0B_DATA6 */
610+ IOPCTL_PinMuxSet (IOPCTL , 2U , 22U , port2_pin22_config );
611+
612+ const uint32_t port2_pin23_config = (/* Pin is configured as FLEXSPI0B_DATA7 */
613+ IOPCTL_PIO_FUNC6 |
614+ /* Disable pull-up / pull-down function */
615+ IOPCTL_PIO_PUPD_DI |
616+ /* Enable pull-down function */
617+ IOPCTL_PIO_PULLDOWN_EN |
618+ /* Enables input buffer function */
619+ IOPCTL_PIO_INBUF_EN |
620+ /* Normal mode */
621+ IOPCTL_PIO_SLEW_RATE_NORMAL |
622+ /* Full drive enable */
623+ IOPCTL_PIO_FULLDRIVE_EN |
624+ /* Analog mux is disabled */
625+ IOPCTL_PIO_ANAMUX_DI |
626+ /* Pseudo Output Drain is disabled */
627+ IOPCTL_PIO_PSEDRAIN_DI |
628+ /* Input function is not inverted */
629+ IOPCTL_PIO_INV_DI );
630+ /* PORT2 PIN23 (coords: P5) is configured as FLEXSPI0B_DATA7 */
631+ IOPCTL_PinMuxSet (IOPCTL , 2U , 23U , port2_pin23_config );
399632#endif
400633
401634 return 0 ;
0 commit comments