// SPDX-License-Identifier: (GPL-2.0+ OR MIT) /* * Copyright (c) 2021 Rockchip Electronics Co., Ltd. * */ #include "rk3588-firefly-port.dtsi" //#define M2_SATA_OR_PCIE 1 /*1 = SATA , 0 = PCIe */ / { // chosen: chosen { // bootargs = "earlycon=uart8250,mmio32,0xfeb50000 console=ttyFIQ0 irqchip.gicv3_pseudo_nmi=0 root=PARTLABEL=rootfs rootfstype=ext4 ro rootwait overlayroot=device:dev=PARTLABEL=userdata,fstype=ext4,mkfs=1 coherent_pool=1m systemd.gpt_auto=0 cgroup_enable=memory swapaccount=1"; // }; firefly_leds: leds { power_led: power { gpios = <&gpio1 RK_PD5 GPIO_ACTIVE_HIGH>;//blue led pinctrl-names = "default"; pinctrl-0 = <&led_power>; }; user_led: user { gpios = <&gpio3 RK_PB2 GPIO_ACTIVE_HIGH>;//red led pinctrl-names = "default"; pinctrl-0 = <&led_user>; }; user1_led: user1 { label = ":user1"; default-state = "off"; gpios = <&gpio3 RK_PC0 GPIO_ACTIVE_HIGH>;//green led pinctrl-names = "default"; pinctrl-0 = <&led_user1>; }; }; fan: pwm-fan { compatible = "pwm-fan"; #cooling-cells = <2>; fan-supply = <&vcc12v_dcin>; pwms = <&pwm11 0 50000 1>; }; vcc3v3_pcie20: vcc3v3-pcie20 { compatible = "regulator-fixed"; regulator-name = "vcc3v3_pcie20"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; regulator-always-on; enable-active-high; gpios = <&gpio1 RK_PD7 GPIO_ACTIVE_HIGH>; startup-delay-us = <5000>; vin-supply = <&vcc12v_dcin>; }; vcc_3v3_sd_s0: vcc-3v3-sd-s0 { compatible = "regulator-fixed"; regulator-name = "vcc_3v3_sd_s0"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; gpios = <&gpio1 RK_PA0 GPIO_ACTIVE_LOW>; enable-active-low; vin-supply = <&vcc_3v3_s3>; regulator-state-mem { regulator-off-in-suspend; }; }; lcd_rst: lcd_rst { status = "disabled"; compatible = "regulator-fixed"; regulator-name = "lcd_rst"; regulator-boot-on; regulator-always-on; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; enable-active-high; gpio = <&gpio1 RK_PA1 GPIO_ACTIVE_HIGH>; startup-delay-us = <2000>; vin-supply = <&vcc12v_dcin>; }; lcd_en: lcd_en { status = "disabled"; compatible = "regulator-fixed"; regulator-name = "lcd_en"; regulator-boot-on; regulator-always-on; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; enable-active-high; gpio = <&gpio1 RK_PB3 GPIO_ACTIVE_HIGH>; vin-supply = <&vcc12v_dcin>; }; firefly_wake { compatible = "firefly-wake"; status = "okay"; }; }; /* es8323 audio codec */ &es8388_sound { status = "okay"; hp-det-gpio = <&gpio1 RK_PA6 GPIO_ACTIVE_LOW>; hp-con-gpio = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>; /delete-property/ spk-con-gpio; io-channels = <&saradc 5>; io-channel-names = "hw-ver"; rockchip,audio-routing = "Headphone", "LOUT2", "Headphone", "ROUT2", "Speaker", "LOUT1", "Speaker", "ROUT1", "Headphone", "Headphone Power", "Headphone", "Headphone Power", "LINPUT1", "Main Mic", "LINPUT2", "Main Mic", "RINPUT1", "Headset Mic", "RINPUT2", "Headset Mic"; linein-type = <1>; pinctrl-names = "default"; pinctrl-0 = <&hp_det>; }; &es8388{ status = "okay"; }; &i2s0_8ch{ status = "okay"; }; /* fan */ &pwm11 { pinctrl-0 = <&pwm11m3_pins>; status = "okay"; }; /* display port0 */ &dp0_sound{ status = "okay"; }; &dp0 { status = "okay"; }; &dp0_in_vp2 { status = "okay"; }; &spdif_tx2{ status = "okay"; }; /* hdmi0 */ &hdmi0 { enable-gpios = <&gpio4 RK_PB2 GPIO_ACTIVE_HIGH>; status = "okay"; }; &hdmi0_in_vp0 { status = "okay"; }; &hdmi0_sound { status = "okay"; }; &hdptxphy_hdmi0 { status = "okay"; }; &route_hdmi0{ status = "okay"; }; /* default use sata3.0 , pcie2.0 optional*/ &combphy0_ps { status = "okay"; }; //#if M2_SATA_OR_PCIE //&sata0 { // pinctrl-names = "default"; // pinctrl-0 = <&sata_reset>; // status = "okay"; //}; //#else //&pcie2x1l2 { // reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_HIGH>; // vpcie3v3-supply = <&vcc3v3_pcie20>; // status = "okay"; //}; //#endif /* usb3.0 */ &combphy2_psu { status = "okay"; }; &usbhost3_0 { status = "okay"; }; &usbhost_dwc3_0 { status = "okay"; dr_mode = "host"; }; &vcc5v0_host { status = "okay"; /delete-property/ regulator-min-microvolt; /delete-property/ regulator-max-microvolt; reset-delay-us = <200000>; startup-delay-us = <1200000>; regulator-boot-on; gpio = <&gpio1 RK_PB6 GPIO_ACTIVE_HIGH>; pinctrl-names = "default"; pinctrl-0 = <&vcc5v0_host_en>; }; /* usb2.0 hub */ &vcc_hub_reset { status = "okay"; gpio = <&gpio1 RK_PB0 GPIO_ACTIVE_HIGH>; }; /* typec0 */ &vbus5v0_typec_pwr_en { status = "okay"; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; gpio = <&gpio1 RK_PB1 GPIO_ACTIVE_HIGH>; vin-supply = <&vcc5v0_usb>; pinctrl-names = "default"; pinctrl-0 = <&typec5v_pwren>; }; &gmac1{ snps,reset-gpio = <&gpio0 RK_PD3 GPIO_ACTIVE_LOW>; tx_delay = <0x43>; status = "okay"; }; /* uart7 */ &uart7{ pinctrl-0 = <&uart7m2_xfer>; status = "okay"; }; /* spi1 */ &spi1 { pinctrl-names = "default"; pinctrl-0 = <&spi1m2_cs0 &spi1m2_pins>; num-cs = <1>; status = "okay"; }; /* PMIC spi2 */ &spi2 { pinctrl-names = "default"; pinctrl-0 = <&spi2m2_cs0 &spi2m2_pins>; num-cs = <1>; }; &sdmmc { status = "okay"; vmmc-supply = <&vcc_3v3_sd_s0>; }; &i2c2 { status = "okay"; clock-frequency = <400000>; // For others Display Port Screen pinctrl-names = "default"; pinctrl-0 = <&i2c2m0_xfer>; usbc0: fusb302@22 { compatible = "fcs,fusb302"; reg = <0x22>; interrupt-parent = <&gpio0>; interrupts = ; pinctrl-names = "default"; pinctrl-0 = <&usbc0_int>; vbus-supply = <&vbus5v0_typec_pwr_en>; 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; status = "okay"; }; }; &i2c3 { status = "okay"; }; &i2c4 { status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&i2c4m3_xfer>; }; &i2c5 { status = "disabled"; }; &i2c6 { status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&i2c6m3_xfer>; }; &usbdp_phy0 { sbu1-dc-gpios = <&gpio4 RK_PB5 GPIO_ACTIVE_HIGH>; sbu2-dc-gpios = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>; }; &dfi { status = "okay"; }; &dmc { center-supply = <&vdd_ddr_s0>; status = "okay"; }; &pinctrl { leds { led_user: led-user { rockchip,pins = <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>; }; led_power: led-power { rockchip,pins = <1 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>; }; led_user1: led-user1 { rockchip,pins = <3 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>; }; }; headphone { hp_det: hp-det { rockchip,pins = <1 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>; }; }; hym8563 { hym8563_int: hym8563-int { rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>; }; }; usb { vcc5v0_host_en: vcc5v0-host-en { rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>; }; }; usb-typec { usbc0_int: usbc0-int { rockchip,pins = <0 RK_PC4 RK_FUNC_GPIO &pcfg_pull_up>; }; typec5v_pwren: typec5v-pwren { rockchip,pins = <1 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>; }; }; //#if M2_SATA_OR_PCIE // sata { // sata_reset:sata-reset{ // rockchip,pins = <3 RK_PD1 RK_FUNC_GPIO &pcfg_pull_up>; // }; // }; //#endif };