
On Tue, May 29, 2018 at 4:58 PM Baruch Siach baruch@tkos.co.il wrote:
Hi Chris,
On Tue, May 29, 2018 at 10:53:38AM +1200, Chris Packham wrote:
On Tue, May 29, 2018 at 4:11 AM Baruch Siach baruch@tkos.co.il wrote:
From: Jon Nettleton jon@solid-run.com
This switches the clearfog boards to use DM based gpio and i2c drivers. The io expanders are configured via their device-tree entries.
Signed-off-by: Jon Nettleton jon@solid-run.com [baruch: add DT i2c aliases] Signed-off-by: Baruch Siach baruch@tkos.co.il
[snip]
-static struct marvell_io_exp io_exp[] = {
{ 0x20, 2, 0x40 }, /* Deassert both mini pcie reset
signals
*/
{ 0x20, 6, 0xf9 },
{ 0x20, 2, 0x46 }, /* rst signals and ena USB3 current
limiter */
{ 0x20, 6, 0xb9 },
{ 0x20, 3, 0x00 }, /* Set SFP_TX_DIS to zero */
{ 0x20, 7, 0xbf }, /* Drive SFP_TX_DIS to zero */
-};
Will this actually work? As far as I can see u-boot lacks a gpio-hog implementation so despite the fact that these are all enumerated in the
dts
they won't have the same effect.
I'd be glad to be proven wrong because I'd like to use a gpio-hog for
some
other boards.
I asked Jon (back on Cc) exactly that before submitting this patch. His response:
I think that is fine. They can still be toggled and controlled via the
gpio
interface within u-boot. I assume once a proper patch is mainline this
will
just start to work.
My testing showed now regression because of this patch.
OK. Did you test with a power cycle? I know some of the pca gpio chips don't have a reset line so the state may be different depending on if you power cycled or just used the reset/reboot command. It could also be that u-boot doesn't access these devices so there's no problem.
I kinda was hoping for "here's a gpio-hog implementation @ patchwork/1234" :) but I guess I'll have to look into making one myself.
Thanks for reviewing,
Assuming there's no problem with power-on behaviour
Reviewed-by: Chris Packham judge.packham@gmail.com
baruch
-- http://baruch.siach.name/blog/ ~. .~ Tk Open
Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -