diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts index 02b8ba7dcc946..fafefcf3617ee 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts @@ -8,23 +8,33 @@ #include #include #include "rk3399.dtsi" +#include "rk3399-linux.dtsi" #include "rk3399-opp.dtsi" / { model = "Pine64 RockPro64"; compatible = "pine64,rockpro64", "rockchip,rk3399"; - chosen { - bootargs = "earlyprintk=uart8250,mmio32,0xff1a0000 swiotlb=1"; - stdout-path = "serial2:1500000n8"; - }; - /* first 64k(0xff8c0000~0xff8d0000) for ddr and suspend */ iram: sram@ff8d0000 { compatible = "mmio-sram"; reg = <0x0 0xff8d0000 0x0 0x20000>; /* 128k */ }; + xin32k: xin32k { + compatible = "fixed-clock"; + clock-frequency = <32768>; + clock-output-names = "xin32k"; + #clock-cells = <0>; + }; + + clkin_gmac: external-gmac-clock { + compatible = "fixed-clock"; + clock-frequency = <125000000>; + clock-output-names = "clkin_gmac"; + #clock-cells = <0>; + }; + dc_12v: dc-12v { compatible = "regulator-fixed"; regulator-name = "dc_12v"; @@ -92,6 +102,7 @@ vdd_log: vdd-log { compatible = "pwm-regulator"; pwms = <&pwm2 0 25000 1>; + pwm-supply = <&vcc_sys>; regulator-name = "vdd_log"; regulator-min-microvolt = <800000>; regulator-max-microvolt = <1400000>; @@ -101,56 +112,54 @@ /* for rockchip boot on */ rockchip,pwm_id= <2>; rockchip,pwm_voltage = <900000>; + }; - vin-supply = <&vcc_sys>; + leds { + compatible = "gpio-leds"; + + work-led { + gpios = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "mmc0"; + }; + + diy-led { + gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "heartbeat"; + }; }; - clkin_gmac: external-gmac-clock { - compatible = "fixed-clock"; - clock-frequency = <125000000>; - clock-output-names = "clkin_gmac"; - #clock-cells = <0>; + ir-receiver { + compatible = "gpio-ir-receiver"; + gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_LOW>; + linux,rc-map-name = "rc-pine64"; + pinctrl-0 = <&ir_int>; + pinctrl-names = "default"; }; - spdif-sound { - status = "disabled"; + hdmi-sound { compatible = "simple-audio-card"; - simple-audio-card,name = "ROCKCHIP,SPDIF"; + simple-audio-card,format = "i2s"; + simple-audio-card,mclk-fs = <256>; + simple-audio-card,name = "HDMI"; simple-audio-card,cpu { - sound-dai = <&spdif>; + sound-dai = <&i2s2>; }; simple-audio-card,codec { - sound-dai = <&spdif_out>; + sound-dai = <&hdmi>; }; }; - spdif_out: spdif-out { + hdmi-dp-sound { + compatible = "rockchip,rk3399-hdmi-dp"; + rockchip,cpu = <&i2s2>; + rockchip,codec = <&hdmi>, <&cdn_dp>; status = "disabled"; - compatible = "linux,spdif-dit"; - #sound-dai-cells = <0>; - }; - - sdio_pwrseq: sdio-pwrseq { - compatible = "mmc-pwrseq-simple"; - clocks = <&rk808 1>; - clock-names = "ext_clock"; - pinctrl-names = "default"; - pinctrl-0 = <&wifi_enable_h>; - - /* - * On the module itself this is one of these (depending - * on the actual card populated): - * - SDIO_RESET_L_WL_REG_ON - * - PDN (power down when low) - */ - reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>; }; es8316-sound { - status = "okay"; compatible = "simple-audio-card"; simple-audio-card,format = "i2s"; - simple-audio-card,name = "rockchip,es8316-codec"; + simple-audio-card,name = "ES8316"; simple-audio-card,mclk-fs = <256>; simple-audio-card,widgets = "Microphone", "Mic Jack", @@ -168,40 +177,59 @@ }; }; - leds { - status = "okay"; - compatible = "gpio-leds"; - work-led { - gpios = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "heartbeat"; - default-state = "on"; + spdif-sound { + compatible = "simple-audio-card"; + simple-audio-card,name = "SPDIF"; + simple-audio-card,cpu { + sound-dai = <&spdif>; }; - diy-led { - gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "none"; - default-state = "off"; + simple-audio-card,codec { + sound-dai = <&spdif_out>; }; }; - rk_key: rockchip-key { - compatible = "rockchip,key"; - status = "okay"; + spdif_out: spdif-out { + compatible = "linux,spdif-dit"; + #sound-dai-cells = <0>; + }; - io-channels = <&saradc 1>; + sdio_pwrseq: sdio-pwrseq { + compatible = "mmc-pwrseq-simple"; + clocks = <&rk808 1>; + clock-names = "ext_clock"; + pinctrl-names = "default"; + pinctrl-0 = <&wifi_enable_h>; - power-key { - gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>; - linux,code = <116>; - label = "power"; - gpio-key,wakeup; - }; + /* + * On the module itself this is one of these (depending + * on the actual card populated): + * - SDIO_RESET_L_WL_REG_ON + * - PDN (power down when low) + */ + reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>; }; - hdmi_dp_sound: hdmi-dp-sound { - status = "okay"; - compatible = "rockchip,rk3399-hdmi-dp"; - rockchip,cpu = <&i2s2>; - rockchip,codec = <&hdmi>, <&cdn_dp>; + wireless-wlan { + compatible = "wlan-platdata"; + rockchip,grf = <&grf>; + wifi_chip_type = "ap6354"; + sdio_vref = <1800>; + WIFI,host_wake_irq = <&gpio0 RK_PA3 GPIO_ACTIVE_HIGH>; + status = "disabled"; + }; + + wireless-bluetooth { + compatible = "bluetooth-platdata"; + clocks = <&rk808 1>; + clock-names = "ext_clock"; + uart_rts_gpios = <&gpio2 RK_PC3 GPIO_ACTIVE_LOW>; + pinctrl-names = "default", "rts_gpio"; + pinctrl-0 = <&uart0_rts>; + pinctrl-1 = <&uart0_gpios>; + BT,reset_gpio = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>; + BT,wake_gpio = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>; + BT,wake_host_irq = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>; + status = "disabled"; }; }; @@ -253,30 +281,21 @@ &dmc { status = "okay"; center-supply = <&vdd_center>; - upthreshold = <40>; - downdifferential = <20>; system-status-freq = < /*system status freq(KHz)*/ SYS_STATUS_NORMAL 800000 SYS_STATUS_REBOOT 400000 SYS_STATUS_SUSPEND 400000 - SYS_STATUS_VIDEO_1080P 400000 + SYS_STATUS_VIDEO_1080P 800000 SYS_STATUS_VIDEO_4K 800000 SYS_STATUS_VIDEO_4K_10B 800000 SYS_STATUS_PERFORMANCE 800000 - SYS_STATUS_BOOST 400000 + SYS_STATUS_BOOST 800000 SYS_STATUS_DUALVIEW 800000 SYS_STATUS_ISP 800000 >; - vop-bw-dmc-freq = < - /* min_bw(MB/s) max_bw(MB/s) freq(KHz) */ - 0 577 200000 - 578 1701 300000 - 1702 99999 400000 - >; - auto-min-freq = <400000>; + auto-min-freq = <800000>; auto-freq-en = <0>; - }; &dmc_opp_table { @@ -325,42 +344,26 @@ &display_subsystem { status = "okay"; - ports = <&vopb_out>; - route { route_hdmi: route-hdmi { status = "okay"; connect = <&vopb_out_hdmi>; }; - route_dsi: route-dsi { - status = "disabled"; - connect = <&vopb_out_dsi>; - }; - - route_edp: route-edp { - status = "disabled"; - connect = <&vopb_out_edp>; + route_dp: route-dp { + connect = <&vopl_out_dp>; }; }; }; -&dp_in_vopb { - status = "disabled"; -}; - -&edp { - /delete-node/ pinctrl-0; -}; - &emmc_phy { status = "okay"; }; &i2c0 { status = "okay"; - i2c-scl-rising-time-ns = <168>; - i2c-scl-falling-time-ns = <4>; + i2c-scl-rising-time-ns = <180>; + i2c-scl-falling-time-ns = <30>; clock-frequency = <400000>; vdd_cpu_b: syr827@40 { @@ -393,6 +396,7 @@ regulator-max-microvolt = <1500000>; regulator-ramp-delay = <1000>; fcs,suspend-voltage-selector = <1>; + regulator-always-on; regulator-boot-on; vin-supply = <&vcc_sys>; regulator-initial-mode = <1>; /* 1:force PWM 2:auto */ @@ -411,7 +415,7 @@ rockchip,system-power-controller; wakeup-source; #clock-cells = <1>; - clock-output-names = "xin32k", "rk808-clkout2"; + clock-output-names = "rk808-clkout1", "rk808-clkout2"; vcc1-supply = <&vcc_sys>; vcc2-supply = <&vcc_sys>; @@ -429,8 +433,8 @@ regulators { vdd_center: DCDC_REG1 { regulator-name = "vdd_center"; - regulator-min-microvolt = <750000>; - regulator-max-microvolt = <1350000>; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <900000>; regulator-ramp-delay = <6001>; regulator-always-on; regulator-boot-on; @@ -476,6 +480,7 @@ regulator-name = "vcc1v8_dvp"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; + regulator-always-on; regulator-boot-on; regulator-state-mem { regulator-on-in-suspend; @@ -487,6 +492,7 @@ regulator-name = "vcc3v0_touch"; regulator-min-microvolt = <3000000>; regulator-max-microvolt = <3000000>; + regulator-always-on; regulator-boot-on; regulator-state-mem { regulator-on-in-suspend; @@ -510,6 +516,7 @@ regulator-name = "vcc_sd"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <3300000>; + regulator-always-on; regulator-boot-on; regulator-state-mem { regulator-on-in-suspend; @@ -586,14 +593,6 @@ }; }; -&i2s0 { - status = "okay"; - rockchip,i2s-broken-burst-len; - rockchip,playback-channels = <8>; - rockchip,capture-channels = <8>; - #sound-dai-cells = <0>; -}; - &i2c1 { status = "okay"; i2c-scl-rising-time-ns = <168>; @@ -624,6 +623,14 @@ }; }; +&i2s0 { + status = "okay"; + rockchip,i2s-broken-burst-len; + rockchip,playback-channels = <8>; + rockchip,capture-channels = <8>; + #sound-dai-cells = <0>; +}; + &i2s1 { status = "okay"; rockchip,i2s-broken-burst-len; @@ -634,6 +641,7 @@ &i2s2 { #sound-dai-cells = <0>; + rockchip,bclk-fs = <128>; status = "okay"; }; @@ -641,6 +649,7 @@ phy-supply = <&vcc_phy>; phy-mode = "rgmii"; clock_in_out = "input"; + snps,force_thresh_dma_mode; snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>; snps,reset-active-low; snps,reset-delays-us = <0 10000 50000>; @@ -660,6 +669,17 @@ }; &hdmi { + #address-cells = <1>; + #size-cells = <0>; + #sound-dai-cells = <0>; + status = "okay"; +}; + +&iep { + status = "okay"; +}; + +&iep_mmu { status = "okay"; }; @@ -678,13 +698,17 @@ &sdmmc { clock-frequency = <50000000>; - clock-freq-min-max = <400000 150000000>; + max-frequency = <150000000>; supports-sd; bus-width = <4>; cap-mmc-highspeed; cap-sd-highspeed; disable-wp; num-slots = <1>; + sd-uhs-sdr12; + sd-uhs-sdr25; + sd-uhs-sdr50; + sd-uhs-sdr104; vqmmc-supply = <&vcc_sd>; pinctrl-names = "default"; pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>; @@ -694,7 +718,7 @@ &sdio0 { clock-frequency = <50000000>; - clock-freq-min-max = <200000 50000000>; + max-frequency = <50000000>; supports-sdio; bus-width = <4>; disable-wp; @@ -707,35 +731,51 @@ pinctrl-names = "default"; pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>; sd-uhs-sdr104; - status = "okay"; + status = "disabled"; }; &sdhci { bus-width = <8>; mmc-hs200-1_8v; mmc-hs400-1_8v; + mmc-hs400-enhanced-strobe; + supports-emmc; + non-removable; keep-power-in-suspend; status = "okay"; }; &spdif { - status = "disabled"; + status = "okay"; pinctrl-0 = <&spdif_bus_1>; #sound-dai-cells = <0>; }; &spi1 { status = "okay"; + max-freq = <10000000>; + flash@0 { - compatible = "gigadevice,gd25q128", "jedec,spi-nor"; + compatible = "jedec,spi-nor"; #address-cells = <1>; #size-cells = <1>; reg = <0>; - m25p,fast-read; - spi-max-frequency = <24000000>; + spi-max-frequency = <10000000>; }; }; +&threshold { + temperature = <80000>; +}; + +&target { + temperature = <95000>; +}; + +&soc_crit { + temperature = <100000>; +}; + &tcphy0 { extcon = <&fusb0>; status = "okay"; @@ -826,114 +866,15 @@ status = "okay"; }; -&pwm2 { +&pwm1 { status = "okay"; pinctrl-names = "active"; - pinctrl-0 = <&pwm2_pin_pull_down>; }; -&pwm3 { +&pwm2 { status = "okay"; - - interrupts = ; - compatible = "rockchip,remotectl-pwm"; - remote_pwm_id = <3>; - handle_cpu_id = <1>; - remote_support_psci = <1>; - - ir_key1 { - rockchip,usercode = <0x4040>; - rockchip,key_table = - <0xf2 KEY_REPLY>, - <0xba KEY_BACK>, - <0xf4 KEY_UP>, - <0xf1 KEY_DOWN>, - <0xef KEY_LEFT>, - <0xee KEY_RIGHT>, - <0xbd KEY_HOME>, - <0xea KEY_VOLUMEUP>, - <0xe3 KEY_VOLUMEDOWN>, - <0xe2 KEY_SEARCH>, - <0xb2 KEY_POWER>, - <0xbc KEY_MUTE>, - <0xec KEY_MENU>, - <0xbf 0x190>, - <0xe0 0x191>, - <0xe1 0x192>, - <0xe9 183>, - <0xe6 248>, - <0xe8 185>, - <0xe7 186>, - <0xf0 388>, - <0xbe 0x175>; - }; - - ir_key2 { - rockchip,usercode = <0xff00>; - rockchip,key_table = - <0xf9 KEY_HOME>, - <0xbf KEY_BACK>, - <0xfb KEY_MENU>, - <0xaa KEY_REPLY>, - <0xb9 KEY_UP>, - <0xe9 KEY_DOWN>, - <0xb8 KEY_LEFT>, - <0xea KEY_RIGHT>, - <0xeb KEY_VOLUMEDOWN>, - <0xef KEY_VOLUMEUP>, - <0xf7 KEY_MUTE>, - <0xe7 KEY_POWER>, - <0xfc KEY_POWER>, - <0xa9 KEY_VOLUMEDOWN>, - <0xa8 KEY_VOLUMEDOWN>, - <0xe0 KEY_VOLUMEDOWN>, - <0xa5 KEY_VOLUMEDOWN>, - <0xab 183>, - <0xb7 388>, - <0xe8 388>, - <0xf8 184>, - <0xaf 185>, - <0xed KEY_VOLUMEDOWN>, - <0xee 186>, - <0xb3 KEY_VOLUMEDOWN>, - <0xf1 KEY_VOLUMEDOWN>, - <0xf2 KEY_VOLUMEDOWN>, - <0xf3 KEY_SEARCH>, - <0xb4 KEY_VOLUMEDOWN>, - <0xbe KEY_SEARCH>; - }; - - ir_key3 { - rockchip,usercode = <0x1dcc>; - rockchip,key_table = - <0xee KEY_REPLY>, - <0xf0 KEY_BACK>, - <0xf8 KEY_UP>, - <0xbb KEY_DOWN>, - <0xef KEY_LEFT>, - <0xed KEY_RIGHT>, - <0xfc KEY_HOME>, - <0xf1 KEY_VOLUMEUP>, - <0xfd KEY_VOLUMEDOWN>, - <0xb7 KEY_SEARCH>, - <0xff KEY_POWER>, - <0xf3 KEY_MUTE>, - <0xbf KEY_MENU>, - <0xf9 0x191>, - <0xf5 0x192>, - <0xb3 388>, - <0xbe KEY_1>, - <0xba KEY_2>, - <0xb2 KEY_3>, - <0xbd KEY_4>, - <0xf9 KEY_5>, - <0xb1 KEY_6>, - <0xfc KEY_7>, - <0xf8 KEY_8>, - <0xb0 KEY_9>, - <0xb6 KEY_0>, - <0xb5 KEY_BACKSPACE>; - }; + pinctrl-names = "active"; + pinctrl-0 = <&pwm2_pin_pull_down>; }; &pinctrl { @@ -951,6 +892,13 @@ }; }; + ir { + ir_int: ir-int { + rockchip,pins = + <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + pcie { pcie_pwr_en: pcie-pwr-en { rockchip,pins = @@ -982,6 +930,7 @@ sdio-pwrseq { wifi_enable_h: wifi-enable-h { rockchip,pins = + <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>, <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>; }; }; @@ -1085,35 +1034,6 @@ status = "okay"; }; -&rockchip_suspend { - status = "okay"; - rockchip,sleep-debug-en = <0>; - rockchip,sleep-mode-config = < - (0 - | RKPM_SLP_ARMPD - | RKPM_SLP_PERILPPD - | RKPM_SLP_DDR_RET - | RKPM_SLP_PLLPD - | RKPM_SLP_CENTER_PD - | RKPM_SLP_AP_PWROFF - ) - >; - rockchip,wakeup-config = < - (0 - | RKPM_GPIO_WKUP_EN - | RKPM_PWM_WKUP_EN - ) - >; - rockchip,pwm-regulator-config = < - (0 - | PWM2_REGULATOR_EN - ) - >; - rockchip,power-ctrl = - <&gpio1 RK_PC1 GPIO_ACTIVE_HIGH>, - <&gpio1 RK_PB6 GPIO_ACTIVE_HIGH>; -}; - &vdec_mmu { status = "okay"; }; @@ -1135,3 +1055,13 @@ &vopb_mmu { status = "okay"; }; + +&vopl { + status = "okay"; + assigned-clocks = <&cru DCLK_VOP1_DIV>; + assigned-clock-parents = <&cru PLL_CPLL>; +}; + +&vopl_mmu { + status = "okay"; +};