Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp2176097img; Sun, 24 Mar 2019 01:34:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqzWiVzdCg/0XD/4nZn2trtx9radFe6gouaGREMfY9EVzaRL6byAEzQOYYDUf4bJPg88xmb/ X-Received: by 2002:a17:902:a413:: with SMTP id p19mr19095962plq.337.1553416454335; Sun, 24 Mar 2019 01:34:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553416454; cv=none; d=google.com; s=arc-20160816; b=gem5E8VNqbfmbZb2ghvn8yLNPyuYMDOX7OipQlJS5iYBD+6vUTa2ylEgEHEQycgMtl ED0GeT/xCWm14rYdXkLCH31a7KSK6BywUEYEzbU4vp/aFlQ16G4G1v7ZDTJXf3EKRZFd djEfA/SAPGsOB6U9rmAI94Iogm1QyyfpcMUrqKYiO/66JfU52RngQakuxqN9zrnVxS6w dE36eMBJwYZh5yGYFJM8DaX0n8eIqHbq4EEDpzWnTymDWPTJEwO/CAtgAvTKqmFE8obU fMtU5hsRT2L6ARvJTec0P2CYdVLhldwbhNH7UTEH15/Eqv0QJuI+aGCVe6SIFp9lCFXp 5gbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Dq88nNP562Ket7mD5f3s33SSWJorbaOn89O5ht4c0Bo=; b=X20+AGCBlf/57x/Wr56GEJoBqp1ZIyPdhdbNYXUzai+So+zFftsRsjXC92fjQr0NFv lCKmcmLEr0RSurEyjRYtUDV6YEDmgg/aTJinp7kE0lez5DiQZlVZbZEPJ2fJm45gSSO4 oeIofV6VS7SQbe55WMbhjD7gB+U7Ob3LgqLMFPgkhPE9GKJ4PqOWu+OS6tgwJeKw6kcI r8BgPvUl7Z1EtpQBjIFEAFnGF/ozpD4lRJO4RcidbUDnBwj1BZh/SV/MpHRBQn7jpKS1 bUjqeFZ+1Pkx4N1ebVQlZ0oc/3sWjOr+Pqt6UtwgegLAcqFfyEgyyi6JUtmGTARBKMk+ gtgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ekAuhqdn; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e20si10459531pfi.237.2019.03.24.01.33.59; Sun, 24 Mar 2019 01:34:14 -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=@gmail.com header.s=20161025 header.b=ekAuhqdn; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728486AbfCXIdK (ORCPT + 99 others); Sun, 24 Mar 2019 04:33:10 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:40006 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726017AbfCXIdJ (ORCPT ); Sun, 24 Mar 2019 04:33:09 -0400 Received: by mail-pf1-f195.google.com with SMTP id c207so4303903pfc.7; Sun, 24 Mar 2019 01:33:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Dq88nNP562Ket7mD5f3s33SSWJorbaOn89O5ht4c0Bo=; b=ekAuhqdn4IWcWOg7wz2HS8znjPcoRIiTk4qnfTHf0tjlCp7FMpjS0Dcne2ysMF7OGM BmPSmkvApUcKFXUdOL1VzkU2WxEQK/fbskUhJCCfbMWdsi/E4cbXTIEAu/Y/q9/mfSjD qPzPZtujuXwLeik+UDXhgUg4I/Rt1qXwkt5qbHzlDI7tcoNE+FCDDBXIUjkN1aqCOjj3 mskR2xdjpEq4E/ikSSDzS8k/l2jnb7RwyeJMUvhsRY+/BnUksjiqTJ2EVqXO+pyHtEVR T8vhEYxnmLKJv9ITZSVqYN2WwG4bwv6r4ZGWwyAOf5Z58VLtlsv/dgD7BrdrXo4odEtw nM7g== 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=Dq88nNP562Ket7mD5f3s33SSWJorbaOn89O5ht4c0Bo=; b=TevDHZtnyeq/ACjhTpnVISJ160z7iR7APcFLSf6W6IgleKZJ4U8W4oLNxcDjmIbFZO OWtUBCYVU2xo4DdYnuWoZwe/w/ON+RTS1sdK6YndYCFCpGiehm15w6KrwxYlwLCaGJwG pEcs9hB66311gm2VQfoqw9JkytyQmYQdDhV3ZToXwSJzWxcXwM7JrR+ZtWzDRDTSIsQV Pkafjw0dJG+UaAwPIvKmmRtRaZVU589AKgXZ73BwBsBNWs2mjXGSUu6gX15CpFBCsNs+ tA0EUqqkEe+10RSVDArb2QkzttGPWS5Q24JYBboyLXSPGCy0wW8rGHWbM0AEnXNVRaRT 40UQ== X-Gm-Message-State: APjAAAWlFPTGf1p42F8fSmoz9UPCEY6sl0jWo0Ud40G/WZxp563KC80h Y0lbDLV46cov9PbpBQJfHfsYLQPK X-Received: by 2002:a62:168a:: with SMTP id 132mr17938661pfw.155.1553416387843; Sun, 24 Mar 2019 01:33:07 -0700 (PDT) Received: from localhost.localdomain ([45.114.62.12]) by smtp.gmail.com with ESMTPSA id i10sm14629503pgs.26.2019.03.24.01.33.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 24 Mar 2019 01:33:06 -0700 (PDT) From: Anand Moon To: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Rob Herring , Kukjin Kim , Krzysztof Kozlowski , Marek Szyprowski , Chanwoo Choi Subject: [PATCH v1] ARM: dts: exynos: Add proper regulator states for suspend-to-mem for odroid-u3 Date: Sun, 24 Mar 2019 14:02:56 +0530 Message-Id: <20190324083256.1047-1-linux.amoon@gmail.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add suspend-to-mem node to regulator core to be enabled or disabled during system suspend and also support changing the regulator operating mode during runtime and when the system enter sleep mode (stand by mode). Cc: Marek Szyprowski Cc: Krzysztof Kozlowski Cc: Chanwoo Choi Signed-off-by: Anand Moon --- Current patch: Note: Both microSD and eMMC suspend resume works this changes at my end. regulator-off-in-suspend: set the regulator node into suspend state i.e. standby mode during suspend operation. Current changes are based on [0] https://www.kernel.org/doc/Documentation/devicetree/bindings/regulator/max77686.txt Regulators which can be turned off during system suspend: -LDOn : 2, 6-8, 10-12, 14-16, -BUCKn : 1-4. Use standard regulator bindings for it ('regulator-off-in-suspend'). drop the suspend off binding which are not supported by the driver. RFC version [1] https://patchwork.kernel.org/patch/10810909/ These changes had some problem with eMMC not entering into suspend mode. with some miss configuration in regulator-off-in-suspend mode. Changes from previos patch. [2] https://patchwork.kernel.org/patch/10712549/ Set all the non used regulator in suspend-odd state LD02, LD03, LD05, LD06, LD07, LD011, LD013, LDO14, LD016 BUCK5, BUCK6, BUCK7 and not confirable as per driver max77686-regulator --- .../boot/dts/exynos4412-odroid-common.dtsi | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi index 08d3a0a7b4eb..375156ad5454 100644 --- a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi +++ b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi @@ -288,6 +288,9 @@ regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; regulator-always-on; + regulator-state-mem { + regulator-off-in-suspend; + }; }; ldo3_reg: LDO3 { @@ -317,6 +320,9 @@ regulator-min-microvolt = <1000000>; regulator-max-microvolt = <1000000>; regulator-always-on; + regulator-state-mem { + regulator-off-in-suspend; + }; }; ldo7_reg: LDO7 { @@ -324,18 +330,27 @@ regulator-min-microvolt = <1000000>; regulator-max-microvolt = <1000000>; regulator-always-on; + regulator-state-mem { + regulator-off-in-suspend; + }; }; ldo8_reg: LDO8 { regulator-name = "VDD10_HDMI_1.0V"; regulator-min-microvolt = <1000000>; regulator-max-microvolt = <1000000>; + regulator-state-mem { + regulator-off-in-suspend; + }; }; ldo10_reg: LDO10 { regulator-name = "VDDQ_MIPIHSI_1.8V"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; + regulator-state-mem { + regulator-off-in-suspend; + }; }; ldo11_reg: LDO11 { @@ -343,6 +358,9 @@ regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; regulator-always-on; + regulator-state-mem { + regulator-off-in-suspend; + }; }; ldo12_reg: LDO12 { @@ -351,6 +369,9 @@ regulator-max-microvolt = <3300000>; regulator-always-on; regulator-boot-on; + regulator-state-mem { + regulator-off-in-suspend; + }; }; ldo13_reg: LDO13 { @@ -367,6 +388,9 @@ regulator-max-microvolt = <1800000>; regulator-always-on; regulator-boot-on; + regulator-state-mem { + regulator-off-in-suspend; + }; }; ldo15_reg: LDO15 { @@ -375,6 +399,9 @@ regulator-max-microvolt = <1000000>; regulator-always-on; regulator-boot-on; + regulator-state-mem { + regulator-off-in-suspend; + }; }; ldo16_reg: LDO16 { @@ -383,6 +410,9 @@ regulator-max-microvolt = <1800000>; regulator-always-on; regulator-boot-on; + regulator-state-mem { + regulator-off-in-suspend; + }; }; ldo20_reg: LDO20 { @@ -421,6 +451,9 @@ regulator-max-microvolt = <1100000>; regulator-always-on; regulator-boot-on; + regulator-state-mem { + regulator-off-in-suspend; + }; }; buck2_reg: BUCK2 { @@ -437,6 +470,9 @@ regulator-max-microvolt = <1050000>; regulator-always-on; regulator-boot-on; + regulator-state-mem { + regulator-off-in-suspend; + }; }; buck4_reg: BUCK4 { @@ -444,6 +480,9 @@ regulator-min-microvolt = <900000>; regulator-max-microvolt = <1100000>; regulator-microvolt-offset = <50000>; + regulator-state-mem { + regulator-off-in-suspend; + }; }; buck5_reg: BUCK5 { -- 2.21.0