* [PATCH 1/2] i2c: designware: device tree bindings for i2c speed mode
@ 2014-08-19 18:34 ` atull-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx
0 siblings, 0 replies; 11+ messages in thread
From: atull @ 2014-08-19 18:34 UTC (permalink / raw)
To: wsa, baruch, mika.westerberg
Cc: grant.likely, robh+dt, skuribay, Romain.Baeriswyl,
rafael.j.wysocki, alan, linux-i2c, linux-kernel, devicetree,
delicious.quinoa, dinguyen, yvanderv, Alan Tull
From: Alan Tull <atull@opensource.altera.com>
Add "speed-mode" Device Tree property to select between
standard and fast i2c mode. Previously, driver was hardwired
as fast mode. Default to fast mode if property is not
present.
Signed-off-by: Alan Tull <atull@opensource.altera.com>
---
.../devicetree/bindings/i2c/i2c-designware.txt | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Documentation/devicetree/bindings/i2c/i2c-designware.txt b/Documentation/devicetree/bindings/i2c/i2c-designware.txt
index 5199b0c..0e4cd21 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-designware.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-designware.txt
@@ -9,6 +9,8 @@ Required properties :
Recommended properties :
- clock-frequency : desired I2C bus clock frequency in Hz.
+ - speed-mode : 0 = standard (0 - 100Kb/s)
+ : 1 = fast (<= 400Kb/s) <== default
Optional properties :
- i2c-sda-hold-time-ns : should contain the SDA hold time in nanoseconds.
@@ -29,6 +31,7 @@ Example :
reg = <0xf0000 0x1000>;
interrupts = <11>;
clock-frequency = <400000>;
+ speed-mode = <0>;
};
i2c@1120000 {
--
1.7.9.5
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 1/2] i2c: designware: device tree bindings for i2c speed mode
@ 2014-08-19 18:34 ` atull-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx
0 siblings, 0 replies; 11+ messages in thread
From: atull-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx @ 2014-08-19 18:34 UTC (permalink / raw)
To: wsa-z923LK4zBo2bacvFa/9K2g, baruch-NswTu9S1W3P6gbPvEgmw2w,
mika.westerberg-VuQAYsv1563Yd54FQh9/CA
Cc: grant.likely-QSEj5FYQhm4dnm+yROfE0A,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A, skuribay-e+AXbWqSrlAAvxtiuMwx3w,
Romain.Baeriswyl-ux6zf3SgZrrQT0dZR+AlfA,
rafael.j.wysocki-ral2JQCrhuEAvxtiuMwx3w,
alan-VuQAYsv1563Yd54FQh9/CA, linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA,
delicious.quinoa-Re5JQEeQqe8AvxtiuMwx3w,
dinguyen-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx,
yvanderv-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx, Alan Tull
From: Alan Tull <atull-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx@public.gmane.org>
Add "speed-mode" Device Tree property to select between
standard and fast i2c mode. Previously, driver was hardwired
as fast mode. Default to fast mode if property is not
present.
Signed-off-by: Alan Tull <atull-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx@public.gmane.org>
---
.../devicetree/bindings/i2c/i2c-designware.txt | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Documentation/devicetree/bindings/i2c/i2c-designware.txt b/Documentation/devicetree/bindings/i2c/i2c-designware.txt
index 5199b0c..0e4cd21 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-designware.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-designware.txt
@@ -9,6 +9,8 @@ Required properties :
Recommended properties :
- clock-frequency : desired I2C bus clock frequency in Hz.
+ - speed-mode : 0 = standard (0 - 100Kb/s)
+ : 1 = fast (<= 400Kb/s) <== default
Optional properties :
- i2c-sda-hold-time-ns : should contain the SDA hold time in nanoseconds.
@@ -29,6 +31,7 @@ Example :
reg = <0xf0000 0x1000>;
interrupts = <11>;
clock-frequency = <400000>;
+ speed-mode = <0>;
};
i2c@1120000 {
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 2/2] i2c: designware: add speed mode device tree setting
@ 2014-08-19 18:34 ` atull-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx
0 siblings, 0 replies; 11+ messages in thread
From: atull @ 2014-08-19 18:34 UTC (permalink / raw)
To: wsa, baruch, mika.westerberg
Cc: grant.likely, robh+dt, skuribay, Romain.Baeriswyl,
rafael.j.wysocki, alan, linux-i2c, linux-kernel, devicetree,
delicious.quinoa, dinguyen, yvanderv, Alan Tull
From: Alan Tull <atull@opensource.altera.com>
Add "speed-mode" Device Tree property to select between
standard and fast i2c mode. Previously, driver was hardwired
as fast mode. Default to fast mode if property is not
present.
Signed-off-by: Alan Tull <atull@opensource.altera.com>
---
drivers/i2c/busses/i2c-designware-platdrv.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c
index bc87733..3fdc775 100644
--- a/drivers/i2c/busses/i2c-designware-platdrv.c
+++ b/drivers/i2c/busses/i2c-designware-platdrv.c
@@ -122,7 +122,7 @@ static int dw_i2c_probe(struct platform_device *pdev)
struct dw_i2c_dev *dev;
struct i2c_adapter *adap;
struct resource *mem;
- int irq, r;
+ int irq, r, speed_prop, ret, speed = DW_IC_CON_SPEED_FAST;
irq = platform_get_irq(pdev, 0);
if (irq < 0) {
@@ -167,6 +167,11 @@ static int dw_i2c_probe(struct platform_device *pdev)
of_property_read_u32(pdev->dev.of_node,
"i2c-scl-falling-time-ns",
&dev->scl_falling_time);
+
+ ret = of_property_read_u32(pdev->dev.of_node,
+ "speed-mode", &speed_prop);
+ if (!ret && (speed_prop == 0))
+ speed = DW_IC_CON_SPEED_STD;
}
dev->functionality =
@@ -177,7 +182,7 @@ static int dw_i2c_probe(struct platform_device *pdev)
I2C_FUNC_SMBUS_WORD_DATA |
I2C_FUNC_SMBUS_I2C_BLOCK;
dev->master_cfg = DW_IC_CON_MASTER | DW_IC_CON_SLAVE_DISABLE |
- DW_IC_CON_RESTART_EN | DW_IC_CON_SPEED_FAST;
+ DW_IC_CON_RESTART_EN | speed;
/* Try first if we can configure the device from ACPI */
r = dw_i2c_acpi_configure(pdev);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 2/2] i2c: designware: add speed mode device tree setting
@ 2014-08-19 18:34 ` atull-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx
0 siblings, 0 replies; 11+ messages in thread
From: atull-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx @ 2014-08-19 18:34 UTC (permalink / raw)
To: wsa-z923LK4zBo2bacvFa/9K2g, baruch-NswTu9S1W3P6gbPvEgmw2w,
mika.westerberg-VuQAYsv1563Yd54FQh9/CA
Cc: grant.likely-QSEj5FYQhm4dnm+yROfE0A,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A, skuribay-e+AXbWqSrlAAvxtiuMwx3w,
Romain.Baeriswyl-ux6zf3SgZrrQT0dZR+AlfA,
rafael.j.wysocki-ral2JQCrhuEAvxtiuMwx3w,
alan-VuQAYsv1563Yd54FQh9/CA, linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA,
delicious.quinoa-Re5JQEeQqe8AvxtiuMwx3w,
dinguyen-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx,
yvanderv-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx, Alan Tull
From: Alan Tull <atull-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx@public.gmane.org>
Add "speed-mode" Device Tree property to select between
standard and fast i2c mode. Previously, driver was hardwired
as fast mode. Default to fast mode if property is not
present.
Signed-off-by: Alan Tull <atull-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx@public.gmane.org>
---
drivers/i2c/busses/i2c-designware-platdrv.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c
index bc87733..3fdc775 100644
--- a/drivers/i2c/busses/i2c-designware-platdrv.c
+++ b/drivers/i2c/busses/i2c-designware-platdrv.c
@@ -122,7 +122,7 @@ static int dw_i2c_probe(struct platform_device *pdev)
struct dw_i2c_dev *dev;
struct i2c_adapter *adap;
struct resource *mem;
- int irq, r;
+ int irq, r, speed_prop, ret, speed = DW_IC_CON_SPEED_FAST;
irq = platform_get_irq(pdev, 0);
if (irq < 0) {
@@ -167,6 +167,11 @@ static int dw_i2c_probe(struct platform_device *pdev)
of_property_read_u32(pdev->dev.of_node,
"i2c-scl-falling-time-ns",
&dev->scl_falling_time);
+
+ ret = of_property_read_u32(pdev->dev.of_node,
+ "speed-mode", &speed_prop);
+ if (!ret && (speed_prop == 0))
+ speed = DW_IC_CON_SPEED_STD;
}
dev->functionality =
@@ -177,7 +182,7 @@ static int dw_i2c_probe(struct platform_device *pdev)
I2C_FUNC_SMBUS_WORD_DATA |
I2C_FUNC_SMBUS_I2C_BLOCK;
dev->master_cfg = DW_IC_CON_MASTER | DW_IC_CON_SLAVE_DISABLE |
- DW_IC_CON_RESTART_EN | DW_IC_CON_SPEED_FAST;
+ DW_IC_CON_RESTART_EN | speed;
/* Try first if we can configure the device from ACPI */
r = dw_i2c_acpi_configure(pdev);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] i2c: designware: device tree bindings for i2c speed mode
@ 2014-08-19 19:15 ` Wolfram Sang
0 siblings, 0 replies; 11+ messages in thread
From: Wolfram Sang @ 2014-08-19 19:15 UTC (permalink / raw)
To: atull
Cc: baruch, mika.westerberg, grant.likely, robh+dt, skuribay,
Romain.Baeriswyl, rafael.j.wysocki, alan, linux-i2c,
linux-kernel, devicetree, delicious.quinoa, dinguyen, yvanderv
[-- Attachment #1: Type: text/plain, Size: 1546 bytes --]
On Tue, Aug 19, 2014 at 01:34:35PM -0500, atull@opensource.altera.com wrote:
> From: Alan Tull <atull@opensource.altera.com>
>
> Add "speed-mode" Device Tree property to select between
> standard and fast i2c mode. Previously, driver was hardwired
> as fast mode. Default to fast mode if property is not
> present.
NACK. This should be deduced from the clock-frequency setting...
>
> Signed-off-by: Alan Tull <atull@opensource.altera.com>
> ---
> .../devicetree/bindings/i2c/i2c-designware.txt | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/i2c/i2c-designware.txt b/Documentation/devicetree/bindings/i2c/i2c-designware.txt
> index 5199b0c..0e4cd21 100644
> --- a/Documentation/devicetree/bindings/i2c/i2c-designware.txt
> +++ b/Documentation/devicetree/bindings/i2c/i2c-designware.txt
> @@ -9,6 +9,8 @@ Required properties :
> Recommended properties :
>
> - clock-frequency : desired I2C bus clock frequency in Hz.
... which is described here, but surprisingly not supported in the
driver yet :(
Check i2c-riic for an example.
> + - speed-mode : 0 = standard (0 - 100Kb/s)
> + : 1 = fast (<= 400Kb/s) <== default
>
> Optional properties :
> - i2c-sda-hold-time-ns : should contain the SDA hold time in nanoseconds.
> @@ -29,6 +31,7 @@ Example :
> reg = <0xf0000 0x1000>;
> interrupts = <11>;
> clock-frequency = <400000>;
> + speed-mode = <0>;
> };
>
> i2c@1120000 {
> --
> 1.7.9.5
>
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] i2c: designware: device tree bindings for i2c speed mode
@ 2014-08-19 19:15 ` Wolfram Sang
0 siblings, 0 replies; 11+ messages in thread
From: Wolfram Sang @ 2014-08-19 19:15 UTC (permalink / raw)
To: atull-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx
Cc: baruch-NswTu9S1W3P6gbPvEgmw2w,
mika.westerberg-VuQAYsv1563Yd54FQh9/CA,
grant.likely-QSEj5FYQhm4dnm+yROfE0A,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A, skuribay-e+AXbWqSrlAAvxtiuMwx3w,
Romain.Baeriswyl-ux6zf3SgZrrQT0dZR+AlfA,
rafael.j.wysocki-ral2JQCrhuEAvxtiuMwx3w,
alan-VuQAYsv1563Yd54FQh9/CA, linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA,
delicious.quinoa-Re5JQEeQqe8AvxtiuMwx3w,
dinguyen-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx,
yvanderv-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx
[-- Attachment #1: Type: text/plain, Size: 1630 bytes --]
On Tue, Aug 19, 2014 at 01:34:35PM -0500, atull-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx@public.gmane.org wrote:
> From: Alan Tull <atull-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx@public.gmane.org>
>
> Add "speed-mode" Device Tree property to select between
> standard and fast i2c mode. Previously, driver was hardwired
> as fast mode. Default to fast mode if property is not
> present.
NACK. This should be deduced from the clock-frequency setting...
>
> Signed-off-by: Alan Tull <atull-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx@public.gmane.org>
> ---
> .../devicetree/bindings/i2c/i2c-designware.txt | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/i2c/i2c-designware.txt b/Documentation/devicetree/bindings/i2c/i2c-designware.txt
> index 5199b0c..0e4cd21 100644
> --- a/Documentation/devicetree/bindings/i2c/i2c-designware.txt
> +++ b/Documentation/devicetree/bindings/i2c/i2c-designware.txt
> @@ -9,6 +9,8 @@ Required properties :
> Recommended properties :
>
> - clock-frequency : desired I2C bus clock frequency in Hz.
... which is described here, but surprisingly not supported in the
driver yet :(
Check i2c-riic for an example.
> + - speed-mode : 0 = standard (0 - 100Kb/s)
> + : 1 = fast (<= 400Kb/s) <== default
>
> Optional properties :
> - i2c-sda-hold-time-ns : should contain the SDA hold time in nanoseconds.
> @@ -29,6 +31,7 @@ Example :
> reg = <0xf0000 0x1000>;
> interrupts = <11>;
> clock-frequency = <400000>;
> + speed-mode = <0>;
> };
>
> i2c@1120000 {
> --
> 1.7.9.5
>
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] i2c: designware: device tree bindings for i2c speed mode
2014-08-19 19:15 ` Wolfram Sang
@ 2014-08-19 20:24 ` atull
-1 siblings, 0 replies; 11+ messages in thread
From: atull @ 2014-08-19 20:24 UTC (permalink / raw)
To: Wolfram Sang
Cc: baruch, mika.westerberg, grant.likely, robh+dt, skuribay,
Romain.Baeriswyl, rafael.j.wysocki, alan, linux-i2c,
linux-kernel, devicetree, delicious.quinoa, dinguyen, yvanderv
On Tue, 19 Aug 2014, Wolfram Sang wrote:
> On Tue, Aug 19, 2014 at 01:34:35PM -0500, atull@opensource.altera.com wrote:
> > From: Alan Tull <atull@opensource.altera.com>
> >
> > Add "speed-mode" Device Tree property to select between
> > standard and fast i2c mode. Previously, driver was hardwired
> > as fast mode. Default to fast mode if property is not
> > present.
>
> NACK. This should be deduced from the clock-frequency setting...
I just sent out a new patch that looks at the clock-frequency setting.
Alan
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] i2c: designware: device tree bindings for i2c speed mode
@ 2014-08-19 20:24 ` atull
0 siblings, 0 replies; 11+ messages in thread
From: atull @ 2014-08-19 20:24 UTC (permalink / raw)
To: Wolfram Sang
Cc: baruch-NswTu9S1W3P6gbPvEgmw2w,
mika.westerberg-VuQAYsv1563Yd54FQh9/CA,
grant.likely-QSEj5FYQhm4dnm+yROfE0A,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A, skuribay-e+AXbWqSrlAAvxtiuMwx3w,
Romain.Baeriswyl-ux6zf3SgZrrQT0dZR+AlfA,
rafael.j.wysocki-ral2JQCrhuEAvxtiuMwx3w,
alan-VuQAYsv1563Yd54FQh9/CA, linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA,
delicious.quinoa-Re5JQEeQqe8AvxtiuMwx3w,
dinguyen-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx,
yvanderv-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx
On Tue, 19 Aug 2014, Wolfram Sang wrote:
> On Tue, Aug 19, 2014 at 01:34:35PM -0500, atull-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx@public.gmane.org wrote:
> > From: Alan Tull <atull-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx@public.gmane.org>
> >
> > Add "speed-mode" Device Tree property to select between
> > standard and fast i2c mode. Previously, driver was hardwired
> > as fast mode. Default to fast mode if property is not
> > present.
>
> NACK. This should be deduced from the clock-frequency setting...
I just sent out a new patch that looks at the clock-frequency setting.
Alan
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] i2c: designware: device tree bindings for i2c speed mode
2014-08-19 18:34 ` atull-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx
` (2 preceding siblings ...)
(?)
@ 2014-08-20 9:34 ` Mark Rutland
2014-08-20 9:36 ` Mark Rutland
-1 siblings, 1 reply; 11+ messages in thread
From: Mark Rutland @ 2014-08-20 9:34 UTC (permalink / raw)
To: atull
Cc: wsa, baruch, mika.westerberg, grant.likely, robh+dt, skuribay,
Romain.Baeriswyl, rafael.j.wysocki, alan, linux-i2c,
linux-kernel, devicetree, delicious.quinoa, dinguyen, yvanderv
On Tue, Aug 19, 2014 at 07:34:35PM +0100, atull@opensource.altera.com wrote:
> From: Alan Tull <atull@opensource.altera.com>
>
> Add "speed-mode" Device Tree property to select between
> standard and fast i2c mode. Previously, driver was hardwired
> as fast mode. Default to fast mode if property is not
> present.
>
> Signed-off-by: Alan Tull <atull@opensource.altera.com>
> ---
> .../devicetree/bindings/i2c/i2c-designware.txt | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/i2c/i2c-designware.txt b/Documentation/devicetree/bindings/i2c/i2c-designware.txt
> index 5199b0c..0e4cd21 100644
> --- a/Documentation/devicetree/bindings/i2c/i2c-designware.txt
> +++ b/Documentation/devicetree/bindings/i2c/i2c-designware.txt
> @@ -9,6 +9,8 @@ Required properties :
> Recommended properties :
>
> - clock-frequency : desired I2C bus clock frequency in Hz.
> + - speed-mode : 0 = standard (0 - 100Kb/s)
> + : 1 = fast (<= 400Kb/s) <== default
This is a bit opaque.
Is this a limit on the max bit-rate the device should operate at?
Why not just have an optional boolean property to limit to standard
speed?
Thanks,
Mark.
>
> Optional properties :
> - i2c-sda-hold-time-ns : should contain the SDA hold time in nanoseconds.
> @@ -29,6 +31,7 @@ Example :
> reg = <0xf0000 0x1000>;
> interrupts = <11>;
> clock-frequency = <400000>;
> + speed-mode = <0>;
> };
>
> i2c@1120000 {
> --
> 1.7.9.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe devicetree" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] i2c: designware: device tree bindings for i2c speed mode
2014-08-20 9:34 ` Mark Rutland
@ 2014-08-20 9:36 ` Mark Rutland
0 siblings, 0 replies; 11+ messages in thread
From: Mark Rutland @ 2014-08-20 9:36 UTC (permalink / raw)
To: atull
Cc: wsa, baruch, mika.westerberg, grant.likely, robh+dt, skuribay,
Romain.Baeriswyl, rafael.j.wysocki, alan, linux-i2c,
linux-kernel, devicetree, delicious.quinoa, dinguyen, yvanderv
On Wed, Aug 20, 2014 at 10:34:59AM +0100, Mark Rutland wrote:
> On Tue, Aug 19, 2014 at 07:34:35PM +0100, atull@opensource.altera.com wrote:
> > From: Alan Tull <atull@opensource.altera.com>
> >
> > Add "speed-mode" Device Tree property to select between
> > standard and fast i2c mode. Previously, driver was hardwired
> > as fast mode. Default to fast mode if property is not
> > present.
> >
> > Signed-off-by: Alan Tull <atull@opensource.altera.com>
> > ---
> > .../devicetree/bindings/i2c/i2c-designware.txt | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/i2c/i2c-designware.txt b/Documentation/devicetree/bindings/i2c/i2c-designware.txt
> > index 5199b0c..0e4cd21 100644
> > --- a/Documentation/devicetree/bindings/i2c/i2c-designware.txt
> > +++ b/Documentation/devicetree/bindings/i2c/i2c-designware.txt
> > @@ -9,6 +9,8 @@ Required properties :
> > Recommended properties :
> >
> > - clock-frequency : desired I2C bus clock frequency in Hz.
> > + - speed-mode : 0 = standard (0 - 100Kb/s)
> > + : 1 = fast (<= 400Kb/s) <== default
>
> This is a bit opaque.
>
> Is this a limit on the max bit-rate the device should operate at?
>
> Why not just have an optional boolean property to limit to standard
> speed?
I see there's a new patch doing this based on clock-frequency, so feel
free to ignore this.
Mark.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] i2c: designware: device tree bindings for i2c speed mode
@ 2014-08-20 9:36 ` Mark Rutland
0 siblings, 0 replies; 11+ messages in thread
From: Mark Rutland @ 2014-08-20 9:36 UTC (permalink / raw)
To: atull-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx
Cc: wsa-z923LK4zBo2bacvFa/9K2g, baruch-NswTu9S1W3P6gbPvEgmw2w,
mika.westerberg-VuQAYsv1563Yd54FQh9/CA,
grant.likely-QSEj5FYQhm4dnm+yROfE0A,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A, skuribay-e+AXbWqSrlAAvxtiuMwx3w,
Romain.Baeriswyl-ux6zf3SgZrrQT0dZR+AlfA,
rafael.j.wysocki-ral2JQCrhuEAvxtiuMwx3w,
alan-VuQAYsv1563Yd54FQh9/CA, linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA,
delicious.quinoa-Re5JQEeQqe8AvxtiuMwx3w,
dinguyen-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx,
yvanderv-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx
On Wed, Aug 20, 2014 at 10:34:59AM +0100, Mark Rutland wrote:
> On Tue, Aug 19, 2014 at 07:34:35PM +0100, atull-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx@public.gmane.org wrote:
> > From: Alan Tull <atull-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx@public.gmane.org>
> >
> > Add "speed-mode" Device Tree property to select between
> > standard and fast i2c mode. Previously, driver was hardwired
> > as fast mode. Default to fast mode if property is not
> > present.
> >
> > Signed-off-by: Alan Tull <atull-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx@public.gmane.org>
> > ---
> > .../devicetree/bindings/i2c/i2c-designware.txt | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/i2c/i2c-designware.txt b/Documentation/devicetree/bindings/i2c/i2c-designware.txt
> > index 5199b0c..0e4cd21 100644
> > --- a/Documentation/devicetree/bindings/i2c/i2c-designware.txt
> > +++ b/Documentation/devicetree/bindings/i2c/i2c-designware.txt
> > @@ -9,6 +9,8 @@ Required properties :
> > Recommended properties :
> >
> > - clock-frequency : desired I2C bus clock frequency in Hz.
> > + - speed-mode : 0 = standard (0 - 100Kb/s)
> > + : 1 = fast (<= 400Kb/s) <== default
>
> This is a bit opaque.
>
> Is this a limit on the max bit-rate the device should operate at?
>
> Why not just have an optional boolean property to limit to standard
> speed?
I see there's a new patch doing this based on clock-frequency, so feel
free to ignore this.
Mark.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2014-08-20 9:36 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-19 18:34 [PATCH 1/2] i2c: designware: device tree bindings for i2c speed mode atull
2014-08-19 18:34 ` atull-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx
2014-08-19 18:34 ` [PATCH 2/2] i2c: designware: add speed mode device tree setting atull
2014-08-19 18:34 ` atull-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx
2014-08-19 19:15 ` [PATCH 1/2] i2c: designware: device tree bindings for i2c speed mode Wolfram Sang
2014-08-19 19:15 ` Wolfram Sang
2014-08-19 20:24 ` atull
2014-08-19 20:24 ` atull
2014-08-20 9:34 ` Mark Rutland
2014-08-20 9:36 ` Mark Rutland
2014-08-20 9:36 ` Mark Rutland
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.