Hi,
I recently bought geekworm's x708 module for my RPI4. With linux everything works as expected. With FreeBSD I'm able to detect power loss and do automatic full hardware poweroff. It also would be nice to check voltage and battery capacity while running on batteries. And here comes the problem.
Same hardware. With Linux I can see I2C device(s) and this code (ups-read, ups-hat-c.zip) works. However with FreeBSD I can't even see the i2c devices.
Can anyone point out what I'm doing wrong or i2c just does not work (yet) under FreeBSD?
Regards,
I recently bought geekworm's x708 module for my RPI4. With linux everything works as expected. With FreeBSD I'm able to detect power loss and do automatic full hardware poweroff. It also would be nice to check voltage and battery capacity while running on batteries. And here comes the problem.
Same hardware. With Linux I can see I2C device(s) and this code (ups-read, ups-hat-c.zip) works. However with FreeBSD I can't even see the i2c devices.
Code:
root@linux:~# i2cdetect -l
i2c-1 i2c bcm2835 (i2c@7e804000) I2C adapter
root@linux:~# i2cdetect -F 1
Functionalities implemented by /dev/i2c-1:
I2C yes
SMBus Quick Command yes
SMBus Send Byte yes
SMBus Receive Byte yes
SMBus Write Byte yes
SMBus Read Byte yes
SMBus Write Word yes
SMBus Read Word yes
SMBus Process Call yes
SMBus Block Write yes
SMBus Block Read no
SMBus Block Process Call no
SMBus PEC yes
I2C Block Write yes
I2C Block Read yes
root@fbsd:~ # uname -a
FreeBSD fbsd 13.0-CURRENT FreeBSD 13.0-CURRENT #0 r367946: Mon Nov 23 14:28:53 EET 2020
root@fbsd:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC arm64
root@fbsd:~ # i2c -s -v
dev: /dev/iic0, addr: 0x40100401, r/w: r, offset: 0x00, width: 8, count: 1
Hardware may not support START/STOP scanning; trying less-reliable read method.
Scanning I2C devices on /dev/iic0: <none found>
Can anyone point out what I'm doing wrong or i2c just does not work (yet) under FreeBSD?
Regards,