@@ -768,6 +768,197 @@ static int mimxrt685_evk_pinmux_init(const struct device *dev)
768768	IOPCTL_PinMuxSet (IOPCTL , 0U , 31U , port0_pin31_config );
769769#endif 
770770
771+ #endif 
772+ 
773+ #if  DT_NODE_HAS_STATUS (DT_NODELABEL (usdhc1 ), okay ) &&  CONFIG_DISK_DRIVER_SDMMC 
774+ 	uint32_t  port1_pin30_config  =  (/* Pin is configured as SD0_CLK */ 
775+ 		IOPCTL_PIO_FUNC1  |
776+ 		/* Disable pull-up / pull-down function */ 
777+ 		IOPCTL_PIO_PUPD_DI  |
778+ 		/* Enable pull-down function */ 
779+ 		IOPCTL_PIO_PULLDOWN_EN  |
780+ 		/* Enables input buffer function */ 
781+ 		IOPCTL_PIO_INBUF_EN  |
782+ 		/* Normal mode */ 
783+ 		IOPCTL_PIO_SLEW_RATE_NORMAL  |
784+ 		/* Normal drive */ 
785+ 		IOPCTL_PIO_FULLDRIVE_DI  |
786+ 		/* Analog mux is disabled */ 
787+ 		IOPCTL_PIO_ANAMUX_DI  |
788+ 		/* Pseudo Output Drain is disabled */ 
789+ 		IOPCTL_PIO_PSEDRAIN_DI  |
790+ 		/* Input function is not inverted */ 
791+ 		IOPCTL_PIO_INV_DI );
792+ 	/* PORT1 PIN30 (coords: P10) is configured as SD0_CLK */ 
793+ 	IOPCTL_PinMuxSet (IOPCTL , 1U , 30U , port1_pin30_config );
794+ 
795+ 	uint32_t  port1_pin31_config  =  (/* Pin is configured as SD0_CMD */ 
796+ 		IOPCTL_PIO_FUNC1  |
797+ 		/* Enable pull-up / pull-down function */ 
798+ 		IOPCTL_PIO_PUPD_EN  |
799+ 		/* Enable pull-up function */ 
800+ 		IOPCTL_PIO_PULLUP_EN  |
801+ 		/* Enables input buffer function */ 
802+ 		IOPCTL_PIO_INBUF_EN  |
803+ 		/* Normal mode */ 
804+ 		IOPCTL_PIO_SLEW_RATE_NORMAL  |
805+ 		/* Normal drive */ 
806+ 		IOPCTL_PIO_FULLDRIVE_DI  |
807+ 		/* Analog mux is disabled */ 
808+ 		IOPCTL_PIO_ANAMUX_DI  |
809+ 		/* Pseudo Output Drain is disabled */ 
810+ 		IOPCTL_PIO_PSEDRAIN_DI  |
811+ 		/* Input function is not inverted */ 
812+ 		IOPCTL_PIO_INV_DI );
813+ 	/* PORT1 PIN31 (coords: R9) is configured as SD0_CMD */ 
814+ 	IOPCTL_PinMuxSet (IOPCTL , 1U , 31U , port1_pin31_config );
815+ 
816+ 	uint32_t  port2_pin0_config  =  (/* Pin is configured as SD0_D0 */ 
817+ 		IOPCTL_PIO_FUNC1  |
818+ 		/* Enable pull-up / pull-down function */ 
819+ 		IOPCTL_PIO_PUPD_EN  |
820+ 		/* Enable pull-up function */ 
821+ 		IOPCTL_PIO_PULLUP_EN  |
822+ 		/* Enables input buffer function */ 
823+ 		IOPCTL_PIO_INBUF_EN  |
824+ 		/* Normal mode */ 
825+ 		IOPCTL_PIO_SLEW_RATE_NORMAL  |
826+ 		/* Normal drive */ 
827+ 		IOPCTL_PIO_FULLDRIVE_DI  |
828+ 		/* Analog mux is disabled */ 
829+ 		IOPCTL_PIO_ANAMUX_DI  |
830+ 		/* Pseudo Output Drain is disabled */ 
831+ 		IOPCTL_PIO_PSEDRAIN_DI  |
832+ 		/* Input function is not inverted */ 
833+ 		IOPCTL_PIO_INV_DI );
834+ 	/* PORT2 PIN0 (coords: R11) is configured as SD0_D0 */ 
835+ 	IOPCTL_PinMuxSet (IOPCTL , 2U , 0U , port2_pin0_config );
836+ 
837+ 	uint32_t  port2_pin1_config  =  (/* Pin is configured as SD0_D1 */ 
838+ 		IOPCTL_PIO_FUNC1  |
839+ 		/* Enable pull-up / pull-down function */ 
840+ 		IOPCTL_PIO_PUPD_EN  |
841+ 		/* Enable pull-up function */ 
842+ 		IOPCTL_PIO_PULLUP_EN  |
843+ 		/* Enables input buffer function */ 
844+ 		IOPCTL_PIO_INBUF_EN  |
845+ 		/* Normal mode */ 
846+ 		IOPCTL_PIO_SLEW_RATE_NORMAL  |
847+ 		/* Normal drive */ 
848+ 		IOPCTL_PIO_FULLDRIVE_DI  |
849+ 		/* Analog mux is disabled */ 
850+ 		IOPCTL_PIO_ANAMUX_DI  |
851+ 		/* Pseudo Output Drain is disabled */ 
852+ 		IOPCTL_PIO_PSEDRAIN_DI  |
853+ 		/* Input function is not inverted */ 
854+ 		IOPCTL_PIO_INV_DI );
855+ 	/* PORT2 PIN1 (coords: T11) is configured as SD0_D1 */ 
856+ 	IOPCTL_PinMuxSet (IOPCTL , 2U , 1U , port2_pin1_config );
857+ 
858+ 	uint32_t  port2_pin10_config  =  (/* Pin is configured as PIO2_10 */ 
859+ 		IOPCTL_PIO_FUNC0  |
860+ 		/* Disable pull-up / pull-down function */ 
861+ 		IOPCTL_PIO_PUPD_DI  |
862+ 		/* Enable pull-down function */ 
863+ 		IOPCTL_PIO_PULLDOWN_EN  |
864+ 		/* Disable input buffer function */ 
865+ 		IOPCTL_PIO_INBUF_DI  |
866+ 		/* Normal mode */ 
867+ 		IOPCTL_PIO_SLEW_RATE_NORMAL  |
868+ 		/* Normal drive */ 
869+ 		IOPCTL_PIO_FULLDRIVE_DI  |
870+ 		/* Analog mux is disabled */ 
871+ 		IOPCTL_PIO_ANAMUX_DI  |
872+ 		/* Pseudo Output Drain is disabled */ 
873+ 		IOPCTL_PIO_PSEDRAIN_DI  |
874+ 		/* Input function is not inverted */ 
875+ 		IOPCTL_PIO_INV_DI );
876+ 	/* PORT2 PIN10 (coords: T15) is configured as PIO2_10 */ 
877+ 	IOPCTL_PinMuxSet (IOPCTL , 2U , 10U , port2_pin10_config );
878+ 
879+ 	uint32_t  port2_pin2_config  =  (/* Pin is configured as SD0_D2 */ 
880+ 		IOPCTL_PIO_FUNC1  |
881+ 		/* Enable pull-up / pull-down function */ 
882+ 		IOPCTL_PIO_PUPD_EN  |
883+ 		/* Enable pull-up function */ 
884+ 		IOPCTL_PIO_PULLUP_EN  |
885+ 		/* Enables input buffer function */ 
886+ 		IOPCTL_PIO_INBUF_EN  |
887+ 		/* Normal mode */ 
888+ 		IOPCTL_PIO_SLEW_RATE_NORMAL  |
889+ 		/* Normal drive */ 
890+ 		IOPCTL_PIO_FULLDRIVE_DI  |
891+ 		/* Analog mux is disabled */ 
892+ 		IOPCTL_PIO_ANAMUX_DI  |
893+ 		/* Pseudo Output Drain is disabled */ 
894+ 		IOPCTL_PIO_PSEDRAIN_DI  |
895+ 		/* Input function is not inverted */ 
896+ 		IOPCTL_PIO_INV_DI );
897+ 	/* PORT2 PIN2 (coords: U11) is configured as SD0_D2 */ 
898+ 	IOPCTL_PinMuxSet (IOPCTL , 2U , 2U , port2_pin2_config );
899+ 
900+ 	uint32_t  port2_pin3_config  =  (/* Pin is configured as SD0_D3 */ 
901+ 		IOPCTL_PIO_FUNC1  |
902+ 		/* Enable pull-up / pull-down function */ 
903+ 		IOPCTL_PIO_PUPD_EN  |
904+ 		/* Enable pull-up function */ 
905+ 		IOPCTL_PIO_PULLUP_EN  |
906+ 		/* Enables input buffer function */ 
907+ 		IOPCTL_PIO_INBUF_EN  |
908+ 		/* Normal mode */ 
909+ 		IOPCTL_PIO_SLEW_RATE_NORMAL  |
910+ 		/* Normal drive */ 
911+ 		IOPCTL_PIO_FULLDRIVE_DI  |
912+ 		/* Analog mux is disabled */ 
913+ 		IOPCTL_PIO_ANAMUX_DI  |
914+ 		/* Pseudo Output Drain is disabled */ 
915+ 		IOPCTL_PIO_PSEDRAIN_DI  |
916+ 		/* Input function is not inverted */ 
917+ 		IOPCTL_PIO_INV_DI );
918+ 	/* PORT2 PIN3 (coords: T12) is configured as SD0_D3 */ 
919+ 	IOPCTL_PinMuxSet (IOPCTL , 2U , 3U , port2_pin3_config );
920+ 
921+ 	uint32_t  port2_pin4_config  =  (/* Pin is configured as PIO2_4 */ 
922+ 		IOPCTL_PIO_FUNC0  |
923+ 		/* Disable pull-up / pull-down function */ 
924+ 		IOPCTL_PIO_PUPD_DI  |
925+ 		/* Enable pull-down function */ 
926+ 		IOPCTL_PIO_PULLDOWN_EN  |
927+ 		/* Disable input buffer function */ 
928+ 		IOPCTL_PIO_INBUF_DI  |
929+ 		/* Normal mode */ 
930+ 		IOPCTL_PIO_SLEW_RATE_NORMAL  |
931+ 		/* Normal drive */ 
932+ 		IOPCTL_PIO_FULLDRIVE_DI  |
933+ 		/* Analog mux is disabled */ 
934+ 		IOPCTL_PIO_ANAMUX_DI  |
935+ 		/* Pseudo Output Drain is disabled */ 
936+ 		IOPCTL_PIO_PSEDRAIN_DI  |
937+ 		/* Input function is not inverted */ 
938+ 		IOPCTL_PIO_INV_DI );
939+ 	/* PORT2 PIN4 (coords: T13) is configured as PIO2_4 */ 
940+ 	IOPCTL_PinMuxSet (IOPCTL , 2U , 4U , port2_pin4_config );
941+ 
942+ 	uint32_t  port2_pin9_config  =  (/* Pin is configured as SD0_CARD_DET_N */ 
943+ 		IOPCTL_PIO_FUNC1  |
944+ 		/* Enable pull-up / pull-down function */ 
945+ 		IOPCTL_PIO_PUPD_EN  |
946+ 		/* Enable pull-up function */ 
947+ 		IOPCTL_PIO_PULLUP_EN  |
948+ 		/* Enables input buffer function */ 
949+ 		IOPCTL_PIO_INBUF_EN  |
950+ 		/* Normal mode */ 
951+ 		IOPCTL_PIO_SLEW_RATE_NORMAL  |
952+ 		/* Normal drive */ 
953+ 		IOPCTL_PIO_FULLDRIVE_DI  |
954+ 		/* Analog mux is disabled */ 
955+ 		IOPCTL_PIO_ANAMUX_DI  |
956+ 		/* Pseudo Output Drain is disabled */ 
957+ 		IOPCTL_PIO_PSEDRAIN_DI  |
958+ 		/* Input function is not inverted */ 
959+ 		IOPCTL_PIO_INV_DI );
960+ 	/* PORT2 PIN9 (coords: R13) is configured as SD0_CARD_DET_N */ 
961+ 	IOPCTL_PinMuxSet (IOPCTL , 2U , 9U , port2_pin9_config );
771962#endif 
772963
773964	return  0 ;
0 commit comments