Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-08-28 Thread Christian Ruppert
On Sat, Aug 24, 2013 at 01:58:47PM +0900, Shinya Kuribayashi wrote: > On 8/21/13 11:39 PM, Christian Ruppert wrote: > >On Fri, Aug 16, 2013 at 11:15:12AM +0900, Shinya Kuribayashi wrote: > >>On 8/5/13 6:31 PM, Christian Ruppert wrote: > >>>On Wed, Jul 24, 2013 at 11:31:44PM +0900, Shinya

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-08-28 Thread Christian Ruppert
On Sat, Aug 24, 2013 at 01:58:47PM +0900, Shinya Kuribayashi wrote: On 8/21/13 11:39 PM, Christian Ruppert wrote: On Fri, Aug 16, 2013 at 11:15:12AM +0900, Shinya Kuribayashi wrote: On 8/5/13 6:31 PM, Christian Ruppert wrote: On Wed, Jul 24, 2013 at 11:31:44PM +0900, Shinya Kuribayashi wrote:

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-08-23 Thread Shinya Kuribayashi
On 8/21/13 11:39 PM, Christian Ruppert wrote: On Fri, Aug 16, 2013 at 11:15:12AM +0900, Shinya Kuribayashi wrote: On 8/5/13 6:31 PM, Christian Ruppert wrote: On Wed, Jul 24, 2013 at 11:31:44PM +0900, Shinya Kuribayashi wrote: As said before, all t_SCL things should go away. Please forget

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-08-23 Thread Shinya Kuribayashi
On 8/21/13 11:39 PM, Christian Ruppert wrote: On Fri, Aug 16, 2013 at 11:15:12AM +0900, Shinya Kuribayashi wrote: On 8/5/13 6:31 PM, Christian Ruppert wrote: On Wed, Jul 24, 2013 at 11:31:44PM +0900, Shinya Kuribayashi wrote: As said before, all t_SCL things should go away. Please forget

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-08-21 Thread Christian Ruppert
On Fri, Aug 16, 2013 at 11:15:12AM +0900, Shinya Kuribayashi wrote: > Hi, > > On 8/5/13 6:31 PM, Christian Ruppert wrote:> On Wed, Jul 24, 2013 at > 11:31:44PM +0900, Shinya Kuribayashi wrote: > >>As said before, all t_SCL things should go away. Please forget > >>about 100kbps, 400kbps, and so

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-08-21 Thread Christian Ruppert
On Fri, Aug 16, 2013 at 11:15:12AM +0900, Shinya Kuribayashi wrote: Hi, On 8/5/13 6:31 PM, Christian Ruppert wrote: On Wed, Jul 24, 2013 at 11:31:44PM +0900, Shinya Kuribayashi wrote: As said before, all t_SCL things should go away. Please forget about 100kbps, 400kbps, and so on.

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-08-19 Thread Shinya Kuribayashi
Hi, On 8/19/13 8:36 PM, Mika Westerberg wrote: On Fri, Aug 16, 2013 at 11:15:12AM +0900, Shinya Kuribayashi wrote: Actually, the I2C specification clearly defines f_SCL;max (and thus implies t_SCL;min), both in the tables and the timing diagrams. Why can we ignore this constraint while having

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-08-19 Thread Mika Westerberg
On Fri, Aug 16, 2013 at 11:15:12AM +0900, Shinya Kuribayashi wrote: > >Actually, the I2C specification clearly defines f_SCL;max (and thus > >implies t_SCL;min), both in the tables and the timing diagrams. Why can > >we ignore this constraint while having to meet all the others? > > If we meet

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-08-19 Thread Mika Westerberg
Sorry for the slooow response, I've been on vacation. On Tue, Jul 16, 2013 at 01:16:18PM +0200, Christian Ruppert wrote: > > Second step is that if current i2c_dw_scl_hcnt and i2c_dw_scl_lcnt > > calculations don't suit with later DW I2C cores, then it would be > > nice for someone who can access

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-08-19 Thread Mika Westerberg
Sorry for the slooow response, I've been on vacation. On Tue, Jul 16, 2013 at 01:16:18PM +0200, Christian Ruppert wrote: Second step is that if current i2c_dw_scl_hcnt and i2c_dw_scl_lcnt calculations don't suit with later DW I2C cores, then it would be nice for someone who can access to

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-08-19 Thread Mika Westerberg
On Fri, Aug 16, 2013 at 11:15:12AM +0900, Shinya Kuribayashi wrote: Actually, the I2C specification clearly defines f_SCL;max (and thus implies t_SCL;min), both in the tables and the timing diagrams. Why can we ignore this constraint while having to meet all the others? If we meet t_r, t_f,

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-08-19 Thread Shinya Kuribayashi
Hi, On 8/19/13 8:36 PM, Mika Westerberg wrote: On Fri, Aug 16, 2013 at 11:15:12AM +0900, Shinya Kuribayashi wrote: Actually, the I2C specification clearly defines f_SCL;max (and thus implies t_SCL;min), both in the tables and the timing diagrams. Why can we ignore this constraint while having

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-08-15 Thread Shinya Kuribayashi
Hi, On 8/5/13 6:31 PM, Christian Ruppert wrote:> On Wed, Jul 24, 2013 at 11:31:44PM +0900, Shinya Kuribayashi wrote: As said before, all t_SCL things should go away. Please forget about 100kbps, 400kbps, and so on. Bus/clock speed is totally pointless concept for the I2C bus systems. For

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-08-15 Thread Shinya Kuribayashi
Hi, On 8/5/13 6:31 PM, Christian Ruppert wrote: On Wed, Jul 24, 2013 at 11:31:44PM +0900, Shinya Kuribayashi wrote: As said before, all t_SCL things should go away. Please forget about 100kbps, 400kbps, and so on. Bus/clock speed is totally pointless concept for the I2C bus systems. For

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-08-12 Thread Wolfram Sang
> Every driver would thus have to implement its own defaults in case the > properties are not defined. Placing the defaults at driver level sounds fine to me. Thanks! -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-08-12 Thread Christian Ruppert
On Mon, Aug 05, 2013 at 12:02:26PM +0200, Wolfram Sang wrote: > > > > >Would it make sense to add generic I2C device tree properties for those > > > >parameters? These parameters are independent of the actual bus driver, > > > >rather a PCB property... And as such the correct place would be

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-08-12 Thread Christian Ruppert
On Mon, Aug 05, 2013 at 12:02:26PM +0200, Wolfram Sang wrote: Would it make sense to add generic I2C device tree properties for those parameters? These parameters are independent of the actual bus driver, rather a PCB property... And as such the correct place would be device tree or

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-08-12 Thread Wolfram Sang
Every driver would thus have to implement its own defaults in case the properties are not defined. Placing the defaults at driver level sounds fine to me. Thanks! -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-08-05 Thread Wolfram Sang
> > >Would it make sense to add generic I2C device tree properties for those > > >parameters? These parameters are independent of the actual bus driver, > > >rather a PCB property... And as such the correct place would be device > > >tree or ACPI or similar. > > > > If there are other bus

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-08-05 Thread Christian Ruppert
On Wed, Jul 24, 2013 at 11:31:44PM +0900, Shinya Kuribayashi wrote: > On 7/22/13 10:17 PM, Christian Ruppert wrote:> On Wed, Jul 17, 2013 at > 11:39:58PM +0900, Shinya Kuribayashi wrote: > >>On 7/16/13 8:16 PM, Christian Ruppert wrote:> On Sat, Jul 13, 2013 at > >>02:36:43PM +0900, Shinya

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-08-05 Thread Christian Ruppert
On Wed, Jul 24, 2013 at 11:31:44PM +0900, Shinya Kuribayashi wrote: On 7/22/13 10:17 PM, Christian Ruppert wrote: On Wed, Jul 17, 2013 at 11:39:58PM +0900, Shinya Kuribayashi wrote: On 7/16/13 8:16 PM, Christian Ruppert wrote: On Sat, Jul 13, 2013 at 02:36:43PM +0900, Shinya Kuribayashi

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-08-05 Thread Wolfram Sang
Would it make sense to add generic I2C device tree properties for those parameters? These parameters are independent of the actual bus driver, rather a PCB property... And as such the correct place would be device tree or ACPI or similar. If there are other bus drivers that make use

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-07-24 Thread Shinya Kuribayashi
On 7/22/13 10:17 PM, Christian Ruppert wrote:> On Wed, Jul 17, 2013 at 11:39:58PM +0900, Shinya Kuribayashi wrote: On 7/16/13 8:16 PM, Christian Ruppert wrote:> On Sat, Jul 13, 2013 at 02:36:43PM +0900, Shinya Kuribayashi wrote: Basically, DW I2C core provides a good enough (and quite direct)

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-07-24 Thread Shinya Kuribayashi
On 7/22/13 10:17 PM, Christian Ruppert wrote: On Wed, Jul 17, 2013 at 11:39:58PM +0900, Shinya Kuribayashi wrote: On 7/16/13 8:16 PM, Christian Ruppert wrote: On Sat, Jul 13, 2013 at 02:36:43PM +0900, Shinya Kuribayashi wrote: Basically, DW I2C core provides a good enough (and quite direct)

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-07-22 Thread Christian Ruppert
On Wed, Jul 17, 2013 at 11:39:58PM +0900, Shinya Kuribayashi wrote: > On 7/16/13 8:16 PM, Christian Ruppert wrote:> On Sat, Jul 13, 2013 at > 02:36:43PM +0900, Shinya Kuribayashi wrote: > >>Basically, DW I2C core provides a good enough (and quite direct) way > >>to control tHIGH and tLOW timing

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-07-22 Thread Christian Ruppert
On Wed, Jul 17, 2013 at 11:39:58PM +0900, Shinya Kuribayashi wrote: On 7/16/13 8:16 PM, Christian Ruppert wrote: On Sat, Jul 13, 2013 at 02:36:43PM +0900, Shinya Kuribayashi wrote: Basically, DW I2C core provides a good enough (and quite direct) way to control tHIGH and tLOW timing specs,

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-07-17 Thread Shinya Kuribayashi
On 7/16/13 8:16 PM, Christian Ruppert wrote:> On Sat, Jul 13, 2013 at 02:36:43PM +0900, Shinya Kuribayashi wrote: Basically, DW I2C core provides a good enough (and quite direct) way to control tHIGH and tLOW timing specs, *HCNT and *LCNT registers. But from my experience (with a slightly old

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-07-17 Thread Shinya Kuribayashi
On 7/16/13 8:16 PM, Christian Ruppert wrote: On Sat, Jul 13, 2013 at 02:36:43PM +0900, Shinya Kuribayashi wrote: Basically, DW I2C core provides a good enough (and quite direct) way to control tHIGH and tLOW timing specs, *HCNT and *LCNT registers. But from my experience (with a slightly old

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-07-16 Thread Christian Ruppert
On Sat, Jul 13, 2013 at 02:36:43PM +0900, Shinya Kuribayashi wrote: > Hi, > > Now I've had a look at the whole discussion. > > Basically, DW I2C core provides a good enough (and quite direct) way > to control tHIGH and tLOW timing specs, *HCNT and *LCNT registers. > > But from my experience

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-07-16 Thread Christian Ruppert
On Sat, Jul 13, 2013 at 02:36:43PM +0900, Shinya Kuribayashi wrote: Hi, Now I've had a look at the whole discussion. Basically, DW I2C core provides a good enough (and quite direct) way to control tHIGH and tLOW timing specs, *HCNT and *LCNT registers. But from my experience (with a

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-07-12 Thread Shinya Kuribayashi
Hi, Now I've had a look at the whole discussion. Basically, DW I2C core provides a good enough (and quite direct) way to control tHIGH and tLOW timing specs, *HCNT and *LCNT registers. But from my experience (with a slightly old version of DW I2C core around 2005, version 1.06a or so), DW I2C

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-07-12 Thread Mika Westerberg
On Fri, Jul 12, 2013 at 04:56:49PM +0900, Shinya Kuribayashi wrote: > On 7/11/13 7:13 PM, Mika Westerberg wrote: > >On Thu, Jul 11, 2013 at 10:36:00AM +0300, Mika Westerberg wrote: > >>On Wed, Jul 10, 2013 at 06:56:35PM +0200, Christian Ruppert wrote: > >>>On Wed, Jul 10, 2013 at 01:52:15PM +0300,

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-07-12 Thread Shinya Kuribayashi
On 7/11/13 7:13 PM, Mika Westerberg wrote: On Thu, Jul 11, 2013 at 10:36:00AM +0300, Mika Westerberg wrote: On Wed, Jul 10, 2013 at 06:56:35PM +0200, Christian Ruppert wrote: On Wed, Jul 10, 2013 at 01:52:15PM +0300, Mika Westerberg wrote: On Tue, Jul 09, 2013 at 06:19:28PM +0200, Christian

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-07-12 Thread Shinya Kuribayashi
On 7/11/13 7:13 PM, Mika Westerberg wrote: On Thu, Jul 11, 2013 at 10:36:00AM +0300, Mika Westerberg wrote: On Wed, Jul 10, 2013 at 06:56:35PM +0200, Christian Ruppert wrote: On Wed, Jul 10, 2013 at 01:52:15PM +0300, Mika Westerberg wrote: On Tue, Jul 09, 2013 at 06:19:28PM +0200, Christian

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-07-12 Thread Mika Westerberg
On Fri, Jul 12, 2013 at 04:56:49PM +0900, Shinya Kuribayashi wrote: On 7/11/13 7:13 PM, Mika Westerberg wrote: On Thu, Jul 11, 2013 at 10:36:00AM +0300, Mika Westerberg wrote: On Wed, Jul 10, 2013 at 06:56:35PM +0200, Christian Ruppert wrote: On Wed, Jul 10, 2013 at 01:52:15PM +0300, Mika

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-07-12 Thread Shinya Kuribayashi
Hi, Now I've had a look at the whole discussion. Basically, DW I2C core provides a good enough (and quite direct) way to control tHIGH and tLOW timing specs, *HCNT and *LCNT registers. But from my experience (with a slightly old version of DW I2C core around 2005, version 1.06a or so), DW I2C

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-07-11 Thread Mika Westerberg
On Thu, Jul 11, 2013 at 10:36:00AM +0300, Mika Westerberg wrote: > On Wed, Jul 10, 2013 at 06:56:35PM +0200, Christian Ruppert wrote: > > On Wed, Jul 10, 2013 at 01:52:15PM +0300, Mika Westerberg wrote: > > > On Tue, Jul 09, 2013 at 06:19:28PM +0200, Christian Ruppert wrote: > > > > What I meant

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-07-11 Thread Mika Westerberg
On Wed, Jul 10, 2013 at 06:56:35PM +0200, Christian Ruppert wrote: > On Wed, Jul 10, 2013 at 01:52:15PM +0300, Mika Westerberg wrote: > > On Tue, Jul 09, 2013 at 06:19:28PM +0200, Christian Ruppert wrote: > > > What I meant is the following: The clock cycle time Tc is composed of > > > the four

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-07-11 Thread Mika Westerberg
On Wed, Jul 10, 2013 at 06:56:35PM +0200, Christian Ruppert wrote: On Wed, Jul 10, 2013 at 01:52:15PM +0300, Mika Westerberg wrote: On Tue, Jul 09, 2013 at 06:19:28PM +0200, Christian Ruppert wrote: What I meant is the following: The clock cycle time Tc is composed of the four components

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-07-11 Thread Mika Westerberg
On Thu, Jul 11, 2013 at 10:36:00AM +0300, Mika Westerberg wrote: On Wed, Jul 10, 2013 at 06:56:35PM +0200, Christian Ruppert wrote: On Wed, Jul 10, 2013 at 01:52:15PM +0300, Mika Westerberg wrote: On Tue, Jul 09, 2013 at 06:19:28PM +0200, Christian Ruppert wrote: What I meant is the

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-07-10 Thread Christian Ruppert
On Wed, Jul 10, 2013 at 01:52:15PM +0300, Mika Westerberg wrote: > On Tue, Jul 09, 2013 at 06:19:28PM +0200, Christian Ruppert wrote: > > What I meant is the following: The clock cycle time Tc is composed of > > the four components > > > > Tc = Th + Tf + Tl + Tr > > > > where > > Th: Time

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-07-10 Thread Mika Westerberg
On Tue, Jul 09, 2013 at 06:19:28PM +0200, Christian Ruppert wrote: > What I meant is the following: The clock cycle time Tc is composed of > the four components > > Tc = Th + Tf + Tl + Tr > > where > Th: Time during which the signal is high > Tf: Falling edge transition time > Tl: Time

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-07-10 Thread Mika Westerberg
On Tue, Jul 09, 2013 at 06:19:28PM +0200, Christian Ruppert wrote: What I meant is the following: The clock cycle time Tc is composed of the four components Tc = Th + Tf + Tl + Tr where Th: Time during which the signal is high Tf: Falling edge transition time Tl: Time during

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-07-10 Thread Christian Ruppert
On Wed, Jul 10, 2013 at 01:52:15PM +0300, Mika Westerberg wrote: On Tue, Jul 09, 2013 at 06:19:28PM +0200, Christian Ruppert wrote: What I meant is the following: The clock cycle time Tc is composed of the four components Tc = Th + Tf + Tl + Tr where Th: Time during which the

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-07-09 Thread Christian Ruppert
On Tue, Jul 09, 2013 at 11:44:02AM +0300, Mika Westerberg wrote: > On Mon, Jul 08, 2013 at 03:42:17PM +0200, Christian Ruppert wrote: > > On Mon, Jul 08, 2013 at 02:45:26PM +0300, Mika Westerberg wrote: > > > The DesignWare I2C controller has high count (HCNT) and low count (LCNT) > > > registers

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-07-09 Thread Mika Westerberg
On Mon, Jul 08, 2013 at 03:42:17PM +0200, Christian Ruppert wrote: > On Mon, Jul 08, 2013 at 02:45:26PM +0300, Mika Westerberg wrote: > > The DesignWare I2C controller has high count (HCNT) and low count (LCNT) > > registers for each of the I2C speed modes (standard and fast). These > > registers

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-07-09 Thread Mika Westerberg
On Mon, Jul 08, 2013 at 03:42:17PM +0200, Christian Ruppert wrote: On Mon, Jul 08, 2013 at 02:45:26PM +0300, Mika Westerberg wrote: The DesignWare I2C controller has high count (HCNT) and low count (LCNT) registers for each of the I2C speed modes (standard and fast). These registers are

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-07-09 Thread Christian Ruppert
On Tue, Jul 09, 2013 at 11:44:02AM +0300, Mika Westerberg wrote: On Mon, Jul 08, 2013 at 03:42:17PM +0200, Christian Ruppert wrote: On Mon, Jul 08, 2013 at 02:45:26PM +0300, Mika Westerberg wrote: The DesignWare I2C controller has high count (HCNT) and low count (LCNT) registers for each

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-07-08 Thread Christian Ruppert
On Mon, Jul 08, 2013 at 02:45:26PM +0300, Mika Westerberg wrote: > The DesignWare I2C controller has high count (HCNT) and low count (LCNT) > registers for each of the I2C speed modes (standard and fast). These > registers are programmed based on the input clock speed in the driver. > > However,

[PATCH 1/2] i2c-designware: make *CNT values configurable

2013-07-08 Thread Mika Westerberg
The DesignWare I2C controller has high count (HCNT) and low count (LCNT) registers for each of the I2C speed modes (standard and fast). These registers are programmed based on the input clock speed in the driver. However, that is not always the most accurate way. For example on Intel BayTrail we

[PATCH 1/2] i2c-designware: make *CNT values configurable

2013-07-08 Thread Mika Westerberg
The DesignWare I2C controller has high count (HCNT) and low count (LCNT) registers for each of the I2C speed modes (standard and fast). These registers are programmed based on the input clock speed in the driver. However, that is not always the most accurate way. For example on Intel BayTrail we

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-07-08 Thread Christian Ruppert
On Mon, Jul 08, 2013 at 02:45:26PM +0300, Mika Westerberg wrote: The DesignWare I2C controller has high count (HCNT) and low count (LCNT) registers for each of the I2C speed modes (standard and fast). These registers are programmed based on the input clock speed in the driver. However, that