88#define DRIVERS_MSPI_NRFE_MSPI_H
99
1010#include <zephyr/drivers/pinctrl.h>
11+ #include <zephyr/drivers/mspi.h>
1112
1213#ifdef __cplusplus
1314extern "C" {
1415#endif
1516
1617#ifdef CONFIG_SOC_NRF54L15
17- #define NRFE_MSPI_PORT_NUMBER 2 /* Physical port number */
18+
19+ #define NRFE_MSPI_PORT_NUMBER 2 /* Physical port number */
1820#define NRFE_MSPI_SCK_PIN_NUMBER 1 /* Physical pins number on port 2 */
1921#define NRFE_MSPI_DQ0_PIN_NUMBER 2
2022#define NRFE_MSPI_DQ1_PIN_NUMBER 4
2123#define NRFE_MSPI_DQ2_PIN_NUMBER 3
2224#define NRFE_MSPI_DQ3_PIN_NUMBER 0
2325#define NRFE_MSPI_CS0_PIN_NUMBER 5
24- #define NRFE_MSPI_PINS_MAX 6
25-
26- #define NRFE_MSPI_SCK_PIN_NUMBER_VIO 0 /* FLPR VIO SCLK pin number */
27- #define NRFE_MSPI_DQ0_PIN_NUMBER_VIO 1
28- #define NRFE_MSPI_DQ1_PIN_NUMBER_VIO 2
29- #define NRFE_MSPI_DQ2_PIN_NUMBER_VIO 3
30- #define NRFE_MSPI_DQ3_PIN_NUMBER_VIO 4
31- #define NRFE_MSPI_CS0_PIN_NUMBER_VIO 5
26+ #define NRFE_MSPI_PINS_MAX 6
3227
33- #define VIO (_pin_ ) _pin_##_VIO
3428#else
3529#error "Unsupported SoC for SDP MSPI"
3630#endif
3731
38- #define NRFE_MSPI_MAX_CE_PINS_COUNT 5 /* Ex. CE0 CE1 CE2 CE3 CE4 */
39-
4032/** @brief eMSPI opcodes. */
4133enum nrfe_mspi_opcode {
4234 NRFE_MSPI_EP_BOUNDED = 0 ,
4335 NRFE_MSPI_CONFIG_PINS ,
44- NRFE_MSPI_CONFIG_CTRL , /* struct mspi_cfg */
45- NRFE_MSPI_CONFIG_DEV , /* struct mspi_dev_cfg */
46- NRFE_MSPI_CONFIG_XFER , /* struct mspi_xfer */
36+ NRFE_MSPI_CONFIG_CTRL , /* struct mspi_cfg */
37+ NRFE_MSPI_CONFIG_DEV , /* struct mspi_dev_cfg */
38+ NRFE_MSPI_CONFIG_XFER , /* struct mspi_xfer */
4739 NRFE_MSPI_TX ,
4840 NRFE_MSPI_TXRX ,
4941 NRFE_MSPI_WRONG_OPCODE ,
@@ -60,6 +52,26 @@ typedef struct __packed {
6052 uint8_t data ;
6153} nrfe_mspi_flpr_response_t ;
6254
55+ typedef struct __packed {
56+ uint8_t opcode ;
57+ struct mspi_cfg cfg ;
58+ } nrfe_mspi_cfg_t ;
59+
60+ typedef struct __packed {
61+ uint8_t opcode ;
62+ struct mspi_dev_cfg cfg ;
63+ } nrfe_mspi_dev_cfg_t ;
64+
65+ typedef struct __packed {
66+ uint8_t opcode ;
67+ struct mspi_xfer xfer ;
68+ } nrfe_mspi_xfer_t ;
69+
70+ typedef struct __packed {
71+ uint8_t opcode ;
72+ struct mspi_xfer_packet packet ;
73+ } nrfe_mspi_xfer_packet_t ;
74+
6375#ifdef __cplusplus
6476}
6577#endif
0 commit comments