Files
kernel-zhihe-a210/arch/riscv/boot/dts/thead/th1520-lichee-pi-4a.dts
2025-12-24 12:22:59 +08:00

1436 lines
27 KiB
Plaintext

// 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>
#include <dt-bindings/input/linux-event-codes.h>
/ {
model = "Sipeed Lichee Pi 4A";
compatible = "sipeed,lichee-pi-4a", "sipeed,lichee-module-4a", "thead,th1520", "thead,light";
aliases {
vivcam3 = &vvcam_sensor3;
viv_video2 = &video2;
viv_video3 = &video3;
};
chosen {
stdout-path = "serial0:115200n8";
};
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>;
};
lcd0_backlight: pwm-backlight@0 {
compatible = "pwm-backlight";
pwms = <&pwm 0 5000000 0>;
brightness-levels = <0 4 8 16 32 64 128 255>;
default-brightness-level = <7>;
};
th1520_iopmp: iopmp {
compatible = "xuantie,th1520-iopmp";
/* config#1: multiple valid regions */
iopmp_emmc: IOPMP_EMMC {
attr = <0xFFFFFFFF>;
is_default_region;
};
/* config#2: iopmp bypass */
iopmp_sdio0: IOPMP_SDIO0 {
bypass_en;
};
/* config#3: iopmp default region set */
iopmp_sdio1: IOPMP_SDIO1 {
attr = <0xFFFFFFFF>;
is_default_region;
};
iopmp_usb0: IOPMP_USB0 {
attr = <0xFFFFFFFF>;
is_default_region;
};
iopmp_ao: IOPMP_AO {
is_default_region;
};
iopmp_aud: IOPMP_AUD {
is_default_region;
};
iopmp_chip_dbg: IOPMP_CHIP_DBG {
is_default_region;
};
iopmp_eip120i: IOPMP_EIP120I {
is_default_region;
};
iopmp_eip120ii: IOPMP_EIP120II {
is_default_region;
};
iopmp_eip120iii: IOPMP_EIP120III {
is_default_region;
};
iopmp_isp0: IOPMP_ISP0 {
is_default_region;
};
iopmp_isp1: IOPMP_ISP1 {
is_default_region;
};
iopmp_dw200: IOPMP_DW200 {
is_default_region;
};
iopmp_vipre: IOPMP_VIPRE {
is_default_region;
};
iopmp_venc: IOPMP_VENC {
is_default_region;
};
iopmp_vdec: IOPMP_VDEC {
is_default_region;
};
iopmp_g2d: IOPMP_G2D {
is_default_region;
};
iopmp_fce: IOPMP_FCE {
is_default_region;
};
iopmp_npu: IOPMP_NPU {
is_default_region;
};
iopmp0_dpu: IOPMP0_DPU {
bypass_en;
};
iopmp1_dpu: IOPMP1_DPU {
bypass_en;
};
iopmp_gpu: IOPMP_GPU {
is_default_region;
};
iopmp_gmac1: IOPMP_GMAC1 {
is_default_region;
};
iopmp_gmac2: IOPMP_GMAC2 {
is_default_region;
};
iopmp_dmac: IOPMP_DMAC {
is_default_region;
};
iopmp_tee_dmac: IOPMP_TEE_DMAC {
is_default_region;
};
iopmp_dsp0: IOPMP_DSP0 {
is_default_region;
};
iopmp_dsp1: IOPMP_DSP1 {
is_default_region;
};
};
pmp_sec_regions: pmp-sec-regions {
compatible = "xuantie,th1520-pmp";
#address-cells = <2>;
#size-cells = <2>;
trust_firmware_region: tf-region {
reg = <0x00 0x00 0x00 0x200000>;
};
tee_os_region: tee-os-region {
reg = <0x00 0xFF000000 0x00 0x1000000>;
};
tee_sys_region: tee-sys-region {
reg = <0xFF 0xFF200000 0x00 0x100000>;
};
other_sys_region: other-sys-region {
reg = <0xFF 0xFF400000 0x00 0xC00000>;
};
};
reg_tp0_pwr: regulator-tp0-pwr {
compatible = "regulator-fixed";
regulator-name = "tp0-pwr";
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
gpio = <&ioexp3 4 GPIO_ACTIVE_HIGH>;
enable-active-high;
regulator-always-on;
};
reg_hub_1v2: regulator-hub-1v2 {
compatible = "regulator-fixed";
regulator-name = "HUB_1V2";
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
gpio = <&ioexp3 2 GPIO_ACTIVE_HIGH>;
enable-active-high;
regulator-always-on;
};
reg_hub_5v: regulator-hub-5v {
compatible = "regulator-fixed";
regulator-name = "HUB_5V";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
gpio = <&ioexp3 3 GPIO_ACTIVE_HIGH>;
enable-active-high;
regulator-always-on;
};
reg_vcc5v_usb: regulator-vcc5v-usb {
compatible = "regulator-fixed";
regulator-name = "VCC5V_USB";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
gpio = <&gpio1 22 GPIO_ACTIVE_HIGH>;
enable-active-high;
regulator-always-on;
};
reg_vdd33_lcd0: regulator-vdd33-lcd0 {
compatible = "regulator-fixed";
regulator-name = "lcd0_vdd33";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
gpio = <&ioexp3 5 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
reg_vdd18_lcd0: regulator-vdd18-lcd0 {
compatible = "regulator-fixed";
regulator-name = "lcd0_vdd18";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
gpio = <&ioexp3 6 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
reg_vdd_3v3: regulator-vdd-3v3 {
compatible = "regulator-fixed";
regulator-name = "vdd_3v3";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
gpio = <&gpio1 24 GPIO_ACTIVE_HIGH>;
enable-active-high;
regulator-boot-on;
regulator-always-on;
};
reg_vref_1v8: regulator-adc-verf {
compatible = "regulator-fixed";
regulator-name = "vref-1v8";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-always-on;
vin-supply = <&reg_vdd_3v3>;
};
reg_aud_3v3: regulator-aud-3v3 {
compatible = "regulator-fixed";
regulator-name = "aud_3v3";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
enable-active-high;
regulator-always-on;
};
reg_aud_1v8: regulator-aud-1v8 {
compatible = "regulator-fixed";
regulator-name = "aud_1v8";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
enable-active-high;
regulator-always-on;
};
reg_cam0_dvdd12: regulator-cam0-dvdd12 {
compatible = "regulator-fixed";
regulator-name = "dvdd12_cam0";
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
gpio = <&ioexp1 0 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
reg_cam0_avdd28: regulator-cam0-avdd28 {
compatible = "regulator-fixed";
regulator-name = "avdd28_cam0";
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
gpio = <&ioexp1 1 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
reg_cam0_dovdd18: regulator-cam0-dovdd18 {
compatible = "regulator-fixed";
regulator-name = "dovdd18_cam0";
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
gpio = <&ioexp1 2 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
mbox_910t_client2: mbox_910t_client2 {
compatible = "xuantie,th1520-mbox-client";
mbox-names = "906";
mboxes = <&mbox_910t 2 0>;
audio-mbox-regmap = <&audio_mbox>;
status = "okay";
};
th1520_rpmsg: th1520_rpmsg {
compatible = "th1520,rpmsg-bus", "simple-bus";
memory-region = <&rpmsgmem>;
#address-cells = <2>;
#size-cells = <2>;
ranges;
rpmsg: rpmsg{
vdev-nums = <1>;
reg = <0x0 0x1E000000 0 0x10000>;
compatible = "th1520,th1520-rpmsg";
log-memory-region = <&audio_log_mem>;
audio-text-memory-region = <&audio_text_mem>;
status = "okay";
};
};
hdmi_codec: hdmi_codec@1 {
#sound-dai-cells = <0>;
compatible = "xuantie,th1520-hdmi-pcm";
status = "okay";
sound-name-prefix = "DUMMY";
};
th1520_sound: soundcard@1 {
compatible = "simple-audio-card";
simple-audio-card,name = "TH1520-Sound-Card";
#address-cells = <1>;
#size-cells = <0>;
simple-audio-card,dai-link@0 { /* I2S - HDMI*/
reg = <0>;
format = "i2s";
cpu {
sound-dai = <&ap_i2s 1>;
};
codec {
sound-dai = <&hdmi_codec>;
};
};
simple-audio-card,dai-link@1 { /* I2S - AUDIO SYS CODEC 7210*/
reg = <1>;
format = "i2s";
cpu {
sound-dai = <&i2s1 0>;
};
codec {
sound-dai = <&es7210_audio_codec>;
};
};
simple-audio-card,dai-link@2 { /* I2S - AUDIO SYS CODEC 8156*/
reg = <2>;
format = "i2s";
cpu {
sound-dai = <&i2s1 0>;
};
codec {
sound-dai = <&es8156_audio_codec>;
};
};
};
usb-hub {
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
hub_2_0: hub@1 {
compatible = "usb2109,2817";
reg = <1>;
peer-hub = <&hub_3_0>;
vdd-supply = <&reg_hub_1v2>;
vbus-supply = <&reg_vcc5v_usb>;
};
hub_3_0: hub@2 {
compatible = "usb2109,817";
reg = <2>;
peer-hub = <&hub_2_0>;
vbus-supply = <&reg_vcc5v_usb>;
vdd-supply = <&reg_vcc5v_usb>;
};
};
wcn_wifi: wireless-wlan {
compatible = "wlan-platdata";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_wifi_wake>;
WIFI,poweren-gpios = <&ioexp2 4 0>;
power_on_after_init;
power_on_when_resume;
status = "okay";
};
wcn_bt: wireless-bluetooth {
compatible = "bluetooth-platdata";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_bt_wake>;
BT,power-gpios = <&ioexp2 5 0>;
status = "okay";
};
gpio-keys {
compatible = "gpio-keys";
key-volumedown {
label = "Volume Down Key";
linux,code = <KEY_VOLUMEDOWN>;
debounce-interval = <1>;
gpios = <&gpio1 19 GPIO_ACTIVE_LOW>;
};
key-volumeup {
label = "Volume Up Key";
linux,code = <KEY_VOLUMEUP>;
debounce-interval = <1>;
gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
};
key-sleep {
label = "Sleep Wake Key";
//wakeup-source;
linux,code = <KEY_SLEEP>;
debounce-interval = <1>;
gpios = <&aogpio 2 GPIO_ACTIVE_LOW>;
};
};
thermal-zones {
cpu-thermal {
sustainable-power = <1600>;
trips {
trip_active0: active-0 {
temperature = <39000>;
hysteresis = <5000>;
type = "active";
};
trip_active1: active-1 {
temperature = <50000>;
hysteresis = <5000>;
type = "active";
};
trip_active2: active-2 {
temperature = <60000>;
hysteresis = <5000>;
type = "active";
};
};
cooling-maps {
map-active-0 {
cooling-device = <&fan 1 1>;
trip = <&trip_active0>;
};
map-active-1 {
cooling-device = <&fan 2 2>;
trip = <&trip_active1>;
};
map-active-2 {
cooling-device = <&fan 3 3>;
trip = <&trip_active2>;
};
};
};
dev-thermal {
sustainable-power = <3000>;
};
};
soc {
compatible = "simple-bus";
interrupt-parent = <&plic>;
#address-cells = <2>;
#size-cells = <2>;
dma-noncoherent;
ranges;
vvcam_sensor3: vvcam_sensor@3 {//cam3 csi0 modified
sensor_name = "OV5693";
compatible = "xuantie,th1520-vvcam-sensor";
sensor_pdn = <&gpio1 28 0>; //powerdown pin / shutdown pin
sensor_rst = <&ioexp2 1 0>;
sensor_pdn_delay_us = <4000>; //powerdown pin / shutdown pin activated till I2C ready
sensor_regulators = "DOVDD18", "DVDD12", "AVDD28";
sensor_regulator_timing_us = <70 50 20>;
DOVDD18-supply = <&reg_cam0_dovdd18>;
DVDD12-supply = <&reg_cam0_dvdd12>;
AVDD28-supply = <&reg_cam0_avdd28>;
i2c_reg_width = /bits/ 8 <2>;
i2c_data_width = /bits/ 8 <1>;
i2c_addr = /bits/ 8 <0x36>;
i2c_bus = /bits/ 8 <0>;
status = "okay";
};
video2: cam_dev@300 {
compatible = "xuantie,th1520-video";
vi_mem_pool_region = <0>; // vi_mem: framebuffer, region[0]
status = "okay";
channel0 {
channel_id = <0>;
status = "okay";
sensor1 {
subdev_name = "vivcam";
idx = <3>;
csi_idx = <0>;
mode_idx = <1>;
path_type = "SENSOR_2592x1944_LINER";
};
dma {
subdev_name = "vipre";
idx = <0>;
path_type = "VIPRE_CSI0_ISP1";
};
isp {
subdev_name = "isp";
idx = <1>;
path_type = "ISP_MI_PATH_MP";
output {
max_width = <2600>;
max_height = <2000>;
bit_per_pixel = <12>;
frame_count = <3>;
};
};
};
channel1 {
sensor1 {
subdev_name = "vivcam";
idx = <3>;
csi_idx = <0>;
mode_idx = <1>;
path_type = "SENSOR_2592x1944_LINER";
};
dma {
subdev_name = "vipre";
idx = <0>;
path_type = "VIPRE_CSI0_ISP1";
};
isp {
subdev_name = "isp";
idx = <1>;
path_type = "ISP_MI_PATH_SP";
output {
max_width = <2600>;
max_height = <2000>;
bit_per_pixel = <12>;
frame_count = <3>;
};
};
};
channel2 {
sensor1 {
subdev_name = "vivcam";
idx = <3>;
csi_idx = <0>;
mode_idx = <1>;
path_type = "SENSOR_2592x1944_LINER";
};
dma {
subdev_name = "vipre";
idx = <0>;
path_type = "VIPRE_CSI0_ISP1";
};
isp {
subdev_name = "isp";
idx = <1>;
path_type = "ISP_MI_PATH_SP2_BP";
output {
max_width = <2600>;
max_height = <2000>;
bit_per_pixel = <12>;
frame_count = <3>;
};
};
};
};
video3: cam_dev@400{
compatible = "xuantie,th1520-video";
vi_mem_pool_region = <0>; // vi_mem: framebuffer, region[0]
status = "okay";
channel0 {
sensor1 {
subdev_name = "vivcam";
idx = <3>;
csi_idx = <0>;
mode_idx = <1>;
path_type = "SENSOR_2592x1944_LINER";
};
dma {
subdev_name = "vipre";
idx = <0>;
path_type = "VIPRE_CSI0_ISP1";
};
isp {
subdev_name = "isp";
idx = <1>;
path_type = "ISP_MI_PATH_MP";
output {
max_width = <2600>;
max_height = <2000>;
bit_per_pixel = <12>;
frame_count = <3>;
};
};
dw {
subdev_name = "dw";
idx = <0>;
path_type = "DW_DWE_VSE0";
dw_dst_depth = <2>;
};
};
channel1 {
sensor1 {
subdev_name = "vivcam";
idx = <3>;
csi_idx = <0>;
mode_idx = <1>;
path_type = "SENSOR_2592x1944_LINER";
};
dma {
subdev_name = "vipre";
idx = <0>;
path_type = "VIPRE_CSI0_ISP1";
};
isp {
subdev_name = "isp";
idx = <1>;
path_type = "ISP_MI_PATH_MP";
output {
max_width = <2600>;
max_height = <2000>;
bit_per_pixel = <12>;
frame_count = <3>;
};
};
dw {
subdev_name = "dw";
idx = <0>;
path_type = "DW_DWE_VSE1";
dw_dst_depth = <2>;
};
};
channel2 {
sensor1 {
subdev_name = "vivcam";
idx = <3>;
csi_idx = <0>;
mode_idx = <1>;
path_type = "SENSOR_2592x1944_LINER";
};
dma {
subdev_name = "vipre";
idx = <0>;
path_type = "VIPRE_CSI0_ISP1";
};
isp {
subdev_name = "isp";
idx = <1>;
path_type = "ISP_MI_PATH_MP";
output {
max_width = <2600>;
max_height = <2000>;
bit_per_pixel = <12>;
frame_count = <3>;
};
};
dw {
subdev_name = "dw";
idx = <0>;
path_type = "DW_DWE_VSE2";
dw_dst_depth = <2>;
};
};
};
};
};
&gmac0 {
pinctrl-names = "default";
pinctrl-0 = <&gmac0_pins &mdio0_pins>;
phy-handle = <&phy0>;
phy-mode = "rgmii-id";
status = "okay";
};
&gmac1 {
pinctrl-names = "default";
pinctrl-0 = <&gmac1_pins>;
phy-handle = <&phy1>;
phy-mode = "rgmii-id";
status = "okay";
};
&i2c0 {
pinctrl-names = "default";
pinctrl-0 = <&i2c0_pins>;
clock-frequency = <100000>;
i2c-sda-hold-time-ns = <300>;
i2c-sda-falling-time-ns = <510>;
i2c-scl-falling-time-ns = <510>;
status = "okay";
ioexp1: gpio@18 {
compatible = "nxp,pca9557";
reg = <0x18>;
gpio-controller;
#gpio-cells = <2>;
gpio-line-names = "cam0_dvdd12",
"cam0_avdd28",
"cam0_dovdd18";
};
};
&i2c1 {
pinctrl-names = "default";
pinctrl-0 = <&i2c1_pins>;
clock-frequency = <100000>;
i2c-sda-hold-time-ns = <300>;
i2c-sda-falling-time-ns = <510>;
i2c-scl-falling-time-ns = <510>;
status = "okay";
ioexp2: gpio@18 {
compatible = "nxp,pca9557";
reg = <0x18>;
gpio-controller;
#gpio-cells = <2>;
gpio-line-names = "",
"cam0_reset",
"cam1_reset",
"cam2_reset",
"wl_host_wake",
"bt_resetn",
"",
"bt_host_wake";
};
};
&i2c3 {
pinctrl-names = "default";
pinctrl-0 = <&i2c3_pins>;
clock-frequency = <100000>;
i2c-sda-hold-time-ns = <300>;
i2c-sda-falling-time-ns = <510>;
i2c-scl-falling-time-ns = <510>;
status = "okay";
ioexp3: gpio@18 {
compatible = "nxp,pca9557";
reg = <0x18>;
gpio-controller;
#gpio-cells = <2>;
gpio-line-names = "tp0_rst",
"",
"",
"vcc5v_usb",
"vdd28_tp0",
"vdd33_lcd0",
"vdd18_lcd0",
"lcd0_reset";
};
};
&mdio0 {
phy0: ethernet-phy@1 {
reg = <1>;
};
phy1: ethernet-phy@2 {
reg = <2>;
};
};
&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>;
};
};
gmac0_pins: gmac0-0 {
tx-pins {
pins = "GMAC0_TX_CLK",
"GMAC0_TXEN",
"GMAC0_TXD0",
"GMAC0_TXD1",
"GMAC0_TXD2",
"GMAC0_TXD3";
function = "gmac0";
bias-disable;
drive-strength = <25>;
input-disable;
input-schmitt-disable;
slew-rate = <0>;
};
rx-pins {
pins = "GMAC0_RX_CLK",
"GMAC0_RXDV",
"GMAC0_RXD0",
"GMAC0_RXD1",
"GMAC0_RXD2",
"GMAC0_RXD3";
function = "gmac0";
bias-disable;
drive-strength = <1>;
input-enable;
input-schmitt-disable;
slew-rate = <0>;
};
};
gmac1_pins: gmac1-0 {
tx-pins {
pins = "GPIO2_18", /* GMAC1_TX_CLK */
"GPIO2_20", /* GMAC1_TXEN */
"GPIO2_21", /* GMAC1_TXD0 */
"GPIO2_22", /* GMAC1_TXD1 */
"GPIO2_23", /* GMAC1_TXD2 */
"GPIO2_24"; /* GMAC1_TXD3 */
function = "gmac1";
bias-disable;
drive-strength = <25>;
input-disable;
input-schmitt-disable;
slew-rate = <0>;
};
rx-pins {
pins = "GPIO2_19", /* GMAC1_RX_CLK */
"GPIO2_25", /* GMAC1_RXDV */
"GPIO2_30", /* GMAC1_RXD0 */
"GPIO2_31", /* GMAC1_RXD1 */
"GPIO3_0", /* GMAC1_RXD2 */
"GPIO3_1"; /* GMAC1_RXD3 */
function = "gmac1";
bias-disable;
drive-strength = <1>;
input-enable;
input-schmitt-disable;
slew-rate = <0>;
};
};
i2c3_pins: i2c3-0 {
i2c-pins {
pins = "I2C3_SCL", "I2C3_SDA";
function = "i2c";
bias-disable;
drive-strength = <7>;
input-enable;
input-schmitt-enable;
slew-rate = <0>;
};
};
mdio0_pins: mdio0-0 {
mdc-pins {
pins = "GMAC0_MDC";
function = "gmac0";
bias-disable;
drive-strength = <13>;
input-disable;
input-schmitt-disable;
slew-rate = <0>;
};
mdio-pins {
pins = "GMAC0_MDIO";
function = "gmac0";
bias-disable;
drive-strength = <13>;
input-enable;
input-schmitt-enable;
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>;
};
};
spi_pins: spi-0 {
spi-pins {
pins = "SPI_SCLK", "SPI_MOSI", "SPI_MISO";
function = "spi";
bias-disable;
drive-strength = <7>;
input-enable;
input-schmitt-enable;
slew-rate = <0>;
};
};
hdmi_tx_pins: hdmi-tx-0 {
hdmi-pins {
pins = "HDMI_SCL", "HDMI_SDA", "HDMI_CEC";
function = "hdmi";
bias-disable;
drive-strength = <3>;
input-enable;
input-schmitt-disable;
slew-rate = <0>;
};
};
};
&padctrl1_apsys {
i2c0_pins: i2c0-0 {
i2c-pins {
pins = "I2C0_SCL", "I2C0_SDA";
function = "i2c";
bias-disable;
drive-strength = <7>;
input-enable;
input-schmitt-enable;
slew-rate = <0>;
};
};
i2c1_pins: i2c1-0 {
i2c-pins {
pins = "I2C1_SCL", "I2C1_SDA";
function = "i2c";
bias-disable;
drive-strength = <7>;
input-enable;
input-schmitt-enable;
slew-rate = <0>;
};
};
qspi1_pins: qspi1-0 {
qspi-pins {
pins = "QSPI1_SCLK", "QSPI1_D0_MOSI", "QSPI1_D1_MISO";
function = "qspi";
bias-disable;
drive-strength = <7>;
input-enable;
input-schmitt-enable;
slew-rate = <0>;
};
};
uart1_pins: uart1-0 {
tx-pins {
pins = "UART1_TXD";
function = "uart";
bias-disable;
drive-strength = <3>;
input-disable;
input-schmitt-disable;
slew-rate = <0>;
};
rx-pins {
pins = "UART1_RXD";
function = "uart";
bias-disable;
drive-strength = <1>;
input-enable;
input-schmitt-enable;
slew-rate = <0>;
};
};
uart3_pins: uart3-0 {
tx-pins {
pins = "UART3_TXD";
function = "uart";
bias-disable;
drive-strength = <3>;
input-disable;
input-schmitt-disable;
slew-rate = <0>;
};
rx-pins {
pins = "UART3_RXD";
function = "uart";
bias-disable;
drive-strength = <1>;
input-enable;
input-schmitt-enable;
slew-rate = <0>;
};
};
uart4_pins: uart4-0 {
tx-pins {
pins = "UART4_TXD";
function = "uart";
bias-disable;
drive-strength = <3>;
input-disable;
input-schmitt-disable;
slew-rate = <0>;
};
rx-pins {
pins = "UART4_RXD";
function = "uart";
bias-disable;
drive-strength = <1>;
input-enable;
input-schmitt-enable;
slew-rate = <0>;
};
};
pinctrl_wifi_wake: wifi_grp {
wifi-pins {
pins = "GPIO0_27";
function = "gpio";
bias-disable;
drive-strength = <7>;
input-disable;
input-schmitt-disable;
slew-rate = <0>;
};
};
pinctrl_bt_wake: bt_grp {
bt-pins {
pins = "GPIO0_28";
function = "gpio";
bias-disable;
drive-strength = <7>;
input-disable;
input-schmitt-disable;
slew-rate = <0>;
};
};
};
&padctrl_aosys {
i2s1_pa_pins: i2s1-pa-0 {
i2s-pa-pins {
pins = "AUDIO_PA14", "AUDIO_PA15", "AUDIO_PA16", "AUDIO_PA17";
function = "audio";
bias-disable;
drive-strength = <0>;
slew-rate = <0>;
};
};
aud_i2c0_pa_pins: aud-i2c0-pa-0 {
aud-i2c-pa-pins {
pins = "AUDIO_PA29", "AUDIO_PA30";
function = "audio";
bias-disable;
drive-strength = <0>;
slew-rate = <0>;
};
};
};
&padctrl_audiosys {
aud_i2c0_pins: aud-i2c0-0 {
i2c-pins {
pins = "PA29_FUNC", "PA30_FUNC";
function = "aud_i2c0";
bias-disable;
drive-strength = <7>;
input-schmitt-disable;
slew-rate = <0>;
};
};
i2s1_pins: i2s1-0 {
i2s-pins {
pins = "PA14_FUNC", "PA15_FUNC", "PA16_FUNC", "PA17_FUNC";
function = "aud_i2s1";
bias-disable;
drive-strength = <13>;
input-schmitt-disable;
slew-rate = <0>;
};
};
};
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pins>;
status = "okay";
};
&uart1 {
pinctrl-names = "default";
pinctrl-0 = <&uart1_pins>;
status = "okay";
};
&uart3 {
pinctrl-names = "default";
pinctrl-0 = <&uart3_pins>;
status = "okay";
};
&uart4 {
pinctrl-names = "default";
pinctrl-0 = <&uart4_pins>;
status = "okay";
};
&usb {
status = "okay";
hubswitch-gpio = <&aogpio 4 0>;
};
&usb_dwc3 {
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
};
&adc {
vref-supply = <&reg_vref_1v8>;
#io-channel-cells = <1>;
sampling-frequency = <1000000>;
resolution = <12>;
status = "okay";
};
&spi {
num-cs = <1>;
cs-gpios = <&gpio2 15 0>;
rx-sample-delay-ns = <10>;
pinctrl-names = "default";
pinctrl-0 = <&spi_pins>;
status = "okay";
spi_norflash@0 {
status = "okay";
#address-cells = <1>;
#size-cells = <1>;
compatible = "winbond,w25q64jwm", "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
w25q,fast-read;
};
};
&qspi1 {
// use one-line mode
compatible = "snps,dw-apb-ssi";
num-cs = <1>;
cs-gpios = <&gpio0 1 0>;
pinctrl-names = "default";
pinctrl-0 = <&qspi1_pins>;
status = "okay";
spidev@0 {
compatible = "spidev";
#address-cells = <0x1>;
#size-cells = <0x1>;
reg = <0x0>;
spi-max-frequency = <50000000>;
};
};
&sdio1 {
max-frequency = <100000000>;
bus-width = <4>;
pull_up;
no-sd;
no-mmc;
broken-cd;
io_fixed_1v8;
non-removable;
post-power-on-delay-ms = <1000>;
wprtn_ignore;
cap-sd-highspeed;
wakeup-source;
keep-power-in-suspend;
status = "okay";
};
&aon {
log-memory-region = <&aon_log_mem>;
status = "okay";
};
&resmem {
#address-cells = <2>;
#size-cells = <2>;
ranges;
/* global autoconfigured region for contiguous allocations */
cmamem: linux,cma {
compatible = "shared-dma-pool";
reusable;
size = <0 0x30000000>; // 768MB on lpi4a (SOM)
alloc-ranges = <0 0xc8000000 0 0x30000000>; // [0x0C800_0000 ~ 0x0F800_0000] linux,cma-default;
linux,cma-default;
};
dsp0_mem: memory@20000000 { /**0x2000_0000~0x2040_0000 4M**/
reg = <0x0 0x20000000 0x0 0x00280000 /* DSP FW code&data section 2.5M*/
0x0 0x20280000 0x0 0x00001000 /* DSP communication area 4K*/
0x0 0x20281000 0x0 0x00007000 /* Panic/log page 28K */
0x0 0x20288000 0x0 0x00178000>; /* DSP shared memory 1.5M-32K*/
};
dsp1_mem: memory@20400000 { /**0x2040_0000~0x2080_0000 4M**/
reg = <0x0 0x20400000 0x0 0x00280000 /* DSP FW code&data section */
0x0 0x20680000 0x0 0x00001000 /* DSP communication area */
0x0 0x20681000 0x0 0x00007000 /* Panic/log page*/
0x0 0x20688000 0x0 0x00178000>; /* DSP shared memory */
};
vi_mem: framebuffer@10000000 {
reg = <0x0 0x10000000 0x0 0x6700000>; /* vi_mem_pool_region[0] 44 MB (default) */
//0x0 0x12C00000 0x0 0x01D00000 /* vi_mem_pool_region[1] 29 MB */
//0x0 0x14900000 0x0 0x01E00000>; /* vi_mem_pool_region[2] 30 MB */
};
audio_text_mem: memory@32000000 {
reg = <0x0 0x32000000 0x0 0xE00000>;
//no-map;
};
audio_data_mem: memory@32E00000 {
reg = <0x0 0x32E00000 0x0 0x600000>;
//no-map;
};
audio_log_mem: memory@33400000 {
reg = <0x0 0x33400000 0x0 0x200000>;
};
//Note: with "no-map" reserv mem not saved in hibernation
rpmsgmem: memory@1E000000 {
reg = <0x0 0x1E000000 0x0 0x10000>;
};
aon_log_mem: memory@33600000 {
reg = <0x0 0x33600000 0x0 0x200000>;
};
regdump_mem: memory@38400000 {
reg = <0x0 0x38400000 0x0 0x1400000>;
no-map;
};
};
&regdump {
memory-region = <&regdump_mem>;
status = "okay";
};
&audio_i2c0 {
clock-frequency = <100000>;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&aud_i2c0_pa_pins>,
<&aud_i2c0_pins>;
es8156_audio_codec: es8156@8 {
#sound-dai-cells = <0>;
compatible = "everest,es8156";
reg = <0x08>;
sound-name-prefix = "ES8156";
AVDD-supply = <&reg_aud_3v3>;
DVDD-supply = <&reg_aud_1v8>;
PVDD-supply = <&reg_aud_1v8>;
};
es7210_audio_codec: es7210@40 {
#sound-dai-cells = <0>;
compatible = "MicArray_0";
reg = <0x40>;
sound-name-prefix = "ES7210";
MVDD-supply = <&reg_aud_3v3>;
AVDD-supply = <&reg_aud_3v3>;
DVDD-supply = <&reg_aud_1v8>;
PVDD-supply = <&reg_aud_1v8>;
};
};
&ap_i2s {
status = "okay";
};
&i2s1 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&i2s1_pa_pins>,
<&i2s1_pins>;
};
&isp0 {
status = "okay";
};
&isp1 {
status = "okay";
};
&isp_ry0 {
status = "okay";
};
&dewarp {
status = "okay";
};
&dec400_isp0 {
status = "okay";
};
&dec400_isp1 {
status = "okay";
};
&dec400_isp2 {
status = "okay";
};
&bm_visys {
status = "okay";
};
&bm_csi0 {
status = "okay";
};
&bm_csi1 {
status = "okay";
};
&bm_csi2 {
status = "okay";
};
&vidmem {
status = "okay";
memory-region = <&vi_mem>;
};
&vi_pre {
status = "okay";
};
&xtensa_dsp {
status = "okay";
};
&xtensa_dsp0 {
status = "okay";
memory-region = <&dsp0_mem>;
};
&xtensa_dsp1 {
status = "okay";
memory-region = <&dsp1_mem>;
};
&gpu {
status = "okay";
};
&npu {
vha_clk_rate = <1000000000>;
status = "okay";
};
&npu_opp_table {
opp-1000000000 {
opp-suspend;
};
};
&dpu_enc1 {
ports {
/delete-node/ port@0;
};
};
&disp1_out {
remote-endpoint = <&hdmi_tx_in>;
};
&hdmi_tx {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&hdmi_tx_pins>;
port@0 {
/* input */
hdmi_tx_in: endpoint {
remote-endpoint = <&disp1_out>;
};
};
};
&eip_28 {
status = "okay";
};