Home
last modified time | relevance | path

Searched +full:typec +full:- +full:mux (Results 1 – 25 of 65) sorted by relevance

123

/kernel/linux/linux-5.10/drivers/platform/chrome/
Dcros_ec_typec.c1 // SPDX-License-Identifier: GPL-2.0-only
17 #include <linux/usb/typec.h>
24 #define DRV_NAME "cros-ec-typec"
42 struct typec_mux *mux; member
53 /* Platform-specific data for the Chrome OS EC Type C controller. */
73 ret = fwnode_property_read_string(fwnode, "power-role", &buf); in cros_typec_parse_port_props()
75 dev_err(dev, "power-role not found: %d\n", ret); in cros_typec_parse_port_props()
82 cap->type = ret; in cros_typec_parse_port_props()
84 ret = fwnode_property_read_string(fwnode, "data-role", &buf); in cros_typec_parse_port_props()
86 dev_err(dev, "data-role not found: %d\n", ret); in cros_typec_parse_port_props()
[all …]
/kernel/linux/linux-6.6/drivers/platform/chrome/
Dcros_ec_typec.c1 // SPDX-License-Identifier: GPL-2.0-only
22 #define DRV_NAME "cros-ec-typec"
35 ret = fwnode_property_read_string(fwnode, "power-role", &buf); in cros_typec_parse_port_props()
37 dev_err(dev, "power-role not found: %d\n", ret); in cros_typec_parse_port_props()
44 cap->type = ret; in cros_typec_parse_port_props()
46 ret = fwnode_property_read_string(fwnode, "data-role", &buf); in cros_typec_parse_port_props()
48 dev_err(dev, "data-role not found: %d\n", ret); in cros_typec_parse_port_props()
55 cap->data = ret; in cros_typec_parse_port_props()
57 /* Try-power-role is optional. */ in cros_typec_parse_port_props()
58 ret = fwnode_property_read_string(fwnode, "try-power-role", &buf); in cros_typec_parse_port_props()
[all …]
/kernel/linux/linux-5.10/Documentation/driver-api/usb/
Dtypec.rst3 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 …]
Dtypec_bus.rst2 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 …]
/kernel/linux/linux-6.6/Documentation/driver-api/usb/
Dtypec.rst3 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 …]
Dtypec_bus.rst2 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 …]
/kernel/linux/linux-5.10/drivers/usb/typec/
DMakefile1 # SPDX-License-Identifier: GPL-2.0
2 obj-$(CONFIG_TYPEC) += typec.o
3 typec-y := class.o mux.o bus.o
4 obj-$(CONFIG_TYPEC) += altmodes/
5 obj-$(CONFIG_TYPEC_TCPM) += tcpm/
6 obj-$(CONFIG_TYPEC_UCSI) += ucsi/
7 obj-$(CONFIG_TYPEC_HD3SS3220) += hd3ss3220.o
8 obj-$(CONFIG_TYPEC_TPS6598X) += tps6598x.o
9 obj-$(CONFIG_TYPEC_QCOM_PMIC) += qcom-pmic-typec.o
10 obj-$(CONFIG_TYPEC_STUSB160X) += stusb160x.o
[all …]
DKconfig1 # 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 …]
/kernel/linux/linux-6.6/drivers/usb/typec/
DMakefile1 # 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 …]
DKconfig1 # 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 …]
Danx7411.c1 // SPDX-License-Identifier: GPL-2.0-only
4 * Driver for Analogix ANX7411 USB Type-C and PD controller
25 #include <linux/usb/typec.h>
222 /* copy from drivers/usb/typec/tcpm */
280 struct typec_params typec; member
340 ret = anx7411_reg_read(ctx->spi_client, REQUEST_CURRENT); in anx7411_detect_power_mode()
344 ctx->typec.request_current = ret * CURRENT_UNIT; /* 50ma per unit */ in anx7411_detect_power_mode()
346 ret = anx7411_reg_read(ctx->spi_client, REQUEST_VOLTAGE); in anx7411_detect_power_mode()
350 ctx->typec.request_voltage = ret * VOLTAGE_UNIT; /* 100mv per unit */ in anx7411_detect_power_mode()
352 if (ctx->psy_online == ANX7411_PSY_OFFLINE) { in anx7411_detect_power_mode()
[all …]
Dmux.c1 // 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 …]
/kernel/linux/linux-6.6/drivers/usb/typec/mux/
Dgpio-sbu-mux.c1 // 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(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(sbu_mux->select_gpio, swapped); in gpio_sbu_switch_set()
56 sbu_mux->enabled = enabled; in gpio_sbu_switch_set()
[all …]
Dpi3usb30532.c1 // 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 …]
Dfsa4480.c1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (C) 2021-2022 Linaro Ltd.
4 * Copyright (C) 2018-2020 The Linux Foundation
54 struct typec_mux_dev *mux; member
69 /* Accesses only done under fsa4480->lock */
75 bool reverse = (fsa->orientation == TYPEC_ORIENTATION_REVERSE); in fsa4480_set()
80 if (fsa->mode < TYPEC_STATE_MODAL || in fsa4480_set()
81 (!fsa->svid && (fsa->mode == TYPEC_MODE_USB2 || in fsa4480_set()
82 fsa->mode == TYPEC_MODE_USB3))) { in fsa4480_set()
85 } else if (fsa->svid) { in fsa4480_set()
[all …]
/kernel/linux/linux-6.6/Documentation/devicetree/bindings/connector/
Dusb-connector.yaml1 # 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 …]
/kernel/linux/linux-5.10/drivers/usb/typec/mux/
Dpi3usb30532.c1 // 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 *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 …]
/kernel/linux/linux-5.10/Documentation/devicetree/bindings/connector/
Dusb-connector.yaml1 # 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 …]
/kernel/linux/linux-6.6/Documentation/devicetree/bindings/usb/
Dfcs,fsa4480.yaml1 # 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 - fcs,fsa4480
23 vcc-supply:
24 description: power supply (2.7V-5.5V)
26 mode-switch:
30 orientation-switch:
37 A port node to link the FSA4480 to a TypeC controller for the purpose of
[all …]
Dgpio-sbu-mux.yaml1 # 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 - onnn,fsusb43l10x
23 - pericom,pi3usb102
[all …]
Dti,hd3ss3220.yaml1 # 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 …]
/kernel/linux/linux-5.10/drivers/phy/ti/
Dphy-j721e-wiz.c1 // SPDX-License-Identifier: GPL-2.0
5 * Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com/
9 #include <dt-bindings/phy/phy.h>
11 #include <linux/clk-provider.h>
16 #include <linux/mux/consumer.h>
22 #include <linux/reset-controller.h>
140 * Mux value to be configured for each of the input clocks
144 .node_name = "pll0-refclk",
148 .node_name = "pll1-refclk",
152 .node_name = "refclk-dig",
[all …]
/kernel/linux/linux-5.10/include/linux/usb/
Dtypec_mux.h1 // SPDX-License-Identifier: GPL-2.0
7 #include <linux/usb/typec.h>
49 typedef int (*typec_mux_set_fn_t)(struct typec_mux *mux,
61 void typec_mux_put(struct typec_mux *mux);
62 int typec_mux_set(struct typec_mux *mux, struct typec_mux_state *state);
72 void typec_mux_unregister(struct typec_mux *mux);
74 void typec_mux_set_drvdata(struct typec_mux *mux, void *data);
75 void *typec_mux_get_drvdata(struct typec_mux *mux);
/kernel/linux/linux-6.6/include/linux/usb/
Dtypec_mux.h1 // 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 …]
/kernel/linux/linux-5.10/Documentation/devicetree/bindings/usb/
Dti,hd3ss3220.yaml1 # 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
35 description: Super Speed (SS) MUX inputs connected to SS capable connector.
36 $ref: /connector/usb-connector.yaml#/properties/ports/properties/port@1
[all …]

123