PINE64
keyboard and usb-c - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PinePhone (https://forum.pine64.org/forumdisplay.php?fid=120)
+--- Forum: PinePhone Hardware (https://forum.pine64.org/forumdisplay.php?fid=122)
+--- Thread: keyboard and usb-c (/showthread.php?tid=15803)

Pages: 1 2


RE: keyboard and usb-c - oihantto64 - 01-25-2022

Big Grintoday, on arch phosh, after the updates of the kernel, phoc etc, the keyboard works and if we cut the charge of the pinephone by the battery of the keyboard, then the usb-c port works normally (eth0, usb stick etc), beautiful and congratulations to all for all your efforts so that we can phone under linux without being tracked. a special thanks to dantcnix!


RE: keyboard and usb-c - munchausen - 05-09-2022

It seems that when the keyboard is connected and supplying power the USB C port on the phone should sink power but also act as USB host...

So I wonder:
Is there any way to switch the USB C between sink and source modes from user space?
Is there any way to switch between USB host and device mode from user space?


RE: keyboard and usb-c - theResonant - 06-11-2022

On postmarketOS, when the keyboard is not attached, the USB-C hub obviously works well with the phone (peripherals + HDMI), but only when external power is fed into the hub. This restriction is probably imposed by the OS.

When the keyboard is attached, I never tried the hub in the phone's USB connector (there's waaay too much ambiguity everyhwere I've read), but connecting the hub to the keyboard's USB connector does not work at all. Even if the keyboard is providing power (I pressed its button to start charging the phone).

I'm assuming the following should work, but I've never tried: to connect the hub to the phone's port, without feeding external power into the hub, but enabling power from the keyboard alone. That's because the keyboard battery is wired directly to the phone's USB power line, so the hub will act as if it is powered from the phone, and the phone will not send power to the port at all, relying on the keyboard only?

It's almost as if the OS is already smart enough to make this work, it looks like it, but I'm too worried to try. Would this make sense?


RE: keyboard and usb-c - Peter Gamma - 06-11-2022

Thanks a lot for this precious information. I sounds a bit Voodoo. I suppose we need a scientist to investigate all the details. We are ready to sacrify us for such research project. If what comes out is a working usb-c to HDMI device with keyboard and mouse, it is worth to start an investigation.

In the store it says it works with PostmarkedOS. Does the desktop (posh, gnome) also matter?


RE: keyboard and usb-c - theResonant - 06-11-2022

Quote:In the store it says it works with PostmarkedOS. Does the desktop (posh, gnome) also matter?

Probably doesn't matter. At least the "keyboard" part shouldn't, there's a kernel driver for it, so the UI should not know about the keyboard.

However, the powerbank aspect of it is more ambiguous. On postmarketOS it behaves properly (charging on/off works), but I can't seem to find the device files that are supposed to represent the powerbank within. The keyboard has a chip that controls charging, which should present itself as a `power_supply` device. But it doesn't show up on my phone.


RE: keyboard and usb-c - Peter Gamma - 06-11-2022

Well good to know. Mayby the keyboard has an "identity crysis" and does not know who it really is, and causes trouble in that way and distrubs the HDMI connection. We have also read that it is worth to plug in and then to unplug the usb-c adapter several times. One user reported that he got the HDMI adapter to work in that way.


RE: keyboard and usb-c - theResonant - 06-11-2022

(06-11-2022, 04:00 PM)Peter Gamma Wrote: Well good to know. Mayby the keyboard has an "identity crysis" and does not know who it really is, and causes trouble in that way and distrubs the HDMI connection. We have also read that it is worth to plug in and then to unplug the usb-c adapter several times. One user reported that he got the HDMI adapter to work in that way.

Will definitely try this!


RE: keyboard and usb-c - bokomaru - 07-16-2022

Hi all,

Hesitating to post to a resolved thread, but noticed talk of pogo pins and plugging power sources into each other and what not. A while back, a few of us went on a deep dive about how the pogo pins work and how they interact with the USB C port.

Attached a pic: collage of relevant parts of the mainboard and the USB C board. Lots to unpack there... but it shows how all of this connects and where things are controlled. Yup, there are different aspects controlled by both software and hardware. Yup, if you plug the wrong things into each other, it is bad.

The thread with long-winded discussion for anyone curious here. That's where the pic came from

Cheers