Re: State of USB-C PD on the linux kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Mon, Oct 30, 2017 at 05:48:43PM +0100, L. Rose wrote:
> Hello everyone,
> 
> I see this is primarily a development mailing list, but I didn't find a
> corresponding users mailing list. If there's a better place to ask this
> question, just let me know.
> 
> What is the state of USB-C Power Delivery on the Linux kernel? Does it
> even need software support, or is it just a hardware-related feature? I
> have recently bought a mainboard with a USB-C connector that is capable
> for Power Delivery up to 100 Watts. The system is running 4.13.9-1-ARCH.
> May I expect this feature to work, or is this still work in progress?

It is likely that your system handles USB PD in firmware, and the OS
has no say in that. Which board is it?

The interface we have in kernel for exposing the USB Type-C ports to
the user-space is called "USB Type-C connector class". The
documentation for it (in kernel):
Documentation/ABI/testing/sysfs-class-typec

You should be able to see the USB Type-C ports under
"/sys/class/typec" if your board supplies some kind of an interface
for the OS to them.

        % ls /sys/class/typec

The latest boards do provide an interface to the USB Type-C ports via
the BIOS. So the USB Type-C ports function completely autonomously
from OS PoW, and do not require any OS control, but the interface
allows the user to read the status of the ports, and also execute role
swapping and some other basic operations. The firmware interface is
most likely UCSI [1], and it should be supported in your kernel
(assuming the driver is enabled).

To check if your system supports UCSI:

        % cat /sys/bus/acpi/devices/USBC000\:00/status
        15

If you don't have the device (/sys/bus/acpi/devices/USBC000\:00), or
if the status reads 0 instead of 15, UCSI is not supported in your
system.


[1] https://www.intel.com/content/www/us/en/io/universal-serial-bus/usb-type-c-ucsi-spec.html


Br,

-- 
heikki
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux