arch/riscv/boot/dts/sophgo/sg2042-evb-v2.dts

Source file repositories/reference/linux-study-clean/arch/riscv/boot/dts/sophgo/sg2042-evb-v2.dts

File Facts

System
Linux kernel
Corpus path
arch/riscv/boot/dts/sophgo/sg2042-evb-v2.dts
Extension
.dts
Size
4411 bytes
Lines
258
Domain
Architecture Layer
Bucket
arch/riscv
Inferred role
Architecture Layer: configuration, schema, or hardware description
Status
atlas-only

Why This File Exists

CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.

Dependency Surface

Detected Declarations

Annotated Snippet

// SPDX-License-Identifier: GPL-2.0 OR MIT
/*
 * Copyright (C) 2025 Sophgo Technology Inc. All rights reserved.
 */

#include "sg2042.dtsi"

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>

/ {
	model = "Sophgo SG2042 EVB V2.0";
	compatible = "sophgo,sg2042-evb-v2", "sophgo,sg2042";

	chosen {
		stdout-path = "serial0";
	};

	pwmfan: pwm-fan {
		compatible = "pwm-fan";
		cooling-levels = <103 128 179 230 255>;
		pwms = <&pwm 0 40000 0>;
		#cooling-cells = <2>;
	};

	thermal-zones {
		soc-thermal {
			polling-delay-passive = <1000>;
			polling-delay = <1000>;
			thermal-sensors = <&mcu 0>;

			trips {
				soc_active1: soc-active1 {
					temperature = <30000>;
					hysteresis = <8000>;
					type = "active";
				};

				soc_active2: soc-active2 {
					temperature = <58000>;
					hysteresis = <12000>;
					type = "active";
				};

				soc_active3: soc-active3 {
					temperature = <70000>;
					hysteresis = <10000>;
					type = "active";
				};

				soc_hot: soc-hot {
					temperature = <80000>;
					hysteresis = <5000>;
					type = "hot";
				};
			};

			cooling-maps {
				map0 {
					trip = <&soc_active1>;
					cooling-device = <&pwmfan 0 1>;
				};

				map1 {
					trip = <&soc_active2>;
					cooling-device = <&pwmfan 1 2>;
				};

				map2 {
					trip = <&soc_active3>;

Annotation

Implementation Notes