NetBSD Problem Report #60910
From www@netbsd.org Tue Oct 20 21:09:05 2026
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits)
client-signature RSA-PSS (2048 bits))
(Client CN "mail.netbsd.org", Issuer "YR1" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id D68721A923B
for <gnats-bugs@gnats.NetBSD.org>; Tue, 20 Oct 2026 21:09:05 +0000 (UTC)
Message-Id: <20261020210904.AE94C1A923C@mollari.NetBSD.org>
Date: Tue, 20 Oct 2026 21:09:04 +0000 (UTC)
From: trythepostoffice@gmail.com
Reply-To: trythepostoffice@gmail.com
To: gnats-bugs@NetBSD.org
Subject: am335x: omaptimer0 fails to attach, wrong timer1 clkctrl
X-Send-Pr-Version: www-1.0
X-From4GNATS: "trythepostoffice@gmail.com via gnats" <gnats-admin@NetBSD.org>
>Number: 60910
>Category: port-arm
>Synopsis: am335x: omaptimer0 fails to attach, wrong timer1 clkctrl
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: yurix
>State: pending-pullups
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Oct 20 21:10:00 +0000 2026
>Closed-Date:
>Last-Modified: Sat Oct 24 21:32:44 +0000 2026
>Originator: Elias Howell
>Release: NetBSD 11.0, NetBSD-current 11.99.9 (20261019)
>Organization:
>Environment:
NetBSD armv7 11.0 NetBSD 11.0 (GENERIC) #0: Thu Jul 30 15:23:12 UTC 2026 mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/evbarm/compile/GENERIC evbarm
NetBSD armv7 11.99.9 NetBSD 11.99.9 (GENERIC) #0: Mon Oct 19 09:38:27 UTC 2026 mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/evbarm/compile/GENERIC evbarm
>Description:
On the SG-1000 both 11.0 and -current print
omaptimer0 at tisysc18: couldn't enable module
(tisysc18 with am335x-boneblack.dtb, the number depends on the tree)
timer1 is enabled in the shared am33xx-l4.dtsi so it should be the
same on any AM335x board using the in-tree device trees.
am3_prcm.c has
AM3_PRCM_HWMOD_WKUP("timer1", 0x10, "FIXED_32K"),
0x10 is CM_WKUP_TIMER0_CLKCTRL (SPRUH73Q 8.1.12.2.5). The dts points
timer1 (the 1ms timer at 0x44e31000) at AM3_L4_WKUP_TIMER1_CLKCTRL,
which is 0xc4 in dt-bindings/clock/am3.h and 0xc4 is
CM_WKUP_TIMER1_CLKCTRL in the TRM (8.1.12.2.50). Nothing in the table
is at 0xc4 so ti_prcm_get_hwmod() returns NULL and the attach fails.
Rev 1.11 renamed timer0 to timer1 and kept 0x10. Since 1.13 the
lookup is by clkctrl offset so now it shows. The other WKUP entries
are right.
ti_omaptimer.c only uses units 1 and 2 so nothing ran on timer1
before or after this. It just gets the attach working and the error
gone, timekeeping doesn't change.
Not changed by the patch. The entry gives timer1 parent FIXED_32K but
CLKSEL_TIMER1MS_CLK resets to 0 which is CLK_M_OSC (TRM 8.1.12.3.9).
The rate isn't used for unit 0 so it doesn't matter right now.
>How-To-Repeat:
Boot any AM335x board and look for omaptimer0 in dmesg
>Fix:
Tested on the SG-1000, -current b91976112 plus this and my fdt_i2c
patch. With am335x-boneblack.dtb (only the Ethernet bits changed)
it now says
omaptimer0 at tisysc18: Timer
Same with the SG-1000's own dts, there it's tisysc15.
--- a/sys/arch/arm/ti/am3_prcm.c
+++ b/sys/arch/arm/ti/am3_prcm.c
@@ -177,7 +177,7 @@ static struct ti_prcm_clk am3_prcm_clks[] = {
AM3_PRCM_HWMOD_PER("gpio3", 0xb0, "PERIPH_CLK"),
AM3_PRCM_HWMOD_PER("gpio4", 0xb4, "PERIPH_CLK"),
- AM3_PRCM_HWMOD_WKUP("timer1", 0x10, "FIXED_32K"),
+ AM3_PRCM_HWMOD_WKUP("timer1", 0xc4, "FIXED_32K"),
AM3_PRCM_HWMOD_PER("timer2", 0x80, "FIXED_24MHZ"),
AM3_PRCM_HWMOD_PER("timer3", 0x84, "FIXED_24MHZ"),
AM3_PRCM_HWMOD_PER("timer4", 0x88, "FIXED_24MHZ"),
>Release-Note:
>Audit-Trail:
From: "Yuri Honegger Yurix" <yurix@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/60910 CVS commit: src/sys/arch/arm/ti
Date: Sat, 24 Oct 2026 12:40:14 +0000
Module Name: src
Committed By: yurix
Date: Sat Oct 24 12:40:14 UTC 2026
Modified Files:
src/sys/arch/arm/ti: am3_prcm.c
Log Message:
am335x: fix timer clock offset
Closes PR 60910
Fix by Elias Howell.
To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arm/ti/am3_prcm.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Responsible-Changed-From-To: port-arm-maintainer->yurix
Responsible-Changed-By: yurix@NetBSD.org
Responsible-Changed-When: Sat, 24 Oct 2026 12:47:34 +0000
Responsible-Changed-Why:
Fix merged by yurix
State-Changed-From-To: open->closed
State-Changed-By: yurix@NetBSD.org
State-Changed-When: Sat, 24 Oct 2026 12:47:34 +0000
State-Changed-Why:
Fix validated and merged by yurix
State-Changed-From-To: closed->pending-pullups
State-Changed-By: yurix@NetBSD.org
State-Changed-When: Sat, 24 Oct 2026 21:32:44 +0000
State-Changed-Why:
Riastradh encouraged me to file a pullup for this
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.