From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 75EADC54EAA for ; Fri, 27 Jan 2023 17:16:27 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 52DE585718; Fri, 27 Jan 2023 18:16:25 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Z77B+Elh"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 35ED6856E9; Fri, 27 Jan 2023 18:16:21 +0100 (CET) Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A0A9285729 for ; Fri, 27 Jan 2023 18:15:52 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=thierry.reding@gmail.com Received: by mail-ej1-x630.google.com with SMTP id bk15so15491468ejb.9 for ; Fri, 27 Jan 2023 09:15:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=u1kQ3fxlSzyRdZASX9Bv0CTQM3Qyk4lNqoC/w3X81eg=; b=Z77B+Elh5V0wDutCixOsM+lr1vMXYArMj26QS8tsSdImrwFtyVy3a8OFpiq1GuNmEl OJ9LwG4gZF3nwKBRyJRPfbepNuuHu82+ml1P7WCHfmGJ4y6ZzX2fmZ5AjhvUA8iv+BpX esvj+GfPLrjo8afEjvxDfYr4UTtG9Qee5UKY153yEZGDC7YdWFHcjGRLATE31Yn2AQZy BBaWhcfEEpYvEQZ58m/oiXlHh3d9cEk5x+LvtxurvAnZM2SVedUrFfaJAxh0PyWUP04L KfsSr4htmAOKDYmqzF0CvG0+bcjEMHnIOGnz98JR/kcqnEmj6Q5hOn5q2V1VET65LQxS NOOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=u1kQ3fxlSzyRdZASX9Bv0CTQM3Qyk4lNqoC/w3X81eg=; b=2dwZnXUqRaD9FT/cXPypbpV2gu8IoH80EjIaWh0bTXvgYF0FociBd3vGwZwb4gh5Lq NQ9A/V0lpttvT/j7/8OJ8vzzaeWayTu4cqH4VcagZiD8ElGTtAXLpyH2tESrUONU7SGN vaaUOSK1odVx3NrQjwyPaiYmjEqh7wQb7/v8pI7iFxwhCjnmPFkD6uVXvFvPN4eKbSZ3 wa/JQI5t9esJJJz4TTD2QcY73zkzaRS3HzASEDHQDrpm2KfDtdZCaHtUWy3+RFxvziWw ZfQ8GWr/DOqrakWSoLrXqfqAIg6v0tnJ+AGh7n98c5g7NDdpZjugRf9vopZ4kJJVr3rC eFUw== X-Gm-Message-State: AO0yUKVH4MWAIAiLgaepuThdeLtwduihPhm04UtIlXS+qZHy8e9sWd0Q rxru6qyGSMZKkUoN5ZsgRbw= X-Google-Smtp-Source: AK7set+/4RDstGL3Ju+4fWFGlBEVsdDVTO293Q6y0Q6TlKDY6BUvSwNCgB56TmdseXuYNWysAKM2xg== X-Received: by 2002:a17:907:ea3:b0:87c:6aa5:ce24 with SMTP id ho35-20020a1709070ea300b0087c6aa5ce24mr2242701ejc.71.1674839732748; Fri, 27 Jan 2023 09:15:32 -0800 (PST) Received: from orome (p200300e41f201d00f22f74fffe1f3a53.dip0.t-ipconnect.de. [2003:e4:1f20:1d00:f22f:74ff:fe1f:3a53]) by smtp.gmail.com with ESMTPSA id y14-20020a17090668ce00b0084d3bf4498csm2590524ejr.140.2023.01.27.09.15.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Jan 2023 09:15:31 -0800 (PST) Date: Fri, 27 Jan 2023 18:15:30 +0100 From: Thierry Reding To: Svyatoslav Ryhel Cc: Rayagonda Kokatanur , Tom Warren , Marek Vasut , Maxim Schwalm , Dmitry Osipenko , Jonas =?utf-8?B?U2Nod8O2YmVs?= , Agneli , Heinrich Schuchardt , Michal Simek , Stefan Roese , Eugen Hristev , Michael Walle , Simon Glass , Jim Liu , William Zhang , Rick Chen , Stefan Herbrechtsmeier , Andre Przywara , Jaehoon Chung , u-boot@lists.denx.de Subject: Re: [PATCH v7 0/3] Timer support for ARM Tegra Message-ID: References: <20230127071312.13844-1-clamor95@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="pGp4iM1xfivc7eir" Content-Disposition: inline In-Reply-To: <20230127071312.13844-1-clamor95@gmail.com> User-Agent: Mutt/2.2.9 (2022-11-12) X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean --pGp4iM1xfivc7eir Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 27, 2023 at 09:13:09AM +0200, Svyatoslav Ryhel wrote: > - ARM: tegra: remap clock_osc_freq for all Tegra family > Enum clock_osc_freq was designed to use only with T20. > This patch remaps it to use additional frequencies, added in > T30+ SoC while maintaining backwards compatibility with T20. >=20 > - drivers: timer: add timer driver for ARMv7 based Tegra devices > Add timer support for T20/T30/T114/T124 and T210 based devices. > Driver is based on DM, has device tree support and can be > used on SPL and early boot stage. >=20 > Arm64 Tegra (apart T210) according to comment in tegra-common.h use > architected timer. >=20 > - ARM: tegra: include timer as default option > Enable TIMER as default option for all Tegra devices and > enable TEGRA_TIMER for TEGRA_ARMV7_COMMON and TEGRA210. > Additionally enable SPL_TIMER if build as SPL part and > drop deprecated configs from common header. >=20 > P. S. I have no arm64 Tegra and according to comment in=20 > tegra-common.h > Use the Tegra US timer on ARMv7, but the architected timer on ARMv8. >=20 > --- > Changeog from V6 > - use clk_m as timer calibration clock (this should properly fix T210) > - enable timer for T210 >=20 > Changed from v5: > - added paz00 tester >=20 > Changed from v4: > - added comments >=20 > Changed from v3: > - removed BOOTSTAGE ifdefs > - use early timer on boot stage unconditionally > --- > Svyatoslav Ryhel (3): > ARM: tegra: remap clock_osc_freq for all Tegra family > drivers: timer: add driver for ARMv7 based Tegra devices and T210 > ARM: tegra: include timer as default option >=20 > arch/arm/Kconfig | 1 + > arch/arm/include/asm/arch-tegra/clock.h | 9 +- > arch/arm/mach-tegra/Kconfig | 3 + > arch/arm/mach-tegra/clock.c | 17 +++- > arch/arm/mach-tegra/cpu.c | 70 ++++++++++--- > arch/arm/mach-tegra/tegra114/clock.c | 13 +-- > arch/arm/mach-tegra/tegra124/clock.c | 13 +-- > arch/arm/mach-tegra/tegra20/clock.c | 4 +- > arch/arm/mach-tegra/tegra210/clock.c | 22 +--- > arch/arm/mach-tegra/tegra30/clock.c | 10 +- > drivers/timer/Kconfig | 8 ++ > drivers/timer/Makefile | 1 + > drivers/timer/tegra-timer.c | 130 ++++++++++++++++++++++++ > drivers/usb/host/ehci-tegra.c | 46 +++++++-- > include/configs/tegra-common.h | 6 -- > 15 files changed, 274 insertions(+), 79 deletions(-) > create mode 100644 drivers/timer/tegra-timer.c Ugh... turns out I had completely messed up the testing on Tegra186 and it wasn't working at all. The problem is that the selection of the TIMER symbol for all of Tegra causes the driver model to be used, but there is no DM driver for the architected timer that's used on Tegra186. The quickest fix would be to do this: --- >8 --- diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig index b50eec5b8c9b..05c8ce0e08dd 100644 --- a/arch/arm/mach-tegra/Kconfig +++ b/arch/arm/mach-tegra/Kconfig @@ -56,7 +56,6 @@ config TEGRA_COMMON select MISC select OF_CONTROL select SPI - select TIMER imply CMD_DM imply CRC32_VERIFY =20 @@ -83,6 +82,7 @@ config TEGRA_ARMV7_COMMON select TEGRA_PINCTRL select TEGRA_PMC select TEGRA_TIMER + select TIMER =20 config TEGRA_ARMV8_COMMON bool "Tegra 64-bit common options" @@ -137,6 +137,7 @@ config TEGRA210 select TEGRA_PMC select TEGRA_PMC_SECURE select TEGRA_TIMER + select TIMER =20 config TEGRA186 bool "Tegra186 family" --- >8 --- So basically make TIMER selected on everything except Tegra186, so that on Tegra186 things are basically unmodified. Thierry --pGp4iM1xfivc7eir Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAmPUBrIACgkQ3SOs138+ s6F1dhAAwU6O1KUcgIiso60yLECMppjkpCY7C+B2Oh4kht+h4tEc2n4NG3Y/K47l jonlrqgUqlPnGqm32zIEMecBj4LXZ2JH/S/3uZBEIpvY+2Ood5qqfuq4LiwIdjB7 FQFp7cFZTI74aoW2T2dOcPucTaUwws1eRAb7kflM/EOH2xkckGoK7FlXtYnSGDK8 8kw6FyanSfxiHZi7PwnIp6m4YTz7CmLb0LvkR5WLS16f1poNmjAVReDq+Zdqy0mC t77pVU+yz8d/qihrjw8GgE2OnO5UvB2hsJtd6Du9I3Mn8xWV3Cx/nWIYtQAAR26R 8O0X/5cAnuFxS2UBALyIK5PW47tdLRvUdy6UZzZYo1g8qnOZioB2u8gn8vgKQjJp 9hdnJkESjDvH0vAL0oSUWKu9jP6eHL9oRhItXvWnx8UAlWsLNnD31+VhQmhGept+ S6eiyRjvVtXf4+Rk2XOETRU3OCaj8LBKyZElDS0ToSR/KTgmd3F8efOtq/9p1QoK d23i5W9R0/I508jilROBRDSbfwKE71CQEKwGUKeIt9VhV5Tki/UokcJ7HB4v+w56 tuv41oMILI0t+X6HsUx/wPlEGcOyHCJ9I/FJu/MwButipT+1P5xfJbkNGwgkvMwK CDAR7UelqIuKPNkCtV4yrmoqzyNjE/qHR2pcdCgVIB+/LbD6Pzw= =uTzB -----END PGP SIGNATURE----- --pGp4iM1xfivc7eir--