[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2248330.M654Toyebg@wuerfel>
Date: Tue, 09 Dec 2014 09:23:18 +0100
From: Arnd Bergmann <arnd@...db.de>
To: Flora Fu <flora.fu@...iatek.com>
Cc: Matthias Brugger <matthias.bgg@...il.com>,
linux-arm-kernel@...ts.infradead.org,
Rob Herring <robh+dt@...nel.org>,
Samuel Ortiz <sameo@...ux.intel.com>,
Lee Jones <lee.jones@...aro.org>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>, arm@...nel.org,
Mark Rutland <mark.rutland@....com>,
devicetree@...r.kernel.org, Russell King <linux@....linux.org.uk>,
srv_heupstream@...iatek.com, Pawel Moll <pawel.moll@....com>,
Ian Campbell <ijc+devicetree@...lion.org.uk>,
linux-kernel@...r.kernel.org,
HenryC Chen <henryc.chen@...iatek.com>,
Menghui Lin <menghui.lin@...iatek.com>,
Olof Johansson <olof@...om.net>,
Sascha Hauer <kernel@...gutronix.de>,
Kumar Gala <galak@...eaurora.org>,
Grant Likely <grant.likely@...aro.org>,
Yingjoe Chen <yingjoe.chen@...iatek.com>,
Eddie Huang <eddie.huang@...iatek.com>,
Dongdong Cheng <dongdong.cheng@...iatek.com>
Subject: Re: [PATCH v3 1/8] soc: mediatek: Add PMIC wrapper for MT8135 and MT6397 SoC
On Tuesday 09 December 2014 10:15:37 Flora Fu wrote:
> Hi, Arnd,
>
> On Fri, 2014-12-05 at 11:13 +0100, Arnd Bergmann wrote:
> > On Friday 05 December 2014 12:07:52 Flora Fu wrote:
> > > Add PMIC wrapper of MT8135 to access MT6397 MFD.
> > >
> > > Signed-off-by: Flora Fu <flora.fu@...iatek.com>
> > >
> >
> > Please explain what a PMIC wrapper is and why you need one for MT8135.
> > I don't understand the purpose of this code at all. Is this just another
> > way of accessing the MT6397 when not using i2c or spi like other
> > PMIC drivers do?
> >
>
> Yes, MT8135 uses a proprietary hardware to communicate with MT6397.
> The hardware is called PMIC Wrapper or PWRAP.
> Since it is not standard i2c or spi protocols, a soc related software
> driver is implemented to handle access protocols in AP side.
>
> +-----------------+ +---------------+
> | | | |
> | Mediatek AP SoC | | |
> | (ex. MT8135) | | MT6397 |
> | | | |
> | +--------+ | (SPI bus) | +--------+ |
> | | | |-----------| | | |
> | | PMIC | |-----------| | PMIC | |
> | | Wrapper| |-----------| | Wrapper| |
> | | | |-----------| | | |
> | +--------+ | | +--------+ |
> | | | |
> +-----------------+ +---------------+
>
I think we have had a similar case recently where a controller wasn't
actually using I2C, but the sofware protocol was close enough so we decided
to make it appear as i2c in Linux.
Would that work for you, i.e. register the pmic wrapper as a fake spi
master driver in drivers/spi/ and register the rtc/regulator/codec
as SPI clients from DT?
Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists