Support Orange Pi CM5
This commit is contained in:
parent
c53f3f2d05
commit
be9aafe056
|
|
@ -1,6 +1,8 @@
|
|||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-orangepi-5.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-orangepi-5b.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-orangepi-5-pro.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-orangepi-cm5.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-orangepi-cm5-tablet.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-orangepi-5-max.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-orangepi-5-plus.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-orangepi-cm4.dtb
|
||||
|
|
|
|||
|
|
@ -83,6 +83,12 @@ dtbo-$(CONFIG_ARCH_ROCKCHIP) += \
|
|||
rk3588-opi5plus-disable-leds.dtbo \
|
||||
rk3588-opi5pro-disable-leds.dtbo \
|
||||
rk3588-opi5pro-sfc.dtbo \
|
||||
rk3588-opicm5-blink-gpio.dtbo \
|
||||
rk3588-opicm5-tablet-cam1.dtbo \
|
||||
rk3588-opicm5-tablet-cam2.dtbo \
|
||||
rk3588-opicm5-tablet-cam3.dtbo \
|
||||
rk3588-opicm5-tablet-lcd.dtbo \
|
||||
rk3588-opicm5-tablet-disable-led.dtbo \
|
||||
rk356x-vccio5_3v3.dtbo \
|
||||
rk356x-edp.dtbo \
|
||||
rk356x-i2c2-m1.dtbo \
|
||||
|
|
|
|||
|
|
@ -0,0 +1,70 @@
|
|||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
compatible = "rockchip,rk3588s-orangepi-cm5", "rockchip,rk3588";
|
||||
|
||||
fragment@0 {
|
||||
target = <&leds>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
|
||||
gpio1_b3@0 {
|
||||
gpios = <&gpio1 11 0>;
|
||||
label = "gpio1_b3";
|
||||
linux,default-trigger = "heartbeat";
|
||||
linux,default-trigger-delay-ms = <0>;
|
||||
};
|
||||
|
||||
gpio1_b1@1 {
|
||||
gpios = <&gpio1 9 0>;
|
||||
label = "gpio1_b1";
|
||||
linux,default-trigger = "heartbeat";
|
||||
linux,default-trigger-delay-ms = <0>;
|
||||
};
|
||||
|
||||
gpio1_b4@2 {
|
||||
gpios = <&gpio1 12 0>;
|
||||
label = "gpio1_b4";
|
||||
linux,default-trigger = "heartbeat";
|
||||
linux,default-trigger-delay-ms = <0>;
|
||||
};
|
||||
|
||||
gpio1_b2@3 {
|
||||
gpios = <&gpio1 10 0>;
|
||||
label = "gpio1_b2";
|
||||
linux,default-trigger = "heartbeat";
|
||||
linux,default-trigger-delay-ms = <0>;
|
||||
};
|
||||
|
||||
gpio1_b7@4 {
|
||||
gpios = <&gpio1 15 0>;
|
||||
label = "gpio1_b7";
|
||||
linux,default-trigger = "heartbeat";
|
||||
linux,default-trigger-delay-ms = <0>;
|
||||
};
|
||||
|
||||
gpio1_b6@5 {
|
||||
gpios = <&gpio1 14 0>;
|
||||
label = "gpio1_b6";
|
||||
linux,default-trigger = "heartbeat";
|
||||
linux,default-trigger-delay-ms = <0>;
|
||||
};
|
||||
|
||||
gpio4_b2@6 {
|
||||
gpios = <&gpio4 10 0>;
|
||||
label = "gpio4_b2";
|
||||
linux,default-trigger = "heartbeat";
|
||||
linux,default-trigger-delay-ms = <0>;
|
||||
};
|
||||
|
||||
gpio4_b3@7 {
|
||||
gpios = <&gpio4 11 0>;
|
||||
label = "gpio4_b3";
|
||||
linux,default-trigger = "heartbeat";
|
||||
linux,default-trigger-delay-ms = <0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
@ -0,0 +1,108 @@
|
|||
/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 = <&i2c1>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
|
||||
vm149c-p1@c {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
ov13850-1@10 {
|
||||
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";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
fragment@0 {
|
||||
target = <&csi2_dcphy0>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
fragment@1 {
|
||||
target = <&mipi0_csi2>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
fragment@2 {
|
||||
target = <&rkcif_mipi_lvds>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
fragment@3 {
|
||||
target = <&rkcif_mipi_lvds_sditf>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
fragment@4 {
|
||||
target = <&rkisp1_vir0>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
fragment@5 {
|
||||
target = <&i2c6>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
|
||||
ov5647@36 {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
fragment@0 {
|
||||
target = <&csi2_dcphy1>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
fragment@1 {
|
||||
target = <&mipi1_csi2>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
fragment@2 {
|
||||
target = <&rkcif_mipi_lvds1>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
fragment@3 {
|
||||
target = <&rkcif_mipi_lvds1_sditf>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
fragment@4 {
|
||||
target = <&rkisp1_vir1>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
fragment@5 {
|
||||
target = <&i2c7>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
|
||||
ov5647-1@36 {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
fragment@0 {
|
||||
target = <&leds>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
|
||||
led@1 {
|
||||
linux,default-trigger = "none";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
@ -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_vp2>;
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
@ -50,8 +50,6 @@
|
|||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
&dsi1 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,170 @@
|
|||
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
/*
|
||||
* Copyright (c) 2021 Rockchip Electronics Co., Ltd.
|
||||
*
|
||||
*/
|
||||
|
||||
&csi2_dphy0_hw {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&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>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&i2c1 {
|
||||
status = "okay";
|
||||
ddpinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c1m2_xfer>;
|
||||
|
||||
vm149c_p1: vm149c-p1@c {
|
||||
compatible = "silicon touch,vm149c";
|
||||
status = "disabled";
|
||||
reg = <0x0c>;
|
||||
rockchip,camera-module-index = <0>;
|
||||
rockchip,camera-module-facing = "back";
|
||||
};
|
||||
|
||||
ov13850_1: ov13850-1@10 {
|
||||
compatible = "ovti,ov13850";
|
||||
status = "disabled";
|
||||
reg = <0x10>;
|
||||
clocks = <&cru CLK_MIPI_CAMARAOUT_M1>;
|
||||
clock-names = "xvclk";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mipim1_camera1_clk>;
|
||||
reset-gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_HIGH>;
|
||||
pwdn-gpios = <&gpio3 RK_PB0 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_M1>;
|
||||
clock-names = "xvclk";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mipim1_camera1_clk>;
|
||||
reset-gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_HIGH>;
|
||||
pwdn-gpios = <&gpio3 RK_PB0 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>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
@ -0,0 +1,124 @@
|
|||
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
/*
|
||||
* Copyright (c) 2021 Rockchip Electronics Co., Ltd.
|
||||
*
|
||||
*/
|
||||
|
||||
&csi2_dcphy0 {
|
||||
status = "disabled";
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
mipi_in_dcphy0: endpoint@0 {
|
||||
reg = <0>;
|
||||
remote-endpoint = <&ov5647_out>;
|
||||
data-lanes = <1 2>;
|
||||
};
|
||||
};
|
||||
|
||||
port@1 {
|
||||
reg = <1>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
csidcphy0_out: endpoint@0 {
|
||||
reg = <0>;
|
||||
remote-endpoint = <&mipi0_csi2_input>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&i2c6 {
|
||||
status = "okay";
|
||||
|
||||
ov5647: ov5647@36 {
|
||||
status = "disabled";
|
||||
compatible = "ovti,ov5647";
|
||||
reg = <0x36>;
|
||||
clocks = <&ext_cam_ov5647_clk>;
|
||||
clock-names = "ext_cam_ov5647_clk";
|
||||
pwdn-gpios = <&gpio4 RK_PA7 GPIO_ACTIVE_LOW>;
|
||||
rockchip,camera-module-index = <1>;
|
||||
rockchip,camera-module-facing = "front";
|
||||
rockchip,camera-module-name = "LMM248";
|
||||
rockchip,camera-module-lens-name = "YXC-M804A2";
|
||||
port {
|
||||
ov5647_out: endpoint {
|
||||
remote-endpoint = <&mipi_in_dcphy0>;
|
||||
data-lanes = <1 2>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&mipi0_csi2 {
|
||||
status = "disabled";
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
mipi0_csi2_input: endpoint@1 {
|
||||
reg = <1>;
|
||||
remote-endpoint = <&csidcphy0_out>;
|
||||
};
|
||||
};
|
||||
|
||||
port@1 {
|
||||
reg = <1>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
mipi0_csi2_output: endpoint@0 {
|
||||
reg = <0>;
|
||||
remote-endpoint = <&cif_mipi_in0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&rkcif_mipi_lvds {
|
||||
status = "disabled";
|
||||
|
||||
port {
|
||||
cif_mipi_in0: endpoint {
|
||||
remote-endpoint = <&mipi0_csi2_output>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&rkcif_mipi_lvds_sditf {
|
||||
status = "disabled";
|
||||
|
||||
port {
|
||||
mipi_lvds_sditf: endpoint {
|
||||
remote-endpoint = <&isp1_in1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&rkisp1_vir0 {
|
||||
status = "disabled";
|
||||
|
||||
port {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
isp1_in1: endpoint@0 {
|
||||
reg = <0>;
|
||||
remote-endpoint = <&mipi_lvds_sditf>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
@ -0,0 +1,125 @@
|
|||
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
/*
|
||||
* Copyright (c) 2021 Rockchip Electronics Co., Ltd.
|
||||
*
|
||||
*/
|
||||
|
||||
&csi2_dcphy1 {
|
||||
status = "disabled";
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
mipi_in_dcphy1: endpoint@0 {
|
||||
reg = <0>;
|
||||
remote-endpoint = <&ov5647_out1>;
|
||||
data-lanes = <1 2>;
|
||||
};
|
||||
};
|
||||
|
||||
port@1 {
|
||||
reg = <1>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
csidcphy1_out: endpoint@0 {
|
||||
reg = <0>;
|
||||
remote-endpoint = <&mipi1_csi2_input>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&i2c7 {
|
||||
status = "okay";
|
||||
|
||||
ov5647_1: ov5647-1@36 {
|
||||
status = "disabled";
|
||||
compatible = "ovti,ov5647";
|
||||
reg = <0x36>;
|
||||
clocks = <&ext_cam_ov5647_clk>;
|
||||
clock-names = "ext_cam_ov5647_clk";
|
||||
pwdn-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
|
||||
rockchip,camera-module-index = <2>;
|
||||
rockchip,camera-module-facing = "back";
|
||||
rockchip,camera-module-name = "LMM248";
|
||||
rockchip,camera-module-lens-name = "YXC-M804A2";
|
||||
port {
|
||||
ov5647_out1: endpoint {
|
||||
remote-endpoint = <&mipi_in_dcphy1>;
|
||||
data-lanes = <1 2>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&mipi1_csi2 {
|
||||
status = "disabled";
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
mipi1_csi2_input: endpoint@1 {
|
||||
reg = <1>;
|
||||
remote-endpoint = <&csidcphy1_out>;
|
||||
};
|
||||
};
|
||||
|
||||
port@1 {
|
||||
reg = <1>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
mipi1_csi2_output: endpoint@0 {
|
||||
reg = <0>;
|
||||
remote-endpoint = <&cif_mipi_in1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&rkcif_mipi_lvds1 {
|
||||
status = "disabled";
|
||||
|
||||
port {
|
||||
cif_mipi_in1: endpoint {
|
||||
remote-endpoint = <&mipi1_csi2_output>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&rkcif_mipi_lvds1_sditf {
|
||||
status = "disabled";
|
||||
|
||||
port {
|
||||
mipi1_lvds_sditf: endpoint {
|
||||
remote-endpoint = <&isp1_in0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&rkisp1_vir1 {
|
||||
status = "disabled";
|
||||
|
||||
port {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
isp1_in0: endpoint@0 {
|
||||
reg = <0>;
|
||||
remote-endpoint = <&mipi1_lvds_sditf>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
&pinctrl {
|
||||
lcd {
|
||||
lcd_rst_gpio: lcd-rst-gpio {
|
||||
rockchip,pins = <3 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>,
|
||||
<3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
&dsi1 {
|
||||
status = "disabled";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mipi_te1>;
|
||||
|
||||
dsi1_panel: panel@0 {
|
||||
status = "disabled";
|
||||
compatible = "innolux,afj101-ba2131";
|
||||
reg = <0>;
|
||||
backlight = <&backlight>;
|
||||
reset-gpios = <&gpio3 RK_PA7 GPIO_ACTIVE_LOW>;
|
||||
enable-gpios = <&gpio3 RK_PB1 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&lcd_rst_gpio>;
|
||||
|
||||
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>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&i2c1 {
|
||||
status = "okay";
|
||||
|
||||
gt9xx_0: touchscreen@14 {
|
||||
compatible = "goodix,gt9271";
|
||||
reg = <0x14>;
|
||||
interrupt-parent = <&gpio0>;
|
||||
interrupts = <RK_PC4 IRQ_TYPE_LEVEL_LOW>;
|
||||
irq-gpios = <&gpio0 RK_PC4 IRQ_TYPE_LEVEL_LOW>;
|
||||
reset-gpios = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>;
|
||||
touchscreen-inverted-x;
|
||||
//touchscreen-inverted-y;
|
||||
touchscreen-swapped-x-y;
|
||||
touchscreen-size-x = <1280>;
|
||||
touchscreen-size-y = <800>;
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
&dsi1_in_vp2 {
|
||||
status = "disabled";
|
||||
};
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,397 @@
|
|||
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
/*
|
||||
* Copyright (c) 2021 Rockchip Electronics Co., Ltd.
|
||||
*
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include "rk3588s-orangepi-cm5.dtsi"
|
||||
#include "rk3588-linux.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Orange Pi CM5";
|
||||
compatible = "rockchip,rk3588s-orangepi-cm5", "rockchip,rk3588";
|
||||
|
||||
vcc3v3_sys: vcc3v3-sys {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc3v3_sys";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
enable-active-high;
|
||||
gpios = <&gpio4 RK_PA3 GPIO_ACTIVE_HIGH>;
|
||||
startup-delay-us = <50000>;
|
||||
};
|
||||
|
||||
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>;
|
||||
};
|
||||
|
||||
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 = <&gpio0 RK_PD3 GPIO_ACTIVE_HIGH>;
|
||||
vin-supply = <&vcc5v0_usb>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&vcc5v0_host_en>;
|
||||
};
|
||||
|
||||
leds: gpio-leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 =<&leds_gpio>;
|
||||
status = "okay";
|
||||
|
||||
lan1@0 {
|
||||
gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>;
|
||||
label = "lan1";
|
||||
default-state = "off";
|
||||
};
|
||||
|
||||
lan2@1 {
|
||||
gpios = <&gpio0 RK_PC5 GPIO_ACTIVE_LOW>;
|
||||
label = "lan2";
|
||||
default-state = "off";
|
||||
};
|
||||
|
||||
wan@3 {
|
||||
gpios = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>;
|
||||
label = "wan";
|
||||
default-state = "off";
|
||||
};
|
||||
|
||||
power@4 {
|
||||
gpios = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>;
|
||||
label = "power";
|
||||
linux,default-trigger = "default-on";
|
||||
linux,default-trigger-delay-ms = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
gpio_keys: gpio-keys {
|
||||
compatible = "gpio-keys";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&key1_pin>;
|
||||
|
||||
button@1 {
|
||||
debounce-interval = <50>;
|
||||
gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_LOW>;
|
||||
label = "K1";
|
||||
linux,code = <KEY_POWER>;
|
||||
wakeup-source;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&gmac1 {
|
||||
/* Use rgmii-rxid mode to disable rx delay inside Soc */
|
||||
phy-mode = "rgmii-rxid";
|
||||
clock_in_out = "output";
|
||||
|
||||
snps,reset-gpio = <&gpio3 RK_PB2 GPIO_ACTIVE_LOW>;
|
||||
snps,reset-active-low;
|
||||
/* Reset time is 20ms, 100ms for rtl8211f */
|
||||
snps,reset-delays-us = <0 20000 100000>;
|
||||
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&gmac1_miim
|
||||
&gmac1_tx_bus2
|
||||
&gmac1_rx_bus2
|
||||
&gmac1_rgmii_clk
|
||||
&gmac1_rgmii_bus>;
|
||||
|
||||
tx_delay = <0x42>;
|
||||
/* rx_delay = <0x3f>; */
|
||||
|
||||
phy-handle = <&rgmii_phy1>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mdio1 {
|
||||
rgmii_phy1: phy@1 {
|
||||
compatible = "ethernet-phy-ieee802.3-c22";
|
||||
reg = <0x1>;
|
||||
};
|
||||
};
|
||||
|
||||
&hdmi0 {
|
||||
enable-gpios = <&gpio4 RK_PB5 GPIO_ACTIVE_HIGH>;
|
||||
cec-enable;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&hdmi0_in_vp0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&hdmi0_sound {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&hdptxphy_hdmi0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&route_hdmi0{
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2s5_8ch {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2s1_8ch {
|
||||
status = "disabled";
|
||||
rockchip,i2s-tx-route = <3 2 1 0>;
|
||||
rockchip,i2s-rx-route = <1 3 2 0>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2s1m0_sclk
|
||||
&i2s1m0_lrck
|
||||
&i2s1m0_sdi1
|
||||
&i2s1m0_sdo3>;
|
||||
};
|
||||
|
||||
&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;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&i2c2 {
|
||||
status = "okay";
|
||||
|
||||
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;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&i2c3 {
|
||||
status = "okay";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c3m1_xfer>;
|
||||
|
||||
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_PB0 IRQ_TYPE_LEVEL_LOW>;
|
||||
wakeup-source;
|
||||
};
|
||||
};
|
||||
|
||||
&pwm7 {
|
||||
compatible = "rockchip,remotectl-pwm";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pwm7m0_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>;
|
||||
};
|
||||
};
|
||||
|
||||
/* watchdog */
|
||||
&wdt {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mipi_dcphy0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mipi_dcphy1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&rkcif {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&rkcif_mmu {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&rkisp0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&isp0_mmu {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&rkisp1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&isp1_mmu {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
//phy2
|
||||
&pcie2x1l1 {
|
||||
reset-gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_HIGH>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie2x1l2 {
|
||||
reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_HIGH>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sdmmc {
|
||||
status = "okay";
|
||||
|
||||
/delete-property/ vmmc-supply;
|
||||
};
|
||||
|
||||
&pinctrl
|
||||
{
|
||||
gpio-func {
|
||||
leds_gpio: leds-gpio {
|
||||
rockchip,pins =
|
||||
<1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&dsi0 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&dsi1 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&u2phy0_otg {
|
||||
phy-supply = <&vcc5v0_host>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&u2phy2_host {
|
||||
phy-supply = <&vcc5v0_host>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sdhci {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&emmc_rstnout &emmc_bus8 &emmc_clk &emmc_cmd &emmc_data_strobe>;
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
usb {
|
||||
vcc5v0_host_en: vcc5v0-host-en {
|
||||
rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
|
||||
hym8563 {
|
||||
hym8563_int: hym8563-int {
|
||||
rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
};
|
||||
};
|
||||
|
||||
gpio-key {
|
||||
key1_pin: key1-pin {
|
||||
rockchip,pins = <4 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
@ -0,0 +1,306 @@
|
|||
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
/*
|
||||
* Copyright (c) 2021 Rockchip Electronics Co., Ltd.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "dt-bindings/usb/pd.h"
|
||||
#include "rk3588s.dtsi"
|
||||
#include "rk3588s-orangepi.dtsi"
|
||||
#include "rk3588-rk806-single.dtsi"
|
||||
|
||||
/ {
|
||||
combophy_avdd0v85: combophy-avdd0v85 {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "combophy_avdd0v85";
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <850000>;
|
||||
regulator-max-microvolt = <850000>;
|
||||
vin-supply = <&vdd_0v85_s0>;
|
||||
};
|
||||
|
||||
combophy_avdd1v8: combophy-avdd1v8 {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "combophy_avdd1v8";
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
vin-supply = <&avcc_1v8_s0>;
|
||||
};
|
||||
|
||||
wireless_bluetooth: wireless-bluetooth {
|
||||
compatible = "bluetooth-platdata";
|
||||
clocks = <&hym8563>;
|
||||
clock-names = "ext_clock";
|
||||
uart_rts_gpios = <&gpio3 RK_PD2 GPIO_ACTIVE_LOW>;
|
||||
pinctrl-names = "default", "rts_gpio";
|
||||
pinctrl-0 = <&uart9m2_rtsn>, <&bt_gpio>;
|
||||
pinctrl-1 = <&uart9_gpios>;
|
||||
BT,reset_gpio = <&gpio3 RK_PA6 GPIO_ACTIVE_HIGH>;
|
||||
BT,wake_gpio = <&gpio0 RK_PC6 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_poweren_gpio>;
|
||||
WIFI,host_wake_irq = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>;
|
||||
WIFI,poweren_gpio = <&gpio0 RK_PD0 GPIO_ACTIVE_HIGH>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
//vbus5v0_typec: vbus5v0-typec {
|
||||
// compatible = "regulator-fixed";
|
||||
// regulator-name = "vbus5v0_typec";
|
||||
// regulator-min-microvolt = <5000000>;
|
||||
// regulator-max-microvolt = <5000000>;
|
||||
// enable-active-high;
|
||||
// gpio = <&gpio3 RK_PC0 GPIO_ACTIVE_HIGH>;
|
||||
// vin-supply = <&vcc5v0_usb>;
|
||||
// pinctrl-names = "default";
|
||||
// pinctrl-0 = <&typec5v_pwren>;
|
||||
//};
|
||||
};
|
||||
|
||||
&pwm6 {
|
||||
status = "okay";
|
||||
pinctrl-names = "active";
|
||||
pinctrl-0 = <&pwm6m0_pins>;
|
||||
};
|
||||
|
||||
&pwm2 {
|
||||
status = "okay";
|
||||
pinctrl-names = "active";
|
||||
pinctrl-0 = <&pwm2m0_pins>;
|
||||
};
|
||||
|
||||
&backlight_1 {
|
||||
pwms = <&pwm6 0 25000 0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&backlight {
|
||||
pwms = <&pwm2 0 25000 0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&combphy0_ps {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&dp0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&dp0_in_vp1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&dp0_in_vp2 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&dp0_sound{
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&spdif_tx2{
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mipi_dcphy0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mipi_dcphy1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c6 {
|
||||
status = "disabled";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c6m3_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 = "disabled";
|
||||
|
||||
// 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>;
|
||||
// };
|
||||
// };
|
||||
// };
|
||||
// };
|
||||
//};
|
||||
};
|
||||
|
||||
&pcie2x1l1 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&pcie2x1l2 {
|
||||
reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_HIGH>;
|
||||
rockchip,skip-scan-in-resume;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
lcd {
|
||||
lcd0_rst_gpio: lcd0-rst-gpio {
|
||||
rockchip,pins = <1 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
|
||||
lcd1_rst_gpio: lcd1-rst-gpio {
|
||||
rockchip,pins = <1 RK_PB3 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 = <3 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
|
||||
wireless-bluetooth {
|
||||
uart9_gpios: uart9-gpios {
|
||||
rockchip,pins = <3 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
|
||||
bt_gpio: bt-gpio {
|
||||
rockchip,pins =
|
||||
<3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>,
|
||||
<0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
};
|
||||
};
|
||||
|
||||
wireless-wlan {
|
||||
wifi_host_wake_irq: wifi-host-wake-irq {
|
||||
rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
};
|
||||
|
||||
wifi_poweren_gpio: wifi-poweren-gpio {
|
||||
rockchip,pins = <0 RK_PD0 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&u2phy0_otg {
|
||||
rockchip,typec-vbus-det;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart9 {
|
||||
status = "disabled";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart9m2_xfer &uart9m2_ctsn>;
|
||||
};
|
||||
|
||||
&usbdp_phy0 {
|
||||
//orientation-switch;
|
||||
//svid = <0xff01>;
|
||||
//sbu1-dc-gpios = <&gpio4 RK_PA5 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>;
|
||||
// };
|
||||
//};
|
||||
};
|
||||
|
||||
&usbdrd_dwc3_0 {
|
||||
status = "okay";
|
||||
dr_mode = "host";
|
||||
usb-role-switch;
|
||||
//port {
|
||||
// #address-cells = <1>;
|
||||
// #size-cells = <0>;
|
||||
// dwc3_0_role_switch: endpoint@0 {
|
||||
// reg = <0>;
|
||||
// remote-endpoint = <&usbc0_role_sw>;
|
||||
// };
|
||||
//};
|
||||
};
|
||||
|
||||
&combphy2_psu {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usbhost3_0 {
|
||||
dr_mode = "host";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&usbhost_dwc3_0 {
|
||||
status = "okay";
|
||||
};
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -456,8 +456,8 @@ static int aw87xxx_profile_switch_get(struct snd_kcontrol *kcontrol,
|
|||
}
|
||||
|
||||
profile = aw87xxx->current_profile;
|
||||
AW_DEV_LOGI(aw87xxx->dev, "current profile:[%s]",
|
||||
aw87xxx->current_profile);
|
||||
//AW_DEV_LOGI(aw87xxx->dev, "current profile:[%s]",
|
||||
// aw87xxx->current_profile);
|
||||
|
||||
|
||||
index = aw_acf_get_prof_index_form_name(aw87xxx->dev,
|
||||
|
|
|
|||
|
|
@ -197,8 +197,8 @@ static int aw_dev_reg_update(struct aw_device *aw_dev,
|
|||
}
|
||||
|
||||
for (i = 0; i < profile_data->len; i = i + 2) {
|
||||
AW_DEV_LOGI(aw_dev->dev, "reg=0x%02x, val = 0x%02x",
|
||||
profile_data->data[i], profile_data->data[i + 1]);
|
||||
//AW_DEV_LOGI(aw_dev->dev, "reg=0x%02x, val = 0x%02x",
|
||||
// profile_data->data[i], profile_data->data[i + 1]);
|
||||
|
||||
ret = aw_dev_i2c_write_byte(aw_dev, profile_data->data[i],
|
||||
profile_data->data[i + 1]);
|
||||
|
|
|
|||
|
|
@ -407,18 +407,18 @@ static int aw_monitor_get_battery_capacity(struct device *dev,
|
|||
|
||||
psy = power_supply_get_by_name(name);
|
||||
if (psy == NULL) {
|
||||
AW_DEV_LOGE(dev, "no struct power supply name:%s", name);
|
||||
//AW_DEV_LOGE(dev, "no struct power supply name:%s", name);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ret = power_supply_get_property(psy, POWER_SUPPLY_PROP_CAPACITY, &prop);
|
||||
if (ret < 0) {
|
||||
AW_DEV_LOGE(dev, "get vbat capacity failed");
|
||||
//AW_DEV_LOGE(dev, "get vbat capacity failed");
|
||||
return -EINVAL;
|
||||
}
|
||||
*vbat_capacity = prop.intval;
|
||||
AW_DEV_LOGI(dev, "The percentage is %d",
|
||||
*vbat_capacity);
|
||||
//AW_DEV_LOGI(dev, "The percentage is %d",
|
||||
// *vbat_capacity);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -893,6 +893,13 @@ int es8328_probe(struct device *dev, struct regmap *regmap)
|
|||
|
||||
dev_set_drvdata(dev, es8328);
|
||||
|
||||
#ifdef CONFIG_SND_SOC_AW87XXX
|
||||
ret = aw87xxx_add_codec_controls((void *)component);
|
||||
if (ret < 0) {
|
||||
pr_err("%s: add_codec_controls failed, ret %d\n", __func__, ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
return devm_snd_soc_register_component(dev,
|
||||
&es8328_component_driver, &es8328_dai, 1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -210,6 +210,27 @@ static int mc_keys_load_keymap(struct device *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SND_SOC_AW87XXX
|
||||
extern int aw87xxx_set_profile(int dev_index, char *profile);
|
||||
|
||||
static char *aw_profile[] = {"Music", "Off"};
|
||||
enum aw87xxx_dev_index {
|
||||
AW_DEV_0 = 0,
|
||||
AW_DEV_1 = 1,
|
||||
};
|
||||
|
||||
static int hook_spk_aw87xxx(int id, int on)
|
||||
{
|
||||
pr_info("%s id: %d, on: %d\n", __func__, id, on);
|
||||
if(on)
|
||||
aw87xxx_set_profile(id, aw_profile[1]);
|
||||
else
|
||||
aw87xxx_set_profile(id, aw_profile[0]);
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void adc_jack_handler(struct work_struct *work)
|
||||
{
|
||||
struct multicodecs_data *mc_data = container_of(to_delayed_work(work),
|
||||
|
|
@ -218,6 +239,11 @@ static void adc_jack_handler(struct work_struct *work)
|
|||
struct snd_soc_jack *jack_headset = mc_data->jack_headset;
|
||||
int adc, ret = 0;
|
||||
|
||||
#ifdef CONFIG_SND_SOC_AW87XXX
|
||||
hook_spk_aw87xxx(AW_DEV_0, gpiod_get_value(mc_data->hp_det_gpio));
|
||||
hook_spk_aw87xxx(AW_DEV_1, gpiod_get_value(mc_data->hp_det_gpio));
|
||||
#endif
|
||||
|
||||
if (!gpiod_get_value(mc_data->hp_det_gpio)) {
|
||||
snd_soc_jack_report(jack_headset, 0, SND_JACK_HEADSET);
|
||||
extcon_set_state_sync(mc_data->extcon,
|
||||
|
|
@ -807,6 +833,10 @@ static int rk_multicodecs_probe(struct platform_device *pdev)
|
|||
|
||||
snd_soc_card_set_drvdata(card, mc_data);
|
||||
|
||||
ret = snd_soc_of_parse_aux_devs(card, "rockchip,aux-devs");
|
||||
if (ret)
|
||||
dev_warn(&pdev->dev, "Audio aux devs invalid/unspecified\n");
|
||||
|
||||
ret = devm_snd_soc_register_card(&pdev->dev, card);
|
||||
if (ret == -EPROBE_DEFER)
|
||||
return -EPROBE_DEFER;
|
||||
|
|
|
|||
Loading…
Reference in New Issue