Loading...
1// SPDX-License-Identifier: GPL-2.0 OR MIT
2/*
3 * Copyright (C) 2022 Sophgo Technology Inc. All rights reserved.
4 */
5
6#include "sg2042.dtsi"
7
8/ {
9 model = "Milk-V Pioneer";
10 compatible = "milkv,pioneer", "sophgo,sg2042";
11
12 chosen {
13 stdout-path = "serial0";
14 };
15};
16
17&uart0 {
18 status = "okay";
19};
1// SPDX-License-Identifier: GPL-2.0 OR MIT
2/*
3 * Copyright (C) 2022 Sophgo Technology Inc. All rights reserved.
4 */
5
6#include "sg2042.dtsi"
7
8#include <dt-bindings/gpio/gpio.h>
9#include <dt-bindings/input/input.h>
10
11/ {
12 model = "Milk-V Pioneer";
13 compatible = "milkv,pioneer", "sophgo,sg2042";
14
15 chosen {
16 stdout-path = "serial0";
17 };
18
19 gpio-power {
20 compatible = "gpio-keys";
21
22 key-power {
23 label = "Power Key";
24 linux,code = <KEY_POWER>;
25 gpios = <&port0a 22 GPIO_ACTIVE_HIGH>;
26 linux,input-type = <EV_KEY>;
27 debounce-interval = <100>;
28 };
29 };
30};
31
32&cgi_main {
33 clock-frequency = <25000000>;
34};
35
36&cgi_dpll0 {
37 clock-frequency = <25000000>;
38};
39
40&cgi_dpll1 {
41 clock-frequency = <25000000>;
42};
43
44&emmc {
45 bus-width = <4>;
46 no-sdio;
47 no-sd;
48 non-removable;
49 wp-inverted;
50 status = "okay";
51};
52
53&i2c1 {
54 status = "okay";
55
56 mcu: syscon@17 {
57 compatible = "sophgo,sg2042-hwmon-mcu";
58 reg = <0x17>;
59 #thermal-sensor-cells = <1>;
60 };
61};
62
63&sd {
64 bus-width = <4>;
65 no-sdio;
66 no-mmc;
67 wp-inverted;
68 status = "okay";
69};
70
71&uart0 {
72 status = "okay";
73};
74
75/ {
76 thermal-zones {
77 soc-thermal {
78 polling-delay-passive = <1000>;
79 polling-delay = <1000>;
80 thermal-sensors = <&mcu 0>;
81
82 trips {
83 soc_active1: soc-active1 {
84 temperature = <30000>;
85 hysteresis = <8000>;
86 type = "active";
87 };
88
89 soc_active2: soc-active2 {
90 temperature = <58000>;
91 hysteresis = <12000>;
92 type = "active";
93 };
94
95 soc_active3: soc-active3 {
96 temperature = <70000>;
97 hysteresis = <10000>;
98 type = "active";
99 };
100
101 soc_hot: soc-hot {
102 temperature = <80000>;
103 hysteresis = <5000>;
104 type = "hot";
105 };
106 };
107 };
108
109 board-thermal {
110 polling-delay-passive = <1000>;
111 polling-delay = <1000>;
112 thermal-sensors = <&mcu 1>;
113
114 trips {
115 board_active: board-active {
116 temperature = <75000>;
117 hysteresis = <8000>;
118 type = "active";
119 };
120 };
121 };
122 };
123};