Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2191003imm; Tue, 10 Jul 2018 15:06:21 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfb8p+KWdFGhzHnlhsaFI4Qefz1ezs/tfuRrgiO+Mid8eHIbXhZIHGwNSze/YlP66QdEf3k X-Received: by 2002:a62:c00c:: with SMTP id x12-v6mr27381763pff.216.1531260381140; Tue, 10 Jul 2018 15:06:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531260381; cv=none; d=google.com; s=arc-20160816; b=fpx5VHR71MFMa9x26UGFo6b2MiSKJBttwZK3X11WwYpd6Dc8AK/3lyCr+hzNoI3BHB HCZhZchS/1+FY9BzJDd9/kwMRXrwGlSn/0z1RPjYMVugNmj2Sd+mMfFfAwS5Th7Gg9RF UFQ131Vs8B8cBrAnWmA8b7jzz5G4/Qr8bx5g44JfId7rIchkzvikiZrj8Dv+iJZesueP /vYFySpHHYaxCLISzz+WXgZX7PLqcKT5L3u1x7t4xe8ktvL0mH94CAj/cS+Cgrmrn36O H4w6PoO9Kibm4YPoeQUSTNwbM5gv+TTK5Qt16RAr/24dHG/Vyow3nVW9C0RJGqN1qmxh naQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=n0rOonbXXXymQ9EgvKJ2+UPwpQyqHuEbrU6dHcgqT7U=; b=JX3RCTCa/yAQPAVV50VAxBd2mujYADq7IrQDYHhGRRM2T7r6XwISvz2725T/5u9lkN 6JN0/4alwvuoyE9GV8cIDTwQGXPmcv/kVTTVlfBGKnwc8h+T00Q5W4sShsesZvF3WjgR ECXrVTwgrdc4oWs32v13bi3fb75pvXNzHjxGCDrpg73D2vbXssfs2CHkY6j5ZJXJ73aS 5Qv6xRzjYJDX22TQqvtyvFWe5WGDpqY5CJG5DdKU2lpEhD9Cfqp9GVRQW819P6hPBP72 r1FcBmZTpQvIvleKx9yhMZ5wSacYfc6DACSQW0rxp8hdMjmL6jAToCfR/8Repn1jcPL0 c0EA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=VoZpGwaN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x128-v6si17575648pgx.156.2018.07.10.15.06.05; Tue, 10 Jul 2018 15:06:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=VoZpGwaN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732339AbeGJWFC (ORCPT + 99 others); Tue, 10 Jul 2018 18:05:02 -0400 Received: from mail-pl0-f66.google.com ([209.85.160.66]:41032 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732258AbeGJWFB (ORCPT ); Tue, 10 Jul 2018 18:05:01 -0400 Received: by mail-pl0-f66.google.com with SMTP id w8-v6so8211270ply.8 for ; Tue, 10 Jul 2018 15:03:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=n0rOonbXXXymQ9EgvKJ2+UPwpQyqHuEbrU6dHcgqT7U=; b=VoZpGwaNGq4Sv9eXLBjhwSHlbhNaBEkRdoZKJiKSV06yA5TqwRKdslwayFXA1pEEuy Za44uz1mjvMWGDGbW+U9HxhB/Xe48fHGdbETu9ToPCx9O+6WrdfGXNt/qx1JhSr0GiJE ONKTE0D0ceGy3y5lPla5bwUu4rAi7R8Kpvdpw= 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:in-reply-to :references; bh=n0rOonbXXXymQ9EgvKJ2+UPwpQyqHuEbrU6dHcgqT7U=; b=ssFktb6Lp0MvUk0LPSkPs7fPFEZUIOdJKk/1Hy+KVbf7t4neiwIQnnQM+nWgXwXg2v kp+e0YwQbKF2OOEvD8L/Oc1W8OdbhOc6OXiZCTiXkKIikWz1A68xwUBOiuZ/NfRqLwFW S2L6zkVRq2aumkbPIaKQjBgqWYwywCdi3BOmf30jojtk/nASK7KaaJgCbIKj7qFasVeQ Df9Mlf9mNP6FO1pKQgTPGoSARqxUo1FGNBV3T6Wgzq4tQIt2wG3lwnAUAcZz8vpX5oUv FtcrUmxgGt1RJ3W3jYJaqqUBYQsLr5b2VfSzE7qG6Uy28h4H3bTsWRaXerHUjpVNhTJg NVhw== X-Gm-Message-State: APt69E3+RydC9WZwAU8Id90GeXh1hoSpROvxsQ7xH+QmPuDh2V4vi0v7 e5/4Mtzl/rIrPT4XjK3JVRuyOA== X-Received: by 2002:a17:902:ba97:: with SMTP id k23-v6mr26342358pls.259.1531260236557; Tue, 10 Jul 2018 15:03:56 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:0:1000:1501:38e4:86fe:ec0c:4007]) by smtp.gmail.com with ESMTPSA id y69-v6sm34939756pfd.36.2018.07.10.15.03.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Jul 2018 15:03:55 -0700 (PDT) From: Douglas Anderson To: Andy Gross Cc: Bjorn Andersson , swboyd@chromium.org, tfiga@chromium.org, Manu Gautam , David Collins , Vivek Gautam , Douglas Anderson , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Rob Herring , David Brown , Will Deacon , Mark Rutland , linux-soc@vger.kernel.org, Catalin Marinas , linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/3] arm64: dts: qcom: sdm845-mtp: Add RPMh VRM/XOB regulators Date: Tue, 10 Jul 2018 15:02:01 -0700 Message-Id: <20180710220202.116404-3-dianders@chromium.org> X-Mailer: git-send-email 2.18.0.203.gfac676dfb9-goog In-Reply-To: <20180710220202.116404-1-dianders@chromium.org> References: <20180710220202.116404-1-dianders@chromium.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add regulator devices for PMIC regulators managed via VRM and XOB RPMh accelerators. A few notes here: - Regulators are added directly to the board file. While it's true that this will mean a bunch of copy/pasting for other boards that are very similar to MTP, this is probably the right call since boards could make changes to the way these regulators are hooked up and trying to find a way to avoid duplication will result in some confusing node overrides. - Regulators are always given labels based on the schematic. If there is more than one logical name on the schematic for the same rail the all of these secondary names are also listed and should be referred to as appropriate. - Regulators all default to HPM mode with the assumption that if a rail is being provided to a driver that doesn't specify the needed current that we'll at least be correct. NOTE: This patch is loosely based on one originally shared to me by David Collins. Signed-off-by: Douglas Anderson --- arch/arm64/boot/dts/qcom/sdm845-mtp.dts | 446 ++++++++++++++++++++++++ 1 file changed, 446 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sdm845-mtp.dts b/arch/arm64/boot/dts/qcom/sdm845-mtp.dts index 6d651f314193..1db4b9735e70 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-mtp.dts +++ b/arch/arm64/boot/dts/qcom/sdm845-mtp.dts @@ -7,6 +7,7 @@ /dts-v1/; +#include #include "sdm845.dtsi" / { @@ -20,6 +21,451 @@ chosen { stdout-path = "serial0:115200n8"; }; + + vph_pwr: vph-pwr-regulator { + compatible = "regulator-fixed"; + regulator-name = "vph_pwr"; + regulator-min-microvolt = <3700000>; + regulator-max-microvolt = <3700000>; + }; + + /* + * Apparently RPMh does not provide support for PM8998 S4 because it + * is always-on; model it as a fixed regulator. + */ + vreg_s4a_1p8: pm8998-smps4 { + compatible = "regulator-fixed"; + regulator-name = "vreg_s4a_1p8"; + + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + + regulator-always-on; + regulator-boot-on; + }; +}; + +&apps_rsc { + pm8998-rpmh-regulators { + compatible = "qcom,pm8998-rpmh-regulators"; + qcom,pmic-id = "a"; + + vdd-s1-supply = <&vph_pwr>; + vdd-s2-supply = <&vph_pwr>; + vdd-s3-supply = <&vph_pwr>; + vdd-s4-supply = <&vph_pwr>; + vdd-s5-supply = <&vph_pwr>; + vdd-s6-supply = <&vph_pwr>; + vdd-s7-supply = <&vph_pwr>; + vdd-s8-supply = <&vph_pwr>; + vdd-s9-supply = <&vph_pwr>; + vdd-s10-supply = <&vph_pwr>; + vdd-s11-supply = <&vph_pwr>; + vdd-s12-supply = <&vph_pwr>; + vdd-s13-supply = <&vph_pwr>; + vdd-l1-l27-supply = <&vreg_s7a_1p025>; + vdd-l2-l8-l17-supply = <&vreg_s3a_1p35>; + vdd-l3-l11-supply = <&vreg_s7a_1p025>; + vdd-l4-l5-supply = <&vreg_s7a_1p025>; + vdd-l6-supply = <&vph_pwr>; + vdd-l7-l12-l14-l15-supply = <&vreg_s5a_2p04>; + vdd-l9-supply = <&vreg_bob>; + vdd-l10-l23-l25-supply = <&vreg_bob>; + vdd-l13-l19-l21-supply = <&vreg_bob>; + vdd-l16-l28-supply = <&vreg_bob>; + vdd-l18-l22-supply = <&vreg_bob>; + vdd-l20-l24-supply = <&vreg_bob>; + vdd-l26-supply = <&vreg_s3a_1p35>; + vin-lvs-1-2-supply = <&vreg_s4a_1p8>; + + vreg_s2a_1p125: smps2 { + regulator-min-microvolt = <1100000>; + regulator-max-microvolt = <1100000>; + }; + + vreg_s3a_1p35: smps3 { + regulator-min-microvolt = <1352000>; + regulator-max-microvolt = <1352000>; + }; + + vreg_s5a_2p04: smps5 { + regulator-min-microvolt = <1904000>; + regulator-max-microvolt = <2040000>; + }; + + vreg_s7a_1p025: smps7 { + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <1028000>; + }; + + vdd_qusb_hs0: + vdda_hp_pcie_core: + vdda_mipi_csi0_0p9: + vdda_mipi_csi1_0p9: + vdda_mipi_csi2_0p9: + vdda_mipi_dsi0_pll: + vdda_mipi_dsi1_pll: + vdda_qlink_lv: + vdda_qlink_lv_ck: + vdda_qrefs_0p875: + vdda_pcie_core: + vdda_pll_cc_ebi01: + vdda_pll_cc_ebi23: + vdda_sp_sensor: + vdda_ufs1_core: + vdda_ufs2_core: + vdda_usb1_ss_core: + vdda_usb2_ss_core: + vreg_l1a_0p875: ldo1 { + regulator-min-microvolt = <880000>; + regulator-max-microvolt = <880000>; + regulator-initial-mode = + ; + regulator-allow-set-load; + regulator-allowed-modes = + ; + }; + + vddpx_10: + vreg_l2a_1p2: ldo2 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-initial-mode = + ; + regulator-allow-set-load; + regulator-allowed-modes = + ; + regulator-always-on; + }; + + vreg_l3a_1p0: ldo3 { + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1000000>; + regulator-initial-mode = + ; + regulator-allow-set-load; + regulator-allowed-modes = + ; + }; + + vreg_l5a_0p8: ldo5 { + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <800000>; + regulator-initial-mode = + ; + regulator-allow-set-load; + regulator-allowed-modes = + ; + }; + + vreg_l6a_1p8: ldo6 { + regulator-min-microvolt = <1856000>; + regulator-max-microvolt = <1856000>; + regulator-initial-mode = + ; + regulator-allow-set-load; + regulator-allowed-modes = + ; + }; + + vreg_l7a_1p8: ldo7 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = + ; + regulator-allow-set-load; + regulator-allowed-modes = + ; + }; + + vreg_l8a_1p2: ldo8 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1248000>; + regulator-initial-mode = + ; + regulator-allow-set-load; + regulator-allowed-modes = + ; + }; + + vreg_l9a_1p8: ldo9 { + regulator-min-microvolt = <1704000>; + regulator-max-microvolt = <2928000>; + regulator-initial-mode = + ; + regulator-allow-set-load; + regulator-allowed-modes = + ; + }; + + vreg_l10a_1p8: ldo10 { + regulator-min-microvolt = <1704000>; + regulator-max-microvolt = <2928000>; + regulator-initial-mode = + ; + regulator-allow-set-load; + regulator-allowed-modes = + ; + }; + + vreg_l11a_1p0: ldo11 { + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1048000>; + regulator-initial-mode = + ; + regulator-allow-set-load; + regulator-allowed-modes = + ; + }; + + vdd_qfprom: + vdd_qfprom_sp: + vdda_apc1_cs_1p8: + vdda_gfx_cs_1p8: + vdda_qrefs_1p8: + vdda_qusb_hs0_1p8: + vddpx_11: + vreg_l12a_1p8: ldo12 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = + ; + regulator-allow-set-load; + regulator-allowed-modes = + ; + }; + + vddpx_2: + vreg_l13a_2p95: ldo13 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2960000>; + regulator-initial-mode = + ; + regulator-allow-set-load; + regulator-allowed-modes = + ; + }; + + vreg_l14a_1p88: ldo14 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1880000>; + regulator-initial-mode = + ; + regulator-allow-set-load; + regulator-allowed-modes = + ; + regulator-always-on; + }; + + vreg_l15a_1p8: ldo15 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = + ; + regulator-allow-set-load; + regulator-allowed-modes = + ; + }; + + vreg_l16a_2p7: ldo16 { + regulator-min-microvolt = <2704000>; + regulator-max-microvolt = <2704000>; + regulator-initial-mode = + ; + regulator-allow-set-load; + regulator-allowed-modes = + ; + }; + + vreg_l17a_1p3: ldo17 { + regulator-min-microvolt = <1304000>; + regulator-max-microvolt = <1304000>; + regulator-initial-mode = + ; + regulator-allow-set-load; + regulator-allowed-modes = + ; + }; + + vreg_l18a_2p7: ldo18 { + regulator-min-microvolt = <2704000>; + regulator-max-microvolt = <2960000>; + regulator-initial-mode = + ; + regulator-allow-set-load; + regulator-allowed-modes = + ; + }; + + vreg_l19a_3p0: ldo19 { + regulator-min-microvolt = <2856000>; + regulator-max-microvolt = <3104000>; + regulator-initial-mode = + ; + regulator-allow-set-load; + regulator-allowed-modes = + ; + }; + + vreg_l20a_2p95: ldo20 { + regulator-min-microvolt = <2704000>; + regulator-max-microvolt = <2960000>; + regulator-initial-mode = + ; + regulator-allow-set-load; + regulator-allowed-modes = + ; + }; + + vreg_l21a_2p95: ldo21 { + regulator-min-microvolt = <2704000>; + regulator-max-microvolt = <2960000>; + regulator-initial-mode = + ; + regulator-allow-set-load; + regulator-allowed-modes = + ; + }; + + vreg_l22a_2p85: ldo22 { + regulator-min-microvolt = <2864000>; + regulator-max-microvolt = <3312000>; + regulator-initial-mode = + ; + regulator-allow-set-load; + regulator-allowed-modes = + ; + }; + + vreg_l23a_3p3: ldo23 { + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3312000>; + regulator-initial-mode = + ; + regulator-allow-set-load; + regulator-allowed-modes = + ; + }; + + vdda_qusb_hs0_3p1: + vreg_l24a_3p075: ldo24 { + regulator-min-microvolt = <3088000>; + regulator-max-microvolt = <3088000>; + regulator-initial-mode = + ; + regulator-allow-set-load; + regulator-allowed-modes = + ; + }; + + vreg_l25a_3p3: ldo25 { + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3312000>; + regulator-initial-mode = + ; + regulator-allow-set-load; + regulator-allowed-modes = + ; + }; + + vdda_hp_pcie_1p2: + vdda_hv_ebi0: + vdda_hv_ebi1: + vdda_hv_ebi2: + vdda_hv_ebi3: + vdda_mipi_csi_1p25: + vdda_mipi_dsi0_1p2: + vdda_mipi_dsi1_1p2: + vdda_pcie_1p2: + vdda_ufs1_1p2: + vdda_ufs2_1p2: + vdda_usb1_ss_1p2: + vdda_usb2_ss_1p2: + vreg_l26a_1p2: ldo26 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-initial-mode = + ; + regulator-allow-set-load; + regulator-allowed-modes = + ; + }; + + vreg_l28a_3p0: ldo28 { + regulator-min-microvolt = <2856000>; + regulator-max-microvolt = <3008000>; + regulator-initial-mode = + ; + regulator-allow-set-load; + regulator-allowed-modes = + ; + }; + + vreg_lvs1a_1p8: lvs1 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + vreg_lvs2a_1p8: lvs2 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + }; + + pmi8998-rpmh-regulators { + compatible = "qcom,pmi8998-rpmh-regulators"; + qcom,pmic-id = "b"; + + vdd-bob-supply = <&vph_pwr>; + + vreg_bob: bob { + regulator-min-microvolt = <3312000>; + regulator-max-microvolt = <3600000>; + regulator-initial-mode = ; + regulator-allow-bypass; + }; + }; + + pm8005-rpmh-regulators { + compatible = "qcom,pm8005-rpmh-regulators"; + qcom,pmic-id = "c"; + + vdd-s1-supply = <&vph_pwr>; + vdd-s2-supply = <&vph_pwr>; + vdd-s3-supply = <&vph_pwr>; + vdd-s4-supply = <&vph_pwr>; + + vreg_s3c_0p6: smps3 { + regulator-min-microvolt = <600000>; + regulator-max-microvolt = <600000>; + }; + }; }; &i2c10 { -- 2.18.0.203.gfac676dfb9-goog