Lines Matching +full:vw +full:- +full:reg

4  * SPDX-License-Identifier: Apache-2.0
44 *+----------------------------------------------------------------------+
46 *| eSPI host +-------------+ |
47 *| +-----------+ | Power | +----------+ |
49 *| +------------+ |processor | | controller | | sources | |
50 *| | SPI flash | +-----------+ +-------------+ +----------+ |
52 *| +------------+ | | | |
53 *| | | | +--------+ +---------------+ |
55 *| | | +-----+ +--------+ +----------+ +----v-----+ |
58 *| | | | +--------+ +----------+ +----------+ |
60 *| | | | ------+ | | |
62 *| | | +------v-----+ +---v-------v-------------v----+ |
64 *| | | | access +--->+ | |
65 *| | | +------------+ +------------------------------+ |
67 *| | +-----------+ | |
72 *+----------------------------------------------------------------------+
74 * v +-----------------+
75 * +---------+ | | | | | |
77 * +---------+ | + + + + | eSPI bus
81 * +-----------------+
83 *+-----------------------------------------------------------------------+
88 *+-----------------------------------------------------------------------+
254 /* USB-C port over current */
356 * @brief eSPI out-of-band transaction packet format
436 enum espi_vwire_signal vw,
439 enum espi_vwire_signal vw,
494 * +--------+ +---------+ +------+ +---------+ +---------+
497 * +--------+ +---------+ +------+ +---------+ +---------+
500 * +--------------+ ctrl regs | cap ctrl reg| +-----------+
501 * | +-------+ | +--------+ |
502 * | |<------+ | +------->| |
506 * | | +<------------------+ |
507 * | |<-----------| | |
509 * | |----------->+ response | |
510 * | | |------------------>+ |
513 * | | +<------------------+ |
515 * | | +------------------>+ |
523 * @retval -EIO General input / output error, failed to configure device.
524 * @retval -EINVAL invalid capabilities, failed to configure device.
525 * @retval -ENOTSUP capability not supported by eSPI slave.
533 (const struct espi_driver_api *)dev->api; in z_impl_espi_config()
535 return api->config(dev, cfg); in z_impl_espi_config()
557 (const struct espi_driver_api *)dev->api; in z_impl_espi_get_channel_status()
559 return api->get_channel_status(dev, ch); in z_impl_espi_get_channel_status()
572 * @retval -ENOTSUP if eSPI controller doesn't support raw packets and instead
574 * @retval -EIO General input / output error, failed to send over the bus.
583 (const struct espi_driver_api *)dev->api; in z_impl_espi_read_request()
585 if (!api->read_request) { in z_impl_espi_read_request()
586 return -ENOTSUP; in z_impl_espi_read_request()
589 return api->read_request(dev, req); in z_impl_espi_read_request()
602 * @retval -ENOTSUP if eSPI controller doesn't support raw packets and instead
604 * @retval -EINVAL General input / output error, failed to send over the bus.
613 (const struct espi_driver_api *)dev->api; in z_impl_espi_write_request()
615 if (!api->write_request) { in z_impl_espi_write_request()
616 return -ENOTSUP; in z_impl_espi_write_request()
619 return api->write_request(dev, req); in z_impl_espi_write_request()
635 * @retval -ENOTSUP if eSPI peripheral is off or not supported.
636 * @retval -EINVAL for unimplemented lpc opcode, but in range.
647 (const struct espi_driver_api *)dev->api; in z_impl_espi_read_lpc_request()
649 if (!api->read_lpc_request) { in z_impl_espi_read_lpc_request()
650 return -ENOTSUP; in z_impl_espi_read_lpc_request()
653 return api->read_lpc_request(dev, op, data); in z_impl_espi_read_lpc_request()
668 * @retval -ENOTSUP if eSPI peripheral is off or not supported.
669 * @retval -EINVAL for unimplemented lpc opcode, but in range.
680 (const struct espi_driver_api *)dev->api; in z_impl_espi_write_lpc_request()
682 if (!api->write_lpc_request) { in z_impl_espi_write_lpc_request()
683 return -ENOTSUP; in z_impl_espi_write_lpc_request()
686 return api->write_lpc_request(dev, op, data); in z_impl_espi_write_lpc_request()
700 * @retval -EIO General input / output error, failed to send over the bus.
711 (const struct espi_driver_api *)dev->api; in z_impl_espi_send_vwire()
713 return api->send_vwire(dev, signal, level); in z_impl_espi_send_vwire()
726 * @retval -EIO General input / output error, failed request to master.
737 (const struct espi_driver_api *)dev->api; in z_impl_espi_receive_vwire()
739 return api->receive_vwire(dev, signal, level); in z_impl_espi_receive_vwire()
743 * @brief Sends SMBus transaction (out-of-band) packet over eSPI bus.
751 * @retval -EIO General input / output error, failed request to master.
760 (const struct espi_driver_api *)dev->api; in z_impl_espi_send_oob()
762 if (!api->send_oob) { in z_impl_espi_send_oob()
763 return -ENOTSUP; in z_impl_espi_send_oob()
766 return api->send_oob(dev, pckt); in z_impl_espi_send_oob()
770 * @brief Receives SMBus transaction (out-of-band) packet from eSPI bus.
778 * @retval -EIO General input / output error, failed request to master.
787 (const struct espi_driver_api *)dev->api; in z_impl_espi_receive_oob()
789 if (!api->receive_oob) { in z_impl_espi_receive_oob()
790 return -ENOTSUP; in z_impl_espi_receive_oob()
793 return api->receive_oob(dev, pckt); in z_impl_espi_receive_oob()
805 * @retval -ENOTSUP eSPI flash logical channel transactions not supported.
806 * @retval -EBUSY eSPI flash channel is not ready or disabled by master.
807 * @retval -EIO General input / output error, failed request to master.
816 (const struct espi_driver_api *)dev->api; in z_impl_espi_read_flash()
818 if (!api->flash_read) { in z_impl_espi_read_flash()
819 return -ENOTSUP; in z_impl_espi_read_flash()
822 return api->flash_read(dev, pckt); in z_impl_espi_read_flash()
834 * @retval -ENOTSUP eSPI flash logical channel transactions not supported.
835 * @retval -EBUSY eSPI flash channel is not ready or disabled by master.
836 * @retval -EIO General input / output error, failed request to master.
845 (const struct espi_driver_api *)dev->api; in z_impl_espi_write_flash()
847 if (!api->flash_write) { in z_impl_espi_write_flash()
848 return -ENOTSUP; in z_impl_espi_write_flash()
851 return api->flash_write(dev, pckt); in z_impl_espi_write_flash()
863 * @retval -ENOTSUP eSPI flash logical channel transactions not supported.
864 * @retval -EBUSY eSPI flash channel is not ready or disabled by master.
865 * @retval -EIO General input / output error, failed request to master.
874 (const struct espi_driver_api *)dev->api; in z_impl_espi_flash_erase()
876 if (!api->flash_erase) { in z_impl_espi_flash_erase()
877 return -ENOTSUP; in z_impl_espi_flash_erase()
880 return api->flash_erase(dev, pckt); in z_impl_espi_flash_erase()
887 *+-------+ +-------------+ +------+ +---------+
889 *+---+---+ +-------+-----+ +---+--+ +----+----+
892 * +----------------------------> | | |
894 * +----------------------------->+ |
896 * | | IRQ +<------------+ resets the
897 * | | <-----------+ | bus
904 * | | | VW CH ready| eSPI host
905 * | | IRQ +<------------+ enables VW
906 * | | <-----------+ | channel
913 * | | <-------------+ event
914 * | +<------------+ |
915 * +<-----------------------------+ callback | |
920 * | | <-------------+ send VWire
921 * | +<------------+ |
922 * +<-----------------------------+ callback | |
927 * +------------------------------>------------>|------------>|
930 * | | <-------------+ send VWire
931 * | +<------------+ |
932 * +<-----------------------------+ callback | |
933 * | App reset host-related | | |
937 * | | +<------------+ send VWire
938 * | <-------------+ |
939 * <------------------------------+ | |
960 callback->handler = handler; in espi_init_callback()
961 callback->evt_type = evt_type; in espi_init_callback()
980 (const struct espi_driver_api *)dev->api; in espi_add_callback()
982 if (!api->manage_callback) { in espi_add_callback()
983 return -ENOTSUP; in espi_add_callback()
986 return api->manage_callback(dev, callback, true); in espi_add_callback()
1009 (const struct espi_driver_api *)dev->api; in espi_remove_callback()
1011 if (!api->manage_callback) { in espi_remove_callback()
1012 return -ENOTSUP; in espi_remove_callback()
1015 return api->manage_callback(dev, callback, false); in espi_remove_callback()