diff mbox

[2/5] i2c: emev2: add binding documentation

Message ID 1436219188-4325-3-git-send-email-wsa@the-dreams.de
State Superseded
Headers show

Commit Message

Wolfram Sang July 6, 2015, 9:46 p.m. UTC
From: Wolfram Sang <wsa+renesas@sang-engineering.com>

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 .../devicetree/bindings/i2c/i2c-emev2.txt          | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/i2c/i2c-emev2.txt

Comments

Geert Uytterhoeven July 7, 2015, 8:41 a.m. UTC | #1
Hi Wolfram,

On Mon, Jul 6, 2015 at 11:46 PM, Wolfram Sang <wsa@the-dreams.de> wrote:
> diff --git a/Documentation/devicetree/bindings/i2c/i2c-emev2.txt b/Documentation/devicetree/bindings/i2c/i2c-emev2.txt
> new file mode 100644
> index 00000000000000..a6740066835056
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/i2c/i2c-emev2.txt
> @@ -0,0 +1,22 @@
> +Device tree configuration for Renesas EMEV2 IIC driver
> +
> +Required properties:
> +- compatible      : "renesas,iic-<soctype>". "renesas,iic-emev2" as fallback

What's the "<soctype>"? Isn't that "emev2"?

> +- reg             : address start and address range size of device
> +- interrupts      : 1 interrupt
> +- clocks          : phandle to the IP core SCLK
> +- clock-names     : must be "sclk"
> +- #address-cells  : should be <1>
> +- #size-cells     : should be <0>
> +
> +Example:
> +
> +       iic0: i2c@e0070000 {
> +               #address-cells = <1>;
> +               #size-cells = <0>;
> +               compatible = "renesas,iic-emev2";
> +               reg = <0xe0070000 0x28>;
> +               interrupts = <0 32 IRQ_TYPE_EDGE_RISING>;

Are you sure about rising edge? All other emev2 interrupts are
IRQ_TYPE_LEVEL_HIGH.

> +               clocks = <&iic0_sclk>;
> +               clock-names = "sclk";
> +       };


Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Wolfram Sang July 7, 2015, 9:17 a.m. UTC | #2
On Tue, Jul 07, 2015 at 10:41:37AM +0200, Geert Uytterhoeven wrote:
> Hi Wolfram,
> 
> On Mon, Jul 6, 2015 at 11:46 PM, Wolfram Sang <wsa@the-dreams.de> wrote:
> > diff --git a/Documentation/devicetree/bindings/i2c/i2c-emev2.txt b/Documentation/devicetree/bindings/i2c/i2c-emev2.txt
> > new file mode 100644
> > index 00000000000000..a6740066835056
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/i2c/i2c-emev2.txt
> > @@ -0,0 +1,22 @@
> > +Device tree configuration for Renesas EMEV2 IIC driver
> > +
> > +Required properties:
> > +- compatible      : "renesas,iic-<soctype>". "renesas,iic-emev2" as fallback
> 
> What's the "<soctype>"? Isn't that "emev2"?

Hmm, I though emev2 was the family but looking again I might be wrong.
But it is still confusing to me. EM (EMMA Mobile) is the family and EV2
is the SoC? I should probably just skip the <soctype> thing above, then
it should be good.

> > +               interrupts = <0 32 IRQ_TYPE_EDGE_RISING>;
> 
> Are you sure about rising edge? All other emev2 interrupts are
> IRQ_TYPE_LEVEL_HIGH.

Yes. R19UH00356EJ0800_1chip.pdf, chapter 7.1.1

64
 IIC0
 IIC0_INT
 IIC #0 interrupt
 Edge
65
 IIC1
 IIC1_INT
 IIC #1 interrupt
 Edge

Thanks,

   Wolfram
Geert Uytterhoeven July 7, 2015, 9:22 a.m. UTC | #3
Hi Wolfram,

On Tue, Jul 7, 2015 at 11:17 AM, Wolfram Sang <wsa@the-dreams.de> wrote:
>> > +               interrupts = <0 32 IRQ_TYPE_EDGE_RISING>;
>>
>> Are you sure about rising edge? All other emev2 interrupts are
>> IRQ_TYPE_LEVEL_HIGH.
>
> Yes. R19UH00356EJ0800_1chip.pdf, chapter 7.1.1
>
> 64
>  IIC0
>  IIC0_INT
>  IIC #0 interrupt
>  Edge
> 65
>  IIC1
>  IIC1_INT
>  IIC #1 interrupt
>  Edge

OK, verified using R19UH0036EJ1600_1chip.pdf (which is newer, Google is
your friend).

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Laurent Pinchart July 7, 2015, 5:26 p.m. UTC | #4
Hi Wolfram,

Thank you for the patch.

On Monday 06 July 2015 23:46:06 Wolfram Sang wrote:
> From: Wolfram Sang <wsa+renesas@sang-engineering.com>
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
>  .../devicetree/bindings/i2c/i2c-emev2.txt          | 22 ++++++++++++++++++
>  1 file changed, 22 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/i2c/i2c-emev2.txt
> 
> diff --git a/Documentation/devicetree/bindings/i2c/i2c-emev2.txt
> b/Documentation/devicetree/bindings/i2c/i2c-emev2.txt new file mode 100644
> index 00000000000000..a6740066835056
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/i2c/i2c-emev2.txt
> @@ -0,0 +1,22 @@
> +Device tree configuration for Renesas EMEV2 IIC driver

s/driver/controller/

> +
> +Required properties:
> +- compatible      : "renesas,iic-<soctype>". "renesas,iic-emev2" as
> fallback
> +- reg             : address start and address range size of device
> +- interrupts      : 1 interrupt

I'd write this as "specifier for the IIC controller interrupt".

> +- clocks          : phandle to the IP core SCLK

The datasheet mentions PCLK and IIC_SCLK but doesn't provide details. Do you 
have more information ?

> +- clock-names     : must be "sclk"
> +- #address-cells  : should be <1>
> +- #size-cells     : should be <0>
> +
> +Example:
> +
> +	iic0: i2c@e0070000 {
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +		compatible = "renesas,iic-emev2";
> +		reg = <0xe0070000 0x28>;
> +		interrupts = <0 32 IRQ_TYPE_EDGE_RISING>;
> +		clocks = <&iic0_sclk>;
> +		clock-names = "sclk";
> +	};
Wolfram Sang July 7, 2015, 7:43 p.m. UTC | #5
> > +Device tree configuration for Renesas EMEV2 IIC driver
> 
> s/driver/controller/

Yes,

> > +- interrupts      : 1 interrupt
> 
> I'd write this as "specifier for the IIC controller interrupt".

Yes.

> 
> > +- clocks          : phandle to the IP core SCLK
> 
> The datasheet mentions PCLK and IIC_SCLK but doesn't provide details. Do you 
> have more information ?

I follow what is done for the other EMEV2 IP cores currently supported.
All cores I checked have PCLK and SCLK but only SCLK is referenced in
the DTS.
Laurent Pinchart July 7, 2015, 7:47 p.m. UTC | #6
Hi Wolfram,

On Tuesday 07 July 2015 21:43:13 Wolfram Sang wrote:
> > > +Device tree configuration for Renesas EMEV2 IIC driver
> > 
> > s/driver/controller/
> 
> Yes,
> 
> > > +- interrupts      : 1 interrupt
> > 
> > I'd write this as "specifier for the IIC controller interrupt".
> 
> Yes.
> 
> > > +- clocks          : phandle to the IP core SCLK
> > 
> > The datasheet mentions PCLK and IIC_SCLK but doesn't provide details. Do
> > you have more information ?
> 
> I follow what is done for the other EMEV2 IP cores currently supported.
> All cores I checked have PCLK and SCLK but only SCLK is referenced in
> the DTS.

Could you briefly explain what the two clocks are for ? Or point me to the 
right documentation ?
Wolfram Sang July 7, 2015, 7:53 p.m. UTC | #7
> > I follow what is done for the other EMEV2 IP cores currently supported.
> > All cores I checked have PCLK and SCLK but only SCLK is referenced in
> > the DTS.
> 
> Could you briefly explain what the two clocks are for ? Or point me to the 
> right documentation ?

PCLK is the APB clock. See R19UH0037EJ1200_SMU.pdf, chapter 4.13.
Laurent Pinchart July 9, 2015, 12:35 a.m. UTC | #8
On Tuesday 07 July 2015 21:53:13 Wolfram Sang wrote:
> > > I follow what is done for the other EMEV2 IP cores currently supported.
> > > All cores I checked have PCLK and SCLK but only SCLK is referenced in
> > > the DTS.
> > 
> > Could you briefly explain what the two clocks are for ? Or point me to the
> > right documentation ?
> 
> PCLK is the APB clock. See R19UH0037EJ1200_SMU.pdf, chapter 4.13.

Is that the functional clock, while SCLK is the clock used to control serial 
communication ?
Wolfram Sang July 9, 2015, 3:20 p.m. UTC | #9
> Is that the functional clock, while SCLK is the clock used to control serial 
> communication ?

Yes, that's how I read it.
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/i2c/i2c-emev2.txt b/Documentation/devicetree/bindings/i2c/i2c-emev2.txt
new file mode 100644
index 00000000000000..a6740066835056
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/i2c-emev2.txt
@@ -0,0 +1,22 @@ 
+Device tree configuration for Renesas EMEV2 IIC driver
+
+Required properties:
+- compatible      : "renesas,iic-<soctype>". "renesas,iic-emev2" as fallback
+- reg             : address start and address range size of device
+- interrupts      : 1 interrupt
+- clocks          : phandle to the IP core SCLK
+- clock-names     : must be "sclk"
+- #address-cells  : should be <1>
+- #size-cells     : should be <0>
+
+Example:
+
+	iic0: i2c@e0070000 {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		compatible = "renesas,iic-emev2";
+		reg = <0xe0070000 0x28>;
+		interrupts = <0 32 IRQ_TYPE_EDGE_RISING>;
+		clocks = <&iic0_sclk>;
+		clock-names = "sclk";
+	};