// SPDX-License-Identifier: (GPL-2.0+ OR MIT) /dts-v1/; #include #include #include #include #include #include #include "dt-bindings/usb/pd.h" #include "rk3588-firefly-core-3588j.dtsi" / { model = "Firefly ITX-3588J"; compatible = "firefly,itx-3588j", "firefly,core-3588j", "rockchip,rk3588"; aliases { ethernet0 = &gmac0; ethernet1 = &gmac1; }; chosen { stdout-path = "serial2:1500000n8"; }; /* * there are also a "Reset" and "Mask ROM" button, but the needed * settings are unknown at this time */ adc-keys-0 { compatible = "adc-keys"; io-channels = <&saradc 1>; io-channel-names = "buttons"; keyup-threshold-microvolt = <1800000>; poll-interval = <100>; button-recovery { label = "Recovery"; linux,code = ; press-threshold-microvolt = <2000>; }; }; analog-sound { compatible = "simple-audio-card"; pinctrl-0 = <&hp_detect>; pinctrl-names = "default"; simple-audio-card,aux-devs = <&_headphones>, <&_speaker>; simple-audio-card,format = "i2s"; simple-audio-card,hp-det-gpios = <&gpio1 RK_PC4 GPIO_ACTIVE_LOW>; simple-audio-card,mclk-fs = <384>; simple-audio-card,name = "rockchip_es8323"; simple-audio-card,pin-switches = "Headphones", "Speaker"; simple-audio-card,routing = "Speaker Amplifier INL", "LOUT2", "Speaker Amplifier INR", "ROUT2", "Speaker", "Speaker Amplifier OUTL", "Speaker", "Speaker Amplifier OUTR", "Headphones Amplifier INL", "LOUT1", "Headphones Amplifier INR", "ROUT1", "Headphones", "Headphones Amplifier OUTL", "Headphones", "Headphones Amplifier OUTR", "LINPUT1", "Microphone Jack", "RINPUT1", "Microphone Jack", "LINPUT2", "Onboard Microphone", "RINPUT2", "Onboard Microphone"; simple-audio-card,widgets = "Microphone", "Microphone Jack", "Microphone", "Onboard Microphone", "Headphone", "Headphones", "Speaker", "Speaker"; simple-audio-card,cpu { sound-dai = <&i2s0_8ch>; }; simple-audio-card,codec { sound-dai = <&es8323>; system-clock-frequency = <12288000>; }; }; /* * this does not seem to be a proper "amplifier" but is just * a way to control the GPIO pins to switch on or off the given * sound output device */ amp_headphones: headphones-audio-amplifier { compatible = "simple-audio-amplifier"; enable-gpios = <&gpio4 RK_PB0 GPIO_ACTIVE_HIGH>; pinctrl-names = "default"; pinctrl-0 = <&headphone_amplifier_en>; sound-name-prefix = "Headphones Amplifier"; }; amp_speaker: speaker-audio-amplifier { compatible = "simple-audio-amplifier"; enable-gpios = <&gpio3 RK_PB2 GPIO_ACTIVE_HIGH>; pinctrl-names = "default"; pinctrl-0 = <&speaker_amplifier_en>; sound-name-prefix = "Speaker Amplifier"; }; fan: pwm-fan { compatible = "pwm-fan"; #cooling-cells = <2>; cooling-levels = <0 120 150 180 210 240 255>; fan-supply = <&vcc12v_dcin>; pwms = <&pwm15 0 50000 1>; }; hdmi0-con { compatible = "hdmi-connector"; type = "a"; port { hdmi0_con_in: endpoint { remote-endpoint = <&hdmi0_out_con>; }; }; }; leds { compatible = "gpio-leds"; /* * There is also a Power LED control @ RK_PB3 on * GPIO1 but for some reason it doesn't seem to work right */ user_led: led-1 { gpios = <&pca9555 3 GPIO_ACTIVE_HIGH>; linux,default-trigger = "disk-activity"; }; }; pcie30_avdd0v75: regulator-pcie30-avdd0v75 { compatible = "regulator-fixed"; regulator-always-on; regulator-boot-on; regulator-min-microvolt = <750000>; regulator-max-microvolt = <750000>; regulator-name = "pcie30_avdd0v75"; vin-supply = <&avdd_0v75_s0>; }; vbus5v0_typec_pwr_en: regulator-vbus5v0-typec-pwr-en { compatible = "regulator-fixed"; enable-active-high; gpios = <&pca9555 12 GPIO_ACTIVE_HIGH>; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; regulator-name = "vbus5v0_typec_pwr_en"; }; vcc12v_dcin: regulator-vcc12v-dcin { compatible = "regulator-fixed"; regulator-always-on; regulator-boot-on; regulator-min-microvolt = <12000000>; regulator-max-microvolt = <12000000>; regulator-name = "vcc12v_dcin"; }; vcc3v3_pcie30: regulator-vcc3v3-pcie30 { compatible = "regulator-fixed"; enable-active-high; gpios = <&gpio2 RK_PC5 GPIO_ACTIVE_HIGH>; pinctrl-names = "default"; pinctrl-0 = <&pcie3_vcc3v3_en>; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; regulator-name = "vcc3v3_pcie30"; startup-delay-us = <5000>; vin-supply = <&vcc12v_dcin>; }; vcc5v0_host: regulator-vcc5v0-host { compatible = "regulator-fixed"; enable-active-high; gpios = <&pca9555 5 GPIO_ACTIVE_HIGH>; regulator-always-on; regulator-boot-on; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; regulator-name = "vcc5v0_host"; vin-supply = <&vcc5v0_usb>; }; vcc5v0_host3: regulator-vcc5v0-host3 { compatible = "regulator-fixed"; enable-active-high; gpios = <&pca9555 7 GPIO_ACTIVE_HIGH>; regulator-name = "vcc5v0_host3"; regulator-boot-on; regulator-always-on; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; vin-supply = <&vcc5v0_usb>; }; vcc5v0_sys: regulator-vcc5v0-sys { compatible = "regulator-fixed"; regulator-always-on; regulator-boot-on; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; regulator-name = "vcc5v0_sys"; vin-supply = <&vcc12v_dcin>; }; vcc5v0_usb: regulator-vcc5v0-usb { compatible = "regulator-fixed"; regulator-always-on; regulator-boot-on; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; regulator-name = "vcc5v0_usb"; vin-supply = <&vcc12v_dcin>; }; vcc_1v1_nldo_s3: regulator-vcc-1v1-nldo-s3 { compatible = "regulator-fixed"; regulator-always-on; regulator-boot-on; regulator-min-microvolt = <1100000>; regulator-max-microvolt = <1100000>; regulator-name = "vcc_1v1_nldo_s3"; vin-supply = <&vcc5v0_sys>; }; vcc_fan_pwr_en: regulator-vcc-fan-pwr-en { compatible = "regulator-fixed"; enable-active-high; gpios = <&pca9555 11 GPIO_ACTIVE_HIGH>; regulator-always-on; regulator-boot-on; regulator-name = "vcc_fan_pwr_en"; }; vcc_hub_reset: regulator-vcc-hub-reset { compatible = "regulator-fixed"; enable-active-high; gpios = <&pca9555 4 GPIO_ACTIVE_HIGH>; regulator-always-on; regulator-boot-on; regulator-name = "vcc_hub_reset"; }; vcc_hub3_reset: regulator-vcc-hub3-reset { compatible = "regulator-fixed"; enable-active-high; gpios = <&pca9555 6 GPIO_ACTIVE_HIGH>; regulator-always-on; regulator-name = "vcc_hub3_reset"; }; vcc_sata_pwr_en: regulator-vcc-sata-pwr-en { compatible = "regulator-fixed"; enable-active-high; gpios = <&pca9555 10 GPIO_ACTIVE_HIGH>; regulator-always-on; regulator-boot-on; regulator-name = "vcc_sata_pwr_en"; }; }; &avcc_1v8_s0 { regulator-state-mem { regulator-on-in-suspend; }; }; &combphy0_ps { status = "okay"; }; &combphy1_ps { status = "okay"; }; &combphy2_psu { status = "okay"; }; &gmac0 { clock_in_out = "output"; phy-handle = <&rgmii_phy0>; phy-mode = "rgmii-rxid"; pinctrl-names = "default"; pinctrl-0 = <&gmac0_miim &gmac0_tx_bus2 &gmac0_rx_bus2 &gmac0_rgmii_clk &gmac0_rgmii_bus>; tx_delay = <0x45>; rx_delay = <0x4a>; status = "okay"; }; &gmac1 { clock_in_out = "output"; phy-handle = <&rgmii_phy1>; phy-mode = "rgmii-rxid"; 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>; status = "okay"; }; &gpu { mali-supply = <&vdd_gpu_s0>; sram-supply = <&vdd_gpu_mem_s0>; status = "okay"; }; &hdmi0 { status = "okay"; }; &hdmi0_in { hdmi0_in_vp0: endpoint { remote-endpoint = <&vp0_out_hdmi0>; }; }; &hdmi0_out { hdmi0_out_con: endpoint { remote-endpoint = <&hdmi0_con_in>; }; }; &hdptxphy_hdmi0 { status = "okay"; }; &i2c3 { status = "okay"; /* * in the Firefly BSP source this was confusingly called an * "ES8388" - it actually seems to be an ES8323 and the drivers * for that work best */ es8323: audio-codec@11 { compatible = "everest,es8323"; reg = <0x11>; assigned-clocks = <&cru I2S0_8CH_MCLKOUT>; assigned-clock-rates = <12288000>; clocks = <&cru I2S0_8CH_MCLKOUT>; clock-names = "mclk"; #sound-dai-cells = <0>; }; }; &i2c6 { pinctrl-names = "default"; pinctrl-0 = <&i2c6m0_xfer>; status = "okay"; pca9555: gpio@21 { compatible = "nxp,pca9555"; reg = <0x21>; gpio-controller; #gpio-cells = <2>; }; usbc0: usb-typec@22 { compatible = "fcs,fusb302"; reg = <0x22>; interrupt-parent = <&gpio0>; interrupts = ; pinctrl-names = "default"; pinctrl-0 = <&usbc0_int>; vbus-supply = <&vbus5v0_typec_pwr_en>; usb_con: connector { compatible = "usb-c-connector"; label = "USB-C"; data-role = "dual"; op-sink-microwatt = <1000000>; power-role = "dual"; sink-pdos = ; source-pdos = ; try-power-role = "source"; 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>; usbc0_role_sw: endpoint { remote-endpoint = <&dwc3_0_role_switch>; }; }; port@2 { reg = <2>; dp_altmode_mux: endpoint { remote-endpoint = <&usbdp_phy0_dp_altmode_mux>; }; }; }; }; }; hym8563: rtc@51 { compatible = "haoyu,hym8563"; reg = <0x51>; interrupt-parent = <&gpio0>; interrupts = ; #clock-cells = <0>; clock-output-names = "hym8563"; pinctrl-names = "default"; pinctrl-0 = <&hym8563_int>; wakeup-source; }; }; &i2s0_8ch { pinctrl-names = "default"; pinctrl-0 = <&i2s0_lrck &i2s0_mclk &i2s0_sclk &i2s0_sdi0 &i2s0_sdo0>; status = "okay"; }; &mdio0 { rgmii_phy0: ethernet-phy@1 { compatible = "ethernet-phy-ieee802.3-c22"; reg = <0x1>; }; }; &mdio1 { rgmii_phy1: ethernet-phy@1 { compatible = "ethernet-phy-ieee802.3-c22"; reg = <0x1>; }; }; &pcie2x1l0 { pinctrl-names = "default"; pinctrl-0 = <&pcie2_0_rst>; reset-gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_HIGH>; status = "okay"; }; &pcie30phy { status = "okay"; }; &pcie3x4 { pinctrl-names = "default"; pinctrl-0 = <&pcie3_rst>; reset-gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>; vpcie3v3-supply = <&vcc3v3_pcie30>; status = "okay"; }; &pinctrl { dp { dp1_hpd: dp1-hpd { rockchip,pins = <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>; }; }; hym8563 { hym8563_int: hym8563-int { rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>; }; }; gpio-leds { sys_led_pin: sys-led-pin { rockchip,pins = <1 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>; }; }; pcie2 { pcie2_0_rst: pcie2-0-rst { rockchip,pins = <1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>; }; }; pcie3 { pcie3_rst: pcie3-rst { rockchip,pins = <4 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>; }; pcie3_vcc3v3_en: pcie3-vcc3v3-en { rockchip,pins = <2 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>; }; }; sound { hp_detect: hp-detect { rockchip,pins = <1 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>; }; headphone_amplifier_en: headphone-amplifier-en { rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>; }; speaker_amplifier_en: speaker-amplifier-en { rockchip,pins = <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>; }; }; usb { usbc0_int: usbc0-int { rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>; }; }; }; &pwm15 { pinctrl-names = "default"; pinctrl-0 = <&pwm15m2_pins>; status = "okay"; }; &sata0 { status = "okay"; }; &sata1 { status = "okay"; }; &sata2 { status = "okay"; }; /* uart/232/485 */ &uart0 { pinctrl-0 = <&uart0m2_xfer>; status = "okay"; }; &uart1 { pinctrl-0 = <&uart1m1_xfer>; status = "okay"; }; /* usb enable */ &u2phy0 { status = "okay"; }; &u2phy0_otg { status = "okay"; }; &u2phy1 { status = "okay"; }; &u2phy1_otg { phy-supply = <&vcc5v0_host>; status = "okay"; }; &u2phy2 { status = "okay"; }; &u2phy2_host { phy-supply = <&vcc5v0_host>; status = "okay"; }; &u2phy3 { 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"; }; &usb_host0_xhci { usb-role-switch; dr_mode = "otg"; status = "okay"; port { #address-cells = <1>; #size-cells = <0>; dwc3_0_role_switch: endpoint@0 { reg = <0>; remote-endpoint = <&usbc0_role_sw>; }; }; }; &usb_host1_xhci { dr_mode = "host"; status = "okay"; }; &usb_host2_xhci { status = "okay"; }; &usbdp_phy0 { orientation-switch; sbu1-dc-gpios = <&gpio4 RK_PA6 GPIO_ACTIVE_HIGH>; sbu2-dc-gpios = <&gpio4 RK_PA7 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_phy1 { rockchip,dp-lane-mux = <2 3>; status = "okay"; }; &vcc_1v8_s0 { regulator-state-mem { regulator-on-in-suspend; regulator-suspend-microvolt = <1800000>; }; }; /* for fan when deep sleep */ &vdd_log_s0 { regulator-state-mem { regulator-on-in-suspend; regulator-suspend-microvolt = <750000>; }; }; /* display generator */ &vop_mmu { status = "okay"; }; &vop { status = "okay"; }; &vp0 { vp0_out_hdmi0: endpoint@ROCKCHIP_VOP2_EP_HDMI0 { reg = ; remote-endpoint = <&hdmi0_in_vp0>; }; };