502 lines
9.5 KiB
Plaintext

// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright (c) 2024 Rockchip Electronics Co., Ltd.
*
*/
/dts-v1/;
#include <dt-bindings/usb/pd.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pwm/pwm.h>
#include <dt-bindings/pinctrl/rockchip.h>
#include <dt-bindings/display/rockchip_vop.h>
#include "rk3576-armsom-cm5.dtsi"
#include "rk3576-linux.dtsi"
/ {
model = "ArmSoM CM5 IO";
compatible = "armsom,cm5-io", "rockchip,rk3576";
/delete-node/ chosen;
dp0_sound: dp0-sound {
compatible = "rockchip,hdmi";
rockchip,mclk-fs = <512>;
rockchip,card-name = "rockchip-dp0";
rockchip,cpu = <&spdif_tx3>;
rockchip,codec = <&dp0 1>;
rockchip,jack-det;
};
es8388_sound: es8388-sound {
compatible = "simple-audio-card";
simple-audio-card,format = "i2s";
simple-audio-card,mclk-fs = <256>;
simple-audio-card,name = "rockchip,es8388-codec";
simple-audio-card,dai-link@0 {
format = "i2s";
cpu {
sound-dai = <&sai1>;
};
codec {
sound-dai = <&es8388>;
};
};
};
fan: pwm-fan {
compatible = "pwm-fan";
#cooling-cells = <2>;
pwms = <&pwm2_8ch_6 0 50000 0>;
cooling-levels = <0 50 100 150 200 255>;
rockchip,temp-trips = <
50000 1
55000 2
60000 3
65000 4
70000 5
>;
};
hdmi_sound: hdmi-sound {
compatible = "rockchip,hdmi";
rockchip,mclk-fs = <128>;
rockchip,card-name = "rockchip-hdmi";
rockchip,cpu = <&sai6>;
rockchip,codec = <&hdmi>;
rockchip,jack-det;
};
leds: leds {
compatible = "gpio-leds";
work_led: work {
gpios = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "heartbeat";
};
};
vcc12v_dcin: vcc12v-dcin {
compatible = "regulator-fixed";
regulator-name = "vcc12v_dcin";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <12000000>;
regulator-max-microvolt = <12000000>;
};
vcc_sys: vcc5v0-sys {
compatible = "regulator-fixed";
regulator-name = "vcc_sys";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
vin-supply = <&vcc12v_dcin>;
};
vcc5v0_device: vcc5v0-device {
compatible = "regulator-fixed";
regulator-name = "vcc5v0_device";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
vin-supply = <&vcc12v_dcin>;
};
vcc_2v0_pldo_s3: vcc-2v0-pldo-s3 {
compatible = "regulator-fixed";
regulator-name = "vcc_2v0_pldo_s3";
regulator-boot-on;
regulator-always-on;
regulator-min-microvolt = <2000000>;
regulator-max-microvolt = <2000000>;
vin-supply = <&vcc_sys>;
};
vcc_1v1_nldo_s3: vcc-1v1-nldo-s3 {
compatible = "regulator-fixed";
regulator-name = "vcc_1v1_nldo_s3";
regulator-boot-on;
regulator-always-on;
regulator-min-microvolt = <1100000>;
regulator-max-microvolt = <1100000>;
vin-supply = <&vcc_sys>;
};
vcc_1v8_s0: vcc-1v8-s0 {
compatible = "regulator-fixed";
regulator-name = "vcc_1v8_s0";
regulator-boot-on;
regulator-always-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
vin-supply = <&vcc_1v8_s3>;
};
vcc_3v3_s0: vcc-3v3-s0 {
compatible = "regulator-fixed";
regulator-name = "vcc_3v3_s0";
regulator-boot-on;
regulator-always-on;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
vin-supply = <&vcc_3v3_s3>;
};
vcc3v3_rtc_s5: vcc3v3-rtc-s5 {
compatible = "regulator-fixed";
regulator-name = "vcc3v3_rtc_s5";
regulator-boot-on;
regulator-always-on;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
vin-supply = <&vcc_sys>;
};
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 = <&gpio4 RK_PB0 GPIO_ACTIVE_HIGH>;
vin-supply = <&vcc5v0_device>;
pinctrl-names = "default";
pinctrl-0 = <&usb_host_pwren>;
};
vbus5v0_typec: vbus5v0-typec {
compatible = "regulator-fixed";
regulator-name = "vbus5v0_typec";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
enable-active-high;
gpio = <&gpio2 RK_PB6 GPIO_ACTIVE_HIGH>;
vin-supply = <&vcc5v0_device>;
pinctrl-names = "default";
pinctrl-0 = <&usb_otg0_pwren>;
};
vcc3v3_pcie0: vcc3v3-pcie0 {
compatible = "regulator-fixed";
regulator-name = "vcc3v3_pcie0";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
enable-active-high;
gpios = <&gpio0 RK_PC3 GPIO_ACTIVE_HIGH>;
startup-delay-us = <5000>;
vin-supply = <&vcc12v_dcin>;
};
};
&combphy0_ps {
status = "okay";
};
&combphy1_psu {
status = "okay";
};
&display_subsystem {
clocks = <&hdptxphy_hdmi>;
clock-names = "hdmi0_phy_pll";
};
&dp {
status = "okay";
};
&dp0 {
status = "okay";
};
&dp0_in_vp2 {
status = "okay";
};
&gmac0 {
/* Use rgmii-rxid mode to disable rx delay inside Soc */
phy-mode = "rgmii-rxid";
clock_in_out = "output";
snps,reset-gpio = <&gpio2 RK_PB3 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 = <&eth0m0_miim
&eth0m0_tx_bus2
&eth0m0_rx_bus2
&eth0m0_rgmii_clk
&eth0m0_rgmii_bus
&ethm0_clk0_25m_out>;
tx_delay = <0x21>;
/* rx_delay = <0x3f>; */
phy-handle = <&rgmii_phy0>;
status = "okay";
};
&hdmi {
status = "okay";
//enable-gpios = <&gpio2 RK_PB0 GPIO_ACTIVE_HIGH>;
rockchip,sda-falling-delay-ns = <360>;
};
&hdmi_in_vp0 {
status = "okay";
};
&hdptxphy_hdmi {
status = "okay";
};
&i2c0 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&i2c0m1_xfer>;
es8388: es8388@10 {
status = "okay";
#sound-dai-cells = <0>;
compatible = "everest,es8388", "everest,es8323";
reg = <0x10>;
clocks = <&mclkout_sai1>;
clock-names = "mclk";
assigned-clocks = <&mclkout_sai1>;
assigned-clock-rates = <12288000>;
pinctrl-names = "default";
pinctrl-0 = <&sai1m0_mclk>;
};
usbc0: fusb302@22 {
compatible = "fcs,fusb302";
reg = <0x22>;
interrupt-parent = <&gpio0>;
interrupts = <RK_PB4 IRQ_TYPE_LEVEL_LOW>;
int-n-gpios = <&gpio0 RK_PB4 GPIO_ACTIVE_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&usbc0_int>;
vbus-supply = <&vbus5v0_typec>;
status = "okay";
port {
usbc0_role_sw: endpoint {
remote-endpoint = <&usb_drd0_role_switch>;
};
};
usb_con: connector {
compatible = "usb-c-connector";
label = "USB-C";
data-role = "dual";
power-role = "dual";
try-power-role = "sink";
op-sink-microwatt = <1000000>;
sink-pdos =
<PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)
PDO_FIXED(9000, 3000, PDO_FIXED_USB_COMM)
PDO_FIXED(12000, 3000, PDO_FIXED_USB_COMM) >;
source-pdos =
<PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
altmodes {
#address-cells = <1>;
#size-cells = <0>;
altmode@0 {
reg = <0>;
svid = <0xff01>;
vdo = <0xffffffff>;
};
};
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
usbc0_orien_sw: endpoint {
remote-endpoint = <&usbdp_phy_orientation_switch>;
};
};
port@1 {
reg = <1>;
dp_altmode_mux: endpoint {
remote-endpoint = <&usbdp_phy_dp_altmode_mux>;
};
};
};
};
};
};
&mdio0 {
rgmii_phy0: phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <0x1>;
clocks = <&cru REFCLKO25M_GMAC0_OUT>;
};
};
&pcie0 {
reset-gpios = <&gpio2 RK_PB1 GPIO_ACTIVE_HIGH>;
vpcie3v3-supply = <&vcc3v3_pcie0>;
status = "okay";
};
&pinctrl {
headphone {
hp_det: hp-det {
rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
usb {
usb_host_pwren: usb-host-pwren {
rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
};
usb_otg0_pwren: usb-otg0-pwren {
rockchip,pins = <2 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
};
usbc0_int: usbc0-int {
rockchip,pins = <0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
};
&pwm2_8ch_6 {
status = "okay";
pinctrl-0 = <&pwm2m2_ch6>;
};
&route_hdmi {
status = "okay";
connect = <&vp0_out_hdmi>;
};
&sai1 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&sai1m0_lrck
&sai1m0_sclk
&sai1m0_sdi0
&sai1m0_sdo0>;
};
&sai6 {
status = "okay";
};
&sdmmc {
max-frequency = <200000000>;
no-sdio;
no-mmc;
bus-width = <4>;
cap-mmc-highspeed;
cap-sd-highspeed;
disable-wp;
sd-uhs-sdr104;
vqmmc-supply = <&vccio_sd_s0>;
status = "okay";
};
&spdif_tx3 {
status = "okay";
};
&u2phy0 {
status = "okay";
};
&u2phy1 {
status = "okay";
};
&u2phy0_otg {
status = "okay";
rockchip,typec-vbus-det;
};
&u2phy1_otg {
status = "okay";
phy-supply = <&vcc5v0_host>;
};
&usbdp_phy {
status = "okay";
orientation-switch;
svid = <0xff01>;
sbu1-dc-gpios = <&gpio4 RK_PC4 GPIO_ACTIVE_HIGH>;
sbu2-dc-gpios = <&gpio4 RK_PC5 GPIO_ACTIVE_HIGH>;
port {
#address-cells = <1>;
#size-cells = <0>;
usbdp_phy_orientation_switch: endpoint@0 {
reg = <0>;
remote-endpoint = <&usbc0_orien_sw>;
};
usbdp_phy_dp_altmode_mux: endpoint@1 {
reg = <1>;
remote-endpoint = <&dp_altmode_mux>;
};
};
};
&usbdp_phy_dp {
status = "okay";
};
&usbdp_phy_u3 {
status = "okay";
};
&usb_drd0_dwc3 {
status = "okay";
dr_mode = "otg";
usb-role-switch;
port {
usb_drd0_role_switch: endpoint {
remote-endpoint = <&usbc0_role_sw>;
};
};
};
&usb_drd1_dwc3 {
dr_mode = "host";
status = "okay";
};
&vop {
status = "okay";
vop-supply = <&vdd_logic_s0>;
};
&vop_mmu {
status = "okay";
};
&vp0 {
status = "okay";
};
&vp2 {
status = "okay";
assigned-clocks = <&cru DCLK_VP2_SRC>;
assigned-clock-parents = <&cru PLL_VPLL>;
};