EXOTIC SILICON
“Putting a BSD system in your pocket”
External keyboard battery
WARNING
The information presented on these pages is NOT intended to be followed as a guide to installing OpenBSD on your own Pinephone device, and must not be used for this purpose.
Unlike most SBCs, the Pinephone contains a rechargeable battery intended to power the device. Correct configuration of the charging circuits, including various safety features such as thermal protection will not be enabled by the current OpenBSD kernel as of the time of writing.
Series navigation
THIS IS PART SEVEN OF SEVEN (7/7) - CHECK OUT THE INDEX
Part 6
Index
Website themes
The Exotic Silicon website is available in ten themes, but you haven't chosen one yet!
First look at the external keyboard
As well as being a physical keyboard, this peripheral also includes a large 6000 mAh battery in it's base. From a user's point of view that's very useful, but if you've read the previous part of this series, you'll already know how complicated power supplies and battery charging can be on a phone. Adding a second battery to the mix isn't likely to make things any simpler, and will eventually require a fair amount of software logic in order to use both batteries together in an optimal way.
If it isn't obvious why this will be necessary, consider the situation when the handset is connected to the keyboard with it's second battery, and is also connected to AC power. If both batteries are charged to about 50% of their capacity, where should we direct the AC power to? Do we prioritise charging the internal battery, or the external battery? Do we charge the internal battery to 100% before charging the external battery? Or do we charge the internal battery to, say, 80%, then charge the external battery to 100%, then top off the internal battery only when the external one is full?
These are open-ended questions, with no clear-cut right or wrong answers. The optimal charging scheme depends entirely on your use case, for example whether you always use the phone in conjunction with the external keyboard, or whether you regularly connect and disconnect it. A user who leaves the external keyboard docked during the day at the office, but wants to take just the phone out with them socially in the evening, would probably prefer the internal battery to be charged to 100% by the end of the working day, regardless of the state of the keyboard battery. On the other hand, a user who leaves the keyboard docked all the time may well prefer to limit the internal battery to 80%, as this can increase the usable lifespan of lithium batteries compared with letting them remain charged to full capacity for extended periods of time.
However, the first step towards getting any of this working is obviously to see how the Pinephone with it's new keyboard attachment behaves in it's default configuration whilst running OpenBSD.
Using the correct charging port
IMPORTANT SAFETY ADVISORY:
The keyboard has it's own USB type C connector, which is supposed to be used instead of the handset's own internal USB type C connector for charging whilst the keyboard is connected to the handset.
Do NOT connect a power supply to the built-in USB connector on the handset whilst the keyboard is connected via the pogo pins.
Testing all combinations
For these tests, I'll be using a custom kernel configuration with the same patches I was using at the end of the last write-up. To recap, we've got RSB working, and the PMIC is recognised and configured to actually charge the phone's internal battery when connected to AC power. Temperature monitoring is enabled, and is hopefully working well enough that the device won't burst into flames on a whim.
Obviously we don't expect to see any data reported from the second battery at this point, but we can at least see whether it's working by looking at the charging and discharging current indications in four different scenarios. The Pinephone keyboard has a button to enable and disable it, and we can have external AC power connected or disconnected, so there are four combinations:
Four combinations
AC presentAC disconnected
Keyboard battery enabled12
Keyboard battery disabled34
With AC power connected and the keyboard battery enabled, we would naturally expect the phone's internal battery to charge. Likewise, with AC power disconnected and the keyboard battery disabled, we would expect the phone to be running on it's own internal power.
One interesting observation will be to see whether the battery enables itself when AC power is connected, and if it remembers it's state across disconnection and re-connection of AC power.
Starting with with AC power disconnected, and the keyboard battery enabled, we get a fairly high charging current of 1.33A from the keyboard battery to the internal battery:
AC disconnected, keyboard battery enabled
hw.sensors.axppmic0.temp0=52.33 degC
hw.sensors.axppmic0.volt0=4.18 VDC (battery voltage)
hw.sensors.axppmic0.current0=1.33 A (battery charging current)
hw.sensors.axppmic0.current1=0.00 A (battery discharging current)
hw.sensors.axppmic0.amphour0=0.00 Ah (battery maximum capacity), WARNING
hw.sensors.axppmic0.amphour1=0.00 Ah (battery current capacity), WARNING
hw.sensors.axppmic0.indicator0=On (ACIN), OK
hw.sensors.axppmic0.indicator1=On (VBUS), OK
hw.sensors.axppmic0.indicator2=On (battery present), OK
hw.sensors.axppmic0.indicator3=On (battery charging), OK
hw.sensors.axppmic0.percent0=71.00% (battery percent), OK
Connecting AC, the charging current to the internal battery drops to 0.72A:
AC connected
hw.sensors.axppmic0.temp0=49.35 degC
hw.sensors.axppmic0.volt0=4.09 VDC (battery voltage)
hw.sensors.axppmic0.current0=0.72 A (battery charging current)
hw.sensors.axppmic0.current1=0.00 A (battery discharging current)
hw.sensors.axppmic0.amphour0=0.00 Ah (battery maximum capacity), WARNING
hw.sensors.axppmic0.amphour1=0.00 Ah (battery current capacity), WARNING
hw.sensors.axppmic0.indicator0=On (ACIN), OK
hw.sensors.axppmic0.indicator1=On (VBUS), OK
hw.sensors.axppmic0.indicator2=On (battery present), OK
hw.sensors.axppmic0.indicator3=On (battery charging), OK
hw.sensors.axppmic0.percent0=71.00% (battery percent), OK
The charging current is higher than I had expected, considering that the power supply is just a regular spare USB-A connector on my workstation. The Pinephone only charged at about 0.29A from the same USB port when connected directly to it before.
Pressing the button the keyboard to enable the battery didn't change anything, as presumably it's already enabled.
Disconnecting AC, we briefly see this:
AC disconnected, (immediate readings)
hw.sensors.axppmic0.temp0=48.08 degC
hw.sensors.axppmic0.volt0=3.97 VDC (battery voltage)
hw.sensors.axppmic0.current0=0.00 A (battery charging current)
hw.sensors.axppmic0.current1=0.01 A (battery discharging current)
hw.sensors.axppmic0.amphour0=0.00 Ah (battery maximum capacity), WARNING
hw.sensors.axppmic0.amphour1=0.00 Ah (battery current capacity), WARNING
hw.sensors.axppmic0.indicator0=On (ACIN), OK
hw.sensors.axppmic0.indicator1=On (VBUS), OK
hw.sensors.axppmic0.indicator2=On (battery present), OK
hw.sensors.axppmic0.indicator3=Off (battery charging)
hw.sensors.axppmic0.percent0=73.00% (battery percent), OK
Then about a second later:
AC disconnected, (readings have settled)
hw.sensors.axppmic0.temp0=51.26 degC
hw.sensors.axppmic0.volt0=4.18 VDC (battery voltage)
hw.sensors.axppmic0.current0=1.33 A (battery charging current)
hw.sensors.axppmic0.current1=0.00 A (battery discharging current)
hw.sensors.axppmic0.amphour0=0.00 Ah (battery maximum capacity), WARNING
hw.sensors.axppmic0.amphour1=0.00 Ah (battery current capacity), WARNING
hw.sensors.axppmic0.indicator0=On (ACIN), OK
hw.sensors.axppmic0.indicator1=On (VBUS), OK
hw.sensors.axppmic0.indicator2=On (battery present), OK
hw.sensors.axppmic0.indicator3=On (battery charging), OK
hw.sensors.axppmic0.percent0=73.00% (battery percent), OK
So presumably this is now discharging the external battery in the keyboard, since there is no AC connected.
Note that the temperature sensor reading has jumped up somewhat.
Pressing and holding the keyboard battery button for 15 seconds to disable it, we eventually see:
AC disconnected, keyboard battery disabled
hw.sensors.axppmic0.temp0=49.99 degC
hw.sensors.axppmic0.volt0=3.95 VDC (battery voltage)
hw.sensors.axppmic0.current0=0.00 A (battery charging current)
hw.sensors.axppmic0.current1=0.23 A (battery discharging current)
hw.sensors.axppmic0.amphour0=0.00 Ah (battery maximum capacity), WARNING
hw.sensors.axppmic0.amphour1=0.00 Ah (battery current capacity), WARNING
hw.sensors.axppmic0.indicator0=Off (ACIN)
hw.sensors.axppmic0.indicator1=Off (VBUS)
hw.sensors.axppmic0.indicator2=On (battery present), OK
hw.sensors.axppmic0.indicator3=Off (battery charging)
hw.sensors.axppmic0.percent0=73.00% (battery percent), OK
So now the Pinephone must be running exclusively using it's own internal battery, as we've disabled the external battery and there is no AC power connected. After a while, we see:
After some time using the internal battery
hw.sensors.axppmic0.temp0=47.01 degC
hw.sensors.axppmic0.volt0=3.92 VDC (battery voltage)
hw.sensors.axppmic0.current0=0.00 A (battery charging current)
hw.sensors.axppmic0.current1=0.22 A (battery discharging current)
hw.sensors.axppmic0.amphour0=0.00 Ah (battery maximum capacity), WARNING
hw.sensors.axppmic0.amphour1=0.00 Ah (battery current capacity), WARNING
hw.sensors.axppmic0.indicator0=Off (ACIN)
hw.sensors.axppmic0.indicator1=Off (VBUS)
hw.sensors.axppmic0.indicator2=On (battery present), OK
hw.sensors.axppmic0.indicator3=Off (battery charging)
hw.sensors.axppmic0.percent0=73.00% (battery percent), OK
Both temperature and battery voltage are falling. Pressing the keyboard battery button for one second to enable it gives us this:
AC disconnected, keyboard battery enabled, (immediate readings)
hw.sensors.axppmic0.temp0=49.88 degC
hw.sensors.axppmic0.volt0=4.16 VDC (battery voltage)
hw.sensors.axppmic0.current0=1.33 A (battery charging current)
hw.sensors.axppmic0.current1=0.00 A (battery discharging current)
hw.sensors.axppmic0.amphour0=0.00 Ah (battery maximum capacity), WARNING
hw.sensors.axppmic0.amphour1=0.00 Ah (battery current capacity), WARNING
hw.sensors.axppmic0.indicator0=On (ACIN), OK
hw.sensors.axppmic0.indicator1=On (VBUS), OK
hw.sensors.axppmic0.indicator2=On (battery present), OK
hw.sensors.axppmic0.indicator3=On (battery charging), OK
hw.sensors.axppmic0.percent0=73.00% (battery percent), OK
Then shortly afterwards:
AC disconnected, keyboard battery enabled, (readings have settled)
hw.sensors.axppmic0.temp0=52.75 degC
hw.sensors.axppmic0.volt0=4.18 VDC (battery voltage)
hw.sensors.axppmic0.current0=1.33 A (battery charging current)
hw.sensors.axppmic0.current1=0.00 A (battery discharging current)
hw.sensors.axppmic0.amphour0=0.00 Ah (battery maximum capacity), WARNING
hw.sensors.axppmic0.amphour1=0.00 Ah (battery current capacity), WARNING
hw.sensors.axppmic0.indicator0=On (ACIN), OK
hw.sensors.axppmic0.indicator1=On (VBUS), OK
hw.sensors.axppmic0.indicator2=On (battery present), OK
hw.sensors.axppmic0.indicator3=On (battery charging), OK
hw.sensors.axppmic0.percent0=73.00% (battery percent), OK
So this is now charging from the keyboard battery, still with no AC connected.
After another 15 second press on the button on the keyboard, we're discharging the internal battery again:
Keyboard battery disabled, back to the internal battery only
hw.sensors.axppmic0.temp0=49.35 degC
hw.sensors.axppmic0.volt0=3.95 VDC (battery voltage)
hw.sensors.axppmic0.current0=0.00 A (battery charging current)
hw.sensors.axppmic0.current1=0.23 A (battery discharging current)
hw.sensors.axppmic0.amphour0=0.00 Ah (battery maximum capacity), WARNING
hw.sensors.axppmic0.amphour1=0.00 Ah (battery current capacity), WARNING
hw.sensors.axppmic0.indicator0=Off (ACIN)
hw.sensors.axppmic0.indicator1=Off (VBUS)
hw.sensors.axppmic0.indicator2=On (battery present), OK
hw.sensors.axppmic0.indicator3=Off (battery charging)
hw.sensors.axppmic0.percent0=73.00% (battery percent), OK
Now let's connect AC:
AC power connected, keyboard battery state unknown, (previously disabled)
hw.sensors.axppmic0.temp0=48.50 degC
hw.sensors.axppmic0.volt0=4.07 VDC (battery voltage)
hw.sensors.axppmic0.current0=0.71 A (battery charging current)
hw.sensors.axppmic0.current1=0.00 A (battery discharging current)
hw.sensors.axppmic0.amphour0=0.00 Ah (battery maximum capacity), WARNING
hw.sensors.axppmic0.amphour1=0.00 Ah (battery current capacity), WARNING
hw.sensors.axppmic0.indicator0=On (ACIN), OK
hw.sensors.axppmic0.indicator1=On (VBUS), OK
hw.sensors.axppmic0.indicator2=On (battery present), OK
hw.sensors.axppmic0.indicator3=On (battery charging), OK
hw.sensors.axppmic0.percent0=73.00% (battery percent), OK
So we have external AC power present, and the internal battery is charging at 0.71A, but it's not clear what the external battery in the keyboard is doing.
A quick press on the keyboard battery button, which should enable it if it's disabled, results in no change:
No significant change after trying to enable the keyboard battery
hw.sensors.axppmic0.temp0=48.50 degC
hw.sensors.axppmic0.volt0=4.09 VDC (battery voltage)
hw.sensors.axppmic0.current0=0.69 A (battery charging current)
hw.sensors.axppmic0.current1=0.00 A (battery discharging current)
hw.sensors.axppmic0.amphour0=0.00 Ah (battery maximum capacity), WARNING
hw.sensors.axppmic0.amphour1=0.00 Ah (battery current capacity), WARNING
hw.sensors.axppmic0.indicator0=On (ACIN), OK
hw.sensors.axppmic0.indicator1=On (VBUS), OK
hw.sensors.axppmic0.indicator2=On (battery present), OK
hw.sensors.axppmic0.indicator3=On (battery charging), OK
hw.sensors.axppmic0.percent0=74.00% (battery percent), OK
Trying a second time also results in no change:
Still no significant change
hw.sensors.axppmic0.temp0=48.50 degC
hw.sensors.axppmic0.volt0=4.09 VDC (battery voltage)
hw.sensors.axppmic0.current0=0.69 A (battery charging current)
hw.sensors.axppmic0.current1=0.00 A (battery discharging current)
hw.sensors.axppmic0.amphour0=0.00 Ah (battery maximum capacity), WARNING
hw.sensors.axppmic0.amphour1=0.00 Ah (battery current capacity), WARNING
hw.sensors.axppmic0.indicator0=On (ACIN), OK
hw.sensors.axppmic0.indicator1=On (VBUS), OK
hw.sensors.axppmic0.indicator2=On (battery present), OK
hw.sensors.axppmic0.indicator3=On (battery charging), OK
hw.sensors.axppmic0.percent0=75.00% (battery percent), OK
So let's try disconnecting AC:
AC disconnected, keyboard battery detected but seemingly disabled
hw.sensors.axppmic0.temp0=48.29 degC
hw.sensors.axppmic0.volt0=3.98 VDC (battery voltage)
hw.sensors.axppmic0.current0=0.00 A (battery charging current)
hw.sensors.axppmic0.current1=0.02 A (battery discharging current)
hw.sensors.axppmic0.amphour0=0.00 Ah (battery maximum capacity), WARNING
hw.sensors.axppmic0.amphour1=0.00 Ah (battery current capacity), WARNING
hw.sensors.axppmic0.indicator0=On (ACIN), OK
hw.sensors.axppmic0.indicator1=On (VBUS), OK
hw.sensors.axppmic0.indicator2=On (battery present), OK
hw.sensors.axppmic0.indicator3=Off (battery charging)
hw.sensors.axppmic0.percent0=75.00% (battery percent), OK
This is interesting.
Actual AC power is now disconnected, but the Pinephone is seeing power from the keyboard battery, which it reports as AC. This isn't unusual. However, notice now that the PMIC is not charging the internal battery despite reporting that AC is present, (which is actually power from the external keyboard battery).
Pressing the button on the keyboard enables the external battery, and the phone starts charging it's internal battery at a relatively high current:
AC disconnected, keyboard battery discharging and powering the handset
hw.sensors.axppmic0.temp0=53.07 degC
hw.sensors.axppmic0.volt0=4.19 VDC (battery voltage)
hw.sensors.axppmic0.current0=1.33 A (battery charging current)
hw.sensors.axppmic0.current1=0.00 A (battery discharging current)
hw.sensors.axppmic0.amphour0=0.00 Ah (battery maximum capacity), WARNING
hw.sensors.axppmic0.amphour1=0.00 Ah (battery current capacity), WARNING
hw.sensors.axppmic0.indicator0=On (ACIN), OK
hw.sensors.axppmic0.indicator1=On (VBUS), OK
hw.sensors.axppmic0.indicator2=On (battery present), OK
hw.sensors.axppmic0.indicator3=On (battery charging), OK
hw.sensors.axppmic0.percent0=75.00% (battery percent), OK
Connecting AC makes the current drop, but the internal battery continues charging:
AC re-connected
hw.sensors.axppmic0.temp0=50.41 degC
hw.sensors.axppmic0.volt0=4.09 VDC (battery voltage)
hw.sensors.axppmic0.current0=0.65 A (battery charging current)
hw.sensors.axppmic0.current1=0.00 A (battery discharging current)
hw.sensors.axppmic0.amphour0=0.00 Ah (battery maximum capacity), WARNING
hw.sensors.axppmic0.amphour1=0.00 Ah (battery current capacity), WARNING
hw.sensors.axppmic0.indicator0=On (ACIN), OK
hw.sensors.axppmic0.indicator1=On (VBUS), OK
hw.sensors.axppmic0.indicator2=On (battery present), OK
hw.sensors.axppmic0.indicator3=On (battery charging), OK
hw.sensors.axppmic0.percent0=75.00% (battery percent), OK
Disconnecting AC initially results in this:
AC disconnected again, (immediate readings)
hw.sensors.axppmic0.temp0=49.14 degC
hw.sensors.axppmic0.volt0=3.99 VDC (battery voltage)
hw.sensors.axppmic0.current0=0.00 A (battery charging current)
hw.sensors.axppmic0.current1=0.01 A (battery discharging current)
hw.sensors.axppmic0.amphour0=0.00 Ah (battery maximum capacity), WARNING
hw.sensors.axppmic0.amphour1=0.00 Ah (battery current capacity), WARNING
hw.sensors.axppmic0.indicator0=On (ACIN), OK
hw.sensors.axppmic0.indicator1=On (VBUS), OK
hw.sensors.axppmic0.indicator2=On (battery present), OK
hw.sensors.axppmic0.indicator3=Off (battery charging)
hw.sensors.axppmic0.percent0=75.00% (battery percent), OK
Quickly followed by:
AC disconnected again, (readings have settled)
hw.sensors.axppmic0.temp0=52.96 degC
hw.sensors.axppmic0.volt0=4.19 VDC (battery voltage)
hw.sensors.axppmic0.current0=1.33 A (battery charging current)
hw.sensors.axppmic0.current1=0.00 A (battery discharging current)
hw.sensors.axppmic0.amphour0=0.00 Ah (battery maximum capacity), WARNING
hw.sensors.axppmic0.amphour1=0.00 Ah (battery current capacity), WARNING
hw.sensors.axppmic0.indicator0=On (ACIN), OK
hw.sensors.axppmic0.indicator1=On (VBUS), OK
hw.sensors.axppmic0.indicator2=On (battery present), OK
hw.sensors.axppmic0.indicator3=On (battery charging), OK
hw.sensors.axppmic0.percent0=75.00% (battery percent), OK
So connecting and disconnecting AC didn't seem to change the enabled or disabled status of the keyboard battery. It remained enabled.
Now, with AC disconnected and the external keyboard battery presumably enabled, long pressing on the keyboard button for about 15 seconds gives us:
AC disconnected, keyboard battery disabled
hw.sensors.axppmic0.temp0=51.90 degC
hw.sensors.axppmic0.volt0=3.97 VDC (battery voltage)
hw.sensors.axppmic0.current0=0.00 A (battery charging current)
hw.sensors.axppmic0.current1=0.23 A (battery discharging current)
hw.sensors.axppmic0.amphour0=0.00 Ah (battery maximum capacity), WARNING
hw.sensors.axppmic0.amphour1=0.00 Ah (battery current capacity), WARNING
hw.sensors.axppmic0.indicator0=Off (ACIN)
hw.sensors.axppmic0.indicator1=Off (VBUS)
hw.sensors.axppmic0.indicator2=On (battery present), OK
hw.sensors.axppmic0.indicator3=Off (battery charging)
hw.sensors.axppmic0.percent0=75.00% (battery percent), OK
Not surprisingly, the internal battery is discharging, since the keyboard battery is now disabled and AC is still disconnected. Let's connect AC:
AC connected again, (immediate readings)
hw.sensors.axppmic0.temp0=48.92 degC
hw.sensors.axppmic0.volt0=4.04 VDC (battery voltage)
hw.sensors.axppmic0.current0=0.41 A (battery charging current)
hw.sensors.axppmic0.current1=0.00 A (battery discharging current)
hw.sensors.axppmic0.amphour0=0.00 Ah (battery maximum capacity), WARNING
hw.sensors.axppmic0.amphour1=0.00 Ah (battery current capacity), WARNING
hw.sensors.axppmic0.indicator0=On (ACIN), OK
hw.sensors.axppmic0.indicator1=On (VBUS), OK
hw.sensors.axppmic0.indicator2=On (battery present), OK
hw.sensors.axppmic0.indicator3=On (battery charging), OK
hw.sensors.axppmic0.percent0=75.00% (battery percent), OK
After a while both temperature and voltage increase:
AC connected again, (readings have settled)
hw.sensors.axppmic0.temp0=49.35 degC
hw.sensors.axppmic0.volt0=4.08 VDC (battery voltage)
hw.sensors.axppmic0.current0=0.64 A (battery charging current)
hw.sensors.axppmic0.current1=0.00 A (battery discharging current)
hw.sensors.axppmic0.amphour0=0.00 Ah (battery maximum capacity), WARNING
hw.sensors.axppmic0.amphour1=0.00 Ah (battery current capacity), WARNING
hw.sensors.axppmic0.indicator0=On (ACIN), OK
hw.sensors.axppmic0.indicator1=On (VBUS), OK
hw.sensors.axppmic0.indicator2=On (battery present), OK
hw.sensors.axppmic0.indicator3=On (battery charging), OK
hw.sensors.axppmic0.percent0=75.00% (battery percent), OK
Disconnecting AC again:
AC disconnected, (immediate readings)
hw.sensors.axppmic0.temp0=48.92 degC
hw.sensors.axppmic0.volt0=3.99 VDC (battery voltage)
hw.sensors.axppmic0.current0=0.00 A (battery charging current)
hw.sensors.axppmic0.current1=0.01 A (battery discharging current)
hw.sensors.axppmic0.amphour0=0.00 Ah (battery maximum capacity), WARNING
hw.sensors.axppmic0.amphour1=0.00 Ah (battery current capacity), WARNING
hw.sensors.axppmic0.indicator0=On (ACIN), OK
hw.sensors.axppmic0.indicator1=On (VBUS), OK
hw.sensors.axppmic0.indicator2=On (battery present), OK
hw.sensors.axppmic0.indicator3=Off (battery charging)
hw.sensors.axppmic0.percent0=76.00% (battery percent), OK
Then shortly:
AC disconnected, (readings have settled)
hw.sensors.axppmic0.temp0=52.43 degC
hw.sensors.axppmic0.volt0=4.19 VDC (battery voltage)
hw.sensors.axppmic0.current0=1.33 A (battery charging current)
hw.sensors.axppmic0.current1=0.00 A (battery discharging current)
hw.sensors.axppmic0.amphour0=0.00 Ah (battery maximum capacity), WARNING
hw.sensors.axppmic0.amphour1=0.00 Ah (battery current capacity), WARNING
hw.sensors.axppmic0.indicator0=On (ACIN), OK
hw.sensors.axppmic0.indicator1=On (VBUS), OK
hw.sensors.axppmic0.indicator2=On (battery present), OK
hw.sensors.axppmic0.indicator3=On (battery charging), OK
hw.sensors.axppmic0.percent0=76.00% (battery percent), OK
So connecting and then disconnecting AC definitely seems to leave the external battery active.
Actual keyboard functionality
Extra battery power is certainly welcome, but the main purpose of the keyboard is obviously to work as a keyboard.
This aspect of the hardware uses the I2C connection which is exposed via the pogo pins on the back of the Pinephone handset. OpenBSD has an ihidev driver to support HID devices such as keyboards, mice and touchscreens via I2C, and specific support for such keyboards would be provided via the ikbd driver.
These two drivers are not enabled in the kernel configuration file for the arm64 architecture by default, but since I'm using a custom kernel configuration anyway, it was easy enough to add them.
I2C devices detected, (no keyboard)
sxitwi0 at simplebus0
iic0 at sxitwi0
"goodix,gt917s" at iic0 addr 0x5d not configured
sxitwi1 at simplebus0
iic1 at sxitwi1
"st,lis3mdl-magn" at iic1 addr 0x1e not configured
"sensortek,stk3311" at iic1 addr 0x48 not configured
"invensense,mpu6050" at iic1 addr 0x68 not configured
sxitwi2 at simplebus0
iic2 at sxitwi2
Unfortunately, I was already dubious that the device would be detected. Even without these drivers compiled in, I would have expected it to have been detected as an unconfigured device connected to iic2, but instead we just see the same internal I2C devices that we saw before:
The first device, and only device connected to iic0, is the touch panel. Connected to iic1, we see the magnetometer, ambient light sensor, and gyroscope.
Obviously, getting the keyboard detected and eventually functioning is going to take a bit more work.
I did wonder if the pogo pins were actually making a reliable connection, but removing and replacing the keyboard twice didn't change anything.
Initial conclusions on the external keyboard
Looking at the keyboard overall, and remembering that I haven't had an opportunity to actually type anything on it yet, it seems like quite a nice unit. It opens all the way up, so it can lay flat on a table or other worksurface if required. It's somewhat thicker than I had expected when closed, and also slightly heavier, but neither of these issues is a particular concern.
Series navigation
Part 1 - Building the installation media and installing.
Part 2 - Booting the completed installation and initial information gathering.
Part 3 - Starting to debug USB issues.
Part 4 - Investigating errors from sxirsb.
Part 5 - Controlling the LEDs and vibration motor.
Part 6 - PMIC and battery charging.
Part 7 - External keyboard battery.