From: George Stark <gnstark@salutedevices.com>
To: Nick Xie <nick@khadas.com>
Cc: <robh@kernel.org>, <khilman@baylibre.com>, <jbrunet@baylibre.com>,
<martin.blumenstingl@googlemail.com>, <neil.armstrong@linaro.org>,
<devicetree@vger.kernel.org>, <linux-amlogic@lists.infradead.org>,
<conor+dt@kernel.org>,
"kernel@salutedevices.com" <kernel@salutedevices.com>,
<linux-arm-kernel@lists.infradead.org>, <krzk+dt@kernel.org>,
<xianwei.zhao@amlogic.com>, <linux-kernel@vger.kernel.org>,
<nick@xieqinick.com>
Subject: Re: [DMARC error] [PATCH v3 3/3] arm64: dts: meson-s4-s905y4-khadas-vim1s: add initial device tree
Date: Fri, 23 Jan 2026 23:40:32 +0300 [thread overview]
Message-ID: <09df45e1-90b5-4618-9197-c724142bd83a@salutedevices.com> (raw)
In-Reply-To: <20260115030015.1334517-4-nick@khadas.com>
Hello Nick
On 1/15/26 06:00, Nick Xie wrote:
> The Khadas VIM1S uses the Amlogic S905Y4 SoC, based on the
> Amlogic S4 SoC family, on a board with the same form factor as the
> VIM/VIM2/VIM3/VIM4 models. Serial debug console, ethernet, SD card
> work with this initial device tree.
...
> + };
> +
> + /* SY8120B1ABC DC/DC Regulator. */
> + vddcpu: regulator-vddcpu {
> + compatible = "pwm-regulator";
> +
> + regulator-name = "VDDCPU";
> + regulator-min-microvolt = <689000>;
> + regulator-max-microvolt = <1049000>;
> +
> + vin-supply = <&main_5v>;
> +
> + pwms = <&pwm_ij 1 1500 0>;
> + pwm-dutycycle-range = <100 0>;
> +
> + regulator-boot-on;
> + regulator-always-on;
> + /* Voltage Duty-Cycle */
> + voltage-table = <1049000 0>,
> + <1039000 3>,
> + <1029000 6>,
> + <1019000 9>,
> + <1009000 12>,
> + <999000 14>,
> + <989000 17>,
> + <979000 20>,
> + <969000 23>,
> + <959000 26>,
> + <949000 29>,
> + <939000 31>,
> + <929000 34>,
> + <919000 37>,
> + <909000 40>,
> + <899000 43>,
> + <889000 45>,
> + <879000 48>,
> + <869000 51>,
> + <859000 54>,
> + <849000 56>,
> + <839000 59>,
> + <829000 62>,
> + <819000 65>,
> + <809000 68>,
> + <799000 70>,
> + <789000 73>,
> + <779000 76>,
> + <769000 79>,
> + <759000 81>,
> + <749000 84>,
> + <739000 87>,
> + <729000 89>,
> + <719000 92>,
> + <709000 95>,
> + <699000 98>,
> + <689000 100>;
> + };
> +};
Thanks for the patch. Since you have khadas mail I'm pretty sure you've
had the possibility to test it on the real vim board and I just don't
get it how it works with the voltage table above. The problem is that
pwm is calculated incorrectly in the upstream pwm-meson driver. That
voltage table appeared to be used in early amlogic bl loader and
appropriate pwm is initialized from a table's record. Duty cycle value
is translated to pwm regs correctly. Later when kernel start running
pwm-regulator driver is probed. It reads the pwm regs, calculates back
duty-cyle and search it in the table. Since calculation algos are not
match and the table doesn't contain full range of 0-100% values
regulator driver doesn't find current voltage. In such case regulator
core sets the minimum voltage from the table [1] and the SoC may hang
(depending on board) due to minimum voltage may be too low for the
current frequency SoC uses.
Or I'm missing something?
There's not-yet-reviewed patch that fixes pwm algo [2]. There's
calculation example in the cover letter.
[1]
https://elixir.bootlin.com/linux/v6.19-rc5/source/drivers/regulator/core.c#L1227
[2] https://lkml.iu.edu/2412.3/00826.html
--
Best regards
George
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
next prev parent reply other threads:[~2026-01-23 20:41 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-15 3:00 [PATCH v3 0/3] arm64: dts: meson-s4: add support for Khadas VIM1S Nick Xie
2026-01-15 3:00 ` [PATCH v3 1/3] dt-bindings: arm: amlogic: introduce specific compatibles for S4 family Nick Xie
2026-01-15 9:27 ` Krzysztof Kozlowski
2026-01-15 3:00 ` [PATCH v3 2/3] arm64: dts: meson-s4-aq222: update compatible string with s805x2 Nick Xie
2026-01-15 10:25 ` neil.armstrong
2026-01-15 3:00 ` [PATCH v3 3/3] arm64: dts: meson-s4-s905y4-khadas-vim1s: add initial device tree Nick Xie
2026-01-15 10:25 ` neil.armstrong
2026-01-23 20:40 ` George Stark [this message]
2026-01-26 9:35 ` 回复: [DMARC error] " Nick Xie
2026-01-29 14:48 ` George Stark
2026-02-09 22:31 ` Martin Blumenstingl
2026-02-13 11:00 ` George Stark
2026-01-15 10:36 ` [PATCH v3 0/3] arm64: dts: meson-s4: add support for Khadas VIM1S Neil Armstrong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=09df45e1-90b5-4618-9197-c724142bd83a@salutedevices.com \
--to=gnstark@salutedevices.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jbrunet@baylibre.com \
--cc=kernel@salutedevices.com \
--cc=khilman@baylibre.com \
--cc=krzk+dt@kernel.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=neil.armstrong@linaro.org \
--cc=nick@khadas.com \
--cc=nick@xieqinick.com \
--cc=robh@kernel.org \
--cc=xianwei.zhao@amlogic.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®