Message ID | 20200527120111.5781-3-Sergey.Semin@baikalelectronics.ru (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | i2c: designeware: Add Baikal-T1 System I2C support | expand |
On Wed, May 27, 2020 at 03:01:02PM +0300, Serge Semin wrote: > dtc currently doesn't support I2C_OWN_SLAVE_ADDRESS flag set in the > i2c "reg" property. If it is the compiler will print a warning: > > Warning (i2c_bus_reg): /example-2/i2c@1120000/eeprom@64: I2C bus unit address format error, expected "40000064" > Warning (i2c_bus_reg): /example-2/i2c@1120000/eeprom@64:reg: I2C address must be less than 10-bits, got "0x40000064" > > In order to silence dtc up let's discard the flag from the DW I2C DT > binding example for now. Just revert this commit when dtc is fixed. > > Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru> > Cc: Alexey Malahov <Alexey.Malahov@baikalelectronics.ru> > Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de> > Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > Cc: Mika Westerberg <mika.westerberg@linux.intel.com> > Cc: linux-mips@vger.kernel.org > > --- > > Changelog v3: > - This is a new patch created as a result of the Rob request to remove > the EEPROM-slave bit setting in the DT binndings example until the dtc > is fixed. > --- > Documentation/devicetree/bindings/i2c/snps,designware-i2c.yaml | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/i2c/snps,designware-i2c.yaml b/Documentation/devicetree/bindings/i2c/snps,designware-i2c.yaml > index 4bd430b2b41d..101d78e8f19d 100644 > --- a/Documentation/devicetree/bindings/i2c/snps,designware-i2c.yaml > +++ b/Documentation/devicetree/bindings/i2c/snps,designware-i2c.yaml > @@ -137,7 +137,7 @@ examples: > > eeprom@64 { > compatible = "linux,slave-24c02"; > - reg = <0x40000064>; > + reg = <0x64>; But the compatible is a slave, so you need an example with a different device. > }; > }; > - | > -- > 2.26.2 >
On Wed, May 27, 2020 at 11:12:04AM -0600, Rob Herring wrote: > On Wed, May 27, 2020 at 03:01:02PM +0300, Serge Semin wrote: > > dtc currently doesn't support I2C_OWN_SLAVE_ADDRESS flag set in the > > i2c "reg" property. If it is the compiler will print a warning: > > > > Warning (i2c_bus_reg): /example-2/i2c@1120000/eeprom@64: I2C bus unit address format error, expected "40000064" > > Warning (i2c_bus_reg): /example-2/i2c@1120000/eeprom@64:reg: I2C address must be less than 10-bits, got "0x40000064" > > > > In order to silence dtc up let's discard the flag from the DW I2C DT > > binding example for now. Just revert this commit when dtc is fixed. > > > > Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru> > > Cc: Alexey Malahov <Alexey.Malahov@baikalelectronics.ru> > > Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de> > > Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > > Cc: Mika Westerberg <mika.westerberg@linux.intel.com> > > Cc: linux-mips@vger.kernel.org > > > > --- > > > > Changelog v3: > > - This is a new patch created as a result of the Rob request to remove > > the EEPROM-slave bit setting in the DT binndings example until the dtc > > is fixed. > > --- > > Documentation/devicetree/bindings/i2c/snps,designware-i2c.yaml | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/Documentation/devicetree/bindings/i2c/snps,designware-i2c.yaml b/Documentation/devicetree/bindings/i2c/snps,designware-i2c.yaml > > index 4bd430b2b41d..101d78e8f19d 100644 > > --- a/Documentation/devicetree/bindings/i2c/snps,designware-i2c.yaml > > +++ b/Documentation/devicetree/bindings/i2c/snps,designware-i2c.yaml > > @@ -137,7 +137,7 @@ examples: > > > > eeprom@64 { > > compatible = "linux,slave-24c02"; > > - reg = <0x40000064>; > > + reg = <0x64>; > > But the compatible is a slave, so you need an example with a different > device. Ok. I'll replace the sub-node with just "atmel,24c02" compatible string then. -Sergey > > > }; > > }; > > - | > > -- > > 2.26.2 > >
On Wed, May 27, 2020 at 08:18:41PM +0300, Serge Semin wrote: > On Wed, May 27, 2020 at 11:12:04AM -0600, Rob Herring wrote: > > On Wed, May 27, 2020 at 03:01:02PM +0300, Serge Semin wrote: > > > dtc currently doesn't support I2C_OWN_SLAVE_ADDRESS flag set in the > > > i2c "reg" property. If it is the compiler will print a warning: > > > > > > Warning (i2c_bus_reg): /example-2/i2c@1120000/eeprom@64: I2C bus unit address format error, expected "40000064" > > > Warning (i2c_bus_reg): /example-2/i2c@1120000/eeprom@64:reg: I2C address must be less than 10-bits, got "0x40000064" > > > > > > In order to silence dtc up let's discard the flag from the DW I2C DT > > > binding example for now. Just revert this commit when dtc is fixed. > > > eeprom@64 { > > > compatible = "linux,slave-24c02"; > > > - reg = <0x40000064>; > > > + reg = <0x64>; > > > > But the compatible is a slave, so you need an example with a different > > device. > > Ok. I'll replace the sub-node with just "atmel,24c02" compatible string then. But how it will be different to the another slave connected to the master? This example is specifically to show that DesingWare I²C controller may be switched to slave mode. > > > }; > > > }; > > > - |
On Wed, May 27, 2020 at 08:56:24PM +0300, Andy Shevchenko wrote: > On Wed, May 27, 2020 at 08:18:41PM +0300, Serge Semin wrote: > > On Wed, May 27, 2020 at 11:12:04AM -0600, Rob Herring wrote: > > > On Wed, May 27, 2020 at 03:01:02PM +0300, Serge Semin wrote: > > > > dtc currently doesn't support I2C_OWN_SLAVE_ADDRESS flag set in the > > > > i2c "reg" property. If it is the compiler will print a warning: > > > > > > > > Warning (i2c_bus_reg): /example-2/i2c@1120000/eeprom@64: I2C bus unit address format error, expected "40000064" > > > > Warning (i2c_bus_reg): /example-2/i2c@1120000/eeprom@64:reg: I2C address must be less than 10-bits, got "0x40000064" > > > > > > > > In order to silence dtc up let's discard the flag from the DW I2C DT > > > > binding example for now. Just revert this commit when dtc is fixed. > > > > > eeprom@64 { > > > > compatible = "linux,slave-24c02"; > > > > - reg = <0x40000064>; > > > > + reg = <0x64>; > > > > > > But the compatible is a slave, so you need an example with a different > > > device. > > > > > Ok. I'll replace the sub-node with just "atmel,24c02" compatible string then. > > But how it will be different to the another slave connected to the master? > > This example is specifically to show that DesingWare I²C controller may be > switched to slave mode. Well, dtc doesn't support it and prints warning that the address is invalid. Though I do understand you concern and is mostly agree with it. Let's do this in the next way. I'll resend the series with eeprom@64 sub-node replaced with just a normal eeprom-device. The message log will have an info why this has been done. In the non-mergeable section of the patch I'll suggest to Rob reconsider the patch acking, since we can leave the slave-marked sub-node and just live with the dtc warning until it's fixed in there. -Sergey > > > > > }; > > > > }; > > > > - | > > -- > With Best Regards, > Andy Shevchenko > >
On Thu, May 28, 2020 at 11:39:23AM +0300, Serge Semin wrote: > On Wed, May 27, 2020 at 08:56:24PM +0300, Andy Shevchenko wrote: > > On Wed, May 27, 2020 at 08:18:41PM +0300, Serge Semin wrote: > > > On Wed, May 27, 2020 at 11:12:04AM -0600, Rob Herring wrote: > > > > On Wed, May 27, 2020 at 03:01:02PM +0300, Serge Semin wrote: > > > > > dtc currently doesn't support I2C_OWN_SLAVE_ADDRESS flag set in the > > > > > i2c "reg" property. If it is the compiler will print a warning: > > > > > > > > > > Warning (i2c_bus_reg): /example-2/i2c@1120000/eeprom@64: I2C bus unit address format error, expected "40000064" > > > > > Warning (i2c_bus_reg): /example-2/i2c@1120000/eeprom@64:reg: I2C address must be less than 10-bits, got "0x40000064" > > > > > > > > > > In order to silence dtc up let's discard the flag from the DW I2C DT > > > > > binding example for now. Just revert this commit when dtc is fixed. > > > > > > > eeprom@64 { > > > > > compatible = "linux,slave-24c02"; > > > > > - reg = <0x40000064>; > > > > > + reg = <0x64>; > > > > > > > > But the compatible is a slave, so you need an example with a different > > > > device. > > > > > > > > Ok. I'll replace the sub-node with just "atmel,24c02" compatible string then. > > > > But how it will be different to the another slave connected to the master? > > > > This example is specifically to show that DesingWare I²C controller may be > > switched to slave mode. > > Well, dtc doesn't support it and prints warning that the address is invalid. > Though I do understand you concern and is mostly agree with it. Let's do this in > the next way. I'll resend the series with eeprom@64 sub-node replaced with just > a normal eeprom-device. The message log will have an info why this has been > done. In the non-mergeable section of the patch I'll suggest to Rob reconsider > the patch acking, since we can leave the slave-marked sub-node and just live > with the dtc warning until it's fixed in there. Thanks!
diff --git a/Documentation/devicetree/bindings/i2c/snps,designware-i2c.yaml b/Documentation/devicetree/bindings/i2c/snps,designware-i2c.yaml index 4bd430b2b41d..101d78e8f19d 100644 --- a/Documentation/devicetree/bindings/i2c/snps,designware-i2c.yaml +++ b/Documentation/devicetree/bindings/i2c/snps,designware-i2c.yaml @@ -137,7 +137,7 @@ examples: eeprom@64 { compatible = "linux,slave-24c02"; - reg = <0x40000064>; + reg = <0x64>; }; }; - |
dtc currently doesn't support I2C_OWN_SLAVE_ADDRESS flag set in the i2c "reg" property. If it is the compiler will print a warning: Warning (i2c_bus_reg): /example-2/i2c@1120000/eeprom@64: I2C bus unit address format error, expected "40000064" Warning (i2c_bus_reg): /example-2/i2c@1120000/eeprom@64:reg: I2C address must be less than 10-bits, got "0x40000064" In order to silence dtc up let's discard the flag from the DW I2C DT binding example for now. Just revert this commit when dtc is fixed. Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru> Cc: Alexey Malahov <Alexey.Malahov@baikalelectronics.ru> Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Mika Westerberg <mika.westerberg@linux.intel.com> Cc: linux-mips@vger.kernel.org --- Changelog v3: - This is a new patch created as a result of the Rob request to remove the EEPROM-slave bit setting in the DT binndings example until the dtc is fixed. --- Documentation/devicetree/bindings/i2c/snps,designware-i2c.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)