Debian Codegraph @

scripts/dtc/include-prefixes/riscv/thead/th1520-lichee-pi-4a.dts

raw
1 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
2 /*
3 * Copyright (C) 2023 Jisheng Zhang <[email protected]>
4 */
5
6 #include "th1520-lichee-module-4a.dtsi"
7
8 / {
9 model = "Sipeed Lichee Pi 4A";
10 compatible = "sipeed,lichee-pi-4a", "sipeed,lichee-module-4a", "thead,th1520";
11
12 aliases {
13 gpio0 = &gpio0;
14 gpio1 = &gpio1;
15 gpio2 = &gpio2;
16 gpio3 = &gpio3;
17 gpio4 = &gpio4;
18 gpio5 = &aogpio;
19 serial0 = &uart0;
20 serial1 = &uart1;
21 serial2 = &uart2;
22 serial3 = &uart3;
23 serial4 = &uart4;
24 serial5 = &uart5;
25 spi0 = &spi0;
26 };
27
28 chosen {
29 stdout-path = "serial0:115200n8";
30 };
31
32 thermal-zones {
33 cpu-thermal {
34 polling-delay = <1000>;
35 polling-delay-passive = <1000>;
36 thermal-sensors = <&pvt 0>;
37
38 trips {
39 fan_config0: fan-trip0 {
40 temperature = <39000>;
41 hysteresis = <5000>;
42 type = "active";
43 };
44
45 fan_config1: fan-trip1 {
46 temperature = <50000>;
47 hysteresis = <5000>;
48 type = "active";
49 };
50
51 fan_config2: fan-trip2 {
52 temperature = <60000>;
53 hysteresis = <5000>;
54 type = "active";
55 };
56 };
57
58 cooling-maps {
59 map-active-0 {
60 cooling-device = <&fan 1 1>;
61 trip = <&fan_config0>;
62 };
63
64 map-active-1 {
65 cooling-device = <&fan 2 2>;
66 trip = <&fan_config1>;
67 };
68
69 map-active-2 {
70 cooling-device = <&fan 3 3>;
71 trip = <&fan_config2>;
72 };
73 };
74 };
75 };
76
77 fan: pwm-fan {
78 pinctrl-names = "default";
79 pinctrl-0 = <&fan_pins>;
80 compatible = "pwm-fan";
81 #cooling-cells = <2>;
82 pwms = <&pwm 1 10000000 0>;
83 cooling-levels = <0 66 196 255>;
84 };
85
86 };
87
88 &padctrl0_apsys {
89 fan_pins: fan-0 {
90 pwm1-pins {
91 pins = "GPIO3_3"; /* PWM1 */
92 function = "pwm";
93 bias-disable;
94 drive-strength = <25>;
95 input-disable;
96 input-schmitt-disable;
97 slew-rate = <0>;
98 };
99 };
100
101 uart0_pins: uart0-0 {
102 tx-pins {
103 pins = "UART0_TXD";
104 function = "uart";
105 bias-disable;
106 drive-strength = <3>;
107 input-disable;
108 input-schmitt-disable;
109 slew-rate = <0>;
110 };
111
112 rx-pins {
113 pins = "UART0_RXD";
114 function = "uart";
115 bias-disable;
116 drive-strength = <1>;
117 input-enable;
118 input-schmitt-enable;
119 slew-rate = <0>;
120 };
121 };
122 };
123
124 &uart0 {
125 pinctrl-names = "default";
126 pinctrl-0 = <&uart0_pins>;
127 status = "okay";
128 };