NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/58948: sunxithermal(4) does not work on H3 chipset
>Number: 58948
>Category: kern
>Synopsis: sunxithermal(4) does not work on H3 chipset
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Dec 30 17:00:00 +0000 2024
>Originator: Martin Husemann
>Release: NetBSD 10.99.12
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD zero2.aprisoft.de 10.99.12 NetBSD 10.99.12 (GENERIC) #29: Mon Dec 30 17:42:29 CET 2024 martin%martins.aprisoft.de@localhost:/home/martin/current/src/sys/arch/evbarm/compile/GENERIC evbarm
Architecture: earmv7hfeb
Machine: evbarm
>Description:
This Orange PI zero board thinks it's CPU is at ~170 degC at boot (while it
is actually in the 20 - 30 degC range) and tries to emergency shutdown the
machine before starting init.
I added a few debug printfs to watch calibration and value conversions.
the DTB has this sniplet:
thermal-sensor@1c25000 {
compatible = "allwinner,sun8i-h3-ths";
reg = <0x1c25000 0x400>;
interrupts = <0x00 0x1f 0x04>;
resets = <0x03 0x2a>;
clocks = <0x03 0x37 0x03 0x45>;
clock-names = "bus\0mod";
nvmem-cells = <0x29>;
nvmem-cell-names = "calibration";
#thermal-sensor-cells = <0x00>;
phandle = <0x30>;
};
Here is a boot log (with the shutdown code disabled and the additional
printfs):
[ 1.0000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
[ 1.0000000] 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013,
[ 1.0000000] 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023,
[ 1.0000000] 2024
[ 1.0000000] The NetBSD Foundation, Inc. All rights reserved.
[ 1.0000000] Copyright (c) 1982, 1986, 1989, 1991, 1993
[ 1.0000000] The Regents of the University of California. All rights reserved.
[ 1.0000000] NetBSD 10.99.12 (GENERIC) #28: Mon Dec 30 17:40:27 CET 2024
[ 1.0000000] martin%martins.aprisoft.de@localhost:/home/martin/current/src/sys/arch/evbarm/compile/GENERIC
[ 1.0000000] total memory = 256 MB
[ 1.0000000] avail memory = 231 MB
[ 1.0000000] armfdt0 (root)
[ 1.0000000] simplebus0 at armfdt0: Xunlong Orange Pi Zero
[ 1.0000000] simplebus1 at simplebus0
[ 1.0000000] simplebus2 at simplebus0
[ 1.0000000] cpus0 at simplebus0
[ 1.0000000] simplebus3 at simplebus0
[ 1.0000000] cpu0 at cpus0: Cortex-A7 r0p5 (Cortex V7A core)
[ 1.0000000] cpu0: DC enabled IC enabled WB enabled LABT branch prediction enabled
[ 1.0000000] cpu0: L1 32KB/32B 2-way (512 set) VIPT Instruction cache
[ 1.0000000] cpu0: L1 32KB/64B 4-way (128 set) write-back-locking-C PIPT Data cache
[ 1.0000000] cpu0: L2 512KB/64B 8-way (1024 set) write-through PIPT Unified cache
[ 1.0000000] vfp0 at cpu0: NEON MPE (VFP 3.0+), rounding, NaN propagation, denormals
[ 1.0000000] cpufreqdt0 at cpu0
[ 1.0000000] cpu1 at cpus0: Cortex-A7 r0p5 (Cortex V7A core)
[ 1.0000000] cpu1: DC enabled IC enabled WB enabled LABT branch prediction enabled
[ 1.0000000] cpu1: L1 32KB/32B 2-way (512 set) VIPT Instruction cache
[ 1.0000000] cpu1: L1 32KB/64B 4-way (128 set) write-back-locking-C PIPT Data cache
[ 1.0000000] cpu1: L2 512KB/64B 8-way (1024 set) write-through PIPT Unified cache
[ 1.0000000] vfp1 at cpu1: NEON MPE (VFP 3.0+), rounding, NaN propagation, denormals
[ 1.0000000] cpufreqdt1 at cpu1
[ 1.0000000] cpu2 at cpus0: Cortex-A7 r0p5 (Cortex V7A core)
[ 1.0000000] cpu2: DC enabled IC enabled WB enabled LABT branch prediction enabled
[ 1.0000000] cpu2: L1 32KB/32B 2-way (512 set) VIPT Instruction cache
[ 1.0000000] cpu2: L1 32KB/64B 4-way (128 set) write-back-locking-C PIPT Data cache
[ 1.0000000] cpu2: L2 512KB/64B 8-way (1024 set) write-through PIPT Unified cache
[ 1.0000000] vfp2 at cpu2: NEON MPE (VFP 3.0+), rounding, NaN propagation, denormals
[ 1.0000000] cpufreqdt2 at cpu2
[ 1.0000000] cpu3 at cpus0: Cortex-A7 r0p5 (Cortex V7A core)
[ 1.0000000] cpu3: DC enabled IC enabled WB enabled LABT branch prediction enabled
[ 1.0000000] cpu3: L1 32KB/32B 2-way (512 set) VIPT Instruction cache
[ 1.0000000] cpu3: L1 32KB/64B 4-way (128 set) write-back-locking-C PIPT Data cache
[ 1.0000000] cpu3: L2 512KB/64B 8-way (1024 set) write-through PIPT Unified cache
[ 1.0000000] vfp3 at cpu3: NEON MPE (VFP 3.0+), rounding, NaN propagation, denormals
[ 1.0000000] cpufreqdt3 at cpu3
[ 1.0000000] gic0 at simplebus1: GIC
[ 1.0000000] armgic0 at gic0: Generic Interrupt Controller, 160 sources (150 valid)
[ 1.0000000] armgic0: 16 Priorities, 128 SPIs, 7 PPIs, 15 SGIs
[ 1.0000000] fclock0 at simplebus2: 24000000 Hz fixed clock (osc24M)
[ 1.0000000] fclock1 at simplebus2: 32768 Hz fixed clock (ext_osc32k)
[ 1.0000000] gtmr0 at simplebus0: Generic Timer
[ 1.0000000] gtmr0: interrupting on GIC irq 27
[ 1.0000000] armgtmr0 at gtmr0: Generic Timer (24000 kHz, virtual)
[ 1.0000040] sun8ih3ccu0 at simplebus1: H3 CCU
[ 1.0000040] sunxinmi0 at simplebus1: R_INTC, NMI IRQ 32
[ 1.0000040] sun8ih3rccu0 at simplebus1: H3 PRCM CCU
[ 1.0000040] sunxigpio0 at simplebus1: PIO
[ 1.0000040] gpio0 at sunxigpio0: 94 pins
[ 1.0000040] sunxigpio0: interrupting on GIC irq 43
[ 1.0000040] sunxigpio1 at simplebus1: PIO
[ 1.0000040] gpio1 at sunxigpio1: 12 pins
[ 1.0000040] sunxigpio1: interrupting on GIC irq 77
[ 1.0000040] sunxisramc0 at simplebus1: SRAM Controller
[ 1.0000040] sun6idma0 at simplebus1: DMA controller (12 channels)
[ 1.0000040] sun6idma0: interrupting on GIC irq 82
[ 1.0000040] sunxisid0 at simplebus1: Security ID EFUSE
[ 1.0000040] gregulator0 at simplebus0: vdd-cpux
[ 1.0000040] com0 at simplebus1: DesignWare APB UART, 64-byte FIFO
[ 1.0000040] com0: console
[ 1.0000040] com0: interrupting on GIC irq 32
[ 1.0000040] fregulator0 at simplebus0: vcc3v3
[ 1.0000040] fregulator1 at simplebus0: vcc-wifi
[ 1.0000040] fregulator2 at simplebus0: vcc3v0
[ 1.0000040] fregulator3 at simplebus0: vcc5v0
[ 1.0000040] sunxiusbphy0 at simplebus1: USB PHY
[ 1.0000040] /soc/clock@1000000 at simplebus1 not configured
[ 1.0000040] /soc/mixer@1100000 at simplebus1 not configured
[ 1.0000040] /soc/lcd-controller@1c0c000 at simplebus1 not configured
[ 1.0000040] mmcpwrseq0 at simplebus0: Simple MMC power sequence provider
[ 1.0000040] sunxirtc0 at simplebus1: RTC
[ 1.0000040] emac0 at simplebus1: EMAC
[ 1.0000040] emac0: Ethernet address 02:42:95:64:50:6e
[ 1.0000040] emac0: interrupting on GIC irq 114
[ 1.0000040] ukphy0 at emac0 phy 1: OUI 0x0088a0, model 0x0000, rev. 0
[ 1.0000040] ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
[ 1.0000040] h3codec0 at simplebus1: H3 Audio Codec (analog part)
[ 1.0000040] /soc/hdmi-phy@1ef0000 at simplebus1 not configured
[ 1.0000040] /soc/dram-controller@1c62000 at simplebus1 not configured
[ 1.0000040] /gpu-opp-table at simplebus0 not configured
[ 1.0000040] /opp_table0 at simplebus0 not configured
[ 1.0000040] sunxithermal0 at simplebus1: Thermal sensor controller
[ 1.0000040] sunxithermal0: interrupting on GIC irq 63
[ 1.0000040] h3_to_reg(sensor=0, val=90) -> 1051
[ 1.0000040] h3_to_reg(sensor=0, val=105) -> 927
[ 1.0000040] sunxi_thermal_init: calib[0] = 0, mask = fff / calib[1] = 0, mask = 0
[ 1.0000040] masked values: 0 / 0
[ 1.0000040] h3_to_temp(sensor=0, val=1051) -> 90
[ 1.0000040] h3_to_temp(sensor=0, val=1668) -> 15
[ 1.0000040] h3_to_temp(sensor=0, val=927) -> 105
[ 1.0000040] sunxithermal0: cpu: alarm 90C hyst 15C shut 105C
[ 1.0000040] sunximmc0 at simplebus1: SD/MMC controller
[ 1.0000040] sunximmc0: interrupting on GIC irq 92
[ 1.0000040] sunximmc1 at simplebus1: SD/MMC controller
[ 1.0000040] sunximmc1: interrupting on GIC irq 93
[ 1.0000040] /soc/mailbox@1c17000 at simplebus1 not configured
[ 1.0000040] motg0 at simplebus1: 'peripheral' mode not supported
[ 1.0000040] ehci0 at simplebus1: EHCI
[ 1.0000040] ehci0: interrupting on GIC irq 104
[ 1.0000040] ehci0: 1 companion controller, 1 port
[ 1.0000040] usb0 at ehci0: USB revision 2.0
[ 1.0000040] ohci0 at simplebus1: OHCI
[ 1.0000040] ohci0: interrupting on GIC irq 105
[ 1.0000040] ohci0: OHCI version 1.0
[ 1.0000040] usb1 at ohci0: USB revision 1.0
[ 1.0000040] ehci1 at simplebus1: EHCI
[ 1.0000040] ehci1: interrupting on GIC irq 106
[ 1.0000040] ehci1: 1 companion controller, 1 port
[ 1.0000040] usb2 at ehci1: USB revision 2.0
[ 1.0000040] ohci1 at simplebus1: OHCI
[ 1.0000040] ohci1: interrupting on GIC irq 107
[ 1.0000040] ohci1: OHCI version 1.0
[ 1.0000040] usb3 at ohci1: USB revision 1.0
[ 1.0000040] sunxiwdt0 at simplebus1: Watchdog
[ 1.0000040] sunxiwdt0: default watchdog period is 16 seconds
[ 1.0000040] /soc/deinterlace@1400000 at simplebus1 not configured
[ 1.0000040] sun8icrypto0 at simplebus1: Crypto Engine
[ 1.0000040] sun8icrypto0: interrupting on GIC irq 126
[ 1.0000040] sun8icrypto0: AES-128 self-test initiated
[ 1.0000040] sun8icrypto0: AES-128 self-test passed
[ 1.0000040] /soc/gpu@1c40000 at simplebus1 not configured
[ 1.0000040] psci0 at simplebus0: PSCI 0.1
[ 1.0000040] armpmu0 at simplebus0: Performance Monitor Unit
[ 1.0000040] gpioleds0 at simplebus0: orangepi:green:pwr orangepi:red:status
[ 1.0000040] /soc/timer@1c20c00 at simplebus1 not configured
[ 1.0000040] /soc/video-codec@1c0e000 at simplebus1 not configured
[ 1.0000040] WARNING: system needs entropy for security; see entropy(7)
[ 1.0000040] cpu_hatch(cpu1): cpu_hatch(cpu2): vectorscpu_hatch(cpu3): vbar=0x800aae40 vectors stacks vectors tlb vbar=0x800aae40 vbar=0x800aae40 stacks stacks md(0x8008ca3c) tlb tlb interrupts md(0x8008ca3c) done!
[ 1.0839309] interrupts md(0x8008ca3c) done!
[ 1.0939104] interrupts done!
[ 1.1039135] cpufreqdt0: rate: 1008.000 MHz, 1200000 uV
[ 1.1039135] sdmmc0 at sunximmc0
[ 1.1239142] armpmu0: interrupting on GIC irq 152
[ 1.1239142] armpmu0: interrupting on GIC irq 153
[ 1.1339189] armpmu0: interrupting on GIC irq 154
[ 1.1439140] armpmu0: interrupting on GIC irq 155
[ 1.1539127] uhub0 at usb2: NetBSD (0x0000) EHCI root hub (0x0000), class 9/0, rev 2.00/1.00, addr 1
[ 1.1639141] uhub1 at usb1: NetBSD (0x0000) OHCI root hub (0x0000), class 9/0, rev 1.00/1.00, addr 1
[ 1.1839235] uhub2 at usb0: NetBSD (0x0000) EHCI root hub (0x0000), class 9/0, rev 2.00/1.00, addr 1
[ 1.1939178] uhub3 at usb3: NetBSD (0x0000) OHCI root hub (0x0000), class 9/0, rev 1.00/1.00, addr 1
[ 1.2239218] sdmmc0: SD card status: 4-bit, C10
[ 1.2345030] ld0 at sdmmc0: <0x9f:0x5449:00000:0x00:0x00000010:0x127>
[ 1.2345030] ld0: 7624 MB, 3872 cyl, 64 head, 63 sec, 512 bytes/sect x 15613952 sectors
[ 1.2539202] ld0: 4-bit width, High-Speed/SDR25, 50.000 MHz
[ 1.3039205] sdmmc1 at sunximmc1
[ 1.5139291] sdmmc1: 4-bit width, 50.000 MHz
[ 1.5265967] (manufacturer 0x20, product 0x2281) at sdmmc1 function 1 not configured
[ 2.2546930] urtwn0 at uhub0 port 1
[ 2.2546930] urtwn0: Realtek (0x7392) 802.11n WLAN Adapter (0x7811), rev 2.00/2.00, addr 2
[ 2.3946994] urtwn0: MAC/BB RTL8188CUS, RF 6052 1T1R, address 08:be:ac:0b:13:1d
[ 2.4046999] urtwn0: 1 rx pipe, 2 tx pipes
[ 2.4147009] urtwn0: link state DOWN (was UNKNOWN)
[ 2.4247149] swwdog0: software watchdog initialized
[ 2.4347042] boot device: <unknown>
[ 2.4347042] root on emac0
[ 2.4447042] mountroot: trying ffs...
[ 2.4447042] mountroot: trying ext2fs...
[ 2.4447042] mountroot: trying nfs...
[ 2.4570331] nfs_boot: trying DHCP/BOOTP
[ 2.4570331] emac0: link state DOWN (was UNKNOWN)
[ 4.7247920] sunxithermal0: WARNING - current temperature exceeds safe limits
[ 4.7247920] h3_to_temp(sensor=0, val=1051) -> 90
[ 4.7374015] h3_to_temp(sensor=0, val=407) -> 168
[ 4.7374015] sunxi_thermal_task_alarm: alarm_val = 90, temp_val = 168
[ 5.4574426] emac0: link state UP (was DOWN)
[ 5.7474579] h3_to_temp(sensor=0, val=1051) -> 90
[ 5.7474579] h3_to_temp(sensor=0, val=407) -> 168
[ 5.7474579] sunxi_thermal_task_alarm: alarm_val = 90, temp_val = 168
[ 6.2374890] entropy: best effort
>How-To-Repeat:
s/a
>Fix:
n/a
Home |
Main Index |
Thread Index |
Old Index