<div dir="ltr"><div dir="ltr"><div class="gmail_default" style=""><font face="monospace">Hi Wolfram,</font></div><div class="gmail_default" style=""><font face="monospace"><br></font></div><div class="gmail_default" style=""><font face="monospace">Thanks for your comments.</font></div><div class="gmail_default" style=""><font face="monospace"><br></font></div><div class="gmail_default" style=""><font face="monospace">The NPCM7XX BMC I2C\SMB controller HW module supports both SMB and I2C. </font></div><div class="gmail_default" style=""><font face="monospace">It's main features are:</font></div><div class="gmail_default" style=""><font face="monospace">1. <span style="color:rgb(0,0,0);font-size:9pt">Supports Fast-Mode (400 KHz clock) I</span><span style="color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;font-size:7pt">2<span style="font-size:9pt;font-variant-numeric:normal;font-variant-east-asian:normal">C and Fast-Mode-plus (1 MHz clock) I<span style="font-size:7pt;font-variant-numeric:normal;font-variant-east-asian:normal">2<span style="font-size:9pt;font-variant-numeric:normal;font-variant-east-asian:normal">C</span></span></span></span></font></div><div class="gmail_default" style=""><font face="monospace"><span style="color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;font-size:7pt"><span style="font-size:9pt;font-variant-numeric:normal;font-variant-east-asian:normal"><span style="font-size:7pt;font-variant-numeric:normal;font-variant-east-asian:normal"><span style="font-size:9pt;font-variant-numeric:normal;font-variant-east-asian:normal">2. </span></span></span></span><span style="color:rgb(0,0,0);font-size:9pt">Supports the ‘fairness’ arbitration protocol defined by the MCTP SMBus/I2C Transport Binding Specification v1.0.0</span></font></div><div class="gmail_default" style=""><font face="monospace">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.</font></div><div class="gmail_default" style=""><font face="monospace">4. w\o size byte (for SMB block protocol).</font></div><div class="gmail_default" style=""><font face="monospace">5. Both master and slave. It can also replace modes in run time (requirement for IPMB and MCTP).</font></div><div class="gmail_default" style=""><font face="monospace">6. Bus timing is selected to support both specs.</font></div><div class="gmail_default" style=""><font face="monospace"><br></font></div><div class="gmail_default" style=""><font face="monospace">Originally the HW spec stated SMB everywhere . </font></div><div class="gmail_default" style=""><font face="monospace"><br></font></div><div class="gmail_default" style=""><font face="monospace">Should I rename the SMB to I2C all over the driver?</font></div><div class="gmail_default" style=""><font face="monospace"><br></font></div><div class="gmail_default" style=""><font face="monospace">Thanks,</font></div><div class="gmail_default" style=""><font face="monospace">Tali Perry</font></div><div class="gmail_default" style="font-family:monospace,monospace"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Nov 25, 2019 at 5:16 PM Wolfram Sang <<a href="mailto:wsa@the-dreams.de">wsa@the-dreams.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, Nov 21, 2019 at 11:53:50AM +0200, Tali Perry wrote:<br>
> Add Nuvoton NPCM BMC i2c controller driver.<br>
> <br>
> Signed-off-by: Tali Perry <<a href="mailto:tali.perry1@gmail.com" target="_blank">tali.perry1@gmail.com</a>><br>
<br>
Looking at all this SMB_* naming of the registers and also the quirks,<br>
this looks more like an SMBUS controller to me?<br>
<br>
> + // currently I2C slave IF only supports single byte operations.<br>
> + // in order to utilyze the npcm HW FIFO, the driver will ask for 16bytes<br>
> + // at a time, pack them in buffer, and then transmit them all together<br>
> + // to the FIFO and onward to the bus .<br>
> + // NACK on read will be once reached to bus->adap->quirks->max_read_len<br>
> + // sending a NACK whever the backend requests for it is not supported.<br>
<br>
This for example...<br>
<br>
> +static const struct i2c_adapter_quirks npcm_i2c_quirks = {<br>
> + .max_read_len = 32768,<br>
> + .max_write_len = 32768,<br>
> + .max_num_msgs = 2,<br>
> + .flags = I2C_AQ_COMB_WRITE_THEN_READ<br>
> +};<br>
<br>
... and this. Like SMBus with the only exception of being able to send<br>
32K in a row. Or?<br>
<br>
</blockquote></div></div>