From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.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 474F92D0C82 for ; Tue, 30 Jun 2026 22:06:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782857216; cv=none; b=IsLhS4oIHSRezWpJ4SNp9M8/r8fgD3DJM5m1OjQMvVjz4GcS32POMRKFi8cIOmNxseHBoGesXO0YJGWGTukDqI9O15uDaF+E2cx1UMNxt2trj2L2gJJOKaeIqIFnOgJhuPXrXg5IMrStrLrFzx593ZT7LfbCvQYPqLDtQh2+nBI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782857216; c=relaxed/simple; bh=bPmjS8U0NxIg7cECCTKQu1iO+TVTB/Gcx7a2B9qaX6I=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=oI4vV2ei2AUR8yH4AoQCWXkSmKdyrvlMp4RldsJf2ZDdDBjW646DqYoG7af4iNbWFQRUblmnZdvU43h3ClqzbZmK6becqLj4xbgSNg2q1GJkQ5cQCfHmddcub6jEQSOwFgW3OFA9gIjnQ7FmeLJuHWfR836WmpRSNAYx5htUPds= 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=NVfAp5uW; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=XgFcbP49; arc=none smtp.client-ip=205.220.168.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="NVfAp5uW"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="XgFcbP49" Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65UJDaYC2959893 for ; Tue, 30 Jun 2026 22:06:54 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= 6hXqSMDX8gPxyQepEcBnPOLAsLWVqKDMmaibnp6SQmw=; b=NVfAp5uWKm3FKrG+ BwdDgAEvVOmKSGAyK6eeME0IE2UuLSOt+vy/wzpMEr2YyD6DMNxmIvWDmhpHOA9/ cS6o9Z4HfC7mEZAY3ts22ZKf84vkBFVuMu9uwOndxb5uvrl2hmc+i5toe0I93qdj oi7cpn+JCpRTRLFsG/x0h1zx527XlzAaVyImOtyqHE6cojqPWUXc2Ig5ThODqLCg ggoEEUAr9WZ35p9ot4CCHH+HrYcH+gKqaxSLwQNvmF6fmyzvzALVaqMgfn3mdG75 monWbHNnMpKf70b5OI2BqFynhwL8IofyihftKBKs0Uwqi2/52JK7cTHGu0chINTE +bLM6g== Received: from mail-dy1-f200.google.com (mail-dy1-f200.google.com [74.125.82.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4f4j91147b-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 30 Jun 2026 22:06:54 +0000 (GMT) Received: by mail-dy1-f200.google.com with SMTP id 5a478bee46e88-30c9bd8b9c7so6254189eec.0 for ; Tue, 30 Jun 2026 15:06:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1782857214; x=1783462014; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=6hXqSMDX8gPxyQepEcBnPOLAsLWVqKDMmaibnp6SQmw=; b=XgFcbP49v1v16npv/6vySs6BG14lmKiQ6mNXNendZS7B4ZGa8SXYTOpcDlUfMsmg40 kj1XciE60QKxFZFuzXO34WcmrxOMw6/d7+XX0MS9BCBN1gWN1m7GhCVnQJDf8M4Iss4o Rlczw0GnLKmEqG3J2f9raCFCyeLJdz+ihB/QtIdJmBt9lkGHyBtEIn+/xjR0DqSvTuJO aoeqqJqVnC16iv21V4y4ifhAZR7jEfdTaP7h80k0lOdPQ2uNqW06qjLgRY6o970VciIp nEmAKb3dEovOC6M44gmkiCn/P6sDRNAUhu7fSGJj3SryBV8F23ntwBcMn9UJGPOmbj1/ ZaYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782857214; x=1783462014; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=6hXqSMDX8gPxyQepEcBnPOLAsLWVqKDMmaibnp6SQmw=; b=TPiAXdxZc8dCuaf+T/eLp14ywhG4vuRg7RAQybT0TG8gESlWZBgSkNlLFpTFFmBPGO dEBFF/E6C6aVO9azHhlzqfXGqMKjCOSsuDiXe/DS1LJRRckshtLooMumS9MeLx9HRLbF xmZrUM/41tiam4z+fw51y3hociDOAmhOaxS+Azohb9yWdDfZIrvLsz79fyxaTawjSPFi 8LhjzsDnZV/ml1X5lVcRXg5+hlqPoAWLdzkn6CZjAxa6/oPMmNBRw3kkERh8QdcIjkVr FJCjF+uZftqGRGJpybRKKuVlRTQzpJwss/iifv6UWNkTlQw1501qb+hORIy2paA8qDH4 vghQ== X-Forwarded-Encrypted: i=1; AHgh+RrP0Yyq5P9H7MPPoqjUJdVD17JgNcY+0U5WrnLxz5UY8rGZKEa0xXBluPK+F6fa7xssYNmoUF8m4VLb+ys=@vger.kernel.org X-Gm-Message-State: AOJu0YyhlA+Gt5okXWn00iyR9kOmfyMxZI1kD0n98/bi22ZaYio5crwU PjFe1DvlcOdrMp55TEwVHQJNC+GX6mmvZkUgk7DNdthvQS19ciqK1FciDSog+KS2xqDssqtuQF+ KY/ZX1pcW6dCi4xrZBhLuMMoSmOBTZnrYm6mx0pjx6ZWUC4I8qc5mro0x161Fw74byIc= X-Gm-Gg: AfdE7clNpO0EMPcPtnfezcLkWv6sB/ZwFu2Ebau6QRog6OijtiChTPyEJSiS97FkB5i wnOpZwfBMKcQk/kZsRyFGBWjGkzpgS5W7+20JvL4+GTabWY6N3gbIPeBPP2PhZI5CMnArQOeLzv mn7R3dBdWmG3TfVeCTP58sfKZ62j/XYpWaXj/SgBIwC/Pn3uzIUH4m72PAOs0QMQVy3aO0gA7Jm fhJL991rkJvp4SrwtXxuWQdN+fiI/R57Po6R8ijS9EGVprukrY7HPeRKxfu8JsU9hEd7AZDSPDr goZWC+1oq7OCXqwsODWo9dnowe2iE6u2Qpkp24MdwK6sWOcq/6CxvRfXTjEN4ECFLCc+QX0D13a HWi6NDtOXYpO3OSqxZOvCC091V2Kw2me3jE0nCOTc X-Received: by 2002:a05:7300:5b9f:b0:30c:6a50:3805 with SMTP id 5a478bee46e88-30ee1410f6bmr4257886eec.28.1782857213761; Tue, 30 Jun 2026 15:06:53 -0700 (PDT) X-Received: by 2002:a05:7300:5b9f:b0:30c:6a50:3805 with SMTP id 5a478bee46e88-30ee1410f6bmr4257862eec.28.1782857213133; Tue, 30 Jun 2026 15:06:53 -0700 (PDT) Received: from hu-kamalw-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-30ee2fc21casm11521276eec.10.2026.06.30.15.06.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jun 2026 15:06:52 -0700 (PDT) Date: Wed, 1 Jul 2026 03:36:47 +0530 From: Kamal Wadhwa To: Mark Brown Cc: Bjorn Andersson , Konrad Dybcio , Liam Girdwood , Vinod Koul , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 3/4] regulator: qcom-rpmh: readback voltage/bypass/mode/status set during bootup Message-ID: References: <20260420-read-rpmh-v3-v4-0-70c152e6c958@oss.qualcomm.com> <20260420-read-rpmh-v3-v4-3-70c152e6c958@oss.qualcomm.com> <66f59c2f-f759-44b4-9639-d8845581ae9b@sirena.org.uk> <20260428213331.mwnybqlnognnrpfw@hu-kamalw-hyd.qualcomm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Proofpoint-ORIG-GUID: ALJQrzHsQJRtd0LNfwzU7btxqFMX2TSk X-Authority-Analysis: v=2.4 cv=ftfsol4f c=1 sm=1 tr=0 ts=6a443dfe cx=c_pps a=PfFC4Oe2JQzmKTvty2cRDw==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=Um2Pa8k9VHT-vaBCBUpS:22 a=ZI4zn0xu3ubYp9hJVHMA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=6Ab_bkdmUrQuMsNx7PHu:22 X-Proofpoint-GUID: ALJQrzHsQJRtd0LNfwzU7btxqFMX2TSk X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjMwMDIxNSBTYWx0ZWRfX4e8YmfVjrugu KmmLVQXTbGB9bKVf2HFbl3NlbflFpVyhKwjpu3yKNQ1qVIbW/rWZhWxYxU64bPpxFxBcrDwmlmH mwwmVlR1MCad9dS5qXRJk2E/rnruIDZIgw9OEgFnRdhciByr0jLu72idhz0GnO3cG06SH23Yoqe 8gmoslW4cj9FRRPoDlWi5+9CvUVOyJhLJmaBi6O2sLkfPY74U28oKpgjZ6szUjzMPV52OW708fx xUlhOL+iXu8FPtWfRmupTEoKoCkeHfjxvn21e8YrqLh2POx2lHLLYMXfIH9j6kUTmcu2Lo67wbj QYbUredN/l6VAjpbkv1SdXUJ5dgsf2eqbBiY/WG3w3WGZpE7XrVRrqtIfo5KCwiKgDDNTJ9jjUO ckzx8RFeBjLJpleeHW1zjsV34qqHB0fbv3Bh93S9KTr19eJyTy+++58YcO0xm63wOjMcUiXBAoN ZOFJQE2V3vIazV3bUzA== X-Proofpoint-Spam-Info: AW1haW4tMjYwNjMwMDIxNSBTYWx0ZWRfXw5mSX1aIfBOC N9gOdXjyXLQsqL8Hpv14bN4mfxHraLZVD4a76fluT4HSPmsjQoKb8j62i6x/6yc4GFHJhZ7kOOc PJuWB697JoWH81uvWoHICee7Z/w1vJk= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-30_05,2026-06-26_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 lowpriorityscore=0 clxscore=1015 phishscore=0 impostorscore=0 priorityscore=1501 malwarescore=0 spamscore=0 adultscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2606300215 On Wed, Apr 29, 2026 at 08:15:20AM +0900, Mark Brown wrote: > On Wed, Apr 29, 2026 at 03:03:31AM +0530, Kamal Wadhwa wrote: > > > To elaborate, till now for all chipsets using RPMH regulator driver, the boot > > time voltage setting would always be overwritten by `min-microvolts` by the > > framework. However, i found during the development of this patch that on some > > chipsets like SM8550, SM8660 etc for one or two rails there exists some > > misalignments between the bootloader voltage setting and the APPS side min/max > > voltage limits(subset of RPMH firmware min/max) where the voltage value is > > set lower or higher from the bootloader side compared to the DT min/max, which > > caused the regulator registeration failure and all the sibling regulators under > > the same pmic will also fail to register, even though issue was with only one > > regulator. > > Why would this cause registration failures? Bringing the voltage in > line with the constraints is a perfectly normal and fairly widely used > operation. (Very sorry for coming back late on this) I looked up for some examples of the regulator probe failures i faced during development of this patch. It seems that regulator registration failures happen after adding the read support ONLY if both of the conditions below are true for any regulator. 1. The [min or max]-microvolts values defined in the device tree didn’t exactly match with any of the selector voltages supported by the regulator. 2. On top of this, if the initial value read is out-of-range of the DT min,max limit. eg- For board file(s) /arch/arm64/boot/dts/qcom/sm8550-*.dts, I found that the voltage set during the boot stage for `vreg_l6n_3p3` was 3312mV, which didn't match with the max-microvolts of `3304mV` (which is the max enforced from RPMH firmware) and when i added this new patch the regulator registration for L6N failed, and caused the probe to fail. Note - This we had fixed by reducing the regulator min-microvolts to 3200mV. But since these error is getting unmasked only if we added get_voltage_sel() support, so wanted to check if its ok to print these as errors, and do not report voltage values out of [min, max] range and avoid the regulator registration failures? pleae note that, currently if one regulator registration fails, driver will not register any other regulator and probe will exit with failure. Debugging such issues will be simplified if we can know where the mismatch happened with the error logs, and not have to do repeat testing multiple times to fix (one-by-one) the firmware side mismatch between the boot and rpmh firmware voltage values. Regards, Kamal