// SPDX-License-Identifier: (GPL-2.0+ OR MIT) /* * Copyright (c) 2021 Rockchip Electronics Co., Ltd. * */ #include "dt-bindings/usb/pd.h" #include "rk3588.dtsi" #include "rk3588-blueberry.dtsi" #include "rk3588-rk806-single.dtsi" / { /* If hdmirx node is disabled, delete the reserved-memory node here. */ reserved-memory { #address-cells = <2>; #size-cells = <2>; ranges; /* Reserve 256MB memory for hdmirx-controller@fdee0000 */ cma { compatible = "shared-dma-pool"; reusable; reg = <0x0 (256 * 0x100000) 0x0 (256 * 0x100000)>; linux,cma-default; }; }; hdmiin-sound { compatible = "rockchip,hdmi"; rockchip,mclk-fs = <128>; rockchip,format = "i2s"; rockchip,bitclock-master = <&hdmirx_ctrler>; rockchip,frame-master = <&hdmirx_ctrler>; rockchip,card-name = "rockchip-hdmiin"; rockchip,cpu = <&i2s7_8ch>; rockchip,codec = <&hdmirx_ctrler 0>; rockchip,jack-det; }; leds: leds { compatible = "gpio-leds"; wifi_led: wifi-led { gpios = <&gpio3 RK_PC5 GPIO_ACTIVE_HIGH>; default-state = "off"; }; hdd_led: hdd-led { gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_HIGH>; default-state = "off"; }; eth_led: eth-led { gpios = <&gpio3 RK_PC0 GPIO_ACTIVE_HIGH>; default-state = "off"; }; work_led: work-led { gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_HIGH>; linux,default-trigger = "heartbeat"; }; }; gpio_keys: gpio-keys { compatible = "gpio-keys"; autorepeat; pinctrl-names = "default"; pinctrl-0 = <&pwrbtn>; power { debounce-interval = <100>; gpios = <&gpio1 RK_PD3 GPIO_ACTIVE_LOW>; label = "GPIO Key Power"; linux,code = ; wakeup-source; }; }; pcie30_avdd0v75: pcie30-avdd0v75 { compatible = "regulator-fixed"; regulator-name = "pcie30_avdd0v75"; regulator-boot-on; regulator-always-on; regulator-min-microvolt = <750000>; regulator-max-microvolt = <750000>; vin-supply = <&vdd_0v75_s0>; }; pcie30_avdd1v8: pcie30-avdd1v8 { compatible = "regulator-fixed"; regulator-name = "pcie30_avdd1v8"; regulator-boot-on; regulator-always-on; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; vin-supply = <&avcc_1v8_s0>; }; 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>; }; vcc5v0_sys: vcc5v0-sys { compatible = "regulator-fixed"; regulator-name = "vcc5v0_sys"; regulator-always-on; regulator-boot-on; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; vin-supply = <&vcc12v_dcin>; }; vcc5v0_host: vcc5v0-host-regulator { 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_sys>; pinctrl-names = "default"; pinctrl-0 = <&vcc5v0_host_en>; }; vcc5v0_otg: vcc5v0-otg-regulator { compatible = "regulator-fixed"; regulator-name = "vcc5v0_otg"; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; enable-active-high; gpio = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>; vin-supply = <&vcc5v0_sys>; pinctrl-names = "default"; pinctrl-0 = <&vcc5v0_otg_en>; }; vcc_1v1_nldo_s3: vcc-1v1-nldo-s3 { compatible = "regulator-fixed"; regulator-name = "vcc_1v1_nldo_s3"; regulator-always-on; regulator-boot-on; regulator-min-microvolt = <1100000>; regulator-max-microvolt = <1100000>; vin-supply = <&vcc5v0_sys>; }; wireless_bluetooth: wireless-bluetooth { compatible = "bluetooth-platdata"; clocks = <&hym8563>; clock-names = "ext_clock"; uart_rts_gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_LOW>; pinctrl-names = "default", "rts_gpio"; pinctrl-0 = <&uart6m1_rtsn>, <&bt_gpio>; pinctrl-1 = <&uart6_gpios>; BT,reset_gpio = <&gpio1 RK_PB2 GPIO_ACTIVE_HIGH>; BT,wake_gpio = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>; BT,wake_host_irq = <&gpio1 RK_PB0 GPIO_ACTIVE_HIGH>; status = "okay"; }; wireless_wlan: wireless-wlan { compatible = "wlan-platdata"; wifi_chip_type = "ap6275p"; pinctrl-names = "default"; pinctrl-0 = <&wifi_host_wake_irq>, <&wifi_poweren_gpio>; WIFI,host_wake_irq = <&gpio1 RK_PA7 GPIO_ACTIVE_HIGH>; WIFI,poweren_gpio = <&gpio1 RK_PB1 GPIO_ACTIVE_HIGH>; status = "okay"; }; }; &combphy0_ps { status = "okay"; }; &combphy1_ps { status = "okay"; }; &combphy2_psu { status = "okay"; }; &dp0 { status = "disable"; }; //&dp0_in_vp1 { // status = "okay"; //}; &dp1 { pinctrl-0 = <&dp1m0_pins>; pinctrl-names = "default"; status = "okay"; }; &dp1_in_vp1 { status = "okay"; }; &dp1_sound{ status = "okay"; }; &gmac0 { /* Use rgmii-rxid mode to disable rx delay inside Soc */ phy-mode = "rgmii-rxid"; clock_in_out = "output"; snps,reset-gpio = <&gpio4 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 = <&gmac0_miim &gmac0_tx_bus2 &gmac0_rx_bus2 &gmac0_rgmii_clk &gmac0_rgmii_bus>; tx_delay = <0x44>; /* rx_delay = <0x4f>; */ phy-handle = <&rgmii_phy0>; status = "okay"; }; &hdmi0 { enable-gpios = <&gpio4 RK_PB1 GPIO_ACTIVE_HIGH>; cec-enable = "true" ; hdcp1x-enable; status = "okay"; }; &hdmi0_in_vp0 { status = "okay"; }; &hdmi0_sound { status = "okay"; }; &hdptxphy_hdmi0 { status = "okay"; }; &hdmi1 { enable-gpios = <&gpio4 RK_PB2 GPIO_ACTIVE_HIGH>; cec-enable = "true" ; hdcp1x-enable; status = "okay"; }; &hdmi1_in_vp2 { status = "okay"; }; &hdmi1_sound { status = "okay"; }; &hdptxphy_hdmi1 { status = "okay"; }; /* Should work with at least 128MB cma reserved above. */ &hdmirx_ctrler { status = "okay"; #sound-dai-cells = <1>; /* Effective level used to trigger HPD: 0-low, 1-high */ hpd-trigger-level = <1>; hdmirx-det-gpios = <&gpio1 29 GPIO_ACTIVE_LOW>; //gpio1_d5 }; &i2c0 { status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&i2c0m2_xfer>; vdd_cpu_big0_s0: vdd_cpu_big0_mem_s0: rk8602@42 { compatible = "rockchip,rk8602"; reg = <0x42>; vin-supply = <&vcc5v0_sys>; regulator-compatible = "rk860x-reg"; regulator-name = "vdd_cpu_big0_s0"; regulator-min-microvolt = <550000>; regulator-max-microvolt = <1050000>; regulator-ramp-delay = <2300>; rockchip,suspend-voltage-selector = <1>; regulator-boot-on; regulator-always-on; regulator-state-mem { regulator-off-in-suspend; }; }; vdd_cpu_big1_s0: vdd_cpu_big1_mem_s0: rk8603@43 { compatible = "rockchip,rk8603"; reg = <0x43>; vin-supply = <&vcc5v0_sys>; regulator-compatible = "rk860x-reg"; regulator-name = "vdd_cpu_big1_s0"; regulator-min-microvolt = <550000>; regulator-max-microvolt = <1050000>; regulator-ramp-delay = <2300>; rockchip,suspend-voltage-selector = <1>; regulator-boot-on; regulator-always-on; regulator-state-mem { regulator-off-in-suspend; }; }; }; &i2c2 { status = "okay"; vdd_npu_s0: vdd_npu_mem_s0: rk8602@42 { compatible = "rockchip,rk8602"; reg = <0x42>; vin-supply = <&vcc5v0_sys>; regulator-compatible = "rk860x-reg"; regulator-name = "vdd_npu_s0"; regulator-min-microvolt = <550000>; regulator-max-microvolt = <950000>; regulator-ramp-delay = <2300>; rockchip,suspend-voltage-selector = <1>; regulator-boot-on; regulator-always-on; regulator-state-mem { regulator-off-in-suspend; }; }; }; &i2c5 { pinctrl-names = "default"; pinctrl-0 = <&i2c5m3_xfer>; status = "okay"; }; &i2c6 { status = "okay"; usbc0: fusb302@22 { compatible = "fcs,fusb302"; reg = <0x22>; interrupt-parent = <&gpio3>; interrupts = ; pinctrl-names = "default"; pinctrl-0 = <&usbc0_int>; vbus-supply = <&vcc5v0_otg>; status = "okay"; ports { #address-cells = <1>; #size-cells = <0>; port@0 { reg = <0>; usbc0_role_sw: endpoint@0 { remote-endpoint = <&dwc3_0_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 = ; source-pdos = ; 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_phy0_orientation_switch>; }; }; port@1 { reg = <1>; dp_altmode_mux: endpoint { remote-endpoint = <&usbdp_phy0_dp_altmode_mux>; }; }; }; }; }; hym8563: hym8563@51 { compatible = "haoyu,hym8563"; reg = <0x51>; #clock-cells = <0>; clock-frequency = <32768>; clock-output-names = "hym8563"; pinctrl-names = "default"; pinctrl-0 = <&hym8563_int>; interrupt-parent = <&gpio0>; interrupts = ; wakeup-source; }; }; //hdmi01 sound &i2s5_8ch { status = "okay"; }; //hdmi02 sound &i2s6_8ch { status = "okay"; }; //hdmiin sound &i2s7_8ch { status = "okay"; }; &mdio0 { rgmii_phy0: phy@1 { compatible = "ethernet-phy-ieee802.3-c22"; reg = <0x1>; }; }; &mdio1 { rgmii_phy1: phy@1 { compatible = "ethernet-phy-ieee802.3-c22"; reg = <0x1>; }; }; &pcie2x1l0 { reset-gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_HIGH>; rockchip,skip-scan-in-resume; status = "okay"; }; &rk806single { pinctrl-names = "default", "pmic-power-off"; pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>, <&rk806_dvs2_null>, <&rk806_dvs3_null>; pinctrl-1 = <&rk806_dvs1_slp>, <&rk806_dvs2_null>, <&rk806_dvs3_null>; regulators { avcc_1v8_s0: PLDO_REG1 { regulator-always-on; regulator-boot-on; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; regulator-name = "avcc_1v8_s0"; regulator-state-mem { regulator-on-in-suspend; regulator-suspend-microvolt = <1800000>; }; }; }; }; &wdt { status = "okay"; }; &vdd_log_s0 { //fox.luo@2022.05.26 don't wake up regulator-state-mem { regulator-on-in-suspend; regulator-suspend-microvolt = <750000>; }; }; &rockchip_suspend { status = "okay"; rockchip,sleep-debug-en = <1>; rockchip,virtual-poweroff = <1>; rockchip,sleep-mode-config = < (0 | RKPM_SLP_ARMOFF_DDRPD ) >; rockchip,wakeup-config = < (0 | RKPM_CPU0_WKUP_EN | RKPM_GPIO_WKUP_EN ) >; }; &route_hdmi0 { status = "okay"; connect = <&vp0_out_hdmi0>; }; &route_hdmi1 { status = "okay"; connect = <&vp2_out_hdmi1>; }; &sata0 { status = "okay"; }; //rs485 &uart0 { status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&uart0m2_xfer>; }; //rs232 &uart3 { status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&uart3m2_xfer>; }; &uart6 { status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&uart6m1_xfer &uart6m1_ctsn>; }; &sdhci { bus-width = <8>; no-sdio; no-sd; non-removable; max-frequency = <200000000>; mmc-hs400-1_8v; mmc-hs400-enhanced-strobe; status = "okay"; }; &pinctrl { wireless-bluetooth { uart6_gpios: uart6-gpios { rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>; }; bt_gpio: bt-gpio { rockchip,pins = <1 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>, <1 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>, <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_down>; }; }; wireless-wlan { wifi_host_wake_irq: wifi-host-wake-irq { rockchip,pins = <1 RK_PA7 RK_FUNC_GPIO &pcfg_pull_down>; }; wifi_poweren_gpio: wifi-poweren-gpio { rockchip,pins = <1 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>; }; }; buttons { pwrbtn: pwrbtn { rockchip,pins = <1 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>; }; }; hym8563 { hym8563_int: hym8563-int { rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>; }; }; usb { vcc5v0_host_en: vcc5v0-host-en { rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>; }; }; usb-typec { usbc0_int: usbc0-int { rockchip,pins = <3 RK_PC7 RK_FUNC_GPIO &pcfg_pull_up>; }; vcc5v0_otg_en: vcc5v0-otg-en { rockchip,pins = <4 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>; }; }; }; //type-c0 &u2phy0 { status = "okay"; }; &u2phy1 { status = "okay"; }; //usb2.0 host0 &u2phy2 { status = "okay"; }; //usb2.0 host1 &u2phy3 { status = "okay"; }; &u2phy0_otg { rockchip,typec-vbus-det; status = "okay"; }; &u2phy1_otg { phy-supply = <&vcc5v0_host>; status = "okay"; }; &u2phy2_host { phy-supply = <&vcc5v0_host>; status = "okay"; }; &u2phy3_host { phy-supply = <&vcc5v0_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 { orientation-switch; svid = <0xff01>; sbu1-dc-gpios = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>; sbu2-dc-gpios = <&gpio0 RK_PD3 GPIO_ACTIVE_HIGH>; status = "okay"; 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>; }; }; }; &usbdp_phy0_dp { status = "okay"; }; &usbdp_phy0_u3 { status = "okay"; }; &usbdp_phy1 { rockchip,dp-lane-mux = < 0 1 2 3 >; status = "okay"; }; &usbdp_phy1_dp { status = "okay"; }; &usbdp_phy1_u3 { maximum-speed = "high-speed"; status = "okay"; }; &usbdrd3_0 { status = "okay"; }; &usbdrd3_1 { status = "okay"; }; &usbdrd_dwc3_0 { dr_mode = "otg"; usb-role-switch; status = "okay"; port { #address-cells = <1>; #size-cells = <0>; dwc3_0_role_switch: endpoint@0 { reg = <0>; remote-endpoint = <&usbc0_role_sw>; }; }; }; &usbdrd_dwc3_1 { dr_mode = "host"; maximum-speed = "high-speed"; status = "okay"; }; &usbhost3_0 { status = "okay"; }; &usbhost_dwc3_0 { dr_mode = "host"; status = "okay"; }; &vdd_vdenc_s0 { regulator-init-microvolt = <750000>; };