On Tue, Sep 15, 2020 at 02:17:39PM +0100, Jon Hunter wrote: > > > On 15/09/2020 13:44, Thierry Reding wrote: > > On Mon, Sep 07, 2020 at 08:46:48PM +0100, Jon Hunter wrote: > >> > >> On 16/07/2020 15:18, Thierry Reding wrote: > >>> From: Thierry Reding > >>> > >>> The NVIDIA Tegra234 VDK is a simulation platform for the Orin SoC. It > >>> supports a subset of the peripherals that will be available in the final > >>> chip and serves as a bootstrapping platform. > >>> > >>> Signed-off-by: Thierry Reding > >>> --- > >>> arch/arm64/boot/dts/nvidia/Makefile | 1 + > >>> .../boot/dts/nvidia/tegra234-sim-vdk.dts | 40 ++++ > >>> arch/arm64/boot/dts/nvidia/tegra234.dtsi | 191 ++++++++++++++++++ > >>> drivers/soc/tegra/Kconfig | 10 + > >>> include/dt-bindings/clock/tegra234-clock.h | 14 ++ > >>> include/dt-bindings/reset/tegra234-reset.h | 10 + > >>> 6 files changed, 266 insertions(+) > >>> create mode 100644 arch/arm64/boot/dts/nvidia/tegra234-sim-vdk.dts > >>> create mode 100644 arch/arm64/boot/dts/nvidia/tegra234.dtsi > >>> create mode 100644 include/dt-bindings/clock/tegra234-clock.h > >>> create mode 100644 include/dt-bindings/reset/tegra234-reset.h > >>> > >>> diff --git a/arch/arm64/boot/dts/nvidia/Makefile b/arch/arm64/boot/dts/nvidia/Makefile > >>> index 2273fc5db19c..9296d12d11e9 100644 > >>> --- a/arch/arm64/boot/dts/nvidia/Makefile > >>> +++ b/arch/arm64/boot/dts/nvidia/Makefile > >>> @@ -9,3 +9,4 @@ 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 > >>> dtb-$(CONFIG_ARCH_TEGRA_194_SOC) += tegra194-p3509-0000+p3668-0000.dtb > >>> +dtb-$(CONFIG_ARCH_TEGRA_234_SOC) += tegra234-sim-vdk.dtb > >>> diff --git a/arch/arm64/boot/dts/nvidia/tegra234-sim-vdk.dts b/arch/arm64/boot/dts/nvidia/tegra234-sim-vdk.dts > >>> new file mode 100644 > >>> index 000000000000..f6e6a24829af > >>> --- /dev/null > >>> +++ b/arch/arm64/boot/dts/nvidia/tegra234-sim-vdk.dts > >>> @@ -0,0 +1,40 @@ > >>> +// SPDX-License-Identifier: GPL-2.0 > >>> +/dts-v1/; > >>> + > >>> +#include "tegra234.dtsi" > >>> + > >>> +/ { > >>> + model = "NVIDIA Tegra234 VDK"; > >>> + compatible = "nvidia,tegra234-vdk", "nvidia,tegra234"; > >>> + > >>> + aliases { > >>> + sdhci3 = "/cbb@0/sdhci@3460000"; > >>> + serial0 = &uarta; > >>> + }; > >>> + > >>> + chosen { > >>> + bootargs = "console=ttyS0,115200n8 earlycon=uart8250,mmio32,0x03100000"; > >>> + stdout-path = "serial0:115200n8"; > >>> + }; > >>> + > >>> + cbb@0 { > >>> + serial@3100000 { > >>> + status = "okay"; > >>> + }; > >>> + > >>> + sdhci@3460000 { > >>> + status = "okay"; > >>> + bus-width = <8>; > >>> + non-removable; > >>> + only-1-8-v; > >>> + }; > >>> + > >>> + rtc@c2a0000 { > >>> + status = "okay"; > >>> + }; > >>> + > >>> + pmc@c360000 { > >>> + nvidia,invert-interrupt; > >>> + }; > >>> + }; > >>> +}; > >>> diff --git a/arch/arm64/boot/dts/nvidia/tegra234.dtsi b/arch/arm64/boot/dts/nvidia/tegra234.dtsi > >>> new file mode 100644 > >>> index 000000000000..3509687441a1 > >>> --- /dev/null > >>> +++ b/arch/arm64/boot/dts/nvidia/tegra234.dtsi > >>> @@ -0,0 +1,191 @@ > >>> +// SPDX-License-Identifier: GPL-2.0 > >>> + > >>> +#include > >>> +#include > >>> +#include > >>> +#include > >>> + > >>> +/ { > >>> + compatible = "nvidia,tegra234"; > >>> + interrupt-parent = <&gic>; > >>> + #address-cells = <2>; > >>> + #size-cells = <2>; > >>> + > >>> + bus@0 { > >>> + compatible = "simple-bus"; > >>> + #address-cells = <1>; > >>> + #size-cells = <1>; > >>> + > >>> + ranges = <0x0 0x0 0x0 0x40000000>; > >>> + > >>> + misc@100000 { > >>> + compatible = "nvidia,tegra234-misc"; > >>> + reg = <0x00100000 0xf000>, > >>> + <0x0010f000 0x1000>; > >>> + status = "okay"; > >>> + }; > >> > >> > >> Is there meant to be a fallback option here, because I don't see > >> anything to match the above compatible string? > > > > I've got the below patch in my tree that's meant to add that code, but > > it's in the wrong order in my local branch, so it didn't make it into > > this subset. I'll reorder the patches to include the APBMISC support > > patch in this series. > > OK, I think that the same also applies to efuse, pmc, rtc and bpmp-shmem > from looking at this patch. efuse is addressed in another of the patches that I have locally. I'll add it to the series. For PMC I think we can just add a minimum version of driver support for simulation, but there are a few registers that are already known to be different from previous chips. RTC needs the fallback for nvidia,tegra20-rtc. I'll add that in the next version. As for bpmp-shmem, that's something we can remove altogether since we removed it recently from existing device trees. Turns out those regions don't actually need any compatible strings. Thierry