[v3,1/5] arm64: tegra: Add support for NVIDIA Shield TV
diff mbox series

Message ID 20190111023849.20822-2-markz@nvidia.com
State Accepted
Headers show
Series
  • NVIDIA Shield TV device tree patch set
Related show

Commit Message

Mark Zhang Jan. 11, 2019, 2:38 a.m. UTC
Add initial device-tree support for NVIDIA Shield TV (a.k.a. Darcy)
based upon Tegra210 SoC with 3 GiB of LPDDR4 RAM.

Signed-off-by: Mark Zhang <markz@nvidia.com>
---
 arch/arm64/boot/dts/nvidia/Makefile           |  1 +
 .../dts/nvidia/tegra210-p2894-0050-a08.dts    |  9 +++
 .../arm64/boot/dts/nvidia/tegra210-p2894.dtsi | 77 +++++++++++++++++++
 3 files changed, 87 insertions(+)
 create mode 100644 arch/arm64/boot/dts/nvidia/tegra210-p2894-0050-a08.dts
 create mode 100644 arch/arm64/boot/dts/nvidia/tegra210-p2894.dtsi

Comments

Thierry Reding Jan. 25, 2019, 12:23 p.m. UTC | #1
On Fri, Jan 11, 2019 at 10:38:45AM +0800, Mark Zhang wrote:
> Add initial device-tree support for NVIDIA Shield TV (a.k.a. Darcy)
> based upon Tegra210 SoC with 3 GiB of LPDDR4 RAM.
> 
> Signed-off-by: Mark Zhang <markz@nvidia.com>
> ---
>  arch/arm64/boot/dts/nvidia/Makefile           |  1 +
>  .../dts/nvidia/tegra210-p2894-0050-a08.dts    |  9 +++
>  .../arm64/boot/dts/nvidia/tegra210-p2894.dtsi | 77 +++++++++++++++++++
>  3 files changed, 87 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/nvidia/tegra210-p2894-0050-a08.dts
>  create mode 100644 arch/arm64/boot/dts/nvidia/tegra210-p2894.dtsi
> 
> diff --git a/arch/arm64/boot/dts/nvidia/Makefile b/arch/arm64/boot/dts/nvidia/Makefile
> index 7c13d7df484e..6b8ab5568481 100644
> --- a/arch/arm64/boot/dts/nvidia/Makefile
> +++ b/arch/arm64/boot/dts/nvidia/Makefile
> @@ -4,5 +4,6 @@ dtb-$(CONFIG_ARCH_TEGRA_210_SOC) += tegra210-p2371-0000.dtb
>  dtb-$(CONFIG_ARCH_TEGRA_210_SOC) += tegra210-p2371-2180.dtb
>  dtb-$(CONFIG_ARCH_TEGRA_210_SOC) += tegra210-p2571.dtb
>  dtb-$(CONFIG_ARCH_TEGRA_210_SOC) += tegra210-smaug.dtb
> +dtb-$(CONFIG_ARCH_TEGRA_210_SOC) += tegra210-p2894-0050-a08.dtb
>  dtb-$(CONFIG_ARCH_TEGRA_186_SOC) += tegra186-p2771-0000.dtb
>  dtb-$(CONFIG_ARCH_TEGRA_194_SOC) += tegra194-p2972-0000.dtb
> diff --git a/arch/arm64/boot/dts/nvidia/tegra210-p2894-0050-a08.dts b/arch/arm64/boot/dts/nvidia/tegra210-p2894-0050-a08.dts
> new file mode 100644
> index 000000000000..7ffb351b5882
> --- /dev/null
> +++ b/arch/arm64/boot/dts/nvidia/tegra210-p2894-0050-a08.dts
> @@ -0,0 +1,9 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/dts-v1/;
> +
> +#include "tegra210-p2894.dtsi"
> +
> +/ {
> +	model = "NVIDIA Shield TV";
> +	compatible = "nvidia,p2894-0050-a08", "nvidia,darcy", "nvidia,tegra210";
> +};
> diff --git a/arch/arm64/boot/dts/nvidia/tegra210-p2894.dtsi b/arch/arm64/boot/dts/nvidia/tegra210-p2894.dtsi
> new file mode 100644
> index 000000000000..ac52286ab9ab
> --- /dev/null
> +++ b/arch/arm64/boot/dts/nvidia/tegra210-p2894.dtsi
> @@ -0,0 +1,77 @@
> +// SPDX-License-Identifier: GPL-2.0
> +
> +#include "tegra210.dtsi"
> +
> +/ {
> +	aliases {
> +		serial0 = &uarta;
> +	};
> +
> +	chosen {
> +		bootargs = "earlycon";
> +		stdout-path = "serial0:115200n8";
> +	};
> +
> +	memory {

I think this will cause DTC to warn about this not node missing a
unit-address. Do things still work if you add @80000000 to the name?
There was a recent regression reported against Tegra124 Nyan devices
where a recent patch added the @80000000 unit address and that caused
the bootloader (coreboot) to fail to update the correct device tree
node with the memory bank information.

I'm wondering if the same is true for this device. I suppose it might
be okay because the amount of RAM in these devices is probably fixed,
so whether or not the correct node is updated may not really matter.

Thierry
Thierry Reding Jan. 25, 2019, 12:35 p.m. UTC | #2
On Fri, Jan 25, 2019 at 01:23:24PM +0100, Thierry Reding wrote:
> On Fri, Jan 11, 2019 at 10:38:45AM +0800, Mark Zhang wrote:
> > Add initial device-tree support for NVIDIA Shield TV (a.k.a. Darcy)
> > based upon Tegra210 SoC with 3 GiB of LPDDR4 RAM.
> > 
> > Signed-off-by: Mark Zhang <markz@nvidia.com>
> > ---
> >  arch/arm64/boot/dts/nvidia/Makefile           |  1 +
> >  .../dts/nvidia/tegra210-p2894-0050-a08.dts    |  9 +++
> >  .../arm64/boot/dts/nvidia/tegra210-p2894.dtsi | 77 +++++++++++++++++++
> >  3 files changed, 87 insertions(+)
> >  create mode 100644 arch/arm64/boot/dts/nvidia/tegra210-p2894-0050-a08.dts
> >  create mode 100644 arch/arm64/boot/dts/nvidia/tegra210-p2894.dtsi
> > 
> > diff --git a/arch/arm64/boot/dts/nvidia/Makefile b/arch/arm64/boot/dts/nvidia/Makefile
> > index 7c13d7df484e..6b8ab5568481 100644
> > --- a/arch/arm64/boot/dts/nvidia/Makefile
> > +++ b/arch/arm64/boot/dts/nvidia/Makefile
> > @@ -4,5 +4,6 @@ dtb-$(CONFIG_ARCH_TEGRA_210_SOC) += tegra210-p2371-0000.dtb
> >  dtb-$(CONFIG_ARCH_TEGRA_210_SOC) += tegra210-p2371-2180.dtb
> >  dtb-$(CONFIG_ARCH_TEGRA_210_SOC) += tegra210-p2571.dtb
> >  dtb-$(CONFIG_ARCH_TEGRA_210_SOC) += tegra210-smaug.dtb
> > +dtb-$(CONFIG_ARCH_TEGRA_210_SOC) += tegra210-p2894-0050-a08.dtb
> >  dtb-$(CONFIG_ARCH_TEGRA_186_SOC) += tegra186-p2771-0000.dtb
> >  dtb-$(CONFIG_ARCH_TEGRA_194_SOC) += tegra194-p2972-0000.dtb
> > diff --git a/arch/arm64/boot/dts/nvidia/tegra210-p2894-0050-a08.dts b/arch/arm64/boot/dts/nvidia/tegra210-p2894-0050-a08.dts
> > new file mode 100644
> > index 000000000000..7ffb351b5882
> > --- /dev/null
> > +++ b/arch/arm64/boot/dts/nvidia/tegra210-p2894-0050-a08.dts
> > @@ -0,0 +1,9 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +/dts-v1/;
> > +
> > +#include "tegra210-p2894.dtsi"
> > +
> > +/ {
> > +	model = "NVIDIA Shield TV";
> > +	compatible = "nvidia,p2894-0050-a08", "nvidia,darcy", "nvidia,tegra210";
> > +};
> > diff --git a/arch/arm64/boot/dts/nvidia/tegra210-p2894.dtsi b/arch/arm64/boot/dts/nvidia/tegra210-p2894.dtsi
> > new file mode 100644
> > index 000000000000..ac52286ab9ab
> > --- /dev/null
> > +++ b/arch/arm64/boot/dts/nvidia/tegra210-p2894.dtsi
> > @@ -0,0 +1,77 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +
> > +#include "tegra210.dtsi"
> > +
> > +/ {
> > +	aliases {
> > +		serial0 = &uarta;
> > +	};
> > +
> > +	chosen {
> > +		bootargs = "earlycon";
> > +		stdout-path = "serial0:115200n8";
> > +	};
> > +
> > +	memory {
> 
> I think this will cause DTC to warn about this not node missing a
> unit-address. Do things still work if you add @80000000 to the name?
> There was a recent regression reported against Tegra124 Nyan devices
> where a recent patch added the @80000000 unit address and that caused
> the bootloader (coreboot) to fail to update the correct device tree
> node with the memory bank information.
> 
> I'm wondering if the same is true for this device. I suppose it might
> be okay because the amount of RAM in these devices is probably fixed,
> so whether or not the correct node is updated may not really matter.
> 
> Thierry

Just for the record, I did apply this for now, we can always fix up the
unit-address later if necessary. The warning doesn't show up by default,
so the noise should be limited to those people that go looking for it.

Thierry

Patch
diff mbox series

diff --git a/arch/arm64/boot/dts/nvidia/Makefile b/arch/arm64/boot/dts/nvidia/Makefile
index 7c13d7df484e..6b8ab5568481 100644
--- a/arch/arm64/boot/dts/nvidia/Makefile
+++ b/arch/arm64/boot/dts/nvidia/Makefile
@@ -4,5 +4,6 @@  dtb-$(CONFIG_ARCH_TEGRA_210_SOC) += tegra210-p2371-0000.dtb
 dtb-$(CONFIG_ARCH_TEGRA_210_SOC) += tegra210-p2371-2180.dtb
 dtb-$(CONFIG_ARCH_TEGRA_210_SOC) += tegra210-p2571.dtb
 dtb-$(CONFIG_ARCH_TEGRA_210_SOC) += tegra210-smaug.dtb
+dtb-$(CONFIG_ARCH_TEGRA_210_SOC) += tegra210-p2894-0050-a08.dtb
 dtb-$(CONFIG_ARCH_TEGRA_186_SOC) += tegra186-p2771-0000.dtb
 dtb-$(CONFIG_ARCH_TEGRA_194_SOC) += tegra194-p2972-0000.dtb
diff --git a/arch/arm64/boot/dts/nvidia/tegra210-p2894-0050-a08.dts b/arch/arm64/boot/dts/nvidia/tegra210-p2894-0050-a08.dts
new file mode 100644
index 000000000000..7ffb351b5882
--- /dev/null
+++ b/arch/arm64/boot/dts/nvidia/tegra210-p2894-0050-a08.dts
@@ -0,0 +1,9 @@ 
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+
+#include "tegra210-p2894.dtsi"
+
+/ {
+	model = "NVIDIA Shield TV";
+	compatible = "nvidia,p2894-0050-a08", "nvidia,darcy", "nvidia,tegra210";
+};
diff --git a/arch/arm64/boot/dts/nvidia/tegra210-p2894.dtsi b/arch/arm64/boot/dts/nvidia/tegra210-p2894.dtsi
new file mode 100644
index 000000000000..ac52286ab9ab
--- /dev/null
+++ b/arch/arm64/boot/dts/nvidia/tegra210-p2894.dtsi
@@ -0,0 +1,77 @@ 
+// SPDX-License-Identifier: GPL-2.0
+
+#include "tegra210.dtsi"
+
+/ {
+	aliases {
+		serial0 = &uarta;
+	};
+
+	chosen {
+		bootargs = "earlycon";
+		stdout-path = "serial0:115200n8";
+	};
+
+	memory {
+		device_type = "memory";
+		reg = <0x0 0x80000000 0x0 0xc0000000>;
+	};
+
+	serial@70006000 {
+		status = "okay";
+	};
+
+	pmc@7000e400 {
+		nvidia,invert-interrupt;
+		nvidia,suspend-mode = <0>;
+		nvidia,cpu-pwr-good-time = <0>;
+		nvidia,cpu-pwr-off-time = <0>;
+		nvidia,core-pwr-good-time = <4587 3876>;
+		nvidia,core-pwr-off-time = <39065>;
+		nvidia,core-power-req-active-high;
+		nvidia,sys-clock-req-active-high;
+		status = "okay";
+	};
+
+	sdhci@700b0600 {
+		bus-width = <8>;
+		non-removable;
+		status = "okay";
+	};
+
+	clocks {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		clk32k_in: clock@0 {
+			compatible = "fixed-clock";
+			reg = <0>;
+			#clock-cells = <0>;
+			clock-frequency = <32768>;
+		};
+	};
+
+	cpus {
+		cpu@0 {
+			enable-method = "psci";
+		};
+
+		cpu@1 {
+			enable-method = "psci";
+		};
+
+		cpu@2 {
+			enable-method = "psci";
+		};
+
+		cpu@3 {
+			enable-method = "psci";
+		};
+	};
+
+	psci {
+		compatible = "arm,psci-1.0";
+		method = "smc";
+	};
+};