From patchwork Tue Aug 18 18:45:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 11722105 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 645BC913 for ; Tue, 18 Aug 2020 18:47:35 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3AF66206B5 for ; Tue, 18 Aug 2020 18:47:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="wMbtsU8r"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="KkF5v2Bu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3AF66206B5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=9eAcvyhzh2altnR2WFZHamhMqo3zwOcjItvV+Kx7DkU=; b=wMbtsU8rQYCpunTZWsCi7JZCci A0sC80TvnJ0J3WtSECfuZmsX9nakRpwjIH5+zRQ02+MMcK832wc4tiLFXEP2cGmjowzU6R12mZUDo 5GAhs/5IXbawbmvjfyZeFVeMg4+GBsig2kZ1TYHr1ya928DasBZIbVRXVbqrYqm88PePl1XCSvPsH Y8mJ+EcnmsyghkoNWyd3RuXnWrW0F5dDEUByvmt/7GiNRbAbGYsZWyXm0tTX6mn4ARdOSyfuexU6r z4OCuPegwr/sNcq0+OyIz2D87Mo1u9era0mD5tdSHbUFTMoyacrzTP7jNaZ1aJd39PPGE4K0CkZpA YKr+tCyQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k86bz-0004a2-Rp; Tue, 18 Aug 2020 18:45:31 +0000 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k86bu-0004YV-Du for linux-arm-kernel@lists.infradead.org; Tue, 18 Aug 2020 18:45:29 +0000 Received: by mail-pf1-x444.google.com with SMTP id k18so10392448pfp.7 for ; Tue, 18 Aug 2020 11:45:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Zsbv5mvCbZha5zbAj1OK4YZ+BCUk3LROR/vz9Y6QKVA=; b=KkF5v2BuZGd2iCldjPP3synY06xB4ELU6I9s9TsaRG7KnLcwop4DMFGlpFTWv5Xy+X ofRk7La8JMG3SwdgZUGh8eAUBFeB4o/6lLw2usFOzGVPB3BlayOuITC9g6xNcMC5Eno/ 9UsIwRhcRBKGe4P2ubvHSxj/lyBPEBQFSM3Sg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Zsbv5mvCbZha5zbAj1OK4YZ+BCUk3LROR/vz9Y6QKVA=; b=K1IO38XpoAHnoIn3ay4yNCQpx5TmlHL5AUfwnhe50aY4jqu53BVS5cz4F2EASmQawo HfQ8NVQUHAQneV4t6H2R4Myok8BD9kRod4tI2C5Afde82PFqkb5+YTd9Be2WvTgf/xL9 a2GklYHev89ov5ORrt6xOFqmWGRIx5vJDISMFIKsoaYI0xUV/oIOfJNGFxlINFoROOah 9quu48CU+GkzdK884bM+pSLzCBY076qfcZDtFQFvCJwwTWF1CwW4JP1Ya+2Nj1SHt38S 8nFCR6LGG/mvSN0v13mbSVTh6avwmGDsYkIQ0Qo1fRrLneSp+5yEZ8Cv382upvlt/2ix 1skw== X-Gm-Message-State: AOAM532bXsn5v0ZCqnGx7d+EpGReFZ2Y4BliZRKkEzuIRxl88yduoLAS TOQdSnaO/bdzjEOyfNg5dZjW7Q== X-Google-Smtp-Source: ABdhPJzlZUhxovAfWJU6AM4joByBcaCE6DP0XKdwA0weM+mLByskkNrau/g+/nJe8iuBfpPiTSD4tw== X-Received: by 2002:a63:d048:: with SMTP id s8mr13866840pgi.171.1597776319942; Tue, 18 Aug 2020 11:45:19 -0700 (PDT) Received: from ub-XPS-13-9350.pdxnet.pdxeng.ch ([49.37.132.72]) by smtp.gmail.com with ESMTPSA id i14sm14459022pfu.50.2020.08.18.11.45.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Aug 2020 11:45:19 -0700 (PDT) From: Jagan Teki To: Rob Herring , Heiko Stuebner Subject: [PATCH] arm64: dts: rockchip: Fix power routing to support POE Date: Wed, 19 Aug 2020 00:15:05 +0530 Message-Id: <20200818184505.30064-1-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200818_144526_494300_F176CC2B X-CRM114-Status: GOOD ( 13.30 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:444 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, Jagan Teki , Suniel Mahesh , Michael Trimarchi , linux-amarula , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org When POE used, the current power routing is failing to power-up the PMIC regulators which cause Linux boot hangs. This patch is trying to update the power routing in order to support Type C0 and POE powering methods. As per the schematics, sys_12v is a common output power regulator when type c and POE power being used. sys_12v is supplied by dc_12v which is supplied from MP8859 in type c0 power routing and sys_12v is supplied by MP8009 PoE PD in POE power supply routing. Signed-off-by: Jagan Teki Tested-by: Suniel Mahesh --- .../dts/rockchip/rk3399-roc-pc-mezzanine.dts | 18 ++++++++++++++++-- .../arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi | 12 ++++++++++-- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dts b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dts index 2acb3d500fb9..754627d97144 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dts @@ -11,6 +11,16 @@ / { model = "Firefly ROC-RK3399-PC Mezzanine Board"; compatible = "firefly,roc-rk3399-pc-mezzanine", "rockchip,rk3399"; + /* MP8009 PoE PD */ + poe_12v: poe-12v { + compatible = "regulator-fixed"; + regulator-name = "poe_12v"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <12000000>; + regulator-max-microvolt = <12000000>; + }; + vcc3v3_ngff: vcc3v3-ngff { compatible = "regulator-fixed"; regulator-name = "vcc3v3_ngff"; @@ -22,7 +32,7 @@ vcc3v3_ngff: vcc3v3-ngff { regulator-boot-on; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; - vin-supply = <&dc_12v>; + vin-supply = <&sys_12v>; }; vcc3v3_pcie: vcc3v3-pcie { @@ -34,10 +44,14 @@ vcc3v3_pcie: vcc3v3-pcie { pinctrl-0 = <&vcc3v3_pcie_en>; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; - vin-supply = <&dc_12v>; + vin-supply = <&sys_12v>; }; }; +&sys_12v { + vin-supply = <&poe_12v>; +}; + &pcie_phy { status = "okay"; }; diff --git a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi index b85ec31cd283..e7a459fa4322 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi @@ -110,6 +110,14 @@ vcc_vbus_typec0: vcc-vbus-typec0 { regulator-max-microvolt = <5000000>; }; + sys_12v: sys-12v { + compatible = "regulator-fixed"; + regulator-name = "sys_12v"; + regulator-always-on; + regulator-boot-on; + vin-supply = <&dc_12v>; + }; + /* switched by pmic_sleep */ vcc1v8_s3: vcca1v8_s3: vcc1v8-s3 { compatible = "regulator-fixed"; @@ -141,7 +149,7 @@ vcc3v3_sys: vcc3v3-sys { regulator-boot-on; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; - vin-supply = <&dc_12v>; + vin-supply = <&sys_12v>; }; vcca_0v9: vcca-0v9 { @@ -186,7 +194,7 @@ vcc_sys: vcc-sys { regulator-boot-on; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; - vin-supply = <&dc_12v>; + vin-supply = <&sys_12v>; }; vdd_log: vdd-log {