Patchwork [U-Boot,5/7] Tegra30: Cardhu: Add DT files

login
register
mail settings
Submitter Tom Warren
Date Oct. 2, 2012, 10:45 p.m.
Message ID <1349217955-8729-6-git-send-email-twarren@nvidia.com>
Download mbox | patch
Permalink /patch/188677/
State Superseded
Delegated to: Tom Warren
Headers show

Comments

Tom Warren - Oct. 2, 2012, 10:45 p.m.
These are stripped down for bringup, They'll be filled out later
to match-up with the kernel DT contents, and/or as devices are
brought up (mmc, usb, spi, etc.).

Signed-off-by: Tom Warren <twarren@nvidia.com>
---
 arch/arm/dts/tegra30.dtsi           |   30 ++++++++++++++++++++++++++++++
 board/nvidia/dts/tegra30-cardhu.dts |   35 +++++++++++++++++++++++++++++++++++
 2 files changed, 65 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/dts/tegra30.dtsi
 create mode 100644 board/nvidia/dts/tegra30-cardhu.dts
Lucas Stach - Oct. 3, 2012, 12:07 a.m.
Am Dienstag, den 02.10.2012, 15:45 -0700 schrieb Tom Warren:
> These are stripped down for bringup, They'll be filled out later
> to match-up with the kernel DT contents, and/or as devices are
> brought up (mmc, usb, spi, etc.).
> 
> Signed-off-by: Tom Warren <twarren@nvidia.com>
> ---
>  arch/arm/dts/tegra30.dtsi           |   30 ++++++++++++++++++++++++++++++
>  board/nvidia/dts/tegra30-cardhu.dts |   35 +++++++++++++++++++++++++++++++++++
>  2 files changed, 65 insertions(+), 0 deletions(-)
>  create mode 100644 arch/arm/dts/tegra30.dtsi
>  create mode 100644 board/nvidia/dts/tegra30-cardhu.dts
> 
> diff --git a/arch/arm/dts/tegra30.dtsi b/arch/arm/dts/tegra30.dtsi
> new file mode 100644
> index 0000000..122c134
> --- /dev/null
> +++ b/arch/arm/dts/tegra30.dtsi
> @@ -0,0 +1,30 @@
> +/include/ "skeleton.dtsi"
> +
> +/ {
> +	model = "NVIDIA Tegra30";
> +	compatible = "nvidia,tegra30";
> +
> +	clocks {
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		osc: clock {
> +			compatible = "fixed-clock";
> +			#clock-cells = <0>;
> +		};
> +	};
> +
> +	gpio: gpio@6000d000 {
> +		compatible = "nvidia,tegra30-gpio", "nvidia,tegra20-gpio";
> +		reg = <0x6000d000 0x1000>;
> +		#gpio-cells = <2>;
> +		gpio-controller;
> +	};
> +
> +	serial@70006000 {
> +		compatible = "nvidia,tegra30-uart", "nvidia,tegra20-uart";
> +		reg = <0x70006000 0x40>;
> +		reg-shift = <2>;
> +		status = "disabled";
> +	};
> +};
> diff --git a/board/nvidia/dts/tegra30-cardhu.dts b/board/nvidia/dts/tegra30-cardhu.dts
> new file mode 100644
> index 0000000..68563e8
> --- /dev/null
> +++ b/board/nvidia/dts/tegra30-cardhu.dts
> @@ -0,0 +1,35 @@
> +/dts-v1/;
> +
> +/memreserve/ 0x1c000000 0x04000000;
> +/include/ ARCH_CPU_DTS
> +
> +/ {
> +	model = "NVIDIA Cardhu";
> +	compatible = "nvidia,cardhu", "nvidia,tegra30";
> +
> +	aliases {
> +	};
> +
> +        memory {
> +                device_type = "memory";
> +                reg = <0x80000000 0xc0000000>;
> +        };
> +
> +	clocks {
> +		clk_32k: clk_32k {
> +			clock_frequency = <32000>;
> +		};
> +		osc {
> +			clock-frequency = <12000000>;
> +		};
> +	};
> +
> +	clock@60006000 {
> +		clocks = <&clk_32k &osc>;
> +	};
Is this clock thing really needed? I don't think we are doing anything
with those DT entries.

> +
> +	serial@70006000 {
> +		status = "ok";
> +		clock-frequency = < 216000000 >;
> +	};
> +};
Tom Warren - Oct. 3, 2012, 4:05 p.m.
Lucas,

On Tue, Oct 2, 2012 at 5:07 PM, Lucas Stach <dev@lynxeye.de> wrote:
> Am Dienstag, den 02.10.2012, 15:45 -0700 schrieb Tom Warren:
>> These are stripped down for bringup, They'll be filled out later
>> to match-up with the kernel DT contents, and/or as devices are
>> brought up (mmc, usb, spi, etc.).
>>
>> Signed-off-by: Tom Warren <twarren@nvidia.com>
>> ---
>>  arch/arm/dts/tegra30.dtsi           |   30 ++++++++++++++++++++++++++++++
>>  board/nvidia/dts/tegra30-cardhu.dts |   35 +++++++++++++++++++++++++++++++++++
>>  2 files changed, 65 insertions(+), 0 deletions(-)
>>  create mode 100644 arch/arm/dts/tegra30.dtsi
>>  create mode 100644 board/nvidia/dts/tegra30-cardhu.dts
>>
>> diff --git a/arch/arm/dts/tegra30.dtsi b/arch/arm/dts/tegra30.dtsi
>> new file mode 100644
>> index 0000000..122c134
>> --- /dev/null
>> +++ b/arch/arm/dts/tegra30.dtsi
>> @@ -0,0 +1,30 @@
>> +/include/ "skeleton.dtsi"
>> +
>> +/ {
>> +     model = "NVIDIA Tegra30";
>> +     compatible = "nvidia,tegra30";
>> +
>> +     clocks {
>> +             #address-cells = <1>;
>> +             #size-cells = <0>;
>> +
>> +             osc: clock {
>> +                     compatible = "fixed-clock";
>> +                     #clock-cells = <0>;
>> +             };
>> +     };
>> +
>> +     gpio: gpio@6000d000 {
>> +             compatible = "nvidia,tegra30-gpio", "nvidia,tegra20-gpio";
>> +             reg = <0x6000d000 0x1000>;
>> +             #gpio-cells = <2>;
>> +             gpio-controller;
>> +     };
>> +
>> +     serial@70006000 {
>> +             compatible = "nvidia,tegra30-uart", "nvidia,tegra20-uart";
>> +             reg = <0x70006000 0x40>;
>> +             reg-shift = <2>;
>> +             status = "disabled";
>> +     };
>> +};
>> diff --git a/board/nvidia/dts/tegra30-cardhu.dts b/board/nvidia/dts/tegra30-cardhu.dts
>> new file mode 100644
>> index 0000000..68563e8
>> --- /dev/null
>> +++ b/board/nvidia/dts/tegra30-cardhu.dts
>> @@ -0,0 +1,35 @@
>> +/dts-v1/;
>> +
>> +/memreserve/ 0x1c000000 0x04000000;
>> +/include/ ARCH_CPU_DTS
>> +
>> +/ {
>> +     model = "NVIDIA Cardhu";
>> +     compatible = "nvidia,cardhu", "nvidia,tegra30";
>> +
>> +     aliases {
>> +     };
>> +
>> +        memory {
>> +                device_type = "memory";
>> +                reg = <0x80000000 0xc0000000>;
>> +        };
>> +
>> +     clocks {
>> +             clk_32k: clk_32k {
>> +                     clock_frequency = <32000>;
>> +             };
>> +             osc {
>> +                     clock-frequency = <12000000>;
>> +             };
>> +     };
>> +
>> +     clock@60006000 {
>> +             clocks = <&clk_32k &osc>;
>> +     };
> Is this clock thing really needed? I don't think we are doing anything
> with those DT entries.

During bringup, I tried stripping down our internal DT files for
Cardhu to the absolute minimum that'd still boot.
AFAIR, clock entries were essential. Regardless, as periphs/drivers
are brought up in future days, this'll all begin to grow.

Tom

>
>> +
>> +     serial@70006000 {
>> +             status = "ok";
>> +             clock-frequency = < 216000000 >;
>> +     };
>> +};
>
>
Stephen Warren - Oct. 3, 2012, 8:36 p.m.
On 10/02/2012 04:45 PM, Tom Warren wrote:
> These are stripped down for bringup, They'll be filled out later
> to match-up with the kernel DT contents, and/or as devices are
> brought up (mmc, usb, spi, etc.).

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

> +/include/ "skeleton.dtsi"
> +
> +/ {
> +	model = "NVIDIA Tegra30";
> +	compatible = "nvidia,tegra30";
> +
> +	clocks {
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		osc: clock {
> +			compatible = "fixed-clock";
> +			#clock-cells = <0>;
> +		};
> +	};

Nothing uses any of the clock stuff; I don't think we should add this
until it's needed.

> +	gpio: gpio@6000d000 {
> +		compatible = "nvidia,tegra30-gpio", "nvidia,tegra20-gpio";
> +		reg = <0x6000d000 0x1000>;
> +		#gpio-cells = <2>;
> +		gpio-controller;
> +	};

Similarly, nothing uses this.

> +	serial@70006000 {
> +		compatible = "nvidia,tegra30-uart", "nvidia,tegra20-uart";
> +		reg = <0x70006000 0x40>;
> +		reg-shift = <2>;

This needs the following extra line here:

                interrupts = <0 36 0x04>;

> +		status = "disabled";
> +	};

Although again, nothing uses this, so may as well omit it.

> diff --git a/board/nvidia/dts/tegra30-cardhu.dts b/board/nvidia/dts/tegra30-cardhu.dts
> new file mode 100644
> index 0000000..68563e8
> --- /dev/null
> +++ b/board/nvidia/dts/tegra30-cardhu.dts
> @@ -0,0 +1,35 @@
> +/dts-v1/;
> +
> +/memreserve/ 0x1c000000 0x04000000;
> +/include/ ARCH_CPU_DTS
> +
> +/ {
> +	model = "NVIDIA Cardhu";
> +	compatible = "nvidia,cardhu", "nvidia,tegra30";
> +
> +	aliases {
> +	};

May as well leave that out until it's needed.

> +        memory {
> +                device_type = "memory";
> +                reg = <0x80000000 0xc0000000>;
> +        };

There's an indentation error there.

> +
> +	clocks {
> +		clk_32k: clk_32k {
> +			clock_frequency = <32000>;
> +		};
> +		osc {
> +			clock-frequency = <12000000>;
> +		};
> +	};
> +
> +	clock@60006000 {
> +		clocks = <&clk_32k &osc>;
> +	};
> +
> +	serial@70006000 {
> +		status = "ok";
> +		clock-frequency = < 216000000 >;
> +	};
> +};

Similarly, I don't think anything uses any of that.
Tom Warren - Oct. 3, 2012, 9:49 p.m.
Stephen,

On Wed, Oct 3, 2012 at 1:36 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
> On 10/02/2012 04:45 PM, Tom Warren wrote:
>> These are stripped down for bringup, They'll be filled out later
>> to match-up with the kernel DT contents, and/or as devices are
>> brought up (mmc, usb, spi, etc.).
>
>> diff --git a/arch/arm/dts/tegra30.dtsi b/arch/arm/dts/tegra30.dtsi
>
>> +/include/ "skeleton.dtsi"
>> +
>> +/ {
>> +     model = "NVIDIA Tegra30";
>> +     compatible = "nvidia,tegra30";
>> +
>> +     clocks {
>> +             #address-cells = <1>;
>> +             #size-cells = <0>;
>> +
>> +             osc: clock {
>> +                     compatible = "fixed-clock";
>> +                     #clock-cells = <0>;
>> +             };
>> +     };
>
> Nothing uses any of the clock stuff; I don't think we should add this
> until it's needed.
>
>> +     gpio: gpio@6000d000 {
>> +             compatible = "nvidia,tegra30-gpio", "nvidia,tegra20-gpio";
>> +             reg = <0x6000d000 0x1000>;
>> +             #gpio-cells = <2>;
>> +             gpio-controller;
>> +     };
>
> Similarly, nothing uses this.
>
>> +     serial@70006000 {
>> +             compatible = "nvidia,tegra30-uart", "nvidia,tegra20-uart";
>> +             reg = <0x70006000 0x40>;
>> +             reg-shift = <2>;
>
> This needs the following extra line here:
>
>                 interrupts = <0 36 0x04>;
>
>> +             status = "disabled";
>> +     };
>
> Although again, nothing uses this, so may as well omit it.
>
>> diff --git a/board/nvidia/dts/tegra30-cardhu.dts b/board/nvidia/dts/tegra30-cardhu.dts
>> new file mode 100644
>> index 0000000..68563e8
>> --- /dev/null
>> +++ b/board/nvidia/dts/tegra30-cardhu.dts
>> @@ -0,0 +1,35 @@
>> +/dts-v1/;
>> +
>> +/memreserve/ 0x1c000000 0x04000000;
>> +/include/ ARCH_CPU_DTS
>> +
>> +/ {
>> +     model = "NVIDIA Cardhu";
>> +     compatible = "nvidia,cardhu", "nvidia,tegra30";
>> +
>> +     aliases {
>> +     };
>
> May as well leave that out until it's needed.
>
>> +        memory {
>> +                device_type = "memory";
>> +                reg = <0x80000000 0xc0000000>;
>> +        };
>
> There's an indentation error there.
>
>> +
>> +     clocks {
>> +             clk_32k: clk_32k {
>> +                     clock_frequency = <32000>;
>> +             };
>> +             osc {
>> +                     clock-frequency = <12000000>;
>> +             };
>> +     };
>> +
>> +     clock@60006000 {
>> +             clocks = <&clk_32k &osc>;
>> +     };
>> +
>> +     serial@70006000 {
>> +             status = "ok";
>> +             clock-frequency = < 216000000 >;
>> +     };
>> +};
>
> Similarly, I don't think anything uses any of that.
>

I stripped these both down to bare minimums as per your review, and I
can still build/boot on Cardhu. When I tried to remove some of these
entries earlier (clock, etc.) I guess I wasn't editing _both_ files at
the same time, so it would build or would hang.

Next rev will have truly minimal DT files. Thanks.

Patch

diff --git a/arch/arm/dts/tegra30.dtsi b/arch/arm/dts/tegra30.dtsi
new file mode 100644
index 0000000..122c134
--- /dev/null
+++ b/arch/arm/dts/tegra30.dtsi
@@ -0,0 +1,30 @@ 
+/include/ "skeleton.dtsi"
+
+/ {
+	model = "NVIDIA Tegra30";
+	compatible = "nvidia,tegra30";
+
+	clocks {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		osc: clock {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+		};
+	};
+
+	gpio: gpio@6000d000 {
+		compatible = "nvidia,tegra30-gpio", "nvidia,tegra20-gpio";
+		reg = <0x6000d000 0x1000>;
+		#gpio-cells = <2>;
+		gpio-controller;
+	};
+
+	serial@70006000 {
+		compatible = "nvidia,tegra30-uart", "nvidia,tegra20-uart";
+		reg = <0x70006000 0x40>;
+		reg-shift = <2>;
+		status = "disabled";
+	};
+};
diff --git a/board/nvidia/dts/tegra30-cardhu.dts b/board/nvidia/dts/tegra30-cardhu.dts
new file mode 100644
index 0000000..68563e8
--- /dev/null
+++ b/board/nvidia/dts/tegra30-cardhu.dts
@@ -0,0 +1,35 @@ 
+/dts-v1/;
+
+/memreserve/ 0x1c000000 0x04000000;
+/include/ ARCH_CPU_DTS
+
+/ {
+	model = "NVIDIA Cardhu";
+	compatible = "nvidia,cardhu", "nvidia,tegra30";
+
+	aliases {
+	};
+
+        memory {
+                device_type = "memory";
+                reg = <0x80000000 0xc0000000>;
+        };
+
+	clocks {
+		clk_32k: clk_32k {
+			clock_frequency = <32000>;
+		};
+		osc {
+			clock-frequency = <12000000>;
+		};
+	};
+
+	clock@60006000 {
+		clocks = <&clk_32k &osc>;
+	};
+
+	serial@70006000 {
+		status = "ok";
+		clock-frequency = < 216000000 >;
+	};
+};