Home
last modified time | relevance | path

Searched +full:sink +full:- +full:pdos (Results 1 – 15 of 15) sorted by relevance

/Zephyr-latest/dts/bindings/usb-c/
Dusb-c-connector.yaml2 # SPDX-License-Identifier: Apache-2.0
5 A USB Type-C connector node represents a physical USB Type-C connector.
6 It should be a child of a USB-C interface controller or a separate node
7 when it is attached to both MUX and USB-C interface controller.
10 …/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/connector/usb-connector.yaml?h=v5.1…
14 USB-C connector attached to a STM32 UCPD typec port controller, which has
15 power delivery support and enables SINK.
18 compatible = "zephyr,usb-c-vbus-adc";
19 io-channels = <&adc2 8>;
20 output-ohms = <49900>;
[all …]
/Zephyr-latest/include/zephyr/usb_c/
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
36 * options are sufficient for the Sink to operate.
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 */
75 * Request Policy Engine to get Sink Capabilities from
[all …]
/Zephyr-latest/scripts/generate_usb_vif/constants/
Ddt_constants.py4 # SPDX-License-Identifier: Apache-2.0
8 SINK_PDOS = "sink-pdos"
9 PD_DISABLE = "pd-disable"
10 POWER_ROLE = "power-role"
/Zephyr-latest/subsys/usb/usb_c/
Dusbc_stack.h4 * SPDX-License-Identifier: Apache-2.0
17 #define PRIV_PORT_REQUEST_SUSPEND -1
18 #define PRIV_PORT_REQUEST_START -2
65 /* Type-C layer data */
67 /** Type-C state machine object */
69 /** Enables or Disables the Type-C state machine */
71 /** The state of the Type-C state machine */
100 /** The Type-C Port Controller on this port */
112 /** Bypass next sleep and request one more iteration of the USB-C state machines */
115 /* USB-C Callbacks */
[all …]
Dusbc_pe_common_internal.h4 * SPDX-License-Identifier: Apache-2.0
18 * @brief Used in sub-machines for message transmit and receive operation
21 /* Wait for a message transmission sub-machine state */
23 /* Wait for a message reception sub-machine state */
28 * @brief Used in sub-machines for message source hard reset operation
31 /* Start the hard-reset sub-machine state */
33 /* Wait for hard-reset to complete sub-machine state */
145 * Waiting for Sink Capabailities timed out. Used for retry error
151 * If this flag is not set the AMS is non-interruptible. This flag must
165 * Sink REQUEST
[all …]
Dusbc_pe_snk_states.c4 * SPDX-License-Identifier: Apache-2.0
23 struct usbc_port_data *data = dev->data; in pe_snk_init()
24 struct policy_engine *pe = data->pe; in pe_snk_init()
26 /* Initial role of sink is UFP */ in pe_snk_init()
30 usbc_timer_init(&pe->pd_t_typec_sink_wait_cap, PD_T_TYPEC_SINK_WAIT_CAP_MAX_MS); in pe_snk_init()
31 usbc_timer_init(&pe->pd_t_ps_transition, PD_T_SPR_PS_TRANSITION_NOM_MS); in pe_snk_init()
32 usbc_timer_init(&pe->pd_t_wait_to_resend, PD_T_SINK_REQUEST_MIN_MS); in pe_snk_init()
39 * @brief Handle sink-specific DPM requests
43 struct usbc_port_data *data = dev->data; in sink_dpm_requests()
44 struct policy_engine *pe = data->pe; in sink_dpm_requests()
[all …]
Dusbc_pe_common.c4 * SPDX-License-Identifier: Apache-2.0
23 * @brief Set the ready state for sink or source.
27 struct usbc_port_data *data = dev->data; in pe_set_ready_state()
29 if (data->pe->power_role == TC_ROLE_SOURCE) { in pe_set_ready_state()
43 struct usbc_port_data *data = dev->data; in common_dpm_requests()
44 struct policy_engine *pe = data->pe; in common_dpm_requests()
46 if (pe->dpm_request > REQUEST_TC_END) { in common_dpm_requests()
47 atomic_set_bit(pe->flags, PE_FLAGS_DPM_INITIATED_AMS); in common_dpm_requests()
49 if (pe->dpm_request == REQUEST_PE_DR_SWAP) { in common_dpm_requests()
52 } else if (pe->dpm_request == REQUEST_PE_SOFT_RESET_SEND) { in common_dpm_requests()
[all …]
Dusbc_pe_src_states.c4 * SPDX-License-Identifier: Apache-2.0
9 * @brief USB-C Power Policy Engine (PE)
31 struct usbc_port_data *data = dev->data; in pe_src_init()
32 struct policy_engine *pe = data->pe; in pe_src_init()
37 /* Reject Sink Request by default */ in pe_src_init()
38 pe->snk_request_reply = SNK_REQUEST_REJECT; in pe_src_init()
41 usbc_timer_init(&pe->pd_t_typec_send_source_cap, PD_T_TYPEC_SEND_SOURCE_CAP_MIN_MS); in pe_src_init()
42 usbc_timer_init(&pe->pd_t_ps_hard_reset, PD_T_PS_HARD_RESET_MAX_MS); in pe_src_init()
49 * @brief Handle source-specific DPM requests
53 struct usbc_port_data *data = dev->data; in source_dpm_requests()
[all …]
/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;
16 compatible = "zephyr,usb-c-vbus-adc";
17 io-channels = <&adc1 9>;
18 output-ohms = <49900>;
19 full-ohms = <(330000 + 49900)>;
22 discharge-gpios = <&gpiob 13 GPIO_ACTIVE_HIGH>;
26 #address-cells = <1>;
27 #size-cells = <0>;
[all …]
Db_g474e_dpow1.overlay4 * SPDX-License-Identifier: Apache-2.0
8 #include <dt-bindings/usb-c/pd.h>
12 usbc-port0 = &port1;
15 /* usbc.rst vbus-voltage-divider-adc start */
17 compatible = "zephyr,usb-c-vbus-adc";
18 io-channels = <&adc2 8>;
19 output-ohms = <49900>;
20 full-ohms = <(330000 + 49900)>;
22 /* usbc.rst vbus-voltage-divider-adc end */
25 #address-cells = <1>;
[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";
20 power-role = "sink";
21 sink-pdos = <PDO_FIXED(5000, 100, 0)>;
30 digital-path-disable;
[all …]
/Zephyr-latest/samples/subsys/usb_c/sink/
DREADME.rst1 .. zephyr:code-sample:: usb-c-sink
2 :name: Basic USB-C Sink
3 :relevant-api: _usbc_device_api
5 Implement a USB-C Power Delivery application in the form of a USB-C Sink.
10 This example demonstrates how to create a USB-C Power Delivery application and
11 how to generate USB VIF policies in XML format using the USB-C subsystem. The
12 application implements a USB-C Sink device.
14 After the USB-C Sink device is plugged into a Power Delivery charger, it
16 Power Delivery Objects (PDOs) provided by the charger.
18 .. _usb-c-sink-sample-requirements:
[all …]
/Zephyr-latest/samples/subsys/usb_c/sink/src/
Dmain.c4 * SPDX-License-Identifier: Apache-2.0
19 #error "Unsupported board: Only Sink device supported"
29 /** Sink Capabilities */
31 /** Number of Sink Capabilities */
51 * - Maximum operating current 100mA
52 * - Operating current is 100mA
53 * - Unchunked Extended Messages Not Supported
54 * - No USB Suspend
55 * - Not USB Communications Capable
56 * - No capability mismatch
[all …]
/Zephyr-latest/samples/subsys/usb_c/source/src/
Dmain.c4 * SPDX-License-Identifier: Apache-2.0
38 /** Sink Request RDO */
48 /** Log Sink Requested RDO to console */
91 *rp = dpm_data->rp; in port0_policy_cb_get_src_rp()
114 dpm_data->vconn_pol = pol; in port0_policy_cb_vconn_en()
132 * to the Sink
135 const uint32_t **pdos, uint32_t *num_pdos) in port0_policy_cb_get_src_caps() argument
139 *pdos = dpm_data->src_caps; in port0_policy_cb_get_src_caps()
140 *num_pdos = dpm_data->src_cap_cnt; in port0_policy_cb_get_src_caps()
146 * @brief PE calls this function to verify that a Sink's request if valid
[all …]
/Zephyr-latest/boards/weact/stm32g431_core/
Dweact_stm32g431_core.dts4 * SPDX-License-Identifier: Apache-2.0
7 /dts-v1/;
9 #include <st/g4/stm32g431c(6-8-b)ux-pinctrl.dtsi>
10 #include <zephyr/dt-bindings/usb-c/pd.h>
11 #include <zephyr/dt-bindings/input/input-event-codes.h>
15 compatible = "weact,stm32g431-core";
19 zephyr,shell-uart = &usart2;
26 mcuboot-button0 = &button_0;
27 mcuboot-led0 = &led_0;
30 usbc-port0 = &usbc1;
[all …]