diff mbox

[01/10] arm/tegra: initial device tree for tegra30

Message ID 1321546766-26770-2-git-send-email-pdeschrijver@nvidia.com
State Superseded, archived
Headers show

Commit Message

Peter De Schrijver Nov. 17, 2011, 4:19 p.m. UTC
This patch adds the initial device tree for tegra30

Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
---
 Documentation/devicetree/bindings/arm/tegra.txt |   18 +++
 arch/arm/boot/dts/tegra30.dtsi                  |  128 +++++++++++++++++++++++
 2 files changed, 146 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/arm/tegra.txt
 create mode 100644 arch/arm/boot/dts/tegra30.dtsi

Comments

Stephen Warren Nov. 17, 2011, 7:39 p.m. UTC | #1
Peter De Schrijver wrote at Thursday, November 17, 2011 9:19 AM:
> This patch adds the initial device tree for tegra30

> diff --git a/Documentation/devicetree/bindings/arm/tegra.txt
...
> +* harmony: tegra20 based development board
> +Required root node properties:
> + - compatible = "nvidia,harmony", "nvidia,tegra20";
> +
> +* seaboard: tegra20 based clamshell reference design
> +Required root node properties:
> + - compatible = "nvidia,seaboard", "nvidia,tegra20";

Do we really want to list all the board names here? In the future, there
could be tens or hundreds. I would argue that we should just document
nvidia,tegra20 and nvidia,tegra30.

At a later point, we should fix board-dt.c to solely look for those
compatible values, although this will have to wait until the pinmux DT
bindings are present. Then, the kernel won't care about the board names.
Olof Johansson Nov. 18, 2011, 6:49 p.m. UTC | #2
On Thu, Nov 17, 2011 at 11:39:14AM -0800, Stephen Warren wrote:
> Peter De Schrijver wrote at Thursday, November 17, 2011 9:19 AM:
> > This patch adds the initial device tree for tegra30
> 
> > diff --git a/Documentation/devicetree/bindings/arm/tegra.txt
> ...
> > +* harmony: tegra20 based development board
> > +Required root node properties:
> > + - compatible = "nvidia,harmony", "nvidia,tegra20";
> > +
> > +* seaboard: tegra20 based clamshell reference design
> > +Required root node properties:
> > + - compatible = "nvidia,seaboard", "nvidia,tegra20";
> 
> Do we really want to list all the board names here? In the future, there
> could be tens or hundreds. I would argue that we should just document
> nvidia,tegra20 and nvidia,tegra30.

Agreed.

> At a later point, we should fix board-dt.c to solely look for those
> compatible values, although this will have to wait until the pinmux DT
> bindings are present. Then, the kernel won't care about the board names.

Exactly.


-Olof
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Rob Herring Nov. 18, 2011, 7:30 p.m. UTC | #3
On 11/18/2011 12:49 PM, Olof Johansson wrote:
> On Thu, Nov 17, 2011 at 11:39:14AM -0800, Stephen Warren wrote:
>> Peter De Schrijver wrote at Thursday, November 17, 2011 9:19 AM:
>>> This patch adds the initial device tree for tegra30
>>
>>> diff --git a/Documentation/devicetree/bindings/arm/tegra.txt
>> ...
>>> +* harmony: tegra20 based development board
>>> +Required root node properties:
>>> + - compatible = "nvidia,harmony", "nvidia,tegra20";
>>> +
>>> +* seaboard: tegra20 based clamshell reference design
>>> +Required root node properties:
>>> + - compatible = "nvidia,seaboard", "nvidia,tegra20";
>>
>> Do we really want to list all the board names here? In the future, there
>> could be tens or hundreds. I would argue that we should just document
>> nvidia,tegra20 and nvidia,tegra30.
> 
> Agreed.

It's not really any different than mach-types which does have every
board in it.

I think if a board requires a new dts, then it needs a unique name.

> 
>> At a later point, we should fix board-dt.c to solely look for those
>> compatible values, although this will have to wait until the pinmux DT
>> bindings are present. Then, the kernel won't care about the board names.
> 
> Exactly.

That is perfectly acceptable, but you should still have the option to do
something specific for any given board.

Rob
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Olof Johansson Nov. 18, 2011, 9:48 p.m. UTC | #4
On Fri, Nov 18, 2011 at 11:30 AM, Rob Herring <robherring2@gmail.com> wrote:
> On 11/18/2011 12:49 PM, Olof Johansson wrote:
>> On Thu, Nov 17, 2011 at 11:39:14AM -0800, Stephen Warren wrote:
>>> Peter De Schrijver wrote at Thursday, November 17, 2011 9:19 AM:
>>>> This patch adds the initial device tree for tegra30
>>>
>>>> diff --git a/Documentation/devicetree/bindings/arm/tegra.txt
>>> ...
>>>> +* harmony: tegra20 based development board
>>>> +Required root node properties:
>>>> + - compatible = "nvidia,harmony", "nvidia,tegra20";
>>>> +
>>>> +* seaboard: tegra20 based clamshell reference design
>>>> +Required root node properties:
>>>> + - compatible = "nvidia,seaboard", "nvidia,tegra20";
>>>
>>> Do we really want to list all the board names here? In the future, there
>>> could be tens or hundreds. I would argue that we should just document
>>> nvidia,tegra20 and nvidia,tegra30.
>>
>> Agreed.
>
> It's not really any different than mach-types which does have every
> board in it.

Yeah, and the whole idea of having device trees is to not have to do
code changes when introducing a new derivative board. So enumerating
all supported boards in the documentation means we're back to an
equivalence to having to add machine ids.

> I think if a board requires a new dts, then it needs a unique name.

Sure, that's fine. But the idea is to be able to do it without
changing code for many cases, just provide a new dts that configures
the devices in question.

>>> At a later point, we should fix board-dt.c to solely look for those
>>> compatible values, although this will have to wait until the pinmux DT
>>> bindings are present. Then, the kernel won't care about the board names.
>>
>> Exactly.
>
> That is perfectly acceptable, but you should still have the option to do
> something specific for any given board.

Of course. That's not what we're objecting to here.


-Olof
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Rob Herring Nov. 18, 2011, 10:03 p.m. UTC | #5
On 11/18/2011 03:48 PM, Olof Johansson wrote:
> On Fri, Nov 18, 2011 at 11:30 AM, Rob Herring <robherring2@gmail.com> wrote:
>> On 11/18/2011 12:49 PM, Olof Johansson wrote:
>>> On Thu, Nov 17, 2011 at 11:39:14AM -0800, Stephen Warren wrote:
>>>> Peter De Schrijver wrote at Thursday, November 17, 2011 9:19 AM:
>>>>> This patch adds the initial device tree for tegra30
>>>>
>>>>> diff --git a/Documentation/devicetree/bindings/arm/tegra.txt
>>>> ...
>>>>> +* harmony: tegra20 based development board
>>>>> +Required root node properties:
>>>>> + - compatible = "nvidia,harmony", "nvidia,tegra20";
>>>>> +
>>>>> +* seaboard: tegra20 based clamshell reference design
>>>>> +Required root node properties:
>>>>> + - compatible = "nvidia,seaboard", "nvidia,tegra20";
>>>>
>>>> Do we really want to list all the board names here? In the future, there
>>>> could be tens or hundreds. I would argue that we should just document
>>>> nvidia,tegra20 and nvidia,tegra30.
>>>
>>> Agreed.
>>
>> It's not really any different than mach-types which does have every
>> board in it.
> 
> Yeah, and the whole idea of having device trees is to not have to do
> code changes when introducing a new derivative board. So enumerating
> all supported boards in the documentation means we're back to an
> equivalence to having to add machine ids.
> 
>> I think if a board requires a new dts, then it needs a unique name.
> 
> Sure, that's fine. But the idea is to be able to do it without
> changing code for many cases, just provide a new dts that configures
> the devices in question.

You can always claim backwards compatibility with any prior board that's
already supported. You may never need to do any more than that. You
don't want new kernels to require a new DTB if in fact you do have to
make code changes.

Rob

>>>> At a later point, we should fix board-dt.c to solely look for those
>>>> compatible values, although this will have to wait until the pinmux DT
>>>> bindings are present. Then, the kernel won't care about the board names.
>>>
>>> Exactly.
>>
>> That is perfectly acceptable, but you should still have the option to do
>> something specific for any given board.
> 
> Of course. That's not what we're objecting to here.
> 
> 
> -Olof

--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/arm/tegra.txt b/Documentation/devicetree/bindings/arm/tegra.txt
new file mode 100644
index 0000000..0e696d2
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/tegra.txt
@@ -0,0 +1,18 @@ 
+NVIDIA Tegra platforms device tree bindings
+-------------------------------------------
+
+* harmony: tegra20 based development board
+Required root node properties:
+ - compatible = "nvidia,harmony", "nvidia,tegra20";
+
+* seaboard: tegra20 based clamshell reference design
+Required root node properties:
+ - compatible = "nvidia,seaboard", "nvidia,tegra20";
+
+* ventana: tegra20 based tablet reference design
+Required root node properties:
+ - compatible = "nvidia,ventana", "nvidia,tegra20";
+
+* cardhu: tegra30 based tablet reference design
+Required root node properties:
+ - compatible = "nvidia,cardhu", "nvidia,tegra30";
diff --git a/arch/arm/boot/dts/tegra30.dtsi b/arch/arm/boot/dts/tegra30.dtsi
new file mode 100644
index 0000000..85efb0c
--- /dev/null
+++ b/arch/arm/boot/dts/tegra30.dtsi
@@ -0,0 +1,128 @@ 
+/include/ "skeleton.dtsi"
+
+/ {
+	compatible = "nvidia,tegra30";
+	interrupt-parent = <&intc>;
+
+	intc: interrupt-controller@50041000 {
+		compatible = "arm,cortex-a9-gic";
+		interrupt-controller;
+		interrupt-parent;
+		#interrupt-cells = <3>;
+		reg = < 0x50041000 0x1000 >,
+		      < 0x50040100 0x0100 >;
+	};
+
+	i2c@7000c000 {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		compatible =  "nvidia,tegra30-i2c", "nvidia,tegra20-i2c";
+		reg = <0x7000C000 0x100>;
+		interrupts = < 0 38 0x04 >;
+	};
+
+	i2c@7000c400 {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		compatible = "nvidia,tegra30-i2c", "nvidia,tegra20-i2c";
+		reg = <0x7000C400 0x100>;
+		interrupts = < 0 84 0x04 >;
+	};
+
+	i2c@7000c500 {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		compatible = "nvidia,tegra30-i2c", "nvidia,tegra20-i2c";
+		reg = <0x7000C500 0x100>;
+		interrupts = < 0 92 0x04 >;
+	};
+
+	i2c@7000c700 {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		compatible = "nvidia,tegra30-i2c", "nvidia,tegra20-i2c";
+		reg = <0x7000c700 0x100>;
+		interrupts = < 0 120 0x04 >;
+	};
+
+	i2c@7000d000 {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		compatible = "nvidia,tegra30-i2c", "nvidia,tegra20-i2c";
+		reg = <0x7000D000 0x100>;
+		interrupts = < 0 53 0x04 >;
+	};
+
+	gpio: gpio@6000d000 {
+		compatible = "nvidia,tegra30-gpio", "nvidia,tegra20-gpio";
+		reg = < 0x6000d000 0x1000 >;
+		interrupts = < 0 32 0x04 0 33 0x04 0 34 0x04 0 35 0x04 0 55 0x04 0 87 0x04 0 89 0x04 >;
+		#gpio-cells = <2>;
+		gpio-controller;
+	};
+
+	serial@70006000 {
+		compatible = "nvidia,tegra30-uart", "nvidia,tegra20-uart";
+		reg = <0x70006000 0x40>;
+		reg-shift = <2>;
+		interrupts = < 0 36 0x04 >;
+	};
+
+	serial@70006040 {
+		compatible = "nvidia,tegra30-uart", "nvidia,tegra20-uart";
+		reg = <0x70006040 0x40>;
+		reg-shift = <2>;
+		interrupts = < 0 37 0x04 >;
+	};
+
+	serial@70006200 {
+		compatible = "nvidia,tegra30-uart", "nvidia,tegra20-uart";
+		reg = <0x70006200 0x100>;
+		reg-shift = <2>;
+		interrupts = < 0 46 0x04 >;
+	};
+
+	serial@70006300 {
+		compatible = "nvidia,tegra30-uart", "nvidia,tegra20-uart";
+		reg = <0x70006300 0x100>;
+		reg-shift = <2>;
+		interrupts = < 0 90 0x04 >;
+	};
+
+	serial@70006400 {
+		compatible = "nvidia,tegra30-uart", "nvidia,tegra20-uart";
+		reg = <0x70006400 0x100>;
+		reg-shift = <2>;
+		interrupts = < 0 91 0x04 >;
+	};
+
+	sdhci@78000000 {
+		compatible = "nvidia,tegra30-sdhci", "nvidia,tegra20-sdhci";
+		reg = <0x78000000 0x200>;
+		interrupts = < 0 14 0x04 >;
+	};
+
+	sdhci@78000200 {
+		compatible = "nvidia,tegra30-sdhci", "nvidia,tegra20-sdhci";
+		reg = <0x78000200 0x200>;
+		interrupts = < 0 15 0x04 >;
+	};
+
+	sdhci@78000400 {
+		compatible = "nvidia,tegra30-sdhci", "nvidia,tegra20-sdhci";
+		reg = <0x78000400 0x200>;
+		interrupts = < 0 19 0x04 >;
+	};
+
+	sdhci@78000600 {
+		compatible = "nvidia,tegra30-sdhci", "nvidia,tegra20-sdhci";
+		reg = <0x78000600 0x200>;
+		interrupts = < 0 31 0x04 >;
+	};
+
+	pinmux: pinmux@70000000 {
+		compatible = "nvidia,tegra30-pinmux";
+		reg = < 0x70000868 0xd0     /* Pad control registers */
+			0x70003000 0x3e0 >; /* Mux registers */
+	};
+};