openEuler_kernel_rk3588/arch/arm64/boot/dts/rockchip/rk3588-firefly-port.dtsi
2026-01-21 18:59:54 +08:00

321 lines
6.1 KiB
Plaintext

// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright (c) 2021 Rockchip Electronics Co., Ltd.
*
*/
#include "rk3588-firefly-core.dtsi"
#include "rk3588-linux.dtsi"
/ {
firefly_leds: leds {
compatible = "gpio-leds";
status = "okay";
power_led: power {
label = ":power"; //green led
linux,default-trigger = "ir-power-click";
default-state = "on";
gpios = <&gpio1 RK_PB3 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&led_power>;
};
user_led: user {
label = ":user"; //yellow led
linux,default-trigger = "ir-user-click";
default-state = "off";
gpios = <&pca9555 PCA_IO0_3 GPIO_ACTIVE_HIGH>;
};
};
hdmi0_sound: hdmi0-sound {
status = "disabled";
compatible = "rockchip,hdmi";
rockchip,mclk-fs = <128>;
rockchip,card-name = "rockchip-hdmi0";
rockchip,cpu = <&i2s5_8ch>;
rockchip,codec = <&hdmi0>;
rockchip,jack-det;
};
dp0_sound: dp0-sound {
status = "disabled";
compatible = "rockchip,hdmi";
rockchip,card-name= "rockchip-dp0";
rockchip,mclk-fs = <512>;
rockchip,cpu = <&spdif_tx2>;
rockchip,codec = <&dp0 1>;
rockchip,jack-det;
};
spdif_tx1_dc: spdif-tx1-dc {
status = "disabled";
compatible = "linux,spdif-dit";
#sound-dai-cells = <0>;
};
spdif_tx1_sound: spdif-tx1-sound {
status = "disabled";
compatible = "simple-audio-card";
simple-audio-card,mclk-fs = <128>;
simple-audio-card,name = "rockchip,spdif-tx1";
simple-audio-card,cpu {
sound-dai = <&spdif_tx1>;
};
simple-audio-card,codec {
sound-dai = <&spdif_tx1_dc>;
};
};
adc_keys: adc-keys {
status = "okay";
compatible = "adc-keys";
io-channels = <&saradc 1>;
io-channel-names = "buttons";
keyup-threshold-microvolt = <1800000>;
poll-interval = <100>;
recovery-key{
label = "F12";
linux,code = <KEY_F12>;
press-threshold-microvolt = <17000>;
};
};
es8388_sound: es8388-sound {
status = "disabled";
compatible = "firefly,multicodecs-card";
rockchip,card-name = "rockchip-es8388";
hp-det-gpio = <&gpio1 RK_PC4 GPIO_ACTIVE_LOW>;
io-channels = <&saradc 3>;
io-channel-names = "adc-detect";
spk-con-gpio = <&gpio3 RK_PB2 GPIO_ACTIVE_HIGH>;
hp-con-gpio = <&gpio4 RK_PB0 GPIO_ACTIVE_HIGH>;
linein-type = <0>;
rockchip,format = "i2s";
rockchip,mclk-fs = <256>;
rockchip,cpu = <&i2s0_8ch>;
rockchip,codec = <&es8388>;
rockchip,audio-routing =
"Headphone", "LOUT1",
"Headphone", "ROUT1",
"Speaker", "LOUT2",
"Speaker", "ROUT2",
"Headphone", "Headphone Power",
"Headphone", "Headphone Power",
"Speaker", "Speaker Power",
"Speaker", "Speaker Power",
"LINPUT1", "Main Mic",
"LINPUT2", "Main Mic",
"RINPUT1", "Headset Mic",
"RINPUT2", "Headset Mic";
pinctrl-names = "default";
pinctrl-0 = <&hp_det>;
};
vcc5v0_host: vcc5v0-host {
compatible = "regulator-fixed";
regulator-name = "vcc5v0_host";
regulator-boot-on;
regulator-always-on;
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
enable-active-high;
gpio = <&pca9555 PCA_IO0_5 GPIO_ACTIVE_HIGH>;
vin-supply = <&vcc5v0_usb>;
status = "disabled";
};
vcc_hub_reset: vcc-hub-reset-regulator {
compatible = "regulator-fixed";
regulator-name = "vcc_hub_reset";
regulator-boot-on;
regulator-always-on;
enable-active-high;
status = "disabled";
gpio = <&pca9555 PCA_IO0_4 GPIO_ACTIVE_HIGH>; //PCA_IO 04
};
vbus5v0_typec_pwr_en: vbus5v0-typec-pwr-en-regulator {
compatible = "regulator-fixed";
regulator-name = "vbus5v0_typec_pwr_en";
enable-active-high;
status = "disabled";
gpio = <&pca9555 PCA_IO1_4 GPIO_ACTIVE_HIGH>; //PCA_IO 14
};
};
&i2s0_8ch {
status = "disabled";
pinctrl-0 = <&i2s0_lrck
&i2s0_sclk
&i2s0_sdi0
&i2s0_sdo0>;
};
&i2s5_8ch {
status = "okay";
};
&gmac1 {
/* Use rgmii-rxid mode to disable rx delay inside Soc */
phy-mode = "rgmii-rxid";
clock_in_out = "output";
snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
snps,reset-active-low;
/* Reset time is 20ms, 100ms for rtl8211f */
snps,reset-delays-us = <0 20000 100000>;
pinctrl-names = "default";
pinctrl-0 = <&gmac1_miim
&gmac1_tx_bus2
&gmac1_rx_bus2
&gmac1_rgmii_clk
&gmac1_rgmii_bus>;
tx_delay = <0x42>;
//rx_delay = <0x4f>;
phy-handle = <&rgmii_phy1>;
status = "disbaled";
};
&mdio1 {
rgmii_phy1: phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <0x1>;
};
};
&i2c3 {
status = "disabled";
es8388: es8388@11 {
status = "disabled";
#sound-dai-cells = <0>;
compatible = "everest,es8388", "everest,es8323";
reg = <0x11>;
clocks = <&cru I2S0_8CH_MCLKOUT>;
clock-names = "mclk";
assigned-clocks = <&cru I2S0_8CH_MCLKOUT>;
assigned-clock-rates = <12288000>;
pinctrl-names = "default";
pinctrl-0 = <&i2s0_mclk>;
};
};
&u2phy0_otg {
rockchip,typec-vbus-det;
};
&u2phy2_host {
phy-supply = <&vcc5v0_host>;
};
&u2phy3_host {
phy-supply = <&vcc5v0_host>;
};
&usbdp_phy0 {
orientation-switch;
svid = <0xff01>;
sbu1-dc-gpios = <&gpio4 RK_PA6 GPIO_ACTIVE_HIGH>;
sbu2-dc-gpios = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>;
port {
#address-cells = <1>;
#size-cells = <0>;
usbdp_phy0_orientation_switch: endpoint@0 {
reg = <0>;
remote-endpoint = <&usbc0_orien_sw>;
};
usbdp_phy0_dp_altmode_mux: endpoint@1 {
reg = <1>;
remote-endpoint = <&dp_altmode_mux>;
};
};
};
&usbdrd_dwc3_0 {
dr_mode = "otg";
usb-role-switch;
port {
#address-cells = <1>;
#size-cells = <0>;
dwc3_0_role_switch: endpoint@0 {
reg = <0>;
remote-endpoint = <&usbc0_role_sw>;
};
};
};
&usbhost3_0 {
status = "disabled";
};
&usbhost_dwc3_0 {
status = "disabled";
};
&u2phy0 {
status = "okay";
};
&u2phy2 {
status = "okay";
};
&u2phy3 {
status = "okay";
};
&u2phy0_otg {
status = "okay";
};
&u2phy2_host {
status = "okay";
};
&u2phy3_host {
status = "okay";
};
&usb_host0_ehci {
status = "okay";
};
&usb_host0_ohci {
status = "okay";
};
&usb_host1_ehci {
status = "okay";
};
&usb_host1_ohci {
status = "okay";
};
&usbdp_phy0 {
status = "okay";
};
&usbdp_phy0_dp {
status = "okay";
};
&usbdp_phy0_u3 {
status = "okay";
};
&usbdrd3_0 {
status = "okay";
};
&usbdrd_dwc3_0 {
dr_mode = "otg";
status = "okay";
};