public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: John Crispin <blogic@openwrt.org>
To: Matthias Brugger <matthias.bgg@gmail.com>
Cc: Sascha Hauer <s.hauer@pengutronix.de>,
	Henry Chen <henryc.chen@mediatek.com>,
	Thierry Reding <treding@nvidia.com>,
	Flora Fu <flora.fu@mediatek.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH V4 11/11] soc: mediatek: PMIC wrap: add MT2701/7623 support
Date: Mon, 1 Feb 2016 12:29:46 +0100	[thread overview]
Message-ID: <56AF41AA.9090204@openwrt.org> (raw)
In-Reply-To: <56AF409A.2040705@gmail.com>



On 01/02/2016 12:25, Matthias Brugger wrote:
> On 27/01/16 12:29, John Crispin wrote:
> 
> [...]
> 
>>
>> +static int pwrap_mt2701_init_reg_clock(struct pmic_wrapper *wrp)
>> +{
>> +    switch (wrp->slave->type) {
>> +    case PMIC_MT6397:
>> +        pwrap_writel(wrp, 0xc, PWRAP_RDDMY);
>> +        pwrap_writel(wrp, 0x4, PWRAP_CSHEXT_WRITE);
>> +        pwrap_writel(wrp, 0x0, PWRAP_CSHEXT_READ);
>> +        pwrap_writel(wrp, 0x2, PWRAP_CSLEXT_START);
>> +        pwrap_writel(wrp, 0x2, PWRAP_CSLEXT_END);
>> +        break;
>> +
>> +    case PMIC_MT6323:
>> +        pwrap_writel(wrp, 0x8, PWRAP_RDDMY);
>> +        pwrap_dew_write(wrp, PWRAP_DEW_RDDMY_NO, 0x8);
>> +        pwrap_writel(wrp, 0x5, PWRAP_CSHEXT_WRITE);
>> +        pwrap_writel(wrp, 0x0, PWRAP_CSHEXT_READ);
>> +        pwrap_writel(wrp, 0x2, PWRAP_CSLEXT_START);
>> +        pwrap_writel(wrp, 0x2, PWRAP_CSLEXT_END);
>> +        break;
>> +    }
>> +
>> +    return 0;
>> +}
>> +
> 
> I forgot this:
> So mt2701 can be used with both PMICs? Just wondering, as from what I
> know, SoC and PMIC a tightly coupled.

yes, it can be run with old and new style pmics. this is why the MAN_CMD
SPI_W bit has changed. the old BIT(13) is used to tell the wrapper what
slave type it has.

there is a way to runtime set the pmic but there is still a detail i
need to look at so it is not part of this series

> 
> In general this series looks quite good to me.
> 

i'll spin V5 during the day. busy adding dual gmac support to the
ethernet driver just now.

	John

      reply	other threads:[~2016-02-01 11:29 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-27 11:28 [PATCH V4 01/11] dt-bindings: ARM: Mediatek: add MT2701/7623 string to the PMIC wrapper doc John Crispin
2016-01-27 11:29 ` [PATCH V4 02/11] soc: mediatek: PMIC wrap: don't duplicate the wrapper data John Crispin
2016-01-27 11:29 ` [PATCH V4 03/11] soc: mediatek: PMIC wrap: add wrapper callbacks for init_reg_clock John Crispin
2016-01-27 11:29 ` [PATCH V4 04/11] soc: mediatek: PMIC wrap: split SoC specific init into callback John Crispin
2016-01-27 11:29 ` [PATCH V4 05/11] soc: mediatek: PMIC wrap: WRAP_INT_EN needs a different bitmask for MT2701/7623 John Crispin
2016-01-27 11:29 ` [PATCH V4 06/11] soc: mediatek: PMIC wrap: SPI_WRITE " John Crispin
2016-01-27 11:29 ` [PATCH V4 07/11] soc: mediatek: PMIC wrap: move wdt_src into the pmic_wrapper_type struct John Crispin
2016-01-27 11:29 ` [PATCH V4 08/11] soc: mediatek: PMIC wrap: remove pwrap_is_mt8135() and pwrap_is_mt8173() John Crispin
2016-01-27 11:29 ` [PATCH V4 09/11] soc: mediatek: PMIC wrap: add a slave specific struct John Crispin
2016-01-28  2:37   ` Henry Chen
2016-02-01  8:25     ` John Crispin
2016-02-01  8:38       ` Henry Chen
2016-01-27 11:29 ` [PATCH V4 10/11] soc: mediatek: PMIC wrap: add mt6323 slave support John Crispin
2016-01-27 11:29 ` [PATCH V4 11/11] soc: mediatek: PMIC wrap: add MT2701/7623 support John Crispin
2016-02-01 11:21   ` Matthias Brugger
2016-02-01 11:25   ` Matthias Brugger
2016-02-01 11:29     ` John Crispin [this message]

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=56AF41AA.9090204@openwrt.org \
    --to=blogic@openwrt.org \
    --cc=flora.fu@mediatek.com \
    --cc=henryc.chen@mediatek.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=s.hauer@pengutronix.de \
    --cc=treding@nvidia.com \
    /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