Does the OS know what voltage the SBC gets?

The Rock 5B uses a USB-c PD power supply. Depending on various things the SBC gets various voltages from the power delivery.

Does the OS know what voltage the system gets? Is it possible to see the input voltage somewhere in the file system of my Linux system?

1 Like

Ofcourse the OS knows the voltage.
Here’s the command to get it cat /sys/devices/iio_sysfs_trigger/subsystem/devices/iio\\:device0/in_voltage6_raw

1 Like

I think it must be placed somewhere else on my openSUSE Tumbleweed system.

Asked the same question in the openSUSE forum. Hopefully it gets answered.

What package does that belong to?

…and does the iio command access the voltage of the Power Delivery or the GPIO?

This is the reading of file from sysfs, it is not a package…

Well… I can’t find the iio_sysfs_trigger catalogue. That’s why I’m asking.

This is implemented by the ADC monitoring the input voltage on the ROCK 5B.

So the hardware for monitoring the input voltage is available. Good good. Does that mean that I’m missing some software on my openSUSE Tumbleweed system?

Sysfs is provided by kernel driver, no userspace program is necessary.

So the 6.8 kernel that Tumbleweed currently uses might be missing something?
If not then could it be that the implementation might have changed somehow?

Armbian running kernel 6.8.2:

$ cat /sys/bus/iio/devices/iio\:device0/in_voltage6_raw
3572

$ /sys/bus> ls
acpi amba auxiliary cdx clockevents clocksource container cpu dax edac event_source fsl-mc genpd gpio hid host1x-context i2c mdio_bus media memory memory_tiering mipi-dsi node ntb nvmem nvmem-layout pci pci-epf pci_express platform pnp scmi_protocol serial serial-base serio snd_seq soc spi usb virtio workqueue

You are running an acpi system, so there should be a lot of missing hardwares on board. Mainline kernel has &saradc in devicetree since v6.5: https://github.com/torvalds/linux/commit/a68e1aec587a75a51496f1b207272b6034cca190

So if I understand it correctly then the fact that my system uses ACPI reduces the available hardware devices. How come?

ACPI will read hardware from UEFI firmware and pass it to kernel driver. Only the hardware listed are supported: https://github.com/edk2-porting/edk2-rk3588?tab=readme-ov-file#supported-peripherals.
To make ADC work in ACPI mode, you need:
1, Make UEFI firmware support ADC: https://github.com/edk2-porting/edk2-rk3588/blob/master/edk2-rockchip/Platform/Radxa/ROCK5B/AcpiTables/Dsdt.asl
2, Let linux kernel driver support ACPI instead of device tree.

Would it be possible to turn off ACPI mode?

The 6.8 kernel completely misses any energy efficiency (being one of those few reasons why struggling with these ARM thingies would make some sense): https://github.com/ThomasKaiser/Knowledge/blob/master/articles/Quick_Preview_of_ROCK_5B.md#revisiting-software-support-status-20-months-later

1 Like

Energy efficiency is very important to me because I am hoping to live off grid in the future. It would also help with keeping the temperature down on my passively cooled computer.

This thread started because I wanted to know more about the power delivery that feeds this tiny computer.

…aaand I nurture a dream about having the computer controlling the solar power system of my future household. A bit like a big UPS.