From patchwork Mon Dec 10 09:43:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Zhang X-Patchwork-Id: 1010343 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-tegra-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=nvidia.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=nvidia.com header.i=@nvidia.com header.b="o4Jz7Gja"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 43CypQ4nRdz9s2P for ; Mon, 10 Dec 2018 20:44:30 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726668AbeLJJoa (ORCPT ); Mon, 10 Dec 2018 04:44:30 -0500 Received: from hqemgate14.nvidia.com ([216.228.121.143]:7722 "EHLO hqemgate14.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726614AbeLJJo3 (ORCPT ); Mon, 10 Dec 2018 04:44:29 -0500 Received: from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by hqemgate14.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Mon, 10 Dec 2018 01:44:25 -0800 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate102.nvidia.com (PGP Universal service); Mon, 10 Dec 2018 01:44:27 -0800 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Mon, 10 Dec 2018 01:44:27 -0800 Received: from HQMAIL108.nvidia.com (172.18.146.13) by HQMAIL106.nvidia.com (172.18.146.12) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 10 Dec 2018 09:44:27 +0000 Received: from hqnvemgw02.nvidia.com (172.16.227.111) by HQMAIL108.nvidia.com (172.18.146.13) with Microsoft SMTP Server (TLS) id 15.0.1395.4 via Frontend Transport; Mon, 10 Dec 2018 09:44:27 +0000 Received: from localhost.localdomain (Not Verified[10.19.225.143]) by hqnvemgw02.nvidia.com with Trustwave SEG (v7, 5, 8, 10121) id ; Mon, 10 Dec 2018 01:44:26 -0800 From: Mark Zhang To: , , CC: Mark Zhang Subject: [PATCH 5/5] arm64: tegra: Add regulators for Tegra210 Darcy Date: Mon, 10 Dec 2018 17:43:58 +0800 Message-ID: <20181210094358.3241-6-markz@nvidia.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181210094358.3241-1-markz@nvidia.com> References: <20181210094358.3241-1-markz@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1544435065; bh=Y4e/6KrPqErzFG/D2pQUJPfuJcBjNqlG60jt2jp8I+w=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:MIME-Version:X-NVConfidentiality: Content-Transfer-Encoding:Content-Type; b=o4Jz7GjaJ+fIKCNZBIslKtm0IfW//lT9St9oVhgg+JsJjmI1d4oLb7uJaG8ACBt8F 9TZKec6DwSmVkKeLHKqdFU2KPoof5cc1hbcW+pPiWOrje0eE14vgBLNI3tEE982pIR XKLjG/6yNSj0soQbrIVKcRNbnacEPdH6/iVNuimv4EIWIcjolVO5s14Z9QbExsuIEw pt2nOol2n5hAoFcVNphxG8RnN7aMsMiMdIy/gWfN8/qT1JiQZDWOZfCG4iIXIU6Pho 6VUMEKHdDxsbnkixiBFFWUZxlEnSYa3Of1l7XalLC6ASXuSQJAVHFvpls/4pAuFvBa ZNHE19HHruang== Sender: linux-tegra-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org Add regulators to the Tegra210 Darcy DTS file including support for the MAX77620 PMIC. Signed-off-by: Mark Zhang --- .../arm64/boot/dts/nvidia/tegra210-p2894.dtsi | 438 ++++++++++++++++++ 1 file changed, 438 insertions(+) diff --git a/arch/arm64/boot/dts/nvidia/tegra210-p2894.dtsi b/arch/arm64/boot/dts/nvidia/tegra210-p2894.dtsi index c3b8e74de3f0..541f23199cca 100644 --- a/arch/arm64/boot/dts/nvidia/tegra210-p2894.dtsi +++ b/arch/arm64/boot/dts/nvidia/tegra210-p2894.dtsi @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 #include +#include #include #include "tegra210.dtsi" @@ -1324,6 +1325,237 @@ status = "okay"; }; + i2c@7000d000 { + status = "okay"; + clock-frequency = <400000>; + + max77620: max77620@3c { + compatible = "maxim,max77620"; + reg = <0x3c>; + interrupts = ; + + #interrupt-cells = <2>; + interrupt-controller; + + gpio-controller; + #gpio-cells = <2>; + + pinctrl-names = "default"; + pinctrl-0 = <&max77620_default>; + + max77620_default: pinmux@0 { + pin_gpio0 { + pins = "gpio0"; + function = "gpio"; + }; + + pin_gpio1 { + pins = "gpio1"; + function = "fps-out"; + drive-push-pull = <1>; + maxim,active-fps-source = ; + maxim,active-fps-power-up-slot = <7>; + maxim,active-fps-power-down-slot = <0>; + }; + + pin_gpio2_3 { + pins = "gpio2", "gpio3"; + function = "fps-out"; + drive-open-drain = <1>; + maxim,active-fps-source = ; + }; + + pin_gpio4 { + pins = "gpio4"; + function = "32k-out1"; + }; + + pin_gpio5_6_7 { + pins = "gpio5", "gpio6", "gpio7"; + function = "gpio"; + drive-push-pull = <1>; + }; + + pin_gpio2 { + maxim,active-fps-source = ; + }; + + pin_gpio3 { + maxim,active-fps-source = ; + }; + }; + + spmic-default-output-high { + gpio-hog; + output-high; + gpios = <2 0 7 0>; + line-name = "spmic-default-output-high"; + }; + + fps { + #address-cells = <1>; + #size-cells = <0>; + fps0 { + reg = <0>; + maxim,fps-event-source = ; + }; + + fps1 { + reg = <1>; + maxim,fps-event-source = ; + maxim,device-state-on-disabled-event = ; + }; + + fps2 { + reg = <2>; + maxim,fps-event-source = ; + }; + }; + + regulators { + in-ldo0-1-supply = <&max77620_sd2>; + in-ldo7-8-supply = <&max77620_sd2>; + + max77620_sd0: sd0 { + regulator-name = "vdd-core"; + regulator-min-microvolt = <600000>; + regulator-max-microvolt = <1400000>; + regulator-boot-on; + regulator-always-on; + maxim,active-fps-power-up-slot = <0>; + maxim,active-fps-source = ; + regulator-enable-ramp-delay = <146>; + regulator-ramp-delay = <27500>; + }; + + max77620_sd1: sd1 { + regulator-name = "vddio-ddr"; + regulator-always-on; + regulator-boot-on; + maxim,active-fps-source = ; + regulator-enable-ramp-delay = <130>; + regulator-ramp-delay = <27500>; + }; + + max77620_sd2: sd2 { + regulator-name = "vdd-pre-reg"; + regulator-always-on; + regulator-boot-on; + maxim,active-fps-source = ; + maxim,suspend-fps-source = ; + regulator-enable-ramp-delay = <176>; + regulator-ramp-delay = <27500>; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + }; + + max77620_sd3: sd3 { + regulator-name = "vdd-1v8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + regulator-boot-on; + maxim,active-fps-source = ; + regulator-enable-ramp-delay = <242>; + regulator-ramp-delay = <27500>; + }; + + max77620_ldo0: ldo0 { + regulator-name = "avdd-sys"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-boot-on; + maxim,active-fps-source = ; + regulator-enable-ramp-delay = <26>; + regulator-ramp-delay = <100000>; + }; + + max77620_ldo1: ldo1 { + regulator-name = "vdd-pex"; + regulator-min-microvolt = <1075000>; + regulator-max-microvolt = <1075000>; + regulator-always-on; + maxim,active-fps-source = ; + regulator-enable-ramp-delay = <22>; + regulator-ramp-delay = <100000>; + }; + + max77620_ldo2: ldo2 { + regulator-name = "vddio-sdmmc3"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + maxim,active-fps-source = ; + regulator-enable-ramp-delay = <62>; + regulator-ramp-delay = <100000>; + }; + + max77620_ldo3: ldo3 { + regulator-name = "vdd-3v3-eth"; + maxim,active-fps-source = ; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + regulator-boot-on; + regulator-enable-ramp-delay = <50>; + regulator-ramp-delay = <100000>; + }; + + max77620_ldo4: ldo4 { + regulator-name = "vdd-rtc"; + regulator-min-microvolt = <850000>; + regulator-max-microvolt = <850000>; + regulator-always-on; + regulator-boot-on; + maxim,active-fps-source = ; + regulator-enable-ramp-delay = <22>; + regulator-ramp-delay = <100000>; + }; + + max77620_ldo5: ldo5 { + regulator-name = "avdd-ts-hv"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + maxim,active-fps-source = ; + regulator-enable-ramp-delay = <62>; + regulator-ramp-delay = <100000>; + }; + + max77620_ldo6: ldo6 { + regulator-name = "vdd-ts"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + maxim,active-fps-source = ; + regulator-enable-ramp-delay = <36>; + regulator-ramp-delay = <100000>; + }; + + max77620_ldo7: ldo7 { + regulator-name = "vdd-gen-pll-edp"; + regulator-min-microvolt = <1050000>; + regulator-max-microvolt = <1050000>; + regulator-always-on; + regulator-boot-on; + maxim,active-fps-source = ; + maxim,suspend-fps-source = ; + regulator-enable-ramp-delay = <24>; + regulator-ramp-delay = <100000>; + }; + + max77620_ldo8: ldo8 { + regulator-name = "vdd-hdmi-dp"; + regulator-min-microvolt = <1050000>; + regulator-max-microvolt = <1050000>; + regulator-boot-on; + regulator-always-on; + maxim,active-fps-source = ; + regulator-enable-ramp-delay = <22>; + regulator-ramp-delay = <100000>; + }; + }; + }; + }; + pmc@7000e400 { nvidia,invert-interrupt; nvidia,suspend-mode = <0>; @@ -1391,4 +1623,210 @@ compatible = "arm,psci-1.0"; method = "smc"; }; + + regulators { + compatible = "simple-bus"; + device_type = "fixed-regulators"; + #address-cells = <1>; + #size-cells = <0>; + + battery_reg: regulator@0 { + compatible = "regulator-fixed"; + reg = <0>; + regulator-name = "vdd-ac-bat"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-always-on; + }; + + vdd_3v3: regulator@1 { + compatible = "regulator-fixed"; + reg = <1>; + regulator-name = "vdd-3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + gpio = <&max77620 3 0>; + enable-active-high; + regulator-enable-ramp-delay = <160>; + }; + + max77620_gpio7: regulator@2 { + compatible = "regulator-fixed"; + reg = <2>; + regulator-name = "max77620-gpio7"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-boot-on; + gpio = <&max77620 7 0>; + enable-active-high; + vin-supply = <&max77620_ldo0>; + regulator-always-on; + regulator-enable-ramp-delay = <240>; + }; + + lcd_bl_en: regulator@3 { + compatible = "regulator-fixed"; + reg = <3>; + regulator-name = "lcd-bl-en"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + gpio = <&gpio TEGRA_GPIO(V, 1) 0>; + enable-active-high; + }; + + en_vdd_sd: regulator@4 { + compatible = "regulator-fixed"; + reg = <4>; + regulator-name = "en-vdd-sd"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&gpio TEGRA_GPIO(Z, 4) 0>; + enable-active-high; + vin-supply = <&vdd_3v3>; + regulator-enable-ramp-delay = <472>; + }; + + en_vdd_cam: regulator@5 { + compatible = "regulator-fixed"; + reg = <5>; + regulator-name = "en-vdd-cam"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + gpio = <&gpio TEGRA_GPIO(S, 4) 0>; + enable-active-high; + }; + + vdd_sys_boost: regulator@6 { + compatible = "regulator-fixed"; + reg = <6>; + regulator-name = "vdd-sys-boost"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-always-on; + gpio = <&max77620 1 0>; + enable-active-high; + regulator-enable-ramp-delay = <3090>; + }; + + vdd_hdmi: regulator@7 { + compatible = "regulator-fixed"; + reg = <7>; + regulator-name = "vdd-hdmi"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&gpio TEGRA_GPIO(CC, 7) 0>; + enable-active-high; + regulator-boot-on; + vin-supply = <&vdd_sys_boost>; + regulator-enable-ramp-delay = <468>; + }; + + en_vdd_cpu_fixed: regulator@8 { + compatible = "regulator-fixed"; + reg = <8>; + regulator-name = "vdd-cpu-fixed"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1000000>; + }; + + vdd_aux_3v3: regulator@9 { + compatible = "regulator-fixed"; + reg = <9>; + regulator-name = "aux-3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; + + vdd_snsr_pm: regulator@10 { + compatible = "regulator-fixed"; + reg = <10>; + regulator-name = "snsr_pm"; + enable-active-high; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; + + vdd_usb_5v0: regulator@11 { + compatible = "regulator-fixed"; + reg = <11>; + status = "disabled"; + regulator-name = "vdd-usb-5v0"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + vin-supply = <&vdd_3v3>; + enable-active-high; + }; + + vdd_cdc_1v2_aud: regulator@101 { + compatible = "regulator-fixed"; + reg = <101>; + status = "disabled"; + regulator-name = "vdd_cdc_1v2_aud"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + enable-active-high; + startup-delay-us = <250000>; + }; + + vdd_disp_3v0: regulator@12 { + compatible = "regulator-fixed"; + reg = <12>; + regulator-name = "vdd-disp-3v0"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + gpio = <&gpio TEGRA_GPIO(I, 3) 0>; + regulator-always-on; + enable-active-high; + regulator-enable-ramp-delay = <232>; + }; + + vdd_fan: regulator@13 { + compatible = "regulator-fixed"; + reg = <13>; + regulator-name = "vdd-fan"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&gpio TEGRA_GPIO(E, 4) 0>; + enable-active-high; + regulator-enable-ramp-delay = <284>; + }; + + usb_vbus1: regulator@14 { + compatible = "regulator-fixed"; + reg = <14>; + regulator-name = "usb-vbus1"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&gpio TEGRA_GPIO(CC, 5) 0>; + enable-active-high; + gpio-open-drain; + }; + + usb_vbus2: regulator@15 { + compatible = "regulator-fixed"; + reg = <15>; + regulator-name = "usb-vbus2"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&gpio TEGRA_GPIO(CC, 4) 0>; + enable-active-high; + gpio-open-drain; + }; + + vdd_3v3_eth: regulator@16 { + compatible = "regulator-fixed"; + reg = <16>; + regulator-name = "vdd-3v3-eth-a02"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&gpio TEGRA_GPIO(D, 4) 0>; + regulator-always-on; + regulator-boot-on; + enable-active-high; + gpio-open-drain; + regulator-disable-on-shutdown; + }; + }; };