Support Orange Pi 5 Plus

This commit is contained in:
orangepi-xunlong 2023-05-10 10:27:58 +08:00 committed by baiywt
parent 054e7f7707
commit fba77f9a27
63 changed files with 3244 additions and 33 deletions

View File

@ -1,4 +1,5 @@
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-orangepi-5.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-orangepi-5b.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-orangepi-5-plus.dtb
subdir-y := $(dts-dirs) overlay

View File

@ -2,34 +2,71 @@
dtbo-$(CONFIG_ARCH_ROCKCHIP) += \
rk3588-i2c1-m2.dtbo \
rk3588-i2c1-m4.dtbo \
rk3588-i2c2-m0.dtbo \
rk3588-i2c2-m4.dtbo \
rk3588-i2c3-m0.dtbo \
rk3588-i2c4-m3.dtbo \
rk3588-i2c5-m3.dtbo \
rk3588-i2c6-m4.dtbo \
rk3588-i2c8-m2.dtbo \
rk3588-pwm0-m0.dtbo \
rk3588-pwm0-m1.dtbo \
rk3588-pwm0-m2.dtbo \
rk3588-pwm1-m0.dtbo \
rk3588-pwm1-m1.dtbo \
rk3588-pwm1-m2.dtbo \
rk3588-pwm3-m0.dtbo \
rk3588-pwm3-m2.dtbo \
rk3588-pwm3-m3.dtbo \
rk3588-pwm10-m0.dtbo \
rk3588-pwm11-m0.dtbo \
rk3588-pwm12-m0.dtbo \
rk3588-pwm13-m0.dtbo \
rk3588-pwm13-m2.dtbo \
rk3588-pwm14-m0.dtbo \
rk3588-pwm14-m1.dtbo \
rk3588-pwm14-m2.dtbo \
rk3588-pwm15-m1.dtbo \
rk3588-pwm15-m2.dtbo \
rk3588-spi4-m0-cs1-spidev.dtbo \
rk3588-uart0-m2.dtbo \
rk3588-uart1-m1.dtbo \
rk3588-uart3-m0.dtbo \
rk3588-uart3-m1.dtbo \
rk3588-uart4-m0.dtbo \
rk3588-uart4-m2.dtbo \
rk3588-uart6-m1.dtbo \
rk3588-uart7-m2.dtbo \
rk3588-uart8-m1.dtbo \
rk3588-can0-m0.dtbo \
rk3588-can1-m0.dtbo \
rk3588-can1-m1.dtbo \
rk3588-can2-m1.dtbo \
rk3588-lcd1.dtbo \
rk3588-lcd2.dtbo \
rk3588-wifi-ap6275p.dtbo \
rk3588-opi5plus-lcd.dtbo \
rk3588-ov13850-c1.dtbo \
rk3588-ov13850-c2.dtbo \
rk3588-ov13850-c3.dtbo \
rk3588-ov13855-c1.dtbo \
rk3588-ov13855-c2.dtbo \
rk3588-ov13855-c3.dtbo \
rk3588-ssd-sata.dtbo \
rk3588-dmc.dtbo
rk3588-opi5plus-ov13850.dtbo \
rk3588-opi5plus-ov13855.dtbo \
rk3588-dmc.dtbo \
rk3588-ssd-sata0.dtbo \
rk3588-ssd-sata2.dtbo \
rk3588-hdmirx.dtbo \
rk3588-hdmi2-8k.dtbo \
rk3588-wifi-ap6275p.dtbo \
rk3588-wifi-pcie.dtbo \
rk3588-spi0-m2-cs0-spidev.dtbo \
rk3588-spi0-m2-cs1-spidev.dtbo \
rk3588-spi0-m2-cs0-cs1-spidev.dtbo \
rk3588-spi4-m0-cs1-spidev.dtbo \
rk3588-spi4-m1-cs0-spidev.dtbo \
rk3588-spi4-m1-cs1-spidev.dtbo \
rk3588-spi4-m1-cs0-cs1-spidev.dtbo \
rk3588-spi4-m2-cs0-spidev.dtbo
scr-$(CONFIG_ARCH_ROCKCHIP) += \
rk3588-fixup.scr

View File

@ -0,0 +1,14 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&can0>;
__overlay__ {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&can0m0_pins>;
};
};
};

View File

@ -0,0 +1,14 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&can1>;
__overlay__ {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&can1m0_pins>;
};
};
};

View File

@ -0,0 +1,36 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&hdmi0_in_vp0>;
__overlay__ {
status = "disabled";
};
};
fragment@1 {
target = <&hdmi0_in_vp1>;
__overlay__ {
status = "okay";
};
};
fragment@2 {
target = <&hdmi1_in_vp0>;
__overlay__ {
status = "okay";
};
};
fragment@3 {
target = <&hdmi1_in_vp1>;
__overlay__ {
status = "disabled";
};
};
};

View File

@ -0,0 +1,12 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&hdmirx_ctrler>;
__overlay__ {
status = "okay";
};
};
};

View File

@ -0,0 +1,14 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&i2c2>;
__overlay__ {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&i2c2m0_xfer>;
};
};
};

View File

@ -0,0 +1,14 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&i2c2>;
__overlay__ {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&i2c2m4_xfer>;
};
};
};

View File

@ -0,0 +1,14 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&i2c4>;
__overlay__ {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&i2c4m3_xfer>;
};
};
};

View File

@ -0,0 +1,14 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&i2c6>;
__overlay__ {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&i2c6m4_xfer>;
};
};
};

View File

@ -0,0 +1,14 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&i2c8>;
__overlay__ {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&i2c8m2_xfer>;
};
};
};

View File

@ -3,21 +3,21 @@
/ {
fragment@0 {
target = <&dsi1>;
target = <&dsi0>;
__overlay__ {
status = "okay";
};
};
fragment@1 {
target = <&dsi1_panel>;
target = <&dsi0_panel>;
__overlay__ {
status = "okay";
};
};
fragment@2 {
target = <&dsi1_in_vp3>;
target = <&dsi0_in_vp2>;
__overlay__ {
status = "okay";
};

View File

@ -3,21 +3,21 @@
/ {
fragment@0 {
target = <&dsi0>;
target = <&dsi1>;
__overlay__ {
status = "okay";
};
};
fragment@1 {
target = <&dsi0_panel>;
target = <&dsi1_panel>;
__overlay__ {
status = "okay";
};
};
fragment@2 {
target = <&dsi0_in_vp2>;
target = <&dsi1_in_vp3>;
__overlay__ {
status = "okay";
};

View File

@ -0,0 +1,25 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&dsi1>;
__overlay__ {
status = "okay";
};
};
fragment@1 {
target = <&dsi1_panel>;
__overlay__ {
status = "okay";
};
};
fragment@2 {
target = <&dsi1_in_vp3>;
__overlay__ {
status = "okay";
};
};
};

View File

@ -0,0 +1,100 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&csi2_dphy0_hw>;
__overlay__ {
status = "okay";
};
};
fragment@1 {
target = <&csi2_dphy0>;
__overlay__ {
status = "okay";
};
};
fragment@2 {
target = <&mipi2_csi2>;
__overlay__ {
status = "okay";
};
};
fragment@3 {
target = <&rkcif_mipi_lvds2>;
__overlay__ {
status = "okay";
};
};
fragment@4 {
target = <&rkcif_mipi_lvds2_sditf>;
__overlay__ {
status = "okay";
};
};
fragment@5 {
target = <&rkisp0_vir1>;
__overlay__ {
status = "okay";
};
};
fragment@6 {
target = <&i2c3>;
__overlay__ {
status = "okay";
vm149c-p1@c {
status = "okay";
};
ov13850-1@10 {
status = "okay";
};
};
};
fragment@7 {
target = <&rkcif>;
__overlay__ {
status = "okay";
};
};
fragment@8 {
target = <&rkcif_mmu>;
__overlay__ {
status = "okay";
};
};
fragment@9 {
target = <&rkisp0>;
__overlay__ {
status = "okay";
};
};
fragment@10 {
target = <&isp0_mmu>;
__overlay__ {
status = "okay";
};
};
};

View File

@ -0,0 +1,100 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&csi2_dphy0_hw>;
__overlay__ {
status = "okay";
};
};
fragment@1 {
target = <&csi2_dphy0>;
__overlay__ {
status = "okay";
};
};
fragment@2 {
target = <&mipi2_csi2>;
__overlay__ {
status = "okay";
};
};
fragment@3 {
target = <&rkcif_mipi_lvds2>;
__overlay__ {
status = "okay";
};
};
fragment@4 {
target = <&rkcif_mipi_lvds2_sditf>;
__overlay__ {
status = "okay";
};
};
fragment@5 {
target = <&rkisp0_vir1>;
__overlay__ {
status = "okay";
};
};
fragment@6 {
target = <&i2c3>;
__overlay__ {
status = "okay";
dw9714-p1@c {
status = "okay";
};
ov13855-1@36 {
status = "okay";
};
};
};
fragment@7 {
target = <&rkcif>;
__overlay__ {
status = "okay";
};
};
fragment@8 {
target = <&rkcif_mmu>;
__overlay__ {
status = "okay";
};
};
fragment@9 {
target = <&rkisp0>;
__overlay__ {
status = "okay";
};
};
fragment@10 {
target = <&isp0_mmu>;
__overlay__ {
status = "okay";
};
};
};

View File

@ -0,0 +1,14 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&pwm0>;
__overlay__ {
status = "okay";
pinctrl-names = "active";
pinctrl-0 = <&pwm0m0_pins>;
};
};
};

View File

@ -0,0 +1,13 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&pwm0>;
__overlay__ {
status = "okay";
pinctrl-0 = <&pwm0m2_pins>;
};
};
};

View File

@ -0,0 +1,14 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&pwm1>;
__overlay__ {
status = "okay";
pinctrl-names = "active";
pinctrl-0 = <&pwm1m0_pins>;
};
};
};

View File

@ -0,0 +1,13 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&pwm10>;
__overlay__ {
status = "okay";
pinctrl-0 = <&pwm10m0_pins>;
};
};
};

View File

@ -0,0 +1,13 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&pwm11>;
__overlay__ {
status = "okay";
pinctrl-0 = <&pwm11m0_pins>;
};
};
};

View File

@ -0,0 +1,13 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&pwm12>;
__overlay__ {
status = "okay";
pinctrl-0 = <&pwm12m0_pins>;
};
};
};

View File

@ -0,0 +1,13 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&pwm13>;
__overlay__ {
status = "okay";
pinctrl-0 = <&pwm13m0_pins>;
};
};
};

View File

@ -0,0 +1,14 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&pwm14>;
__overlay__ {
status = "okay";
pinctrl-names = "active";
pinctrl-0 = <&pwm14m0_pins>;
};
};
};

View File

@ -7,6 +7,7 @@
__overlay__ {
status = "okay";
pinctrl-names = "active";
pinctrl-0 = <&pwm14m1_pins>;
};
};

View File

@ -0,0 +1,13 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&pwm14>;
__overlay__ {
status = "okay";
pinctrl-0 = <&pwm14m2_pins>;
};
};
};

View File

@ -0,0 +1,13 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&pwm15>;
__overlay__ {
status = "okay";
pinctrl-0 = <&pwm15m1_pins>;
};
};
};

View File

@ -0,0 +1,13 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&pwm3>;
__overlay__ {
status = "okay";
pinctrl-0 = <&pwm3m3_pins>;
};
};
};

View File

@ -0,0 +1,31 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&spi0>;
__overlay__ {
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&spi0m2_cs0 &spi0m2_cs1 &spi0m2_pins>;
max-freq = <50000000>;
spidev@0 {
compatible = "rockchip,spidev";
status = "okay";
reg = <0>;
spi-max-frequency = <50000000>;
};
spidev@1 {
compatible = "rockchip,spidev";
status = "okay";
reg = <1>;
spi-max-frequency = <50000000>;
};
};
};
};

View File

@ -0,0 +1,24 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&spi0>;
__overlay__ {
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&spi0m2_cs0 &spi0m2_pins>;
max-freq = <50000000>;
spidev@0 {
compatible = "rockchip,spidev";
status = "okay";
reg = <0>;
spi-max-frequency = <50000000>;
};
};
};
};

View File

@ -0,0 +1,24 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&spi0>;
__overlay__ {
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&spi0m2_cs1 &spi0m2_pins>;
max-freq = <50000000>;
spidev@1 {
compatible = "rockchip,spidev";
status = "okay";
reg = <1>;
spi-max-frequency = <50000000>;
};
};
};
};

View File

@ -12,10 +12,10 @@
pinctrl-names = "default";
pinctrl-0 = <&spi4m0_cs1 &spi4m0_pins>;
spidev@0 {
spidev@1 {
compatible = "rockchip,spidev";
status = "okay";
reg = <0>;
reg = <1>;
spi-max-frequency = <50000000>;
};
};

View File

@ -0,0 +1,30 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&spi4>;
__overlay__ {
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&spi4m1_cs0 &spi4m1_cs1 &spi4m1_pins>;
spidev@0 {
compatible = "rockchip,spidev";
status = "okay";
reg = <0>;
spi-max-frequency = <50000000>;
};
spidev@1 {
compatible = "rockchip,spidev";
status = "okay";
reg = <1>;
spi-max-frequency = <50000000>;
};
};
};
};

View File

@ -0,0 +1,23 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&spi4>;
__overlay__ {
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&spi4m1_cs0 &spi4m1_pins>;
spidev@0 {
compatible = "rockchip,spidev";
status = "okay";
reg = <0>;
spi-max-frequency = <50000000>;
};
};
};
};

View File

@ -0,0 +1,23 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&spi4>;
__overlay__ {
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&spi4m1_cs1 &spi4m1_pins>;
spidev@1 {
compatible = "rockchip,spidev";
status = "okay";
reg = <1>;
spi-max-frequency = <50000000>;
};
};
};
};

View File

@ -0,0 +1,23 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&spi4>;
__overlay__ {
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&spi4m2_cs0 &spi4m2_pins>;
spidev@0 {
compatible = "rockchip,spidev";
status = "okay";
reg = <0>;
spi-max-frequency = <50000000>;
};
};
};
};

View File

@ -0,0 +1,20 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&sata2>;
__overlay__ {
status = "okay";
};
};
fragment@1 {
target = <&pcie2x1l1>;
__overlay__ {
status = "disabled";
};
};
};

View File

@ -0,0 +1,13 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&uart3>;
__overlay__ {
status = "okay";
pinctrl-0 = <&uart3m1_xfer>;
};
};
};

View File

@ -0,0 +1,13 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&uart4>;
__overlay__ {
status = "okay";
pinctrl-0 = <&uart4m2_xfer>;
};
};
};

View File

@ -0,0 +1,13 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&uart6>;
__overlay__ {
status = "okay";
pinctrl-0 = <&uart6m1_xfer>;
};
};
};

View File

@ -0,0 +1,13 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&uart7>;
__overlay__ {
status = "okay";
pinctrl-0 = <&uart7m2_xfer>;
};
};
};

View File

@ -0,0 +1,13 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&uart8>;
__overlay__ {
status = "okay";
pinctrl-0 = <&uart8m1_xfer>;
};
};
};

View File

@ -13,6 +13,7 @@
target = <&wireless_wlan>;
__overlay__ {
status = "okay";
wifi_chip_type = "ap6275p";
};
};
};

View File

@ -0,0 +1,19 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&wireless_bluetooth>;
__overlay__ {
status = "okay";
};
};
fragment@1 {
target = <&wireless_wlan>;
__overlay__ {
wifi_chip_type = "pcie";
status = "okay";
};
};
};

View File

@ -6,8 +6,8 @@
/ {
aliases {
mmc0 = &sdhci;
mmc1 = &sdmmc;
mmc0 = &sdmmc;
mmc1 = &sdhci;
mmc2 = &sdio;
};

View File

@ -0,0 +1,170 @@
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright (c) 2021 Rockchip Electronics Co., Ltd.
*
*/
&csi2_dphy0_hw {
status = "disabled";
};
&csi2_dphy0 {
status = "disabled";
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
#address-cells = <1>;
#size-cells = <0>;
mipi_in_ucam0: endpoint@0 {
reg = <0>;
remote-endpoint = <&ov13850_out2>;
data-lanes = <1 2>;
};
mipi_in_ucam1: endpoint@1 {
reg = <1>;
remote-endpoint = <&ov13855_out2>;
data-lanes = <1 2>;
};
};
port@1 {
reg = <1>;
#address-cells = <1>;
#size-cells = <0>;
csidphy0_out: endpoint@0 {
reg = <0>;
remote-endpoint = <&mipi2_csi2_input>;
};
};
};
};
&i2c3 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&i2c3m0_xfer>;
vm149c_p1: vm149c-p1@c {
compatible = "silicon touch,vm149c";
status = "disabled";
reg = <0x0c>;
rockchip,camera-module-index = <1>;
rockchip,camera-module-facing = "back";
};
ov13850_1: ov13850-1@10 {
compatible = "ovti,ov13850";
status = "disabled";
reg = <0x10>;
clocks = <&cru CLK_MIPI_CAMARAOUT_M3>;
clock-names = "xvclk";
pinctrl-names = "default";
pinctrl-0 = <&mipim1_camera3_clk>;
reset-gpios = <&gpio1 RK_PC4 GPIO_ACTIVE_HIGH>;
pwdn-gpios = <&gpio1 RK_PD5 GPIO_ACTIVE_HIGH>;
rockchip,camera-module-index = <0>;
rockchip,camera-module-facing = "back";
rockchip,camera-module-name = "CMK-CT0116";
rockchip,camera-module-lens-name = "default";
lens-focus = <&vm149c_p1>;
port {
ov13850_out2: endpoint {
remote-endpoint = <&mipi_in_ucam0>;
data-lanes = <1 2>;
};
};
};
dw9714_p1: dw9714-p1@c {
compatible = "dongwoon,dw9714";
status = "disabled";
reg = <0x0c>;
rockchip,camera-module-index = <0>;
rockchip,vcm-start-current = <10>;
rockchip,vcm-rated-current = <85>;
rockchip,vcm-step-mode = <5>;
rockchip,camera-module-facing = "back";
};
ov13855_1: ov13855-1@36 {
compatible = "ovti,ov13855";
status = "disabled";
reg = <0x36>;
clocks = <&cru CLK_MIPI_CAMARAOUT_M3>;
clock-names = "xvclk";
pinctrl-names = "default";
pinctrl-0 = <&mipim1_camera3_clk>;
reset-gpios = <&gpio1 RK_PC4 GPIO_ACTIVE_HIGH>;
pwdn-gpios = <&gpio1 RK_PD5 GPIO_ACTIVE_HIGH>;
rockchip,camera-module-index = <0>;
rockchip,camera-module-facing = "back";
rockchip,camera-module-name = "CMK-OT2016-FV1";
rockchip,camera-module-lens-name = "default";
lens-focus = <&dw9714_p1>;
port {
ov13855_out2: endpoint {
remote-endpoint = <&mipi_in_ucam1>;
data-lanes = <1 2>;
};
};
};
};
&mipi2_csi2 {
status = "disabled";
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
#address-cells = <1>;
#size-cells = <0>;
mipi2_csi2_input: endpoint@1 {
reg = <1>;
remote-endpoint = <&csidphy0_out>;
};
};
port@1 {
reg = <1>;
#address-cells = <1>;
#size-cells = <0>;
mipi2_csi2_output: endpoint@0 {
reg = <0>;
remote-endpoint = <&cif_mipi_in2>;
};
};
};
};
&rkcif_mipi_lvds2 {
status = "disabled";
port {
cif_mipi_in2: endpoint {
remote-endpoint = <&mipi2_csi2_output>;
};
};
};
&rkcif_mipi_lvds2_sditf {
status = "disabled";
port {
mipi2_lvds_sditf: endpoint {
remote-endpoint = <&isp0_vir1>;
};
};
};
&rkisp0_vir1 {
status = "disabled";
port {
#address-cells = <1>;
#size-cells = <0>;
isp0_vir1: endpoint@0 {
reg = <0>;
remote-endpoint = <&mipi2_lvds_sditf>;
};
};
};

View File

@ -0,0 +1,45 @@
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
&dsi1 {
status = "disabled";
};
&dsi1_panel {
status = "disabled";
reset-gpios = <&gpio2 RK_PC1 GPIO_ACTIVE_LOW>;
enable-gpios = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&lcd_rst_gpio>;
};
&dsi1_in_vp2 {
status = "disabled";
};
&dsi1_in_vp3 {
status = "disabled";
};
&route_dsi1 {
status = "disabled";
connect = <&vp3_out_dsi1>;
};
&i2c7 {
status = "okay";
gt9xx_0: touchscreen@14 {
compatible = "goodix,gt9271";
reg = <0x14>;
interrupt-parent = <&gpio2>;
interrupts = <RK_PB2 IRQ_TYPE_LEVEL_LOW>;
irq-gpios = <&gpio2 RK_PB2 IRQ_TYPE_LEVEL_LOW>;
reset-gpios = <&gpio2 RK_PB5 GPIO_ACTIVE_HIGH>;
touchscreen-inverted-x;
//touchscreen-inverted-y;
touchscreen-swapped-x-y;
touchscreen-size-x = <1280>;
touchscreen-size-y = <800>;
status = "okay";
};
};

View File

@ -0,0 +1,325 @@
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright (c) 2021 Rockchip Electronics Co., Ltd.
*
*/
/dts-v1/;
#include "rk3588-orangepi-5-plus.dtsi"
#include "rk3588-linux.dtsi"
#include "rk3588-orangepi-5-plus-lcd.dtsi"
#include "rk3588-orangepi-5-plus-camera1.dtsi"
/ {
model = "RK3588 OPi 5 Plus";
compatible = "rockchip,rk3588-orangepi-5-plus", "rockchip,rk3588";
leds: gpio-leds {
compatible = "gpio-leds";
pinctrl-names = "default";
pinctrl-0 =<&leds_rgb>;
status = "okay";
blue_led@1 {
gpios = <&gpio3 RK_PA6 GPIO_ACTIVE_HIGH>;
label = "blue_led";
linux,default-trigger = "heartbeat";
linux,default-trigger-delay-ms = <0>;
};
green_led@2 {
gpios = <&gpio3 RK_PB1 GPIO_ACTIVE_HIGH>;
label = "green_led";
linux,default-trigger = "heartbeat";
linux,default-trigger-delay-ms = <0>;
};
};
fan: pwm-fan {
compatible = "pwm-fan";
#cooling-cells = <2>;
pwms = <&pwm3 0 50000 0>;
cooling-levels = <0 50 100 150 200 255>;
rockchip,temp-trips = <
50000 1
55000 2
60000 3
65000 4
70000 5
>;
status = "okay";
};
};
&sdhci {
status = "okay";
};
&mipi_dcphy0 {
status = "okay";
};
&mipi_dcphy1 {
status = "okay";
};
&rkcif {
status = "okay";
};
&rkcif_mmu {
status = "okay";
};
&rkisp0 {
status = "okay";
};
&isp0_mmu {
status = "okay";
};
&usbdrd3_1 {
status = "okay";
};
&usbdrd_dwc3_1 {
dr_mode = "host";
status = "okay";
};
/* Fan */
&pwm3 {
status = "okay";
pinctrl-names = "active";
pinctrl-0 = <&pwm3m1_pins>;
};
/* watchdog */
&wdt {
status = "okay";
};
&sfc {
status = "okay";
max-freq = <100000000>;
#address-cells = <1>;
#size-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&fspim1_pins>;
spi_flash: spi-flash@0 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "jedec,spi-nor";
reg = <0x0>;
spi-max-frequency = <100000000>;
spi-tx-bus-width = <1>;
spi-rx-bus-width = <4>;
status = "okay";
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
loader@0 {
label = "loader";
reg = <0x0 0x1000000>;
};
};
};
};
&pwm15 {
compatible = "rockchip,remotectl-pwm";
pinctrl-names = "default";
pinctrl-0 = <&pwm15m1_pins>;
remote_pwm_id = <3>;
handle_cpu_id = <1>;
remote_support_psci = <0>;
status = "okay";
ir_key1 {
rockchip,usercode = <0xfb04>;
rockchip,key_table =
<0xa3 KEY_ENTER>,
<0xe4 388>,
<0xf5 KEY_BACK>,
<0xbb KEY_UP>,
<0xe2 KEY_DOWN>,
<0xe3 KEY_LEFT>,
<0xb7 KEY_RIGHT>,
<0xe0 KEY_HOME>,
<0xba KEY_VOLUMEUP>,
<0xda KEY_VOLUMEUP>,
<0xe6 KEY_VOLUMEDOWN>,
<0xdb KEY_VOLUMEDOWN>,
<0xbc KEY_SEARCH>,
<0xb2 KEY_POWER>,
<0xe5 KEY_POWER>,
<0xde KEY_POWER>,
<0xdc KEY_MUTE>,
<0xa2 KEY_MENU>,
<0xec KEY_1>,
<0xef KEY_2>,
<0xee KEY_3>,
<0xf0 KEY_4>,
<0xf3 KEY_5>,
<0xf2 KEY_6>,
<0xf4 KEY_7>,
<0xf7 KEY_8>,
<0xf6 KEY_9>,
<0xb8 KEY_0>;
};
};
&pinctrl {
leds_gpio {
leds_rgb: leds-rgb {
rockchip,pins = <3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>,
<3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
};
/*** 40 pins ***/
&i2c2 {
status = "disabled";
pinctrl-names = "default";
pinctrl-0 = <&i2c2m0_xfer>;
};
&can0 {
status = "disabled";
pinctrl-names = "default";
pinctrl-0 = <&can0m0_pins>;
assigned-clocks = <&cru CLK_CAN0>;
assigned-clock-rates = <200000000>;
};
&can1 {
status = "disabled";
pinctrl-names = "default";
pinctrl-0 = <&can1m0_pins>;
assigned-clocks = <&cru CLK_CAN1>;
assigned-clock-rates = <200000000>;
};
&pwm0 {
status = "disabled";
};
&pwm1 {
status = "disabled";
};
&pwm14 {
status = "disabled";
};
&spi0 {
status = "disabled";
assigned-clocks = <&cru CLK_SPI0>;
assigned-clock-rates = <200000000>;
num-cs = <2>;
};
&uart3 {
status = "disabled";
pinctrl-names = "default";
pinctrl-0 = <&uart3m1_xfer>;
};
&uart4 {
status = "disabled";
pinctrl-names = "default";
pinctrl-0 = <&uart4m2_xfer>;
};
&i2c2 {
status = "disabled";
pinctrl-names = "default";
pinctrl-0 = <&i2c2m4_xfer>;
};
&i2c4 {
status = "disabled";
pinctrl-names = "default";
pinctrl-0 = <&i2c4m3_xfer>;
};
&i2c5 {
status = "disabled";
pinctrl-names = "default";
pinctrl-0 = <&i2c5m3_xfer>;
};
&i2c8 {
status = "disabled";
pinctrl-names = "default";
pinctrl-0 = <&i2c8m2_xfer>;
};
&uart1 {
status = "disabled";
pinctrl-names = "default";
pinctrl-0 = <&uart1m1_xfer>;
};
&uart6 {
status = "disabled";
pinctrl-names = "default";
pinctrl-0 = <&uart6m1_xfer>;
};
&uart7 {
status = "disabled";
pinctrl-names = "default";
pinctrl-0 = <&uart7m2_xfer>;
};
&uart8 {
status = "disabled";
pinctrl-names = "default";
pinctrl-0 = <&uart8m1_xfer>;
};
&pwm10 {
status = "disabled";
pinctrl-names = "active";
pinctrl-0 = <&pwm10m0_pins>;
};
&pwm11 {
status = "disabled";
pinctrl-names = "active";
pinctrl-0 = <&pwm11m0_pins>;
};
&pwm12 {
status = "disabled";
pinctrl-names = "active";
pinctrl-0 = <&pwm12m0_pins>;
};
&pwm13 {
status = "disabled";
pinctrl-names = "active";
pinctrl-0 = <&pwm13m2_pins>;
//pinctrl-0 = <&pwm13m0_pins>;
};
&spi4 {
status = "disabled";
assigned-clocks = <&cru CLK_SPI4>;
assigned-clock-rates = <200000000>;
num-cs = <2>;
};
/*** 40 pins ***/
&hdmirx_ctrler {
status = "disabled";
};

View File

@ -0,0 +1,770 @@
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright (c) 2021 Rockchip Electronics Co., Ltd.
*
*/
#include "dt-bindings/usb/pd.h"
#include "rk3588.dtsi"
#include "rk3588-orangepi.dtsi"
#include "rk3588-rk806-single.dtsi"
/ {
/* If hdmirx node is disabled, delete the reserved-memory node here. */
reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
ranges;
/* Reserve 128MB memory for hdmirx-controller@fdee0000 */
cma {
compatible = "shared-dma-pool";
reusable;
reg = <0x0 (256 * 0x100000) 0x0 (256 * 0x100000)>;
linux,cma-default;
};
};
hdmiin_dc: hdmiin-dc {
compatible = "rockchip,dummy-codec";
#sound-dai-cells = <0>;
};
es8388_sound: es8388-sound {
status = "okay";
compatible = "rockchip,multicodecs-card";
rockchip,card-name = "rockchip,es8388";
hp-det-gpio = <&gpio1 RK_PD3 GPIO_ACTIVE_HIGH>;
io-channels = <&saradc 3>;
io-channel-names = "adc-detect";
keyup-threshold-microvolt = <1800000>;
poll-interval = <100>;
spk-con-gpio = <&gpio3 RK_PC0 GPIO_ACTIVE_HIGH>;
hp-con-gpio = <&gpio3 RK_PA7 GPIO_ACTIVE_HIGH>;
rockchip,format = "i2s";
rockchip,mclk-fs = <256>;
rockchip,cpu = <&i2s0_8ch>;
rockchip,codec = <&es8388>;
rockchip,audio-routing =
"Headphone", "LOUT1",
"Headphone", "ROUT1",
"Speaker", "LOUT2",
"Speaker", "ROUT2",
"Headphone", "Headphone Power",
"Headphone", "Headphone Power",
"Speaker", "Speaker Power",
"Speaker", "Speaker Power",
"LINPUT1", "Main Mic",
"LINPUT2", "Main Mic",
"RINPUT1", "Headset Mic",
"RINPUT2", "Headset Mic";
pinctrl-names = "default";
pinctrl-0 = <&hp_det>;
play-pause-key {
label = "playpause";
linux,code = <KEY_PLAYPAUSE>;
press-threshold-microvolt = <2000>;
};
};
hdmiin-sound {
compatible = "simple-audio-card";
simple-audio-card,format = "i2s";
simple-audio-card,name = "rockchip,hdmiin";
simple-audio-card,bitclock-master = <&dailink0_master>;
simple-audio-card,frame-master = <&dailink0_master>;
status = "okay";
simple-audio-card,cpu {
sound-dai = <&i2s7_8ch>;
};
dailink0_master: simple-audio-card,codec {
sound-dai = <&hdmiin_dc>;
};
};
pcie20_avdd0v85: pcie20-avdd0v85 {
compatible = "regulator-fixed";
regulator-name = "pcie20_avdd0v85";
regulator-boot-on;
regulator-always-on;
regulator-min-microvolt = <850000>;
regulator-max-microvolt = <850000>;
vin-supply = <&vdd_0v85_s0>;
};
pcie20_avdd1v8: pcie20-avdd1v8 {
compatible = "regulator-fixed";
regulator-name = "pcie20_avdd1v8";
regulator-boot-on;
regulator-always-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
vin-supply = <&avcc_1v8_s0>;
};
pcie30_avdd0v75: pcie30-avdd0v75 {
compatible = "regulator-fixed";
regulator-name = "pcie30_avdd0v75";
regulator-boot-on;
regulator-always-on;
regulator-min-microvolt = <750000>;
regulator-max-microvolt = <750000>;
vin-supply = <&avdd_0v75_s0>;
};
pcie30_avdd1v8: pcie30-avdd1v8 {
compatible = "regulator-fixed";
regulator-name = "pcie30_avdd1v8";
regulator-boot-on;
regulator-always-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
vin-supply = <&avcc_1v8_s0>;
};
rk_headset: rk-headset {
status = "disabled";
compatible = "rockchip_headset";
headset_gpio = <&gpio1 RK_PD3 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&hp_det>;
io-channels = <&saradc 3>;
};
vbus5v0_typec: vbus5v0-typec {
compatible = "regulator-fixed";
regulator-name = "vbus5v0_typec";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
enable-active-high;
gpio = <&gpio4 RK_PB0 GPIO_ACTIVE_HIGH>;
vin-supply = <&vcc5v0_usb>;
pinctrl-names = "default";
pinctrl-0 = <&typec5v_pwren>;
};
vcc3v3_pcie30: vcc3v3-pcie30 {
compatible = "regulator-fixed";
regulator-name = "vcc3v3_pcie30";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
enable-active-high;
gpios = <&gpio2 RK_PB6 GPIO_ACTIVE_HIGH>;
startup-delay-us = <5000>;
vin-supply = <&vcc5v0_sys>;
};
vcc5v0_host: vcc5v0-host {
compatible = "regulator-fixed";
regulator-name = "vcc5v0_host";
regulator-boot-on;
regulator-always-on;
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
enable-active-high;
gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_HIGH>;
vin-supply = <&vcc5v0_usb>;
pinctrl-names = "default";
pinctrl-0 = <&vcc5v0_host_en>;
};
vcc3v3_pcie2x1l0: vcc3v3-pcie2x1l0 {
compatible = "regulator-fixed";
regulator-name = "vcc3v3_pcie2x1l0";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
enable-active-high;
gpios = <&gpio2 RK_PC5 GPIO_ACTIVE_HIGH>;
startup-delay-us = <50000>;
vin-supply = <&vcc12v_dcin>;
};
vcc3v3_pcie_eth: vcc3v3-pcie-eth {
compatible = "regulator-fixed";
regulator-name = "vcc3v3_pcie_eth";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-boot-on;
regulator-always-on;
enable-active-low;
gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_LOW>;
startup-delay-us = <50000>;
vin-supply = <&vcc12v_dcin>;
};
vcc_mipicsi0: vcc-mipicsi0-regulator {
compatible = "regulator-fixed";
regulator-name = "vcc_mipicsi0";
enable-active-high;
};
vcc_mipicsi1: vcc-mipicsi1-regulator {
compatible = "regulator-fixed";
regulator-name = "vcc_mipicsi1";
enable-active-high;
};
vcc_mipidcphy0: vcc-mipidcphy0-regulator {
compatible = "regulator-fixed";
regulator-name = "vcc_mipicsi1";
enable-active-high;
};
wireless_bluetooth: wireless-bluetooth {
compatible = "bluetooth-platdata";
clocks = <&hym8563>;
clock-names = "ext_clock";
uart_rts_gpios = <&gpio4 RK_PC4 GPIO_ACTIVE_LOW>;
pinctrl-names = "default", "rts_gpio";
pinctrl-0 = <&uart9m0_rtsn>, <&bt_reset_gpio>, <&bt_wake_gpio>, <&bt_irq_gpio>;
pinctrl-1 = <&uart9_gpios>;
BT,reset_gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
BT,wake_gpio = <&gpio4 RK_PC6 GPIO_ACTIVE_HIGH>;
BT,wake_host_irq = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>;
status = "disabled";
};
wireless_wlan: wireless-wlan {
compatible = "wlan-platdata";
wifi_chip_type = "ap6275p";
pinctrl-names = "default";
pinctrl-0 = <&wifi_host_wake_irq>;
WIFI,host_wake_irq = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>;
status = "disabled";
};
wifi_disable: wifi-diable-gpio-regulator {
compatible = "regulator-fixed";
regulator-name = "wifi_disable";
enable-active-high;
gpio = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>;
regulator-boot-on;
regulator-always-on;
};
};
&backlight {
pwms = <&pwm2 0 25000 0>;
status = "okay";
};
&can2 {
status = "disabled";
};
&combphy0_ps {
status = "okay";
};
&combphy1_ps {
status = "okay";
};
&combphy2_psu {
status = "okay";
};
&dp0 {
status = "okay";
};
&dp0_in_vp0 {
status = "disabled";
};
&dp0_in_vp1 {
status = "disabled";
};
&dp0_in_vp2 {
status = "okay";
};
&dp0_sound{
status = "okay";
};
&spdif_tx2{
status = "okay";
};
/*
* mipi_dcphy0 needs to be enabled
* when dsi0 is enabled
*/
&dsi0 {
status = "disabled";
};
&dsi0_in_vp2 {
status = "disabled";
};
&dsi0_in_vp3 {
status = "disabled";
};
&dsi0_panel {
status = "disabled";
};
/*
* mipi_dcphy1 needs to be enabled
* when dsi1 is enabled
*/
&dsi1 {
status = "disabled";
pinctrl-names = "default";
pinctrl-0 = <&mipi_te1>;
};
&dsi1_in_vp2 {
status = "disabled";
};
&dsi1_in_vp3 {
status = "disabled";
};
&dsi1_panel {
status = "disabled";
};
&gmac0 {
status = "disabled";
};
&hdmi0 {
status = "okay";
enable-gpios = <&gpio4 RK_PB1 GPIO_ACTIVE_HIGH>;
cec-enable = "true";
};
&hdmi0_in_vp0 {
status = "okay";
};
&hdmi0_in_vp1 {
status = "disabled";
};
&hdmi0_in_vp2 {
status = "disabled";
};
&hdmi0_sound {
status = "okay";
};
&hdmi1 {
status = "okay";
enable-gpios = <&gpio4 RK_PB2 GPIO_ACTIVE_HIGH>;
cec-enable = "true";
};
&hdmi1_in_vp0 {
status = "disabled";
};
&hdmi1_in_vp1 {
status = "okay";
};
&hdmi1_in_vp2 {
status = "disabled";
};
&hdmi1_sound {
status = "okay";
};
/* Should work with at least 128MB cma reserved above. */
&hdmirx_ctrler {
status = "disabled";
/* Effective level used to trigger HPD: 0-low, 1-high */
hpd-trigger-level = <1>;
hdmirx-det-gpios = <&gpio1 RK_PC6 GPIO_ACTIVE_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&hdmim1_rx_cec &hdmim1_rx_hpdin &hdmim1_rx_scl &hdmim1_rx_sda &hdmirx_det>;
};
&hdptxphy_hdmi0 {
status = "okay";
};
&hdptxphy_hdmi1 {
status = "okay";
};
&i2c0 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&i2c0m2_xfer>;
vdd_cpu_big0_s0: vdd_cpu_big0_mem_s0: rk8602@42 {
compatible = "rockchip,rk8602";
reg = <0x42>;
vin-supply = <&vcc5v0_sys>;
regulator-compatible = "rk860x-reg";
regulator-name = "vdd_cpu_big0_s0";
regulator-min-microvolt = <550000>;
regulator-max-microvolt = <1050000>;
regulator-ramp-delay = <2300>;
rockchip,suspend-voltage-selector = <1>;
regulator-boot-on;
regulator-always-on;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vdd_cpu_big1_s0: vdd_cpu_big1_mem_s0: rk8603@43 {
compatible = "rockchip,rk8603";
reg = <0x43>;
vin-supply = <&vcc5v0_sys>;
regulator-compatible = "rk860x-reg";
regulator-name = "vdd_cpu_big1_s0";
regulator-min-microvolt = <550000>;
regulator-max-microvolt = <1050000>;
regulator-ramp-delay = <2300>;
rockchip,suspend-voltage-selector = <1>;
regulator-boot-on;
regulator-always-on;
regulator-state-mem {
regulator-off-in-suspend;
};
};
};
&i2c6 {
status = "okay";
clock-frequency = <400000>;
pinctrl-names = "default";
pinctrl-0 = <&i2c6m0_xfer>;
usbc0: fusb302@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";
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 =
<PDO_FIXED(5000, 1000, PDO_FIXED_USB_COMM)>;
source-pdos =
<PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
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 = <RK_PC6 IRQ_TYPE_LEVEL_LOW>;
status = "okay";
};
};
&i2c1 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&i2c1m2_xfer>;
vdd_npu_s0: vdd_npu_mem_s0: rk8602@42 {
compatible = "rockchip,rk8602";
reg = <0x42>;
vin-supply = <&vcc5v0_sys>;
regulator-compatible = "rk860x-reg";
regulator-name = "vdd_npu_s0";
regulator-min-microvolt = <550000>;
regulator-max-microvolt = <950000>;
regulator-ramp-delay = <2300>;
rockchip,suspend-voltage-selector = <1>;
regulator-boot-on;
regulator-always-on;
regulator-state-mem {
regulator-off-in-suspend;
};
};
};
&i2c7 {
status = "okay";
es8388: es8388@11 {
status = "okay";
#sound-dai-cells = <0>;
compatible = "everest,es8388", "everest,es8323";
reg = <0x11>;
clocks = <&cru I2S0_8CH_MCLKOUT>;
clock-names = "mclk";
assigned-clocks = <&cru I2S0_8CH_MCLKOUT>;
assigned-clock-rates = <12288000>;
pinctrl-names = "default";
pinctrl-0 = <&i2s0_mclk>;
};
};
&i2s5_8ch {
status = "okay";
};
&i2s6_8ch {
status = "okay";
};
&i2s7_8ch {
status = "okay";
};
&mdio0 {
rgmii_phy: phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <0x1>;
};
};
&mipi_dcphy0 {
status = "disabled";
};
&mipi_dcphy1 {
status = "disabled";
};
//phy1
&pcie2x1l0 {
reset-gpios = <&gpio4 RK_PA5 GPIO_ACTIVE_HIGH>;
vpcie3v3-supply = <&vcc3v3_pcie2x1l0>;
rockchip,skip-scan-in-resume;
status = "okay";
};
//phy2
&pcie2x1l1 {
reset-gpios = <&gpio3 RK_PB3 GPIO_ACTIVE_HIGH>;
status = "okay";
};
//phy0
&pcie2x1l2 {
reset-gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_HIGH>;
status = "okay";
};
&pcie30phy {
rockchip,pcie30-phymode = <PHY_MODE_PCIE_AGGREGATION>;
status = "okay";
};
&pcie3x4 {
reset-gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
vpcie3v3-supply = <&vcc3v3_pcie30>;
status = "okay";
};
&pinctrl {
hdmi {
hdmirx_det: hdmirx-det {
rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
headphone {
hp_det: hp-det {
rockchip,pins = <1 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
hym8563 {
hym8563_int: hym8563-int {
rockchip,pins = <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
lcd {
lcd_rst_gpio: lcd-rst-gpio {
rockchip,pins = <2 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
usb {
vcc5v0_host_en: vcc5v0-host-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>;
};
};
wireless-bluetooth {
uart9_gpios: uart9-gpios {
rockchip,pins = <4 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>;
};
bt_reset_gpio: bt-reset-gpio {
rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
};
bt_wake_gpio: bt-wake-gpio {
rockchip,pins = <4 RK_PC6 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_PB0 RK_FUNC_GPIO &pcfg_pull_down>;
};
};
sdmmc {
sdmmc_pwr: sdmmc_pwr {
rockchip,pins = <3 RK_PD5 RK_FUNC_GPIO &pcfg_pull_down>;
};
};
};
&pwm2 {
pinctrl-names = "active";
pinctrl-0 = <&pwm2m2_pins>;
status = "okay";
};
&sata0 {
status = "disabled";
};
&u2phy1_otg {
phy-supply = <&vcc5v0_host>;
};
&u2phy2_host {
phy-supply = <&vcc5v0_host>;
};
&u2phy3_host {
phy-supply = <&vcc5v0_host>;
};
&uart9 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&uart9m0_xfer &uart9m0_ctsn>;
};
&usbdp_phy0 {
orientation-switch;
svid = <0xff01>;
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_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>;
};
&usbdrd_dwc3_0 {
status = "okay";
dr_mode = "otg";
usb-role-switch;
port {
#address-cells = <1>;
#size-cells = <0>;
dwc3_0_role_switch: endpoint@0 {
reg = <0>;
remote-endpoint = <&usbc0_role_sw>;
};
};
};
&usbhost3_0 {
status = "disabled";
};
&usbhost_dwc3_0 {
status = "disabled";
};

View File

@ -0,0 +1,651 @@
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright (c) 2021 Rockchip Electronics Co., Ltd.
*
*/
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pwm/pwm.h>
#include <dt-bindings/pinctrl/rockchip.h>
#include <dt-bindings/input/rk-input.h>
#include <dt-bindings/display/drm_mipi_dsi.h>
#include <dt-bindings/display/rockchip_vop.h>
#include <dt-bindings/sensor-dev.h>
/ {
adc_keys: adc-keys {
compatible = "adc-keys";
io-channels = <&saradc 1>;
io-channel-names = "buttons";
keyup-threshold-microvolt = <1800000>;
poll-interval = <100>;
vol-up-key {
label = "volume up";
linux,code = <KEY_VOLUMEUP>;
press-threshold-microvolt = <17000>;
};
vol-down-key {
label = "volume down";
linux,code = <KEY_VOLUMEDOWN>;
press-threshold-microvolt = <417000>;
};
menu-key {
label = "menu";
linux,code = <KEY_MENU>;
press-threshold-microvolt = <890000>;
};
back-key {
label = "back";
linux,code = <KEY_BACK>;
press-threshold-microvolt = <1235000>;
};
};
backlight: backlight {
compatible = "pwm-backlight";
brightness-levels = <
0 20 20 21 21 22 22 23
23 24 24 25 25 26 26 27
27 28 28 29 29 30 30 31
31 32 32 33 33 34 34 35
35 36 36 37 37 38 38 39
40 41 42 43 44 45 46 47
48 49 50 51 52 53 54 55
56 57 58 59 60 61 62 63
64 65 66 67 68 69 70 71
72 73 74 75 76 77 78 79
80 81 82 83 84 85 86 87
88 89 90 91 92 93 94 95
96 97 98 99 100 101 102 103
104 105 106 107 108 109 110 111
112 113 114 115 116 117 118 119
120 121 122 123 124 125 126 127
128 129 130 131 132 133 134 135
136 137 138 139 140 141 142 143
144 145 146 147 148 149 150 151
152 153 154 155 156 157 158 159
160 161 162 163 164 165 166 167
168 169 170 171 172 173 174 175
176 177 178 179 180 181 182 183
184 185 186 187 188 189 190 191
192 193 194 195 196 197 198 199
200 201 202 203 204 205 206 207
208 209 210 211 212 213 214 215
216 217 218 219 220 221 222 223
224 225 226 227 228 229 230 231
232 233 234 235 236 237 238 239
240 241 242 243 244 245 246 247
248 249 250 251 252 253 254 255
>;
default-brightness-level = <200>;
};
dp0_sound: dp0-sound {
status = "disabled";
compatible = "rockchip,hdmi";
rockchip,card-name= "rockchip,dp0";
rockchip,mclk-fs = <512>;
rockchip,cpu = <&spdif_tx2>;
rockchip,codec = <&dp0 1>;
rockchip,jack-det;
};
dp1_sound: dp1-sound {
status = "disabled";
compatible = "rockchip,hdmi";
rockchip,card-name= "rockchip,dp1";
rockchip,mclk-fs = <512>;
rockchip,cpu = <&spdif_tx5>;
rockchip,codec = <&dp1 1>;
rockchip,jack-det;
};
hdmi0_sound: hdmi0-sound {
status = "disabled";
compatible = "rockchip,hdmi";
rockchip,mclk-fs = <128>;
rockchip,card-name = "rockchip-hdmi0";
rockchip,cpu = <&i2s5_8ch>;
rockchip,codec = <&hdmi0>;
rockchip,jack-det;
};
hdmi1_sound: hdmi1-sound {
status = "disabled";
compatible = "rockchip,hdmi";
rockchip,mclk-fs = <128>;
rockchip,card-name = "rockchip-hdmi1";
rockchip,cpu = <&i2s6_8ch>;
rockchip,codec = <&hdmi1>;
rockchip,jack-det;
};
spdif_tx1_dc: spdif-tx1-dc {
status = "disabled";
compatible = "linux,spdif-dit";
#sound-dai-cells = <0>;
};
spdif_tx1_sound: spdif-tx1-sound {
status = "disabled";
compatible = "simple-audio-card";
simple-audio-card,name = "rockchip,spdif-tx1";
simple-audio-card,cpu {
sound-dai = <&spdif_tx1>;
};
simple-audio-card,codec {
sound-dai = <&spdif_tx1_dc>;
};
};
test-power {
status = "disabled";
};
vcc12v_dcin: vcc12v-dcin {
compatible = "regulator-fixed";
regulator-name = "vcc12v_dcin";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <12000000>;
regulator-max-microvolt = <12000000>;
};
vcc5v0_sys: vcc5v0-sys {
compatible = "regulator-fixed";
regulator-name = "vcc5v0_sys";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
vin-supply = <&vcc12v_dcin>;
};
vcc5v0_usbdcin: vcc5v0-usbdcin {
compatible = "regulator-fixed";
regulator-name = "vcc5v0_usbdcin";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
vin-supply = <&vcc12v_dcin>;
};
vcc5v0_usb: vcc5v0-usb {
compatible = "regulator-fixed";
regulator-name = "vcc5v0_usb";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
vin-supply = <&vcc5v0_usbdcin>;
};
spi2: spi@feb20000 {
compatible = "rockchip,rk3066-spi";
reg = <0x0 0xfeb20000 0x0 0x1000>;
interrupts = <GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
#size-cells = <0>;
clocks = <&cru CLK_SPI2>, <&cru PCLK_SPI2>;
clock-names = "spiclk", "apb_pclk";
dmas = <&dmac1 15>, <&dmac1 16>;
dma-names = "tx", "rx";
pinctrl-names = "default";
pinctrl-0 = <&spi2m2_cs0 &spi2m2_pins>;
num-cs = <2>;
status = "okay";
};
vcc_1v1_nldo_s3: vcc-1v1-nldo-s3 {
compatible = "regulator-fixed";
regulator-name = "vcc_1v1_nldo_s3";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1100000>;
regulator-max-microvolt = <1100000>;
vin-supply = <&vcc5v0_sys>;
};
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 = <&gpio3 RK_PD5 GPIO_ACTIVE_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&sdmmc_pwr>;
enable-active-low;
};
};
&av1d_mmu {
status = "okay";
};
&dsi0 {
status = "disabled";
//rockchip,lane-rate = <1000>;
dsi0_panel: panel@0 {
status = "disabled";
compatible = "innolux,afj101-ba2131";
reg = <0>;
backlight = <&backlight>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
panel_in_dsi: endpoint {
remote-endpoint = <&dsi_out_panel>;
};
};
};
};
ports {
#address-cells = <1>;
#size-cells = <0>;
port@1 {
reg = <1>;
dsi_out_panel: endpoint {
remote-endpoint = <&panel_in_dsi>;
};
};
};
};
&dsi1 {
status = "disabled";
//rockchip,lane-rate = <1000>;
dsi1_panel: panel@0 {
status = "disabled";
compatible = "innolux,afj101-ba2131";
reg = <0>;
backlight = <&backlight>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
panel_in_dsi1: endpoint {
remote-endpoint = <&dsi1_out_panel>;
};
};
};
};
ports {
#address-cells = <1>;
#size-cells = <0>;
port@1 {
reg = <1>;
dsi1_out_panel: endpoint {
remote-endpoint = <&panel_in_dsi1>;
};
};
};
};
&gpu {
mali-supply = <&vdd_gpu_s0>;
mem-supply = <&vdd_gpu_mem_s0>;
status = "okay";
};
&i2s0_8ch {
status = "okay";
pinctrl-0 = <&i2s0_lrck
&i2s0_sclk
&i2s0_sdi0
&i2s0_sdo0>;
};
&iep {
status = "okay";
};
&iep_mmu {
status = "okay";
};
&jpegd {
status = "okay";
};
&jpegd_mmu {
status = "okay";
};
&jpege_ccu {
status = "okay";
};
&jpege0 {
status = "okay";
};
&jpege0_mmu {
status = "okay";
};
&jpege1 {
status = "okay";
};
&jpege1_mmu {
status = "okay";
};
&jpege2 {
status = "okay";
};
&jpege2_mmu {
status = "okay";
};
&jpege3 {
status = "okay";
};
&jpege3_mmu {
status = "okay";
};
&mpp_srv {
status = "okay";
};
&rga3_core0 {
status = "okay";
};
&rga3_0_mmu {
status = "okay";
};
&rga3_core1 {
status = "okay";
};
&rga3_1_mmu {
status = "okay";
};
&rga2 {
status = "okay";
};
&rknpu {
rknpu-supply = <&vdd_npu_s0>;
mem-supply = <&vdd_npu_mem_s0>;
status = "okay";
};
&rknpu_mmu {
status = "okay";
};
&rkvdec_ccu {
status = "okay";
};
&rkvdec0 {
status = "okay";
};
&rkvdec0_mmu {
status = "okay";
};
&rkvdec1 {
status = "okay";
};
&rkvdec1_mmu {
status = "okay";
};
&rkvenc_ccu {
status = "okay";
};
&rkvenc0 {
status = "okay";
};
&rkvenc0_mmu {
status = "okay";
};
&rkvenc1 {
status = "okay";
};
&rkvenc1_mmu {
status = "okay";
};
&rockchip_suspend {
status = "okay";
rockchip,sleep-debug-en = <1>;
};
&saradc {
status = "okay";
vref-supply = <&vcc_1v8_s0>;
};
&sdhci {
bus-width = <8>;
no-sdio;
no-sd;
non-removable;
max-frequency = <200000000>;
mmc-hs400-1_8v;
mmc-hs400-enhanced-strobe;
status = "disabled";
};
&sdmmc {
max-frequency = <150000000>;
no-sdio;
no-mmc;
bus-width = <4>;
cap-mmc-highspeed;
cap-sd-highspeed;
disable-wp;
sd-uhs-sdr104;
vmmc-supply = <&vcc_3v3_sd_s0>;
vqmmc-supply = <&vccio_sd_s0>;
status = "okay";
};
&tsadc {
status = "okay";
};
&u2phy0 {
status = "okay";
};
&u2phy1 {
status = "okay";
};
&u2phy2 {
status = "okay";
};
&u2phy3 {
status = "okay";
};
&u2phy0_otg {
rockchip,typec-vbus-det;
status = "okay";
};
&u2phy1_otg {
status = "okay";
};
&u2phy2_host {
status = "okay";
};
&u2phy3_host {
status = "okay";
};
&usb_host0_ehci {
status = "okay";
};
&usb_host0_ohci {
status = "okay";
};
&usb_host1_ehci {
status = "okay";
};
&usb_host1_ohci {
status = "okay";
};
&usbdp_phy0 {
status = "okay";
};
&usbdp_phy0_dp {
status = "okay";
};
&usbdp_phy0_u3 {
status = "okay";
};
&usbdp_phy1 {
status = "okay";
};
&usbdp_phy1_dp {
status = "okay";
};
&usbdp_phy1_u3 {
status = "okay";
};
&usbdrd3_0 {
status = "okay";
};
&usbdrd_dwc3_0 {
dr_mode = "otg";
status = "okay";
};
&usbhost3_0 {
status = "okay";
};
&usbhost_dwc3_0 {
status = "okay";
};
&usbdrd3_1 {
status = "okay";
};
&usbdrd_dwc3_1 {
status = "okay";
};
&vdpu {
status = "okay";
};
&vdpu_mmu {
status = "okay";
};
&vepu {
status = "okay";
};
&vop {
status = "okay";
disable-win-move;
assigned-clocks = <&cru ACLK_VOP>;
assigned-clock-rates = <800000000>;
};
&vop_mmu {
status = "okay";
};
/* vp0 & vp1 splice for 8K output */
&vp0 {
cursor-win-id=<ROCKCHIP_VOP2_ESMART0>;
rockchip,plane-mask = <(1 << ROCKCHIP_VOP2_CLUSTER0 | 1 << ROCKCHIP_VOP2_ESMART0)>;
rockchip,primary-plane = <ROCKCHIP_VOP2_ESMART0>;
rockchip,primary-plane = <ROCKCHIP_VOP2_CLUSTER0>;
};
&vp1 {
cursor-win-id=<ROCKCHIP_VOP2_ESMART1>;
rockchip,plane-mask = <(1 << ROCKCHIP_VOP2_CLUSTER1 | 1 << ROCKCHIP_VOP2_ESMART1)>;
rockchip,primary-plane = <ROCKCHIP_VOP2_ESMART1>;
rockchip,primary-plane = <ROCKCHIP_VOP2_CLUSTER1>;
};
&vp2 {
cursor-win-id=<ROCKCHIP_VOP2_ESMART2>;
rockchip,plane-mask = <(1 << ROCKCHIP_VOP2_CLUSTER2 | 1 << ROCKCHIP_VOP2_ESMART2)>;
rockchip,primary-plane = <ROCKCHIP_VOP2_ESMART2>;
rockchip,primary-plane = <ROCKCHIP_VOP2_CLUSTER2>;
};
&vp3 {
cursor-win-id=<ROCKCHIP_VOP2_ESMART3>;
rockchip,plane-mask = <(1 << ROCKCHIP_VOP2_CLUSTER3 | 1 << ROCKCHIP_VOP2_ESMART3)>;
rockchip,primary-plane = <ROCKCHIP_VOP2_ESMART3>;
rockchip,primary-plane = <ROCKCHIP_VOP2_CLUSTER3>;
};
&display_subsystem {
clocks = <&hdptxphy_hdmi_clk0>, <&hdptxphy_hdmi_clk1>;
clock-names = "hdmi0_phy_pll", "hdmi1_phy_pll";
};
&i2c0 {
pinctrl-names = "default";
pinctrl-0 = <&i2c0m2_xfer>;
};
&cpu_l0 {
cpu-supply = <&vdd_cpu_lit_s0>;
mem-supply = <&vdd_cpu_lit_mem_s0>;
};
&cpu_b0 {
cpu-supply = <&vdd_cpu_big0_s0>;
mem-supply = <&vdd_cpu_big0_mem_s0>;
};
&cpu_b2 {
cpu-supply = <&vdd_cpu_big1_s0>;
mem-supply = <&vdd_cpu_big1_mem_s0>;
};

View File

@ -344,7 +344,7 @@
/* watchdog */
&wdt {
status = "okay";
status = "okay";
};
&sfc {
@ -379,11 +379,11 @@
};
&mipi_dcphy0 {
status = "okay";
status = "okay";
};
&mipi_dcphy1 {
status = "okay";
status = "okay";
};
&rkcif {
@ -422,3 +422,13 @@
rockchip,skip-scan-in-resume;
status = "okay";
};
&pinctrl
{
gpio-func {
leds_gpio: leds-gpio {
rockchip,pins =
<1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
};

View File

@ -403,6 +403,13 @@
<0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
gpio-func {
leds_gpio: leds-gpio {
rockchip,pins =
<1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
};
&sdhci {

View File

@ -3413,11 +3413,5 @@
rockchip,pins =
<0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
};
/omit-if-no-ref/
leds_gpio: leds-gpio {
rockchip,pins =
<0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
};

View File

@ -132,6 +132,12 @@ struct intel_debug_features {
__u8 page1[16];
} __packed;
#define INTEL_HW_PLATFORM(cnvx_bt) ((u8)(((cnvx_bt) & 0x0000ff00) >> 8))
#define INTEL_HW_VARIANT(cnvx_bt) ((u8)(((cnvx_bt) & 0x003f0000) >> 16))
#define INTEL_CNVX_TOP_TYPE(cnvx_top) ((cnvx_top) & 0x00000fff)
#define INTEL_CNVX_TOP_STEP(cnvx_top) (((cnvx_top) & 0x0f000000) >> 24)
#define INTEL_CNVX_TOP_PACK_SWAB(t, s) __swab16(((__u16)(((t) << 4) | (s))))
#if IS_ENABLED(CONFIG_BT_INTEL)
int btintel_check_bdaddr(struct hci_dev *hdev);

View File

@ -25,6 +25,7 @@
#define RTL_ROM_LMP_8821A 0x8821
#define RTL_ROM_LMP_8761A 0x8761
#define RTL_ROM_LMP_8822B 0x8822
#define RTL_ROM_LMP_8852A 0x8852
#define RTL_CONFIG_MAGIC 0x8723ab55
#define IC_MATCH_FL_LMPSUBV (1 << 0)
@ -168,6 +169,13 @@ static const struct id_table ic_id_table[] = {
.has_rom_version = true,
.fw_name = "rtl_bt/rtl8822b_fw.bin",
.cfg_name = "rtl_bt/rtl8822b_config" },
/* 8852B */
{ IC_INFO(RTL_ROM_LMP_8852A, 0xb),
.config_needed = false,
.has_rom_version = true,
.fw_name = "rtl_bt/rtl8852bu_fw.bin",
.cfg_name = "rtl_bt/rtl8852bu_config" },
};
static const struct id_table *btrtl_match_ic(u16 lmp_subver, u16 hci_rev,
@ -275,6 +283,7 @@ static int rtlbt_parse_firmware(struct hci_dev *hdev,
{ RTL_ROM_LMP_8821A, 10 }, /* 8821C */
{ RTL_ROM_LMP_8822B, 13 }, /* 8822C */
{ RTL_ROM_LMP_8761A, 14 }, /* 8761B */
{ RTL_ROM_LMP_8852A, 20 }, /* 8852B */
};
min_size = sizeof(struct rtl_epatch_header) + sizeof(extension_sig) + 3;
@ -660,6 +669,7 @@ int btrtl_download_firmware(struct hci_dev *hdev,
case RTL_ROM_LMP_8821A:
case RTL_ROM_LMP_8761A:
case RTL_ROM_LMP_8822B:
case RTL_ROM_LMP_8852A:
return btrtl_setup_rtl8723b(hdev, btrtl_dev);
default:
rtl_dev_info(hdev, "assuming no firmware upload needed");
@ -835,3 +845,5 @@ MODULE_FIRMWARE("rtl_bt/rtl8821a_fw.bin");
MODULE_FIRMWARE("rtl_bt/rtl8821a_config.bin");
MODULE_FIRMWARE("rtl_bt/rtl8822b_fw.bin");
MODULE_FIRMWARE("rtl_bt/rtl8822b_config.bin");
MODULE_FIRMWARE("rtl_bt/rtl8852bu_fw.bin");
MODULE_FIRMWARE("rtl_bt/rtl8852bu_config.bin");

View File

@ -60,6 +60,7 @@ static struct usb_driver btusb_driver;
#define BTUSB_WIDEBAND_SPEECH 0x400000
#define BTUSB_VALID_LE_STATES 0x800000
#define BTUSB_QCA_WCN6855 0x1000000
#define BTUSB_INTEL_NEWGEN 0x2000000
static const struct usb_device_id btusb_table[] = {
/* Generic Bluetooth USB device */
@ -367,7 +368,7 @@ static const struct usb_device_id blacklist_table[] = {
BTUSB_WIDEBAND_SPEECH },
{ USB_DEVICE(0x8087, 0x0029), .driver_info = BTUSB_INTEL_NEW |
BTUSB_WIDEBAND_SPEECH },
{ USB_DEVICE(0x8087, 0x0032), .driver_info = BTUSB_INTEL_NEW |
{ USB_DEVICE(0x8087, 0x0032), .driver_info = BTUSB_INTEL_NEWGEN |
BTUSB_WIDEBAND_SPEECH},
{ USB_DEVICE(0x8087, 0x07da), .driver_info = BTUSB_CSR },
{ USB_DEVICE(0x8087, 0x07dc), .driver_info = BTUSB_INTEL },
@ -466,6 +467,9 @@ static const struct usb_device_id blacklist_table[] = {
{ USB_DEVICE(0x04ca, 0x4005), .driver_info = BTUSB_REALTEK },
{ USB_DEVICE(0x13d3, 0x3548), .driver_info = BTUSB_REALTEK },
/* Realtek 8852BE Bluetooth devices */
{ USB_DEVICE(0x0bda, 0xb85b), .driver_info = BTUSB_REALTEK },
/* Silicon Wave based devices */
{ USB_DEVICE(0x0c10, 0x0000), .driver_info = BTUSB_SWAVE },
@ -2418,6 +2422,182 @@ static bool btusb_setup_intel_new_get_fw_name(struct intel_version *ver,
return true;
}
static void btusb_setup_intel_newgen_get_fw_name(const struct intel_version_tlv *ver_tlv,
char *fw_name, size_t len,
const char *suffix)
{
/* The firmware file name for new generation controllers will be
* ibt-<cnvi_top type+cnvi_top step>-<cnvr_top type+cnvr_top step>
*/
snprintf(fw_name, len, "intel/ibt-%04x-%04x.%s",
INTEL_CNVX_TOP_PACK_SWAB(INTEL_CNVX_TOP_TYPE(ver_tlv->cnvi_top),
INTEL_CNVX_TOP_STEP(ver_tlv->cnvi_top)),
INTEL_CNVX_TOP_PACK_SWAB(INTEL_CNVX_TOP_TYPE(ver_tlv->cnvr_top),
INTEL_CNVX_TOP_STEP(ver_tlv->cnvr_top)),
suffix);
}
static int btusb_intel_download_firmware_newgen(struct hci_dev *hdev,
struct intel_version_tlv *ver,
u32 *boot_param)
{
const struct firmware *fw;
char fwname[64];
int err;
struct btusb_data *data = hci_get_drvdata(hdev);
if (!ver || !boot_param)
return -EINVAL;
/* The hardware platform number has a fixed value of 0x37 and
* for now only accept this single value.
*/
if (INTEL_HW_PLATFORM(ver->cnvi_bt) != 0x37) {
bt_dev_err(hdev, "Unsupported Intel hardware platform (0x%2x)",
INTEL_HW_PLATFORM(ver->cnvi_bt));
return -EINVAL;
}
/* The firmware variant determines if the device is in bootloader
* mode or is running operational firmware. The value 0x03 identifies
* the bootloader and the value 0x23 identifies the operational
* firmware.
*
* When the operational firmware is already present, then only
* the check for valid Bluetooth device address is needed. This
* determines if the device will be added as configured or
* unconfigured controller.
*
* It is not possible to use the Secure Boot Parameters in this
* case since that command is only available in bootloader mode.
*/
if (ver->img_type == 0x03) {
clear_bit(BTUSB_BOOTLOADER, &data->flags);
btintel_check_bdaddr(hdev);
return 0;
}
/* Check for supported iBT hardware variants of this firmware
* loading method.
*
* This check has been put in place to ensure correct forward
* compatibility options when newer hardware variants come along.
*/
switch (INTEL_HW_VARIANT(ver->cnvi_bt)) {
case 0x17: /* TyP */
case 0x18: /* Slr */
case 0x19: /* Slr-F */
break;
default:
bt_dev_err(hdev, "Unsupported Intel hardware variant (0x%x)",
INTEL_HW_VARIANT(ver->cnvi_bt));
return -EINVAL;
}
/* If the device is not in bootloader mode, then the only possible
* choice is to return an error and abort the device initialization.
*/
if (ver->img_type != 0x01) {
bt_dev_err(hdev, "Unsupported Intel firmware variant (0x%x)",
ver->img_type);
return -ENODEV;
}
/* It is required that every single firmware fragment is acknowledged
* with a command complete event. If the boot parameters indicate
* that this bootloader does not send them, then abort the setup.
*/
if (ver->limited_cce != 0x00) {
bt_dev_err(hdev, "Unsupported Intel firmware loading method (0x%x)",
ver->limited_cce);
return -EINVAL;
}
/* Secure boot engine type should be either 1 (ECDSA) or 0 (RSA) */
if (ver->sbe_type > 0x01) {
bt_dev_err(hdev, "Unsupported Intel secure boot engine type (0x%x)",
ver->sbe_type);
return -EINVAL;
}
/* If the OTP has no valid Bluetooth device address, then there will
* also be no valid address for the operational firmware.
*/
if (!bacmp(&ver->otp_bd_addr, BDADDR_ANY)) {
bt_dev_info(hdev, "No device address configured");
set_bit(HCI_QUIRK_INVALID_BDADDR, &hdev->quirks);
}
btusb_setup_intel_newgen_get_fw_name(ver, fwname, sizeof(fwname), "sfi");
err = request_firmware(&fw, fwname, &hdev->dev);
if (err < 0) {
bt_dev_err(hdev, "Failed to load Intel firmware file (%d)", err);
return err;
}
bt_dev_info(hdev, "Found device firmware: %s", fwname);
if (fw->size < 644) {
bt_dev_err(hdev, "Invalid size of firmware file (%zu)",
fw->size);
err = -EBADF;
goto done;
}
set_bit(BTUSB_DOWNLOADING, &data->flags);
/* Start firmware downloading and get boot parameter */
err = btintel_download_firmware_newgen(hdev, fw, boot_param,
INTEL_HW_VARIANT(ver->cnvi_bt),
ver->sbe_type);
if (err < 0) {
/* When FW download fails, send Intel Reset to retry
* FW download.
*/
btintel_reset_to_bootloader(hdev);
goto done;
}
set_bit(BTUSB_FIRMWARE_LOADED, &data->flags);
bt_dev_info(hdev, "Waiting for firmware download to complete");
/* Before switching the device into operational mode and with that
* booting the loaded firmware, wait for the bootloader notification
* that all fragments have been successfully received.
*
* When the event processing receives the notification, then the
* BTUSB_DOWNLOADING flag will be cleared.
*
* The firmware loading should not take longer than 5 seconds
* and thus just timeout if that happens and fail the setup
* of this device.
*/
err = wait_on_bit_timeout(&data->flags, BTUSB_DOWNLOADING,
TASK_INTERRUPTIBLE,
msecs_to_jiffies(5000));
if (err == -EINTR) {
bt_dev_err(hdev, "Firmware loading interrupted");
goto done;
}
if (err) {
bt_dev_err(hdev, "Firmware loading timeout");
err = -ETIMEDOUT;
btintel_reset_to_bootloader(hdev);
goto done;
}
if (test_bit(BTUSB_FIRMWARE_FAILED, &data->flags)) {
bt_dev_err(hdev, "Firmware loading failed");
err = -ENOEXEC;
goto done;
}
done:
release_firmware(fw);
return err;
}
static int btusb_intel_download_firmware(struct hci_dev *hdev,
struct intel_version *ver,
struct intel_boot_params *params,
@ -2752,6 +2932,135 @@ finish:
return 0;
}
static int btusb_setup_intel_newgen(struct hci_dev *hdev)
{
struct btusb_data *data = hci_get_drvdata(hdev);
u32 boot_param;
char ddcname[64];
ktime_t calltime, delta, rettime;
unsigned long long duration;
int err;
struct intel_debug_features features;
struct intel_version_tlv version;
BT_DBG("%s", hdev->name);
/* Set the default boot parameter to 0x0 and it is updated to
* SKU specific boot parameter after reading Intel_Write_Boot_Params
* command while downloading the firmware.
*/
boot_param = 0x00000000;
calltime = ktime_get();
/* Read the Intel version information to determine if the device
* is in bootloader mode or if it already has operational firmware
* loaded.
*/
err = btintel_read_version_tlv(hdev, &version);
if (err) {
bt_dev_err(hdev, "Intel Read version failed (%d)", err);
btintel_reset_to_bootloader(hdev);
return err;
}
btintel_version_info_tlv(hdev, &version);
err = btusb_intel_download_firmware_newgen(hdev, &version, &boot_param);
if (err)
return err;
/* check if controller is already having an operational firmware */
if (version.img_type == 0x03)
goto finish;
rettime = ktime_get();
delta = ktime_sub(rettime, calltime);
duration = (unsigned long long)ktime_to_ns(delta) >> 10;
bt_dev_info(hdev, "Firmware loaded in %llu usecs", duration);
calltime = ktime_get();
set_bit(BTUSB_BOOTING, &data->flags);
err = btintel_send_intel_reset(hdev, boot_param);
if (err) {
bt_dev_err(hdev, "Intel Soft Reset failed (%d)", err);
btintel_reset_to_bootloader(hdev);
return err;
}
/* The bootloader will not indicate when the device is ready. This
* is done by the operational firmware sending bootup notification.
*
* Booting into operational firmware should not take longer than
* 1 second. However if that happens, then just fail the setup
* since something went wrong.
*/
bt_dev_info(hdev, "Waiting for device to boot");
err = wait_on_bit_timeout(&data->flags, BTUSB_BOOTING,
TASK_INTERRUPTIBLE,
msecs_to_jiffies(1000));
if (err == -EINTR) {
bt_dev_err(hdev, "Device boot interrupted");
return -EINTR;
}
if (err) {
bt_dev_err(hdev, "Device boot timeout");
btintel_reset_to_bootloader(hdev);
return -ETIMEDOUT;
}
rettime = ktime_get();
delta = ktime_sub(rettime, calltime);
duration = (unsigned long long)ktime_to_ns(delta) >> 10;
bt_dev_info(hdev, "Device booted in %llu usecs", duration);
clear_bit(BTUSB_BOOTLOADER, &data->flags);
btusb_setup_intel_newgen_get_fw_name(&version, ddcname, sizeof(ddcname),
"ddc");
/* Once the device is running in operational mode, it needs to
* apply the device configuration (DDC) parameters.
*
* The device can work without DDC parameters, so even if it
* fails to load the file, no need to fail the setup.
*/
btintel_load_ddc_config(hdev, ddcname);
/* Read the Intel supported features and if new exception formats
* supported, need to load the additional DDC config to enable.
*/
btintel_read_debug_features(hdev, &features);
/* Set DDC mask for available debug features */
btintel_set_debug_features(hdev, &features);
/* Read the Intel version information after loading the FW */
err = btintel_read_version_tlv(hdev, &version);
if (err)
return err;
btintel_version_info_tlv(hdev, &version);
finish:
/* Set the event mask for Intel specific vendor events. This enables
* a few extra events that are useful during general operation. It
* does not enable any debugging related events.
*
* The device will function correctly without these events enabled
* and thus no need to fail the setup.
*/
btintel_set_event_mask(hdev, false);
return 0;
}
static int btusb_shutdown_intel(struct hci_dev *hdev)
{
struct sk_buff *skb;
@ -4175,6 +4484,24 @@ static int btusb_probe(struct usb_interface *intf,
set_bit(HCI_QUIRK_NON_PERSISTENT_DIAG, &hdev->quirks);
}
if (id->driver_info & BTUSB_INTEL_NEWGEN) {
hdev->manufacturer = 2;
hdev->send = btusb_send_frame_intel;
hdev->setup = btusb_setup_intel_newgen;
hdev->shutdown = btusb_shutdown_intel_new;
hdev->hw_error = btintel_hw_error;
hdev->set_diag = btintel_set_diag;
hdev->set_bdaddr = btintel_set_bdaddr;
hdev->cmd_timeout = btusb_intel_cmd_timeout;
set_bit(HCI_QUIRK_STRICT_DUPLICATE_FILTER, &hdev->quirks);
set_bit(HCI_QUIRK_SIMULTANEOUS_DISCOVERY, &hdev->quirks);
set_bit(HCI_QUIRK_NON_PERSISTENT_DIAG, &hdev->quirks);
data->recv_event = btusb_recv_event_intel;
data->recv_bulk = btusb_recv_bulk_intel;
set_bit(BTUSB_BOOTLOADER, &data->flags);
}
if (id->driver_info & BTUSB_MARVELL)
hdev->set_bdaddr = btusb_set_bdaddr_marvell;

View File

@ -1371,9 +1371,7 @@ static void hdmirx_phy_config(struct rk_hdmirx_dev *hdmirx_dev)
dev_err(dev, "%s wait pddq ack failed!\n", __func__);
hdmirx_update_bits(hdmirx_dev, PHY_CONFIG, HDMI_DISABLE, 0);
if (wait_reg_bit_status(hdmirx_dev, PHY_STATUS, HDMI_DISABLE_ACK, 0,
false, 50))
dev_err(dev, "%s wait hdmi disable ack failed!\n", __func__);
wait_reg_bit_status(hdmirx_dev, PHY_STATUS, HDMI_DISABLE_ACK, 0, false, 50);
hdmirx_tmds_clk_ratio_config(hdmirx_dev);
}
@ -1518,7 +1516,7 @@ static int hdmirx_wait_lock_and_get_timing(struct rk_hdmirx_dev *hdmirx_dev)
hdmirx_phy_config(hdmirx_dev);
if (!tx_5v_power_present(hdmirx_dev)) {
v4l2_err(v4l2_dev, "%s HDMI pull out, return!\n", __func__);
//v4l2_err(v4l2_dev, "%s HDMI pull out, return!\n", __func__);
return -1;
}
@ -2741,7 +2739,7 @@ static irqreturn_t hdmirx_dma_irq_handler(int irq, void *dev_id)
static void hdmirx_audio_interrupts_setup(struct rk_hdmirx_dev *hdmirx_dev, bool en)
{
dev_info(hdmirx_dev->dev, "%s: %d", __func__, en);
//dev_info(hdmirx_dev->dev, "%s: %d", __func__, en);
if (en) {
hdmirx_update_bits(hdmirx_dev, AVPUNIT_1_INT_MASK_N,
DEFRAMER_VSYNC_THR_REACHED_MASK_N,

View File

@ -50,7 +50,7 @@ ENABLE_USE_FIRMWARE_FILE = n
DISABLE_PM_SUPPORT = n
DISABLE_MULTI_MSIX_VECTOR = n
obj-m := r8125.o
obj-$(CONFIG_R8125) := r8125.o
r8125-objs := r8125_n.o rtl_eeprom.o rtltool.o
ifeq ($(CONFIG_SOC_LAN), y)

View File

@ -90,6 +90,8 @@
#include <linux/seq_file.h>
#endif
/* #include <asm/system_info.h> */
#define FIRMWARE_8125A_3 "rtl_nic/rtl8125a-3.fw"
#define FIRMWARE_8125B_2 "rtl_nic/rtl8125b-2.fw"
@ -183,6 +185,7 @@ static int rx_copybreak = 0;
static int use_dac = 1;
static int timer_count = 0x2600;
static int timer_count_v2 = (0x2600 / 0x100);
/* static int dev_num = 0; */
static struct {
u32 msg_enable;
@ -10924,6 +10927,32 @@ rtl8125_hw_address_set(struct net_device *dev, u8 mac_addr[MAC_ADDR_LEN])
#endif //LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0)
}
/*
* Create an ethernet address from the system serial number.
*/
/*
static int __init ethernet_addr(char *addr)
{
unsigned int serial;
if (system_serial_low == 0 && system_serial_high == 0)
return -ENODEV;
serial = system_serial_low | system_serial_high;
addr[0] = 0;
addr[1] = 0;
addr[2] = 0xa4;
addr[3] = 0x10 + (serial >> 24);
addr[4] = serial >> 16;
addr[5] = (serial >> 8) + dev_num;
dev_num++;
return 0;
}
*/
static int
rtl8125_get_mac_address(struct net_device *dev)
{
@ -10944,6 +10973,8 @@ rtl8125_get_mac_address(struct net_device *dev)
*(u16*)&mac_addr[4] = RTL_R16(tp, BACKUP_ADDR1_8125);
}
/* ethernet_addr(mac_addr); */
if (!is_valid_ether_addr(mac_addr)) {
netif_err(tp, probe, dev, "Invalid ether addr %pM\n",
mac_addr);

View File

@ -2174,8 +2174,8 @@ static void iwl_mvm_cfg_he_sta(struct iwl_mvm *mvm,
* If nss < MAX: we can set zeros in other streams
*/
if (nss > MAX_HE_SUPP_NSS) {
IWL_INFO(mvm, "Got NSS = %d - trimming to %d\n", nss,
MAX_HE_SUPP_NSS);
//IWL_INFO(mvm, "Got NSS = %d - trimming to %d\n", nss,
// MAX_HE_SUPP_NSS);
nss = MAX_HE_SUPP_NSS;
}

View File

@ -1186,6 +1186,20 @@ static int __dwc3_gadget_ep_disable(struct dwc3_ep *dep)
dep->endpoint.desc = NULL;
}
dwc3_remove_requests(dwc, dep, -ECONNRESET);
dep->stream_capable = false;
dep->type = 0;
mask = DWC3_EP_TXFIFO_RESIZED;
/*
* dwc3_remove_requests() can exit early if DWC3 EP delayed stop is
* set. Do not clear DEP flags, so that the end transfer command will
* be reattempted during the next SETUP stage.
*/
if (dep->flags & DWC3_EP_DELAY_STOP)
mask |= (DWC3_EP_DELAY_STOP | DWC3_EP_TRANSFER_STARTED);
dep->flags &= mask;
return 0;
}

View File

@ -295,7 +295,19 @@ static int mc_spk_event(struct snd_soc_dapm_widget *w,
switch (event) {
case SND_SOC_DAPM_POST_PMU:
gpiod_set_value_cansleep(mc_data->spk_ctl_gpio, 1);
gpiod_set_value(mc_data->spk_ctl_gpio, 1);
udelay(1);
gpiod_set_value(mc_data->spk_ctl_gpio, 0);
udelay(1);
gpiod_set_value(mc_data->spk_ctl_gpio, 1);
udelay(1);
gpiod_set_value(mc_data->spk_ctl_gpio, 0);
udelay(1);
gpiod_set_value(mc_data->spk_ctl_gpio, 1);
udelay(1);
gpiod_set_value(mc_data->spk_ctl_gpio, 0);
udelay(1);
gpiod_set_value(mc_data->spk_ctl_gpio, 1);
break;
case SND_SOC_DAPM_PRE_PMD:
gpiod_set_value_cansleep(mc_data->spk_ctl_gpio, 0);