Message ID | 20190303190059.31155-1-marek.vasut@gmail.com (mailing list archive) |
---|---|
State | Mainlined, archived |
Commit | a8d5fc0be537d49562f3d4b63390584e304ec8dc |
Headers | show |
Series | ARM: dts: alt: Add DA9063 PMIC node | expand |
Hi Marek, On Sun, Mar 3, 2019 at 8:01 PM <marek.vasut@gmail.com> wrote: > From: Marek Vasut <marek.vasut+renesas@gmail.com> > > Add DA9063 PMIC node to the I2C bus. > > Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Thanks for your patch! Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> > --- a/arch/arm/boot/dts/r8a7794-alt.dts > +++ b/arch/arm/boot/dts/r8a7794-alt.dts > @@ -377,6 +377,27 @@ > pinctrl-names = "i2c-exio4"; > }; > > +&i2c7 { > + status = "okay"; > + clock-frequency = <100000>; According to the DA9063 datasheet, the PMIC supports up to 400 kHz. It looks like there are no other devices on the bus. Wolfram, what's your stance on this? > + > + pmic@58 { > + compatible = "dlg,da9063"; > + reg = <0x58>; > + interrupt-parent = <&gpio3>; > + interrupts = <31 IRQ_TYPE_LEVEL_LOW>; > + interrupt-controller; > + > + rtc { > + compatible = "dlg,da9063-rtc"; > + }; > + > + wdt { > + compatible = "dlg,da9063-watchdog"; > + }; > + }; > +}; > + Gr{oetje,eeting}s, Geert
> > Add DA9063 PMIC node to the I2C bus. > > > > Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> > > Thanks for your patch! > > Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Thanks for CCing me, I didn't get and missed the original patch. > > +++ b/arch/arm/boot/dts/r8a7794-alt.dts > > @@ -377,6 +377,27 @@ > > pinctrl-names = "i2c-exio4"; > > }; > > > > +&i2c7 { > > + status = "okay"; > > + clock-frequency = <100000>; > > According to the DA9063 datasheet, the PMIC supports up to 400 kHz. > It looks like there are no other devices on the bus. > > Wolfram, what's your stance on this? Yes, please. I thought this was standard on Gen2 IIC_DVFS busses, but seems not. Probably it slipped through the cracks.
On 3/4/19 11:57 AM, Wolfram Sang wrote: > >>> Add DA9063 PMIC node to the I2C bus. >>> >>> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> >> >> Thanks for your patch! >> >> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> > > Thanks for CCing me, I didn't get and missed the original patch. > >>> +++ b/arch/arm/boot/dts/r8a7794-alt.dts >>> @@ -377,6 +377,27 @@ >>> pinctrl-names = "i2c-exio4"; >>> }; >>> >>> +&i2c7 { >>> + status = "okay"; >>> + clock-frequency = <100000>; >> >> According to the DA9063 datasheet, the PMIC supports up to 400 kHz. >> It looks like there are no other devices on the bus. >> >> Wolfram, what's your stance on this? > > Yes, please. I thought this was standard on Gen2 IIC_DVFS busses, but > seems not. Probably it slipped through the cracks. Do we want to update all of the other boards too ? I'd be cautious about the DVFS I2C, running faster while talking to the PMIC and reading/writing a few registers brings little benefit, while the signal integrity might be impacted.
On Mon, Mar 04, 2019 at 11:59:48AM +0100, Marek Vasut wrote: > On 3/4/19 11:57 AM, Wolfram Sang wrote: > > > >>> Add DA9063 PMIC node to the I2C bus. > >>> > >>> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> > >> > >> Thanks for your patch! > >> > >> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> > > > > Thanks for CCing me, I didn't get and missed the original patch. > > > >>> +++ b/arch/arm/boot/dts/r8a7794-alt.dts > >>> @@ -377,6 +377,27 @@ > >>> pinctrl-names = "i2c-exio4"; > >>> }; > >>> > >>> +&i2c7 { > >>> + status = "okay"; > >>> + clock-frequency = <100000>; > >> > >> According to the DA9063 datasheet, the PMIC supports up to 400 kHz. > >> It looks like there are no other devices on the bus. > >> > >> Wolfram, what's your stance on this? > > > > Yes, please. I thought this was standard on Gen2 IIC_DVFS busses, but > > seems not. Probably it slipped through the cracks. > > Do we want to update all of the other boards too ? > > I'd be cautious about the DVFS I2C, running faster while talking to the > PMIC and reading/writing a few registers brings little benefit, while > the signal integrity might be impacted. Can be argued. I think if we would apply some testing on top of this change, we will find that it will work. But we would in deed need this testing as verification, and this is not our top priority project. But if someone feels like running some i2c dumping over night, well, why not..
On Mon, Mar 04, 2019 at 12:13:49PM +0100, Wolfram Sang wrote: > On Mon, Mar 04, 2019 at 11:59:48AM +0100, Marek Vasut wrote: > > On 3/4/19 11:57 AM, Wolfram Sang wrote: > > > > > >>> Add DA9063 PMIC node to the I2C bus. > > >>> > > >>> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> > > >> > > >> Thanks for your patch! > > >> > > >> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> > > > > > > Thanks for CCing me, I didn't get and missed the original patch. > > > > > >>> +++ b/arch/arm/boot/dts/r8a7794-alt.dts > > >>> @@ -377,6 +377,27 @@ > > >>> pinctrl-names = "i2c-exio4"; > > >>> }; > > >>> > > >>> +&i2c7 { > > >>> + status = "okay"; > > >>> + clock-frequency = <100000>; > > >> > > >> According to the DA9063 datasheet, the PMIC supports up to 400 kHz. > > >> It looks like there are no other devices on the bus. > > >> > > >> Wolfram, what's your stance on this? > > > > > > Yes, please. I thought this was standard on Gen2 IIC_DVFS busses, but > > > seems not. Probably it slipped through the cracks. > > > > Do we want to update all of the other boards too ? > > > > I'd be cautious about the DVFS I2C, running faster while talking to the > > PMIC and reading/writing a few registers brings little benefit, while > > the signal integrity might be impacted. > > Can be argued. I think if we would apply some testing on top of this > change, we will find that it will work. But we would in deed need this > testing as verification, and this is not our top priority project. But > if someone feels like running some i2c dumping over night, well, > why not.. Thanks, I've applied this patch for v5.2. We can do a sweep of frequency updates as a follow-up if we decide that is the right way to go.
On 3/8/19 2:40 PM, Simon Horman wrote: > On Mon, Mar 04, 2019 at 12:13:49PM +0100, Wolfram Sang wrote: >> On Mon, Mar 04, 2019 at 11:59:48AM +0100, Marek Vasut wrote: >>> On 3/4/19 11:57 AM, Wolfram Sang wrote: >>>> >>>>>> Add DA9063 PMIC node to the I2C bus. >>>>>> >>>>>> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> >>>>> >>>>> Thanks for your patch! >>>>> >>>>> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> >>>> >>>> Thanks for CCing me, I didn't get and missed the original patch. >>>> >>>>>> +++ b/arch/arm/boot/dts/r8a7794-alt.dts >>>>>> @@ -377,6 +377,27 @@ >>>>>> pinctrl-names = "i2c-exio4"; >>>>>> }; >>>>>> >>>>>> +&i2c7 { >>>>>> + status = "okay"; >>>>>> + clock-frequency = <100000>; >>>>> >>>>> According to the DA9063 datasheet, the PMIC supports up to 400 kHz. >>>>> It looks like there are no other devices on the bus. >>>>> >>>>> Wolfram, what's your stance on this? >>>> >>>> Yes, please. I thought this was standard on Gen2 IIC_DVFS busses, but >>>> seems not. Probably it slipped through the cracks. >>> >>> Do we want to update all of the other boards too ? >>> >>> I'd be cautious about the DVFS I2C, running faster while talking to the >>> PMIC and reading/writing a few registers brings little benefit, while >>> the signal integrity might be impacted. >> >> Can be argued. I think if we would apply some testing on top of this >> change, we will find that it will work. But we would in deed need this >> testing as verification, and this is not our top priority project. But >> if someone feels like running some i2c dumping over night, well, >> why not.. > > Thanks, > > I've applied this patch for v5.2. > We can do a sweep of frequency updates as a follow-up if we decide > that is the right way to go. Do we really want to speed up the PMIC I2C bus ? What are the pros (none?) and cons (might be unstable) ?
> Do we really want to speed up the PMIC I2C bus ? What are the pros > (none?) and cons (might be unstable) ? Then let's go down to 10kHz instead? Even more stable.
On 3/8/19 3:53 PM, Wolfram Sang wrote: > >> Do we really want to speed up the PMIC I2C bus ? What are the pros >> (none?) and cons (might be unstable) ? > > Then let's go down to 10kHz instead? Even more stable. 100 kHz and 400 kHz seem to be the most often used I2C frequencies, maybe we should stick to those, since I presume Dialog tested the PMIC with at least those two.
diff --git a/arch/arm/boot/dts/r8a7794-alt.dts b/arch/arm/boot/dts/r8a7794-alt.dts index ef7e2a837df6..e0500ec81569 100644 --- a/arch/arm/boot/dts/r8a7794-alt.dts +++ b/arch/arm/boot/dts/r8a7794-alt.dts @@ -377,6 +377,27 @@ pinctrl-names = "i2c-exio4"; }; +&i2c7 { + status = "okay"; + clock-frequency = <100000>; + + pmic@58 { + compatible = "dlg,da9063"; + reg = <0x58>; + interrupt-parent = <&gpio3>; + interrupts = <31 IRQ_TYPE_LEVEL_LOW>; + interrupt-controller; + + rtc { + compatible = "dlg,da9063-rtc"; + }; + + wdt { + compatible = "dlg,da9063-watchdog"; + }; + }; +}; + &vin0 { status = "okay"; pinctrl-0 = <&vin0_pins>;