Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp22353310ybl; Tue, 7 Jan 2020 00:38:50 -0800 (PST) X-Google-Smtp-Source: APXvYqxKWhheYWAEJPgQHaVAlScxNEt5dCF04FP7Nbx5d0tziCWpyCEa6sg/3NnF7dMtDpdmtw74 X-Received: by 2002:a9d:6211:: with SMTP id g17mr112348664otj.168.1578386330431; Tue, 07 Jan 2020 00:38:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578386330; cv=none; d=google.com; s=arc-20160816; b=ndgmPQ2P6wEjCmCR0RHuI1GuZljwTH4jCvykhtI3EdHPxaQ/fQxj3RlAcUxNNJwFGo 7yI+fGGlc3+d5W+sH+LItKlYiKKLxWJ3qgLzNPc7nxTpnksvad/E8q4r0uI3L0tm2CN/ /+7qNotoQ3CfUz/2ICxAWh7PbufJBdA+YgljReji4E1KaJXQG1O8kBOjjFF0wPdHHlat mca43XhX0g1yLYNhUro7d11iZofrTwMwlhAcbPX3mUwsWmxokcszuwV/wf9VCV8lJwwK dHTUeeC/R54rnkw8Evo4eAfkTItyIXLagADJMqS1NZt2U2uX0oCHXZgWn71po5THRVDk Dlog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=ZTEnCdwdNw1fcloyQsOB+vBJ1wsGL05E67AhFbnhj/c=; b=u/RxvZd8ziwSMgnS64IvwU4Ns9WYywXuizUli94ExqWuxVxHdzpEPdlRQNTwVcIAUj ShgkvscT+voGQYXJ/65kfItlTrv7yOgokIrUKhZX8eK5Yqoj8hum/PjKaWz2ob7kUVbn txC3FAANyQvMUvS6ralJUQBAjM4RI5CqCa0dEO+Pdm7jUqYvu0Qc0MXkvP2rt2xb9QnN RdsyFJai5aNXpQQZWgj5peHsw3seXKh84UwbhzEXEqXXG9dVWAtDTMFgev3fIkvv8XC9 5C47Qbz38J9pYtoJ9vMuLt6GWo7C+s/lTHnky6lVjOUpv9ZUoF/RRk0CUmHUUHAu8q42 2dyQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k15si29252667oij.134.2020.01.07.00.38.37; Tue, 07 Jan 2020 00:38:50 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727699AbgAGIhD (ORCPT + 99 others); Tue, 7 Jan 2020 03:37:03 -0500 Received: from metis.ext.pengutronix.de ([85.220.165.71]:35083 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726485AbgAGIhD (ORCPT ); Tue, 7 Jan 2020 03:37:03 -0500 Received: from pty.hi.pengutronix.de ([2001:67c:670:100:1d::c5]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iokMC-0007de-GN; Tue, 07 Jan 2020 09:36:56 +0100 Received: from mfe by pty.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1iokMA-0004B9-C9; Tue, 07 Jan 2020 09:36:54 +0100 Date: Tue, 7 Jan 2020 09:36:54 +0100 From: Marco Felsch To: Mark Brown Cc: "devicetree@vger.kernel.org" , Support Opensource , "linux-aspeed@lists.ozlabs.org" , "bgolaszewski@baylibre.com" , "andrew@aj.id.au" , "linus.walleij@linaro.org" , "lgirdwood@gmail.com" , "linux-kernel@vger.kernel.org" , "linux-gpio@vger.kernel.org" , "robh+dt@kernel.org" , "joel@jms.id.au" , "kernel@pengutronix.de" , Adam Thomson , "lee.jones@linaro.org" , "linux-arm-kernel@lists.infradead.org" Subject: Re: [PATCH v3 3/6] dt-bindings: mfd: da9062: add regulator voltage selection documentation Message-ID: <20200107083654.atgbjhrnhyax2gqq@pengutronix.de> References: <20191210094144.mxximpuouchy3fqu@pengutronix.de> <20191211170918.q7kqkd4lrwwp7jl3@pengutronix.de> <20191212161019.GF4310@sirena.org.uk> <20191212162152.5uu3feacduetysq7@pengutronix.de> <20191212165124.GJ4310@sirena.org.uk> <20191216085525.csr2aglm5md4vtsw@pengutronix.de> <20191216114454.GB4161@sirena.org.uk> <20191217073533.GC31182@pengutronix.de> <20191217125832.GF4755@sirena.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191217125832.GF4755@sirena.org.uk> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 09:14:30 up 52 days, 23:33, 43 users, load average: 0.00, 0.04, 0.05 User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c5 X-SA-Exim-Mail-From: mfe@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mark, On 19-12-17 12:58, Mark Brown wrote: > On Tue, Dec 17, 2019 at 08:35:33AM +0100, Marco Felsch wrote: > > On 19-12-16 11:44, Mark Brown wrote: > > > > What I'm saying is that I think the binding needs to explicitly talk > > > about that since at the minute it's really confusing reading it as it > > > is, it sounds very much like it's trying to override that in a chip > > > specific fashion as using gpiolib and the GPIO bindings for pinmuxing is > > > really quite unusual. > > > Hm.. I still think that we don't mux the pin to some special function. > > It is still a gpio input pin and if we don't request the pin we could > > read the input from user-space too and get a 'valid' value. Muxing would > > happen if we change the pad to so called _alternate_ function. Anyway, > > lets find a binding description: > > I don't think any of this makes much difference from a user point of > view. > > > IMHO this is very descriptive and needs no update. > > > description: > > - A GPIO reference to a local general purpose input, [1] calls it GPI. > > The DA9062 regulators can select between voltage-a/-b settings. > > Each regulator has a VBUCK*_GPI or VLDO*_GPI input to determine the > > active setting. In front of the VBUCK*_GPI/VLDO*_GPI input is a mux > > to select between different signal sources, valid sources are: the > > internal sequencer, GPI1, GPI2 and GPI3. See [1] table 63 for more > > information. Most the time the internal sequencer is fine but > > sometimes it is necessary to use the signal from the DA9062 GPI > > pads. This binding covers the second use case. > > Attention: Sharing the same GPI for other purposes or across multiple > > regulators is possible but the polarity setting must equal. > > This doesn't say anything about how the GPIO input is expected to be > controlled, for voltage setting any runtime control would need to be > done by the driver and it sounds like that's all that can be controlled. > The way this reads I'd expect one use of this to be for fast voltage > setting for example (you could even combine that with suspend sequencing > using the internal sequencer if you mux back to the sequencer during > suspend). The input signal is routed trough the da9062 gpio block to the regualtors. You can't set any voltage value using a gpio instead you decide which voltage setting is applied. The voltage values for runtime/suspend comes from the dt-data. No it's not just a fast switching option imagine the system suspend case where the cpu and soc voltage can be reduced to a very low value. Older soc's like the imx6 signaling this state by a hard wired gpio line because the soc and cpu cores don't work properly on such low voltage values. This is my use case and I can't use the sequencer. Regards, Marco