Message ID | 20240222030235.27815-1-semen.protsenko@linaro.org |
---|---|
Headers |
Return-Path: <linux-kernel+bounces-75815-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:1481:b0:108:f1d7:1f50 with SMTP id np1csp3255dyc; Wed, 21 Feb 2024 19:03:15 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUlmLXt0hgN0s5Rb9BW9RMOSAebWpbO6bvr4o38N0ZasnVOeLRT7kBhlnjs/2Y7m5fVOPnDg/H033CrQIP70QPrRTT88g== X-Google-Smtp-Source: AGHT+IGLe92kJovCO7617qrdJoJlF9fmtMSZAjLT26dJxc/UtOzTW0TPJw5jgtbnpRSMmdb1MfyI X-Received: by 2002:a05:6402:75a:b0:564:606a:c830 with SMTP id p26-20020a056402075a00b00564606ac830mr7545989edy.5.1708570994852; Wed, 21 Feb 2024 19:03:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708570994; cv=pass; d=google.com; s=arc-20160816; b=Dr/6o1U5DX3ukIzuYCoAettgj1UJBWBoXsEJDvpsWbQH7dcF6UCCMK9IQ/h75uFDfi 6HFEcxZVkorAPoHkJQj9japl21UCQ2saGJ20ADpv5h5F6fOzYP1XZsrAEVWftd3Nc8Gy lVcIjMbaqyK5WLKRs6nW2VfJBnyRnWGALAdLoIcMFE9q0Vf83x7o9YT+P9UGaKLKenC8 CWY5G6kHwQaHHOtwc8lPuEXN5eT8SGLD4vw40pu02ugqK5lPkgPDjP/OaI5BEYVM9JLF vSIPnY1mkdq3sXYLRXnoH8aR5kMsdFpu1VXdsYe8rVYlNLYEKC9YfbXMTalgKCFF6HOP NnQg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=F77N/bJd/ArmxmRc/lfS9FL/QYcTZED/SCdkWs1Ud9Q=; fh=PGFBAWrmifADzuQOftGhcyup6MY4Rsv8+e+hSC81Zfk=; b=TjiCmtXP235IgKCoXvTRQSdvMtcYovUZonW9vR43mz/ET/w5jppK80xqkrgsT0eZgE gdydzWNUIpNSJ3kQQoPPKC9YgvfNQ3nHi9+Ttha0j+sOlusbxCo8VgAJHL8kKFQwhu3D etRxROqUwMSJP89izfRHbLIOQYNSChV+dNHcwfLT9MPWeOq0fAOIgYoUQiP24RGcOG0W 6AJHUqT93Iw5KiT1uWM4lS+h96vptxZ0ng2GhQjozMFmsZMc5nlPtCyf/MZoAb37+AX2 0IwUF65r3ZD+Eh9txzKbs/Wx6J4C45y0yHqwl0iJP4pAA0uFsAfS2DygNh/4OHVFG6jA JnRw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xtBcJVQx; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-75815-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75815-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a19-20020a05640213d300b005647009af29si3568917edx.281.2024.02.21.19.03.14 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 19:03:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-75815-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xtBcJVQx; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-75815-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75815-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 491471F23556 for <ouuuleilei@gmail.com>; Thu, 22 Feb 2024 03:03:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E933D18C1A; Thu, 22 Feb 2024 03:02:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="xtBcJVQx" Received: from mail-oi1-f171.google.com (mail-oi1-f171.google.com [209.85.167.171]) (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 29110111A1 for <linux-kernel@vger.kernel.org>; Thu, 22 Feb 2024 03:02:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708570958; cv=none; b=LT1rw6Bz5oiI/ecwPTrzKIVCerN1iSvO82WSV0+0eKx9UrHdAmMkPJcl5m/IYRz6L1AULw7NfB86onSh/EUbNqupoGihR/mQ6cdcH48pjNaM6llZer5m821XLgYJB7y2YSovtbDHTxPrbeNsqjQTXk6NJ4ppo17UtV7dp0kjzSE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708570958; c=relaxed/simple; bh=SBUqXxvxQDpVqQFR+XWaiNDrRIJRD/TV6Uug1+c1n8k=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=T0g1wtaOSQ50YUHTgRr4X2vdKFFQnowVJxioO7o+ldAt3t6BGm+RqLBE3G520KaBlcPtdp0+nbbgBfdrVALWNs4wjzGgbl5tB1rzBvhKsHlIFq+gWSLqP4xV5UZwNuMudbvV90T0KRVEZQOe9CRfdPoiiP6dKzTfp440H2BYMHg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=xtBcJVQx; arc=none smtp.client-ip=209.85.167.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-oi1-f171.google.com with SMTP id 5614622812f47-3c15dd2a1fdso2869670b6e.2 for <linux-kernel@vger.kernel.org>; Wed, 21 Feb 2024 19:02:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708570956; x=1709175756; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=F77N/bJd/ArmxmRc/lfS9FL/QYcTZED/SCdkWs1Ud9Q=; b=xtBcJVQxAN+RVZBeZv0SICymQo8tbL5yIXus/suzr2TpoLsT6AiFwGDWBTZKQGxBPn c6aZSSUhrNsbowdFP0CyC/j6YkINoodMDOe/WjoFhUwPh9heYoDC9uoXgkVchlB+QXVe RvQCZmaLA2i3gmv8C94ZJDGoBYBX2ZOj5EuB2mLJUOCw9a4j5y1KN/ePt9G+BqO3Py4S 4xSPgTwzIYnXjt7zG5sjKyv7MIA19Kkl1lrCmKl/hk1XD0t8sL+llFB2QV+ruibz8MDa JLr4HIbq0t2A1oiqB4anmNFcRTqNlpI4Ka5KsFXFGcDN5Fvc9GBe0g99JEKYtbSX+jmR agwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708570956; x=1709175756; 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=F77N/bJd/ArmxmRc/lfS9FL/QYcTZED/SCdkWs1Ud9Q=; b=MuuNKG04j/LjHz5VQOhB9FUO4DeWjfYei5/rROYZhPc5BbmCdmodb344oY1EG0qiN8 /NLD4cBKVTiAj7Jeh3tYaMAqvnUePTJuoJREOwMGhvIIWashzHB+15PA+TFYQSAQM9Ob Alswg1JTRFGfteQmgJH7xaWUoR7mBQzQU+i4AXaj3Gqypd6zDDmkvs+zqc2TSncuSLYF EXN5puqBMqyc6wzAAyI3bCL4LVSIvD4Og4nq3VuIYVJRQ8RmNJ5UWtYfANUPiLi9JCBd E/F37HivjYefh86XU4aSkdHGaBbPnQhRChFo7gpRRtmwIUtNtpG1uRkgLnn4VoHoO6Qg eDpQ== X-Forwarded-Encrypted: i=1; AJvYcCWbZo3lFhsbSCCEbWwgBd5O6LspAZ2Sc3RbfKWCYVLctxbEap7s2aYJm5OPIoskFQ7RWfH5kzMqSdkas+u/gKfwDFxNHJT7t2h3bsGE X-Gm-Message-State: AOJu0Yxca3teL0/XFrd5U5gn2B2nfySRBija+FajMAJFWlvfO3M0WYeS xY9GfsgV144Fz5u39conxzBNXgG3KzyVC5WNVU1rN6nY99N7+IZoQ8t01I5PrCE= X-Received: by 2002:a05:6808:23d4:b0:3c1:578a:9a17 with SMTP id bq20-20020a05680823d400b003c1578a9a17mr12392977oib.4.1708570956219; Wed, 21 Feb 2024 19:02:36 -0800 (PST) Received: from localhost ([136.62.192.75]) by smtp.gmail.com with ESMTPSA id eh10-20020a056808274a00b003c13787306asm1800443oib.56.2024.02.21.19.02.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 19:02:35 -0800 (PST) From: Sam Protsenko <semen.protsenko@linaro.org> To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>, Sylwester Nawrocki <s.nawrocki@samsung.com>, Chanwoo Choi <cw00.choi@samsung.com> Cc: Alim Akhtar <alim.akhtar@samsung.com>, Michael Turquette <mturquette@baylibre.com>, Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh@kernel.org>, Conor Dooley <conor+dt@kernel.org>, Tomasz Figa <tomasz.figa@gmail.com>, linux-samsung-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 00/15] clk: samsung: Add CPU clocks for Exynos850 Date: Wed, 21 Feb 2024 21:02:20 -0600 Message-Id: <20240222030235.27815-1-semen.protsenko@linaro.org> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791097959942924230 X-GMAIL-MSGID: 1791566539728102295 |
Series |
clk: samsung: Add CPU clocks for Exynos850
|
|
Message
Sam Protsenko
Feb. 22, 2024, 3:02 a.m. UTC
The series implements CPU clock support for Exynos850, adds CPU CMUs to the clock driver and enables those in dts. This is the first step towards cpufreq implementation. If possible, all patches should go through Krzysztof's tree. As inter-series dependencies go: * All driver changes (patch 02..14) must be taken together following the order established in this series * Patch 15 (dts changes) depends on patch 01 (bindings additions) * Patch 14 (driver changes) depends on patch 01 (bindings additions) The series was tested on E850-96 board, via DebugFS with CLOCK_ALLOW_WRITE_DEBUGFS enabled, by setting different CPU clock rates, like this: # cd /sys/kernel/debug/clk/cluster0_clk/ # cat clk_rate 1053000000 # echo 10000000 > clk_rate # cat clk_rate 130000000 Of course, DVFS/cpufreq is not implemented yet, so the CPU can't be overclocked too much right now, and the cpufreq interface is not available too. As per the TRM, the CPU operates at a voltage level of 0.65 V, 0.75 V, 0.85 V and 1.05 V. When the voltage is 0.85 V, A55 quad-core operates at 1.6 GHz and CoreSight at 200 MHz. To check the actual frequency, the "perf" tool was used: # perf stat sleep 1 And to check that on a particular CPU core: # taskset -c 4 perf stat sleep 1 Some takeaways: * Max functional frequency right now is 1.586 GHz * 1.742 GHz or more leads to the system freeze, as it requires more voltage to be operational * Max possible frequency: 2.210 GHz * The lowest possible frequency: 130 MHz * Default boot up frequency: 1.053 GHz Changes in v2: - Removed confusing "breakup by patch" list from patch #0 commit message - Dropped the patch for making clk.h a single included header - Rebased the series on top of the latest linux-next Sam Protsenko (15): dt-bindings: clock: exynos850: Add CMU_CPUCLK0 and CMU_CPUCL1 clk: samsung: Improve clk-cpu.c style clk: samsung: Pull struct exynos_cpuclk into clk-cpu.c clk: samsung: Reduce params count in exynos_register_cpu_clock() clk: samsung: Use single CPU clock notifier callback for all chips clk: samsung: Group CPU clock functions by chip clk: samsung: Pass actual CPU clock registers base to CPU_CLK() clk: samsung: Pass register layout type explicitly to CLK_CPU() clk: samsung: Keep CPU clock chip specific data in a dedicated struct clk: samsung: Keep register offsets in chip specific structure clk: samsung: Pass mask to wait_until_mux_stable() clk: samsung: Add CPU clock support for Exynos850 clk: samsung: Implement manual PLL control for ARM64 SoCs clk: samsung: exynos850: Add CMU_CPUCL0 and CMU_CPUCL1 arm64: dts: exynos: Add CPU clocks for Exynos850 .../clock/samsung,exynos850-clock.yaml | 42 ++ arch/arm64/boot/dts/exynos/exynos850.dtsi | 26 + drivers/clk/samsung/clk-cpu.c | 562 +++++++++++++----- drivers/clk/samsung/clk-cpu.h | 53 +- drivers/clk/samsung/clk-exynos-arm64.c | 44 +- drivers/clk/samsung/clk-exynos3250.c | 2 +- drivers/clk/samsung/clk-exynos4.c | 9 +- drivers/clk/samsung/clk-exynos5250.c | 5 +- drivers/clk/samsung/clk-exynos5420.c | 16 +- drivers/clk/samsung/clk-exynos5433.c | 10 +- drivers/clk/samsung/clk-exynos850.c | 440 +++++++++++++- drivers/clk/samsung/clk.h | 9 +- include/dt-bindings/clock/exynos850.h | 54 ++ 13 files changed, 1040 insertions(+), 232 deletions(-)