diff mbox series

i2c: add binding to mark a bus as SMBus

Message ID 20200701214830.3174-1-wsa+renesas@sang-engineering.com
State Accepted
Headers show
Series i2c: add binding to mark a bus as SMBus | expand

Commit Message

Wolfram Sang July 1, 2020, 9:48 p.m. UTC
SMBus is largely compatible with I2C but there are some specifics. In
case we need them on a bus, we can now use this new binding.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 Documentation/devicetree/bindings/i2c/i2c.txt | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Rob Herring July 15, 2020, 8:38 p.m. UTC | #1
On Wed, Jul 01, 2020 at 11:48:30PM +0200, Wolfram Sang wrote:
> SMBus is largely compatible with I2C but there are some specifics. In
> case we need them on a bus, we can now use this new binding.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
>  Documentation/devicetree/bindings/i2c/i2c.txt | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/i2c/i2c.txt b/Documentation/devicetree/bindings/i2c/i2c.txt
> index 438ae123107e..d1f8cf3bd236 100644
> --- a/Documentation/devicetree/bindings/i2c/i2c.txt
> +++ b/Documentation/devicetree/bindings/i2c/i2c.txt
> @@ -77,6 +77,11 @@ wants to support one of the below features, it should adapt these bindings.
>  	this information to detect a stalled bus more reliably, for example.
>  	Can not be combined with 'multi-master'.
>  
> +- smbus

This is a boolean?

> +	states that additional SMBus restrictions and features apply to this bus.
> +	Examples of features are SMBusHostNotify and SMBusAlert. Examples of

Do features need to be enumerated separately?

> +	restrictions are more reserved addresses and timeout definitions.
> +
>  Required properties (per child device)
>  --------------------------------------
>  
> -- 
> 2.27.0
>
Wolfram Sang July 24, 2020, 7:36 p.m. UTC | #2
Hi Rob,

> > SMBus is largely compatible with I2C but there are some specifics. In
> > case we need them on a bus, we can now use this new binding.
> > 
> > Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> > ---
> >  Documentation/devicetree/bindings/i2c/i2c.txt | 5 +++++
> >  1 file changed, 5 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/i2c/i2c.txt b/Documentation/devicetree/bindings/i2c/i2c.txt
> > index 438ae123107e..d1f8cf3bd236 100644
> > --- a/Documentation/devicetree/bindings/i2c/i2c.txt
> > +++ b/Documentation/devicetree/bindings/i2c/i2c.txt
> > @@ -77,6 +77,11 @@ wants to support one of the below features, it should adapt these bindings.
> >  	this information to detect a stalled bus more reliably, for example.
> >  	Can not be combined with 'multi-master'.
> >  
> > +- smbus
> 
> This is a boolean?

Yes.

> 
> > +	states that additional SMBus restrictions and features apply to this bus.
> > +	Examples of features are SMBusHostNotify and SMBusAlert. Examples of
> 
> Do features need to be enumerated separately?

They could be, do you think this is of advantage? For now, we would then
need "host-notify" and "smbus-alert". Maybe later things like "timeout"
could show up.

> 
> > +	restrictions are more reserved addresses and timeout definitions.
> > +

All the best,

   Wolfram
Wolfram Sang July 25, 2020, 12:07 p.m. UTC | #3
On Fri, Jul 24, 2020 at 09:36:35PM +0200, Wolfram Sang wrote:
> Hi Rob,
> 
> > > SMBus is largely compatible with I2C but there are some specifics. In
> > > case we need them on a bus, we can now use this new binding.
> > > 
> > > Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> > > ---
> > >  Documentation/devicetree/bindings/i2c/i2c.txt | 5 +++++
> > >  1 file changed, 5 insertions(+)
> > > 
> > > diff --git a/Documentation/devicetree/bindings/i2c/i2c.txt b/Documentation/devicetree/bindings/i2c/i2c.txt
> > > index 438ae123107e..d1f8cf3bd236 100644
> > > --- a/Documentation/devicetree/bindings/i2c/i2c.txt
> > > +++ b/Documentation/devicetree/bindings/i2c/i2c.txt
> > > @@ -77,6 +77,11 @@ wants to support one of the below features, it should adapt these bindings.
> > >  	this information to detect a stalled bus more reliably, for example.
> > >  	Can not be combined with 'multi-master'.
> > >  
> > > +- smbus
> > 
> > This is a boolean?
> 
> Yes.
> 
> > 
> > > +	states that additional SMBus restrictions and features apply to this bus.
> > > +	Examples of features are SMBusHostNotify and SMBusAlert. Examples of
> > 
> > Do features need to be enumerated separately?
> 
> They could be, do you think this is of advantage? For now, we would then
> need "host-notify" and "smbus-alert". Maybe later things like "timeout"
> could show up.

I also recall now that I thought that "smbus" fits better the
"describing hardware" aspect, i.e. "this bus is an SMBus and not I2C".
Enumerating features felt more like configuration to me.

> 
> > 
> > > +	restrictions are more reserved addresses and timeout definitions.
> > > +
> 
> All the best,
> 
>    Wolfram
>
Wolfram Sang July 29, 2020, 10:53 a.m. UTC | #4
> > > > SMBus is largely compatible with I2C but there are some specifics. In
> > > > case we need them on a bus, we can now use this new binding.
> > > > 
> > > > Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> > > > ---
> > > >  Documentation/devicetree/bindings/i2c/i2c.txt | 5 +++++
> > > >  1 file changed, 5 insertions(+)
> > > > 
> > > > diff --git a/Documentation/devicetree/bindings/i2c/i2c.txt b/Documentation/devicetree/bindings/i2c/i2c.txt
> > > > index 438ae123107e..d1f8cf3bd236 100644
> > > > --- a/Documentation/devicetree/bindings/i2c/i2c.txt
> > > > +++ b/Documentation/devicetree/bindings/i2c/i2c.txt
> > > > @@ -77,6 +77,11 @@ wants to support one of the below features, it should adapt these bindings.
> > > >  	this information to detect a stalled bus more reliably, for example.
> > > >  	Can not be combined with 'multi-master'.
> > > >  
> > > > +- smbus
> > > 
> > > This is a boolean?
> > 
> > Yes.
> > 
> > > 
> > > > +	states that additional SMBus restrictions and features apply to this bus.
> > > > +	Examples of features are SMBusHostNotify and SMBusAlert. Examples of
> > > 
> > > Do features need to be enumerated separately?
> > 
> > They could be, do you think this is of advantage? For now, we would then
> > need "host-notify" and "smbus-alert". Maybe later things like "timeout"
> > could show up.
> 
> I also recall now that I thought that "smbus" fits better the
> "describing hardware" aspect, i.e. "this bus is an SMBus and not I2C".
> Enumerating features felt more like configuration to me.

Rob, if you have a minute to comment on it, I would much appreciate it.
I'd love to get this into 5.9.

Thanks and all the best!
Wolfram Sang Aug. 21, 2020, 11:43 a.m. UTC | #5
On Sat, Jul 25, 2020 at 02:07:00PM +0200, Wolfram Sang wrote:
> On Fri, Jul 24, 2020 at 09:36:35PM +0200, Wolfram Sang wrote:
> > Hi Rob,
> > 
> > > > SMBus is largely compatible with I2C but there are some specifics. In
> > > > case we need them on a bus, we can now use this new binding.
> > > > 
> > > > Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> > > > ---
> > > >  Documentation/devicetree/bindings/i2c/i2c.txt | 5 +++++
> > > >  1 file changed, 5 insertions(+)
> > > > 
> > > > diff --git a/Documentation/devicetree/bindings/i2c/i2c.txt b/Documentation/devicetree/bindings/i2c/i2c.txt
> > > > index 438ae123107e..d1f8cf3bd236 100644
> > > > --- a/Documentation/devicetree/bindings/i2c/i2c.txt
> > > > +++ b/Documentation/devicetree/bindings/i2c/i2c.txt
> > > > @@ -77,6 +77,11 @@ wants to support one of the below features, it should adapt these bindings.
> > > >  	this information to detect a stalled bus more reliably, for example.
> > > >  	Can not be combined with 'multi-master'.
> > > >  
> > > > +- smbus
> > > 
> > > This is a boolean?
> > 
> > Yes.
> > 
> > > 
> > > > +	states that additional SMBus restrictions and features apply to this bus.
> > > > +	Examples of features are SMBusHostNotify and SMBusAlert. Examples of
> > > 
> > > Do features need to be enumerated separately?
> > 
> > They could be, do you think this is of advantage? For now, we would then
> > need "host-notify" and "smbus-alert". Maybe later things like "timeout"
> > could show up.
> 
> I also recall now that I thought that "smbus" fits better the
> "describing hardware" aspect, i.e. "this bus is an SMBus and not I2C".
> Enumerating features felt more like configuration to me.

Rob, if you have some time, I'd really appreciate an ack here. I think
it is a proper binding but I'd like to have it stress-tested with your
experience :)

> 
> > 
> > > 
> > > > +	restrictions are more reserved addresses and timeout definitions.
> > > > +
> > 
> > All the best,
> > 
> >    Wolfram
> > 
> 
>
Wolfram Sang Sept. 9, 2020, 8:15 a.m. UTC | #6
On Wed, Jul 01, 2020 at 11:48:30PM +0200, Wolfram Sang wrote:
> SMBus is largely compatible with I2C but there are some specifics. In
> case we need them on a bus, we can now use this new binding.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

So, I am going to apply this now. We have this cycle and the next one to
fix up things if we find something to improve.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/i2c/i2c.txt b/Documentation/devicetree/bindings/i2c/i2c.txt
index 438ae123107e..d1f8cf3bd236 100644
--- a/Documentation/devicetree/bindings/i2c/i2c.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c.txt
@@ -77,6 +77,11 @@  wants to support one of the below features, it should adapt these bindings.
 	this information to detect a stalled bus more reliably, for example.
 	Can not be combined with 'multi-master'.
 
+- smbus
+	states that additional SMBus restrictions and features apply to this bus.
+	Examples of features are SMBusHostNotify and SMBusAlert. Examples of
+	restrictions are more reserved addresses and timeout definitions.
+
 Required properties (per child device)
 --------------------------------------