devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@codeaurora.org>
To: "Ivan T. Ivanov" <iivanov@mm-sol.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Bjorn Andersson <bjorn@kryo.se>,
	Bjorn Andersson <bjorn.andersson@sonymobile.com>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-arm-msm@vger.kernel.org" <linux-arm-msm@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [PATCH 2/3] pinctrl: Device tree bindings for Qualcomm pm8xxx gpio block
Date: Mon, 14 Jul 2014 14:20:35 -0700	[thread overview]
Message-ID: <53C449A3.2010404@codeaurora.org> (raw)
In-Reply-To: <1405346335.13503.25.camel@iivanov-dev>

On 07/14/14 06:58, Ivan T. Ivanov wrote:
> On Fri, 2014-07-11 at 18:56 -0700, Stephen Boyd wrote:
>> On 07/10/14 02:53, Linus Walleij wrote:
>>> On Wed, Jul 9, 2014 at 11:18 PM, Bjorn Andersson <bjorn@kryo.se> wrote:
>>>> On Wed, Jul 9, 2014 at 1:53 AM, Linus Walleij <linus.walleij@linaro.org> wrote:
>>>>> On Tue, Jul 8, 2014 at 3:26 AM, Bjorn Andersson
>>>>> <bjorn.andersson@sonymobile.com> wrote:
>>>>>
>>>>> +- function:
>>>>> +       Usage: optional
>>>>> +       Value type: <string>
>>>>> +       Definition: Specify the alternative function to be configured for the
>>>>> +                   specified pins.  Valid values are:
>>>>> +                       "normal",
>>>>> +                       "paired",
>>>>> +                       "func1",
>>>>> +                       "func2",
>>>>> +                       "dtest1",
>>>>> +                       "dtest2",
>>>>> +                       "dtest3",
>>>>> +                       "dtest4"
>>>>> These are a bit ambigous, why doesn't the driver present functions that
>>>>> are more specific than "func1", "func2"? Or "dtest1"?
>>>> I agree, unfortunately I have only seen traces of the actual function matrix;
>>>> for pm8xxx I have no documentation and for pm8x41 they are only listed as
>>>> func[1-2] and dtest[1-4].
>>>>
>>>> Maybe if someone at Qualcomm could release such a list we could provide a
>>>> proper table instead.
>>> I guess Stephen Boyd can help us. (?)
>> Ok. "normal" is pretty much gpio mode, i.e. don't mux anything. "paired"
>> is where we take the output of the gpio next to it and loop it back into
>> this gpio (and vice versa). So gpio1 is paired with gpio2, gpio 3 is
>> paired with gpio 4, etc. This allows us to make level translators by
>> choosing different supply voltages for the paired gpios. "func1" and
>> "func2" are used for muxing things internally. "dtest" is used to mux
>> specific things out for testing purposes, not really used in any
>> end-products but still useful while debugging. I can provide the
>> function to pin mapping if necessary. There are lots of pmics.
> Thank you Stephen. If understand it right, this is more like option for
> the pin when it is GPIO. Next generation of PMIC's have support for pin
> acting like analog-input/output and current sink.

Isn't this document only for the gpios? I think you're talking about the
MPPs, which also exist on these generation of pmics. We should probably
avoid mixing the two (gpios and mpps) in one binding because they're
really different hardware.

>  So I will like
> to keep "function" property for selecting one of the above functions.
> Choosing between "normal", "paired"... options in QPNP pinctrl driver
> is supported trough passing values, defined in DT header file, to
> "output-high" property. Please don't kill me :-).

Overloading output-high to choose the MPP mode doesn't seem to follow
the generic pinconfig binding. Does output-high even take a value? Why
can't we use the function property?

>> BTW, I see that power-source has made a comeback. What are the units? 
> Documentation states it is "a custom format" :-).
>
>

Ah, I was looking in the binding document. It looks like the code
comment around PIN_CONFIG_POWER_SOURCE says custom format. It's
concerning though. From what I can tell commit 5b81d55c4ccf (pinctrl:
remove bindings for pinconf options needing more thought, 2013-06-25)
removed this option along with slew-rate because they specifically
didn't have any units associated with them. But then slew-rate came back
in commit 8ba3f4d00078 (pinctrl: Adds slew-rate, input-enable/disable,
2013-12-11) even though it didn't have units and then power-source came
back without units too. Linus, what's going on?

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation

  reply	other threads:[~2014-07-14 21:20 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-08  1:26 [PATCH 0/3] Qualcomm pm8xxx gpio driver Bjorn Andersson
     [not found] ` <1404782785-1824-1-git-send-email-bjorn.andersson-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org>
2014-07-08  1:26   ` [PATCH 1/3] mfd: pm8921: Expose pm8xxx_read_irq_status Bjorn Andersson
2014-07-08 23:20     ` Stephen Boyd
2014-07-08 23:43       ` Bjorn Andersson
2014-07-09  7:24         ` Ivan T. Ivanov
2014-07-09  7:59     ` Linus Walleij
2014-07-09 14:13       ` Bjorn Andersson
2014-07-08  1:26 ` [PATCH 2/3] pinctrl: Device tree bindings for Qualcomm pm8xxx gpio block Bjorn Andersson
2014-07-09  8:53   ` Linus Walleij
2014-07-09 21:18     ` Bjorn Andersson
2014-07-10  9:53       ` Linus Walleij
2014-07-12  1:56         ` Stephen Boyd
2014-07-14 13:58           ` Ivan T. Ivanov
2014-07-14 21:20             ` Stephen Boyd [this message]
2014-07-15  6:35               ` Ivan T. Ivanov
2014-07-16  0:23                 ` Bjorn Andersson
2014-07-16  8:18                   ` Ivan T. Ivanov
2014-07-14 13:24       ` Ivan T. Ivanov
2014-07-08  1:26 ` [PATCH 3/3] pinctrl: Introduce pinctrl driver for Qualcomm pm8xxx Bjorn Andersson
     [not found]   ` <1404782785-1824-4-git-send-email-bjorn.andersson-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org>
2014-07-09  9:32     ` Linus Walleij
2014-07-14 22:48       ` Bjorn Andersson
2014-07-23  8:45         ` Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53C449A3.2010404@codeaurora.org \
    --to=sboyd@codeaurora.org \
    --cc=bjorn.andersson@sonymobile.com \
    --cc=bjorn@kryo.se \
    --cc=devicetree@vger.kernel.org \
    --cc=iivanov@mm-sol.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).