From patchwork Thu Sep 3 18:38:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matti Vaittinen X-Patchwork-Id: 1356798 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=fi.rohmeurope.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4Bj8hn5r1Nz9sTK for ; Fri, 4 Sep 2020 04:38:49 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729167AbgICSis (ORCPT ); Thu, 3 Sep 2020 14:38:48 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:35711 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726678AbgICSiq (ORCPT ); Thu, 3 Sep 2020 14:38:46 -0400 Received: by mail-lj1-f194.google.com with SMTP id a15so5009329ljk.2; Thu, 03 Sep 2020 11:38:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=gt6OM1dCG0l0sdiM2MxOpC1YxXaQJC64+fjRHPpV5jw=; b=HsSEys8XvVsqsWS4jjVGDRiIIOdEznuCazDSOGpDBRjNkaaL7dvIBBm8AIvYCOpgeo 6JFVEcrrOR0uz9UpcLRX6+zHrceMKkJdkNAdr1N3C2vT5ayHgRiI+CoHNzTZFK+l2xRr R5ZWmQ3+BMAok8d81xMHRQAFU7dA831QZ5TTQn8tqlro2qP+/4Vz97O0sXngPjhRossE ayvpqfcxio0Ks9ra5vYS7xZwwP0SczL8zXOs0PYxJGQzhDYOyuh3ViQ8Uh9vFGIthZiR 9RGQuw68VqBnJAlnPFdvUzi9u9+MfKEyUOpSyKgq/pEltwLThCM8WSpvLmj2aP35h8By OVbA== X-Gm-Message-State: AOAM531KEdqMBVRy6pYEhuMs+rGFWkwuFLhMZH/Y+SBxsiQrhadko07v IyBCX/DDEnJrX9ftHdyxKKc= X-Google-Smtp-Source: ABdhPJxb33CV5VrpWMDxn4KavwGPkQnNW6lBR3wF2L2opvs9JUyJU1qldyhjcgGR8a2lMLywOLHu5A== X-Received: by 2002:a05:651c:1073:: with SMTP id y19mr1973019ljm.57.1599158322509; Thu, 03 Sep 2020 11:38:42 -0700 (PDT) Received: from localhost.localdomain (62-78-225-252.bb.dnainternet.fi. [62.78.225.252]) by smtp.gmail.com with ESMTPSA id t1sm755494lfc.52.2020.09.03.11.38.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Sep 2020 11:38:42 -0700 (PDT) Date: Thu, 3 Sep 2020 21:38:34 +0300 From: Matti Vaittinen To: mazziesaccount@gmail.com Cc: Liam Girdwood , Mark Brown , Rob Herring , Matti Vaittinen , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-power@fi.rohmeurope.com Subject: [PATCH 2/4] dt-bindings: regulator: bd71837: add property for omitting ON/OFF control Message-ID: <9ff1104579093e7977944be769d625b9e33bc663.1599029334.git.matti.vaittinen@fi.rohmeurope.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The BD718(37/47/50) regulator enable states can be controlled either by SW or by PMIC internal state machine. On some systems mixture of SW and HW state machine controlled regulators is needed. Specifically, some SoCs signal SUSPEND state change to PMIC via STBY_REQ line. Now there are setups that expect certain regulators then to be disabled (by PMIC state machine) while other regulators should stay enabled (regardless of HW state => SW control required). Add a new device-tree property "rohm,no-regulator-enable-control" which can be used to leave regulator(s) under HW state machine control. Signed-off-by: Matti Vaittinen --- .../bindings/regulator/rohm,bd71837-regulator.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Documentation/devicetree/bindings/regulator/rohm,bd71837-regulator.yaml b/Documentation/devicetree/bindings/regulator/rohm,bd71837-regulator.yaml index 19d9408d9c3b..f5e31196a646 100644 --- a/Documentation/devicetree/bindings/regulator/rohm,bd71837-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/rohm,bd71837-regulator.yaml @@ -93,6 +93,17 @@ patternProperties: # ---------------------------------------------------------------- # rest | not supported | not supported | not supported + # BD71837 power outputs can either be controlled by the PMIC internal + # hardware state machine or by software. If you need regulators to be + # turned ON/OFF for example based on PMIC_STBY_REQ line (which toggles + # PMIC HW state machine) - then you should set this property. + # Tradeoff is that then SW can't control the ON/OFF state for this + # regulator (other than invoking a PMIC state change). + rohm,no-regulator-enable-control: + description: | + Enable/Disable control of this regulator must be left to the + PMIC hardware state machine. + type: boolean required: - regulator-name From patchwork Thu Sep 3 18:38:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matti Vaittinen X-Patchwork-Id: 1356799 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=fi.rohmeurope.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4Bj8j14jvcz9sTg for ; Fri, 4 Sep 2020 04:39:01 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729188AbgICSjA (ORCPT ); Thu, 3 Sep 2020 14:39:00 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:41253 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728525AbgICSi7 (ORCPT ); Thu, 3 Sep 2020 14:38:59 -0400 Received: by mail-lj1-f195.google.com with SMTP id y4so4939631ljk.8; Thu, 03 Sep 2020 11:38:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=5iYxU30/OZKxnckXSXEWILSjZda9qorCD3gugu2wz9o=; b=rB+9uoQV5w005Yj/PG0rgRN5lbud04Xc11yToJTG6ItujNdrcALV/6M7mzd8ZSve+h ExQlIDqtanELe2IWnIYuluIU8qVm+1awBezYJtHmaROfwfBzJA+DHaEqYVxC+gj8Guku bWZ8BRQCjC/xAaD3fKcumEQDt18sXp+8i4yLE1qE5IprEac6kz9s7aQCOIDRj4Uhrg0k bFoumxxAF4gWzflss+35MY84syAGv5sztoGUn3uZ0fSykr6oMSpXjE4WweeCrec37Bgq V1iZhwoCOQpcaEaGPErTT8n051AtoCBw4vym2Loy1ezWj6uFS815rh5XSTt38aj64GBE adYQ== X-Gm-Message-State: AOAM5325ikheBNH8pl6briB7h/i8gh7kTZMTcrnVlKxcoJSOehNrJfEg Uy38HgjpgCDTsYe3GsZC5fo= X-Google-Smtp-Source: ABdhPJy56HEYdmlDK2TJ5EjyvnQGyCdaEDgByVPVSsqW7lWVioe221WrlQi3S1QWBft8tmoV+7aqSA== X-Received: by 2002:a2e:9595:: with SMTP id w21mr2039373ljh.334.1599158336613; Thu, 03 Sep 2020 11:38:56 -0700 (PDT) Received: from localhost.localdomain (62-78-225-252.bb.dnainternet.fi. [62.78.225.252]) by smtp.gmail.com with ESMTPSA id w4sm765817ljm.50.2020.09.03.11.38.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Sep 2020 11:38:56 -0700 (PDT) Date: Thu, 3 Sep 2020 21:38:48 +0300 From: Matti Vaittinen To: mazziesaccount@gmail.com Cc: Liam Girdwood , Mark Brown , Rob Herring , Matti Vaittinen , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-power@fi.rohmeurope.com Subject: [PATCH 3/4] dt-bindings: regulator: bd71847: add property for omitting ON/OFF control Message-ID: <51022c60412297ad9b22501452d60ba2dce38d2e.1599029334.git.matti.vaittinen@fi.rohmeurope.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The BD718(37/47/50) regulator enable states can be controlled either by SW or by PMIC internal state machine. On some systems mixture of SW and HW state machine controlled regulators is needed. Specifically, some SoCs signal SUSPEND state change to PMIC via STBY_REQ line. Now there are setups that expect certain regulators then to be disabled (by PMIC state machine) while other regulators should stay enabled (regardless of HW state => SW control required). Add a new device-tree property "rohm,no-regulator-enable-control" which can be used to leave regulator(s) under HW state machine control. Signed-off-by: Matti Vaittinen --- .../bindings/regulator/rohm,bd71847-regulator.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Documentation/devicetree/bindings/regulator/rohm,bd71847-regulator.yaml b/Documentation/devicetree/bindings/regulator/rohm,bd71847-regulator.yaml index 07256a4b50b9..eeac32cd15d6 100644 --- a/Documentation/devicetree/bindings/regulator/rohm,bd71847-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/rohm,bd71847-regulator.yaml @@ -88,6 +88,17 @@ patternProperties: # ---------------------------------------------------------------- # rest | not supported | not supported | not supported + # BD718(47/50) power outputs can either be controlled by the PMIC internal + # hardware state machine or by software. If you need regulators to be + # turned ON/OFF for example based on PMIC_STBY_REQ line (which toggles + # PMIC HW state machine) - then you should set this property. + # Tradeoff is that then SW can't control the ON/OFF state for this + # regulator (other than invoking a PMIC state change). + rohm,no-regulator-enable-control: + description: | + Enable/Disable control of this regulator must be left to the + PMIC hardware state machine. + type: boolean required: - regulator-name