public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/3] Tegra30: fdt: Update DT files with I2C info for T30/Cardhu
Date: Wed, 02 Jan 2013 13:41:21 -0700	[thread overview]
Message-ID: <50E49B71.6050700@wwwdotorg.org> (raw)
In-Reply-To: <1356135399-28339-3-git-send-email-twarren@nvidia.com>

On 12/21/2012 05:16 PM, Tom Warren wrote:
> Note that T30 does not have a separate/different DVC (power I2C)
> controller like T20 - all 5 I2C controllers are identical, but
> DVC_I2C is still used to designate the controller intended for
> power control (PWR_I2C in the schematics). On Cardhu, it's used
> to access the PMU and EEPROM, as well as the audio codec, temp
> sensor, and fuel gauge devices from the OS.

> diff --git a/arch/arm/dts/tegra30.dtsi b/arch/arm/dts/tegra30.dtsi

> +	tegra_car: clock at 60006000 {
> +		compatible = "nvidia,tegra30-car", "nvidia,tegra20-car";
> +		reg = <0x60006000 0x1000>;
> +		#clock-cells = <1>;
> +	};
> +
> +	clocks {

It'd be nice to keep the DT nodes sorted in the same order they are in
the kernel. There, the rules are that nodes appears in order:

1) Any nodes from /include/d files, in the order they appeared in the
underlying file.

2) Any nodes with a reg property, in order of the address in the reg
property.

3) Any nodes without a reg property, in alphabetical order by node name.

This will allow the U-Boot and kernel DT files to be more easily
compared/diff'd.

The clocks and osc node would usually be part of the board file, not the
SoC file, I believe...

Actually, the clocks "osc" and (later) "clk_32k" don't appear to be used
anywhere; can we just drop their nodes until if/when they are?

> +	i2c at 7000c000 {
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +		compatible = "nvidia,tegra30-i2c", "nvidia,tegra20-i2c";
> +		reg = <0x7000C000 0x100>;
> +		/* PERIPH_ID_I2C1, CLK_M */
> +		clocks = <&tegra_car 12>;
> +	};

I think we should use lower-case for all hex constants in the DT. Also,
can the properties appear in the same order as in the kernel DT files so
they're easier to compare/diff.

Also, the SoC .dtsi file should have status="disabled" for all the
optionally-used HW modules, and the board files set status="okay" for
those that the board actually uses.

  reply	other threads:[~2013-01-02 20:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-22  0:16 [U-Boot] [PATCH 0/3] Add I2C driver for Tegra30 Cardhu Tom Warren
2012-12-22  0:16 ` [U-Boot] [PATCH 1/3] Tegra30: clocks: Fix clock tables for I2C and other periphs Tom Warren
2013-01-02 20:35   ` Stephen Warren
2013-01-02 20:54     ` Tom Warren
2012-12-22  0:16 ` [U-Boot] [PATCH 2/3] Tegra30: fdt: Update DT files with I2C info for T30/Cardhu Tom Warren
2013-01-02 20:41   ` Stephen Warren [this message]
2013-01-02 20:58     ` Tom Warren
2013-01-02 21:10       ` Stephen Warren
2012-12-22  0:16 ` [U-Boot] [PATCH 3/3] Tegra30: I2C: Enable I2C driver on Cardhu Tom Warren
2013-01-02 20:42   ` Stephen Warren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50E49B71.6050700@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox