From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f46.google.com (mail-ej1-f46.google.com [209.85.218.46]) (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 5E0DC2581 for ; Tue, 20 Jan 2026 01:32:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768872730; cv=none; b=nzTUg84EOu8APmX0k032fZwDNbBAaZhfY1O2ooKw6FfjDo1XUyqzgYr7J2mFmw00Awliu/OCvgOtotmXnCeYjfmXr/xjo2EjIKY58dxbJbZYOzX8AjlGqKi91nBEHBdRGnTnnuE41CnNGuvKiyo7qEZ0KafyAtR2fA5BCPEf24c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768872730; c=relaxed/simple; bh=IzK/oXR2CPlm/a1M1pjeXu2at94YQZynWPoclijvgHU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=OuL+F6UsTM7Bt0b1emF931LYAgH0eqI29ddyYmtbDEU0/VXEl7GFxIJ2k0Z3iGIQU8NlLt5MgfM4f0gBURYvhmhovYCc74qb3f3fsDpB2tguoqNoOt5XCW/eVjgXGEpA1vpcc8tIpGEyXEOO8Ogo/sL5ZI3wEOURm3PdFkwXEU0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pardini.net; spf=pass smtp.mailfrom=pardini.net; dkim=pass (2048-bit key) header.d=pardini.net header.i=@pardini.net header.b=hMrTzOk7; arc=none smtp.client-ip=209.85.218.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pardini.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pardini.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pardini.net header.i=@pardini.net header.b="hMrTzOk7" Received: by mail-ej1-f46.google.com with SMTP id a640c23a62f3a-b872f1c31f1so640779666b.0 for ; Mon, 19 Jan 2026 17:32:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pardini.net; s=google; t=1768872727; x=1769477527; 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=oA9EJA38Ao+A32i9rXYjoTfg7C61pSIvbeavCfCz8zc=; b=hMrTzOk7aqivEZxysfoToYe6E/ebWpa5BKJGc0aL90JIpxHM/w3LZFJe7IJcs5cFzA jb2U5ynIhKtfcLX52CgC9VZcT8qZB1I8ntnn2RIGz+LwfV+OoWNV4ZtS7s/nGcdcAg+r nrJApEFxpIC53aVcVEzDRhvYRR7tsDUymIIRye5FMpes7DXXq2msN8Q93qtrRuL98qKt hZ5uOAzVCKrAeVM2V6J3PqXB9FcF/T1FZlZDNSWailIec64fB2yR84R6OOpH3chjos2y 5NI8VFsZsYFpwWSJ/XYcpI2LHgxrVqFDjmO4uFF7BKv8oLypTrMwQG3X0ttms4M4a8Rh j3rQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768872727; x=1769477527; 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=oA9EJA38Ao+A32i9rXYjoTfg7C61pSIvbeavCfCz8zc=; b=F8kz/XRTcN5vFsBp7BqpcGTj7+TU36tbYpCVIaCoMo93a0BdpU5Msp+aIi2ROdLkoC qq0e/TgASSvG2PivaQSWgTA5XhIhpdaqf8JWwHM021wHH8s/XYLN9TeeW7ZkTYGC2I0/ bEAneD7ynhBeEguLUDWMDvY99/oVzv6pCiq8gGGFto04cI/utXSNOetYcw+xJ2xX/TVc RzJKgIcogj0gRIqNpdzX8QbtyvsFAgjP5C5rIx/INSJFXG71//RiiqRVxkCQkzQzaH3Z y6+EgBxRybVLk3PFn8oU2hi3nnw3lXacZE3/AEoq+VNBZ8mMCshd/u6/En/C4Fz0GsgD EEtg== X-Forwarded-Encrypted: i=1; AJvYcCVGf+si0BI0vEzKxVOkhFvsQeeNmkf0isTonai5dg+paC54uO7guzZxwusjR04hCgjaIKihdOcvbV+yBmE=@vger.kernel.org X-Gm-Message-State: AOJu0YyExQLwseXvDDSIja8uyZc3Kl5FNwLdK9e/zhnkpozEBnKxkdMS k28iMrVHl8Bh5qpaga2XXhmX2I4Wvu04hHhdNX4WlVo1xO/TQPT1RZGjfcmLoLtHMw== X-Gm-Gg: AZuq6aJLh3Pv6yGbe/TY+qX1cCy56OjHIatFDW2qnhXbZyinV5/F9YOzd9fNR31eAET IiQtUnTf5fJa68c62WgdUD+JUlqPaseA1z4geB4GES+kwzyrG93hov4D+5blg9risRvchxqsI57 ZcONz3Hqg9JvxDUscwIBQRihWuPkPr0ep3IqzD/fUt7YygEnNDBWiHR083z2e9tpp5jK0FcpHT8 66zv74kAHD8e+7lPSL6mCr+f1+XIAQMtFUSxw/rEHAiuYvFwa/sLWppYFmEU9JrY0pda3IMVRnb dWYQPnfTlwtDMrtSoM6HcmxvZLugzW2L6u115rik4fH6Opjx0mdd9TWZYOdPSxo/BuP1iCX62TW 6HuBgPs9T0v0UvMOimxa1ob5p5IcIKSE/BdxOOulcAhKjdQXThMxdKjWLhm8oTB6bgEr2Ahe0/y 2ClnZ1cZW5FjEszv6AtQw3DwjEPTfLJa6ezEDDdYOruLUDgC3EDWVKQfhvz+RRW6zqPpF2ZZ/fB u9N5leEOCyfw1Q48GXHOX73+N7l71WRew22lrsscfyic6DWtc6SUbPT2Q== X-Received: by 2002:a17:907:fd17:b0:b87:7cb9:c3dc with SMTP id a640c23a62f3a-b880064d660mr16596666b.32.1768872726489; Mon, 19 Jan 2026 17:32:06 -0800 (PST) Received: from ?IPV6:2a02:a466:4d7a:0:6c50:b577:541e:d133? (2a02-a466-4d7a-0-6c50-b577-541e-d133.fixed6.kpn.net. [2a02:a466:4d7a:0:6c50:b577:541e:d133]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b8795169f10sm1269998766b.26.2026.01.19.17.32.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 19 Jan 2026 17:32:05 -0800 (PST) Message-ID: <80837c50-8721-48e7-83bf-223dfc5a3a22@pardini.net> Date: Tue, 20 Jan 2026 02:32:05 +0100 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] 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> Content-Language: en-US From: Ricardo Pardini In-Reply-To: <20260116-odroid-hc4-dts-v1-1-459b601cd5cf@linuxdev.slmail.me> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 17/01/2026 05:02, Eric Neulight via B4 Relay wrote: > 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, Tested with 6.19-rc5 base on an Odroid-HC4 running with a single 2.5" HDD. This patch does not solve (as I hoped) unrelated/long standing issues like the "famous" disk noise at/~around PCIe/AHCI probe time nor the fact the 5V rail can't properly power two 5V disks when at least one of them is spinning rust -- but also doesn't cause any new problems that I can detect (SMART etc). I hope someone with 12V disks could take a this for a spin and report further; I really can't take mine out of "production" anytime soon. Tested-by: Ricardo Pardini # on Odroid-HC4 5V HDD Thanks, Ricardo