From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796527337; b=MMtKG6lHUBBKQDt0+lH7DQzneuKGaeKXzR800KWnfiUD/6eeLw+jyyYgncRJbOqGobTJ 8IzC08F56NrWXjEFQ9gsmX/oL5OqTWIQQR9wu9Isk/e5xIQ80KOUgAzP7/q2fF4PmuzQe sSgaSkA34D90KLpPgeVrD6SwY0eSJFH0ssCuBk30MXYJQZjJ/XqBJwO26EE9urCXaN0+5 k8ga10n2+xBkbKlF0mMnIwtw7wJshg/Azj8BOHdeiPUfvCqfgEJJvNqNogKxENoYlmZ2n eE7yv/b93Sn5O1crIzDU3p1loWUuFYGkQA+5iEl2CLToTtOJyMkX2ulmEgelwrmI0Fw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796527337; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=ABvpDijmIheE3rb+kQk90FF2ESt6ZpiA+p6itIVO0aY=; b=OBVYO7W6nsu2XGKhcCwwF6RR5W3eBqU3M4nxffbh18sIzW3GwZkRKI+hqch7RxI+XrP5 cgK0ZwOTHMD3mbt6+7NHO7C1amHvtTUMv/D+kyE8UOyC3zLZ94f9rNAh3K16Rm3UKWfai pORJREHshtMq+WChbw2aC0MeXEF/6yUm6MuEl52JkPbLWXG92V21JBR9kRHKt6C4vOIFf Zx4lH2RFCLGl3ZQA7xZq9W/cbFB818lEAh8AlewJwUJmR4NBV2MCvqIk3/PbS3L46MGs6 lmj771KkLcqgWXj2ukU72MQJgMqdFcgXA0kjdaE+ZDn3ZlWevZA6yWfAoZlLDr4/LdA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=gl9JiNM1; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0F266606A321; Sun, 6 Dec 2026 03:22:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=gl9JiNM1 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 912AD1F0092B; Sun, 6 Dec 2026 03:22:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796527336; bh=ABvpDijmIheE3rb+kQk90FF2ESt6ZpiA+p6itIVO0aY=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=gl9JiNM1SefnuGah9E9MFfawwizwVPTV8V0ghEf2YOWZ2U/bxoW4OdZNrXASG8Qt1 dziTyUBJsTS2JloVWE7egU1Lk2zqb89UMTYPPhd/fnqEj4HaWlS4EerhJxt9e5pKTC wLZfRzeQ6dOawDy8ttDzBHx3mhJZOhE78J9sM1TOpxVbOMUMQ9zjjhHkb08J5M2iW/ L46aWlTcfdFcVyPR4mp/j0n28vL79dOhXmqUNFmk+EVQz2Ije6Au/grnGAwHogY61F Q70WZZKmkJMwLkA92w3Tx+vPjs6be1YI+djh7Q2kwvavlAySLk8+cTxYqokRApbb3D JGnALgmEtKPhA== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v7 3/9] regulator: axp20x: Add support for AXP192 Reply-To: sashiko-reviews@lists.linux.dev To: =?utf-8?b?TW9sbsOhciBNw6F0w6k=?= Cc: devicetree@vger.kernel.org, linux-input@vger.kernel.org, mfd@lists.linux.dev, robh@kernel.org, conor+dt@kernel.org, dmitry.torokhov@gmail.com, lee@kernel.org In-Reply-To: <20261206-axp192-v7-3-0200fc77da53@gmail.com> References: <20261206-axp192-v7-0-0200fc77da53@gmail.com> <20261206-axp192-v7-3-0200fc77da53@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Sun, 06 Dec 2026 03:22:16 +0000 X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 2 potential issues to consider: - [High] regulator: axp20x: AXP192 LDO_IO0 range overflows 4-bit vsel_mask - [Medium] regulator: axp20x: AXP192 ldoin-supply and dcdc-freq conflict with DT binding -- commit 0cc2f3cfe23f4355e786325437951c33f7ce7afb Author: Aidan MacDonald regulator: axp20x: Add support for AXP192 This commit adds regulator support for the AXP192 PMIC to the axp20x regulator driver, including regulator descriptors, DCDC2 ramp delay, DCDC frequency, and DCDC workmode configuration. > diff --git a/drivers/regulator/axp20x-regulator.c b/drivers/regulator/axp= 20x-regulator.c > index 53b1e0499c00a..efd4a3bc35d39 100644 > --- a/drivers/regulator/axp20x-regulator.c > +++ b/drivers/regulator/axp20x-regulator.c [ ... ] > +#define AXP192_LDO_IO0_V_OUT_MASK GENMASK(7, 4) [ ... ] > @@ -596,6 +627,29 @@ static const struct regulator_ops axp20x_ops_sw =3D { > .is_enabled =3D regulator_is_enabled_regmap, > }; > =20 > +static const struct regulator_desc axp192_regulators[] =3D { > + AXP_DESC(AXP192, DCDC1, "dcdc1", "vin1", 700, 3500, 25, > + AXP192_DCDC1_V_OUT, AXP192_DCDC1_V_OUT_MASK, > + AXP192_PWR_OUT_CTRL, AXP192_PWR_OUT_DCDC1_MASK), > + AXP_DESC(AXP192, DCDC2, "dcdc2", "vin2", 700, 2275, 25, > + AXP192_DCDC2_V_OUT, AXP192_DCDC2_V_OUT_MASK, > + AXP192_PWR_OUT_CTRL, AXP192_PWR_OUT_DCDC2_MASK), > + AXP_DESC(AXP192, DCDC3, "dcdc3", "vin3", 700, 3500, 25, > + AXP192_DCDC3_V_OUT, AXP192_DCDC3_V_OUT_MASK, > + AXP192_PWR_OUT_CTRL, AXP192_PWR_OUT_DCDC3_MASK), > + AXP_DESC_FIXED(AXP192, LDO1, "ldo1", "acin", 1250), > + AXP_DESC(AXP192, LDO2, "ldo2", "ldoin", 1800, 3300, 100, > + AXP192_LDO2_3_V_OUT, AXP192_LDO2_V_OUT_MASK, > + AXP192_PWR_OUT_CTRL, AXP192_PWR_OUT_LDO2_MASK), > + AXP_DESC(AXP192, LDO3, "ldo3", "ldoin", 1800, 3300, 100, > + AXP192_LDO2_3_V_OUT, AXP192_LDO3_V_OUT_MASK, > + AXP192_PWR_OUT_CTRL, AXP192_PWR_OUT_LDO3_MASK), > + AXP_DESC_IO(AXP192, LDO_IO0, "ldo_io0", "ips", 700, 3300, 100, > + AXP192_LDO_IO0_V_OUT, AXP192_LDO_IO0_V_OUT_MASK, > + AXP192_GPIO0_CTRL, AXP192_GPIO0_FUNC_MASK, > + AXP192_IO_ENABLED, AXP192_IO_DISABLED), > +}; [Severity: High] Does the 700 to 3300 mV range for AXP192_LDO_IO0 overflow the 4-bit AXP192_LDO_IO0_V_OUT_MASK? AXP_DESC_IO() gives 27 voltages (selectors 0..26) in 100 mV steps, while GENMASK(7, 4) holds only 0..15. regulator_set_voltage_sel_regmap() shifts selectors 16..26 past bit 7, so regmap_update_bits() truncates them and wraps 2300..3300 mV back to selectors 0..10. Register 0x91 bits 7:4 encode 1800..3300 mV (like AXP20X_LDO5), so selectors 0..15 also output 1100 mV more than requested, risking overvoltage on attached peripherals. Should the minimum voltage be 1800 mV instead? [ ... ] > @@ -1314,6 +1368,12 @@ static int axp20x_set_dcdc_freq(struct platform_de= vice *pdev, u32 dcdcfreq) > u32 min, max, def, step; > =20 > switch (axp20x->variant) { > + case AXP192_ID: > + min =3D 900; > + max =3D 2025; > + def =3D 1500; > + step =3D 75; > + break; [Severity: Medium] Do the AXP192 DCDC frequency range and ldoin-supply conflict with Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml? The binding puts x-powers,axp192 in the else branch of its allOf rule for x-powers,dcdc-freq (1800..4050 kHz, default 3000 kHz), which rejects values below 1800 kHz including the 1500 kHz default and allows values above 2025 kHz that axp20x_set_dcdc_freq() clamps with a warning. In axp192_regulators[], LDO2 and LDO3 also expect an ldoin-supply property that is absent from the binding while additionalProperties is false, causing dtbs_check failures for AXP192 boards. The binding also omits x-powers,axp192 from the x-powers,drive-vbus-en disallow list and the regulator-ramp-delay description. Should the binding be updated alongside this driver change? --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261206-axp192-v7-= 0-0200fc77da53@gmail.com?part=3D3