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: 1588 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 0D3823F08B for ; Tue, 18 Aug 2020 20:45:24 +0200 (CEST) Received: by mail-pl1-f199.google.com with SMTP id j11sf7570202plj.6 for ; Tue, 18 Aug 2020 11:45:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1597776322; cv=pass; d=google.com; s=arc-20160816; b=Fxo1TMX5q6tO1DUCLTGQzusyCWaneb0idLROQ7L5td/DNa9ydvnfKZeE4h9/YmOBoQ Bd1Juk1fn5qoU3Hub8GWtoRstrGtZ489uzicopK3Eshe/yC3kHpOIaU+S+/ZZLPqZxRT f81+EmxrObMrmUk5Rk6qku1qdbQsXNl7uv9cd+qAXI0GnsocMFfGPg5+smrQ0ztjBq0N llHBEiqdJYRbwWp7slhVaJCFUoFkL5O0BCEkjS2RiaXF9GyCUtTuptqeiuUbf55GhWlV AlNXdyBDylNEGxFj/ReNyp90dgH2+0ydnl61sd2mcLCq5f7wtnP102FntOXNaMve9i3R kMBQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:message-id:date:subject:cc:to :from:dkim-signature; bh=SDdR46pJmn8wY16SSdxyUPH7Qd6YHp86+3pBksQ+Uvw=; b=Nclnv/w45HTo4hQjBgvzW42NgI0/l6feGyip8sCHEPhJ5lKoFVRR24KTHguAf1k9aD AWTjvjPJTqz+PQGpgF7/+GrjcWYK5MUG+wEGGAqYePR4iDELPZ0N9gj2dXIz5uyU+aaD 30RcVEiU3FftomKRIWDVF99Pmz3iyjJKhoWo4H5s4paArhsglTSPOqlqqCz2GUiUuBcj 5uvBZVd7359AzavcYe8Lsz7Mkq/CZ8LhBzdL+VbY8XKzR4uRquoYolGloCgwEQcvpdh2 AxjS12seHVyjmJ86UCB1PYj5ndNGACbDMerfT+WyyRA7b62hIOHwwszB4Gb2SEjo20XF AWbQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=KkF5v2Bu; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=SDdR46pJmn8wY16SSdxyUPH7Qd6YHp86+3pBksQ+Uvw=; b=UhOFRevXCwf3wBM4o0+OHvtwFhfK/lrqc3cazWK+DhLsE8bvC8tVU8jTXGk5Yqm6/U QXx3uX9ej5S0TcvgVBpfkoGL4rimheoot39V/grg+SoEXP+QPwb1ZC+0Q0O+4HBsxfWr PA57kbi0UyQBicrFU7WeMrH9YuClO0euY5F5E= 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 :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help :list-archive:list-unsubscribe; bh=SDdR46pJmn8wY16SSdxyUPH7Qd6YHp86+3pBksQ+Uvw=; b=F5jSUAPeKszQY1Xu9oz8tGNWSyANjmLW3syLD1GMXYhZxBQWF0nv3bpRkhBOUENl6F COl2Fm2SK7YqXFhg1B8hQup4bwrcR4NLU9GcUxH0uNUS7hUpFKaoFug0yYVEdDidVRSe seb8I0YsfCmkOJd9bz/nMj5YYOUqdlz0X1RxFJi3YdxEO8py8M62igEeg/KeM6/nQ4wV gFk5JtJQ0j58pe9UWtmO0MVLGt3PisdTqLhmXhz1Q75MobiAgWtW8QrBb5zNOsuZcvKG XpPm7BzyVv3dcnA9PEei8xb3oEoenOFuy6S0uMPM2vTPiDf5Emg4vVXJPTx3SXJc1jO7 2LKw== X-Gm-Message-State: AOAM531WhVe1moQ4bxxNq4v5upvqnYggrfR87Av602Anehu5cwFoV9KF nTHjn11lgWwo4uxwuvLGjnPY0Jee X-Google-Smtp-Source: ABdhPJzf3FqCepZsCuXeQ1NAM00dfJENhmPIF63+IxWzIpVTqE+OmB6BBWyyt+ErQg9EH3oVBYeBPw== X-Received: by 2002:aa7:96b0:: with SMTP id g16mr16720098pfk.19.1597776321837; Tue, 18 Aug 2020 11:45:21 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a65:620d:: with SMTP id d13ls5867760pgv.0.gmail; Tue, 18 Aug 2020 11:45:21 -0700 (PDT) X-Received: by 2002:aa7:9e45:: with SMTP id z5mr16748911pfq.166.1597776321274; Tue, 18 Aug 2020 11:45:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597776321; cv=none; d=google.com; s=arc-20160816; b=YmfmoYFs7qxbq7FiXp+IjwGrqcfACglCALbgrJGP8jN2CdQlg6FSTDD7wp+BSSaIK0 ne6A7yfK9cOpMvE2+4m/LDHhORUlTB5iyxXfa6lxisaGInh80sYPDGaiSzoAJE7eWGmb 8u6UoaNGCCfAyEQZfWMkhbMS5/ktB5RT7qy5mL3UYTyp1qxCrpAV2hhMlVUvy4vUdhBV t8TDHH14XKYV6stDheq3lTvS7UUkUung9Wur7U9+uX3GGvyRV60fTQQ8n75yOieRsAgk bxRCkNrKBKdVPVVvNVjoxxOETtuzX+vVuOAnxCAqT0+aGLLxt2bbnD2hhtXKkqDjI3co WOWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=Zsbv5mvCbZha5zbAj1OK4YZ+BCUk3LROR/vz9Y6QKVA=; b=wBkwCgy2WNKB14UQz+kxbkY+BRLjCaXFwppWDv3kXQu/8M923VX1VmeWcM0WUwm/5U aegEyAXSrx1/aobKlguJkFI7sQhjGBbfKlTuk1U1UbFmyuykxCMGZ1AnD8KCotlVVASn B/w4k/ja+Lw4MZvphxedTfGx6u84O4ZwFY0GriDx9A5qas1oyLDPxIYf5Ge5feUuP4fC 6CMMA5hCJw8U1vnFfjI3+XsluX/H1NOGQBszbYcVKSIrni/Zd1GPbr81YF8F4abcOFR5 BUrgKA4b8KxT+LU3Z8r2KoNT6a6Xs1eIu2E/tzJvh3sPxJaOuEffcnMzIXCmbq1OoZ5r mjCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=KkF5v2Bu; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id i19sor13238046pgm.13.2020.08.18.11.45.20 for (Google Transport Security); Tue, 18 Aug 2020 11:45:20 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; 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 Cc: Suniel Mahesh , Michael Trimarchi , linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-amarula , Jagan Teki 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-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=KkF5v2Bu; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 {