Lines Matching refs:psram
68 static int memc_mspi_aps6404l_command_write(const struct device *psram, uint8_t cmd, uint32_t addr, in memc_mspi_aps6404l_command_write() argument
71 const struct memc_mspi_aps6404l_config *cfg = psram->config; in memc_mspi_aps6404l_command_write()
72 struct memc_mspi_aps6404l_data *data = psram->data; in memc_mspi_aps6404l_command_write()
104 static int memc_mspi_aps6404l_command_read(const struct device *psram, uint8_t cmd, uint32_t addr, in memc_mspi_aps6404l_command_read() argument
107 const struct memc_mspi_aps6404l_config *cfg = psram->config; in memc_mspi_aps6404l_command_read()
108 struct memc_mspi_aps6404l_data *data = psram->data; in memc_mspi_aps6404l_command_read()
139 static void acquire(const struct device *psram) in acquire() argument
141 const struct memc_mspi_aps6404l_config *cfg = psram->config; in acquire()
142 struct memc_mspi_aps6404l_data *data = psram->data; in acquire()
160 static void release(const struct device *psram) in release() argument
162 const struct memc_mspi_aps6404l_config *cfg = psram->config; in release()
163 struct memc_mspi_aps6404l_data *data = psram->data; in release()
172 static int memc_mspi_aps6404l_reset(const struct device *psram) in memc_mspi_aps6404l_reset() argument
178 ret = memc_mspi_aps6404l_command_write(psram, APS6404L_RESET_ENABLE, 0, NULL, 0); in memc_mspi_aps6404l_reset()
182 ret = memc_mspi_aps6404l_command_write(psram, APS6404L_RESET_MEMORY, 0, NULL, 0); in memc_mspi_aps6404l_reset()
191 static int memc_mspi_aps6404l_get_vendor_id(const struct device *psram, uint8_t *vendor_id) in memc_mspi_aps6404l_get_vendor_id() argument
196 ret = memc_mspi_aps6404l_command_read(psram, APS6404L_READ_ID, 0, (uint8_t *)&buffer, 2); in memc_mspi_aps6404l_get_vendor_id()
204 static int memc_mspi_aps6404l_half_sleep_enter(const struct device *psram) in memc_mspi_aps6404l_half_sleep_enter() argument
209 ret = memc_mspi_aps6404l_command_write(psram, APS6404L_HALF_SLEEP_ENTER, 0, NULL, 0); in memc_mspi_aps6404l_half_sleep_enter()
220 static int memc_mspi_aps6404l_half_sleep_exit(const struct device *psram) in memc_mspi_aps6404l_half_sleep_exit() argument
222 const struct memc_mspi_aps6404l_config *cfg = psram->config; in memc_mspi_aps6404l_half_sleep_exit()
223 struct memc_mspi_aps6404l_data *data = psram->data; in memc_mspi_aps6404l_half_sleep_exit()
233 ret = memc_mspi_aps6404l_command_write(psram, 0, 0, NULL, 0); in memc_mspi_aps6404l_half_sleep_exit()
253 static int memc_mspi_aps6404l_pm_action(const struct device *psram, enum pm_device_action action) in memc_mspi_aps6404l_pm_action() argument
257 acquire(psram); in memc_mspi_aps6404l_pm_action()
258 memc_mspi_aps6404l_half_sleep_exit(psram); in memc_mspi_aps6404l_pm_action()
259 release(psram); in memc_mspi_aps6404l_pm_action()
263 acquire(psram); in memc_mspi_aps6404l_pm_action()
264 memc_mspi_aps6404l_half_sleep_enter(psram); in memc_mspi_aps6404l_pm_action()
265 release(psram); in memc_mspi_aps6404l_pm_action()
276 static int memc_mspi_aps6404l_init(const struct device *psram) in memc_mspi_aps6404l_init() argument
278 const struct memc_mspi_aps6404l_config *cfg = psram->config; in memc_mspi_aps6404l_init()
279 struct memc_mspi_aps6404l_data *data = psram->data; in memc_mspi_aps6404l_init()
303 if (memc_mspi_aps6404l_reset(psram)) { in memc_mspi_aps6404l_init()
307 if (memc_mspi_aps6404l_command_write(psram, APS6404L_QUAD_MODE_EXIT, 0, NULL, 0)) { in memc_mspi_aps6404l_init()
319 if (memc_mspi_aps6404l_reset(psram)) { in memc_mspi_aps6404l_init()
324 if (memc_mspi_aps6404l_get_vendor_id(psram, &vendor_id)) { in memc_mspi_aps6404l_init()
335 if (memc_mspi_aps6404l_command_write(psram, APS6404L_QUAD_MODE_ENTER, 0, NULL, 0)) { in memc_mspi_aps6404l_init()
375 release(psram); in memc_mspi_aps6404l_init()