* [PATCH v4 4/9] tegra: fdt: i2c: Add extra I2C bindings for U-Boot
@ 2012-02-29 17:31 Simon Glass
[not found] ` <1330536689-9121-5-git-send-email-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Simon Glass @ 2012-02-29 17:31 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
arch/arm/dts/tegra20.dtsi | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/arch/arm/dts/tegra20.dtsi b/arch/arm/dts/tegra20.dtsi
index d6bc9f1..b6f37c2 100644
--- a/arch/arm/dts/tegra20.dtsi
+++ b/arch/arm/dts/tegra20.dtsi
@@ -34,6 +34,7 @@
compatible = "nvidia,tegra20-i2c";
reg = <0x7000C000 0x100>;
interrupts = < 70 >;
+ clocks = <&tegra_car 12>; /* PERIPH_ID_I2C1 */
};
i2c@7000c400 {
@@ -42,6 +43,7 @@
compatible = "nvidia,tegra20-i2c";
reg = <0x7000C400 0x100>;
interrupts = < 116 >;
+ clocks = <&tegra_car 54>; /* PERIPH_ID_I2C2 */
};
i2c@7000c500 {
@@ -50,14 +52,16 @@
compatible = "nvidia,tegra20-i2c";
reg = <0x7000C500 0x100>;
interrupts = < 124 >;
+ clocks = <&tegra_car 67>; /* PERIPH_ID_I2C3 */
};
i2c@7000d000 {
#address-cells = <1>;
#size-cells = <0>;
- compatible = "nvidia,tegra20-i2c";
+ compatible = "nvidia,tegra20-i2c-dvc";
reg = <0x7000D000 0x200>;
interrupts = < 85 >;
+ clocks = <&tegra_car 47>; /* PERIPH_ID_DVC_I2C */
};
i2s@70002800 {
--
1.7.7.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v4 4/9] tegra: fdt: i2c: Add extra I2C bindings for U-Boot
[not found] ` <1330536689-9121-5-git-send-email-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
@ 2012-02-29 20:21 ` Stephen Warren
[not found] ` <4F4E88BC.4070106-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Stephen Warren @ 2012-02-29 20:21 UTC (permalink / raw)
To: Simon Glass
Cc: U-Boot Mailing List, Tom Warren,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Jerry Van Baren, Devicetree Discuss, Heiko Schocher
On 02/29/2012 10:31 AM, Simon Glass wrote:
> Add U-Boot's peripheral clock information to the Tegra20 device tree file.
> diff --git a/arch/arm/dts/tegra20.dtsi b/arch/arm/dts/tegra20.dtsi
> compatible = "nvidia,tegra20-i2c";
> reg = <0x7000C000 0x100>;
> interrupts = < 70 >;
> + clocks = <&tegra_car 12>; /* PERIPH_ID_I2C1 */
> };
The I2C modules all require 2 clocks; the one you've added in this patch
and a second reference to pll_p_out3. Can you please list both of these
here, and update the I2C binding to describe the set of clocks that it
requires. Thanks.
--
nvpublic
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v4 4/9] tegra: fdt: i2c: Add extra I2C bindings for U-Boot
[not found] ` <4F4E88BC.4070106-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
@ 2012-02-29 20:32 ` Simon Glass
[not found] ` <CAPnjgZ3fVwwvt6Cxr5RU0Bw=UkZ7Rq7fswfRYxpHBvhwrXCn3g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Simon Glass @ 2012-02-29 20:32 UTC (permalink / raw)
To: Stephen Warren
Cc: U-Boot Mailing List, Tom Warren,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Jerry Van Baren, Devicetree Discuss, Heiko Schocher
Hi Stephen,
On Wed, Feb 29, 2012 at 12:21 PM, Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> wrote:
> On 02/29/2012 10:31 AM, Simon Glass wrote:
>> Add U-Boot's peripheral clock information to the Tegra20 device tree file.
>
>> diff --git a/arch/arm/dts/tegra20.dtsi b/arch/arm/dts/tegra20.dtsi
>
>> compatible = "nvidia,tegra20-i2c";
>> reg = <0x7000C000 0x100>;
>> interrupts = < 70 >;
>> + clocks = <&tegra_car 12>; /* PERIPH_ID_I2C1 */
>> };
>
> The I2C modules all require 2 clocks; the one you've added in this patch
> and a second reference to pll_p_out3. Can you please list both of these
> here, and update the I2C binding to describe the set of clocks that it
> requires. Thanks.
OK - do you have a pointer to the kernel commit please? I always seem
to have trouble tracking this stuff down.
Regards,
Simon
>
> --
> nvpublic
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v4 4/9] tegra: fdt: i2c: Add extra I2C bindings for U-Boot
[not found] ` <CAPnjgZ3fVwwvt6Cxr5RU0Bw=UkZ7Rq7fswfRYxpHBvhwrXCn3g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2012-02-29 20:36 ` Stephen Warren
[not found] ` <4F4E8C48.1020408-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Stephen Warren @ 2012-02-29 20:36 UTC (permalink / raw)
To: Simon Glass
Cc: U-Boot Mailing List, Tom Warren,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Jerry Van Baren, Devicetree Discuss, Heiko Schocher
On 02/29/2012 01:32 PM, Simon Glass wrote:
> Hi Stephen,
>
> On Wed, Feb 29, 2012 at 12:21 PM, Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> wrote:
>> On 02/29/2012 10:31 AM, Simon Glass wrote:
>>> Add U-Boot's peripheral clock information to the Tegra20 device tree file.
>>
>>> diff --git a/arch/arm/dts/tegra20.dtsi b/arch/arm/dts/tegra20.dtsi
>>
>>> compatible = "nvidia,tegra20-i2c";
>>> reg = <0x7000C000 0x100>;
>>> interrupts = < 70 >;
>>> + clocks = <&tegra_car 12>; /* PERIPH_ID_I2C1 */
>>> };
>>
>> The I2C modules all require 2 clocks; the one you've added in this patch
>> and a second reference to pll_p_out3. Can you please list both of these
>> here, and update the I2C binding to describe the set of clocks that it
>> requires. Thanks.
>
> OK - do you have a pointer to the kernel commit please? I always seem
> to have trouble tracking this stuff down.
The clock stuff isn't in the kernel yet, so there's no commit to point
to. The commit I asked you to create would update the bindings to define
which clocks the I2C node needs, and would then go into U-Boot and the
kernel.
As a reference though, look at the kernel I2C driver and see that it
performs two clk_get() calls, and then look into tegra2_clocks.c to see
the two clocks it matches.
--
nvpublic
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v4 4/9] tegra: fdt: i2c: Add extra I2C bindings for U-Boot
[not found] ` <4F4E8C48.1020408-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
@ 2012-03-07 4:22 ` Simon Glass
[not found] ` <CAPnjgZ0Xu-8cXWW=Z7mQd6UqNXT_RnRKAP-y3dvA4WtZtL1jKQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Simon Glass @ 2012-03-07 4:22 UTC (permalink / raw)
To: Stephen Warren
Cc: U-Boot Mailing List, Tom Warren,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Jerry Van Baren, Devicetree Discuss, Heiko Schocher
Hi Stephen,
On Wed, Feb 29, 2012 at 12:36 PM, Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> wrote:
> On 02/29/2012 01:32 PM, Simon Glass wrote:
>> Hi Stephen,
>>
>> On Wed, Feb 29, 2012 at 12:21 PM, Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> wrote:
>>> On 02/29/2012 10:31 AM, Simon Glass wrote:
>>>> Add U-Boot's peripheral clock information to the Tegra20 device tree file.
>>>
>>>> diff --git a/arch/arm/dts/tegra20.dtsi b/arch/arm/dts/tegra20.dtsi
>>>
>>>> compatible = "nvidia,tegra20-i2c";
>>>> reg = <0x7000C000 0x100>;
>>>> interrupts = < 70 >;
>>>> + clocks = <&tegra_car 12>; /* PERIPH_ID_I2C1 */
>>>> };
>>>
>>> The I2C modules all require 2 clocks; the one you've added in this patch
>>> and a second reference to pll_p_out3. Can you please list both of these
>>> here, and update the I2C binding to describe the set of clocks that it
>>> requires. Thanks.
>>
>> OK - do you have a pointer to the kernel commit please? I always seem
>> to have trouble tracking this stuff down.
>
> The clock stuff isn't in the kernel yet, so there's no commit to point
> to. The commit I asked you to create would update the bindings to define
> which clocks the I2C node needs, and would then go into U-Boot and the
> kernel.
Which binding should I update? I have had a look through Olof's trees at:
git://git.kernel.org/pub/scm/linux/kernel/git/olof/tegra.git
I would expect to find the Tegra i2c binding file in
Documentation/devicetree/bindings/i2c, but all I see is:
arm-versatile.txt fsl-i2c.txt i2c-designware.txt samsung-i2c.txt
ce4100-i2c.txt fsl-imx-i2c.txt omap-i2c.txt trivial-devices.txt
I have looked through the device tree mailing list, and I have
searched using my favourite search engine, but I honestly cannot find
anything. Are you sure that this has been done?
If it is not available anywhere, please can you email me the current
binding file that you want me to update and I will send out a patch
with the binding, and then a separate patch with the clock update.
>
> As a reference though, look at the kernel I2C driver and see that it
> performs two clk_get() calls, and then look into tegra2_clocks.c to see
> the two clocks it matches.
OK I think you want something like:
clocks = <&tegra_car 12>, <&tegra_car 124>; /* PERIPH_ID_I2C1,
PLL_P_OUT3 */
I will update this patch to do that, at least, while I wait for
information about the binding.
Regards,
Simon
>
> --
> nvpublic
> --
> To unsubscribe from this list: send the line "unsubscribe linux-tegra" 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 [flat|nested] 6+ messages in thread
* Re: [PATCH v4 4/9] tegra: fdt: i2c: Add extra I2C bindings for U-Boot
[not found] ` <CAPnjgZ0Xu-8cXWW=Z7mQd6UqNXT_RnRKAP-y3dvA4WtZtL1jKQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2012-03-07 20:35 ` Stephen Warren
0 siblings, 0 replies; 6+ messages in thread
From: Stephen Warren @ 2012-03-07 20:35 UTC (permalink / raw)
To: Simon Glass
Cc: U-Boot Mailing List, Tom Warren,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Jerry Van Baren, Devicetree Discuss, Heiko Schocher
On 03/06/2012 09:22 PM, Simon Glass wrote:
> Hi Stephen,
>
> On Wed, Feb 29, 2012 at 12:36 PM, Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> wrote:
>> On 02/29/2012 01:32 PM, Simon Glass wrote:
>>> Hi Stephen,
>>>
>>> On Wed, Feb 29, 2012 at 12:21 PM, Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> wrote:
>>>> On 02/29/2012 10:31 AM, Simon Glass wrote:
>>>>> Add U-Boot's peripheral clock information to the Tegra20 device tree file.
>>>>
>>>>> diff --git a/arch/arm/dts/tegra20.dtsi b/arch/arm/dts/tegra20.dtsi
>>>>
>>>>> compatible = "nvidia,tegra20-i2c";
>>>>> reg = <0x7000C000 0x100>;
>>>>> interrupts = < 70 >;
>>>>> + clocks = <&tegra_car 12>; /* PERIPH_ID_I2C1 */
>>>>> };
>>>>
>>>> The I2C modules all require 2 clocks; the one you've added in this patch
>>>> and a second reference to pll_p_out3. Can you please list both of these
>>>> here, and update the I2C binding to describe the set of clocks that it
>>>> requires. Thanks.
>>>
>>> OK - do you have a pointer to the kernel commit please? I always seem
>>> to have trouble tracking this stuff down.
>>
>> The clock stuff isn't in the kernel yet, so there's no commit to point
>> to. The commit I asked you to create would update the bindings to define
>> which clocks the I2C node needs, and would then go into U-Boot and the
>> kernel.
>
> Which binding should I update? I have had a look through Olof's trees at:
Oh, it looks like we don't have any binding documentation for the Tegra
I2C controller at all yet.
So, there's nothing in the kernel to update. Sorry about that. If you
want, you could submit a kernel patch to add such a binding, but since
there isn't one already I won't hold you to it. I see you added a rough
placeholder binding doc in the U-Boot tree in your updated U-Boot patch
which is probably fine for now if you want.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-03-07 20:35 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-29 17:31 [PATCH v4 4/9] tegra: fdt: i2c: Add extra I2C bindings for U-Boot Simon Glass
[not found] ` <1330536689-9121-5-git-send-email-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2012-02-29 20:21 ` Stephen Warren
[not found] ` <4F4E88BC.4070106-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-02-29 20:32 ` Simon Glass
[not found] ` <CAPnjgZ3fVwwvt6Cxr5RU0Bw=UkZ7Rq7fswfRYxpHBvhwrXCn3g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-02-29 20:36 ` Stephen Warren
[not found] ` <4F4E8C48.1020408-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-03-07 4:22 ` Simon Glass
[not found] ` <CAPnjgZ0Xu-8cXWW=Z7mQd6UqNXT_RnRKAP-y3dvA4WtZtL1jKQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-03-07 20:35 ` Stephen Warren
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).