Bug 256628 - Allwinner aw_thermal error
Summary: Allwinner aw_thermal error
Status: Closed Not A Bug
Alias: None
Product: Base System
Classification: Unclassified
Component: arm (show other bugs)
Version: CURRENT
Hardware: arm64 Any
: --- Affects Only Me
Assignee: freebsd-arm (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-15 19:53 UTC by Manuel Stühn
Modified: 2021-06-16 07:54 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Manuel Stühn 2021-06-15 19:53:05 UTC
aw_thermal seems not to attach properly on my NanoPI NEO2:

root@bsd-neopi:~ # dmesg | grep therm 
aw_thermal0: <Allwinner Thermal Sensor Controller> mem 0x1c25000-0x1c250ff irq 4 on simplebus0
aw_thermal0: Cannot read THS efuse
device_attach: aw_thermal0 attach returned 6
interface aw_thermal.1 already present in the KLD 'kernel'!
root@bsd-neopi:~ # sysctl -n dev.aw_thermal.0.cpu
sysctl: unknown oid 'dev.aw_thermal.0.cpu'
root@bsd-neopi:~ # uname -UKa
FreeBSD bsd-neopi 14.0-CURRENT FreeBSD 14.0-CURRENT #0 main-n247356-715df83abc0: Mon Jun 14 21:20:51 CEST 2021     root@freebsd-current-vm:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC-NODEBUG  arm64 1400023 1400023

I do only have another productive node running an old 13-CURRENT where the driver attaches:
root@nanopi-bsd:~ # cat /var/log/messages | grep therm
Feb 15 11:36:30 nanopi-bsd kernel: aw_thermal0: <Allwinner Thermal Sensor Controller> mem 0x1c25000-0x1c250ff irq 4 on simplebus0
root@nanopi-bsd:~ # uname -aUK
FreeBSD nanopi-bsd 13.0-CURRENT FreeBSD 13.0-CURRENT efa57a39e85(master) GENERIC-NODEBUG  arm64 1300021 1300021
root@nanopi-bsd:~ # sysctl dev.aw_thermal.0
dev.aw_thermal.0.gpu: 42C
dev.aw_thermal.0.cpu: 38C
dev.aw_thermal.0.%parent: simplebus0
dev.aw_thermal.0.%pnpinfo: name=thermal_sensor@1c25000 compat=allwinner,sun50i-h5-ths
dev.aw_thermal.0.%location: 
dev.aw_thermal.0.%driver: aw_thermal
dev.aw_thermal.0.%desc: Allwinner Thermal Sensor Controller
Comment 1 Manuel Stühn 2021-06-16 07:54:30 UTC
obsolete DT-overlay-files were lurking around in /boot/dts/overlays and got loaded during boot. After removing those, the thermal-driver did work.