Re: [PATCH v3 1/2] dt-bindings: i2c: snps,designware-i2c: declare bus capacitance and clk freq optimized

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

 



> On Tue, Oct 01, 2024 at 04:29:33PM +0800, Michael Wu wrote:
> > Since there are no registers controlling the hardware parameters
> > IC_CAP_LOADING and IC_CLK_FREQ_OPTIMIZATION, their values can only be
> > declared in the device tree.
> >
> > snps,bus-capacitance-pf indicates the bus capacitance in picofarads (pF).
> > It affects the high and low pulse width of SCL line in high speed mode.
> > The legal values for this property are 100 and 400 only, and default
> > value is 100. This property corresponds to IC_CAP_LOADING.
> >
> > snps,clk-freq-optimized indicates whether the hardware input clock
> > frequency is reduced by reducing the internal latency. This property
> > corresponds to IC_CLK_FREQ_OPTIMIZATION.
> >
> > The driver can calculate hs_hcnt and hs_lcnt appropriate for the hardware
> > based on these two properties.
> >
> > Signed-off-by: Michael Wu <michael.wu@xxxxxxxxx>
> > ---
> >  .../bindings/i2c/snps,designware-i2c.yaml     | 24
> +++++++++++++++++++
> >  1 file changed, 24 insertions(+)
> >
> > diff --git
> a/Documentation/devicetree/bindings/i2c/snps,designware-i2c.yaml
> b/Documentation/devicetree/bindings/i2c/snps,designware-i2c.yaml
> > index 60035a787e5c..c373f3acd34b 100644
> > --- a/Documentation/devicetree/bindings/i2c/snps,designware-i2c.yaml
> > +++ b/Documentation/devicetree/bindings/i2c/snps,designware-i2c.yaml
...
> > +      This property indicates the bus capacitance in picofarads (pF).
> > +      This value is used to compute the tHIGH and tLOW periods for high
> speed
> > +      mode.
> > +    default: 100
> 
> I asked for some constraints here. min/maximum. I think you never
> replied to this.
> 

In I2C DesignWare Databook v2.03a the mandatory option is provided to
select whether the bus capacitance is 400pF or 100pF. It presents the
description like that:

  Description:
    For high speed mode, the bus loading (pF) affects the high and low
    pulse width of SCL.
  Values: 100, 400
  Default Value: 100
  Parameter Name: IC_CAP_LOADING

There is no further information describing this option except to the
declaration of legal values ​​above, let alone minimum and maximum limits.
As a user I don't think I have the right to define a value range for the
vendor.


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux