| // SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
| /* |
| * Copyright (c) 2023 Ondřej Jirman <megi@xff.cz> |
| */ |
| |
| /dts-v1/; |
| |
| #include <dt-bindings/gpio/gpio.h> |
| #include <dt-bindings/pinctrl/rockchip.h> |
| #include <dt-bindings/soc/rockchip,vop2.h> |
| #include <dt-bindings/usb/pd.h> |
| #include "rk3588-orangepi-5.dtsi" |
| |
| / { |
| model = "Xunlong Orange Pi 5 Plus"; |
| compatible = "xunlong,orangepi-5-plus", "rockchip,rk3588"; |
| |
| hdmi0-con { |
| compatible = "hdmi-connector"; |
| type = "a"; |
| |
| port { |
| hdmi0_con_in: endpoint { |
| remote-endpoint = <&hdmi0_out_con>; |
| }; |
| }; |
| }; |
| |
| hdmi1-con { |
| compatible = "hdmi-connector"; |
| type = "a"; |
| |
| port { |
| hdmi1_con_in: endpoint { |
| remote-endpoint = <&hdmi1_out_con>; |
| }; |
| }; |
| }; |
| |
| ir-receiver { |
| compatible = "gpio-ir-receiver"; |
| gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_LOW>; |
| pinctrl-names = "default"; |
| pinctrl-0 = <&ir_receiver_pin>; |
| }; |
| |
| rfkill { |
| compatible = "rfkill-gpio"; |
| label = "rfkill-pcie-wlan"; |
| radio-type = "wlan"; |
| shutdown-gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>; |
| }; |
| |
| vbus5v0_typec: regulator-vbus-typec { |
| compatible = "regulator-fixed"; |
| enable-active-high; |
| gpio = <&gpio4 RK_PB0 GPIO_ACTIVE_HIGH>; |
| pinctrl-names = "default"; |
| pinctrl-0 = <&typec5v_pwren>; |
| regulator-name = "vbus5v0_typec"; |
| regulator-min-microvolt = <5000000>; |
| regulator-max-microvolt = <5000000>; |
| vin-supply = <&vcc5v0_sys>; |
| }; |
| }; |
| |
| &speaker_amp { |
| enable-gpios = <&gpio3 RK_PC0 GPIO_ACTIVE_HIGH>; |
| status = "okay"; |
| }; |
| |
| &headphone_amp { |
| enable-gpios = <&gpio3 RK_PA7 GPIO_ACTIVE_HIGH>; |
| }; |
| |
| &analog_sound { |
| pinctrl-names = "default"; |
| pinctrl-0 = <&hp_detect>; |
| simple-audio-card,aux-devs = <&speaker_amp>, <&headphone_amp>; |
| simple-audio-card,hp-det-gpios = <&gpio1 RK_PD3 GPIO_ACTIVE_LOW>; |
| simple-audio-card,widgets = |
| "Microphone", "Onboard Microphone", |
| "Microphone", "Microphone Jack", |
| "Speaker", "Speaker", |
| "Headphone", "Headphones"; |
| |
| simple-audio-card,routing = |
| "Headphones", "LOUT1", |
| "Headphones", "ROUT1", |
| "Speaker", "LOUT2", |
| "Speaker", "ROUT2", |
| |
| "Headphones", "Headphones Amp OUTL", |
| "Headphones", "Headphones Amp OUTR", |
| "Headphones Amp INL", "LOUT1", |
| "Headphones Amp INR", "ROUT1", |
| |
| "Speaker", "Speaker Amp OUTL", |
| "Speaker", "Speaker Amp OUTR", |
| "Speaker Amp INL", "LOUT2", |
| "Speaker Amp INR", "ROUT2", |
| |
| /* single ended signal to LINPUT1 */ |
| "LINPUT1", "Microphone Jack", |
| "RINPUT1", "Microphone Jack", |
| /* differential signal */ |
| "LINPUT2", "Onboard Microphone", |
| "RINPUT2", "Onboard Microphone"; |
| }; |
| |
| &combphy0_ps { |
| status = "okay"; |
| }; |
| |
| &combphy1_ps { |
| status = "okay"; |
| }; |
| |
| &fan { |
| pwms = <&pwm3 0 50000 0>; |
| }; |
| |
| &hdmi0 { |
| status = "okay"; |
| }; |
| |
| &hdmi0_sound { |
| status = "okay"; |
| }; |
| |
| &hdmi0_in { |
| hdmi0_in_vp0: endpoint { |
| remote-endpoint = <&vp0_out_hdmi0>; |
| }; |
| }; |
| |
| &hdmi0_out { |
| hdmi0_out_con: endpoint { |
| remote-endpoint = <&hdmi0_con_in>; |
| }; |
| }; |
| |
| &hdmi1 { |
| status = "okay"; |
| }; |
| |
| &hdmi1_in { |
| hdmi1_in_vp1: endpoint { |
| remote-endpoint = <&vp1_out_hdmi1>; |
| }; |
| }; |
| |
| &hdmi1_out { |
| hdmi1_out_con: endpoint { |
| remote-endpoint = <&hdmi1_con_in>; |
| }; |
| }; |
| |
| &hdmi1_sound { |
| status = "okay"; |
| }; |
| |
| &hdptxphy0 { |
| status = "okay"; |
| }; |
| |
| &hdptxphy1 { |
| status = "okay"; |
| }; |
| |
| &hym8563 { |
| interrupt-parent = <&gpio0>; |
| interrupts = <RK_PB0 IRQ_TYPE_LEVEL_LOW>; |
| pinctrl-names = "default"; |
| pinctrl-0 = <&hym8563_int>; |
| }; |
| |
| &i2c6 { |
| usbc0: usb-typec@22 { |
| compatible = "fcs,fusb302"; |
| reg = <0x22>; |
| interrupt-parent = <&gpio0>; |
| interrupts = <RK_PD3 IRQ_TYPE_LEVEL_LOW>; |
| pinctrl-names = "default"; |
| pinctrl-0 = <&usbc0_int>; |
| vbus-supply = <&vbus5v0_typec>; |
| status = "okay"; |
| |
| usb_con: connector { |
| compatible = "usb-c-connector"; |
| data-role = "dual"; |
| label = "USB-C"; |
| power-role = "dual"; |
| op-sink-microwatt = <10>; |
| source-pdos = <PDO_FIXED(5000, 1400, PDO_FIXED_USB_COMM)>; |
| sink-pdos = <PDO_FIXED(5000, 10, PDO_FIXED_USB_COMM)>; |
| try-power-role = "source"; |
| |
| ports { |
| #address-cells = <1>; |
| #size-cells = <0>; |
| |
| port@0 { |
| reg = <0>; |
| |
| usbc0_hs: endpoint { |
| remote-endpoint = <&usb_host0_xhci_drd_sw>; |
| }; |
| }; |
| |
| port@1 { |
| reg = <1>; |
| |
| usbc0_ss: endpoint { |
| remote-endpoint = <&usbdp_phy0_typec_ss>; |
| }; |
| }; |
| |
| port@2 { |
| reg = <2>; |
| |
| usbc0_sbu: endpoint { |
| remote-endpoint = <&usbdp_phy0_typec_sbu>; |
| }; |
| }; |
| }; |
| }; |
| }; |
| }; |
| |
| &i2s5_8ch { |
| status = "okay"; |
| }; |
| |
| &i2s6_8ch { |
| status = "okay"; |
| }; |
| |
| &led_blue_gpio { |
| gpios = <&gpio3 RK_PA6 GPIO_ACTIVE_HIGH>; |
| status = "okay"; |
| }; |
| |
| &led_green_pwm { |
| pwms = <&pwm2 0 25000 0>; |
| }; |
| |
| /* phy1 - M.KEY socket */ |
| &pcie2x1l0 { |
| reset-gpios = <&gpio4 RK_PA5 GPIO_ACTIVE_HIGH>; |
| vpcie3v3-supply = <&vcc3v3_wf>; |
| status = "okay"; |
| }; |
| |
| /* phy2 - right ethernet port */ |
| &pcie2x1l1 { |
| reset-gpios = <&gpio3 RK_PB3 GPIO_ACTIVE_HIGH>; |
| vpcie3v3-supply = <&vcc3v3_pcie_eth>; |
| status = "okay"; |
| }; |
| |
| /* phy0 - left ethernet port */ |
| &pcie2x1l2 { |
| reset-gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_HIGH>; |
| vpcie3v3-supply = <&vcc3v3_pcie_eth>; |
| status = "okay"; |
| }; |
| |
| &pinctrl { |
| hym8563 { |
| hym8563_int: hym8563-int { |
| rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>; |
| }; |
| }; |
| |
| leds { |
| blue_led_pin: blue-led { |
| rockchip,pins = <3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>; |
| }; |
| }; |
| |
| ir-receiver { |
| ir_receiver_pin: ir-receiver-pin { |
| rockchip,pins = <4 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>; |
| }; |
| }; |
| |
| sound { |
| hp_detect: hp-detect { |
| rockchip,pins = <1 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>; |
| }; |
| }; |
| |
| usb { |
| vcc5v0_usb20_en: vcc5v0-usb20-en { |
| rockchip,pins = <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>; |
| }; |
| }; |
| |
| usb-typec { |
| usbc0_int: usbc0-int { |
| rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>; |
| }; |
| |
| typec5v_pwren: typec5v-pwren { |
| rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>; |
| }; |
| }; |
| }; |
| |
| &pwm2 { |
| pinctrl-0 = <&pwm2m1_pins>; |
| pinctrl-names = "default"; |
| status = "okay"; |
| }; |
| |
| &pwm3 { |
| pinctrl-0 = <&pwm3m1_pins>; |
| status = "okay"; |
| }; |
| |
| &recovery_button { |
| status = "okay"; |
| }; |
| |
| &sfc { |
| pinctrl-names = "default"; |
| pinctrl-0 = <&fspim1_pins>; |
| }; |
| |
| &u2phy1_otg { |
| phy-supply = <&vcc5v0_sys>; |
| }; |
| |
| &uart9 { |
| pinctrl-0 = <&uart9m0_xfer>; |
| status = "okay"; |
| }; |
| |
| &usbdp_phy0 { |
| mode-switch; |
| orientation-switch; |
| 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_typec_ss: endpoint@0 { |
| reg = <0>; |
| remote-endpoint = <&usbc0_ss>; |
| }; |
| |
| usbdp_phy0_typec_sbu: endpoint@1 { |
| reg = <1>; |
| remote-endpoint = <&usbc0_sbu>; |
| }; |
| }; |
| }; |
| |
| &usb_host0_xhci { |
| usb-role-switch; |
| |
| port { |
| usb_host0_xhci_drd_sw: endpoint { |
| remote-endpoint = <&usbc0_hs>; |
| }; |
| }; |
| }; |
| |
| &vcc3v3_pcie_eth { |
| gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_LOW>; |
| }; |
| |
| &vcc3v3_wf { |
| status = "okay"; |
| }; |
| |
| &vcc5v0_usb20 { |
| gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_HIGH>; |
| pinctrl-names = "default"; |
| pinctrl-0 = <&vcc5v0_usb20_en>; |
| }; |
| |
| &vp0 { |
| vp0_out_hdmi0: endpoint@ROCKCHIP_VOP2_EP_HDMI0 { |
| reg = <ROCKCHIP_VOP2_EP_HDMI0>; |
| remote-endpoint = <&hdmi0_in_vp0>; |
| }; |
| }; |
| |
| &vp1 { |
| vp1_out_hdmi1: endpoint@ROCKCHIP_VOP2_EP_HDMI1 { |
| reg = <ROCKCHIP_VOP2_EP_HDMI1>; |
| remote-endpoint = <&hdmi1_in_vp1>; |
| }; |
| }; |