[U-Boot] [PATCH 1/2] Tegra114: fdt: Update DT files with I2C info for T114/Dalmore

Tom Warren twarren.nvidia at gmail.com
Tue Jan 29 21:40:19 CET 2013


Stephen,

On Tue, Jan 29, 2013 at 1:09 PM, Stephen Warren <swarren at wwwdotorg.org> wrote:
> On 01/29/2013 12:19 PM, Tom Warren wrote:
>> Note that T114 does not have a separate/different DVC (power I2C)
>> controller like T20 - all 5 I2C controllers are identical, but
>> I2C5 is used to designate the controller intended for power
>> control (PWR_I2C in the schematics).
>>
>> Signed-off-by: Tom Warren <twarren at nvidia.com>
>> ---
>>  arch/arm/dts/tegra114.dtsi            |   93 +++++++++++++++++++++++++++++++++
>>  board/nvidia/dts/tegra114-dalmore.dts |   33 ++++++++++++
>>  2 files changed, 126 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/dts/tegra114.dtsi b/arch/arm/dts/tegra114.dtsi
>> index d06cd12..76fc83b 100644
>> --- a/arch/arm/dts/tegra114.dtsi
>> +++ b/arch/arm/dts/tegra114.dtsi
>> @@ -2,4 +2,97 @@
>>
>>  / {
>>       compatible = "nvidia,tegra114";
>> +
>> +     tegra_car: clock at 60006000 {
>> +             compatible = "nvidia,tegra114-car", "nvidia,tegra20-car";
>
> I don't believe the Tegra114 CAR is backwards-compatible enough with
> Tegra20 to include the Tegra20 entry in compatible. In other words, just:
>
>         compatible = "nvidia,tegra114-car";

Will do.

>
>> +             reg = <0x60006000 0x1000>;
>> +             #clock-cells = <1>;
>> +     };
>
>> +     apbdma: dma {
>> +             compatible = "nvidia,tegra114-apbdma", "nvidia,tegra20-apbdma";
>
> Same here; it isn't fully backwards-compatible according to Laxman's
> kernel patches.

OK.

>
> I don't think you need the APB DMA node for I2C though; perhaps just
> drop it.

It exists in T20 and T30 (via Allen's apdma patch), so I brought it
forward. I can drop it if you feel strongly enough about it. Whoever
needs it (SPI?) will have to add it later.

>
> If you do keep this node, it needs the clocks property filled in.
>
>> +     i2c at 7000c000 {
>> +             compatible = "nvidia,tegra114-i2c", "nvidia,tegra20-i2c";
>
> The I2C nodes also aren't backwards-compatible.

They were on T30 (same compatible string there, except of course
s/114/30/). And the tegra20-i2c is needed for fdtdec.c to find it
(compat_names table).

>
>> +             reg = <0x7000c000 0x100>;
>
> The interrupts property is missing here.

I didn't have an interrupts property for I2C on the T30 dts files,
either. What is it used for in U-Boot? If it's really needed, can I
just crib it from the kernel dts file(s)?

>
>> diff --git a/board/nvidia/dts/tegra114-dalmore.dts b/board/nvidia/dts/tegra114-dalmore.dts
>
> Board changes would usually be a separate patch to an SoC change, but I
> guess not a big deal.

Actually, this is the way I've always done DT files (in a separate
patch), and then the config files in a separate patch the enable the
feature.

>
> All 5 I2C ports are used on the board and only support 100KHz? That
> seems unusual, but I suppose it's possible.

That's the way I have it on T30, and looking at
arch/arm/boot/dts/tegra30.dtsi in the kernel, all 5 ports are set to
100KHz.

Tom


More information about the U-Boot mailing list