From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D089F433AD for ; Sun, 29 Mar 2026 13:03:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774789405; cv=none; b=g9qyj2lK3KjjSOFLc1QLYG4uMzdBB2vnSITaMP/UnpmBEtgmfQqB9VnxO32Psi1JSdLxjNTKhDOLruu6ttNv3HIQpuhyvwizcV7tdBzS4NKZ9Uail7D2ahLEhBf5ZlhzqW+frkmMofRteMusUBKMD7sotbh2z4xdfL+FFUj8nBw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774789405; c=relaxed/simple; bh=U/R2pAPnxIsAzZzsFQMZKmzU5HLTHhfGOlT1wA7/tYM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=nCNDNGmpD/lS+HZ/p9FpXtpY/pgwm2s/2KbEXbJsZpVUo6LGZXEp37RTJVdI8HUdHaqD2lSYwgqBEFpnqGtuntJULZl7+8IoGkw6zYusyAwXs5scL1V/1nnWqqVS9XF38SFlG8GSb+9LDpyykJDBv3DD4uSx+QEUWbJmxeKPHLg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=IJWEF3+a; arc=none smtp.client-ip=209.85.128.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IJWEF3+a" Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-486fe655187so45686855e9.2 for ; Sun, 29 Mar 2026 06:03:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1774789402; x=1775394202; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=viDNw9XnGj7IgNiXG+l3zPbwcxnl/gxtXwY665wWLdc=; b=IJWEF3+atgar6OEs3VzeBeKvalVB+7L5EivTNUE3KS18HtOoeze+hEwBsVjq+LwmdX b6Vte4+/PtjSZtF893ze9mw8mu8Co+Rbv5NBn2HA8nxGM9lo+hbgyb3fuRAXVn60CiT6 /WpaZTkQU/LQO292l3qhFCA1/ffbkf5SdwsMCyw4BW/fROM/i/As7XZ/yjfK4mwlp5sc +8Cuu1wMJTG9tT8JISOna+EFGKXOU6M3O0wGAfbB3ECl1lE8GkKqGVsFhg4lGNRqRa+c zGcLWQhUGXHxz9KQ1+YGp99faZ6rN+xplnKu5Ul05r2NkMsCXkdcDBRxdf1fD8HD1Qd0 X8/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774789402; x=1775394202; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=viDNw9XnGj7IgNiXG+l3zPbwcxnl/gxtXwY665wWLdc=; b=L2NCrXt0r3pMccGHxDyoswkJxaFpB0BG+kLzwtZw/e2hSHsWiW21GLklA8Kojbvgtf l2FtTWmxFeOYo/N+IiUeKO+kutwkEsvznuIjPlJ3BAm98rEV8k4PLf9Mt+eLJpUqECz0 fhxUNLtC3sApWj845uOaMJLDs54veTwJUDJ3isF3crh5VIH6bJ2MR0XnAGAHe8+z0vSW iC4X0zDh/AjGZvHzwLQwtOS83sCLrssj9LpvQRYjRtogBJsq/HEN2cn3CXQ0WGqgN1um BCwq6SdUf4fu2MY1S4LzcSstEhA4xAbbPRoBRiU7m4jIgY7ChyrbXlIWtI2zprLyLWOM T75A== X-Forwarded-Encrypted: i=1; AJvYcCU3+qIOxa1yHpsmQOZUMRhOwzpR7o7rJ5IqWb+Fv/RAkGEu/bfjCXXG/NEB9t3ktSNDFxR86rkonaG5lpA=@vger.kernel.org X-Gm-Message-State: AOJu0YylTjzjISLaK/50uMakJXB5T5JSdJma7oR8LMR1/ftsUa0b7D2a IyR/oBzDsOvpqNJSi5A6Rn4N3sQUSYIP554inARmL6ES0fgXjrN8ztb4 X-Gm-Gg: ATEYQzxbI3PMhTHQpASOAt2Rp7E2qeMc4Cdyec7jgOXHKWrSiwMePoDEHYxNJo5Hq3Y FeUYddFF7R8qbR6l9Uq6nVpo3mIJy5hvE/rOhhyXoJbCo2qcwEH3CV3VAUFjWCGoZlTYysn7JH3 vPVG5p/9psCxHTQTTJtV1JnkGSRazt8WbUYON8Qnv24eIhXO0US3PW8yZhcYc5A31C8hvbKeuvX Ah+9qHxwjTcFUrYSEmmUiJ7ugaagdnzfo/I6uRK+5XN1m+4BE5Um/jxllz0EWqxCaiMp2Sp4VEc 0Q/RoE8BNr6no9Rk4csNL/CNmqmNalRTr6sf+E2w4F+XRCDUuB3G9TlF3025HqEe1L16UHz/eTG v30ZwsVogt/NuQ5cVkHMqmWeFhJMMCGsVkdp6Exziy1ia4vTxF/Rv6As0as/CSHSM80oIw0oiMY r9lPn1+cGyZJJGjwkkDoiRZhMCPb+lRQAl/tQf10L3bZqQ7cZhE57LTtTyiWWzjIMgVeQgtqcEj ZnIvBkmEXBAiTUI8A== X-Received: by 2002:a05:600c:4e15:b0:485:2ce2:4c87 with SMTP id 5b1f17b1804b1-48727d45881mr151705535e9.4.1774789401886; Sun, 29 Mar 2026 06:03:21 -0700 (PDT) Received: from jernej-laptop.localnet (118.red-213-98-130.staticip.rima-tde.net. [213.98.130.118]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48722d23679sm397412475e9.9.2026.03.29.06.03.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Mar 2026 06:03:21 -0700 (PDT) From: Jernej =?UTF-8?B?xaBrcmFiZWM=?= To: Michal Piekos Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Samuel Holland , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH] arm64: dts: allwinner: enable h616 timer support Date: Sun, 29 Mar 2026 15:03:17 +0200 Message-ID: <4721811.LvFx2qVVIh@jernej-laptop> In-Reply-To: References: <20260329-h616-timer-v1-1-5966d0420a66@mmpsystems.pl> <5977334.DvuYhMxLoT@jernej-laptop> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Dne nedelja, 29. marec 2026 ob 14:07:19 Srednjeevropski poletni =C4=8Das je= Michal Piekos napisal(a): > On Sun, Mar 29, 2026 at 01:53:45PM +0200, Jernej =C5=A0krabec wrote: > > Dne nedelja, 29. marec 2026 ob 13:43:04 Srednjeevropski poletni =C4=8Da= s je Michal Piekos napisal(a): > > > Add support for timer by reusing existing sun4i timer driver. > > >=20 > > > H616 timer is compatible with earlier sunxi timer variants and provid= es > > > both clocksource and clockevent functionality. It runs from 24 MHz > > > oscillator. It can serve as broadcast clockevent for wake up from idle > > > states. > > >=20 > > > Tested on Orange Pi Zero 3: > > > - timer is registered as clocksource: > > > - switching clocksource at runtime works > > > - timer operates as a broadcast clockevent device > > > - no regression observed compared to arch_sys_counter > > >=20 > > > Signed-off-by: Michal Piekos > > > --- > > > Test results: > > >=20 > > > Clocksource switching: > > > cat /sys/devices/system/clocksource/clocksource0/available_clocksou= rce > > > arch_sys_counter timer > > > echo timer > /sys/devices/system/clocksource/clocksource0/current_c= locksource > > > [ 5031.105997] clocksource: Switched to clocksource timer > > >=20 > > > Clockevent configuration: > > > cat /proc/timer_list > > > ... > > > Tick Device: mode: 1 > > > Broadcast device > > > Clock Event Device: sun4i_tick > > > max_delta_ns: 178956969070 > > > min_delta_ns: 1000 > > > mult: 51539608 > > > shift: 31 > > > mode: 1 > > > next_event: 9223372036854775807 nsecs > > > set_next_event: sun4i_clkevt_next_event > > > shutdown: sun4i_clkevt_shutdown > > > periodic: sun4i_clkevt_set_periodic > > > oneshot: sun4i_clkevt_set_oneshot > > > resume: sun4i_clkevt_shutdown > > > event_handler: tick_handle_oneshot_broadcast > > > ... > > >=20 > > > Cyclictest measurements: > > > Dominated by system scheduler latency and do not reflect clocksource > > > precision. > > > --- > > > arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi | 9 +++++++++ > > > 1 file changed, 9 insertions(+) > > >=20 > > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi b/arch/ar= m64/boot/dts/allwinner/sun50i-h616.dtsi > > > index 8d1110c14bad..bf054869e78b 100644 > > > --- a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi > > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi > > > @@ -228,6 +228,15 @@ cpu_speed_grade: cpu-speed-grade@0 { > > > }; > > > }; > > > =20 > > > + timer0: timer@3009000 { > > > + compatible =3D "allwinner,sun50i-h616-timer", > > > + "allwinner,sun8i-a23-timer"; > >=20 > > You have to add above combo to DT bindings. > >=20 > > Best regards, > > Jernej >=20 > Not sure I understand your comment correctly but binding for h616 is alre= ady > there: >=20 > Documentation/devicetree/bindings/timer/allwinner,sun4i-a10-timer.yaml:21= =2D27 > - items: > - enum: > - allwinner,sun20i-d1-timer > - allwinner,sun50i-a64-timer > - allwinner,sun50i-h6-timer > - allwinner,sun50i-h616-timer > - const: allwinner,sun8i-a23-timer >=20 > BR > Michal Sorry, sometimes tooling fails me. All good. Reviewed-by: Jernej Skrabec Best regards, Jernej >=20 > >=20 > > > + reg =3D <0x03009000 0xa0>; > > > + interrupts =3D , > > > + ; > > > + clocks =3D <&osc24M>; > > > + }; > > > + > > > watchdog: watchdog@30090a0 { > > > compatible =3D "allwinner,sun50i-h616-wdt", > > > "allwinner,sun6i-a31-wdt"; > > >=20 > > > --- > > > base-commit: be762d8b6dd7efacb61937d20f8475db8f207655 > > > change-id: 20260328-h616-timer-046e6ac3549e > > >=20 > > > Best regards, > > >=20 > >=20 > >=20 > >=20 > >=20 >=20