]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
arm64: tegra: Restructure Orin NX/Nano device tree
authorVedant Deshpande <vedantd@nvidia.com>
Thu, 27 Jun 2024 21:53:16 +0000 (21:53 +0000)
committerThierry Reding <treding@nvidia.com>
Fri, 28 Jun 2024 15:37:19 +0000 (17:37 +0200)
The Orin NX and Orin Nano boards share a common carrier board and the
module boards for both platforms are very similar. Therefore,
restructure the Orin NX/Nano device-tree source files to adhere to a
simple hierarchical format. This will help make clear where changes
should go, and eliminates redundancy within the files.

Previously the carrier board file was independent. However, given
that it is so tightly coupled with the module design, it will be
more practical to combine files together for a simpler layout.

Following changes are made to restructure the device tree source files:
1) Change include hierarchy. Top-level dts includes board dtsi.
   Board dtsi includes module dtsi. Module dtsi includes SoC dtsi.
2) Data from the top level dts file that is common to both Orin NX
   and Orin Nano is in tegra234-p3768-0000+p3767.dtsi.
3) Only data that is unique to NX/Nano is present in the top-level dts.

Signed-off-by: Vedant Deshpande <vedantd@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
arch/arm64/boot/dts/nvidia/tegra234-p3768-0000+p3767-0000.dts
arch/arm64/boot/dts/nvidia/tegra234-p3768-0000+p3767-0005.dts
arch/arm64/boot/dts/nvidia/tegra234-p3768-0000+p3767.dtsi [moved from arch/arm64/boot/dts/nvidia/tegra234-p3768-0000.dtsi with 90% similarity]

index 1607ee14216fbc00c9a1d17a9173dd1137170c12..82a59e33c46c9b9f4cf6f1913d0205edcdbbd7a9 100644 (file)
@@ -1,11 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
-#include <dt-bindings/input/linux-event-codes.h>
-#include <dt-bindings/input/gpio-keys.h>
-
-#include "tegra234-p3767.dtsi"
-#include "tegra234-p3768-0000.dtsi"
+#include "tegra234-p3768-0000+p3767.dtsi"
 
 / {
        compatible = "nvidia,p3768-0000+p3767-0000", "nvidia,p3767-0000", "nvidia,tegra234";
                        status = "okay";
                };
 
-               pwm@32a0000 {
-                       assigned-clocks = <&bpmp TEGRA234_CLK_PWM3>;
-                       assigned-clock-parents = <&bpmp TEGRA234_CLK_PLLP_OUT0>;
-                       status = "okay";
-               };
-
                hda@3510000 {
                        nvidia,model = "NVIDIA Jetson Orin NX HDA";
                };
-
-               padctl@3520000 {
-                       status = "okay";
-               };
-       };
-
-       gpio-keys {
-               compatible = "gpio-keys";
-
-               key-force-recovery {
-                       label = "Force Recovery";
-                       gpios = <&gpio TEGRA234_MAIN_GPIO(G, 0) GPIO_ACTIVE_LOW>;
-                       linux,input-type = <EV_KEY>;
-                       linux,code = <BTN_1>;
-               };
-
-               key-power {
-                       label = "Power";
-                       gpios = <&gpio_aon TEGRA234_AON_GPIO(EE, 4) GPIO_ACTIVE_LOW>;
-                       linux,input-type = <EV_KEY>;
-                       linux,code = <KEY_POWER>;
-                       wakeup-event-action = <EV_ACT_ASSERTED>;
-                       wakeup-source;
-               };
-
-               key-suspend {
-                       label = "Suspend";
-                       gpios = <&gpio TEGRA234_MAIN_GPIO(G, 2) GPIO_ACTIVE_LOW>;
-                       linux,input-type = <EV_KEY>;
-                       linux,code = <KEY_SLEEP>;
-               };
-       };
-
-       pwm-fan {
-               cooling-levels = <0 88 187 255>;
-       };
-
-       vdd_3v3_pcie: regulator-vdd-3v3-pcie {
-               compatible = "regulator-fixed";
-               regulator-name = "VDD_3V3_PCIE";
-               regulator-min-microvolt = <3300000>;
-               regulator-max-microvolt = <3300000>;
-               gpio = <&gpio_aon TEGRA234_AON_GPIO(AA, 5) GPIO_ACTIVE_HIGH>;
-               enable-active-high;
        };
 
        sound {
                label = "NVIDIA Jetson Orin NX APE";
        };
-
-       thermal-zones {
-               tj-thermal {
-                       cooling-maps {
-                               map-active-0 {
-                                       cooling-device = <&fan 0 1>;
-                                       trip = <&tj_trip_active0>;
-                               };
-
-                               map-active-1 {
-                                       cooling-device = <&fan 1 2>;
-                                       trip = <&tj_trip_active1>;
-                               };
-
-                               map-active-2 {
-                                       cooling-device = <&fan 2 3>;
-                                       trip = <&tj_trip_active2>;
-                               };
-                       };
-               };
-       };
 };
index dc2d4bef1e839907f2f5b99ab93a4e6eb90e58ce..9f5e07012b87ac30083bed3ec811f76c669cbb5d 100644 (file)
@@ -1,11 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
-#include <dt-bindings/input/linux-event-codes.h>
-#include <dt-bindings/input/gpio-keys.h>
-
-#include "tegra234-p3767.dtsi"
-#include "tegra234-p3768-0000.dtsi"
+#include "tegra234-p3768-0000+p3767.dtsi"
 
 / {
        compatible = "nvidia,p3768-0000+p3767-0005", "nvidia,p3767-0005", "nvidia,tegra234";
                };
        };
 
-       pwm-fan {
-               cooling-levels = <0 88 187 255>;
-       };
-
        sound {
                label = "NVIDIA Jetson Orin Nano APE";
        };
-
-       thermal-zones {
-               tj-thermal {
-                       cooling-maps {
-                               map-active-0 {
-                                       cooling-device = <&fan 0 1>;
-                                       trip = <&tj_trip_active0>;
-                               };
-
-                               map-active-1 {
-                                       cooling-device = <&fan 1 2>;
-                                       trip = <&tj_trip_active1>;
-                               };
-
-                               map-active-2 {
-                                       cooling-device = <&fan 2 3>;
-                                       trip = <&tj_trip_active2>;
-                               };
-                       };
-               };
-       };
 };
similarity index 90%
rename from arch/arm64/boot/dts/nvidia/tegra234-p3768-0000.dtsi
rename to arch/arm64/boot/dts/nvidia/tegra234-p3768-0000+p3767.dtsi
index 5d0298b6c30d0621f00628319122a4db54c71376..6d64a24fa2519354bed481a5d4427342f2d84beb 100644 (file)
@@ -1,7 +1,11 @@
 // SPDX-License-Identifier: GPL-2.0
 
+#include <dt-bindings/input/linux-event-codes.h>
+#include <dt-bindings/input/gpio-keys.h>
+
+#include "tegra234-p3767.dtsi"
+
 / {
-       compatible = "nvidia,p3768-0000";
 
        aliases {
                serial0 = &tcu;
                compatible = "pwm-fan";
                pwms = <&pwm3 0 45334>;
                #cooling-cells = <2>;
+               cooling-levels = <0 88 187 255>;
        };
 
        vdd_1v8_sys: regulator-vdd-1v8-sys {
        serial {
                status = "okay";
        };
+
+       thermal-zones {
+               tj-thermal {
+                       cooling-maps {
+                               map-active-0 {
+                                       cooling-device = <&fan 0 1>;
+                                       trip = <&tj_trip_active0>;
+                               };
+
+                               map-active-1 {
+                                       cooling-device = <&fan 1 2>;
+                                       trip = <&tj_trip_active1>;
+                               };
+
+                               map-active-2 {
+                                       cooling-device = <&fan 2 3>;
+                                       trip = <&tj_trip_active2>;
+                               };
+                       };
+               };
+       };
 };