Home
last modified time | relevance | path

Searched +full:vbus +full:- +full:discharge (Results 1 – 19 of 19) sorted by relevance

/Zephyr-latest/dts/bindings/tcpc/
Dnuvoton,numaker-tcpc.yaml2 # 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:
34 Polarity of VCONN discharge
36 - "low-active"
[all …]
/Zephyr-latest/include/zephyr/drivers/usb_c/
Dusbc_vbus.h3 * SPDX-License-Identifier: Apache-2.0
8 * @brief USB-C VBUS device APIs
10 * This file contains the USB-C VBUS device APIs.
11 * All USB-C VBUS measurement and control device drivers should
19 * @brief USB-C VBUS API
20 * @defgroup usbc_vbus_api USB-C VBUS API
38 int (*discharge)(const struct device *dev, bool enable); member
43 * @brief Checks if VBUS is at a particular level
48 * @retval true if VBUS is at the level voltage
49 * @retval false if VBUS is not at that level voltage
[all …]
Dusbc_tcpc.h3 * 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 */
231 * @retval -EIO on failure
232 * @retval -EAGAIN if initialization should be postponed
[all …]
/Zephyr-latest/dts/bindings/usb-c/
Dzephyr,usb-c-vbus-adc.yaml2 # SPDX-License-Identifier: Apache-2.0
5 This device is used to measure VBUS on a Type-C Port and to
6 discharge VBUS when needed.
8 compatible: "zephyr,usb-c-vbus-adc"
10 include: [base.yaml, voltage-divider.yaml]
13 discharge-gpios:
14 type: phandle-array
Dzephyr,usb-c-vbus-tcpci.yaml2 # SPDX-License-Identifier: Apache-2.0
5 This device is used to measure VBUS on a Type-C Port and to
6 discharge VBUS when needed.
10 compatible: "zephyr,usb-c-vbus-tcpci"
/Zephyr-latest/samples/subsys/usb_c/sink/boards/
Dstm32g081b_eval.overlay4 * SPDX-License-Identifier: Apache-2.0
8 #include <dt-bindings/usb-c/pd.h>
12 usbc-port0 = &port1;
15 vbus1: vbus {
16 compatible = "zephyr,usb-c-vbus-adc";
17 io-channels = <&adc1 9>;
18 output-ohms = <49900>;
19 full-ohms = <(330000 + 49900)>;
21 /* Pin B13 is used to control VBUS Discharge for Port1 */
22 discharge-gpios = <&gpiob 13 GPIO_ACTIVE_HIGH>;
[all …]
Dnumaker_m2l31ki.overlay1 /* 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/samples/subsys/usb_c/source/boards/
Dstm32g081b_eval.overlay4 * SPDX-License-Identifier: Apache-2.0
8 #include <dt-bindings/usb-c/pd.h>
12 usbc-port0 = &port1;
16 compatible = "pwm-leds";
24 compatible = "gpio-leds";
26 /* Pin D3 is used to enable VBUS Source */
51 /* usbc.rst vbus-voltage-divider-adc start */
52 vbus1: vbus {
53 compatible = "zephyr,usb-c-vbus-adc";
54 io-channels = <&adc1 9>;
[all …]
/Zephyr-latest/include/zephyr/usb_c/
Dtcpci.h3 * 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 …]
Dusbc.h3 * SPDX-License-Identifier: Apache-2.0
8 * @brief USB-C Device APIs
10 * This file contains the USB-C Device APIs.
26 * @brief USB-C Device APIs
27 * @defgroup _usbc_device_api USB-C Device API
56 /** Request Type-C layer to transition to Disabled State */
58 /** Request Type-C layer to transition to Error Recovery State */
60 /** End of Type-C requests */
180 * @param dev USB-C Connector Instance
190 * @param dev USB-C Connector Instance
[all …]
/Zephyr-latest/drivers/usb_c/vbus/
Dusbc_vbus_adc.c4 * SPDX-License-Identifier: Apache-2.0
24 * @brief Reads and returns VBUS measured in mV
27 * @retval -EIO on failure
31 const struct usbc_vbus_config *const config = dev->config; in adc_vbus_measure()
32 struct usbc_vbus_data *data = dev->data; in adc_vbus_measure()
36 __ASSERT(meas != NULL, "ADC VBUS meas must not be NULL"); in adc_vbus_measure()
38 ret = adc_read(config->adc_channel.dev, &data->sequence); in adc_vbus_measure()
44 value = data->sample; in adc_vbus_measure()
45 ret = adc_raw_to_millivolts_dt(&config->adc_channel, &value); in adc_vbus_measure()
51 if (config->full_ohm > 0) { in adc_vbus_measure()
[all …]
Dusbc_vbus_numaker.c4 * SPDX-License-Identifier: Apache-2.0
24 /* Implementation notes on NuMaker TCPC/PPC/VBUS
26 * PPC and VBUS rely on TCPC/UTCPD and are just pseudo. They are completely
38 * @brief Initializes the usb-c vbus driver
41 * @retval -ENODEV if dependent TCPC device is not ready
45 const struct numaker_vbus_config *const config = dev->config; in numaker_vbus_init()
46 const struct device *tcpc_dev = config->tcpc_dev; in numaker_vbus_init()
51 return -ENODEV; in numaker_vbus_init()
58 * @brief Checks if VBUS is at a particular level
60 * @retval true if VBUS is at the level voltage
[all …]
Dusbc_vbus_tcpci.c3 * SPDX-License-Identifier: Apache-2.0
27 const struct vbus_tcpci_cfg *cfg = dev->config; in tcpci_measure()
31 __ASSERT(vbus_meas != NULL, "TCPCI VBUS meas must not be NULL"); in tcpci_measure()
33 ret = tcpci_read_reg16(&cfg->i2c, TCPC_REG_VBUS_VOLTAGE, &measure); in tcpci_measure()
67 const struct vbus_tcpci_cfg *cfg = dev->config; in tcpci_discharge()
69 return tcpci_update_reg8(&cfg->i2c, TCPC_REG_POWER_CTRL, in tcpci_discharge()
76 const struct vbus_tcpci_cfg *cfg = dev->config; in tcpci_enable()
78 return tcpci_update_reg8(&cfg->i2c, TCPC_REG_POWER_CTRL, in tcpci_enable()
86 .discharge = tcpci_discharge,
96 "No compatible USB-C VBUS Measurement instance found");
/Zephyr-latest/drivers/usb_c/tcpc/
Ducpd_numaker.c4 * 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.
44 * (3) Single pin for VCONN discharge (DISCHG)
[all …]
/Zephyr-latest/dts/bindings/sensor/
Dnordic,npm1300-charger.yaml4 # SPDX-License-Identifier: Apache-2.0
9 compatible: "nordic,npm1300-charger"
11 include: [sensor-device.yaml]
14 term-microvolt:
21 term-warm-microvolt:
26 If omitted, the term-microvolt value will be used.
28 current-microamp:
36 dischg-limit-microamp:
40 - 200000
41 - 1000000
[all …]
/Zephyr-latest/drivers/usb_c/ppc/
Dnxp_nx20p3483_priv.h3 * SPDX-License-Identifier: Apache-2.0
14 #include<zephyr/dt-bindings/usb-c/nxp_nx20p3483.h>
16 /** Register address - device id */
23 /** Register address - device status */
30 /** Value for high-voltage sink mode */
34 /** Value for high-voltage source mode */
39 /** Register address - switch control */
44 /** Register address - switch status */
53 /** Register address - interrupt1 */
68 /** Register address - interrupt2*/
[all …]
/Zephyr-latest/subsys/usb/usb_c/
Dusbc_tc_src_states.c4 * SPDX-License-Identifier: Apache-2.0
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()
90 const struct device *dev = tc->dev; in tc_unattached_wait_src_run()
[all …]
/Zephyr-latest/drivers/sensor/nordic/npm1300_charger/
Dnpm1300_charger.c3 * SPDX-License-Identifier: Apache-2.0
78 /* nPM1300 VBUS register offsets */
121 /* VBUS detect masks */
126 /* VBUS status masks */
146 /* Allowed values for discharge limit */
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()
[all …]
/Zephyr-latest/boards/st/stm32g081b_eval/doc/
Dindex.rst5 The STM32G081B-EVAL Evaluation board is a high-end development platform, for
6 Arm Cortex-M0+ core-based STM32G081RBT6 microcontroller, with USB Type-C and
7 power delivery controller interfaces (UCPD), compliant with USB type-C r1.2
9 one 12-bit ADC, two 12-bit DACs, two GP comparators, two LP timers, internal
11 hardware features on the STM32G081B-EVAL Evaluation board includes a mother
12 board, a legacy peripheral daughterboard and a USB-C and Power Delivery
13 daughterboard, which help to evaluate all peripherals (USB Type-C connector
19 The board integrates an ST-LINK/V2-1 as an embedded in-circuit debugger and
24 The USB-C and Power Delivery daughterboard
25 features two independent USB-C ports controlled by an STM32G0. USB-C port 1
[all …]