Re: [patch v5] i2c: mux: mellanox: add driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2016-09-13 22:37, vadimp@xxxxxxxxxxxx wrote:
> From: Vadim Pasternak <vadimp@xxxxxxxxxxxx>
> 
> This driver allows I2C routing controlled through CPLD select registers on
> a wide range of Mellanox systems (CPLD Lattice device).
> MUX selection is provided by digital and analog HW. Analog part is not
> under SW control.
> Digital part is under CPLD control (channel selection/de-selection).
> 
> Connectivity schema.
> i2c-mlxcpld                                 Digital               Analog
> driver
> *--------*                                 * -> mux1 (virt bus2) -> mux ->|
> | I2CLPC | i2c physical                    * -> mux2 (virt bus3) -> mux ->|
> | bridge | bus 1                 *---------*                              |
> | logic  |---------------------> * mux reg *                              |
> | in CPLD|                       *---------*                              |
> *--------*   i2c-mux-mlxpcld          ^    * -> muxn (virt busn) -> mux ->|
>     |        driver                   |                                   |
>     |        *---------------*        |                             Devices
>     |        * CPLD (i2c bus)* select |
>     |        * registers for *--------*
>     |        * mux selection * deselect
>     |        *---------------*
>     |                 |
> <-------->     <----------->
> i2c cntrl      Board cntrl reg
> reg space      space (mux select,
>                IO, LED, WD, info)

Hmm, I'm wondering about the above schematics, which seems a bit
overly complex. I mean, it's not relevant to this driver how the
I2CLPC bridge logic in the CPLD is controlled. Particularly so
since it does not need to be a this particular i2c adapter that
is muxed.

But what I'm really wondering is if this mux can mux same other
bus than is used to control the mux. I.e. is it possible to do
something like this:

  .---.          .-------------.
  |   |          |             |-- i2c2 --
  | l |-- i2c0 --| mlxcpld mux |
  | i |          |             |-- i2c3 --
  | n |          '-------------'
  | u |                 |
  | x |-- i2c1 ---------'
  |   |
  '---'

Or is it always as below, with the mux being controlled from
the same i2c bus it muxes?

  .---.             .-------------.
  | l |             |             |-- i2c1 --
  | i |-- i2c0 --+--| mlxcpld mux |
  | n |          |  |             |-- i2c2 --
  | u |          |  '-------------'
  | x |          |         |
  '---'          '---------'

Cheers,
Peter

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux