/Zephyr-latest/dts/bindings/usb/ |
D | renesas,smartbond-usbd.yaml | 2 # SPDX-License-Identifier: Apache-2.0 6 compatible: "renesas,smartbond-usbd" 8 include: usb-ep.yaml 11 dma-min-transfer-size: 16 ep-out-buf-size: 20 Buffer size for OUT end points 0-3. 22 fifo-read-threshold: 40 iso-out-mps: 43 Max packet size for ISO out endpoint
|
/Zephyr-latest/drivers/usb/udc/ |
D | udc_common.c | 2 * Copyright (c) 2021-2022 Nordic Semiconductor ASA 4 * SPDX-License-Identifier: Apache-2.0 27 struct net_buf_pool *const buf_pool = net_buf_pool_get(buf->pool_id); in udc_pool_data_alloc() 28 struct k_heap *const pool = buf_pool->alloc->alloc_data; in udc_pool_data_alloc() 43 struct net_buf_pool *buf_pool = net_buf_pool_get(buf->pool_id); in udc_pool_data_unref() 44 struct k_heap *pool = buf_pool->alloc->alloc_data; in udc_pool_data_unref() 65 struct udc_data *data = dev->data; in udc_set_suspended() 71 atomic_set_bit_to(&data->status, UDC_STATUS_SUSPENDED, value); in udc_set_suspended() 76 struct udc_data *data = dev->data; in udc_get_ep_cfg() 78 return data->ep_lut[USB_EP_LUT_IDX(ep)]; in udc_get_ep_cfg() [all …]
|
D | udc_skeleton.c | 4 * SPDX-License-Identifier: Apache-2.0 39 * non-volatile memory. This is usually accessed as 40 * const struct udc_skeleton_config *config = dev->config; 52 * Note that this is not accessible via dev->data, but as 89 if (cfg->stat.halted) { in udc_skeleton_ep_enqueue() 100 LOG_DBG("ep 0x%02x halted", cfg->addr); in udc_skeleton_ep_enqueue() 122 buf = udc_buf_get_all(dev, cfg->addr); in udc_skeleton_ep_dequeue() 124 udc_submit_ep_event(dev, buf, -ECONNABORTED); in udc_skeleton_ep_dequeue() 140 LOG_DBG("Enable ep 0x%02x", cfg->addr); in udc_skeleton_ep_enable() 152 LOG_DBG("Disable ep 0x%02x", cfg->addr); in udc_skeleton_ep_disable() [all …]
|
D | udc_virtual.c | 4 * SPDX-License-Identifier: Apache-2.0 58 const struct udc_vrt_config *config = dev->config; in vrt_request_reply() 60 pkt->reply = reply; in vrt_request_reply() 62 return uvb_reply_pkt(config->dev_node, pkt); in vrt_request_reply() 70 cfg->stat.halted = false; in ctrl_ep_clear_halt() 73 cfg->stat.halted = false; in ctrl_ep_clear_halt() 84 return -ENOMEM; in vrt_ctrl_feed_dout() 100 return -ENOMEM; in vrt_handle_setup() 103 net_buf_add_mem(buf, pkt->data, pkt->length); in vrt_handle_setup() 111 /* Allocate and feed buffer for data OUT stage */ in vrt_handle_setup() [all …]
|
D | udc_nrf.c | 4 * SPDX-License-Identifier: Apache-2.0 23 #include <zephyr/dt-bindings/regulator/nrf5x.h> 90 /* Allow data chunk on EP0 OUT */ in udc_nrf_clear_control_out() 93 LOG_INF("Allow data OUT"); in udc_nrf_clear_control_out() 108 .p_data = {.tx = buf->data}, in udc_event_xfer_in_next() 109 .size = buf->len, in udc_event_xfer_in_next() 119 udc_submit_ep_event(dev, buf, -ECONNREFUSED); in udc_event_xfer_in_next() 137 * s-in-[status] finished, release buffer. in udc_event_xfer_ctrl_in() 138 * Since the controller supports auto-status we cannot use in udc_event_xfer_ctrl_in() 169 uint8_t ep = event->data.eptransfer.ep; in udc_event_xfer_in() [all …]
|
D | udc_smartbond.c | 4 * SPDX-License-Identifier: Apache-2.0 39 #define REG_GET_BIT(reg, field) (USB->reg & USB_##reg##_##field##_Msk) 40 #define REG_SET_BIT(reg, field) (USB->reg |= USB_##reg##_##field##_Msk) 41 #define REG_CLR_BIT(reg, field) (USB->reg &= ~USB_##reg##_##field##_Msk) 43 (USB->reg = (USB->reg & ~USB_##reg##_##field##_Msk) | (val << USB_##reg##_##field##_Pos)) 69 * Those two following states are added to allow going out of sleep mode 93 * after ACK is received or when filling ISO endpoint with size larger then 97 uint8_t iso: 1; /** ISO endpoint */ member 123 #define EP0_OUT_STATE(data) (&data->ep_state[0][0]) 124 #define EP0_IN_STATE(data) (&data->ep_state[1][0]) [all …]
|
D | udc_numaker.c | 4 * SPDX-License-Identifier: Apache-2.0 40 /* Reserve DMA buffer for Setup/CTRL OUT/CTRL IN, required to be 8-byte aligned */ 48 /* OUT transaction for specific EP completed */ 52 /* Re-activate queued transfer for specific EP */ 69 } out; member 93 /* NOTE: On USBD, Setup and CTRL OUT are not completely separated. CTRL OUT MXPLD 95 * OUT MXPLD immediately on its interrupt. 103 /* EP MPS */ 105 uint16_t mps; member 132 * Allocate-only, and de-allocate all on re-initialize in udc_numaker_init(). [all …]
|
D | udc_renesas_ra.c | 4 * SPDX-License-Identifier: Apache-2.0 55 const struct device *dev = p_args->p_context; in udc_renesas_ra_event_handler() 58 switch (p_args->event.event_id) { in udc_renesas_ra_event_handler() 85 evt.hal_evt = p_args->event; in udc_renesas_ra_event_handler() 111 err = R_USBD_XferStart(&data->udc, ep, buf->data, buf->len); in udc_event_xfer_next() 113 err = R_USBD_XferStart(&data->udc, ep, buf->data, buf->size); in udc_event_xfer_next() 118 udc_submit_ep_event(dev, buf, -ECONNREFUSED); in udc_event_xfer_next() 133 return -ENOMEM; in usbd_ctrl_feed_dout() 136 k_fifo_put(&cfg->fifo, buf); in usbd_ctrl_feed_dout() 138 if (FSP_SUCCESS != R_USBD_XferStart(&data->udc, cfg->addr, buf->data, buf->size)) { in usbd_ctrl_feed_dout() [all …]
|
D | udc_rpi_pico.c | 5 * SPDX-License-Identifier: Apache-2.0 53 /* Trigger next transfer, must not be used for control OUT */ 57 /* OUT transaction for specific endpoint is finished */ 85 const struct rpi_pico_config *config = dev->config; in sie_status_clr() 86 usb_hw_t *base = config->base; in sie_status_clr() 88 rpi_pico_bit_clr((mm_reg_t)&base->sie_status, bit); in sie_status_clr() 101 const struct rpi_pico_config *config = dev->config; in get_ep_ctrl_reg() 102 usb_device_dpram_t *dpram = config->dpram; in get_ep_ctrl_reg() 109 return (uintptr_t)&dpram->ep_ctrl[USB_EP_GET_IDX(ep) - 1].out; in get_ep_ctrl_reg() 112 return (uintptr_t)&dpram->ep_ctrl[USB_EP_GET_IDX(ep) - 1].in; in get_ep_ctrl_reg() [all …]
|
D | udc_ambiq.c | 4 * SPDX-License-Identifier: Apache-2.0 28 /* OUT transaction completed */ 85 return -ENOMEM; in usbd_ctrl_feed_dout() 88 k_fifo_put(&cfg->fifo, buf); in usbd_ctrl_feed_dout() 90 udc_ambiq_rx(dev, cfg->addr, buf); in usbd_ctrl_feed_dout() 109 status = am_hal_usb_ep_xfer(priv->usb_handle, ep, NULL, 0); in udc_ambiq_tx() 111 status = am_hal_usb_ep_xfer(priv->usb_handle, ep, buf->data, buf->len); in udc_ambiq_tx() 117 return -EIO; in udc_ambiq_tx() 128 uint16_t rx_size = buf->size; in udc_ambiq_rx() 136 /* Make sure that OUT transaction size triggered doesn't exceed EP's MPS */ in udc_ambiq_rx() [all …]
|
D | udc_dwc2.c | 4 * SPDX-License-Identifier: Apache-2.0 28 /* Trigger next transfer, must not be used for control OUT */ 44 /* Minimum RX FIFO size in 32-bit words considering the largest used OUT packet 45 * of 512 bytes. The value must be adjusted according to the number of OUT 49 /* Default Rx FIFO size in 32-bit words calculated to support High-Speed with: 51 * * Global OUT NAK: 1 location 53 * Driver adds 2 locations for each OUT endpoint to this value. 57 /* TX FIFO0 depth in 32-bit words (used by control IN endpoint) 105 /* Transfer triggers (IN on bits 0-15, OUT on bits 16-31) */ 107 /* Finished transactions (IN on bits 0-15, OUT on bits 16-31) */ [all …]
|
D | udc_mcux_ehci.c | 4 * SPDX-License-Identifier: Apache-2.0 80 const struct udc_mcux_config *config = dev->config; in udc_mcux_control() 81 const usb_device_controller_interface_struct_t *mcux_if = config->mcux_if; in udc_mcux_control() 85 status = mcux_if->deviceControl(priv->mcux_device.controllerHandle, in udc_mcux_control() 89 return -ENOMEM; in udc_mcux_control() 100 const struct udc_mcux_config *config = dev->config; in udc_mcux_ep_feed() 101 const usb_device_controller_interface_struct_t *mcux_if = config->mcux_if; in udc_mcux_ep_feed() 108 ep_status.endpointAddress = cfg->addr; in udc_mcux_ep_feed() 111 return -EACCES; /* stalled */ in udc_mcux_ep_feed() 115 if (!udc_ep_is_busy(dev, cfg->addr)) { in udc_mcux_ep_feed() [all …]
|
D | udc_mcux_ip3511.c | 4 * SPDX-License-Identifier: Apache-2.0 80 const struct udc_mcux_config *config = dev->config; in udc_mcux_control() 81 const usb_device_controller_interface_struct_t *mcux_if = config->mcux_if; in udc_mcux_control() 85 status = mcux_if->deviceControl(priv->mcux_device.controllerHandle, in udc_mcux_control() 89 return -ENOMEM; in udc_mcux_control() 100 const struct udc_mcux_config *config = dev->config; in udc_mcux_ep_feed() 101 const usb_device_controller_interface_struct_t *mcux_if = config->mcux_if; in udc_mcux_ep_feed() 108 ep_status.endpointAddress = cfg->addr; in udc_mcux_ep_feed() 111 return -EACCES; /* stalled */ in udc_mcux_ep_feed() 115 if (!udc_ep_is_busy(dev, cfg->addr)) { in udc_mcux_ep_feed() [all …]
|
D | udc_kinetis.c | 5 * SPDX-License-Identifier: Apache-2.0 95 /* Trigger next transfer, must not be used for control OUT */ 99 /* OUT transaction for specific endpoint is finished */ 122 * Buffer pointers and busy flags used only for control OUT 137 const struct usbfsotg_config *config = dev->config; in usbfsotg_get_ebd() 140 bd_idx = USB_EP_GET_IDX(cfg->addr) * 4U + (cfg->stat.odd ^ opposite); in usbfsotg_get_ebd() 141 if (USB_EP_DIR_IS_IN(cfg->addr)) { in usbfsotg_get_ebd() 145 return &config->bdt[bd_idx]; in usbfsotg_get_ebd() 150 /* Do not use it for control OUT endpoint */ in usbfsotg_bd_is_busy() 151 return bd->get.own; in usbfsotg_bd_is_busy() [all …]
|
D | udc_it82xx2.c | 4 * SPDX-License-Identifier: Apache-2.0 15 #include <zephyr/dt-bindings/interrupt-controller/it8xxx2-wuc.h> 76 #define DC_CONNECT_TO_HOST BIT(6) /* internal pull-up */ 127 /* shared OUT FIFO state */ 167 const struct usb_it82xx2_config *config = dev->config; in it82xx2_get_ext_ctrl() 168 struct usb_it82xx2_regs *const usb_regs = config->base; in it82xx2_get_ext_ctrl() 170 usb_regs->fifo_regs[EP_EXT_REGS_9X].ext_4_15.epn0n1_ext_ctrl; in it82xx2_get_ext_ctrl() 172 usb_regs->fifo_regs[EP_EXT_REGS_DX].ext_0_3.epn_ext_ctrl; in it82xx2_get_ext_ctrl() 175 idx = ((ep_idx - 4) % 3) + 1; in it82xx2_get_ext_ctrl() 179 idx = (ep_idx - 4) / 2; in it82xx2_get_ext_ctrl() [all …]
|
D | udc_stm32.c | 4 * SPDX-License-Identifier: Apache-2.0 78 const struct device *dev = priv->dev; in HAL_PCD_ResetCallback() 79 const struct udc_stm32_config *cfg = dev->config; in HAL_PCD_ResetCallback() 82 /* Re-Enable control endpoints */ in HAL_PCD_ResetCallback() 84 if (ep && ep->stat.enabled) { in HAL_PCD_ResetCallback() 85 HAL_PCD_EP_Open(&priv->pcd, USB_CONTROL_EP_OUT, cfg->ep0_mps, in HAL_PCD_ResetCallback() 90 if (ep && ep->stat.enabled) { in HAL_PCD_ResetCallback() 91 HAL_PCD_EP_Open(&priv->pcd, USB_CONTROL_EP_IN, cfg->ep0_mps, in HAL_PCD_ResetCallback() 95 udc_submit_event(priv->dev, UDC_EVT_RESET, 0); in HAL_PCD_ResetCallback() 102 udc_submit_event(priv->dev, UDC_EVT_VBUS_READY, 0); in HAL_PCD_ConnectCallback() [all …]
|
/Zephyr-latest/include/zephyr/drivers/usb/ |
D | udc.h | 2 * Copyright (c) 2021-2022 Nordic Semiconductor ASA 4 * SPDX-License-Identifier: Apache-2.0 41 /** Controller performs status OUT stage automatically */ 70 uint32_t mps : 16; member 77 /** ISO transfer capable endpoint */ 78 uint32_t iso : 1; member 79 /** High-Bandwidth (interrupt or iso) capable endpoint */ 83 /** OUT transfer capable endpoint */ 84 uint32_t out : 1; member 122 uint16_t mps; member [all …]
|
/Zephyr-latest/drivers/usb/device/ |
D | usb_dc_smartbond.c | 4 * SPDX-License-Identifier: Apache-2.0 66 /* EP OUT buffers */ 86 * Those two following states are added to allow going out of sleep mode 106 (struct smartbond_ep_reg_set *)&USB->USB_EPC0_REG, 107 (struct smartbond_ep_reg_set *)&USB->USB_EPC1_REG, 108 (struct smartbond_ep_reg_set *)&USB->USB_EPC3_REG, 109 (struct smartbond_ep_reg_set *)&USB->USB_EPC5_REG, 117 uint16_t mps; /** Endpoint max packet size */ member 119 * after ACK is received or when filling ISO endpoint with size larger then 128 uint8_t iso : 1; /** ISO endpoint */ member [all …]
|
D | usb_dc_numaker.c | 4 * SPDX-License-Identifier: Apache-2.0 11 #include <zephyr/dt-bindings/usb/usb.h> 39 /* Reserve DMA buffer for Setup/CTRL OUT/CTRL IN, required to be 8-byte aligned */ 45 * This is to static-allocate EP contexts which can accommodate all instances. 103 * one-shot implementation 110 /* NOTE: On USBD, Setup and CTRL OUT are not completely separated. CTRL OUT MXPLD 112 * OUT MXPLD immediately on its interrupt. 120 /* EP MPS */ 122 uint16_t mps; member 131 * Allocate-only, and de-allocate all on re-initialize in usb_dc_attach(). [all …]
|
D | usb_dc_nrfx.c | 5 * SPDX-License-Identifier: Apache-2.0 25 #include <zephyr/dt-bindings/regulator/nrf5x.h> 192 /** Number of OUT Endpoints configured (including control) */ 196 /** Number of ISO IN Endpoints */ 199 /** Number of ISO OUT Endpoints */ 202 /** ISO endpoint index */ 212 * Max buffers size possible: 1536 Bytes (8 EP * 64B + 1 ISO * 1024B) 234 * @param drv_lock Mutex for thread-safe nrfx driver use 261 * device stack, for executing the endpoints callbacks, etc.) out of the ISR 285 return get_usbd_ctx()->attached; in dev_attached() [all …]
|
/Zephyr-latest/subsys/usb/device_next/class/ |
D | usbd_uac2.c | 2 * Copyright (c) 2023-2024 Nordic Semiconductor ASA 4 * SPDX-License-Identifier: Apache-2.0 26 + AS_IS_USB_ISO_IN(node) /* ISO IN double buffering */ + \ 37 * requires 6 bytes) and feedback endpoint (4 bytes on High-Speed, 3 bytes on 38 * Full-Speed). Because the total number of endpoints is really small (typically 40 * the USB specification itself is 30 non-control endpoints). Therefore, the 51 /* A.14 Audio Class-Specific Request Codes */ 60 #define CONTROL_ATTRIBUTE(setup) (setup->bRequest) 61 #define CONTROL_ENTITY_ID(setup) ((setup->wIndex & 0xFF00) >> 8) 62 #define CONTROL_SELECTOR(setup) ((setup->wValue & 0xFF00) >> 8) [all …]
|
/Zephyr-latest/doc/releases/ |
D | release-notes-3.3.rst | 14 * Introduced :ref:`USB-C <usbc_api>` device stack with PD (power delivery) 17 CMSIS-DSP as the default backend. 30 * CVE-2023-0359: Under embargo until 2023-04-20 32 * CVE-2023-0779: Under embargo until 2023-04-22 66 removed in favor of new :dtcompatible:`zephyr,flash-disk` devicetree binding. 71 * Starting from this release ``zephyr-`` prefixed tags won't be created 82 image states). Use of a truncated hash or non-sha256 hash will still work 88 registration function at boot-up. If applications register this then 93 application code, these will now automatically be registered at boot-up (this 129 This may cause out-of-tree scripts or commands to fail if they have relied [all …]
|
D | release-notes-2.2.rst | 18 * Fix CVE-2020-10028 19 * Fix CVE-2020-10060 20 * Fix CVE-2020-10063 21 * Fix CVE-2020-10066 32 * :github:`23494` - Bluetooth: LL/PAC/SLA/BV-01-C fails if Slave-initiated Feature Exchange is disa… 33 * :github:`23485` - BT: host: Service Change indication sent regardless of whether it is needed or … 34 * :github:`23482` - 2M PHY + DLE and timing calculations on an encrypted link are wrong 35 * :github:`23070` - Bluetooth: controller: Fix ticker implementation to avoid catch up 36 * :github:`22967` - Bluetooth: controller: ASSERTION FAIL on invalid packet sequence 37 * :github:`24183` - [v2.2] Bluetooth: controller: split: Regression slave latency during connection… [all …]
|
D | release-notes-3.4.rst | 20 * Added Power Delivery Source Support to the USB-C Stack. 22 * Cache API functions are now fully in-lined by compilers. 23 * Added an API for real-time clocks (RTC). 29 - Introduction of 3 new test harnesses into twister supporting pyTest, 31 - Transitioning to new Ztest API was completed and legacy Ztest was deprecated. 46 * CVE-2023-1901: Under embargo until 2023-07-04 48 * CVE-2023-1902: Under embargo until 2023-07-04 67 +--------------------------------------------------+ 69 +--------------------------------------------------+ 71 +--------------------------------------------------+ [all …]
|