[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200914022840.GF3463198@lunn.ch>
Date: Mon, 14 Sep 2020 04:28:40 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Vadym Kochan <vadym.kochan@...ision.eu>
Cc: netdev@...r.kernel.org, Russell King <linux@...linux.org.uk>
Subject: Re: [DISCUSS] sfp: sfp controller concept
On Fri, Sep 11, 2020 at 09:19:14PM +0300, Vadym Kochan wrote:
> Hi,
>
> I'd like to discuss a concept of introduction additional entity into SFP
> subsystem called SFP controller. But lets start with the issue.
>
> Issue
> =====
>
> There are boards with SFP ports whose GPIO pins are not connected directly to
> the SoC but to the I2C CPLD device which has ability to read/write statuses of
> each SFP via I2C read/write commands.
>
> Of course there is already a solution - implement GPIO chip and convert GPIO
> numbers & states into internal representation (I2C registers). But it requires
> additional GPIO-related handling like:
>
> 1) Describe GPIO pins and IN/OUT mapping in DTS
>
> 2) Consider this mapping also in CPLD driver
>
> 3) IRQ - for me this is not clear how to simulate
> sending IRQ via GPIO chip.
Hi Vadym
I2C GPIO expanders do work O.K. for this use case. See for example
vf610-zii-dev-rev-c.dts. It has a semtech,sx1503q expander. And the
two SFF on that board are connected to it. The sx1503q can generate an
interrupt when one of its inputs changes state. But for the SFP core,
that is optional, it can also poll the GPIOs if interrupts are not
supported.
Andrew
Powered by blists - more mailing lists