/Zephyr-latest/include/zephyr/drivers/usb_c/ |
D | usbc_tc.h | 3 * SPDX-License-Identifier: Apache-2.0 8 * @brief USB Type-C Cable and Connector API used for USB-C drivers 10 * The information in this file was taken from the USB Type-C 18 * @brief USB Type-C 19 * @defgroup usb_type_c USB Type-C 31 * @brief VBUS minimum for a sink disconnect detection. 32 * See Table 4-3 VBUS Sink Characteristics 37 * @brief VBUS maximum for a sink disconnect detection. 38 * See Table 4-3 VBUS Sink Characteristics 43 * @brief From entry to Attached.SRC until VBUS reaches the minimum vSafe5V threshold as [all …]
|
D | usbc_tcpc.h | 3 * SPDX-License-Identifier: Apache-2.0 8 * @brief USBC Type-C Port Controller device APIs 10 * This file contains the USB Type-C Port Controller device APIs. 11 * All Type-C Port Controller device drivers should implement the 19 * @brief USB Type-C Port Controller API 20 * @defgroup usb_type_c_port_controller_api USB Type-C Port Controller API 59 /** A high-voltage alarm has occurred */ 61 /** A low-voltage alarm has occurred */ 185 * @brief Returns true if we detect the port partner is a snk debug accessory 193 * @brief Returns true if we detect the port partner is a src debug accessory [all …]
|
/Zephyr-latest/dts/bindings/tcpc/ |
D | nuvoton,numaker-tcpc.yaml | 2 # SPDX-License-Identifier: Apache-2.0 4 description: Nuvoton NuMaker USB Type-C port controller 6 compatible: "nuvoton,numaker-tcpc" 8 include: [base.yaml, reset-device.yaml, pinctrl-device.yaml] 23 vconn-overcurrent-event-polarity: 28 - "low-active" 29 - "high-active" 31 vconn-discharge-polarity: 36 - "low-active" 37 - "high-active" [all …]
|
/Zephyr-latest/include/zephyr/usb_c/ |
D | tcpci.h | 3 * SPDX-License-Identifier: Apache-2.0 15 * Registers and fields are compliant to the Type-C Port Controller Interface 19 /** Register address - vendor id */ 22 /** Register address - product id */ 25 /** Register address - version of TCPC */ 28 /** Register address - USB TypeC version */ 30 /** Mask for major part of type-c release supported */ 32 /** Macro to extract the major part of type-c release supported */ 34 /** Mask for minor part of type-c release supported */ 36 /** Macro to extract the minor part of type-c release supported */ [all …]
|
/Zephyr-latest/subsys/usb/usb_c/ |
D | usbc_tc_src_states.c | 4 * SPDX-License-Identifier: Apache-2.0 17 * When in the Unattached.SRC state, the port is waiting to detect the 21 * 1: The port shall not drive VBUS or VCONN. 38 const struct device *dev = tc->dev; in tc_unattached_src_run() 47 if (tcpc_is_cc_at_least_one_rd(tc->cc1, tc->cc2)) { in tc_unattached_src_run() 59 * 1: The port shall not enable VBUS or VCONN. 74 const struct device *dev = tc->dev; in tc_unattached_wait_src_entry() 75 struct usbc_port_data *data = dev->data; in tc_unattached_wait_src_entry() 76 const struct device *tcpc = data->tcpc; in tc_unattached_wait_src_entry() 84 usbc_timer_start(&tc->tc_t_vconn_off); in tc_unattached_wait_src_entry() [all …]
|
D | usbc_tc_common.c | 4 * SPDX-License-Identifier: Apache-2.0 24 struct usbc_port_data *data = dev->data; in tc_subsys_init() 25 struct tc_sm_t *tc = data->tc; in tc_subsys_init() 28 tc->dev = dev; in tc_subsys_init() 35 * @brief Runs the Type-C layer 39 struct usbc_port_data *data = dev->data; in tc_run() 40 const struct device *tcpc = data->tcpc; in tc_run() 41 struct tc_sm_t *tc = data->tc; in tc_run() 46 data->tc_enabled = true; in tc_run() 48 data->tc_enabled = false; in tc_run() [all …]
|
/Zephyr-latest/samples/subsys/usb_c/sink/boards/ |
D | numaker_m2l31ki.overlay | 1 /* SPDX-License-Identifier: Apache-2.0 */ 3 #include <dt-bindings/usb-c/pd.h> 7 usbc-port0 = &port0; 11 #address-cells = <1>; 12 #size-cells = <0>; 14 port0: usbc-port@0 { 15 compatible = "usb-c-connector"; 18 vbus = <&vbus0>; 20 power-role = "sink"; 21 sink-pdos = <PDO_FIXED(5000, 100, 0)>; [all …]
|
/Zephyr-latest/drivers/usb_c/tcpc/ |
D | ucpd_numaker.c | 4 * SPDX-License-Identifier: Apache-2.0 28 /* Implementation notes on NuMaker TCPC/PPC/VBUS 30 * 1. UTCPD, interfacing to external circuit on VBUS/VCONN voltage measurement, 31 * VBUS/VCONN overcurrent protection, VBUS overvoltage protection, etc., 32 * can implement all functions defined in TCPC, PPC, and VBUS. For this, 33 * TCPC is implemented in UTCPD majorly; PPC and VBUS rely on TCPC for 35 * 2. For VBUS/VCONN voltage measurement, UTCPD is updated periodically 36 * by Timer-trigger EADC. To implement this interconnection, TCPC node_id 39 * NOTE: EADC and Timer interrupts needn't enable for Timer-triggered EADC. 45 * 4. VBUS discharge precedence [all …]
|
/Zephyr-latest/boards/weact/stm32g431_core/doc/ |
D | index.rst | 3 The WeAct STM32G431 Core Board is a low-cost bare-bones STM32G431-based development 7 Modifications USB-C Power Delivery 10 The board does not support USB-C PD in its standard configuration. To enable USB-C PD, CC1 11 and CC2 need to be disconnected from their pull-down resistors and be connected to PB6 and 13 CC2. VBUS also needs to be connected to the MCU through a voltage divider. 15 The pull-downs are disconnected by removing the zero-Ohm resistors on SB8 and SB9 next to 16 the USB-C connector. SB3, SB5, SB6, and SB7 then need to be closed to connect the CCx 20 considered reserved for USB-C and not available for other applications. 24 PD signaling unless dead battery support has been enabled. A USB-C to USB-A adapter or 34 +------------+------------+-------------------------------------+ [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 45 /** Controller can detect the state change of USB supply VBUS.*/ 79 /** High-Bandwidth (interrupt or iso) capable endpoint */ 132 /** VBUS ready event. Signals that VBUS is in stable condition. */ 134 /** VBUS removed event. Signals that VBUS is below the valid range. */ 147 * Non-correctable error event, requires attention from higher 257 * Controller is initialized by udc_init() and can generate the VBUS events, 273 * To be implemented as device's private data (device->data). 314 struct udc_data *data = dev->data; in udc_is_initialized() [all …]
|
/Zephyr-latest/drivers/sensor/nordic/npm1300_charger/ |
D | npm1300_charger.c | 3 * SPDX-License-Identifier: Apache-2.0 78 /* nPM1300 VBUS register offsets */ 121 /* VBUS detect masks */ 126 /* VBUS status masks */ 157 float log_result = log((1024.f / (float)code) - 1); in calc_temp() 158 float inv_temp_k = (1.f / 298.15f) - (log_result / (float)config->thermistor_beta); in calc_temp() 160 float temp = (1.f / inv_temp_k) - 273.15f; in calc_temp() 162 valp->val1 = (int32_t)temp; in calc_temp() 163 valp->val2 = (int32_t)(fmodf(temp, 1.f) * 1000000.f); in calc_temp() 171 DIETEMP_OFFSET_MDEGC - (((int32_t)code * DIETEMP_FACTOR_MUL) / DIETEMP_FACTOR_DIV); in calc_dietemp() [all …]
|
/Zephyr-latest/drivers/usb/device/ |
D | usb_dc_rpi_pico.c | 4 * SPDX-License-Identifier: Apache-2.0 36 /* Needed for pico-sdk */ 113 if (*ep_state->buf_ctl & USB_BUF_CTRL_AVAIL) { in udc_rpi_start_xfer() 119 return -ENOMEM; in udc_rpi_start_xfer() 124 memcpy(ep_state->buf, data, len); in udc_rpi_start_xfer() 127 ep_state->read_offset = 0; in udc_rpi_start_xfer() 130 LOG_DBG("xfer ep %d len %d pid: %d", ep, len, ep_state->next_pid); in udc_rpi_start_xfer() 131 val |= ep_state->next_pid ? USB_BUF_CTRL_DATA1_PID : USB_BUF_CTRL_DATA0_PID; in udc_rpi_start_xfer() 133 ep_state->next_pid ^= 1u; in udc_rpi_start_xfer() 134 *ep_state->buf_ctl = val; in udc_rpi_start_xfer() [all …]
|
/Zephyr-latest/doc/connectivity/usb/device_next/ |
D | usb_device.rst | 18 high-speed device controllers are supported. It also provides support for 20 or changing the configuration later. It has built-in support for several USB 29 * :zephyr:code-sample:`usb-hid-keyboard` 31 * :zephyr:code-sample:`uac2-explicit-feedback` 33 * :zephyr:code-sample:`uac2-implicit-feedback` 36 ---------------------------------------- 39 configuration ``-DCONF_FILE=usbd_next_prj.conf`` either directly or via 42 * :zephyr:code-sample:`bluetooth_hci_usb` 44 * :zephyr:code-sample:`usb-cdc-acm` 46 * :zephyr:code-sample:`usb-cdc-acm-console` [all …]
|
/Zephyr-latest/include/zephyr/usb/ |
D | usbd.h | 4 * SPDX-License-Identifier: Apache-2.0 46 * bString_length = (sizeof(initializer_string) - 1) * 2 48 * bString_length = sizeof(initializer_string) * 2 - 2 50 #define USB_BSTRING_LENGTH(s) (sizeof(s) * 2 - 2) 58 * bLength = 2 + sizeof(initializer_string) * 2 - 2 114 * if (setup->wIndex == WEBUSB_REQ_GET_URL) { 115 * uint8_t index = USB_GET_DESCRIPTOR_INDEX(setup->wValue); 118 * return -ENOTSUP; 127 * return -ENOTSUP; 136 /** Vendor request callback for device-to-host direction */ [all …]
|
/Zephyr-latest/drivers/usb/bc12/ |
D | bc12_pi3usb9201.c | 4 * SPDX-License-Identifier: Apache-2.0 29 /* Run-time configuration data */ 57 * The USB Type-C specification limits the maximum amount of current from BC 1.2 88 const struct pi3usb9201_config *cfg = dev->config; in pi3usb9201_interrupt_enable() 91 return i2c_reg_update_byte_dt(&cfg->i2c, PI3USB9201_REG_CTRL_1, in pi3usb9201_interrupt_enable() 98 const struct pi3usb9201_config *cfg = dev->config; in pi3usb9201_bc12_detect_ctrl() 100 return i2c_reg_update_byte_dt(&cfg->i2c, PI3USB9201_REG_CTRL_2, in pi3usb9201_bc12_detect_ctrl() 107 const struct pi3usb9201_config *cfg = dev->config; in pi3usb9201_bc12_usb_switch() 110 return i2c_reg_update_byte_dt(&cfg->i2c, PI3USB9201_REG_CTRL_2, in pi3usb9201_bc12_usb_switch() 117 const struct pi3usb9201_config *cfg = dev->config; in pi3usb9201_set_mode() [all …]
|
/Zephyr-latest/drivers/usb/udc/ |
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)) 123 #define EP0_OUT_STATE(data) (&data->ep_state[0][0]) 124 #define EP0_IN_STATE(data) (&data->ep_state[1][0]) 128 const struct udc_smartbond_config *config = data->dev->config; in usb_smartbond_dma_config() 129 const struct usb_smartbond_dma_config *dma_cfg = &config->dma_cfg; in usb_smartbond_dma_config() 130 struct dma_config *tx = &data->dma_data.tx_cfg; in usb_smartbond_dma_config() [all …]
|
D | udc_rpi_pico.c | 5 * SPDX-License-Identifier: Apache-2.0 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() 118 const struct rpi_pico_config *config = dev->config; in get_buf_ctrl_reg() 119 usb_device_dpram_t *dpram = config->dpram; in get_buf_ctrl_reg() [all …]
|
/Zephyr-latest/doc/releases/ |
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 …]
|