Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1702527 > unrolled thread
| Started by | Franklin S Cooper Jr <fcooper@ti.com> |
|---|---|
| First post | 2017-08-03 00:20 +0200 |
| Last post | 2017-08-10 18:40 +0200 |
| Articles | 7 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH 0/4] ARM: dts: keystone-k2g: Add I2C support for 66AK2G Franklin S Cooper Jr <fcooper@ti.com> - 2017-08-03 00:20 +0200
[PATCH 1/4] i2c: davinci: Preserve return value of devm_clk_get Franklin S Cooper Jr <fcooper@ti.com> - 2017-08-03 00:20 +0200
Re: [PATCH 1/4] i2c: davinci: Preserve return value of devm_clk_get Grygorii Strashko <grygorii.strashko@ti.com> - 2017-08-12 00:10 +0200
[PATCH 4/4] ARM: dts: keystone-k2g: Add I2C nodes Franklin S Cooper Jr <fcooper@ti.com> - 2017-08-03 00:20 +0200
Re: [PATCH 4/4] ARM: dts: keystone-k2g: Add I2C nodes Grygorii Strashko <grygorii.strashko@ti.com> - 2017-08-12 00:20 +0200
[PATCH 3/4] dt-bindings: i2c: i2c-davinci: Update binding for 66AK2Gx pwr dm property Franklin S Cooper Jr <fcooper@ti.com> - 2017-08-03 00:30 +0200
Re: [PATCH 3/4] dt-bindings: i2c: i2c-davinci: Update binding for 66AK2Gx pwr dm property Rob Herring <robh@kernel.org> - 2017-08-10 18:40 +0200
| From | Franklin S Cooper Jr <fcooper@ti.com> |
|---|---|
| Date | 2017-08-03 00:20 +0200 |
| Subject | [PATCH 0/4] ARM: dts: keystone-k2g: Add I2C support for 66AK2G |
| Message-ID | <uaa9H-7BB-3@gated-at.bofh.it> |
Add I2C support to 66AK2G. Primary requirement is to add PM
Runtime support to the driver.
This has been tested on following platforms by performing simple i2c test
such as i2c detect and reading on board i2c devices:
K2G GP evm
OMAPL138
K2L GP EVM
and boot tested on:
K2E GP EVM
K2HK GP EVM
Franklin S Cooper Jr (3):
i2c: davinci: Preserve return value of devm_clk_get
i2c: davinci: Add PM Runtime Support
dt-bindings: i2c: i2c-davinci: Update binding for 66AK2Gx pwr dm
property
Vitaly Andrianov (1):
ARM: dts: keystone-k2g: Add I2C nodes
.../devicetree/bindings/i2c/i2c-davinci.txt | 12 +++++
arch/arm/boot/dts/keystone-k2g.dtsi | 36 +++++++++++++
drivers/i2c/busses/i2c-davinci.c | 63 ++++++++++++++++++----
3 files changed, 102 insertions(+), 9 deletions(-)
--
2.9.4.dirty
[toc] | [next] | [standalone]
| From | Franklin S Cooper Jr <fcooper@ti.com> |
|---|---|
| Date | 2017-08-03 00:20 +0200 |
| Subject | [PATCH 1/4] i2c: davinci: Preserve return value of devm_clk_get |
| Message-ID | <uaa9H-7BB-7@gated-at.bofh.it> |
| In reply to | #1702527 |
The i2c driver can run into driver dependency issues if its loaded before a clock driver it depends on. Therefore, EPROBE_DEFER may be returned by devm_clk_get and should be returned in probe to allow the kernel to reprobe the driver at a later time. This patch allows the error value returned by devm_clk_get to be passed through and not overwritten. Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com> Signed-off-by: Sekhar Nori <nsekhar@ti.com> --- drivers/i2c/busses/i2c-davinci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c index 9e7ef5c..5749aac 100644 --- a/drivers/i2c/busses/i2c-davinci.c +++ b/drivers/i2c/busses/i2c-davinci.c @@ -801,7 +801,7 @@ static int davinci_i2c_probe(struct platform_device *pdev) dev->clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(dev->clk)) - return -ENODEV; + return PTR_ERR(dev->clk); clk_prepare_enable(dev->clk); mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); -- 2.9.4.dirty
[toc] | [prev] | [next] | [standalone]
| From | Grygorii Strashko <grygorii.strashko@ti.com> |
|---|---|
| Date | 2017-08-12 00:10 +0200 |
| Subject | Re: [PATCH 1/4] i2c: davinci: Preserve return value of devm_clk_get |
| Message-ID | <udqhZ-E7-59@gated-at.bofh.it> |
| In reply to | #1702528 |
On 08/02/2017 05:17 PM, Franklin S Cooper Jr wrote: > The i2c driver can run into driver dependency issues if its loaded > before a clock driver it depends on. Therefore, EPROBE_DEFER may be > returned by devm_clk_get and should be returned in probe to allow the > kernel to reprobe the driver at a later time. This patch allows the error > value returned by devm_clk_get to be passed through and not overwritten. > > Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com> > Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com> > Signed-off-by: Sekhar Nori <nsekhar@ti.com> I think it's better to drop internal tags. Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com> > --- > drivers/i2c/busses/i2c-davinci.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c > index 9e7ef5c..5749aac 100644 > --- a/drivers/i2c/busses/i2c-davinci.c > +++ b/drivers/i2c/busses/i2c-davinci.c > @@ -801,7 +801,7 @@ static int davinci_i2c_probe(struct platform_device *pdev) > > dev->clk = devm_clk_get(&pdev->dev, NULL); > if (IS_ERR(dev->clk)) > - return -ENODEV; > + return PTR_ERR(dev->clk); > clk_prepare_enable(dev->clk); > > mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); > -- regards, -grygorii
[toc] | [prev] | [next] | [standalone]
| From | Franklin S Cooper Jr <fcooper@ti.com> |
|---|---|
| Date | 2017-08-03 00:20 +0200 |
| Subject | [PATCH 4/4] ARM: dts: keystone-k2g: Add I2C nodes |
| Message-ID | <uaa9H-7BB-9@gated-at.bofh.it> |
| In reply to | #1702527 |
From: Vitaly Andrianov <vitalya@ti.com>
Add nodes for the various I2C instances.
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
[d-gerlach@ti.com: Add power domain and clock properties]
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
[fcooper@ti.com: Update subject and commit message]
Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
---
arch/arm/boot/dts/keystone-k2g.dtsi | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/arch/arm/boot/dts/keystone-k2g.dtsi b/arch/arm/boot/dts/keystone-k2g.dtsi
index bf4d1fa..5c0acf37 100644
--- a/arch/arm/boot/dts/keystone-k2g.dtsi
+++ b/arch/arm/boot/dts/keystone-k2g.dtsi
@@ -27,6 +27,9 @@
aliases {
serial0 = &uart0;
+ i2c0 = &i2c0;
+ i2c1 = &i2c1;
+ i2c2 = &i2c2;
};
cpus {
@@ -113,6 +116,39 @@
status = "disabled";
};
+ i2c0: i2c@2530000 {
+ compatible = "ti,keystone-i2c";
+ reg = <0x02530000 0x400>;
+ clocks = <&k2g_clks 0x003a 0>;
+ power-domains = <&k2g_pds 0x003a>;
+ interrupts = <GIC_SPI 88 IRQ_TYPE_EDGE_RISING>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ i2c1: i2c@2530400 {
+ compatible = "ti,keystone-i2c";
+ reg = <0x02530400 0x400>;
+ clocks = <&k2g_clks 0x003b 0>;
+ power-domains = <&k2g_pds 0x003b>;
+ interrupts = <GIC_SPI 89 IRQ_TYPE_EDGE_RISING>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ i2c2: i2c@2530800 {
+ compatible = "ti,keystone-i2c";
+ reg = <0x02530800 0x400>;
+ clocks = <&k2g_clks 0x003c 0>;
+ power-domains = <&k2g_pds 0x003c>;
+ interrupts = <GIC_SPI 90 IRQ_TYPE_EDGE_RISING>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
kirq0: keystone_irq@026202a0 {
compatible = "ti,keystone-irq";
interrupts = <GIC_SPI 1 IRQ_TYPE_EDGE_RISING>;
--
2.9.4.dirty
[toc] | [prev] | [next] | [standalone]
| From | Grygorii Strashko <grygorii.strashko@ti.com> |
|---|---|
| Date | 2017-08-12 00:20 +0200 |
| Subject | Re: [PATCH 4/4] ARM: dts: keystone-k2g: Add I2C nodes |
| Message-ID | <udqrG-Hs-61@gated-at.bofh.it> |
| In reply to | #1702529 |
On 08/02/2017 05:17 PM, Franklin S Cooper Jr wrote:
> From: Vitaly Andrianov <vitalya@ti.com>
>
> Add nodes for the various I2C instances.
>
> Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
> [d-gerlach@ti.com: Add power domain and clock properties]
> Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
> [fcooper@ti.com: Update subject and commit message]
> Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
It might be better to send this patch separately as it will
go to the different tree.
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
> ---
> arch/arm/boot/dts/keystone-k2g.dtsi | 36 ++++++++++++++++++++++++++++++++++++
> 1 file changed, 36 insertions(+)
>
> diff --git a/arch/arm/boot/dts/keystone-k2g.dtsi b/arch/arm/boot/dts/keystone-k2g.dtsi
> index bf4d1fa..5c0acf37 100644
> --- a/arch/arm/boot/dts/keystone-k2g.dtsi
> +++ b/arch/arm/boot/dts/keystone-k2g.dtsi
> @@ -27,6 +27,9 @@
>
> aliases {
> serial0 = &uart0;
> + i2c0 = &i2c0;
> + i2c1 = &i2c1;
> + i2c2 = &i2c2;
> };
>
> cpus {
> @@ -113,6 +116,39 @@
> status = "disabled";
> };
>
> + i2c0: i2c@2530000 {
> + compatible = "ti,keystone-i2c";
> + reg = <0x02530000 0x400>;
> + clocks = <&k2g_clks 0x003a 0>;
> + power-domains = <&k2g_pds 0x003a>;
> + interrupts = <GIC_SPI 88 IRQ_TYPE_EDGE_RISING>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + status = "disabled";
> + };
> +
> + i2c1: i2c@2530400 {
> + compatible = "ti,keystone-i2c";
> + reg = <0x02530400 0x400>;
> + clocks = <&k2g_clks 0x003b 0>;
> + power-domains = <&k2g_pds 0x003b>;
> + interrupts = <GIC_SPI 89 IRQ_TYPE_EDGE_RISING>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + status = "disabled";
> + };
> +
> + i2c2: i2c@2530800 {
> + compatible = "ti,keystone-i2c";
> + reg = <0x02530800 0x400>;
> + clocks = <&k2g_clks 0x003c 0>;
> + power-domains = <&k2g_pds 0x003c>;
> + interrupts = <GIC_SPI 90 IRQ_TYPE_EDGE_RISING>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + status = "disabled";
> + };
> +
> kirq0: keystone_irq@026202a0 {
> compatible = "ti,keystone-irq";
> interrupts = <GIC_SPI 1 IRQ_TYPE_EDGE_RISING>;
>
--
regards,
-grygorii
[toc] | [prev] | [next] | [standalone]
| From | Franklin S Cooper Jr <fcooper@ti.com> |
|---|---|
| Date | 2017-08-03 00:30 +0200 |
| Subject | [PATCH 3/4] dt-bindings: i2c: i2c-davinci: Update binding for 66AK2Gx pwr dm property |
| Message-ID | <uaajn-7Fz-7@gated-at.bofh.it> |
| In reply to | #1702527 |
Add pm-domains property which is required for 66AK2Gx. Also document 66AK2G unique clocks property usage. Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com> --- Documentation/devicetree/bindings/i2c/i2c-davinci.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Documentation/devicetree/bindings/i2c/i2c-davinci.txt b/Documentation/devicetree/bindings/i2c/i2c-davinci.txt index 5b123e0..64e6e65 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-davinci.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-davinci.txt @@ -6,6 +6,18 @@ davinci/keystone i2c interface contains. Required properties: - compatible: "ti,davinci-i2c" or "ti,keystone-i2c"; - reg : Offset and length of the register set for the device +- clocks: I2C functional clock phandle. + For 66AK2G this property should be set per binding, + Documentation/devicetree/bindings/clock/ti,sci-clk.txt + +SoC-specific Required Properties: + +The following are mandatory properties for Keystone 2 66AK2G SoCs only: + +- power-domains: Should contain a phandle to a PM domain provider node + and an args specifier containing the I2C device id + value. This property is as per the binding, + Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt Recommended properties : - interrupts : standard interrupt property. -- 2.9.4.dirty
[toc] | [prev] | [next] | [standalone]
| From | Rob Herring <robh@kernel.org> |
|---|---|
| Date | 2017-08-10 18:40 +0200 |
| Subject | Re: [PATCH 3/4] dt-bindings: i2c: i2c-davinci: Update binding for 66AK2Gx pwr dm property |
| Message-ID | <ucYF7-86V-81@gated-at.bofh.it> |
| In reply to | #1702531 |
On Wed, Aug 02, 2017 at 05:17:52PM -0500, Franklin S Cooper Jr wrote: > Add pm-domains property which is required for 66AK2Gx. Also document 66AK2G > unique clocks property usage. > > Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com> > --- > Documentation/devicetree/bindings/i2c/i2c-davinci.txt | 12 ++++++++++++ > 1 file changed, 12 insertions(+) Acked-by: Rob Herring <robh@kernel.org>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web