// SPDX-License-Identifier: BSD-3-Clause
/*
 * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
 */

/dts-v1/;

#include "nord-gearvm.dtsi"

/ {
	model = "Qualcomm Technologies, Inc. SA8797P Ride";
	compatible = "qcom,sa8797p-ride", "qcom,nord";

	aliases {
		i2c18 = &i2c18;
		serial0 = &uart15;
		serial1 = &uart4;
		spi16 = &spi16;
	};

	chosen {
		stdout-path = "serial0:115200n8";
	};

	clocks {
		xo_board_clk: xo-board-clk {
			compatible = "fixed-clock";
			clock-frequency = <38400000>;
			#clock-cells = <0>;
		};

		sleep_clk: sleep-clk {
			compatible = "fixed-clock";
			clock-frequency = <32000>;
			#clock-cells = <0>;
		};
	};
};

&i2c18 {
	status = "okay";
};

&scmi3 {
	status = "okay";
};

&scmi9 {
	status = "okay";
};

&scmi10 {
	status = "okay";
};

&scmi11 {
	status = "okay";
};

&scmi23 {
	status = "okay";
};

&spi16 {
	status = "okay";
};

&thermal_zones {
	pmic_kobra_thermal: pmic-a-die-thermal {
		polling-delay-passive = <100>;
		thermal-sensors = <&scmi23_sensor 3>;

		trips {
			trip0 {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	pmic_kai_0_thermal: pmic-e-die-thermal {
		polling-delay-passive = <100>;
		thermal-sensors = <&scmi23_sensor 4>;

		trips {
			trip0 {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	pmic_kai_1_thermal: pmic-f-die-thermal {
		polling-delay-passive = <100>;
		thermal-sensors = <&scmi23_sensor 5>;

		trips {
			trip0 {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	pmic_kai_2_thermal: pmic-g-die-thermal {
		polling-delay-passive = <100>;
		thermal-sensors = <&scmi23_sensor 6>;

		trips {
			trip0 {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	pmic_kai_3_thermal: pmic-h-die-thermal {
		polling-delay-passive = <100>;
		thermal-sensors = <&scmi23_sensor 7>;

		trips {
			trip0 {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	pmic_kai_4_thermal: pmic-i-die-thermal {
		polling-delay-passive = <100>;
		thermal-sensors = <&scmi23_sensor 8>;

		trips {
			trip0 {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	pmic_kai_5_thermal: pmic-j-die-thermal {
		polling-delay-passive = <100>;
		thermal-sensors = <&scmi23_sensor 9>;

		trips {
			trip0 {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	pmic_kai_6_thermal: pmic-k-die-thermal {
		polling-delay-passive = <100>;
		thermal-sensors = <&scmi23_sensor 10>;

		trips {
			trip0 {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	pmic_kai_7_thermal: pmic-l-die-thermal {
		polling-delay-passive = <100>;
		thermal-sensors = <&scmi23_sensor 11>;

		trips {
			trip0 {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	pmic_kai_ufs_thermal: ufs-thermal {
		polling-delay-passive = <0>;
		thermal-sensors = <&scmi23_sensor 0>;

		trips {
			trip0 {
				temperature = <105000>;
				hysteresis = <5000>;
				type = "passive";
			};

			trip1 {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "critical";
			};
		};
	};

	pmic_kai_sdram0_thermal: sdram0-thermal {
		polling-delay-passive = <0>;
		thermal-sensors = <&scmi23_sensor 1>;

		trips {
			trip0 {
				temperature = <105000>;
				hysteresis = <5000>;
				type = "passive";
			};

			trip1 {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "critical";
			};
		};
	};

	pmic_kai_sdram1_thermal: sdram1-thermal {
		polling-delay-passive = <0>;
		thermal-sensors = <&scmi23_sensor 2>;

		trips {
			trip0 {
				temperature = <105000>;
				hysteresis = <5000>;
				type = "passive";
			};

			trip1 {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "critical";
			};
		};
	};
};

&uart4 {
	status = "okay";
};

&uart15 {
	status = "okay";
};

&ufs_mem_hc {
	status = "okay";
};