From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oi1-f174.google.com (mail-oi1-f174.google.com [209.85.167.174]) (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 507D2353ED0 for ; Wed, 28 Jan 2026 13:29:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769606942; cv=none; b=nBWuS1ZuGspkzGgAVY6KWE06YetM7GjOamqEVL4LIUSfoXokVt++jboA+k+Y3agKZFirrsrriHBrcKCrNkqTLi+hyJKgtWj2ZHzV3fMycvqWZgXle1nojqQhJCW/J9QcQF2dg6dEoCdH7OhICOgSoYjQGvtWs82l/KE8vFeBMf0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769606942; c=relaxed/simple; bh=/SRbLJIOBCp6SkKGBSg0cd0VrfNVnSQQ5K/0eCQIYng=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=jIIDzcAgNgpQC93XJzXSbqpbbWBFniXkB68H+r+G/VhI2U/4qb/2UbjQ1FAKbf3ybWrhS+Y1K/70Yz0n7quYffzq1UTIXgrlElaQ0dF/xwSPfQYS073T9mu+N0yK46vWhuTSKYUtdY40rYYLcSLBAxNQqei+I+R9H7KlNtOPaGM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=riscstar.com; spf=pass smtp.mailfrom=riscstar.com; dkim=pass (2048-bit key) header.d=riscstar-com.20230601.gappssmtp.com header.i=@riscstar-com.20230601.gappssmtp.com header.b=umwvbSeN; arc=none smtp.client-ip=209.85.167.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=riscstar.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=riscstar.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=riscstar-com.20230601.gappssmtp.com header.i=@riscstar-com.20230601.gappssmtp.com header.b="umwvbSeN" Received: by mail-oi1-f174.google.com with SMTP id 5614622812f47-45c93313721so2204775b6e.2 for ; Wed, 28 Jan 2026 05:29:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=riscstar-com.20230601.gappssmtp.com; s=20230601; t=1769606940; x=1770211740; 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=O3+eV0m5YOcp1OGVa9q7WwRpTmAwgwaorWnGyCzBuiI=; b=umwvbSeN9n4MYXWO5N2doXRRe8f9g2Th/mE7XxzFS/7AWnaJgi5Nd+nGkWHL09muQs qVSlX/izxCa2uQ4JK6VpyX6J4eF02phBWZXorOfHuM4ht/8y+K2qUHM0cOdY5ZXNpym9 fxk0NGvCTNFNoMpL5Ck96btU13rZQu2ibUfYOCGXyVqSxvtCtCLiSZ3klNCuOMjO1oj/ jUIpH9Ec/bMyXz4a9rCaSY/VzppSXvf/hNyb+G0gpi/yu6PN+upgdYC5AodtqZvfgoHJ 2e5eZ27+X9NY7PHJO+elQRVMddjoqf/o4jtYqlIlupzcUpTGSVazQsSJaXTxNRsnxmXq Kmrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769606940; x=1770211740; 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=O3+eV0m5YOcp1OGVa9q7WwRpTmAwgwaorWnGyCzBuiI=; b=R4zJtilGxMyMnwVOryl1CWyWOAYEw6Q0sSwLKuYAwxZyXOxImL3nceXq626TmX4ex6 xXneNxrYYltQzARbWBj89LivKUFtZn2bTDf1uxVdTjKHvcHVGVDLi6IkFb/fdl0A1SeP 1XoGePAch7g/aewlw3H6y2ISPhCMCuCyMgYAXywfSy1tT6ukYevFCpMwF5v4MYGFkEwH j5aTY31lqUEFBDGt6gQk2gnjyFFGMjJAxHJWR36M/Hz6vKq6Zat1kdZBk3Dde9y/mxmN GALt82TLV9qt6El7s57YEOfyQFyUyhbO1qeyPnr2GQp5odrQhZb7ZRH3LWMKsUz2sQaM kcRw== X-Gm-Message-State: AOJu0Ywtac9VPFjghHngRoDTQAGBW+71a5VFb9llXKUjjmKVhxGW3LEZ Dskyem89PeoCbtA81vMwFbEtNRJpqc+2pXOCZUUdk8dAoFcelYUt3X4PTCE1sIEGhto= X-Gm-Gg: AZuq6aJd+UK2bxS2ZtDzz6O0pzJjm27po84WiBMrtXGG26/Pbh/MuST43vagBHbREtv /7I466uGcHtv74NdaIEcVaga/UCGG9BzkqYG3uKqCdPs9kA9Gb+3hoN/4G1JkNRPlhJMsAt+Z45 K9buqzrJcQngAWEMl3tS/ZgKqzEMDEmaL1682VnYwTZNubdg5eWSwmVzOk4EMdPwOQHZz4P3tQq xp4/rAU+dY4AfraOxRytSvKJC5AZqLJdzlsHR7IR9E/FbrI6/RS5661P2W+qh0h7sZPsfxx0mZR /ID2zKy8Sta6uCn+s3l3vhYdkFTbq2G2cc/jkiHtgp3wTFQJetMn7PVy/JBInowNm7tDTpzOiQF x3kdY0JD1iRaiVHtaUP8QTFJziC2cQjpRk3Jg9qY7JGtSoWpYpQ17e3WqoT3r1JZsCiwDsYFxoY aAy7oPY2VX2lKFRs6T1MDszVsdNeEDyBQqD1UApDlCtZ/0ak5UsBc= X-Received: by 2002:a4a:ee06:0:b0:659:9a49:8efc with SMTP id 006d021491bc7-662f208c524mr3076054eaf.13.1769606940245; Wed, 28 Jan 2026 05:29:00 -0800 (PST) Received: from [172.22.22.28] (c-75-72-117-212.hsd1.mn.comcast.net. [75.72.117.212]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-662f994388fsm1374132eaf.4.2026.01.28.05.28.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 28 Jan 2026 05:28:59 -0800 (PST) Message-ID: <4395bea9-44d7-4f0f-81d6-c1e05976a308@riscstar.com> Date: Wed, 28 Jan 2026 07:28:58 -0600 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 3/4] regulator: spacemit-p1: Update supply names To: Guodong Xu , Liam Girdwood , Mark Brown , Yixun Lan , Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Troy Mitchell , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti Cc: linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, spacemit@lists.linux.dev, devicetree@vger.kernel.org References: <20260124-spacemit-p1-v2-0-2c86b06694ba@riscstar.com> <20260124-spacemit-p1-v2-3-2c86b06694ba@riscstar.com> Content-Language: en-US From: Alex Elder In-Reply-To: <20260124-spacemit-p1-v2-3-2c86b06694ba@riscstar.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 1/23/26 6:20 PM, Guodong Xu wrote: > Update supply names to match the P1 PMIC's actual hardware pinout where > each buck has an individual VIN pin (vin1-vin6) and LDO groups have > dedicated input pins (aldoin, dldoin1, dldoin2). > > The supply is a board design decision and should not be hardcoded to any > existing power source. This allows boards to specify their actual power > tree topology in devicetree. > > Signed-off-by: Guodong Xu These are good changes but I have a suggestion on the way you define the DLDO descriptors. I might be mistaken but I think you should make this change. Aside from that: Reviewed-by: Alex Elder > --- > v2: No change. > --- > drivers/regulator/spacemit-p1.c | 25 ++++++++++++++----------- > 1 file changed, 14 insertions(+), 11 deletions(-) > > diff --git a/drivers/regulator/spacemit-p1.c b/drivers/regulator/spacemit-p1.c > index 2b585ba01a93..57e6e00a73fa 100644 > --- a/drivers/regulator/spacemit-p1.c > +++ b/drivers/regulator/spacemit-p1.c > @@ -87,13 +87,16 @@ static const struct linear_range p1_ldo_ranges[] = { > } > > #define P1_BUCK_DESC(_n) \ > - P1_REG_DESC(BUCK, buck, _n, "vin", 0x47, BUCK_MASK, 255, p1_buck_ranges) > + P1_REG_DESC(BUCK, buck, _n, "vin" #_n, 0x47, BUCK_MASK, 255, p1_buck_ranges) That was a simple change... > #define P1_ALDO_DESC(_n) \ > - P1_REG_DESC(ALDO, aldo, _n, "vin", 0x5b, LDO_MASK, 128, p1_ldo_ranges) > + P1_REG_DESC(ALDO, aldo, _n, "aldoin", 0x5b, LDO_MASK, 128, p1_ldo_ranges) As stated before, I believe the 128 should be 117 here. (If you change the earlier patch, make sure the change to 128 doesn't persist here.) Same comment for the DLDO regulators. > -#define P1_DLDO_DESC(_n) \ > - P1_REG_DESC(DLDO, dldo, _n, "buck5", 0x67, LDO_MASK, 128, p1_ldo_ranges) > +#define P1_DLDO1_DESC(_n) \ > + P1_REG_DESC(DLDO, dldo, _n, "dldoin1", 0x67, LDO_MASK, 128, p1_ldo_ranges) Why can't you use _n here like you did for P1_BUCK_DESC() above? > + > +#define P1_DLDO2_DESC(_n) \ > + P1_REG_DESC(DLDO, dldo, _n, "dldoin2", 0x67, LDO_MASK, 128, p1_ldo_ranges) So this is generalizing the input, which is good. The use of "buck5" here was a Banana Pi BPI-F3 design and but it doesn't have to be that way. > static const struct regulator_desc p1_regulator_desc[] = { > P1_BUCK_DESC(1), > @@ -108,13 +111,13 @@ static const struct regulator_desc p1_regulator_desc[] = { > P1_ALDO_DESC(3), > P1_ALDO_DESC(4), > > - P1_DLDO_DESC(1), > - P1_DLDO_DESC(2), > - P1_DLDO_DESC(3), > - P1_DLDO_DESC(4), > - P1_DLDO_DESC(5), > - P1_DLDO_DESC(6), > - P1_DLDO_DESC(7), > + P1_DLDO1_DESC(1), > + P1_DLDO1_DESC(2), > + P1_DLDO1_DESC(3), > + P1_DLDO1_DESC(4), > + P1_DLDO2_DESC(5), > + P1_DLDO2_DESC(6), > + P1_DLDO2_DESC(7), > }; > > static int p1_regulator_probe(struct platform_device *pdev) >