From: Neil Armstrong <neil.armstrong@linaro.org>
To: Lucas Tanure <tanure@linux.com>,
Kevin Hilman <khilman@baylibre.com>,
Jerome Brunet <jbrunet@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Stephen Boyd <sboyd@kernel.org>
Cc: Jian Hu <jian.hu@amlogic.com>,
Ronald Claveau <linux-kernel-dev@aliel.fr>,
Brian Masney <bmasney@redhat.com>,
Chuan Liu <chuan.liu@amlogic.com>,
linux-arm-kernel@lists.infradead.org,
linux-amlogic@lists.infradead.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org
Subject: Re: [PATCH 3/4] arm64: dts: amlogic: t7: khadas-vim4: add the PWM-driven supplies
Date: Sun, 30 Aug 2026 15:01:53 +0200 [thread overview]
Message-ID: <2bbff6c2-7308-4152-b7fa-f24e95541aa5@linaro.org> (raw)
In-Reply-To: <20260829094758.23248-4-tanure@linux.com>
On 8/29/26 11:47, Lucas Tanure wrote:
> The board powers its two CPU clusters, the GPU, the NPU, the memory and
> the always-on domain from regulators steered by PWM outputs. None of
> them were described, so Linux treated those outputs as unused and
> switched them off part way through boot. The supplies then drifted away
> from the levels the bootloader had set, which showed up as random hangs
> and memory corruption.
>
> Describe each supply so it has an owner and is left alone.
>
> The voltage ranges are read off the feedback networks on the board
> schematic. VDDNPU is deliberately not the range in Amlogic's own
> device tree: this board fits a different feedback resistor, which
> puts it about 40mV higher at both ends.
>
> Fixes: 8c45bf9ae4ef ("arm64: dts: amlogic: t7: khadas-vim4: Add power regulators")
> Assisted-by: Claude:claude-opus-5
> Signed-off-by: Lucas Tanure <tanure@linux.com>
> ---
> .../amlogic/amlogic-t7-a311d2-khadas-vim4.dts | 110 +++++++++++++++++-
> 1 file changed, 109 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts b/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts
> index c94afaaf8826..77abfd555ec5 100644
> --- a/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts
> +++ b/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts
> @@ -104,6 +104,66 @@ vcc5v0_usb: regulator-vcc-usb {
> enable-active-high;
> };
>
> + vdd_ddr: regulator-vddddr {
> + /*
> + * SY8003ADFC Regulator.
> + */
> + compatible = "pwm-regulator";
> + regulator-name = "VDDDDR";
> + regulator-min-microvolt = <690000>;
> + regulator-max-microvolt = <890000>;
> + pwm-supply = <&dc_in>;
> + pwms = <&pwm_ao_gh 0 1500 0>;
> + pwm-dutycycle-range = <100 0>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> +
> + vdd_ee: regulator-vddee {
> + /*
> + * MP8756GD Regulator.
> + */
> + compatible = "pwm-regulator";
> + regulator-name = "VDDEE";
> + regulator-min-microvolt = <700000>;
> + regulator-max-microvolt = <922000>;
> + pwm-supply = <&dc_in>;
> + pwms = <&pwm_ao_ab 0 1500 0>;
> + pwm-dutycycle-range = <100 0>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> +
> + vdd_gpu: regulator-vddgpu {
> + /*
> + * SY8003ADFC Regulator.
> + */
> + compatible = "pwm-regulator";
> + regulator-name = "VDDGPU";
> + regulator-min-microvolt = <700000>;
> + regulator-max-microvolt = <922000>;
> + pwm-supply = <&dc_in>;
> + pwms = <&pwm_ao_ef 0 1500 0>;
> + pwm-dutycycle-range = <100 0>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> +
> + vdd_npu: regulator-vddnpu {
> + /*
> + * SY8003ADFC Regulator.
> + */
> + compatible = "pwm-regulator";
> + regulator-name = "VDDNPU";
> + regulator-min-microvolt = <733000>;
> + regulator-max-microvolt = <933000>;
> + pwm-supply = <&dc_in>;
> + pwms = <&pwm_ao_ef 1 1500 0>;
> + pwm-dutycycle-range = <100 0>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> +
> vddao_1v8: regulator-vddao-1v8 {
> compatible = "regulator-fixed";
> regulator-name = "VDDAO_1V8";
> @@ -122,6 +182,36 @@ vddao_3v3: regulator-vddao-3v3 {
> regulator-always-on;
> };
>
> + vddcpu_a: regulator-vddcpu-a {
> + /*
> + * MP8756GD Regulator.
> + */
> + compatible = "pwm-regulator";
> + regulator-name = "VDDCPU_A";
> + regulator-min-microvolt = <689000>;
> + regulator-max-microvolt = <1049000>;
> + pwm-supply = <&dc_in>;
> + pwms = <&pwm_ao_cd 1 1500 0>;
> + pwm-dutycycle-range = <100 0>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> +
> + vddcpu_b: regulator-vddcpu-b {
> + /*
> + * MP8756GD Regulator.
> + */
> + compatible = "pwm-regulator";
> + regulator-name = "VDDCPU_B";
> + regulator-min-microvolt = <689000>;
> + regulator-max-microvolt = <1049000>;
> + pwm-supply = <&dc_in>;
> + pwms = <&pwm_ao_ab 1 1500 0>;
> + pwm-dutycycle-range = <100 0>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> +
> vddio_1v8: regulator-vddio-1v8 {
> compatible = "regulator-fixed";
> regulator-name = "VDDIO_1V8";
> @@ -172,9 +262,27 @@ &pwm_ab {
> pinctrl-names = "default";
> };
>
> +&pwm_ao_ab {
> + status = "okay";
> + pinctrl-0 = <&pwm_ao_a_pins>, <&pwm_ao_b_pins>;
> + pinctrl-names = "default";
> +};
> +
> &pwm_ao_cd {
> status = "okay";
> - pinctrl-0 = <&pwm_ao_c_d_pins>;
> + pinctrl-0 = <&pwm_ao_c_d_pins>, <&pwm_ao_d_pins>;
> + pinctrl-names = "default";
> +};
> +
> +&pwm_ao_ef {
> + status = "okay";
> + pinctrl-0 = <&pwm_ao_e_pins>, <&pwm_ao_f_pins>;
> + pinctrl-names = "default";
> +};
> +
> +&pwm_ao_gh {
> + status = "okay";
> + pinctrl-0 = <&pwm_ao_g_e_pins>;
> pinctrl-names = "default";
> };
>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Thanks,
Neil
next prev parent reply other threads:[~2026-08-30 13:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-29 9:47 [PATCH 0/4] arm64: amlogic: t7: describe the VIM4 supplies and keep the fabric clocks running Lucas Tanure
2026-08-29 9:47 ` [PATCH 1/4] clk: meson: t7: keep the memory " Lucas Tanure
2026-08-29 9:47 ` [PATCH 2/4] arm64: dts: amlogic: t7: fix the pin groups of two PWM outputs Lucas Tanure
2026-08-30 13:06 ` Neil Armstrong
2026-08-29 9:47 ` [PATCH 3/4] arm64: dts: amlogic: t7: khadas-vim4: add the PWM-driven supplies Lucas Tanure
2026-08-30 13:01 ` Neil Armstrong [this message]
2026-08-29 9:47 ` [PATCH 4/4] arm64: dts: amlogic: t7: fix the pin groups of the vsync PWM Lucas Tanure
2026-08-30 13:02 ` 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=2bbff6c2-7308-4152-b7fa-f24e95541aa5@linaro.org \
--to=neil.armstrong@linaro.org \
--cc=bmasney@redhat.com \
--cc=chuan.liu@amlogic.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jbrunet@baylibre.com \
--cc=jian.hu@amlogic.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-clk@vger.kernel.org \
--cc=linux-kernel-dev@aliel.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=robh@kernel.org \
--cc=sboyd@kernel.org \
--cc=tanure@linux.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