From: Stephen Boyd <sboyd@codeaurora.org>
To: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Cc: "Ivan T. Ivanov" <iivanov@mm-sol.com>,
Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>,
Linus Walleij <linus.walleij@linaro.org>,
Mark Brown <broonie@kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-arm-msm@vger.kernel.org" <linux-arm-msm@vger.kernel.org>
Subject: Re: [PATCH RESEND v2 1/4] pinctrl: Update Qualcomm pm8xxx GPIO parameters definitions
Date: Wed, 23 Jul 2014 16:47:34 -0700 [thread overview]
Message-ID: <53D04996.2030902@codeaurora.org> (raw)
In-Reply-To: <20140722214643.GH19700@sonymobile.com>
On 07/22/14 14:46, Bjorn Andersson wrote:
> For pm8941 the valid power supply values are:
> GPIO 1-14
> 0: VPH
> 2: SMPS3
> 3: LDO6
>
> GPIO 15-18
> 2: SMPS3
> 3: LDO6
>
> GPIO 19-36
> 0: VPH
> 1: VDD_TORCH
> 2: SPMS3
> 3: LDO6
>
> MPP 1-8
> 0: VPH
> 1: LDO1
> 2: SPMS3
> 3: LDO6
>
> For pma8084 the valid power supply values are:
> GPIO 1-22
> 0: VPH
> 2: SPMS4
> 3: LDO6
>
> MPP 1-8
> 0: VPH
> 1: LDO1
> 2: SMPS4
> 3: LDO6
>
> Please add these constants to the table of valid power-source values and use
> something like I did to translate them to register values - it makes the DT
> much more readable.
The DT could be similarly readable if we had a bunch of #defines for the
different VIN settings that resolved to the final register value for
that pmic. Something like PM8921_GPIO1_14_VPH, PM8921_GPIO19_36_VPH,
etc. There would be a lot of them, but then the driver could be really
simple and just jam whatever value is in the DT into the register
without having to bounce through a mapping table in software to figure
out the register value. If we did this for the functions also then I
believe we achieve readability without requiring a bunch of drivers for
each and every single pmic?
>
>> 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"
>> + specified pins. Valid values is: "gpio"
>>
>> - bias-disable:
>> Usage: optional
>> @@ -99,18 +95,6 @@ to specify in a pin configuration subnode:
>> Value type: <none>
>> Definition: The specified pins should be configued as pull down.
>>
>> -- bias-pull-up:
>> - Usage: optional
>> - Value type: <u32> (optional)
>> - Definition: The specified pins should be configued as pull up. An
>> - optional argument can be used to configure the strength.
>> - Valid values are; as defined in
>> - <dt-bindings/pinctrl/qcom,pm8xxx-gpio.h>:
>> - 1: 30uA (PM8XXX_GPIO_PULL_UP_30)
>> - 2: 1.5uA (PM8XXX_GPIO_PULL_UP_1P5)
>> - 3: 31.5uA (PM8XXX_GPIO_PULL_UP_31P5)
>> - 4: 1.5uA + 30uA boost (PM8XXX_GPIO_PULL_UP_1P5_30)
>> -
> As described above, I belive we should make this:
>
> - bias-pull-up:
> Usage: optional
> Value type: <empty>
> Definition: The specified pins should be configured as pull up.
>
> - qcom,pull-up-strength:
> Usage: optional
> Value type: <u32>
> Definition: Specifies the strength to use for pull up, if selected.
> Valid values are; as defined in
> <dt-bindings/pinctrl/qcom,pm8xxx-gpio.h>:
> 1: 30uA (PM8XXX_GPIO_PULL_UP_30)
> 2: 1.5uA (PM8XXX_GPIO_PULL_UP_1P5)
> 3: 31.5uA (PM8XXX_GPIO_PULL_UP_31P5)
> 4: 1.5uA + 30uA boost (PM8XXX_GPIO_PULL_UP_1P5_30)
> If this property is ommited 30uA strength will be used if
> pull up is selected.
Why is 30uA special? Just because most drivers use it? I'd prefer we
always be explicit about which pull-up we want so that nothing is left
up to the driver implementation.
Also according to the hw folks the 1.5uA + 30uA boost has never been
used so I say let's drop that feature. If we need it one day we can
always add a qcom,pull-up-boost or something (I highly doubt we'll need
it). Doing that allows us to specify this in actual SI units. Maybe even
allowing us to have a generic pull-up-strength (or
bias-pull-up-strength) specified in SI units of mA?
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
next prev parent reply other threads:[~2014-07-23 23:47 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-17 15:25 [PATCH v2 0/4] New Qualcomm PMIC pin controller drivers Ivan T. Ivanov
2014-07-17 15:25 ` [PATCH v2 1/4] pinctrl: Update Qualcomm PMXXX GPIO parameters definitions Ivan T. Ivanov
2014-07-17 15:25 ` [PATCH v2 2/4] pinctrl: qpnp: Qualcomm PMIC pin controller driver Ivan T. Ivanov
2014-07-21 11:13 ` kiran.padwal
2014-07-21 11:29 ` kiran.padwal
2014-07-21 11:29 ` kiran.padwal
[not found] ` <1405610748-7583-3-git-send-email-iivanov-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org>
2014-07-21 16:02 ` divya ojha
2014-07-21 16:02 ` divya ojha
2014-07-21 16:15 ` pramod gurav
2014-07-21 16:16 ` Ivan T. Ivanov
2014-07-23 15:27 ` Linus Walleij
2014-07-23 16:11 ` Ivan T. Ivanov
2014-07-26 1:43 ` David Collins
2014-07-28 8:39 ` Ivan T. Ivanov
2014-08-05 1:36 ` Stephen Boyd
[not found] ` <53E0350C.4020003-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2014-08-05 11:55 ` Ivan T. Ivanov
2014-08-05 11:55 ` Ivan T. Ivanov
2014-07-17 15:25 ` [PATCH v2 3/4] pinctrl: qcom: Add documentation for pinctrl-qpnp driver bindings Ivan T. Ivanov
2014-07-17 15:25 ` [PATCH v2 4/4] ARM: dts: qcom: Add PM8941 and PM8841 pinctrl nodes Ivan T. Ivanov
2014-07-17 19:41 ` [PATCH RESEND v2 1/4] pinctrl: Update Qualcomm pm8xxx GPIO parameters definitions Ivan T. Ivanov
2014-07-22 14:51 ` Ivan T. Ivanov
[not found] ` <1405626085-14069-1-git-send-email-iivanov-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org>
2014-07-22 21:46 ` Bjorn Andersson
2014-07-22 21:46 ` Bjorn Andersson
2014-07-23 12:47 ` Ivan T. Ivanov
2014-07-23 16:05 ` Ivan T. Ivanov
2014-07-23 16:05 ` Ivan T. Ivanov
2014-07-23 21:46 ` Stephen Boyd
2014-07-23 23:47 ` Stephen Boyd [this message]
2014-07-24 15:40 ` Linus Walleij
2014-07-25 0:23 ` Stephen Boyd
2014-07-25 11:29 ` Linus Walleij
2014-07-25 15:15 ` Ivan T. Ivanov
2014-08-06 15:02 ` Ivan T. Ivanov
2014-08-11 5:40 ` Bjorn Andersson
2014-07-23 12:47 ` [PATCH v2 0/4] New Qualcomm PMIC pin controller drivers 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=53D04996.2030902@codeaurora.org \
--to=sboyd@codeaurora.org \
--cc=bjorn.andersson@sonymobile.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=iivanov@mm-sol.com \
--cc=ijc+devicetree@hellion.org.uk \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.