From patchwork Thu Oct 30 11:20:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 5195961 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B4D369F349 for ; Thu, 30 Oct 2014 11:23:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C93192024F for ; Thu, 30 Oct 2014 11:23:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DD34E201ED for ; Thu, 30 Oct 2014 11:23:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759395AbaJ3LWh (ORCPT ); Thu, 30 Oct 2014 07:22:37 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:64132 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759280AbaJ3LV3 (ORCPT ); Thu, 30 Oct 2014 07:21:29 -0400 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NE900BCQ90L5S70@mailout1.w1.samsung.com>; Thu, 30 Oct 2014 11:24:21 +0000 (GMT) X-AuditID: cbfec7f5-b7f956d000005ed7-b7-54521f3738ca Received: from eusync3.samsung.com ( [203.254.199.213]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id FB.18.24279.73F12545; Thu, 30 Oct 2014 11:21:27 +0000 (GMT) Received: from AMDC1943.digital.local ([106.116.151.171]) by eusync3.samsung.com (Oracle Communications Messaging Server 7u4-23.01(7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0NE9009H68VFGU90@eusync3.samsung.com>; Thu, 30 Oct 2014 11:21:27 +0000 (GMT) From: Krzysztof Kozlowski To: Samuel Ortiz , Lee Jones , Liam Girdwood , Mark Brown , linux-kernel@vger.kernel.org, Ben Dooks , Kukjin Kim , Russell King , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org Cc: Kyungmin Park , Marek Szyprowski , Bartlomiej Zolnierkiewicz , Javier Martinez Canillas , Chanwoo Choi , Krzysztof Kozlowski Subject: [PATCH v3 12/14] ARM: dts: exynos4412-trats: Switch max77686 regulators to GPIO control Date: Thu, 30 Oct 2014 12:20:51 +0100 Message-id: <1414668053-31370-13-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1414668053-31370-1-git-send-email-k.kozlowski@samsung.com> References: <1414668053-31370-1-git-send-email-k.kozlowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrNLMWRmVeSWpSXmKPExsVy+t/xq7rm8kEhBqu+CFtsnLGe1WLSugNM FlMfPmGzuP7lOavF/CPnWC2O/i6weP3C0KJ3wVU2i7NNb9gt7n89ymjx7UoHk8Wmx9dYLS7v msNmMeP8PiaL25d5LdYeuctucbqb1UHQo6W5h83j7/PrLB5/V71g9tg56y67x6ZVnWwed67t YfOYdzLQY/OSeo++LasYPT5vkgvgiuKySUnNySxLLdK3S+DKmNs7hbXglUjF49l3GBsYnwh0 MXJySAiYSLxt+sIOYYtJXLi3nq2LkYtDSGApo8S+ZVNZIZw+JolnZ4+zglSxCRhLbF6+BKxK RKCTWaLnYC8ziMMssJpJ4ueVU8wgVcICSRIv1rUBzeXgYBFQlZj23A4kzCvgIbF53k5miHVy EiePTQYbygkUX/OxnRWkXEjAXeLeN+0JjLwLGBlWMYqmliYXFCel5xrpFSfmFpfmpesl5+du YoQE+NcdjEuPWR1iFOBgVOLhjTgWECLEmlhWXJl7iFGCg1lJhHe1WFCIEG9KYmVValF+fFFp TmrxIUYmDk6pBsYps3Y+aY02cpyderD6QKTQi38PeLL5krfPnHtqQki1frtrQdX/vK9X3jqJ thjE2rKzfOc4uPb0Y385qeAlquuvrhHuiU+xetN6x2dSuzyL7/8DnLYT785/HCM+SYLxabPb moo0Br87hWKniowZ7Gw8v76JfGEm2XEtZZv1Sb9jEXWS+lOFJyqxFGckGmoxFxUnAgBK4Vpy TgIAAA== Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Remove fixed regulators (duplicating what max77686 provides) and add GPIO control to max77686 regulators. Add of_compatible to voltage-regulators node. This gives the system full control over those regulators. Previously the state of such regulators was a mixture of what max77686 driver set over I2C and what regulator-fixed set through GPIO. Removal of 'regulator-always-on' from CAM_ISP_CORE_1.2V (buck9) allows disabling it when it is not used. Previously this regulator was always enabled because its enable state is a OR of: - ENB9 GPIO (turned by regulator-fixed), - BUCK9EN field in BUCK9CTRL register (max77686 through I2C). Signed-off-by: Krzysztof Kozlowski --- arch/arm/boot/dts/exynos4412-trats2.dts | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/arch/arm/boot/dts/exynos4412-trats2.dts b/arch/arm/boot/dts/exynos4412-trats2.dts index 7a68e0832cd6..ebbd12d1fe9a 100644 --- a/arch/arm/boot/dts/exynos4412-trats2.dts +++ b/arch/arm/boot/dts/exynos4412-trats2.dts @@ -58,15 +58,6 @@ #address-cells = <1>; #size-cells = <0>; - vemmc_reg: regulator-0 { - compatible = "regulator-fixed"; - regulator-name = "VMEM_VDD_2.8V"; - regulator-min-microvolt = <2800000>; - regulator-max-microvolt = <2800000>; - gpio = <&gpk0 2 0>; - enable-active-high; - }; - cam_io_reg: voltage-regulator-1 { compatible = "regulator-fixed"; regulator-name = "CAM_SENSOR_A"; @@ -94,16 +85,6 @@ enable-active-high; }; - cam_isp_core_reg: voltage-regulator-4 { - compatible = "regulator-fixed"; - regulator-name = "CAM_ISP_CORE_1.2V_EN"; - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1200000>; - gpio = <&gpm0 3 0>; - enable-active-high; - regulator-always-on; - }; - ps_als_reg: voltage-regulator-5 { compatible = "regulator-fixed"; regulator-name = "LED_A_3.0V"; @@ -221,6 +202,13 @@ #clock-cells = <1>; voltage-regulators { + compatible = "maxim,max77686-pmic"; + + ldo21-gpio = <&gpy2 0 GPIO_ACTIVE_HIGH>; + ldo22-gpio = <&gpk0 2 GPIO_ACTIVE_HIGH>; + buck8-gpio = <&gpk0 2 GPIO_ACTIVE_HIGH>; + buck9-gpio = <&gpm0 3 GPIO_ACTIVE_HIGH>; + ldo1_reg: ldo1 { regulator-compatible = "LDO1"; regulator-name = "VALIVE_1.0V_AP"; @@ -591,7 +579,7 @@ broken-cd; non-removable; card-detect-delay = <200>; - vmmc-supply = <&vemmc_reg>; + vmmc-supply = <&ldo22_reg>; clock-frequency = <400000000>; samsung,dw-mshc-ciu-div = <0>; samsung,dw-mshc-sdr-timing = <2 3>;