From patchwork Tue Sep 7 16:23:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Karasev X-Patchwork-Id: 1525481 X-Patchwork-Delegate: andre.przywara@arm.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=disroot.org header.i=@disroot.org header.a=rsa-sha256 header.s=mail header.b=Ncu8I95w; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4H3tyf4Vdhz9sX3 for ; Wed, 8 Sep 2021 04:26:48 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 154CC831A0; Tue, 7 Sep 2021 20:26:34 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=disroot.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; secure) header.d=disroot.org header.i=@disroot.org header.b="Ncu8I95w"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A0B9482C89; Tue, 7 Sep 2021 18:24:22 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from knopi.disroot.org (knopi.disroot.org [178.21.23.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D6C95831A0 for ; Tue, 7 Sep 2021 18:24:18 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=disroot.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=begs@disroot.org Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id A699C67CD2; Tue, 7 Sep 2021 18:24:18 +0200 (CEST) Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZSkcczpldoIx; Tue, 7 Sep 2021 18:24:17 +0200 (CEST) From: Maxim Karasev DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1631031854; bh=YT7Gh2rHIuV11CJC9a/EYe+vht531rGRYJgPgyLi35Q=; h=From:To:Cc:Subject:Date; b=Ncu8I95wCOBQQN1iAZpBi9Bwlyn8O+Ja949qc6nPTbpaOVZQ4eeJSt27lU05TYl+1 UV4gijyX7qFfGbL9esrQ6QHBoKNbHZY9IxvuxgDXrFbK0IS3ZomCQ2KXfsdrMXHgOW Zxd5Fdt7Pe0ce8wuvtLcIjurNIagHKHphgJl0WRfTN8QRd9Ph1rrFbQYFXeNvDPybQ Q48C/hUs9zGpQfY2ji23yiiQt2Gt+43OTQad4QBCI2i0fJ2qYoMJfm1XMN9OUE0dDA HLyFQoDO8fVy2TDpTE75j1Ve0fdl2KZ9fPSMQtk89UScXvaLRYFTit7k8VpdQ9x/6o LtgFqr33xI8Og== To: u-boot@lists.denx.de Cc: Maxim Karasev Subject: [PATCH] arm: dts: sun50i-h6-orangepi-3: disable aldo2 regulator Date: Tue, 7 Sep 2021 19:23:26 +0300 Message-Id: <20210907162326.9320-1-begs@disroot.org> Mime-Version: 1.0 X-Mailman-Approved-At: Tue, 07 Sep 2021 20:26:31 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Mainline TF-A has a broken behavior - it enables all used AXP regulator outputs, without much reason. It breaks PHY on Orange Pi 3 and other boards, because they a specific power-on sequence is required. aldo2 which is enabled by TF-A is just a half of PHY's power and the other half that is untouched by TF-A must be enabled simultaneously (even a small difference may cause a break-down). If not TF-A, kernel driver would do everything correctly. However, some boards rely on this behavior, so it's impossible to get rid of it. TF-A recently started checking regulator status, and now it enables a regulator only if it's status is "okay". Disabling regulator in U-Boot's dts workarounds the problem. --- arch/arm/dts/sun50i-h6-orangepi-3.dts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/dts/sun50i-h6-orangepi-3.dts b/arch/arm/dts/sun50i-h6-orangepi-3.dts index 7e83f6146f..9f91e4ec88 100644 --- a/arch/arm/dts/sun50i-h6-orangepi-3.dts +++ b/arch/arm/dts/sun50i-h6-orangepi-3.dts @@ -207,6 +207,10 @@ regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; regulator-name = "vcc33-audio-tv-ephy-mac"; + /* This regulator must be enabled by the kernel, + * not by u-boot or TF-A, otherwise power-on + * sequence will be wrong and PHY won't work */ + status = "disabled"; }; /* ALDO3 is shorted to CLDO1 */