diff mbox

[v2] ARM: dts: imx6: add new board RIoTboard

Message ID 536BBAE2.7060203@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Iain Paton May 8, 2014, 5:12 p.m. UTC
On 08/05/14 15:50, Alexander Shiyan wrote:

> I think you should make patch series:
> 1. Add missing clock into imx6dl.dtsi
> 2. Add label to AIPS2 to imx6qdl.dtsi and use this label in imx6dl.dtsi
> 3. This patch

I'm not sure I follow 1/2.  You mean something like this 



then the riotboard patch with clock-frequency lines dropped from all i2c 
sections and clocks line dropped from i2c4?

Ok, I can see how that works, if it's acceptable to everyone I'll post 
the series shortly.

Thanks,
Iain

Comments

Alexander Shiyan May 8, 2014, 5:32 p.m. UTC | #1
Thu, 08 May 2014 18:12:02 +0100 ?? Iain Paton <ipaton0@gmail.com>:
> On 08/05/14 15:50, Alexander Shiyan wrote:
> 
> > I think you should make patch series:
> > 1. Add missing clock into imx6dl.dtsi
> > 2. Add label to AIPS2 to imx6qdl.dtsi and use this label in imx6dl.dtsi
> > 3. This patch
> 
> I'm not sure I follow 1/2.  You mean something like this 
> 
> diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi
> index eca0971..0645069 100644
> --- a/arch/arm/boot/dts/imx6qdl.dtsi
> +++ b/arch/arm/boot/dts/imx6qdl.dtsi
> @@ -767,7 +767,7 @@
>                         };
>                 };
>  
> -               aips-bus@02100000 { /* AIPS2 */
> +               aips2: aips-bus@02100000 { /* AIPS2 */
>                         compatible = "fsl,aips-bus", "simple-bus";
>                         #address-cells = <1>;
>                         #size-cells = <1>;
> 
> followed by 
> 
> 
> diff --git a/arch/arm/boot/dts/imx6dl.dtsi b/arch/arm/boot/dts/imx6dl.dtsi
> index 5c5f574..81b7501 100644
> --- a/arch/arm/boot/dts/imx6dl.dtsi
> +++ b/arch/arm/boot/dts/imx6dl.dtsi
> @@ -80,16 +80,6 @@
>                         };
>                 };
>  
> -               aips2: aips-bus@02100000 {
> -                       i2c4: i2c@021f8000 {
> -                               #address-cells = <1>;
> -                               #size-cells = <0>;
> -                               compatible = "fsl,imx1-i2c";
> -                               reg = <0x021f8000 0x4000>;
> -                               interrupts = <0 35 IRQ_TYPE_LEVEL_HIGH>;
> -                               status = "disabled";
> -                       };
> -               };
>         };
>  
>         display-subsystem {
> @@ -98,6 +88,18 @@
>         };
>  };
>  
> +&aips2 {
> +        i2c4: i2c@021f8000 {
> +                #address-cells = <1>;
> +                #size-cells = <0>;
> +                compatible = "fsl,imx1-i2c";

Are you sure about use "fsl,imx1-i2c" instead of  "fsl,imx21-i2c"?
In any case you should add "fsl-imx6dl-i2c" as first compatible string.
The rest looks good.

> +                reg = <0x021f8000 0x4000>;
> +                interrupts = <0 35 IRQ_TYPE_LEVEL_HIGH>;
> +                clocks = <&clks 116>;
> +                status = "disabled";
> +        };
> +};

---
Iain Paton May 8, 2014, 7:27 p.m. UTC | #2
On 08/05/14 18:32, Alexander Shiyan wrote:
> Thu, 08 May 2014 18:12:02 +0100 ?? Iain Paton <ipaton0@gmail.com>:
>> +&aips2 {
>> +        i2c4: i2c@021f8000 {
>> +                #address-cells = <1>;
>> +                #size-cells = <0>;
>> +                compatible = "fsl,imx1-i2c";
> 
> Are you sure about use "fsl,imx1-i2c" instead of  "fsl,imx21-i2c"?
> In any case you should add "fsl-imx6dl-i2c" as first compatible string.
> The rest looks good.

Sure?  No.  However that's what currently exists in imx6dl.dtsi for i2c4.

looking at the other i2c interfaces in imx6qdl.dtsi, they're using
fsl,imx6q-i2c as the first compatible string. So I think I should use
either fsl,imx6dl-i2c or fsl,imx6q-i2c. 
What's the difference between that and your suggested fsl-imx6dl-i2c?
If we assume can assume the i2c4 block is functionally identical to
i2c[123] then shouldn't I use an identical compatible string?

The driver has the following compatible strings:
fsl,imx1-i2c
fsl,imx21-i2c
fsl,vf610-i2c

the difference between imx1-i2c and imx21-i2c seems to be an added delay
before generating the stop bit to workaround a hardware bug.

As it seems likely I'm the first to be trying to enable i2c4 I'd want to
check that the hardware bug doesn't apply here and that there's no 
negative effect. 
I think you're probably correct and I should change it, but I'll do the 
tests anyway and post the series if I don't see any problems.

Thanks,
Iain
Alexander Shiyan May 8, 2014, 7:37 p.m. UTC | #3
Thu, 08 May 2014 20:27:55 +0100 ?? Iain Paton <ipaton0@gmail.com>:
> On 08/05/14 18:32, Alexander Shiyan wrote:
> > Thu, 08 May 2014 18:12:02 +0100 ?? Iain Paton <ipaton0@gmail.com>:
> >> +&aips2 {
> >> +        i2c4: i2c@021f8000 {
> >> +                #address-cells = <1>;
> >> +                #size-cells = <0>;
> >> +                compatible = "fsl,imx1-i2c";
> > 
> > Are you sure about use "fsl,imx1-i2c" instead of  "fsl,imx21-i2c"?
> > In any case you should add "fsl-imx6dl-i2c" as first compatible string.
> > The rest looks good.
> 
> Sure?  No.  However that's what currently exists in imx6dl.dtsi for i2c4.
> 
> looking at the other i2c interfaces in imx6qdl.dtsi, they're using
> fsl,imx6q-i2c as the first compatible string. So I think I should use
> either fsl,imx6dl-i2c or fsl,imx6q-i2c. 
> What's the difference between that and your suggested fsl-imx6dl-i2c?
> If we assume can assume the i2c4 block is functionally identical to
> i2c[123] then shouldn't I use an identical compatible string?

Yes. This is just my typo. If all I2C-interfaces is identical in the datasheet,
the same compatible string (fsl,imx6q-i2c) should be used.

---
diff mbox

Patch

diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi
index eca0971..0645069 100644
--- a/arch/arm/boot/dts/imx6qdl.dtsi
+++ b/arch/arm/boot/dts/imx6qdl.dtsi
@@ -767,7 +767,7 @@ 
                        };
                };
 
-               aips-bus@02100000 { /* AIPS2 */
+               aips2: aips-bus@02100000 { /* AIPS2 */
                        compatible = "fsl,aips-bus", "simple-bus";
                        #address-cells = <1>;
                        #size-cells = <1>;

followed by 


diff --git a/arch/arm/boot/dts/imx6dl.dtsi b/arch/arm/boot/dts/imx6dl.dtsi
index 5c5f574..81b7501 100644
--- a/arch/arm/boot/dts/imx6dl.dtsi
+++ b/arch/arm/boot/dts/imx6dl.dtsi
@@ -80,16 +80,6 @@ 
                        };
                };
 
-               aips2: aips-bus@02100000 {
-                       i2c4: i2c@021f8000 {
-                               #address-cells = <1>;
-                               #size-cells = <0>;
-                               compatible = "fsl,imx1-i2c";
-                               reg = <0x021f8000 0x4000>;
-                               interrupts = <0 35 IRQ_TYPE_LEVEL_HIGH>;
-                               status = "disabled";
-                       };
-               };
        };
 
        display-subsystem {
@@ -98,6 +88,18 @@ 
        };
 };
 
+&aips2 {
+        i2c4: i2c@021f8000 {
+                #address-cells = <1>;
+                #size-cells = <0>;
+                compatible = "fsl,imx1-i2c";
+                reg = <0x021f8000 0x4000>;
+                interrupts = <0 35 IRQ_TYPE_LEVEL_HIGH>;
+                clocks = <&clks 116>;
+                status = "disabled";
+        };
+};
+
 &hdmi {
        compatible = "fsl,imx6dl-hdmi";
 };