/linux/Documentation/driver-api/usb/ |
H A D | typec.rst | 3 USB Type-C connector class 7 ------------ 9 The typec class is meant for describing the USB Type-C ports in a system to the 14 The platforms are expected to register every USB Type-C port they have with the 15 class. In a normal case the registration will be done by a USB Type-C or PD PHY 18 considers the component registering the USB Type-C ports with the class as "port 26 attributes are described in Documentation/ABI/testing/sysfs-class-typec. 29 -------------------- 30 Every port will be presented as its own device under /sys/class/typec/. The 34 /sys/class/typec/. The parent of the partner device will always be the port it [all …]
|
H A D | typec_bus.rst | 2 API for USB Type-C Alternate Mode drivers 6 ------------ 9 Messages (VDM) as defined in USB Type-C and USB Power Delivery Specifications. 13 USB Type-C bus allows binding a driver to the discovered partner alternate 16 :ref:`USB Type-C Connector Class <typec>` provides a device for every alternate 36 ------ 43 space (See Documentation/ABI/testing/sysfs-class-typec). Port drivers should not 46 ``->vdm`` is the most important callback in the operation callbacks vector. It 55 parameter. The bus driver will then configure the mux behind the connector using 56 that value as the state value for the mux. [all …]
|
/linux/drivers/usb/typec/ |
H A D | Makefile | 1 # SPDX-License-Identifier: GPL-2.0 2 obj-$(CONFIG_TYPEC) += typec.o 3 typec-y := class.o mux.o bus.o pd.o retimer.o 4 typec-$(CONFIG_ACPI) += port-mapper.o 5 obj-$(CONFIG_TYPEC) += altmodes/ 6 obj-$(CONFIG_TYPEC_TCPM) += tcpm/ 7 obj-$(CONFIG_TYPEC_UCSI) += ucsi/ 8 obj-$(CONFIG_TYPEC_TPS6598X) += tipd/ 9 obj-$(CONFIG_TYPEC_ANX7411) += anx7411.o 10 obj-$(CONFIG_TYPEC_HD3SS3220) += hd3ss3220.o [all …]
|
H A D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0 3 menuconfig TYPEC config 4 tristate "USB Type-C Support" 6 USB Type-C Specification defines a cable and connector for USB where 8 be Type-A plug on one end of the cable and Type-B plug on the other. 9 Determination of the host-to-device relationship happens through a 10 specific Configuration Channel (CC) which goes through the USB Type-C 12 Accessory Modes - Analog Audio and Debug - and if USB Power Delivery 22 USB Type-C connector, however it is mostly used together with USB 23 Type-C connectors. [all …]
|
H A D | mux.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * USB Type-C Multiplexer/DeMultiplexer Switch support 18 #include "mux.h" 44 * an additional device property is needed. With typec switches the in typec_switch_match() 45 * property is named "orientation-switch" (@id). The value of the device in typec_switch_match() 52 * At this point we are sure that @fwnode is a typec switch in all in typec_switch_match() 59 return dev ? to_typec_switch_dev(dev) : ERR_PTR(-EPROBE_DEFER); in typec_switch_match() 63 * fwnode_typec_switch_get - Find USB Type-C orientation switch 68 * ERR_PTR(-EPROBE_DEFER) when a connection was found but the switch 81 return ERR_PTR(-ENOMEM); in fwnode_typec_switch_get() [all …]
|
H A D | bus.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Bus for USB Type-C Alternate Modes 13 #include "mux.h" 21 if (!alt->retimer) in typec_altmode_set_retimer() 24 state.alt = &alt->adev; in typec_altmode_set_retimer() 28 return typec_retimer_set(alt->retimer, &state); in typec_altmode_set_retimer() 36 if (!alt->mux) in typec_altmode_set_mux() 39 state.alt = &alt->adev; in typec_altmode_set_mux() 43 return typec_mux_set(alt->mux, &state); in typec_altmode_set_mux() 46 /* Wrapper to set various Type-C port switches together. */ [all …]
|
H A D | class.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * USB Type-C Connector Class 25 .name = "typec", 28 /* ------------------------------------------------------------------------- */ 65 return partner->identity; in get_pd_identity() 69 return cable->identity; in get_pd_identity() 76 struct typec_port *port = to_typec_port(dev->parent); in get_pd_product_type() 84 if (port->data_role == TYPEC_HOST) in get_pd_product_type() 85 ptype = product_type_ufp[PD_IDH_PTYPE(id->id_header)]; in get_pd_product_type() 87 ptype = product_type_dfp[PD_IDH_DFP_PTYPE(id->id_header)]; in get_pd_product_type() [all …]
|
H A D | class.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 7 #include <linux/usb/typec.h> 62 struct typec_mux *mux; member 91 #define is_typec_partner(dev) ((dev)->type == &typec_partner_dev_type) 92 #define is_typec_cable(dev) ((dev)->type == &typec_cable_dev_type) 93 #define is_typec_plug(dev) ((dev)->type == &typec_plug_dev_type) 94 #define is_typec_port(dev) ((dev)->type == &typec_port_dev_type)
|
/linux/drivers/usb/typec/mux/ |
H A D | it5205.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * ITE IT5205 Type-C USB alternate mode passive mux 20 #include <linux/usb/typec.h> 25 #define IT5205FN_CHIP_ID 0x35303235 /* "5025" -> "5205" */ 27 /* MUX power down register */ 31 /* MUX control register */ 66 struct typec_mux_dev *mux; member 75 regmap_update_bits(it->regmap, IT5205_REG_MUXCR, in it5205_switch_set() 79 regmap_update_bits(it->regmap, IT5205_REG_MUXCR, in it5205_switch_set() 85 regmap_write(it->regmap, IT5205_REG_MUXCR, 0); in it5205_switch_set() [all …]
|
H A D | gpio-sbu-mux.c | 1 // SPDX-License-Identifier: GPL-2.0 19 struct typec_mux_dev *mux; member 33 mutex_lock(&sbu_mux->lock); in gpio_sbu_switch_set() 35 enabled = sbu_mux->enabled; in gpio_sbu_switch_set() 36 swapped = sbu_mux->swapped; in gpio_sbu_switch_set() 50 if (enabled != sbu_mux->enabled) in gpio_sbu_switch_set() 51 gpiod_set_value_cansleep(sbu_mux->enable_gpio, enabled); in gpio_sbu_switch_set() 53 if (swapped != sbu_mux->swapped) in gpio_sbu_switch_set() 54 gpiod_set_value_cansleep(sbu_mux->select_gpio, swapped); in gpio_sbu_switch_set() 56 sbu_mux->enabled = enabled; in gpio_sbu_switch_set() [all …]
|
H A D | pi3usb30532.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * Pericom PI3USB30532 Type-C cross switch / mux driver 5 * Copyright (c) 2017-2018 Hans de Goede <hdegoede@redhat.com> 27 struct typec_mux_dev *mux; member 35 if (pi->conf == new_conf) in pi3usb30532_set_conf() 38 ret = i2c_smbus_write_byte_data(pi->client, PI3USB30532_CONF, new_conf); in pi3usb30532_set_conf() 40 dev_err(&pi->client->dev, "Error writing conf: %d\n", ret); in pi3usb30532_set_conf() 44 pi->conf = new_conf; in pi3usb30532_set_conf() 55 mutex_lock(&pi->lock); in pi3usb30532_sw_set() 56 new_conf = pi->conf; in pi3usb30532_sw_set() [all …]
|
H A D | fsa4480.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (C) 2021-2022 Linaro Ltd. 4 * Copyright (C) 2018-2020 The Linux Foundation 58 struct typec_mux_dev *mux; member 74 /* Accesses only done under fsa4480->lock */ 80 bool reverse = (fsa->orientation == TYPEC_ORIENTATION_REVERSE); in fsa4480_set() 84 if (fsa->swap_sbu_lanes) in fsa4480_set() 88 if (fsa->mode < TYPEC_STATE_MODAL || in fsa4480_set() 89 (!fsa->svid && (fsa->mode == TYPEC_MODE_USB2 || in fsa4480_set() 90 fsa->mode == TYPEC_MODE_USB3))) { in fsa4480_set() [all …]
|
H A D | wcd939x-usbss.c | 1 // SPDX-License-Identifier: GPL-2.0-only 72 #define WCD_USBSS_SWITCH_SELECT0_DP_AUXP_SWITCHES BIT(7) /* 1-> MG2 */ 73 #define WCD_USBSS_SWITCH_SELECT0_DP_AUXM_SWITCHES BIT(6) /* 1-> MG2 */ 76 #define WCD_USBSS_SWITCH_SELECT0_SENSE_SWITCHES BIT(1) /* 1-> SBU2 */ 77 #define WCD_USBSS_SWITCH_SELECT0_MIC_SWITCHES BIT(0) /* 1-> MG2 */ 89 #define WCD_USBSS_SWITCH_SELECT1_AGND_SWITCHES BIT(0) /* 1-> MG2 */ 190 struct typec_mux_dev *mux; member 242 bool reverse = (usbss->orientation == TYPEC_ORIENTATION_REVERSE); in wcd939x_usbss_set() 249 if (usbss->mode < TYPEC_STATE_MODAL || in wcd939x_usbss_set() 250 (!usbss->svid && (usbss->mode == TYPEC_MODE_USB2 || in wcd939x_usbss_set() [all …]
|
/linux/Documentation/devicetree/bindings/connector/ |
H A D | usb-connector.yaml | 1 # SPDX-License-Identifier: GPL-2.0-only 3 --- 4 $id: http://devicetree.org/schemas/connector/usb-connector.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Rob Herring <robh@kernel.org> 15 MUX and USB interface controller. 20 - enum: 21 - usb-a-connector 22 - usb-b-connector 23 - usb-c-connector [all …]
|
/linux/Documentation/devicetree/bindings/usb/ |
H A D | ite,it5205.yaml | 1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: ITE IT5202 Type-C USB Alternate Mode Passive MUX 10 - AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> 11 - Tianping Fang <tianping.fang@mediatek.com> 20 vcc-supply: 23 mode-switch: 27 orientation-switch: 31 ite,ovp-enable: [all …]
|
H A D | qcom,wcd939x-usbss.yaml | 1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 3 --- 4 $id: http://devicetree.org/schemas/usb/qcom,wcd939x-usbss.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Neil Armstrong <neil.armstrong@linaro.org> 13 Qualcomm WCD9390/WCD9395 is a standalone Hi-Fi audio codec IC with a 17 USB-C Mux subsystems are external to the IC, thus requiring DT port-endpoint 18 graph description to handle USB-C altmode & orientation switching for Audio 24 - const: qcom,wcd9390-usbss 25 - items: [all …]
|
H A D | gpio-sbu-mux.yaml | 1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 3 --- 4 $id: http://devicetree.org/schemas/usb/gpio-sbu-mux.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: GPIO-based SBU mux 10 - Bjorn Andersson <andersson@kernel.org> 13 In USB Type-C applications the SBU lines needs to be connected, disconnected 21 - enum: 22 - nxp,cbdtu02043 23 - onnn,fsusb43l10x [all …]
|
H A D | fcs,fsa4480.yaml | 1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Bjorn Andersson <bjorn.andersson@linaro.org> 15 - const: fcs,fsa4480 16 - items: 17 - enum: 18 - ocs,ocp96011 19 - const: fcs,fsa4480 27 vcc-supply: [all …]
|
H A D | ti,hd3ss3220.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: TI HD3SS3220 TypeC DRP Port Controller 10 - Biju Das <biju.das.jz@bp.renesas.com> 12 description: |- 13 HD3SS3220 is a USB SuperSpeed (SS) 2:1 mux with DRP port controller. The device provides Channel 14 Configuration (CC) logic and 5V VCONN sourcing for ecosystems implementing USB Type-C. The 36 description: Super Speed (SS) MUX inputs connected to SS capable connector. 40 description: Output of 2:1 MUX connected to Super Speed (SS) data bus. [all …]
|
H A D | nxp,ptn36502.yaml | 1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: NXP PTN36502 Type-C USB 3.1 Gen 1 and DisplayPort v1.2 combo redriver 10 - Luca Weiss <luca.weiss@fairphone.com> 15 - nxp,ptn36502 20 vdd18-supply: 23 orientation-switch: true 24 retimer-switch: true 31 description: Super Speed (SS) Output endpoint to the Type-C connector [all …]
|
/linux/include/linux/usb/ |
H A D | typec_mux.h | 1 // SPDX-License-Identifier: GPL-2.0 7 #include <linux/usb/typec.h> 51 typedef int (*typec_mux_set_fn_t)(struct typec_mux_dev *mux, 64 void typec_mux_put(struct typec_mux *mux); 65 int typec_mux_set(struct typec_mux *mux, struct typec_mux_state *state); 69 void typec_mux_unregister(struct typec_mux_dev *mux); 71 void typec_mux_set_drvdata(struct typec_mux_dev *mux, void *data); 72 void *typec_mux_get_drvdata(struct typec_mux_dev *mux); 81 static inline void typec_mux_put(struct typec_mux *mux) {} in typec_mux_put() argument 83 static inline int typec_mux_set(struct typec_mux *mux, struct typec_mux_state *state) in typec_mux_set() argument [all …]
|
/linux/Documentation/firmware-guide/acpi/ |
H A D | intel-pmc-mux.rst | 1 .. SPDX-License-Identifier: GPL-2.0 4 Intel North Mux-Agent 10 North Mux-Agent is a function of the Intel PMC firmware that is supported on 13 platforms that allow the mux-agent to be configured from the operating system 16 The North Mux-Agent (aka. Intel PMC Mux Control, or just mux-agent) driver 18 (drivers/platform/x86/intel_scu_ipc.c). The driver registers with the USB Type-C 19 Mux Class which allows the USB Type-C Controller and Interface drivers to 22 Device modes. The driver is located here: drivers/usb/typec/mux/intel_pmc_mux.c. 28 ------- 30 For every USB Type-C connector under the mux-agent control on the system, there [all …]
|
/linux/Documentation/devicetree/bindings/phy/ |
H A D | ti,phy-j721e-wiz.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 # Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com/ 4 --- 5 $id: http://devicetree.org/schemas/phy/ti,phy-j721e-wiz.yaml# 6 $schema: http://devicetree.org/meta-schemas/core.yaml# 11 - Kishon Vijay Abraham I <kishon@ti.com> 16 - ti,j721e-wiz-16g 17 - ti,j721e-wiz-10g 18 - ti,j721s2-wiz-10g 19 - ti,am64-wiz-10g [all …]
|
/linux/drivers/platform/chrome/ |
H A D | cros_ec_typec.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 11 #include <linux/usb/typec.h> 30 /* Platform-specific data for the Chrome OS EC Type C controller. */ 59 struct typec_mux *mux; member 77 /* PDO-related structs */
|
/linux/arch/arm64/boot/dts/qcom/ |
H A D | qcs8550-aim300-aiot.dts | 1 // SPDX-License-Identifier: BSD-3-Clause 3 * Copyright (c) 2023-2024, Qualcomm Innovation Center, Inc. All rights reserved. 6 /dts-v1/; 8 #include <dt-bindings/leds/common.h> 9 #include "qcs8550-aim300.dtsi" 16 compatible = "qcom,qcs8550-aim300-aiot", "qcom,qcs8550-aim300", "qcom,qcs8550", 24 stdout-path = "serial0:115200n8"; 27 gpio-keys { 28 compatible = "gpio-keys"; 30 pinctrl-0 = <&volume_up_n>; [all …]
|