From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (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 2BF56350D53 for ; Fri, 21 Nov 2025 13:46:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763732818; cv=none; b=G7/v9ShqCONOcoyDeugXHCd2L5wTJYkBMWV7pn3uu+x1MlvuC/kuHm4KGFpRY5qCXySqDfjawTuj2C7iwFJuOzUgStBRO4advt9eH7Foj+AyfiIm2Gpu2iv1OpfCRLRSsVMRjUmpkkfg4Q5ZhUGMbITBD1wrYE/apOxbvuO2PBA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763732818; c=relaxed/simple; bh=+WSh/nrOulGAjXJGC0pDYRfoXLb6sCiD5Gc02jtCuTs=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=YS7CkcSW23QMLMyNxkAYVzK3wzpxg57dk3O+s7LQdVL2whxSlBYM8TnwBMs7fLgJTqdHBlKXUpP7Fu3kiu7DubG54K98eVvNBV0VJAFgXk0pJoUpqx9ZXwLboI3QYscoWroIqIb/HGz7xm3fDKxf3kfewOl3lZYYbz0SxwfG34M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=XC4IgcGQ; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=JcubMNZb; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="XC4IgcGQ"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="JcubMNZb" Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5ALBt0dX2841430 for ; Fri, 21 Nov 2025 13:46:56 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= j+DO9BekeG00CRw1FjqoZ6sLkEuK+yJJGU53v8nxNZk=; b=XC4IgcGQxhnMoFwW AJMvAyCMqowJDywOL1vS+Vpl0Uw99bP5Hh4MK6DTDa/d5zCE6cukp5mleKA1y88w O6cSeSFlPfRfBX3L8zUrSBXDVmdbP96rRKoXFboJsT7bE29rP93OilGaI3jPU/H5 tdcVwNff2HeVA5Zuz2asiBQcvkm0BzjMwws6iYyf+8pKgaO2nvXy7h2BeHzv0aiv WQN876VSNAplyKIPr6UEu6u0i59QWOA+HL2KI6XY1hcDN/BExJNJC851qZyO64ap wgTyA1E9l21nVyV0+geBYCYWJ9g8QeKpyAJCrSdee6CK16IeG9cplA1nvX8UdnAl bcVydg== Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4ajhkvhmn4-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 21 Nov 2025 13:46:55 +0000 (GMT) Received: by mail-qt1-f199.google.com with SMTP id d75a77b69052e-4ee23b6b6fdso6715121cf.0 for ; Fri, 21 Nov 2025 05:46:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1763732815; x=1764337615; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=j+DO9BekeG00CRw1FjqoZ6sLkEuK+yJJGU53v8nxNZk=; b=JcubMNZbF5mjAja4WcDyplrRub5z2QIj3rhAm8nRwL5Yw7SySDJSHbI96fl3v5dGes kZatGuDyTBwhSRF1REXm5D5OHH7nR+HGk3ZZT0XK5+57gta6caux8SeO4E/b0n9Gih8z YU250YXEHkUA68AkhlSRFJ/dN+GrUGIclmELfNTS4TckGnpUi2sfHv2M5xK2F/JBsK8r mOHoFQmAuIOp0UPYtDQ94WJYvMw2HAbbWxU6P6JFgO6VN9+DZY6IMsCQvZ47zEMo9399 En3rotmOa/7hEMUtu5B4C5SdXgz2uCZrabZmfbtAesqA9kJDerIan//Ps/GHXYSIsx2t FBGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763732815; x=1764337615; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=j+DO9BekeG00CRw1FjqoZ6sLkEuK+yJJGU53v8nxNZk=; b=Vsyg/+zIX+PKBhHZHsP1n32YNxenw/NpqUanE2U5ObR4EZlKpxioeZAYGF59fD6Sv1 ztZKg1CsL/fgK3OjgN2atD1dksMxQ6GRKNbkdTP0EGDo2/kTJGygQYccam/5qxhZoaXP f8QHd7/lrYe28MXDJOT5s8rJe6cKty2tY0TOtgkrfFhoGLu9RVwwJZZ7YB1C7E1Bt60X fBqb8oQVxiFTntmBHAMYkCGLOeXt8I+scT9ZhqSZwaF9EgUxgWpXosL7mlNyH+JCdmLf l7YSM+jaPKl1/nUI8cvGtn6sZPfjPYiNNHwJRHQoIZjgnFhJaVypQ2dbhyUUgDUkPg5S YwyQ== X-Forwarded-Encrypted: i=1; AJvYcCVM/KFtfvywLCQn1yfw94f4JreRnSAU8oNMAXHWFnHoV3m/qx6W9WfBmFv6wP5CEh4rhq6yW5/yCFXlhhA=@vger.kernel.org X-Gm-Message-State: AOJu0Yyi8YyLpEp1LGL8pvp/OpmGpHOwR9wAhnfGg9r7HZduxURMPpHY p8ejXp0Iu+xRR4XdCIaURHDr3ANaqpPaX6w86II3vZeihVccLo/6HVMcpMFlxRlphqkS9EBF8Lu kFsVY6SFwaTHL3f6FJHUbxefZBmnfknaf1VMX6Wct1PRW06rOSKFYTqv6M3ZVsSQP0rc= X-Gm-Gg: ASbGncujp9Yq+MzrIRKEHKmTdlHiTHDw0PByKBW/zAfNnh6dApNlZPApgGjoGIpNUKu DOzPYXMGrHwJ6sJMXajc81PBWsF7fHfeYqbr1SAps+LOl5DtLpCyuybt9pRADsmoZnjz407C2vV /XuQAOpDSB4Ar5073RDh+pJuiu81JHCLAz8QSErw+1a3HYTA8Ewwddp8aWjZxek924x0+3yMmXj 5ybaQOxB6Efb5b3eInbhA5LVac3QszJGTAdnpQ517xE8wS67IwYAjfymsenoRp4AdcqQP2kjJNQ mlpDW181BalbeUuygsAdkV95p/ODO+TuBLcUNzVQCYuHVyoamspBz28nCbX12Bcq8WbeTE1WFXT sRRPbyhC581M/sWnY+sYZyWKEH9ZYVV02ZKIK8/3NFpBT4axDH1ogo9dapt+IDr4GgZM= X-Received: by 2002:a05:622a:1184:b0:4ed:afb4:5e30 with SMTP id d75a77b69052e-4ee5895624cmr23133091cf.11.1763732815246; Fri, 21 Nov 2025 05:46:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IF7DtYkRqUxlcO+pemjw2RleQ5P1i+dCdeHRUXrMnmyJnA8E8Rx1MkOitI3BlsemaFfVRZ7bw== X-Received: by 2002:a05:622a:1184:b0:4ed:afb4:5e30 with SMTP id d75a77b69052e-4ee5895624cmr23132801cf.11.1763732814788; Fri, 21 Nov 2025 05:46:54 -0800 (PST) Received: from [192.168.119.202] (078088045245.garwolin.vectranet.pl. [78.88.45.245]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b7654cdd5e0sm496933766b.1.2025.11.21.05.46.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 21 Nov 2025 05:46:54 -0800 (PST) Message-ID: Date: Fri, 21 Nov 2025 14:46:52 +0100 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 1/3] soc: qcom: ice: Add OPP-based clock scaling support for ICE To: Abhinaba Rakshit , Bjorn Andersson , Konrad Dybcio , Manivannan Sadhasivam , "James E.J. Bottomley" , "Martin K. Petersen" , Neeraj Soni Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org References: <20251121-enable-ufs-ice-clock-scaling-v2-0-66cb72998041@oss.qualcomm.com> <20251121-enable-ufs-ice-clock-scaling-v2-1-66cb72998041@oss.qualcomm.com> Content-Language: en-US From: Konrad Dybcio In-Reply-To: <20251121-enable-ufs-ice-clock-scaling-v2-1-66cb72998041@oss.qualcomm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-GUID: otxmoMTEcQ5KxTv-ovq_3f8JU-Pp22i8 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTIxMDEwMCBTYWx0ZWRfX5hcPTc7DA5Lz Y1V8Pasq7/4wzEemoh/PHYS8kk39BH9yMnt+fBQtJnQAgaQE5c0LhqYtEoL5igJGJd87oDp5s2X DDMGJPqFZVc8g6ctSNra13RjIMK0W14uSYE+gRt40fgv8MbSMErF2dmxsgepHazFjoibhiSK5XS dP3E9c32cyt5USOU3XDkwm6A62aP1m3eleMWo3xYLEgJ7c9O1FjuVSC6YzlRj9OdvHnJwvUGD/q b7WNF9j37Pwbe4bbXUVFAWp6APCDn3ZLYkPpcfSgUbYLsgvP0p1lqueK+jB7AcUWszEI+Pzqpuw KCxMXGWZKY+h9V6zpwz9+lTvqp/MIVgpHyoFP+yS8jaoWbCu1x8L9qy96SME3lRN8XY7oyHw7Q3 EBye5wDld9iZchLSHISpIQoG9mZzZQ== X-Authority-Analysis: v=2.4 cv=bpdBxUai c=1 sm=1 tr=0 ts=69206d4f cx=c_pps a=WeENfcodrlLV9YRTxbY/uA==:117 a=FpWmc02/iXfjRdCD7H54yg==:17 a=IkcTkHD0fZMA:10 a=6UeiqGixMTsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=DINW31QT5aIcAUPt0q8A:9 a=QEXdDO2ut3YA:10 a=kacYvNCVWA4VmyqE58fU:22 X-Proofpoint-ORIG-GUID: otxmoMTEcQ5KxTv-ovq_3f8JU-Pp22i8 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-11-21_03,2025-11-21_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 malwarescore=0 phishscore=0 lowpriorityscore=0 bulkscore=0 adultscore=0 impostorscore=0 suspectscore=0 spamscore=0 priorityscore=1501 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2511210100 On 11/21/25 11:36 AM, Abhinaba Rakshit wrote: > Register optional operation-points-v2 table for ICE device > and aquire its minimum and maximum frequency during ICE > device probe. > > Introduce clock scaling API qcom_ice_scale_clk which scale ICE > core clock if valid (non-zero) frequencies are obtained from > OPP-table. Zero min and max (default values) frequencies depicts > clock scaling is disabled. > > When an ICE-device specific OPP table is available, use the PM OPP > framework to manage frequency scaling and maintain proper power-domain > constraints. For legacy targets without an ICE-device specific OPP table, > fall back to the standard clock framework APIs to set the frequency. You can still set a frequency through OPP APIs if the table is empty (and one is always created even if devm_pm_opp_of_add_table() fails) [...] > /* > * Legacy DT binding uses different clk names for each consumer, > - * so lets try those first. If none of those are a match, it means > - * the we only have one clock and it is part of the dedicated DT node. > - * Also, enable the clock before we check what HW version the driver > - * supports. > + * so lets try those first. Also get its corresponding clock index. > + */ I would argue *not* setting the rate on targets utilizing a binding without an OPP table for the ICE is probably a smart thing to do, because we may brownout the SoC this way Konrad