devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 4/9] tegra: fdt: i2c: Add extra I2C bindings for U-Boot
@ 2012-03-07  5:00 Simon Glass
       [not found] ` <1331096428-6317-5-git-send-email-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Simon Glass @ 2012-03-07  5:00 UTC (permalink / raw)
  To: U-Boot Mailing List
  Cc: Tom Warren, Stephen Warren, linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	Simon Glass, Jerry Van Baren, Devicetree Discuss, Heiko Schocher

Add U-Boot's peripheral clock information to the Tegra20 device tree file.

Signed-off-by: Simon Glass <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
---
Changes in v2:
- Adjust definitions to fit new peripheral clock bindings
- Change 'speed' to 'clock-frequency'
- Remove u-boot,pinmux binding (sadly)

Changes in v3:
- Move speed setting from tegra20.dtsi to board .dts file

Changes in v4:
- Update to use new tegra2 clock and reset binding

Changes in v5:
- Add clock binding file which lists our additions to the Linux binding
- Add pll_p_out3 to clock binding definition

 arch/arm/dts/tegra20.dtsi                    |   10 +++++++++-
 doc/device-tree-bindings/i2c/tegra20-i2c.txt |   23 +++++++++++++++++++++++
 2 files changed, 32 insertions(+), 1 deletions(-)
 create mode 100644 doc/device-tree-bindings/i2c/tegra20-i2c.txt

diff --git a/arch/arm/dts/tegra20.dtsi b/arch/arm/dts/tegra20.dtsi
index d6bc9f1..d5ca02c 100644
--- a/arch/arm/dts/tegra20.dtsi
+++ b/arch/arm/dts/tegra20.dtsi
@@ -34,6 +34,8 @@
 		compatible = "nvidia,tegra20-i2c";
 		reg = <0x7000C000 0x100>;
 		interrupts = < 70 >;
+		/* PERIPH_ID_I2C1, PLL_P_OUT3 */
+		clocks = <&tegra_car 12>, <&tegra_car 124>;
 	};
 
 	i2c@7000c400 {
@@ -42,6 +44,8 @@
 		compatible = "nvidia,tegra20-i2c";
 		reg = <0x7000C400 0x100>;
 		interrupts = < 116 >;
+		/* PERIPH_ID_I2C2, PLL_P_OUT3 */
+		clocks = <&tegra_car 54>, <&tegra_car 124>;
 	};
 
 	i2c@7000c500 {
@@ -50,14 +54,18 @@
 		compatible = "nvidia,tegra20-i2c";
 		reg = <0x7000C500 0x100>;
 		interrupts = < 124 >;
+		/* PERIPH_ID_I2C3, PLL_P_OUT3 */
+		clocks = <&tegra_car 67>, <&tegra_car 124>;
 	};
 
 	i2c@7000d000 {
 		#address-cells = <1>;
 		#size-cells = <0>;
-		compatible = "nvidia,tegra20-i2c";
+		compatible = "nvidia,tegra20-i2c-dvc";
 		reg = <0x7000D000 0x200>;
 		interrupts = < 85 >;
+		/* PERIPH_ID_DVC_I2C, PLL_P_OUT3 */
+		clocks = <&tegra_car 47>, <&tegra_car 124>;
 	};
 
 	i2s@70002800 {
diff --git a/doc/device-tree-bindings/i2c/tegra20-i2c.txt b/doc/device-tree-bindings/i2c/tegra20-i2c.txt
new file mode 100644
index 0000000..d601c17
--- /dev/null
+++ b/doc/device-tree-bindings/i2c/tegra20-i2c.txt
@@ -0,0 +1,23 @@
+(Placeholder note while we locate the kernel Tegra20 bindings)
+
+Added in U-Boot:
+
+Required properties:
+ - clocks : Two clocks must be given, each as a phandle to the Tegra's
+            CAR node and the clock number as a parameter:
+     - the I2C clock to use for the peripheral
+     - the pll_p_out3 clock, which can be used for fast operation. This
+          does not change and is the same for all I2C nodes.
+
+Example:
+(TODO: merge with existing example):
+
+	i2c@7000c400 {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		compatible = "nvidia,tegra20-i2c";
+		reg = <0x7000C400 0x100>;
+		interrupts = < 116 >;
+		/* PERIPH_ID_I2C2, PLL_P_OUT3 */
+		clocks = <&tegra_car 54>, <&tegra_car 124>;
+	};
-- 
1.7.7.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v5 4/9] tegra: fdt: i2c: Add extra I2C bindings for U-Boot
       [not found] ` <1331096428-6317-5-git-send-email-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
@ 2012-03-07 20:39   ` Stephen Warren
       [not found]     ` <4F57C76D.6040004-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Warren @ 2012-03-07 20:39 UTC (permalink / raw)
  To: Simon Glass
  Cc: U-Boot Mailing List, Tom Warren,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, Jerry Van Baren,
	Devicetree Discuss, Heiko Schocher

On 03/06/2012 10:00 PM, Simon Glass wrote:
> Add U-Boot's peripheral clock information to the Tegra20 device tree file.
> 
> Signed-off-by: Simon Glass <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
...
> diff --git a/doc/device-tree-bindings/i2c/tegra20-i2c.txt b/doc/device-tree-bindings/i2c/tegra20-i2c.txt
...
> +Required properties:
> + - clocks : Two clocks must be given, each as a phandle to the Tegra's
> +            CAR node and the clock number as a parameter:

I'd rather rely on the common clock binding documentation for the format
of the clock specifiers than duplicate the information here. True, that
document isn't in U-Boot (nor is it final). I.e.:

    Two clocks must be specified:

But I think this is fine for now (I might care more if submitting a doc
file for the kernel tree), so

Acked-by: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>

> +     - the I2C clock to use for the peripheral
> +     - the pll_p_out3 clock, which can be used for fast operation. This
> +          does not change and is the same for all I2C nodes.
> +
> +Example:
> +(TODO: merge with existing example):
> +
> +	i2c@7000c400 {
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +		compatible = "nvidia,tegra20-i2c";
> +		reg = <0x7000C400 0x100>;
> +		interrupts = < 116 >;
> +		/* PERIPH_ID_I2C2, PLL_P_OUT3 */
> +		clocks = <&tegra_car 54>, <&tegra_car 124>;
> +	};

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v5 4/9] tegra: fdt: i2c: Add extra I2C bindings for U-Boot
       [not found]     ` <4F57C76D.6040004-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
@ 2012-03-08  6:31       ` Simon Glass
  0 siblings, 0 replies; 3+ messages in thread
From: Simon Glass @ 2012-03-08  6:31 UTC (permalink / raw)
  To: Stephen Warren
  Cc: U-Boot Mailing List, Tom Warren,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, Jerry Van Baren,
	Devicetree Discuss, Heiko Schocher

Hi Stephen,

On Wed, Mar 7, 2012 at 12:39 PM, Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> wrote:
> On 03/06/2012 10:00 PM, Simon Glass wrote:
>> Add U-Boot's peripheral clock information to the Tegra20 device tree file.
>>
>> Signed-off-by: Simon Glass <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
> ...
>> diff --git a/doc/device-tree-bindings/i2c/tegra20-i2c.txt b/doc/device-tree-bindings/i2c/tegra20-i2c.txt
> ...
>> +Required properties:
>> + - clocks : Two clocks must be given, each as a phandle to the Tegra's
>> +            CAR node and the clock number as a parameter:
>
> I'd rather rely on the common clock binding documentation for the format
> of the clock specifiers than duplicate the information here. True, that
> document isn't in U-Boot (nor is it final). I.e.:
>
>    Two clocks must be specified:
>
> But I think this is fine for now (I might care more if submitting a doc
> file for the kernel tree), so
>
> Acked-by: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>

Thanks. Good to get this in.

Regards,
Simon
>
>> +     - the I2C clock to use for the peripheral
>> +     - the pll_p_out3 clock, which can be used for fast operation. This
>> +          does not change and is the same for all I2C nodes.
>> +
>> +Example:
>> +(TODO: merge with existing example):
>> +
>> +     i2c@7000c400 {
>> +             #address-cells = <1>;
>> +             #size-cells = <0>;
>> +             compatible = "nvidia,tegra20-i2c";
>> +             reg = <0x7000C400 0x100>;
>> +             interrupts = < 116 >;
>> +             /* PERIPH_ID_I2C2, PLL_P_OUT3 */
>> +             clocks = <&tegra_car 54>, <&tegra_car 124>;
>> +     };

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-03-08  6:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-07  5:00 [PATCH v5 4/9] tegra: fdt: i2c: Add extra I2C bindings for U-Boot Simon Glass
     [not found] ` <1331096428-6317-5-git-send-email-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2012-03-07 20:39   ` Stephen Warren
     [not found]     ` <4F57C76D.6040004-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-03-08  6:31       ` Simon Glass

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).