Message ID | 20180910214519.14126-2-jae.hyun.yoo@linux.intel.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
Series | i2c: aspeed: Add bus idle waiting logic for multi-master use cases | expand |
On 9/10/2018 2:45 PM, Jae Hyun Yoo wrote: > +- idle-wait-timeout-ms : bus idle waiting timeout in milliseconds when > + multi-master is set, defaults to 100 ms when not > + specified. Will change it to 'aspeed,idle-wait-timeout-ms' as it's a non standard property. Jae
On Tue, Sep 18, 2018 at 11:02:54AM -0700, Jae Hyun Yoo wrote: > On 9/10/2018 2:45 PM, Jae Hyun Yoo wrote: > > +- idle-wait-timeout-ms : bus idle waiting timeout in milliseconds when > > + multi-master is set, defaults to 100 ms when not > > + specified. > > Will change it to 'aspeed,idle-wait-timeout-ms' as it's a non standard > property. No need. This binding is not a HW description, so not a DT property in my book. I still don't understand: Your IP core in master mode does not have a BUSY bit or similar which detects when a START was detected and clears after a STOP?
Hi Wolfram, On 9/24/2018 2:58 PM, Wolfram Sang wrote: > On Tue, Sep 18, 2018 at 11:02:54AM -0700, Jae Hyun Yoo wrote: >> On 9/10/2018 2:45 PM, Jae Hyun Yoo wrote: >>> +- idle-wait-timeout-ms : bus idle waiting timeout in milliseconds when >>> + multi-master is set, defaults to 100 ms when not >>> + specified. >> >> Will change it to 'aspeed,idle-wait-timeout-ms' as it's a non standard >> property. > > No need. This binding is not a HW description, so not a DT property in > my book. I still don't understand: Your IP core in master mode does not > have a BUSY bit or similar which detects when a START was detected and > clears after a STOP? > Okay, I'll keep this property as it is then. Aspeed IP has the BUSY bit on the I2CD14 register and we are already using the bit in the current code for single-master use cases. Due to the bit doesn't cover well multi-master use cases so we need to improve the current busy checking logic using the 'Transfer Mode State Machine' bit fields on the same register through this patch set. Thanks for the review! Jae
On Mon, Sep 24, 2018 at 03:15:46PM -0700, Jae Hyun Yoo wrote: > Hi Wolfram, > > On 9/24/2018 2:58 PM, Wolfram Sang wrote: > > On Tue, Sep 18, 2018 at 11:02:54AM -0700, Jae Hyun Yoo wrote: > > > On 9/10/2018 2:45 PM, Jae Hyun Yoo wrote: > > > > +- idle-wait-timeout-ms : bus idle waiting timeout in milliseconds when > > > > + multi-master is set, defaults to 100 ms when not > > > > + specified. > > > > > > Will change it to 'aspeed,idle-wait-timeout-ms' as it's a non standard > > > property. > > > > No need. This binding is not a HW description, so not a DT property in > > my book. I still don't understand: Your IP core in master mode does not > > have a BUSY bit or similar which detects when a START was detected and > > clears after a STOP? > > > > Okay, I'll keep this property as it is then. Sorry for the misunderstanding. I don't think this a property, at all. It doesn't describe the hardware, it is more of a configuration thing, or?
On 9/25/2018 1:27 AM, Wolfram Sang wrote: > On Mon, Sep 24, 2018 at 03:15:46PM -0700, Jae Hyun Yoo wrote: >> Hi Wolfram, >> >> On 9/24/2018 2:58 PM, Wolfram Sang wrote: >>> On Tue, Sep 18, 2018 at 11:02:54AM -0700, Jae Hyun Yoo wrote: >>>> On 9/10/2018 2:45 PM, Jae Hyun Yoo wrote: >>>>> +- idle-wait-timeout-ms : bus idle waiting timeout in milliseconds when >>>>> + multi-master is set, defaults to 100 ms when not >>>>> + specified. >>>> >>>> Will change it to 'aspeed,idle-wait-timeout-ms' as it's a non standard >>>> property. >>> >>> No need. This binding is not a HW description, so not a DT property in >>> my book. I still don't understand: Your IP core in master mode does not >>> have a BUSY bit or similar which detects when a START was detected and >>> clears after a STOP? >>> >> >> Okay, I'll keep this property as it is then. > > Sorry for the misunderstanding. I don't think this a property, at all. > It doesn't describe the hardware, it is more of a configuration thing, > or? > You are right. It doesn't describe the hardware but it needs to be configurable because it very depends on the peer master's behavior. If peer master sends a long packet usually, it should have a long timeout value since a slave receiving operation takes long time, and it should be adjusted with an optimal value with taking some experiments to make it not too long. Any suggestion? Thanks, Jae
On 9/25/2018 9:20 AM, Jae Hyun Yoo wrote: > On 9/25/2018 1:27 AM, Wolfram Sang wrote: >> On Mon, Sep 24, 2018 at 03:15:46PM -0700, Jae Hyun Yoo wrote: >>> Hi Wolfram, >>> >>> On 9/24/2018 2:58 PM, Wolfram Sang wrote: >>>> On Tue, Sep 18, 2018 at 11:02:54AM -0700, Jae Hyun Yoo wrote: >>>>> On 9/10/2018 2:45 PM, Jae Hyun Yoo wrote: >>>>>> +- idle-wait-timeout-ms : bus idle waiting timeout in >>>>>> milliseconds when >>>>>> + multi-master is set, defaults to 100 ms when not >>>>>> + specified. >>>>> >>>>> Will change it to 'aspeed,idle-wait-timeout-ms' as it's a non standard >>>>> property. >>>> >>>> No need. This binding is not a HW description, so not a DT property in >>>> my book. I still don't understand: Your IP core in master mode does not >>>> have a BUSY bit or similar which detects when a START was detected and >>>> clears after a STOP? >>>> >>> >>> Okay, I'll keep this property as it is then. >> >> Sorry for the misunderstanding. I don't think this a property, at all. >> It doesn't describe the hardware, it is more of a configuration thing, >> or? >> > > You are right. It doesn't describe the hardware but it needs to be > configurable because it very depends on the peer master's behavior. > If peer master sends a long packet usually, it should have a long > timeout value since a slave receiving operation takes long time, > and it should be adjusted with an optimal value with taking some > experiments to make it not too long. Any suggestion? > Should I use timeout in struct i2c_adapter instead just like i2c-mpc does?
> Should I use timeout in struct i2c_adapter instead just like i2c-mpc > does? I would accept that.
On 9/26/2018 9:27 AM, Wolfram Sang wrote: > >> Should I use timeout in struct i2c_adapter instead just like i2c-mpc >> does? > > I would accept that. > Okay, I will submit a new patch set. Thanks! Jae
diff --git a/Documentation/devicetree/bindings/i2c/i2c-aspeed.txt b/Documentation/devicetree/bindings/i2c/i2c-aspeed.txt index 8fbd8633a387..42ecaaf67172 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-aspeed.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-aspeed.txt @@ -13,9 +13,13 @@ Required Properties: - interrupts : interrupt number Optional Properties: -- bus-frequency : frequency of the bus clock in Hz defaults to 100 kHz when not - specified -- multi-master : states that there is another master active on this bus. +- bus-frequency : frequency of the bus clock in Hz defaults to 100 kHz + when not specified +- multi-master : states that there is another master active on this + bus. +- idle-wait-timeout-ms : bus idle waiting timeout in milliseconds when + multi-master is set, defaults to 100 ms when not + specified. Example:
This commit adds 'idle-wait-timeout-ms' setting which can be used for bus idle waiting logic in multi-master environment. Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com> --- Documentation/devicetree/bindings/i2c/i2c-aspeed.txt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)