[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAFd5g47z8Lo1usLRDLL32Pw8LB40+bpcbnJdcvW5ffoVhKM-uA@mail.gmail.com>
Date: Tue, 25 Feb 2020 11:30:22 -0800
From: Brendan Higgins <brendanhiggins@...gle.com>
To: Tali Perry <tali.perry1@...il.com>
Cc: Wolfram Sang <wsa@...-dreams.de>, Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Nancy Yuen <yuenn@...gle.com>,
Patrick Venture <venture@...gle.com>,
Benjamin Fair <benjaminfair@...gle.com>,
Avi Fishman <avifishman70@...il.com>,
Joel Stanley <joel@....id.au>,
Tomer Maimon <tmaimon77@...il.com>, syniurge@...il.com,
linux-i2c@...r.kernel.org,
OpenBMC Maillist <openbmc@...ts.ozlabs.org>,
devicetree <devicetree@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v7 2/2] i2c: npcm: Add Nuvoton NPCM I2C controller driver
On Tue, Nov 26, 2019 at 1:23 AM Tali Perry <tali.perry1@...il.com> wrote:
>
> Hi Wolfram,
>
> Thanks for your comments.
>
> The NPCM7XX BMC I2C\SMB controller HW module supports both SMB and I2C.
> It's main features are:
> 1. Supports Fast-Mode (400 KHz clock) I2C and Fast-Mode-plus (1 MHz clock) I2C
> 2. Supports the ‘fairness’ arbitration protocol defined by the MCTP
> SMBus/I2C Transport Binding Specification v1.0.0
> 3. 32KB packets : this is an I2C spec limitation. The HW has no limit
> on packets size. It has a 16 bytes FIFO which can be reloaded over and
> over.
> 4. w\o size byte (for SMB block protocol).
> 5. Both master and slave. It can also replace modes in run time
> (requirement for IPMB and MCTP).
> 6. Bus timing is selected to support both specs.
>
> Originally the HW spec stated SMB everywhere .
Alright, so it sounds like the HW supports I2C and also has SMBus
specific support?
> Should I rename the SMB to I2C all over the driver?
If the HW supports general I2C; then yes, you should use the I2C
naming scheme. If you have SMBus specific support for some things, it
might be helpful to tag on smb in the name for only those
functions/data structures.
Also, please don't top-post.
> On Tue, Nov 26, 2019 at 8:47 AM Tali Perry <tali.perry1@...il.com> wrote:
> >
> > Hi Wolfram,
> >
> > Thanks for your comments.
> >
> > The NPCM7XX BMC I2C\SMB controller HW module supports both SMB and I2C.
> > It's main features are:
> > 1. Supports Fast-Mode (400 KHz clock) I2C and Fast-Mode-plus (1 MHz clock) I2C
> > 2. Supports the ‘fairness’ arbitration protocol defined by the MCTP SMBus/I2C Transport Binding Specification v1.0.0
> > 3. 32KB packets : this is an I2C spec limitation. The HW has no limit on packets size. It has a 16 bytes FIFO which can be reloaded over and over.
> > 4. w\o size byte (for SMB block protocol).
> > 5. Both master and slave. It can also replace modes in run time (requirement for IPMB and MCTP).
> > 6. Bus timing is selected to support both specs.
> >
> > Originally the HW spec stated SMB everywhere .
> >
> > Should I rename the SMB to I2C all over the driver?
And please don't reiterate yourself like this; it can confuse the conversation.
> > On Mon, Nov 25, 2019 at 5:16 PM Wolfram Sang <wsa@...-dreams.de> wrote:
> >>
> >> On Thu, Nov 21, 2019 at 11:53:50AM +0200, Tali Perry wrote:
> >> > Add Nuvoton NPCM BMC i2c controller driver.
> >> >
> >> > Signed-off-by: Tali Perry <tali.perry1@...il.com>
> >>
> >> Looking at all this SMB_* naming of the registers and also the quirks,
> >> this looks more like an SMBUS controller to me?
> >>
> >> > + // currently I2C slave IF only supports single byte operations.
> >> > + // in order to utilyze the npcm HW FIFO, the driver will ask for 16bytes
> >> > + // at a time, pack them in buffer, and then transmit them all together
> >> > + // to the FIFO and onward to the bus .
> >> > + // NACK on read will be once reached to bus->adap->quirks->max_read_len
> >> > + // sending a NACK whever the backend requests for it is not supported.
> >>
> >> This for example...
> >>
> >> > +static const struct i2c_adapter_quirks npcm_i2c_quirks = {
> >> > + .max_read_len = 32768,
> >> > + .max_write_len = 32768,
> >> > + .max_num_msgs = 2,
> >> > + .flags = I2C_AQ_COMB_WRITE_THEN_READ
> >> > +};
> >>
> >> ... and this. Like SMBus with the only exception of being able to send
> >> 32K in a row. Or?
> >>
Powered by blists - more mailing lists