Re: [RFC] net: stmmac: Problem with adding the native GPIOs support

2020-12-15 Thread Serge Semin
On Wed, Dec 16, 2020 at 03:03:55AM +0100, Andrew Lunn wrote: > > > From what you are saying, it sounds like from software you cannot > > > independently control the GPIO controller reset? > > > > No. The hardware implements the default MAC reset behavior. So the > > GPIO controller gets reset sync

Re: [RFC] net: stmmac: Problem with adding the native GPIOs support

2020-12-15 Thread Andrew Lunn
> > From what you are saying, it sounds like from software you cannot > > independently control the GPIO controller reset? > > No. The hardware implements the default MAC reset behavior. So the > GPIO controller gets reset synchronously with the MAC reset and that > can't be changed. Is there pin

Re: [RFC] net: stmmac: Problem with adding the native GPIOs support

2020-12-15 Thread Serge Semin
On Tue, Dec 15, 2020 at 02:58:37PM +0100, Andrew Lunn wrote: > > > > Anyway the hardware setup depicted above doesn't seem > > > > problematic at the first glance, but in fact it is. See, the DW *MAC > > > > driver > > > > (STMMAC ethernet driver) is doing the MAC reset each time it performs > >

Re: [RFC] net: stmmac: Problem with adding the native GPIOs support

2020-12-15 Thread Andrew Lunn
> > > Anyway the hardware setup depicted above doesn't seem > > > problematic at the first glance, but in fact it is. See, the DW *MAC > > > driver > > > (STMMAC ethernet driver) is doing the MAC reset each time it performs the > > > device open or resume by means of the call-chain: > > > > > >

Re: [RFC] net: stmmac: Problem with adding the native GPIOs support

2020-12-15 Thread Serge Semin
Hello Andrew, On Mon, Dec 14, 2020 at 04:31:43PM +0100, Andrew Lunn wrote: > On Mon, Dec 14, 2020 at 12:25:16PM +0300, Serge Semin wrote: > > Hello folks, > > > > I've got a problem, which has been blowing by head up for more than three > > weeks now, and I'm desperately need your help in that ma

Re: [RFC] net: stmmac: Problem with adding the native GPIOs support

2020-12-15 Thread Serge Semin
Hello Alexandre, Thanks for the response. My comments are below. On Mon, Dec 14, 2020 at 11:52:14AM +0100, Alexandre Torgue wrote: > Hi Serge, > > Sorry I never used GPIO provided by DWMAC IP. Obviously, I think is to late > for you to use GPIOs provided by your SoC directly. Unfortunately, it

Re: [RFC] net: stmmac: Problem with adding the native GPIOs support

2020-12-14 Thread Andrew Lunn
On Mon, Dec 14, 2020 at 12:25:16PM +0300, Serge Semin wrote: > Hello folks, > > I've got a problem, which has been blowing by head up for more than three > weeks now, and I'm desperately need your help in that matter. See our > Baikal-T1 SoC is created with two DW GMAC v3.73a IP-cores. Each core >

Re: [RFC] net: stmmac: Problem with adding the native GPIOs support

2020-12-14 Thread Alexandre Torgue
Hi Serge, Sorry I never used GPIO provided by DWMAC IP. Obviously, I think is to late for you to use GPIOs provided by your SoC directly. Unfortunately, it seems to be a "perfect" chicken and eggs problem :(. Do you have possibilty to "play" with gpio setting. I mean change configuration of

[RFC] net: stmmac: Problem with adding the native GPIOs support

2020-12-14 Thread Serge Semin
Hello folks, I've got a problem, which has been blowing by head up for more than three weeks now, and I'm desperately need your help in that matter. See our Baikal-T1 SoC is created with two DW GMAC v3.73a IP-cores. Each core has been synthesized with two GPIOs: one as GPI and another as GPO. Ther