From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 575D9D2ECF7 for ; Tue, 20 Jan 2026 07:41:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=9ujOzXnq5uBKEx3dZXdVjLYzqVL/JC0/A8kL0LWjBzw=; b=HwldMZaj+4UAm/ QC4fO6qffnJOF2Evif/2MF7UCL+kPpS0vMyvGeQ+SGuoQRUdhJem7fdAGyJhCbDdi+o6mcs2Qo8cG lB5h2nNyMIjT+U++moHAPnT8CzMCcoS0HNxOkeJfICaqg0kMr75kLWafM73Ch2P9D4CWLR9lOnGmj ovX5IuNa3syut2//jAAXXGwrY1vuEC26rXONIVFS2haUAMlEYOMgqxc0lrXFGsGygzgeQB+m/Zg1e VWEUYZTudymw9CoySNJHkLkJCJ8+DevacTa3rlRVx4BEJ09PvIA9gwHfdp/a/YnK7irC+HfmQTYJP CwtIhvlyf0Iq8qogHJsg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vi6ML-00000003McX-3bqn; Tue, 20 Jan 2026 07:41:05 +0000 Received: from mx.adeep.su ([185.250.0.168]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vi6MI-00000003Mc9-00tO; Tue, 20 Jan 2026 07:41:04 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id D56C3270AA; Tue, 20 Jan 2026 10:33:41 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baodeep.com; s=dkim; t=1768894425; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:content-language:in-reply-to:references: disposition-notification-to; bh=7vazJlY7f+ipRlmtxy6NEiiscVonh33GVCHIMR/axgI=; b=F/ZuUzVedI+o80QCH+G05kHTJddLLaWdVlPdUavvyOGNDKf+A+lJdf5lDmvmrsyoaKQYNO dodA2pAX5FVq3aS74mcfcBY0euu2VNPRmUfuzmGiMZurJfjOeU/k6ojkdv6Y6543A1m4Io 09I4pB8BKtctoYCoMNYwdAlHlKRdqmlhBO4gatSt1oQrK5UVAU/U+NiNgGLXSX/pGoI0vJ UsiHSweUomrl7azJxZmErSouaRTSPhRRsNnC6RdxudfgLpxd+kEmfxquQQo39Z+ckxAykE UXnbD8clpyKdBUmxMcq4iGS1epRu7ZOVSf31vkB6/tcriwYKONCeVAedqyKZqw== Message-ID: Date: Tue, 20 Jan 2026 10:33:23 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] Eliminate Odroid HC4 power glitches during boot. To: Eric.Neulight@linuxdev.slmail.me, Rob Herring , Krzysztof Kozlowski , Conor Dooley , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org References: <20260116-odroid-hc4-dts-v1-1-459b601cd5cf@linuxdev.slmail.me> From: Viacheslav Content-Language: en-US In-Reply-To: <20260116-odroid-hc4-dts-v1-1-459b601cd5cf@linuxdev.slmail.me> X-Last-TLS-Session-Version: TLSv1.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260119_234102_711395_6A84A3F6 X-CRM114-Status: GOOD ( 20.44 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Hi! On 17/01/2026 07.02, Eric Neulight via B4 Relay wrote: > From: Eric Neulight > > Fix issue with Odroid HC4 (and all meson-sm1-odroid) DTS that causes > regulator power to momentarily glitch OFF-ON during boot. Add > regulator-boot-on to all regulator-fixed and regulator-gpio entries > that (1) define a gpio AND (2) define regulator-always-on. > > U-boot powers on devices necessary for boot then hands off the DTB to > the kernel. During probe, linux drivers/regulator/fixed.c and > gpio-regulator.c both first set the regulator control gpio (that U-boot > already turned ON) to default OFF before then setting it to the defined > (ON) state. This glitches the power to the affected devices, unless > regulator-boot-on is specified with it. In fact, U-boot has the same > behavior. So, during reboot, a power glitch can actually happen twice: > once when U-boot reads the DTB and probes the gpio and again when the > kernel reads the DTB and probes the gpio. > > Problem this fixes: On the Odroid HC4, power to the SATA ports glitches > during boot and causes some HDDs to do emergency head retract, which > should be avoided. On the HC4, power glitches to the SD card, USB, > SATA, and HDMI interfaces during boot. These are all boot devices. > A power glitch can potentially cause a problem for any sensitive devices > during boot. > > NOTE: This is not limited to just the HC4, likely an issue with ALL DTS > with regulator-fixed or regulator-gpio entries that (1) define a gpio > AND (2) define regulator-always-on. All such entries should also > include regulator-boot-on in order to avoid potential power glitches. > At worst, adding regulator-boot-on in such cases is harmless because of > regulator-always-on, and, at best, it eliminates detrimental power > glitches during boot. So, this is best-practice. > > Fixes: 164147f094ec5d0fc2c2098a888f4b50cf3096a7 ("arm64: dts: meson-sm1-odroid-hc4: add regulators controlled by GPIOH_8") > Fixes: 45d736ab17b44257e15e75e0dba364139fdb0983 ("arm64: dts: meson-sm1-odroid: add 5v regulator gpio") > Fixes: 1f80a5cf74a60997b92d2cde772edec093bec4d9 ("arm64: dts: meson-sm1-odroid: add missing enable gpio and supply for tf_io regulator") > Fixes: 88d537bc92ca035e2a9920b0abc750dd62146520 ("arm64: dts: meson: convert meson-sm1-odroid-c4 to dtsi") > > Signed-off-by: Eric Neulight > --- > arch/arm64/boot/dts/amlogic/meson-sm1-odroid-hc4.dts | 2 ++ > arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi | 3 +++ > 2 files changed, 5 insertions(+) > > diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-hc4.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-hc4.dts > index 0170139b8d32f4274ad991b0f3d9a0f6c67969ce..3ece30a0a1fff736c544cf89ed0a8cca0890f128 100644 > --- a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-hc4.dts > +++ b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-hc4.dts > @@ -52,6 +52,7 @@ p12v_0: regulator-p12v-0 { > > gpio = <&gpio GPIOH_8 GPIO_OPEN_DRAIN>; > enable-active-high; > + regulator-boot-on; > regulator-always-on; > }; > > @@ -65,6 +66,7 @@ p12v_1: regulator-p12v-1 { > > gpio = <&gpio GPIOH_8 GPIO_OPEN_DRAIN>; > enable-active-high; > + regulator-boot-on; > regulator-always-on; > }; > > diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi > index c4524eb4f0996dfbccec16ca5b936a5c3b2663a5..0bce4e8d965f2c83e6ba677fef2ede2726de6ed1 100644 > --- a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi > +++ b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi > @@ -37,6 +37,7 @@ tflash_vdd: regulator-tflash-vdd { > > gpio = <&gpio_ao GPIOAO_3 GPIO_OPEN_DRAIN>; > enable-active-high; > + regulator-boot-on; > regulator-always-on; > }; > > @@ -50,6 +51,7 @@ tf_io: gpio-regulator-tf-io { > > enable-gpios = <&gpio_ao GPIOE_2 GPIO_OPEN_DRAIN>; > enable-active-high; > + regulator-boot-on; > regulator-always-on; > > gpios = <&gpio_ao GPIOAO_6 GPIO_OPEN_SOURCE>; > @@ -81,6 +83,7 @@ vcc_5v: regulator-vcc-5v { > regulator-name = "5V"; > regulator-min-microvolt = <5000000>; > regulator-max-microvolt = <5000000>; > + regulator-boot-on; > regulator-always-on; > vin-supply = <&main_12v>; > gpio = <&gpio GPIOH_8 GPIO_OPEN_DRAIN>; > > --- > base-commit: b71e635feefc852405b14620a7fc58c4c80c0f73 > change-id: 20260116-odroid-hc4-dts-54f4254d8554 > > Best regards, Acked-by: Viacheslav Bocharov Thanks, Viacheslav _______________________________________________ linux-amlogic mailing list linux-amlogic@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-amlogic