1 /* 2 * Copyright 2023 NXP 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #ifndef ZEPHYR_INCLUDE_DRIVERS_DMA_MCUX_SMARTDMA_H_ 8 #define ZEPHYR_INCLUDE_DRIVERS_DMA_MCUX_SMARTDMA_H_ 9 10 /* Write RGB565 data to MIPI DSI via DMA. */ 11 #define DMA_SMARTDMA_MIPI_RGB565_DMA 0 12 /* Write RGB888 data to MIPI DSI via DMA */ 13 #define DMA_SMARTDMA_MIPI_RGB888_DMA 1 14 /* Write RGB565 data to MIPI DSI via DMA. Rotate output data by 180 degrees */ 15 #define DMA_SMARTDMA_MIPI_RGB565_180 2 16 /* Write RGB888 data to MIPI DSI via DMA. Rotate output data by 180 degrees */ 17 #define DMA_SMARTDMA_MIPI_RGB888_180 3 18 19 /* Write RGB565 data to MIPI DSI via DMA. Swap data endianness, so that 20 * little endian RGB565 data will be written big endian style. 21 */ 22 #define DMA_SMARTDMA_MIPI_RGB565_DMA_SWAP 4 23 /* Write RGB888 data to MIPI DSI via DMA. Swap data endianness, so that 24 * little endian RGB888 data will be written big endian style. 25 */ 26 #define DMA_SMARTDMA_MIPI_RGB888_DMA_SWAP 5 27 /* Write RGB565 data to MIPI DSI via DMA. Rotate output data by 180 degrees, 28 * and swap data endianness 29 */ 30 #define DMA_SMARTDMA_MIPI_RGB565_180_SWAP 6 31 /* Write RGB888 data to MIPI DSI via DMA. Rotate output data by 180 degrees, 32 * and swap data endianness 33 */ 34 #define DMA_SMARTDMA_MIPI_RGB888_180_SWAP 7 35 36 37 38 /** 39 * @brief install SMARTDMA firmware 40 * 41 * Install a custom firmware for the smartDMA. This function allows the user 42 * to install a custom firmware into the smartDMA, which implements 43 * different API functions than the standard MCUX SDK firmware. 44 * @param dev: smartDMA device 45 * @param firmware: address of buffer containing smartDMA firmware 46 * @param len: length of firmware buffer 47 */ 48 void dma_smartdma_install_fw(const struct device *dev, uint8_t *firmware, 49 uint32_t len); 50 51 #define GD32_DMA_FEATURES_FIFO_THRESHOLD(threshold) (threshold & 0x3) 52 53 #endif /* ZEPHYR_INCLUDE_DRIVERS_DMA_MCUX_SMARTDMA_H_ */ 54