From: Georgi Djakov <gdjakov@mm-sol.com>
To: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Cc: "linus.walleij@linaro.org" <linus.walleij@linaro.org>,
"galak@codeaurora.org" <galak@codeaurora.org>,
"agross@codeaurora.org" <agross@codeaurora.org>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"mark.rutland@arm.com" <mark.rutland@arm.com>,
"grant.likely@linaro.org" <grant.likely@linaro.org>,
"sboyd@codeaurora.org" <sboyd@codeaurora.org>,
"iivanov@mm-sol.com" <iivanov@mm-sol.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-arm-msm@vger.kernel.org" <linux-arm-msm@vger.kernel.org>
Subject: Re: [PATCH v2 1/3] pinctrl: qcom: Add APQ8084 pinctrl support
Date: Fri, 29 Aug 2014 16:09:30 +0300 [thread overview]
Message-ID: <54007B8A.50503@mm-sol.com> (raw)
In-Reply-To: <20140829060059.GG12494@sonymobile.com>
On 08/29/2014 09:01 AM, Bjorn Andersson wrote:
> On Tue 26 Aug 05:45 PDT 2014, Georgi Djakov wrote:
>
> Hi Georgi,
>
> Sorry for missing this before, but I did a quick walkthrough and unfortunately
> the gpio configuration needs a few updates.
>
>> diff --git a/drivers/pinctrl/qcom/pinctrl-apq8084.c b/drivers/pinctrl/qcom/pinctrl-apq8084.c
> [...]
>> +
>> +#define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7) \
>> + { \
>> + .name = "gpio" #id, \
>> + .pins = gpio##id##_pins, \
>> + .npins = ARRAY_SIZE(gpio##id##_pins), \
>> + .funcs = (int[]){ \
>> + APQ_MUX_gpio, \
>> + APQ_MUX_##f1, \
>> + APQ_MUX_##f2, \
>> + APQ_MUX_##f3, \
>> + APQ_MUX_##f4, \
>> + APQ_MUX_##f5, \
>> + APQ_MUX_##f6, \
>> + APQ_MUX_##f7 \
>> + }, \
>> + .nfuncs = 8, \
>> + .ctl_reg = 0x1000 + 0x10 * id, \
>> + .io_reg = 0x1004 + 0x10 * id, \
>> + .intr_cfg_reg = 0x1008 + 0x10 * id, \
>> + .intr_status_reg = 0x100c + 0x10 * id, \
>> + .intr_target_reg = 0x400 + 0x4 * id, \
>
> The routing of the interrupt is specified in TLMM_GPIO_INTR_CFG(n),
> i.e: 0x1008 + 0x10 * n
>
> Apparently the HW guys wanted to give us more work, so in 8084 they use 3 to
> specify routing the interrupts to KPSS, instead of the previous 4. So the
> static define of INTR_TARGET_PROC_APPS is no longer adequate.
>
> My suggestion is that you create an additional patch and add to your series
> that moves todays hardcoded 4 into the soc_data for the existing platforms (or
> include it in this struct).
>
>> + .mux_bit = 2, \
>> + .pull_bit = 0, \
>> + .drv_bit = 6, \
>> + .oe_bit = 9, \
>> + .in_bit = 0, \
>> + .out_bit = 1, \
>> + .intr_enable_bit = 0, \
>> + .intr_status_bit = 0, \
>> + .intr_ack_high = 1, \
>
> With the 8084 TLMM chip you ack the interrupt status by clearing this bit, so
> intr_ack_high should be 0.
>
>> + .intr_target_bit = 0, \
>
> Target bit is 5.
>
>> + .intr_raw_status_bit = 3, \
>
> Raw interrupt status bit is 4.
>
>> + .intr_polarity_bit = 1, \
>> + .intr_detection_bit = 2, \
>> + .intr_detection_width = 1, \
>
> You can do level, raise, fall and both edge detection with 8084, so the width
> of his part is 2.
>
>> + }
>> +
>
Thanks Bjorn. I'll search for some more information regarding this and will
update accordingly, including the INTR_TARGET_PROC_APPS for each platform.
Thanks again for your time!
BR,
Georgi
next prev parent reply other threads:[~2014-08-29 13:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-26 12:45 [PATCH v2 0/3] pinctrl: qcom: Add APQ8084 pinctrl support Georgi Djakov
2014-08-26 12:45 ` [PATCH v2 1/3] " Georgi Djakov
2014-08-27 21:53 ` Andy Gross
2014-08-29 5:30 ` Linus Walleij
2014-08-29 6:01 ` Bjorn Andersson
2014-08-29 13:09 ` Georgi Djakov [this message]
2014-08-26 12:45 ` [PATCH v2 2/3] dt: Document Qualcomm APQ8084 pinctrl binding Georgi Djakov
2014-08-27 21:58 ` Andy Gross
2014-08-29 6:09 ` Bjorn Andersson
2014-08-29 13:10 ` Georgi Djakov
2014-08-26 12:45 ` [PATCH v2 3/3] ARM: dts: qcom: Add TLMM DT node for APQ8084 Georgi Djakov
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=54007B8A.50503@mm-sol.com \
--to=gdjakov@mm-sol.com \
--cc=agross@codeaurora.org \
--cc=bjorn.andersson@sonymobile.com \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=grant.likely@linaro.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 \
--cc=sboyd@codeaurora.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).