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

2017-11-02 Thread Heikki Krogerus
On Wed, Nov 01, 2017 at 11:38:13PM +0100, L. Rose wrote:
> Hi, thanks for replying!
> 
> > Could you send acpidump to me?
> Sorry, but can you point me a URL where to get acpidump? I'm running
> arch, but any x86_64-binary or source code should be fine. Couldn't find
> it anywhere on the net.

It is part of acpica:
https://acpica.org/ (git clone git://github.com/acpica/acpica.git)

But acpidump is also part of kernel source code:
tools/power/acpi/tools/acpidump/


Cheers,

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


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

2017-11-01 Thread L. Rose
Hi, thanks for replying!

> Could you send acpidump to me?
Sorry, but can you point me a URL where to get acpidump? I'm running
arch, but any x86_64-binary or source code should be fine. Couldn't find
it anywhere on the net.
> There is really nothing that can be done. The BIOS does not supply the
> interface, and that's it unfortunately. But everything will work in
> any case. As said, everything will will be handled in firmware and
> there is no need for software support. The ports are just not visible
> to the OS.
>
> I think Microsoft has now said (I'm _not_ 100% sure) that the USB
> Type-C ports can not be hidden like that any more, and they should
> always be visible to the OS, so the latest boards most likely will
> always supply some kind of an interface to them. Either via BIOS
> (UCSI) if EC in in control of them, or alternatively the OS will have
> direct access to the USB PD controller or the USB Type-C PHY.
That's at least a bit of hope :)

Thanks a lot,
L. Rose
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

2017-11-01 Thread Heikki Krogerus
On Tue, Oct 31, 2017 at 04:19:58PM +0100, L. Rose wrote:
> Hi, thanks for your reply!
> 
> 
> On 31.10.2017 10:17, Heikki Krogerus wrote:
> > Hi,
> > 
> > It is likely that your system handles USB PD in firmware, and the OS
> > has no say in that. Which board is it?
> It's a "Gigabyte Z170X Ultra Gaming", which I (obviously) don't use for
> gaming ;)

OK. That board has the Thunderbolt3 controller. USB PD in it is handled
AFAIK by TI's USB PD controller in case you are interested. There is a
small (very small) chance that it is attached to the chipset's I2C host
instead of the EC.

Could you send acpidump to me?

> > 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
> Unfortunately, the directory typec doesn't exist in /sys/class.
> > To check if your system supports UCSI:
> > 
> >  % cat /sys/bus/acpi/devices/USBC000\:00/status
> >  15
> The device doesn't exist, either.
> > 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.
> What does that mean, UCSI is not supported? Is that something that might be
> fixed somehow, or do I have to live with that?

There is really nothing that can be done. The BIOS does not supply the
interface, and that's it unfortunately. But everything will work in
any case. As said, everything will will be handled in firmware and
there is no need for software support. The ports are just not visible
to the OS.

I think Microsoft has now said (I'm _not_ 100% sure) that the USB
Type-C ports can not be hidden like that any more, and they should
always be visible to the OS, so the latest boards most likely will
always supply some kind of an interface to them. Either via BIOS
(UCSI) if EC in in control of them, or alternatively the OS will have
direct access to the USB PD controller or the USB Type-C PHY.


Cheers,

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


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

2017-10-31 Thread L. Rose

Hi, thanks for your reply!


On 31.10.2017 10:17, Heikki Krogerus wrote:

Hi,

It is likely that your system handles USB PD in firmware, and the OS
has no say in that. Which board is it?
It's a "Gigabyte Z170X Ultra Gaming", which I (obviously) don't use for 
gaming ;)

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

Unfortunately, the directory typec doesn't exist in /sys/class.

To check if your system supports UCSI:

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

The device doesn't exist, either.

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.
What does that mean, UCSI is not supported? Is that something that might 
be fixed somehow, or do I have to live with that?


Thanks a lot,

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


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

2017-10-31 Thread Heikki Krogerus
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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


State of USB-C PD on the linux kernel

2017-10-30 Thread L. Rose
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?

Thanks for any information, as I couldn't find anything regarding this
topic on the web.

Regards,

L. Rose

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