Repository navigation
overlays: Add geekworm-x120x overlay - #7744
Conversation
|
Our problem: open-flight/openflight#337 |
d6bf12d to
56e9108
Compare
|
What you have submitted looks fine - it has passed all the tests. However, it did make me think about the use of a pinctrl node purely to set a pull bias on a pin. This is something that can also be specified in the gpio declaration using with: Would you mind making this additional change? See #7746 for some examples. |
|
P.S. Good luck with upstreaming your driver changes - it can be a brutal process. If you let us know when they are accepted we will happily back-port it to our current kernels. |
The Geekworm X120x UPS boards for the Raspberry Pi 5 are currently set up with two separate overlays: dtoverlay=i2c-sensor,max17040 dtoverlay=gpio-charger,gpio=6,... Nothing tells the fuel gauge that the charger supplies it, so the battery cannot report whether it is charging. Add one overlay that creates both nodes and links them with power-supplies. The overlay and this description were written with help from Claude Code (claude-opus-5-5) and tested on a Raspberry Pi 5 with an X1202. Signed-off-by: Hugo Karlsson <huggek@klattorp.se>
I feared the same in regards to that, have heard horror storries but I think it passed? I may be naive of not understanding the process completely. See: https://lore.kernel.org/lkml/179418738021.1255445.3214315853336545090.b4-ty@b4/ |
56e9108 to
4e870b5
Compare
|
Congratulations on your success. Those commits have not appeared in linux-next yet - drop a reply here when they do and I'll do the back-port. |
Thanks. Looks to me like they are in Linux-next now: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/log/drivers/power/supply/max17040_battery.c So it would only be open-flight/openflight#319 that's in the way to get it working 100% then. |
|
Your upstreamed patches are now in rpi-6.18.y: and they're on the way to the new kernels. |
kernel: configs: enable the BMC150 I2C module See: raspberrypi/linux#7736 kernel: media: i2c: ov9282: Arm FSIN wake last in external trigger setup See: raspberrypi/linux#7739 kernel: overlays: Add geekworm-x120x overlay See: raspberrypi/linux#7744 kernel: overlays: Replace pinctrl nodes with GPIO_PULLs See: raspberrypi/linux#7746 configs: enable the LSM6DSx SPI module See: raspberrypi/linux#7735
kernel: configs: enable the BMC150 I2C module See: raspberrypi/linux#7736 kernel: media: i2c: ov9282: Arm FSIN wake last in external trigger setup See: raspberrypi/linux#7739 kernel: overlays: Add geekworm-x120x overlay See: raspberrypi/linux#7744 kernel: overlays: Replace pinctrl nodes with GPIO_PULLs See: raspberrypi/linux#7746 configs: enable the LSM6DSx SPI module See: raspberrypi/linux#7735
See: raspberrypi/linux#7720 kernel: WIP macb stall patches See: raspberrypi/linux#7667 kernel: overlays: Add spdif-gpio21 See: raspberrypi/linux#7748 kernel: drm/vc4: hdmi: Only ignore hotplug interrupts on forced connectors See: raspberrypi/linux#7727 kernel: configs: Enable NFT_BRIDGE_META and NF_CONNTRACK_BRIDGE as modules See: raspberrypi/linux#7753 kernel: power: supply: max17040: pass the device fwnode to the power supply core kernel: power: supply: max17040: derive status from an online supplier kernel: power: supply: max17040: clamp the reported capacity to 100 % See: raspberrypi/linux#7744
See: raspberrypi/linux#7720 kernel: WIP macb stall patches See: raspberrypi/linux#7667 kernel: overlays: Add spdif-gpio21 See: raspberrypi/linux#7748 kernel: drm/vc4: hdmi: Only ignore hotplug interrupts on forced connectors See: raspberrypi/linux#7727 kernel: configs: Enable NFT_BRIDGE_META and NF_CONNTRACK_BRIDGE as modules See: raspberrypi/linux#7753 kernel: power: supply: max17040: pass the device fwnode to the power supply core kernel: power: supply: max17040: derive status from an online supplier kernel: power: supply: max17040: clamp the reported capacity to 100 % See: raspberrypi/linux#7744
The Geekworm X120x UPS boards for the Pi 5 (X1202, X1206) are normally set up with
dtoverlay=i2c-sensor,max17040plusdtoverlay=gpio-charger,gpio=6,.... Nothing links the two, so the battery can't tell whether it is charging. This overlay creates both nodes and links them withpower-supplies.The link only reaches the battery's
statusonce max17040 honourspower-supplies. It doesn't today, because the driver never passes its fwnode to the power supply core. That fix is now on linux-pm: max17040 series.Tested on a Pi 5 (6.18.50) with an X1202:
batteryandchargerappear as before (status=Unknown,capacity=103).status=Fullandcapacity=100. Unplugging it switches toDischarging. Plugging it back in givesChargingbelow 100 % (seen at 98 %) andFullat 100 %. The battery sends its uevent within 1 ms of the charger's.Written with help from Claude Code.
🤖 Generated with Claude Code