1 /* 2 * Copyright (c) 2020, NXP 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 /** 8 * @file 9 * @brief Board configuration macros for the nxp_lpc55s69 platform 10 * 11 * This header file is used to specify and describe board-level aspects for the 12 * 'nxp_lpc55s69' platform. 13 */ 14 15 #ifndef _SOC__H_ 16 #define _SOC__H_ 17 18 #ifndef _ASMLANGUAGE 19 #include <zephyr/sys/util.h> 20 #include <fsl_common.h> 21 22 /* Add include for DTS generated information */ 23 #include <zephyr/devicetree.h> 24 25 #endif /* !_ASMLANGUAGE */ 26 27 /*!<@brief Analog mux is disabled */ 28 #define IOPCTL_PIO_ANAMUX_DI 0x00u 29 /*!<@brief Analog mux is enabled */ 30 #define IOPCTL_PIO_ANAMUX_EN 0x0200u 31 /*!<@brief Normal drive */ 32 #define IOPCTL_PIO_FULLDRIVE_DI 0x00u 33 /*!<@brief Full drive */ 34 #define IOPCTL_PIO_FULLDRIVE_EN 0x0100u 35 /*!<@brief Selects pin function 0 */ 36 #define IOPCTL_PIO_FUNC0 0x00u 37 /*!<@brief Selects pin function 1 */ 38 #define IOPCTL_PIO_FUNC1 0x01u 39 /*!<@brief Selects pin function 2 */ 40 #define IOPCTL_PIO_FUNC2 0x02u 41 /*!<@brief Selects pin function 3 */ 42 #define IOPCTL_PIO_FUNC3 0x03u 43 /*!<@brief Selects pin function 4 */ 44 #define IOPCTL_PIO_FUNC4 0x04u 45 /*!<@brief Selects pin function 5 */ 46 #define IOPCTL_PIO_FUNC5 0x05u 47 /*!<@brief Selects pin function 6 */ 48 #define IOPCTL_PIO_FUNC6 0x06u 49 /*!<@brief Selects pin function 7 */ 50 #define IOPCTL_PIO_FUNC7 0x07u 51 /*!<@brief Selects pin function 8 */ 52 #define IOPCTL_PIO_FUNC8 0x08u 53 /*!<@brief Disable input buffer function */ 54 #define IOPCTL_PIO_INBUF_DI 0x00u 55 /*!<@brief Enables input buffer function */ 56 #define IOPCTL_PIO_INBUF_EN 0x40u 57 /*!<@brief Input function is not inverted */ 58 #define IOPCTL_PIO_INV_DI 0x00u 59 /*!<@brief Input function is inverted */ 60 #define IOPCTL_PIO_INV_EN 0x0800u 61 /*!<@brief Pseudo Output Drain is disabled */ 62 #define IOPCTL_PIO_PSEDRAIN_DI 0x00u 63 /*!<@brief Pseudo Output Drain is enabled */ 64 #define IOPCTL_PIO_PSEDRAIN_EN 0x0400u 65 /*!<@brief Enable pull-down function */ 66 #define IOPCTL_PIO_PULLDOWN_EN 0x00u 67 /*!<@brief Enable pull-up function */ 68 #define IOPCTL_PIO_PULLUP_EN 0x20u 69 /*!<@brief Disable pull-up / pull-down function */ 70 #define IOPCTL_PIO_PUPD_DI 0x00u 71 /*!<@brief Enable pull-up / pull-down function */ 72 #define IOPCTL_PIO_PUPD_EN 0x10u 73 /*!<@brief Normal mode */ 74 #define IOPCTL_PIO_SLEW_RATE_NORMAL 0x00u 75 /*!<@brief Slow mode */ 76 #define IOPCTL_PIO_SLEW_RATE_SLOW 0x80u 77 78 /* Workaround to handle macro variation in the SDK */ 79 #ifndef INPUTMUX_PINTSEL_COUNT 80 #define INPUTMUX_PINTSEL_COUNT INPUTMUX_PINT_SEL_COUNT 81 #endif 82 83 #ifdef __cplusplus 84 extern "C" { 85 #endif 86 87 #if CONFIG_IMX_USDHC && \ 88 (DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(usdhc0)) || \ 89 DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(usdhc1))) 90 91 void imxrt_usdhc_pinmux(uint16_t nusdhc, 92 bool init, uint32_t speed, uint32_t strength); 93 void imxrt_usdhc_dat3_pull(bool pullup); 94 95 #endif 96 97 #ifdef __cplusplus 98 } 99 #endif 100 101 #endif /* _SOC__H_ */ 102