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 9426CC004D4 for ; Wed, 18 Jan 2023 08:44:26 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5E6D8855F2; Wed, 18 Jan 2023 09:44:24 +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="C/Ciqp97"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B591A855C7; Wed, 18 Jan 2023 09:44:22 +0100 (CET) Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) (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 4384A84CBD for ; Wed, 18 Jan 2023 09:44:19 +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=clamor95@gmail.com Received: by mail-wr1-x435.google.com with SMTP id e3so23916756wru.13 for ; Wed, 18 Jan 2023 00:44:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=RndD3cripbXVttS6gW2pmKbEDiwb7HcOCZJqbzDGLlM=; b=C/Ciqp97Il1d1eLfHSvx4UHDJwg4fS9LorjiCxKy/XpySoKxXfueP+0HvD+lRPcNV1 K5idVmX32PAobq0Qu3h+bZnu4bTLIDQtxgkmgv5WVAIMAFP0ifyD2E+IFAMyyV2NyE5I 6kCb0/OmlsMVo9WQqFCizS9QI1sf8+VVviGwbWP29RvSqzeH5f7gLq5C2ZpSoMsusNtI KQN8m5K0f/ACOKxGbZjVXMnP9fJlTK2CdXFs+FBdSh77Lv2qbZW8fLsKjJlcYEiIdzwB UoNUjlmbAz8t2NIp0Xcu8Ei1SJjWZ3ZFK/LRjD/NDJljdADnJbYyilmE8OTZ/4oVKqy+ +9Rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=RndD3cripbXVttS6gW2pmKbEDiwb7HcOCZJqbzDGLlM=; b=dOCGYNbHyYP6gYdltsEf5jEcVQZV04nr9dITWPFna9AL+/3s62jRXYsxz/iv0tHPu9 XhN5jBJnFYorqA7Bp0iSiCg5KP1vm7U0JEMBIwAUD/ZafRX5jzH18J93uDuZ4A1Bj6+o Xxe3DvWW1NSUG3/r0OGgO4oW79JZLHwzMRqiN2I2LRDX2DomO623E+zLXuv7sYhwzoxR IEFtWtuHPRtii0YNKWycG/K0KeB3wStVsgFek8+OVOJmd27eyrQr7he4YJ0POGrCZQ5X tuop04MsyND8456GSbLRISVuB/dV5GEmIyUa83H43PH6whKcYY/sVV9Z7HY9zT4tyUwp DfGA== X-Gm-Message-State: AFqh2kosJtqWwT6PdceYEdGLivD138BeILzjVKKVJYa0rUQjCQcc5Vpn +PXJWor2JD94HIfM6uYuFpA= X-Google-Smtp-Source: AMrXdXt/H/I7B6uL72e4cnvMs86cZWGejxXRujyEyx6X1DsBS1mWJvgfl/YgZ9Nx8o+IGwSDUWWukw== X-Received: by 2002:a5d:5256:0:b0:2be:3503:2dce with SMTP id k22-20020a5d5256000000b002be35032dcemr312622wrc.35.1674031458730; Wed, 18 Jan 2023 00:44:18 -0800 (PST) Received: from xeon.. ([188.163.112.54]) by smtp.gmail.com with ESMTPSA id t18-20020adff612000000b002be2f18938csm967315wrp.41.2023.01.18.00.44.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Jan 2023 00:44:17 -0800 (PST) From: Svyatoslav Ryhel To: Rayagonda Kokatanur , Tom Warren , Marek Vasut , Svyatoslav Ryhel , Maxim Schwalm , Heinrich Schuchardt , Michal Simek , Stefan Roese , Eugen Hristev , Michael Walle , Simon Glass , Jim Liu , William Zhang , Rick Chen , Stefan Herbrechtsmeier , Andre Przywara , Jaehoon Chung Cc: u-boot@lists.denx.de Subject: [PATCH v4 0/3] Timer support for ARM Tegra Date: Wed, 18 Jan 2023 10:43:57 +0200 Message-Id: <20230118084400.15859-1-clamor95@gmail.com> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 - 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. - drivers: timer: add timer driver for ARMv7 based Tegra devices Add timer support for T20/T30/T114 and T124 based devices. Driver is based on DM, has device tree support and can be used on SPL and early boot stage. - ARM: tegra: include timer as default option Enable TIMER as default option for add Tegra devices and enable TEGRA_TIMER for TEGRA_ARMV7_COMMON. Additionally enable SPL_TIMER if build as SPL part and drop deprecated configs from common header. P. S. I have no arm64 Tegra and according to comment in tegra-common.h Use the Tegra US timer on ARMv7, but the architected timer on ARMv8. Svyatoslav Ryhel (3): ARM: tegra: remap clock_osc_freq for all Tegra family drivers: timer: add timer driver for ARMv7 based Tegra devices ARM: tegra: include timer as default option arch/arm/Kconfig | 1 + arch/arm/include/asm/arch-tegra/clock.h | 9 +- arch/arm/mach-tegra/Kconfig | 2 + 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 | 113 ++++++++++++++++++++++++ drivers/usb/host/ehci-tegra.c | 46 ++++++++-- include/configs/tegra-common.h | 6 -- 15 files changed, 256 insertions(+), 79 deletions(-) create mode 100644 drivers/timer/tegra-timer.c -- 2.37.2