Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp8091996rdb; Thu, 4 Jan 2024 19:57:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IGyMPB/Z5RE7qXFJ8lFIeQra3fbZOjvXhjUXbHp2FPJafRq32t9heLm00Egnd8ZLKLQHXks X-Received: by 2002:a05:622a:b:b0:427:9036:425f with SMTP id x11-20020a05622a000b00b004279036425fmr1739917qtw.11.1704427028252; Thu, 04 Jan 2024 19:57:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704427028; cv=none; d=google.com; s=arc-20160816; b=R0WgmMR5QbrsGAN2iMR+Mvr+Z300zLfyL9tUIjmGImF9hq27M01FwrV0mhlyljN0ez t7S1I9a8OZZX0x4ww+2kHM64wosuh54QracREGIALEmnASBexH6PeXaBvtEDdr11IJ3u wOVIanQ8ZHuiaxXKyDBdOxLNT3TU5pTyP6FWt37GiWTbyT1hr/WP22FB5wdtAELHj0V3 sBLWIMGsVJvUVUBNd7POBk7i2pJ5TJOGW724po8wuLVNwv3y/287FLJM4hkpiezlFyfO b9iVOfOShYB7yDFZsb0FSRWEqM5cLSeo0OVeln50AQDlHhYsoy35Xa1kMfsoiUyA7Pon M+9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=eCcQINE1gNlg8v+eYFOWY5Ps37bGRwJ7TfV5v+LjEzM=; fh=i+wgYvpJ75PZjaNBcDYOkuWARF5D4xGzrnaP9qC2Lxg=; b=NxyxWgKa1KisGrzX3SXHiZg547HfgB1pku10pP0kqD1Rh0VyrZH40WSbtAPrvGiQ2+ /W+XhDJcK3A7nstXCf/9qV64SKDAe6n1KN3TeeY2o11g11H1lYpXMUFzeE7Fn9NESAy2 6N6FIzFOyZlWELXZhLVW2lwYrZM+QvaFhowWXK/0P+NIXC7cUqIKzRXyQuZ1Ro6tioXq fDvS7O9MRR59OwHbOWKF/5QdtsTcYH8b/jxvq33roR75uLMadSNkGj3pGZ3GVc2jBod5 qsEcynwjUXlHxpnXJ+ZGhULcG70fpOdDLzZqmWbihOW7Hvfyk8MP660qlQ6bS1ziAooa 8Rpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=eubRL2z+; spf=pass (google.com: domain of linux-kernel+bounces-17460-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17460-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id j19-20020ac85f93000000b004281317ca73si1038987qta.662.2024.01.04.19.57.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 19:57:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-17460-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=eubRL2z+; spf=pass (google.com: domain of linux-kernel+bounces-17460-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17460-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 07DCB1C21CD3 for ; Fri, 5 Jan 2024 03:57:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 936604C81; Fri, 5 Jan 2024 03:57:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="eubRL2z+" X-Original-To: linux-kernel@vger.kernel.org Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CFDA7440E; Fri, 5 Jan 2024 03:56:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 4053unah124949; Thu, 4 Jan 2024 21:56:49 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1704427009; bh=eCcQINE1gNlg8v+eYFOWY5Ps37bGRwJ7TfV5v+LjEzM=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=eubRL2z+4ymoCTLm/V27akX7aREf1HvCUTPnJDdDzoA977fUBxF6UHfvWxmnkjvuY +Vhf5B8u0z9TwZjjzY14yH4GM/3h+efvsM/dZ4G1Zcvz601JB6hAb5RAQ2lmjzkONy KrltyGysFc/y1MYmCwimbTTzll8j9mA37ch8/7wE= Received: from DFLE100.ent.ti.com (dfle100.ent.ti.com [10.64.6.21]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 4053unRA043379 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 4 Jan 2024 21:56:49 -0600 Received: from DFLE107.ent.ti.com (10.64.6.28) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Thu, 4 Jan 2024 21:56:49 -0600 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DFLE107.ent.ti.com (10.64.6.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Thu, 4 Jan 2024 21:56:48 -0600 Received: from [172.24.227.36] (a0497641-hp-z2-tower-g9-workstation-desktop-pc.dhcp.ti.com [172.24.227.36]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 4053ujBL126449; Thu, 4 Jan 2024 21:56:46 -0600 Message-ID: Date: Fri, 5 Jan 2024 09:26:45 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] arm64: dts: ti: k3-j721e: Add support for DFS in J721E A72 Content-Language: en-US To: Nishanth Menon CC: , , , , , , , , References: <20240104111922.832040-1-n-francis@ti.com> <20240104151650.my3cuhgase4yf7gj@luminance> From: Neha Malcom Francis In-Reply-To: <20240104151650.my3cuhgase4yf7gj@luminance> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Hi Nishanth, On 04/01/24 20:46, Nishanth Menon wrote: > On 16:49-20240104, Neha Malcom Francis wrote: >> Add 2G, 1G, 500M and 250M as the supported frequencies for A72. This >> enables support for Dynamic Frequency Scaling (DFS). Note that Dynamic >> Voltage and Frequency Scaling (DVFS) is not supported on J7 devices. >> >> J721E SoC has three different speed grade devices (see [1], 7.5 >> Operating Performance Points) which as of today are indiscernible in >> software, users of a different speed grade device must manually change >> the DTS to ensure their maximum speed frequency is supported. >> >> To obtain clock-latency-ns, the maximum time was found to switch from/to >> any frequency for a CPU and this value was rounded off and set. >> >> [1] https://www.ti.com/lit/gpn/tda4vm >> >> Signed-off-by: Neha Malcom Francis >> --- >> Test and boot logs: >> https://gist.github.com/nehamalcom/33608837ab5ad3332ff11a7fa7a602e2 >> >> Changes since v1: >> https://lore.kernel.org/all/20231214075637.176586-1-n-francis@ti.com/ >> - removed OPPs 1.5G and 750M as they introduced boot regression in >> J721E-SK > > I do not think this is the right approach precisely for the above > reason. > > See my comment in V1: https://lore.kernel.org/all/20231214125130.zqtq6ioj4c533wha@elbow/ > > " > I am also concerned if the table should be separated out as a dtsi and > included at board.dts level to prevent downstream users going crazy.. > " > > I suspect there is no magic opp configuration that will work with all > downstream and board variations. instead of creating a trimmed down > non-datasheet tuples of OPP configuration, use the data sheet provided > OPP configurations into each dtsi and the boards can apply the dtsi > based on the type of sample they have. > > I don't see any other scheme (overlays, maybe?).. but this approach is > broken and your note above proves why this approach is broken. > Understood... I believed OPPs were an SoC specific thing until this failure came about and it makes sense to take it at the board level now. Will factor this in for v3. >> - Nishanth >> - indicated DVFS not supported in commit message >> - moved critical data sheet info from below tear line to commit >> message >> - added opp-shared property >> - added clock-latency-ns property >> >> arch/arm64/boot/dts/ti/k3-j721e.dtsi | 31 ++++++++++++++++++++++++++++ >> 1 file changed, 31 insertions(+) >> >> diff --git a/arch/arm64/boot/dts/ti/k3-j721e.dtsi b/arch/arm64/boot/dts/ti/k3-j721e.dtsi >> index a200810df54a..5de6c70bd989 100644 >> --- a/arch/arm64/boot/dts/ti/k3-j721e.dtsi >> +++ b/arch/arm64/boot/dts/ti/k3-j721e.dtsi >> @@ -48,6 +48,9 @@ cpu0: cpu@0 { >> d-cache-line-size = <64>; >> d-cache-sets = <256>; >> next-level-cache = <&L2_0>; >> + clocks = <&k3_clks 202 2>; >> + clock-names = "cpu"; >> + operating-points-v2 = <&cpu0_opp_table>; >> }; >> >> cpu1: cpu@1 { >> @@ -62,6 +65,34 @@ cpu1: cpu@1 { >> d-cache-line-size = <64>; >> d-cache-sets = <256>; >> next-level-cache = <&L2_0>; >> + clocks = <&k3_clks 203 0>; >> + clock-names = "cpu"; >> + operating-points-v2 = <&cpu0_opp_table>; >> + }; >> + }; >> + >> + cpu0_opp_table: opp-table { >> + compatible = "operating-points-v2"; >> + opp-shared; >> + >> + opp6-2000000000 { >> + opp-hz = /bits/ 64 <2000000000>; >> + clock-latency-ns = <300000>; >> + }; >> + >> + opp4-1000000000 { >> + opp-hz = /bits/ 64 <1000000000>; >> + clock-latency-ns = <300000>; >> + }; >> + >> + opp2-500000000 { >> + opp-hz = /bits/ 64 <500000000>; >> + clock-latency-ns = <300000>; >> + }; >> + >> + opp1-250000000 { >> + opp-hz = /bits/ 64 <250000000>; >> + clock-latency-ns = <300000>; >> }; >> }; >> >> -- >> 2.34.1 >> > -- Thanking You Neha Malcom Francis