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 1F548C38142 for ; Sat, 21 Jan 2023 20:09:46 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 243378568C; Sat, 21 Jan 2023 21:09:44 +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="FsRYJ2Cf"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6258E85677; Sat, 21 Jan 2023 21:09:42 +0100 (CET) Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) (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 8A87585203 for ; Sat, 21 Jan 2023 21:09:39 +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-x436.google.com with SMTP id y1so3074717wru.2 for ; Sat, 21 Jan 2023 12:09:39 -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=3xBwpTV9jX5guQncv1LO6PogrQV1aU78MHs1GKQdNl4=; b=FsRYJ2Cf4VY9PVyZ+7CWBSDMVaIB8b35rP8RsTEu+WYKGt3FAJIeCUKvg08XI9s5oH AmCC70p64/OZMAsLN9Jjbww47vq2FZeKbd6x0+vwV50Xs+CVS30X3aaSAc5JI2QxxQFV GZj0FEjYX28Inz4j7geKyWQB3L1BmaqaCOBeX1gBQ0OQugb3t9GM5ReFqowSTPzBR7Y7 hJLxrSeU/2HuzOycG1NI9xoIrx/O362MqcYG4J5jPUjMGoXAQ9/VZ5nmfM4RfULwj5sN KmsWZP/FkENJePre/wl1HfMkQ2oo+TPW/mnUlZIZJ+qAhMOTGy+I9SJvZI3qLu3PXArT x4eQ== 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=3xBwpTV9jX5guQncv1LO6PogrQV1aU78MHs1GKQdNl4=; b=OLNMrMkBjQ0YRNgH1s84jOL60LwT0QejcCnixjgguZlLsJGLzAASeMg9TXNtEcUc9X iThLr3OrzLtRQGZIxZbWK6jWQryym4NO6zTr7fPnrdGGeq3Yq0qEbe8OHAulEo53o3bM kSuWBvszBYbKkyS/Ds+fRt8pXiM+BPwdvpvoYaQ9tmNewP8wjtkslfMy4OxLIAK7IYrf +VwnH51oko51Jm5r2icEqwC8iLQVF14dtlbQAl/IndxD3QRBCG8wXFXEuuBVUc+h3/Yv 66aOo908AI8sY9UNRxZdFLP1HqwZ9HmjHRCjy6givdntsV/LLiOZxku76yiAOC/0rqbJ yWjg== X-Gm-Message-State: AFqh2kqF8Bk13flo6WQTH10MLGI0+7DSNo3SZ6SLzvz9WNbE7/Gjvmmy /udJW/1ZeivqejBG00T4FB8= X-Google-Smtp-Source: AMrXdXvjxVAka9SmkKf4pMXw4iGX8zFA5wWW1CDMpM8niVaHyJoc4mtKn+C2IVqo5NYfVBG7gVrPXA== X-Received: by 2002:adf:f64f:0:b0:2be:435:cf7b with SMTP id x15-20020adff64f000000b002be0435cf7bmr15010606wrp.8.1674331778723; Sat, 21 Jan 2023 12:09:38 -0800 (PST) Received: from xeon.. ([188.163.112.54]) by smtp.gmail.com with ESMTPSA id o2-20020a5d58c2000000b002bdbead763csm28009986wrf.95.2023.01.21.12.09.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Jan 2023 12:09:38 -0800 (PST) From: Svyatoslav Ryhel To: Rayagonda Kokatanur , Tom Warren , Thierry Reding , Marek Vasut , Svyatoslav Ryhel , Maxim Schwalm , Dmitry Osipenko , 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 v5 0/3] Timer support for ARM Tegra Date: Sat, 21 Jan 2023 22:09:08 +0200 Message-Id: <20230121200911.4182-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 | 126 ++++++++++++++++++++++++ drivers/usb/host/ehci-tegra.c | 46 +++++++-- include/configs/tegra-common.h | 6 -- 15 files changed, 269 insertions(+), 79 deletions(-) create mode 100644 drivers/timer/tegra-timer.c -- 2.37.2