201 lines
3.3 KiB
Devicetree
201 lines
3.3 KiB
Devicetree
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
|
|
/*
|
|
* Copyright (C) 2023 Jisheng Zhang <jszhang@kernel.org>
|
|
*/
|
|
|
|
#include "th1520-lichee-module-4a.dtsi"
|
|
#include <dt-bindings/gpio/gpio.h>
|
|
|
|
/ {
|
|
model = "Sipeed Lichee Pi 4A";
|
|
compatible = "sipeed,lichee-pi-4a", "sipeed,lichee-module-4a", "thead,th1520";
|
|
|
|
aliases {
|
|
gpio0 = &gpio0;
|
|
gpio1 = &gpio1;
|
|
gpio2 = &gpio2;
|
|
gpio3 = &gpio3;
|
|
gpio4 = &gpio4;
|
|
gpio5 = &aogpio;
|
|
serial0 = &uart0;
|
|
serial1 = &uart1;
|
|
serial2 = &uart2;
|
|
serial3 = &uart3;
|
|
serial4 = &uart4;
|
|
serial5 = &uart5;
|
|
spi0 = &spi0;
|
|
};
|
|
|
|
chosen {
|
|
stdout-path = "serial0:115200n8";
|
|
};
|
|
|
|
hdmi-connector {
|
|
compatible = "hdmi-connector";
|
|
type = "a";
|
|
|
|
port {
|
|
hdmi_con_in: endpoint {
|
|
remote-endpoint = <&hdmi_out_con>;
|
|
};
|
|
};
|
|
};
|
|
|
|
wifi_pwrseq: wifi-pwrseq {
|
|
compatible = "mmc-pwrseq-simple";
|
|
reset-gpios = <&ioexp2 4 GPIO_ACTIVE_LOW>;
|
|
post-power-on-delay-ms = <200>;
|
|
};
|
|
|
|
thermal-zones {
|
|
cpu-thermal {
|
|
polling-delay = <1000>;
|
|
polling-delay-passive = <1000>;
|
|
thermal-sensors = <&pvt 0>;
|
|
|
|
trips {
|
|
fan_config0: fan-trip0 {
|
|
temperature = <39000>;
|
|
hysteresis = <5000>;
|
|
type = "active";
|
|
};
|
|
|
|
fan_config1: fan-trip1 {
|
|
temperature = <50000>;
|
|
hysteresis = <5000>;
|
|
type = "active";
|
|
};
|
|
|
|
fan_config2: fan-trip2 {
|
|
temperature = <60000>;
|
|
hysteresis = <5000>;
|
|
type = "active";
|
|
};
|
|
};
|
|
|
|
cooling-maps {
|
|
map-active-0 {
|
|
cooling-device = <&fan 1 1>;
|
|
trip = <&fan_config0>;
|
|
};
|
|
|
|
map-active-1 {
|
|
cooling-device = <&fan 2 2>;
|
|
trip = <&fan_config1>;
|
|
};
|
|
|
|
map-active-2 {
|
|
cooling-device = <&fan 3 3>;
|
|
trip = <&fan_config2>;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
fan: pwm-fan {
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&fan_pins>;
|
|
compatible = "pwm-fan";
|
|
#cooling-cells = <2>;
|
|
pwms = <&pwm 1 10000000 0>;
|
|
cooling-levels = <0 66 196 255>;
|
|
};
|
|
|
|
};
|
|
|
|
&padctrl1_apsys {
|
|
i2c1_pins: i2c1-0 {
|
|
i2c-pins {
|
|
pins = "I2C1_SCL", "I2C1_SDA";
|
|
function = "i2c";
|
|
bias-pull-up = <2100>;
|
|
drive-strength = <7>;
|
|
input-enable;
|
|
input-schmitt-enable;
|
|
slew-rate = <0>;
|
|
};
|
|
};
|
|
};
|
|
|
|
&padctrl0_apsys {
|
|
fan_pins: fan-0 {
|
|
pwm1-pins {
|
|
pins = "GPIO3_3"; /* PWM1 */
|
|
function = "pwm";
|
|
bias-disable;
|
|
drive-strength = <25>;
|
|
input-disable;
|
|
input-schmitt-disable;
|
|
slew-rate = <0>;
|
|
};
|
|
};
|
|
|
|
uart0_pins: uart0-0 {
|
|
tx-pins {
|
|
pins = "UART0_TXD";
|
|
function = "uart";
|
|
bias-disable;
|
|
drive-strength = <3>;
|
|
input-disable;
|
|
input-schmitt-disable;
|
|
slew-rate = <0>;
|
|
};
|
|
|
|
rx-pins {
|
|
pins = "UART0_RXD";
|
|
function = "uart";
|
|
bias-disable;
|
|
drive-strength = <1>;
|
|
input-enable;
|
|
input-schmitt-enable;
|
|
slew-rate = <0>;
|
|
};
|
|
};
|
|
};
|
|
|
|
&i2c1 {
|
|
clock-frequency = <400000>;
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&i2c1_pins>;
|
|
status = "okay";
|
|
|
|
ioexp2: gpio@18 {
|
|
compatible = "nxp,pca9557";
|
|
reg = <0x18>;
|
|
gpio-controller;
|
|
#gpio-cells = <2>;
|
|
};
|
|
};
|
|
|
|
&sdio1 {
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
bus-width = <4>;
|
|
max-frequency = <198000000>;
|
|
cap-sdio-irq;
|
|
keep-power-in-suspend;
|
|
mmc-pwrseq = <&wifi_pwrseq>;
|
|
non-removable;
|
|
status = "okay";
|
|
};
|
|
|
|
&dpu {
|
|
status = "okay";
|
|
};
|
|
|
|
&hdmi {
|
|
status = "okay";
|
|
};
|
|
|
|
&hdmi_out_port {
|
|
hdmi_out_con: endpoint {
|
|
remote-endpoint = <&hdmi_con_in>;
|
|
};
|
|
};
|
|
|
|
&uart0 {
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&uart0_pins>;
|
|
status = "okay";
|
|
};
|