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 A2408C38142 for ; Wed, 1 Feb 2023 08:53:46 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A27C285C12; Wed, 1 Feb 2023 09:53:42 +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="CKVD3lvJ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 87CA285C46; Wed, 1 Feb 2023 09:53:39 +0100 (CET) Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) (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 98C7E85C3B for ; Wed, 1 Feb 2023 09:53:29 +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-x434.google.com with SMTP id q5so16603348wrv.0 for ; Wed, 01 Feb 2023 00:53:29 -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=A6rbYW6fPOpXy1nB/EC7S3DtcwKaqEoXOR55vvgWtUs=; b=CKVD3lvJ80/kdv/qM2xiArSSi08yVy3wbApw2NfqpAZULBSWak+ChroXxbHhkIaP0o iVy/UfELsZVO1q3E6ceEVtMCZsGE/Ji4cX0R6XqUg7x6Pj0yeq9jdiGgivfNtJZ+vts8 wqohzCtGiDBiGXIxYCkcXzLDx7FrSRicM+RG+9VTO/6C1kgSL0VTjQkWMhKFnUze/KV+ IilCzEsFSYXFGRAtT9Pyv+n3vkUmXgur8appO4NcEp6rrojhkoOU2Oo9mHNAZx6OvMs5 FJmvQ6aDrFk/f5YNZnlk0Qf7hafMgFxOKvAYRVBoVyockR6bBU3vDhyo0WF3abXiDZ7W J8qw== 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=A6rbYW6fPOpXy1nB/EC7S3DtcwKaqEoXOR55vvgWtUs=; b=F8BpcZ6vp/Sn7/6/Fo32cybrAcPoXOuj2dL864CPe/EQbh7HCvTo+z7aun878lTXqx /kyCj3s1uNe8P6+Nq+JWEEqJejfAGSHk5q/DvEz4WN1tLwSHKOwbGHU2sa9VHijtQWXs 6ygwz95a3qJa8cIsqo3gU6RGCYTsdq1ukIMURU7oBjtIDgjXEABfShchXCsagpJzKVF+ Ngs1wymaHFJsYPVZeBIbPt8yHJE7ev1Fgz55dFHe/8efs8q9vlMCFTxqXyWty8VtJorn ZuMP2YDqmbcOmmbjXOXhAy72/Tu/hOf4t7FiGKRjHrMQ4cEx4oiNrs+WQJhlPmfzZnY/ txGQ== X-Gm-Message-State: AO0yUKVBY7IUskw9W0EQj2l9Mj6iNwmSbbQxvyDxpvPGOvWuicW0hK3Z 63/Ge8qhugRHNuJ9qMuDtqw= X-Google-Smtp-Source: AK7set818BgGKHDFUQdFul9CIhqtxqhK1Vt/H4c/g5RV/7cnL+2hCGr+XB4VO1u60ZzwIa1gtZs+2A== X-Received: by 2002:a05:6000:1706:b0:2bf:df72:fdf4 with SMTP id n6-20020a056000170600b002bfdf72fdf4mr1853361wrc.17.1675241608698; Wed, 01 Feb 2023 00:53:28 -0800 (PST) Received: from xeon.. ([188.163.112.54]) by smtp.gmail.com with ESMTPSA id r6-20020adff106000000b002bfe05bf6dcsm11704871wro.88.2023.02.01.00.53.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Feb 2023 00:53:28 -0800 (PST) From: Svyatoslav Ryhel To: Tom Warren , Thierry Reding , Marek Vasut , Svyatoslav Ryhel , Maxim Schwalm , Dmitry Osipenko , =?UTF-8?q?Jonas=20Schw=C3=B6bel?= , 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 Cc: u-boot@lists.denx.de Subject: [PATCH v8 0/3] Timer support for ARM Tegra Date: Wed, 1 Feb 2023 10:53:00 +0200 Message-Id: <20230201085303.6653-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/T124 and T210 based devices. Driver is based on DM, has device tree support and can be used on SPL and early boot stage. Arm64 Tegra (apart T210) according to comment in tegra-common.h use architected timer. - ARM: tegra: include timer as default option Enable TIMER and TEGRA_TIMER for TEGRA_ARMV7_COMMON and TEGRA210. Additionally enable SPL_TIMER if build as SPL part and drop deprecated configs from common header. --- Changed from v7 - configured timer selection only for armv7 Tegra and T210 Changed from v6 - use clk_m as timer calibration clock (this should properly fix T210) - enable timer for T210 Changed from v5: - added paz00 tester Changed from v4: - added comments 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 arch/arm/Kconfig | 1 + arch/arm/include/asm/arch-tegra/clock.h | 9 +- arch/arm/mach-tegra/Kconfig | 4 + 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, 275 insertions(+), 79 deletions(-) create mode 100644 drivers/timer/tegra-timer.c -- 2.37.2