RE: [PATCH V4 3/6] ARM: dts: imx6sx-sabreauto: add IO expander max7310 support

From: Anson Huang
Date: Thu Apr 26 2018 - 21:33:11 EST




Anson Huang
Best Regards!


> -----Original Message-----
> From: Fabio Estevam [mailto:festevam@xxxxxxxxx]
> Sent: Friday, April 27, 2018 1:24 AM
> To: Anson Huang <anson.huang@xxxxxxx>
> Cc: Shawn Guo <shawnguo@xxxxxxxxxx>; Sascha Hauer
> <kernel@xxxxxxxxxxxxxx>; Fabio Estevam <fabio.estevam@xxxxxxx>; Rob
> Herring <robh+dt@xxxxxxxxxx>; Mark Rutland <mark.rutland@xxxxxxx>;
> Russell King - ARM Linux <linux@xxxxxxxxxxxxxxx>; dl-linux-imx
> <linux-imx@xxxxxxx>; moderated list:ARM/FREESCALE IMX / MXC ARM
> ARCHITECTURE <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>; open list:OPEN
> FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
> <devicetree@xxxxxxxxxxxxxxx>; linux-kernel <linux-kernel@xxxxxxxxxxxxxxx>
> Subject: Re: [PATCH V4 3/6] ARM: dts: imx6sx-sabreauto: add IO expander
> max7310 support
>
> On Thu, Apr 26, 2018 at 3:31 AM, Anson Huang <anson.huang@xxxxxxx>
> wrote:
>
> > I searched the mail I sent, I can NOT found where I said "MAX7310 controls
> the ethernet phy"....
>
> Initially you passed: pinctrl-assert-gpios = <&max7322 0 GPIO_ACTIVE_HIGH>
> inside the fec1 node.
>
> Then I explained that 'pinctrl-assert-gpios' is not a valid property in mainline. It
> only exists in NXP vendor tree.
>
> Then you explained:
>
> "Sorry, I made a mistake here, the MAX7320 IO0 is for adjusting FEC1's voltage"

The ' pinctrl-assert-gpios ' is ONLY in NXP local tree, FEC owner added it because he
wants to set this GPIO ONCE during kernel boot up, but upstream kernel does NOT
support the pinctrl-assert-gpio, so we have to drop it, the MAX7322 IO0 is for adjusting
FEC's voltage, I meant for FEC IO's voltage, 1.5V or 1.8V. If I made any confuse, I am
sorry for that, I think it should be clear now, all we want/need is to set this GPIO ONCE
to get the IO voltage we want.

>
> > There are MAX7310 users, it is just because currently those users are
> > NOT enabled, so I can NOT verify them. MAX7310 is an independent I2C
> device, why we can NOT enable it first?
> > I tested it from sysfs interface, we can control the MAX7310's IO
> > output via echo different value to GPIO value, that means MAX7310
> > itself as an IO expander chip is working just fine, similar with PMIC, it is a I2C
> device, can be enabled independently, then consumers can be added later when
> they are enabled.
> > Just my personal opinion, thanks.
>
> Right, but if FEC needs max7322 IO0 at level 1 then better describe it in dts.

Agree, since currently our FEC driver does NOT support adjusting such IO voltage in driver,
and there is NO such requirement of runtime switching IO voltage for FEC, so I think it
should be good here, just use the default settings of MAX7322 IO0 described in 'reg_fec',
if there is any further requirement of runtime adjusting FEC IO voltage, I think FEC driver
needs to add such support, and there will be new patch for it.

Thanks.

Anson.