Lines Matching +full:operation +full:- +full:mode

4  * SPDX-License-Identifier: Apache-2.0
30 * bits[15:8] = bytes number of clocks with data lines tri-stated
53 .operation = (SPI_OP_MODE_MASTER | SPI_TRANSFER_MSB | SPI_WORD_SET(8)
59 .operation = (SPI_OP_MODE_MASTER | SPI_TRANSFER_MSB | SPI_WORD_SET(8)
65 .operation = (SPI_OP_MODE_MASTER | SPI_TRANSFER_MSB | SPI_WORD_SET(8)
71 .operation = (SPI_OP_MODE_MASTER | SPI_TRANSFER_MSB | SPI_WORD_SET(8)
87 * SPI clocks based on single, dual, or quad mode.
88 * mode = 1(full-duplex), 2(dual), 4(quad)
89 * full-duplex: 8 clocks per byte
93 static uint32_t spi_clocks_to_bytes(uint32_t spi_clocks, uint8_t mode) in spi_clocks_to_bytes() argument
97 if (mode == 4u) { in spi_clocks_to_bytes()
99 } else if (mode == 2u) { in spi_clocks_to_bytes()
113 return -EINVAL; in spi_flash_address_format()
117 dest[i] = (uint8_t)((spi_addr >> ((addrsz - (i + 1U)) * 8U)) & 0xffU); in spi_flash_address_format()
210 * - Find spi device
211 * - Read flash jedec id
248 * - write enable
249 * - erase data in flash device
250 * - read register1 and wait for erase operation completed
279 /* read SPI flash status register1 to check whether erase operation completed */ in ZTEST_USER()
291 * - flash write enable
292 * - write data into flash using spi api
323 /* read register1 to check whether program operation completed */ in test_spi_single_write()
333 * @brief Read data from flash using spi single mode
335 * - read data using spi single mode
336 * - check read buffer data whether correct
338 * to be generated with I/O lines tri-stated after the address has been
343 * For full-duplex one byte is 8 clocks, dual one byte is 4 clocks, and for
356 * bits[15:8] = number of SPI clocks with I/O lines tri-stated after in ZTEST_USER()
361 /* read data using spi single mode */ in ZTEST_USER()
362 /* set the spi operation code and address */ in ZTEST_USER()
405 * @brief Read data from flash using spi dual mode
407 * - read data using spi dual mode
408 * - check read buffer data whether correct
423 /* read data using spi dual mode */ in ZTEST_USER()
424 /* set the spi operation code and address */ in ZTEST_USER()
452 /* send opcode, address, and tri-state clocks using single mode */ in ZTEST_USER()
456 /* get read data using dual mode */ in ZTEST_USER()
470 * @brief Write data into flash using spi quad mode
472 * - check and make sure spi quad mode is enabled
473 * - write data using spi quad mode
484 /* read register2 to judge whether quad mode is enabled */ in test_spi_quad_write()
488 /* set register2 QE=1 to enable quad mode. We write the volatile STATUS2 register in test_spi_quad_write()
501 /* read register2 to confirm quad mode is enabled */ in test_spi_quad_write()
508 "Enable QSPI mode failure"); in test_spi_quad_write()
515 /* write data using spi quad mode */ in test_spi_quad_write()
516 /* send quad write opcode and address using single mode */ in test_spi_quad_write()
531 /* send data using quad mode */ in test_spi_quad_write()
553 * @brief Read data from flash using spi quad mode
555 * - read data using spi quad mode
556 * - check read buffer data whether correct
569 /* read data using spi quad mode in ZTEST_USER()
570 * Transmit opcode, address, and tri-state clocks using full-duplex mode in ZTEST_USER()
576 /* set the spi operation code and address */ in ZTEST_USER()
604 /* send opcode and address using single mode with Hold CS ON flag */ in ZTEST_USER()
608 /* read data using quad mode */ in ZTEST_USER()