From: Baruch Siach Date: Tue, 29 May 2018 07:58:29 +0300 Subject: [U-Boot] [PATCH] arm: mvebu: switch clearfog to use device-tree i2c and gpio In-Reply-To: References: <7df5b3ba13f226568e53f70d14b040b88a74bde6.1527523830.git.baruch@tkos.co.il> Message-ID: <20180529045829.tao6em2etdcu6fdb@tarshish> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 wrote: > > > From: Jon Nettleton > > > 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 > > [baruch: add DT i2c aliases] > > Signed-off-by: Baruch Siach > > --- [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. Thanks for reviewing, baruch -- http://baruch.siach.name/blog/ ~. .~ Tk Open Systems =}------------------------------------------------ooO--U--Ooo------------{= - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -