rt,求教 ************************ // SPDX-License-Identifier: (GPL-2.0+ OR MIT) /* * Copyright (c) 2021 Rockchip Electronics Co., Ltd. * */ #define rk3588 #include "rk3588-firefly-port.dtsi" #include "rk3588-diff.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"; }; fan: pwm-fan { compatible = "pwm-fan"; #cooling-cells = <2>; fan-supply = <&vcc12v_dcin>; pwms = <&pwm15 0 50000 0>; cooling-levels = <0 85/*1*/ 95 105 115 125 135 145 155/*8*/ 165 175 185 195 205 215 225 235 245 255/*18*/>; }; }; /* recovery key*/ &adc_keys{ keyup-threshold-microvolt = <550000>; status="okay"; }; /* led */ &power_led{ gpios = <&gpio3 RK_PB2 GPIO_ACTIVE_HIGH>; pinctrl-names = "default"; pinctrl-0 = <&led_power>; }; &user_led{ gpios = <&pca9555 PCA_IO0_3 GPIO_ACTIVE_HIGH>; }; ¢er_thermal { thermal-governor = "step_wise"; polling-delay-passive = <20>; /* milliseconds */ polling-delay = <1000>; /* milliseconds */ //thermal-sensors = <&tsadc 0>; trips { fan_alert0: trip-point-0 { temperature = <30000>; hysteresis = <2000>; type = "active"; }; fan_alert1: trip-point-1 { temperature = <50000>; hysteresis = <2000>; type = "active"; }; fan_alert2: trip-point-2 { temperature = <65000>; hysteresis = <2000>; type = "active"; }; fan_alert3: trip-point-3 { temperature = <75000>; hysteresis = <2000>; type = "active"; }; }; cooling-maps { map0 { trip = <&fan_alert0>; cooling-device = <&fan THERMAL_NO_LIMIT 1>; contribution = <1024>; }; map1 { trip = <&fan_alert1>; cooling-device = <&fan 1 8>; contribution = <1024>; }; map2 { trip = <&fan_alert2>; cooling-device = <&fan 1 18>; contribution = <1024>; }; map3 { trip = <&fan_alert3>; cooling-device = <&fan 18 THERMAL_NO_LIMIT>; contribution = <1024>; }; }; }; &pwm15 { pinctrl-0 = <&pwm15m2_pins>; status = "okay"; }; /* tf-card */ &sdmmc { status = "okay"; }; &vcc_sdcard_pwr_en{ gpio = <&pca9555 PCA_IO1_5 GPIO_ACTIVE_HIGH>; //PCA_IO 15 status = "okay"; }; /* can1 */ &can1 { status = "okay"; assigned-clocks = <&cru CLK_CAN1>; assigned-clock-rates = <200000000>; pinctrl-names = "default"; pinctrl-0 = <&can1m1_pins>; }; /* es8323 audio codec */ &i2c3 { status = "okay"; }; &es8388_sound{ firefly,not-use-dapm; /delete-property/ spk-con-gpio; io-channels = <&saradc 1>; linein-type = <4>; status = "okay"; }; &es8388{ status = "okay"; }; &i2s0_8ch{ status = "okay"; }; /* hdmi rx */ &hdmiin_sound{ status = "okay"; }; &hdmirx_ctrler { status = "okay"; hpd-trigger-level = <1>; hdmirx-det-gpios = <&gpio1 RK_PD5 GPIO_ACTIVE_LOW>; }; /* hdmi0 */ &hdmi0 { enable-gpios = <&gpio4 RK_PA0 GPIO_ACTIVE_HIGH>; status = "okay"; }; &hdmi0_in_vp0 { status = "okay"; }; &hdmi0_sound { status = "okay"; }; &hdptxphy_hdmi0 { status = "okay"; }; &route_hdmi0{ status = "okay"; }; /*ap6275 : bluetooth*/ &wireless_bluetooth{ status = "okay"; }; &uart6 { pinctrl-names = "default"; pinctrl-0 = <&uart6m1_xfer &uart6m1_ctsn>; status = "okay"; }; /* ap6275 : wifi */ &wireless_wlan{ wifi_chip_type = "ap6275p"; status = "okay"; }; &combphy1_ps { status = "okay"; }; &pcie2x1l0 { reset-gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_HIGH>; rockchip,skip-scan-in-resume; status = "okay"; }; /* RS232_0 */ &uart0{ pinctrl-0 = <&uart0m2_xfer>; status = "okay"; }; /* RS232_1 */ &uart5{ pinctrl-0 = <&uart5m1_xfer>; status = "okay"; }; /* RS485 */ &uart1{ pinctrl-0 = <&uart1m1_xfer>; status = "okay"; }; /* spi1 */ &spi1 { status = "okay"; pinctrl-0 = <&spi1m2_cs0 &spi1m2_pins>; num-cs = <1>; max-freq = <50000000>; spidev1: spidev@0{ compatible = "rockchip,spidev"; status = "okay"; reg = <0x0>; spi-max-frequency = <50000000>; }; }; /* gamc0 */ &gmac0 { snps,reset-gpio = <&gpio3 RK_PC7 GPIO_ACTIVE_LOW>; tx_delay = <0x47>; status = "okay"; }; &gmac0_tx_bus2{ rockchip,pins = /* gmac0_txd0 */ <2 RK_PB6 1 &pcfg_pull_up_drv_level_6>, /* gmac0_txd1 */ <2 RK_PB7 1 &pcfg_pull_up_drv_level_6>, /* gmac0_txen */ <2 RK_PC0 1 &pcfg_pull_none>; }; &gmac0_rgmii_bus{ rockchip,pins = /* gmac0_rxd2 */ <2 RK_PA6 1 &pcfg_pull_none>, /* gmac0_rxd3 */ <2 RK_PA7 1 &pcfg_pull_none>, /* gmac0_txd2 */ <2 RK_PB1 1 &pcfg_pull_up_drv_level_6>, /* gmac0_txd3 */ <2 RK_PB2 1 &pcfg_pull_up_drv_level_6>; }; /* gmac1 */ &gmac1 { snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>; tx_delay = <0x4f>; status = "okay"; }; &gmac1_tx_bus2{ rockchip,pins = /* gmac1_txd0 */ <3 RK_PB3 1 &pcfg_pull_up_drv_level_6>, /* gmac1_txd1 */ <3 RK_PB4 1 &pcfg_pull_up_drv_level_6>, /* gmac1_txen */ <3 RK_PB5 1 &pcfg_pull_none>; }; &gmac1_rgmii_bus{ rockchip,pins = /* gmac1_rxd2 */ <3 RK_PA2 1 &pcfg_pull_none>, /* gmac1_rxd3 */ <3 RK_PA3 1 &pcfg_pull_none>, /* gmac1_txd2 */ <3 RK_PA0 1 &pcfg_pull_up_drv_level_6>, /* gmac1_txd3 */ <3 RK_PA1 1 &pcfg_pull_up_drv_level_6>; }; /* pcie3.0 x 4 slot */ &pcie30phy { status = "okay"; }; &pcie3x4 { reset-gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>; vpcie3v3-supply = <&vcc3v3_pcie30>; status = "okay"; }; &vcc3v3_pcie30{ gpios = <&gpio4 RK_PC6 GPIO_ACTIVE_HIGH>; startup-delay-us = <5000>; status = "okay"; }; /* sata pm */ &combphy0_ps { status = "okay"; }; #if M2_SATA_OR_PCIE &sata0 { //pinctrl-names = "default"; //pinctrl-0 = <&sata_reset>; status = "okay"; }; #else &pcie2x1l2 { reset-gpios = <&pca9555 PCA_IO1_6 GPIO_ACTIVE_HIGH>; vpcie3v3-supply = <&vcc_sata_pwr_en>; status = "okay"; }; #endif &vcc_sata_pwr_en{ status = "okay"; gpio = <&pca9555 PCA_IO1_2 GPIO_ACTIVE_HIGH>; //PCA_IO 12 regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; regulator-always-on; enable-active-high; startup-delay-us = <5000>; vin-supply = <&vcc12v_dcin>; }; /* usb power */ &vcc5v0_host{ gpio = <&pca9555 PCA_IO0_5 GPIO_ACTIVE_HIGH>; vin-supply = <&vcc5v0_usb>; status = "okay"; }; &vcc_hub_reset{ status = "okay"; gpio = <&pca9555 PCA_IO0_4 GPIO_ACTIVE_HIGH>; //PCA_IO 04 }; &vcc_hub3_reset{ status = "okay"; compatible = "regulator-fixed-firefly"; regulator-name = "vcc_hub3_reset"; enable-active-high; regulator-always-on; regulator-fixed-kernel-reset-ms = <3000>; gpio = <&pca9555 PCA_IO0_6 GPIO_ACTIVE_HIGH>; //PCA_IO 06 }; &vcc5v0_host3{ gpio = <&pca9555 PCA_IO0_7 GPIO_ACTIVE_HIGH>; //PCA_IO 07 status = "okay"; }; &i2c0 { status = "okay"; pc9202@3c { status = "okay"; compatible = "firefly,pc9202"; reg = <0x3c>; //pinctrl-names = "default"; //pinctrl-0 = <&pc9202_en_pin>; //wd-en-gpio = <&gpio4 RK_PD1 GPIO_ACTIVE_HIGH>; }; }; /* i2c6 */ &i2c6 { clock-frequency = <400000>; // For others Display Port Screen status = "okay"; pca9555_1: gpio@20 { compatible = "nxp,pca9555"; reg = <0x20>; gpio-controller; #gpio-cells = <2>; gpio-group-num = <300>; status = "okay"; }; }; /* pca9555 */ &pca9555{ status = "okay"; }; /* rtc */ &hym8563{ interrupt-parent = <&gpio0>; interrupts = <RK_PB0 IRQ_TYPE_LEVEL_LOW>; status = "okay"; }; /* display port0 */ &spdif_tx2{ status = "okay"; }; &dp0_sound{ status = "okay"; }; &dp0 { status = "okay"; }; &dp0_in_vp2 { status = "okay"; }; &usbc0{ status = "okay"; interrupt-parent = <&gpio0>; interrupts = <RK_PD3 IRQ_TYPE_LEVEL_LOW>; }; &vbus5v0_typec_pwr_en{ status = "okay"; gpio = <&pca9555 PCA_IO1_4 GPIO_ACTIVE_HIGH>; //PCA_IO 14 }; &usbdp_phy0 { sbu1-dc-gpios = <&pca9555 PCA_IO1_0 GPIO_ACTIVE_HIGH>; sbu2-dc-gpios = <&pca9555 PCA_IO1_1 GPIO_ACTIVE_HIGH>; }; /* display port1 to vga */ &dp1_in_vp2 { status = "okay"; }; &dp1 { pinctrl-names = "default"; pinctrl-0 = <&dp1_hpd>; hpd-gpios = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>; status = "okay"; }; &route_dp1{ status = "okay"; connect = <&vp2_out_dp1>; }; /*usb3.1 host2 controller for 5G module*/ &usbhost3_0 { status = "okay"; }; &usbhost_dwc3_0 { dr_mode = "host"; status = "okay"; }; &combphy2_psu { status = "okay"; // USB3.1/SATA/PCIe Combo PHY }; /* pinctrl */ &pinctrl { dp { dp1_hpd: dp1-hpd { rockchip,pins = <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>; }; }; leds { led_power: led-power { rockchip,pins = <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>; }; }; hdmirx { hdmirx_det: hdmirx-det { rockchip,pins = <1 RK_PD5 RK_FUNC_GPIO &pcfg_pull_up>; }; }; headphone { hp_det: hp-det { rockchip,pins = <1 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>; }; }; hym8563 { hym8563_int: hym8563-int { rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>; }; }; lcd { lcd_rst_gpio: lcd-rst-gpio { rockchip,pins = <2 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>; }; }; touch { touch_gpio: touch-gpio { rockchip,pins = <0 RK_PD5 RK_FUNC_GPIO &pcfg_pull_up>, <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>; }; }; usb-typec { usbc0_int: usbc0-int { rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>; }; }; wireless-bluetooth { uart6_gpios: uart6-gpios { rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>; }; bt_reset_gpio: bt-reset-gpio { rockchip,pins = <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>; }; bt_wake_gpio: bt-wake-gpio { rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>; }; bt_irq_gpio: bt-irq-gpio { rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_down>; }; }; wireless-wlan { wifi_host_wake_irq: wifi-host-wake-irq { rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_down>; }; wifi_poweren_gpio: wifi-poweren-gpio { rockchip,pins = <0 RK_PC4 RK_FUNC_GPIO &pcfg_pull_up>; }; }; }; |
-
9.74 KB, 下载次数: 0, 下载积分: 灯泡 -1 , 经验 -1
-
131.81 KB, 下载次数: 0, 下载积分: 灯泡 -1 , 经验 -1