From patchwork Fri Mar 31 16:29:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 13196330 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B4DC2C761A6 for ; Fri, 31 Mar 2023 16:30:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=uYaAEQVAWEtdw3gW+7eQIdlC8Ctceh2qSHyC9fCj5t8=; b=iwHef53GNJu/xM /2Ezgue0aOdKdYW7N2f8myEVhu8ZD/WxHgmB9s5aqbww9mRCwssD35lLe2LJLY5w9vU3/iCtwvMqk 3T+RpubepCx5tuh2DQPZivXHejyUscJBucWKqHyrcJS3vXonE0M2mYRxMRvo2fllXai/g0GXTx/Sa 06NHC6DEL57/nQA3tUJlifo7Svk8U4mQPBgigXL+aLh9vcj44Mu1wPlm2a6l8Tx34PCXyvn1JSdfb 6xGiyFzl3eXISQh8xpnZTBrxIqDfjBiXsI4gfUVX+vNf+ylClre51aLQWmNYXc8oacSOKZuWTmQ7b aTxnHVI0bfNPCTAXbqhg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1piHdI-0086BZ-2X; Fri, 31 Mar 2023 16:29:45 +0000 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1piHd0-008644-20 for linux-arm-kernel@lists.infradead.org; Fri, 31 Mar 2023 16:29:28 +0000 Received: by mail-ed1-x52b.google.com with SMTP id i5so92023093eda.0 for ; Fri, 31 Mar 2023 09:29:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680280164; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=AKG4C+1Wx4Y61hBzbbvjWu9OyPNzcije/ihAphovozk=; b=iznjKuTE2IeQ70WzXlZancPwpcOmeP+eKhI4gKhIIK+knF+Kl6DdanJRh3T98lpE+X Vyiqs1/nXyYawYQxrPcGo6MaZBLeKqqc3uXSJKXna3nm6cc+PONVRQ9O10qVA7WaPDRu Ewfr/1q8/a8gQ5PeQNeO+pf9KrP48Mce9wNJ8eBSp0SKeqgjLhtu/CEeDJf4ZJ7y8svX QNFrKn+OmfLQbPxsMQducYP2Ii7KYZliwKm8qQvXaj+4khkt+0tFb4gkakc4nvU/Cx5o 5dDhBIdPmVe+gGz6jQQXPBUM3alepbAUfe0wjfNP7cS2VQay/GRhtKd3k1AvXWsyp+/6 dZpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680280164; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AKG4C+1Wx4Y61hBzbbvjWu9OyPNzcije/ihAphovozk=; b=xJ1mqBvXpbKuhmPsWzBW2YMX2kYkt4aT2X9AmspB1UHnzA2TGLeeewrFbNqoGnoYpu s9ul2jthLwiD1/BcriPVgmISfrwpEQYqSfKm0CXXwLdxt9XdHdo5GtUmrwBmTKZjiYCL Uod2JMci9215VbwZAXfg705qLVIml+d5yhA4d5juIe03tVqbj3DODda2Hd5soAu2c05x UtEXI2ZFrtVzgaO+uFVZapN8CQAe49q8/lVVpKNzZVDqnD/XGWW5+Zul+KDhTxUA6d8p ieNjP7BUa4B0TSLg/S/4PhWdLgD/hsYvuwX5Il63EX0WdDRwH0ctXHkcaURBFksMA0IO kLCg== X-Gm-Message-State: AAQBX9e4AxBnD/92Us2341MszmN1Lgfr7X88hV96J6I7EOsjWPDrfKYk EYrEXu3eQ+xWG+ZELZNXdWxjBTE7/Aw= X-Google-Smtp-Source: AKy350Z3OdSu04lehKu6OZGHzi0HqKQFJtho+lZaTJolUt0S1sNAUOZqFRUAXLie1iKKhnF0yYsTbA== X-Received: by 2002:a17:906:9404:b0:8b1:7eba:de5 with SMTP id q4-20020a170906940400b008b17eba0de5mr9628183ejx.10.1680280164251; Fri, 31 Mar 2023 09:29:24 -0700 (PDT) Received: from localhost (p200300e41f1c0800f22f74fffe1f3a53.dip0.t-ipconnect.de. [2003:e4:1f1c:800:f22f:74ff:fe1f:3a53]) by smtp.gmail.com with ESMTPSA id qo26-20020a170907213a00b00930aa50372csm1126494ejb.43.2023.03.31.09.29.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Mar 2023 09:29:24 -0700 (PDT) From: Thierry Reding To: Thierry Reding Cc: Jon Hunter , devicetree@vger.kernel.org, linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 3/4] arm64: tegra: Support Jetson Orin NX Date: Fri, 31 Mar 2023 18:29:13 +0200 Message-Id: <20230331162914.16922-3-thierry.reding@gmail.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230331162914.16922-1-thierry.reding@gmail.com> References: <20230331162914.16922-1-thierry.reding@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230331_092926_670202_C9C9A5D6 X-CRM114-Status: GOOD ( 17.47 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Thierry Reding This adds a device tree for the Jetson Orin NX module, which is Jetson AGX Orin's little sibling with 6 or 8 ARM Cortex-A78AE cores, an Ampere GPU (1024 GPU and 32 tensor cores) and a number of accelerators for machine learning, image processing and more. The Jetson Orin NX comes with either 8 or 16 GiB of 128-bit LPDDR5 and supports NVME for mass storage. Signed-off-by: Thierry Reding --- Changes in v3: - split out P3767 DTS include to allow sharing with Jetson Orin Nano Changes in v2: - add SPI flash and SD card to make UEFI happy .../boot/dts/nvidia/tegra234-p3767-0000.dtsi | 14 ++ .../arm64/boot/dts/nvidia/tegra234-p3767.dtsi | 172 ++++++++++++++++++ 2 files changed, 186 insertions(+) create mode 100644 arch/arm64/boot/dts/nvidia/tegra234-p3767-0000.dtsi create mode 100644 arch/arm64/boot/dts/nvidia/tegra234-p3767.dtsi diff --git a/arch/arm64/boot/dts/nvidia/tegra234-p3767-0000.dtsi b/arch/arm64/boot/dts/nvidia/tegra234-p3767-0000.dtsi new file mode 100644 index 000000000000..baf4f69e410d --- /dev/null +++ b/arch/arm64/boot/dts/nvidia/tegra234-p3767-0000.dtsi @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: GPL-2.0 + +#include "tegra234-p3767.dtsi" + +/ { + compatible = "nvidia,p3767-0000", "nvidia,tegra234"; + model = "NVIDIA Jetson Orin NX"; + + bus@0 { + hda@3510000 { + nvidia,model = "NVIDIA Jetson Orin NX HDA"; + }; + }; +}; diff --git a/arch/arm64/boot/dts/nvidia/tegra234-p3767.dtsi b/arch/arm64/boot/dts/nvidia/tegra234-p3767.dtsi new file mode 100644 index 000000000000..bd60478fa75e --- /dev/null +++ b/arch/arm64/boot/dts/nvidia/tegra234-p3767.dtsi @@ -0,0 +1,172 @@ +// SPDX-License-Identifier: GPL-2.0 + +#include "tegra234.dtsi" + +/ { + compatible = "nvidia,p3767", "nvidia,tegra234"; + + bus@0 { + i2c@3160000 { + status = "okay"; + + eeprom@50 { + compatible = "atmel,24c02"; + reg = <0x50>; + + label = "module"; + vcc-supply = <&vdd_1v8_hs>; + address-width = <8>; + pagesize = <8>; + size = <256>; + read-only; + }; + }; + + spi@3270000 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <136000000>; + spi-tx-bus-width = <4>; + spi-rx-bus-width = <4>; + }; + }; + + /* + * This only exists on Jetson Orin Nano Developer Kit (SKU 5) + * but UEFI needs this and will remove it on devices where it + * doesn't exist. + */ + mmc@3400000 { + status = "okay"; + bus-width = <4>; + cd-gpios = <&gpio TEGRA234_MAIN_GPIO(G, 7) GPIO_ACTIVE_HIGH>; + disable-wp; + }; + + hda@3510000 { + status = "okay"; + }; + + padctl@3520000 { + vclamp-usb-supply = <&vdd_1v8_ao>; + avdd-usb-supply = <&vdd_3v3_ao>; + }; + + rtc@c2a0000 { + status = "okay"; + }; + + pmc@c360000 { + nvidia,invert-interrupt; + }; + }; + + vdd_5v0_sys: regulator-vdd-5v0-sys { + compatible = "regulator-fixed"; + regulator-name = "VDD_5V0_SYS"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-always-on; + }; + + vdd_1v8_hs: regulator-vdd-1v8-hs { + compatible = "regulator-fixed"; + regulator-name = "VDD_1V8_HS"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + }; + + vdd_1v8_ao: regulator-vdd-1v8-ao { + compatible = "regulator-fixed"; + regulator-name = "VDD_1V8_AO"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + vin-supply = <&vdd_5v0_sys>; + }; + + vdd_3v3_ao: regulator-vdd-3v3-ao { + compatible = "regulator-fixed"; + regulator-name = "VDD_3V3_AO"; + regulator-min-microvolt = <33000000>; + regulator-max-microvolt = <33000000>; + regulator-always-on; + vin-supply = <&vdd_5v0_sys>; + }; + + thermal-zones { + /* + * This monitoring is far from optimal, but it's good enough + * at this stage. + */ + cpu-thermal { + polling-delay = <1000>; + polling-delay-passive = <1000>; + status = "okay"; + + trips { + critical { + temperature = <104500>; + hysteresis = <0>; + type = "critical"; + }; + + hot { + temperature = <99000>; + hysteresis = <1000>; + type = "hot"; + }; + + board_trip_passive: passive { + temperature = <95000>; + hysteresis = <2000>; + type = "passive"; + }; + + board_trip_active2: active-2 { + temperature = <80000>; + hysteresis = <4000>; + type = "active"; + }; + + board_trip_active1: active-1 { + temperature = <65000>; + hysteresis = <4000>; + type = "active"; + }; + + board_trip_active0: active-0 { + temperature = <50000>; + hysteresis = <4000>; + type = "active"; + }; + }; + + cooling-maps { + passive { + cooling-device = <&fan 3 3>; + trip = <&board_trip_passive>; + }; + + active2 { + cooling-device = <&fan 2 3>; + trip = <&board_trip_active2>; + }; + + active1 { + cooling-device = <&fan 1 2>; + trip = <&board_trip_active1>; + }; + + active0 { + cooling-device = <&fan 0 1>; + trip = <&board_trip_active0>; + }; + }; + }; + }; +};