Z:\14TB\OK3588-C\OK3588-android14-source\kernel-6.1\drivers\media\i2c\ov5645.c
Z:\14TB\OK3588-C\OK3588-android14-source\kernel-6.1\arch\arm64\boot\dts\rockchip\OK3588-C-Camera.dtsi
Z:\14TB\OK3588-C\OK3588-android14-source\hardware\rockchip\camera\etc\camera\camera3_profiles_rk3588.xml
20260113给飞凌OK3588-C开发板适配Rockchip原厂的Android14系统时适配CAM3接口的OV5645
2026/1/13 13:52
缘起:给飞凌OK3588-C开发板适配Rockchip原厂的Android14后,需要适配CAM3接口的摄像头OV5645。
给飞凌OK3588-C开发板适配Rockchip原厂的Android14后,需要适配CTP触摸屏FT5X06。
当你把荣品RD-RK3588开发板重新适配一把,就相当于从头做了一个项目:【荣品RD-RK3588开发板】。
当然,开发板的功能都是好的,你免除了调试的过程,也就没有解决相关硬件出错的经验/机会了!
1、直接使用 飞凌OK3588-C开发板 的飞凌Android14中的ov5645的驱动程序。
因为内核版本升级为了linux-6.1,以前linux-5.10的驱动程序也不能用了^_
Y:\new_disk_4t\wyb\OK3588-C\RK3576_Android14.0_SDK_RELEASE\kernel-6.1\drivers\media\i2c\ov5645.c
Z:\14TB\OK3588-C\OK3588-android14-source\kernel-6.1\drivers\media\i2c\ov5645.c
由于改动众多,就不全部截图了!


Y:\new_disk_4t\wyb\OK3588-C\RK3576_Android14.0_SDK_RELEASE\kernel-6.1\drivers\media\i2c\Makefile
Z:\14TB\OK3588-C\OK3588-android14-source\kernel-6.1\drivers\media\i2c\Makefile
obj-(CONFIG_VIDEO_OV5640) += ov5640.o obj-(CONFIG_VIDEO_OV5645) += ov5645.o
obj-$(CONFIG_VIDEO_OV5647) += ov5647.o
obj-$(CONFIG_VIDEO_OV5648) += ov5648.o
obj-$(CONFIG_VIDEO_OV5670) += ov5670.o
obj-$(CONFIG_VIDEO_OV5675) += ov5675.o
obj-$(CONFIG_VIDEO_OV5693) += ov5693.o
obj-$(CONFIG_VIDEO_OV5695) += ov5695.o


Y:\new_disk_4t\wyb\OK3588-C\RK3576_Android14.0_SDK_RELEASE\kernel-6.1\drivers\media\i2c\Kconfig
Z:\14TB\OK3588-C\OK3588-android14-source\kernel-6.1\drivers\media\i2c\Kconfig
config VIDEO_OV5640
tristate "OmniVision OV5640 sensor support"
depends on OF
depends on GPIOLIB && VIDEO_DEV && I2C
select MEDIA_CONTROLLER
select VIDEO_V4L2_SUBDEV_API
select V4L2_FWNODE
help
This is a Video4Linux2 sensor driver for the Omnivision
OV5640 camera sensor with a MIPI CSI-2 interface.
config VIDEO_OV5645
tristate "OmniVision OV5645 sensor support"
depends on OF
depends on I2C && VIDEO_DEV
select MEDIA_CONTROLLER
select VIDEO_V4L2_SUBDEV_API
select V4L2_FWNODE
help
This is a Video4Linux2 sensor driver for the OmniVision
OV5645 camera.
To compile this driver as a module, choose M here: the
module will be called ov5645.
config VIDEO_OV5647
tristate "OmniVision OV5647 sensor support"
depends on I2C && VIDEO_DEV
select MEDIA_CONTROLLER
select VIDEO_V4L2_SUBDEV_API
select V4L2_FWNODE
help
This is a Video4Linux2 sensor driver for the OmniVision
OV5647 camera.
To compile this driver as a module, choose M here: the
module will be called ov5647.


2、加入对ov5645的编译【默认不编译ov5645.c ^_】
Y:\new_disk_4t\wyb\OK3588-C\RK3576_Android14.0_SDK_RELEASE\kernel-6.1\arch\arm64\configs\rockchip_defconfig
Z:\14TB\OK3588-C\OK3588-android14-source\kernel-6.1\arch\arm64\configs\rockchip_defconfig
CONFIG_VIDEO_ROCKCHIP_VPSS=y
CONFIG_VIDEO_GC05A2=y
CONFIG_VIDEO_GC2053=y
CONFIG_VIDEO_GC2093=y
CONFIG_VIDEO_GC2145=y
CONFIG_VIDEO_GC2385=y
CONFIG_VIDEO_GC4C33=y
CONFIG_VIDEO_GC8034=y
CONFIG_VIDEO_IMX415=y
CONFIG_VIDEO_OV02B10=y
CONFIG_VIDEO_OV13850=y
CONFIG_VIDEO_OV13855=y
CONFIG_VIDEO_OV16880=y
CONFIG_VIDEO_OV50C40=y
CONFIG_VIDEO_OV5645=y
CONFIG_VIDEO_OV5695=y
CONFIG_VIDEO_OV8858=y
CONFIG_VIDEO_OV8865=y
CONFIG_VIDEO_S5K3L6XX=y
CONFIG_VIDEO_S5K3L8XX=y
CONFIG_VIDEO_S5KJN1=y
CONFIG_VIDEO_SC4336=y
CONFIG_VIDEO_AW8601=y
CONFIG_VIDEO_CES6301=y
CONFIG_VIDEO_CN3927V=y
CONFIG_VIDEO_DW9714=y
CONFIG_VIDEO_DW9763=y
CONFIG_VIDEO_FP5510=y
CONFIG_VIDEO_VM149C=y
CONFIG_VIDEO_AW36518=y
CONFIG_VIDEO_SGM3784=y
CONFIG_VIDEO_LT6911UXC=y
CONFIG_VIDEO_LT6911UXE=y
CONFIG_VIDEO_LT7911D=y
CONFIG_VIDEO_NVP6188=y
CONFIG_VIDEO_TC35874X=y
CONFIG_VIDEO_THCV244=y
CONFIG_VIDEO_RK628_CSI=y
CONFIG_VIDEO_RK628_BT1120=y
CONFIG_VIDEO_RK_IRCUT=y
CONFIG_DRM=y

3、
Y:\new_disk_4t\wyb\OK3588-C\RK3576_Android14.0_SDK_RELEASE\kernel-6.1\arch\arm64\boot\dts\rockchip\rk3588-evb7-v11-imx415瑞芯微.dtsi
Z:\14TB\OK3588-C\OK3588-android14-source\kernel-6.1\arch\arm64\boot\dts\rockchip\OK3588-C-Camera.dtsi
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright (c) 2022 Forlinx Co., Ltd.
*
* rkisp0 --> rkisp0_vir0/rkisp0_vir1/rkisp0_vir2/rkisp0_vir3
* rkisp1 --> rkisp1_vir0/rkisp1_vir1/rkisp1_vir2/rkisp1_vir3
* rkcif_mipi_lvds --> rkcif_mipi_lvds[0-4]_sditf
* mipicamera0 --> csi2_dcphy0 --> mipi0_csi2 -->rkcif_mipi_lvds --> rkcif_mipi_lvds_sditf --> rkisp0_vir0
* mipicamera1 --> csi2_dcphy1 --> mipi1_csi2 -->rkcif_mipi_lvds1 --> rkcif_mipi_lvds1_sditf --> rkisp0_vir1
* csi2_dphy0 or (csi2_dphy1、csi2_dphy2) dphy0
* csi2_dphy3 or (csi2_dphy4、csi2_dphy5) dphy1
* mipicamera2 --> csi2_dphy1 --> mipi2_csi2 -->rkcif_mipi_lvds2 -->rkcif_mipi_lvds2_sditf --> rkisp0_vir2
* mipicamera3 --> csi2_dphy2 --> mipi3_csi2 -->rkcif_mipi_lvds3 -->rkcif_mipi_lvds3_sditf --> rkisp1_vir0
* mipicamera4 --> csi2_dphy4 --> mipi4_csi2 -->rkcif_mipi_lvds4 -->rkcif_mipi_lvds4_sditf --> rkisp1_vir1
* mipicamera5 --> csi2_dphy5 --> mipi5_csi2 -->rkcif_mipi_lvds5 -->rkcif_mipi_lvds5_sditf --> rkisp1_vir2
* mipicamera6 --> rkcif_dvp ---> rkcif_dvp_sditf
*/
/ {
ext_cam_clk: external-camera-clock {
compatible = "fixed-clock";
clock-frequency = <24000000>;
clock-output-names = "CLK_CAMERA_24MHZ";
#clock-cells = <0>;
};
};
&rkcif {
status = "okay";
};
&rkcif_mmu {
status = "okay";
};
//************************************************
//*** CAM1 OV13850 Configuration description ***
//************************************************
&mipi_dcphy0 {
status = "okay";
};
&rkisp0 {
status = "okay";
};
&isp0_mmu {
status = "okay";
};
&i2c3 {
status = "okay";
clock-frequency = <400000>;
cam1_dw9763: cam1-dw9763@c {
compatible = "dongwoon,dw9763";
status = "okay";
reg = <0x0c>;
rockchip,vcm-max-current = <120>;
rockchip,vcm-start-current = <20>;
rockchip,vcm-rated-current = <90>;
rockchip,vcm-step-mode = <3>;
rockchip,vcm-t-src = <0x20>;
rockchip,vcm-t-div = <1>;
rockchip,camera-module-index = <0>;
rockchip,camera-module-facing = "back";
};
cam1_ov13855: cam1_ov13855@36 {
compatible = "ovti,ov13855";
status = "okay";
reg = <0x36>;
clocks = <&ext_cam_clk>;
clock-names = "xvclk";
pwdn-gpios = <&extio EXTIO_GPIO_P01 GPIO_ACTIVE_HIGH>;
reset-gpios = <&extio EXTIO_GPIO_P00 GPIO_ACTIVE_HIGH>;
rockchip,camera-module-index = <0>;
rockchip,camera-module-facing = "back";
rockchip,camera-module-name = "forlinx";
rockchip,camera-module-lens-name = "default";
lens-focus = <&cam1_dw9763>;
port {
cam1_ov13855_out: endpoint {
remote-endpoint = <&mipi_in_0_ucam1>;
data-lanes = <1 2 3 4>;
};
};
};
};
&csi2_dcphy0 {
status = "okay";
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
#address-cells = <1>;
#size-cells = <0>;
mipi_in_0_ucam1: endpoint@1 {
reg = <1>;
remote-endpoint = <&cam1_ov13855_out>;
data-lanes = <1 2 3 4>;
};
};
port@1 {
reg = <1>;
#address-cells = <1>;
#size-cells = <0>;
csidcphy0_out: endpoint@0 {
reg = <0>;
remote-endpoint = <&mipi0_csi2_input>;
};
};
};
};
&mipi0_csi2 {
status = "okay";
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_lvds0>;
};
};
};
};
&rkcif_mipi_lvds {
status = "okay";
port {
cif_mipi_lvds0: endpoint {
remote-endpoint = <&mipi0_csi2_output>;
};
};
};
&rkcif_mipi_lvds_sditf {
status = "okay";
port {
mipi_lvds_sditf: endpoint {
remote-endpoint = <&isp0_vir0>;
};
};
};
&rkisp0_vir0 {
status = "okay";
port {
#address-cells = <1>;
#size-cells = <0>;
isp0_vir0: endpoint@0 {
reg = <0>;
remote-endpoint = <&mipi_lvds_sditf>;
};
};
};
//************************************************
//*** CAM2 OV13850 Configuration description ***
//************************************************
&mipi_dcphy1 {
status = "okay";
};
&i2c4 {
status = "okay";
clock-frequency = <400000>;
cam2_dw9763: cam2-dw9763@c {
compatible = "dongwoon,dw9763";
status = "okay";
reg = <0x0c>;
rockchip,vcm-max-current = <120>;
rockchip,vcm-start-current = <20>;
rockchip,vcm-rated-current = <90>;
rockchip,vcm-step-mode = <3>;
rockchip,vcm-t-src = <0x20>;
rockchip,vcm-t-div = <1>;
rockchip,camera-module-index = <1>;
rockchip,camera-module-facing = "front";
};
cam2_ov13855: cam2_ov13855@36 {
compatible = "ovti,ov13855";
status = "okay";
reg = <0x36>;
clocks = <&ext_cam_clk>;
clock-names = "xvclk";
pwdn-gpios = <&extio EXTIO_GPIO_P03 GPIO_ACTIVE_HIGH>;
reset-gpios = <&extio EXTIO_GPIO_P02 GPIO_ACTIVE_HIGH>;
rockchip,camera-module-index = <1>;
rockchip,camera-module-facing = "front";
rockchip,camera-module-name = "forlinx";
rockchip,camera-module-lens-name = "default";
lens-focus = <&cam2_dw9763>;
port {
cam2_ov13855_out: endpoint {
remote-endpoint = <&mipi_in_1_ucam2>;
data-lanes = <1 2 3 4>;
};
};
};
};
&csi2_dcphy1 {
status = "okay";
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
#address-cells = <1>;
#size-cells = <0>;
mipi_in_1_ucam2: endpoint@1 {
reg = <1>;
remote-endpoint = <&cam2_ov13855_out>;
data-lanes = <1 2 3 4>;
};
};
port@1 {
reg = <1>;
#address-cells = <1>;
#size-cells = <0>;
csidcphy1_out: endpoint@0 {
reg = <0>;
remote-endpoint = <&mipi1_csi2_input>;
};
};
};
};
&mipi1_csi2 {
status = "okay";
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_lvds1>;
};
};
};
};
&rkcif_mipi_lvds1 {
status = "okay";
port {
cif_mipi_lvds1: endpoint {
remote-endpoint = <&mipi1_csi2_output>;
};
};
};
&rkcif_mipi_lvds1_sditf {
status = "okay";
port {
mipi_lvds1_sditf: endpoint {
remote-endpoint = <&isp1_vir0>;
};
};
};
&rkisp1 {
status = "okay";
};
&isp1_mmu {
status = "okay";
};
&rkisp1_vir0 {
status = "okay";
port {
#address-cells = <1>;
#size-cells = <0>;
isp1_vir0: endpoint@0 {
reg = <0>;
remote-endpoint = <&mipi_lvds1_sditf>;
};
};
};
//************************************************
//*** CAM3 OV5645 Configuration Description ****
//************************************************
&csi2_dphy0_hw {
status = "okay";
};
&i2c7 {
status = "okay";
clock-frequency = <400000>;
cam3_ov5645: cam3_ov5645@3c {
compatible = "ovti,ov5645";
status = "okay";
reg = <0x3c>;
clocks = <&ext_cam_clk>;
clock-names = "xclk";
clock-frequency = <24000000>;
enable-gpios = <&extio EXTIO_GPIO_P05 GPIO_ACTIVE_HIGH>;
reset-gpios = <&extio EXTIO_GPIO_P04 GPIO_ACTIVE_LOW>;
rockchip,camera-module-index = <0>;
rockchip,camera-module-facing = "back";
rockchip,camera-module-name = "NC";
rockchip,camera-module-lens-name = "NC";
port {
cam3_ov5645_out: endpoint {
remote-endpoint = <&mipi_in_ucam3>;
data-lanes = <1 2>;
};
};
};
};
&csi2_dphy0 {
status = "okay";
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
#address-cells = <1>;
#size-cells = <0>;
mipi_in_ucam3: endpoint@1 {
reg = <1>;
remote-endpoint = <&cam3_ov5645_out>;
data-lanes = <1 2>;
};
};
port@1 {
reg = <1>;
#address-cells = <1>;
#size-cells = <0>;
mipi2_csi2_mipicsi0_out0: endpoint@0 {
reg = <0>;
remote-endpoint = <&mipi2_csi2_input>;
};
};
};
};
&mipi2_csi2 {
status = "okay";
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 = <&mipi2_csi2_mipicsi0_out0>;
};
};
port@1 {
reg = <1>;
#address-cells = <1>;
#size-cells = <0>;
mipi2_csi2_output: endpoint@0 {
reg = <0>;
remote-endpoint = <&cif_mipi_lvds2>;
};
};
};
};
&rkcif_mipi_lvds2 {
status = "okay";
port {
cif_mipi_lvds2: endpoint {
remote-endpoint = <&mipi2_csi2_output>;
};
};
};
&rkcif_mipi_lvds2_sditf {
status = "disabled";
};
//************************************************
//*** CAM4 OV5645 Configuration Description ****
//************************************************
&csi2_dphy1_hw {
status = "okay";
};
&i2c3 {
status = "okay";
cam4_ov5645: cam4_ov5645@3c {
status = "okay";
compatible = "ovti,ov5645";
reg = <0x3c>;
clocks = <&ext_cam_clk>;
clock-names = "xclk";
clock-frequency = <24000000>;
reset-gpios = <&extio EXTIO_GPIO_P06 GPIO_ACTIVE_LOW>;
enable-gpios = <&extio EXTIO_GPIO_P07 GPIO_ACTIVE_HIGH>;
rockchip,camera-module-index = <1>;
rockchip,camera-module-facing = "front";
rockchip,camera-module-name = "NC";
rockchip,camera-module-lens-name = "NC";
port {
cam4_ov5645_out: endpoint {
remote-endpoint = <&mipi_in_ucam4>;
data-lanes = <1 2>;
};
};
};
};
&csi2_dphy4 {
status = "okay";
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
#address-cells = <1>;
#size-cells = <0>;
mipi_in_ucam4: endpoint@1 {
reg = <1>;
remote-endpoint = <&cam4_ov5645_out>;
data-lanes = <1 2>;
};
};
port@1 {
reg = <1>;
#address-cells = <1>;
#size-cells = <0>;
mipi4_csi2_csidphy1_out0: endpoint@0 {
reg = <0>;
remote-endpoint = <&mipi4_csi2_input>;
};
};
};
};
&mipi4_csi2 {
status = "okay";
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
#address-cells = <1>;
#size-cells = <0>;
mipi4_csi2_input: endpoint@1 {
reg = <1>;
remote-endpoint = <&mipi4_csi2_csidphy1_out0>;
};
};
port@1 {
reg = <1>;
#address-cells = <1>;
#size-cells = <0>;
mipi4_csi2_output: endpoint@0 {
reg = <0>;
remote-endpoint = <&cif_mipi_in4>;
};
};
};
};
&rkcif_mipi_lvds4 {
status = "okay";
port {
cif_mipi_in4: endpoint {
remote-endpoint = <&mipi4_csi2_output>;
};
};
};
&rkcif_mipi_lvds4_sditf {
status = "disabled";
};
//************************************************
//*** CAM5 OV5645 Configuration Description ****
//************************************************
&i2c4 {
status = "okay";
cam5_ov5645: cam5_ov5645@3c {
status = "okay";
compatible = "ovti,ov5645";
reg = <0x3c>;
clocks = <&ext_cam_clk>;
clock-names = "xclk";
clock-frequency = <24000000>;
reset-gpios = <&extio EXTIO_GPIO_P10 GPIO_ACTIVE_LOW>;
enable-gpios = <&extio EXTIO_GPIO_P11 GPIO_ACTIVE_HIGH>;
rockchip,camera-module-index = <2>;
rockchip,camera-module-facing = "front";
rockchip,camera-module-name = "NC";
rockchip,camera-module-lens-name = "NC";
port {
cam5_ov5645_out: endpoint {
remote-endpoint = <&mipi_in_ucam5>;
data-lanes = <1 2>;
};
};
};
};
&csi2_dphy5 {
status = "okay";
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
#address-cells = <1>;
#size-cells = <0>;
mipi_in_ucam5: endpoint@1 {
reg = <1>;
remote-endpoint = <&cam5_ov5645_out>;
data-lanes = <1 2>;
};
};
port@1 {
reg = <1>;
#address-cells = <1>;
#size-cells = <0>;
mipi5_csi2_csidphy1_out1: endpoint@0 {
reg = <0>;
remote-endpoint = <&mipi5_csi2_input>;
};
};
};
};
&mipi5_csi2 {
status = "okay";
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
#address-cells = <1>;
#size-cells = <0>;
mipi5_csi2_input: endpoint@1 {
reg = <1>;
remote-endpoint = <&mipi5_csi2_csidphy1_out1>;
};
};
port@1 {
reg = <1>;
#address-cells = <1>;
#size-cells = <0>;
mipi5_csi2_output: endpoint@0 {
reg = <0>;
remote-endpoint = <&cif_mipi_in5>;
};
};
};
};
&rkcif_mipi_lvds5 {
status = "okay";
port {
cif_mipi_in5: endpoint {
remote-endpoint = <&mipi5_csi2_output>;
};
};
};
&rkcif_mipi_lvds5_sditf {
status = "disabled";
};


4、编译出错,很容易知道是i2c扩展GPIO芯片pca953x没有适配!
build completed successfully (6 seconds)
SYNC include/config/auto.conf.cmd
HOSTCC scripts/dtc/dtc.o
HOSTCC scripts/dtc/flattree.o
HOSTCC scripts/dtc/fstree.o
HOSTCC scripts/dtc/data.o
HOSTCC scripts/dtc/livetree.o
HOSTCC scripts/dtc/treesource.o
HOSTCC scripts/dtc/srcpos.o
HOSTCC scripts/dtc/checks.o
HOSTCC scripts/dtc/util.o
LEX scripts/dtc/dtc-lexer.lex.c
YACC scripts/dtc/dtc-parser.tab.[ch]
HOSTCC scripts/dtc/libfdt/fdt.o
HOSTCC scripts/dtc/libfdt/fdt_ro.o
HOSTCC scripts/dtc/libfdt/fdt_wip.o
HOSTCC scripts/dtc/libfdt/fdt_sw.o
HOSTCC scripts/dtc/libfdt/fdt_rw.o
HOSTCC scripts/dtc/libfdt/fdt_strerror.o
HOSTCC scripts/dtc/libfdt/fdt_empty_tree.o
HOSTCC scripts/dtc/libfdt/fdt_addresses.o
HOSTCC scripts/dtc/libfdt/fdt_overlay.o
HOSTCC scripts/dtc/fdtoverlay.o
HOSTCC scripts/dtc/dtc-lexer.lex.o
HOSTCC scripts/dtc/dtc-parser.tab.o
HOSTLD scripts/dtc/fdtoverlay
HOSTLD scripts/dtc/dtc
HOSTCC scripts/kallsyms
HOSTCC scripts/resource_tool
HOSTCC scripts/sorttable
HOSTCC scripts/asn1_compiler
HOSTCC scripts/genksyms/genksyms.o
YACC scripts/genksyms/parse.tab.[ch]
LEX scripts/genksyms/lex.lex.c
HOSTCC scripts/selinux/genheaders/genheaders
HOSTCC scripts/selinux/mdp/mdp
DTC arch/arm64/boot/dts/rockchip/rk3588-evb7-v11.dtb
Error: arch/arm64/boot/dts/rockchip/rk3588-evb7-v11-imx415.dtsi:85.30-31 syntax error
FATAL ERROR: Unable to parse input tree
make[3]: *** [scripts/Makefile.lib:421:arch/arm64/boot/dts/rockchip/rk3588-evb7-v11.dtb] 错误 1
make[2]: *** [scripts/Makefile.build:500:arch/arm64/boot/dts/rockchip] 错误 2
make[1]: *** [Makefile:1513:rockchip/rk3588-evb7-v11.dtb] 错误 2
make[1]: *** 正在等待未完成的任务....
HOSTCC scripts/genksyms/parse.tab.o
HOSTCC scripts/genksyms/lex.lex.o
HOSTLD scripts/genksyms/genksyms
make: *** [arch/arm64/Makefile:240:rk3588-evb7-v11.img] 错误 2
failed to build some targets (2 seconds)
Build kernel failed!
jinhualong@jinhualong-LEGION-REN7000K-26IRX:~/new_disk_4t/wyb/OK3588-C/RK3576_Android14.0_SDK_RELEASE$


5、适配pca953x
Y:\new_disk_4t\wyb\OK3588-C\RK3576_Android14.0_SDK_RELEASE\kernel-6.1\include\dt-bindings\pinctrl\rockchip.h
Z:\14TB\OK3588-C\OK3588-android14-source\kernel-6.1\include\dt-bindings\pinctrl\rockchip.h
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Header providing constants for Rockchip pinctrl bindings.
*
* Copyright (c) 2013 MundoReader S.L.
* Author: Heiko Stuebner <heiko@sntech.de>
*/
#ifndef DT_BINDINGS_ROCKCHIP_PINCTRL_H
#define DT_BINDINGS_ROCKCHIP_PINCTRL_H
#define RK_PA0 0
#define RK_PA1 1
#define RK_PA2 2
#define RK_PA3 3
#define RK_PA4 4
#define RK_PA5 5
#define RK_PA6 6
#define RK_PA7 7
#define RK_PB0 8
#define RK_PB1 9
#define RK_PB2 10
#define RK_PB3 11
#define RK_PB4 12
#define RK_PB5 13
#define RK_PB6 14
#define RK_PB7 15
#define RK_PC0 16
#define RK_PC1 17
#define RK_PC2 18
#define RK_PC3 19
#define RK_PC4 20
#define RK_PC5 21
#define RK_PC6 22
#define RK_PC7 23
#define RK_PD0 24
#define RK_PD1 25
#define RK_PD2 26
#define RK_PD3 27
#define RK_PD4 28
#define RK_PD5 29
#define RK_PD6 30
#define RK_PD7 31
#define RK_FUNC_GPIO 0
#define EXTIO_GPIO_P00 0
#define EXTIO_GPIO_P01 1
#define EXTIO_GPIO_P02 2
#define EXTIO_GPIO_P03 3
#define EXTIO_GPIO_P04 4
#define EXTIO_GPIO_P05 5
#define EXTIO_GPIO_P06 6
#define EXTIO_GPIO_P07 7
#define EXTIO_GPIO_P10 8
#define EXTIO_GPIO_P11 9
#define EXTIO_GPIO_P12 10
#define EXTIO_GPIO_P13 11
#define EXTIO_GPIO_P14 12
#define EXTIO_GPIO_P15 13
#define EXTIO_GPIO_P16 14
#define EXTIO_GPIO_P17 15
#define EXTIO_GPIO_P20 16
#define EXTIO_GPIO_P21 17
#define EXTIO_GPIO_P22 18
#define EXTIO_GPIO_P23 19
#define EXTIO_GPIO_P24 20
#define EXTIO_GPIO_P25 21
#define EXTIO_GPIO_P26 22
#define EXTIO_GPIO_P27 23
#endif

6、DTS部分:
Y:\new_disk_4t\wyb\OK3588-C\RK3576_Android14.0_SDK_RELEASE\kernel-6.1\arch\arm64\boot\dts\rockchip\rk3588-evb7-v11.dtsi
&i2c2 {
status = "okay";
extio: tca6424@23 {
compatible = "ti,tca6424";
reg = <0x23>;
interrupt-parent = <&gpio1>;
interrupts = <RK_PA4 IRQ_TYPE_EDGE_FALLING>;
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
pinctrl-0 = <&extio_int_gpio>;
pinctrl-names = "default";
status = "okay";
};
};
&pinctrl {
hdmi {
hdmirx_det: hdmirx-det {
rockchip,pins = <1 RK_PD5 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
extio {
extio_int_gpio: extio-int-gpio {
rockchip,pins = <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
headphone {
hp_det: hp-det {
rockchip,pins = <1 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
};


7、config部分
Y:\new_disk_4t\wyb\OK3588-C\RK3576_Android14.0_SDK_RELEASE\kernel-6.1\arch\arm64\configs\rockchip_defconfig
CONFIG_GPIO_SYSCON=y
CONFIG_GPIO_PCA953X=y
CONFIG_GPIO_PCA953X_IRQ=y
CONFIG_POWER_RESET_GPIO=y

8、【全部无需改动!】
Y:\new_disk_4t\wyb\OK3588-C\RK3576_Android14.0_SDK_RELEASE\kernel-6.1\drivers\gpio\gpio-pca953x.c
Z:\14TB\OK3588-C\OK3588-android14-source\kernel-6.1\drivers\gpio\gpio-pca953x.c


Y:\new_disk_4t\wyb\OK3588-C\RK3576_Android14.0_SDK_RELEASE\kernel-6.1\drivers\gpio\Kconfig
Z:\14TB\OK3588-C\OK3588-android14-source\kernel-6.1\drivers\gpio\Kconfig
config GPIO_NCA9539
tristate "NCA9539 I2C GPIO expander"
depends on I2C || COMPILE_TEST
select REGMAP_I2C
help
Say yes here to support the NCA9539 series of I2C Expanders.
GPIO expanders used for additional digital outputs or inputs.
config GPIO_PCA953X
tristate "PCA95[357]x, PCA9698, TCA64xx, and MAX7310 I/O ports"
select REGMAP_I2C
help
Say yes here to provide access to several register-oriented
SMBus I/O expanders, made mostly by NXP or TI. Compatible
models include:
4 bits: pca9536, pca9537
8 bits: max7310, max7315, pca6107, pca9534, pca9538, pca9554,
pca9556, pca9557, pca9574, tca6408, tca9554, xra1202
16 bits: max7312, max7313, pca9535, pca9539, pca9555, pca9575,
tca6416
24 bits: tca6424
40 bits: pca9505, pca9698
config GPIO_PCA953X_IRQ
bool "Interrupt controller support for PCA953x"
depends on GPIO_PCA953X
select GPIOLIB_IRQCHIP
help
Say yes here to enable the pca953x to be used as an interrupt
controller.
config GPIO_PCA9570
tristate "PCA9570 4-Bit I2C GPO expander"
help
Say yes here to enable the GPO driver for the NXP PCA9570 chip.
To compile this driver as a module, choose M here: the module will
be called gpio-pca9570.


Y:\new_disk_4t\wyb\OK3588-C\RK3576_Android14.0_SDK_RELEASE\kernel-6.1\drivers\gpio\Makefile
Z:\14TB\OK3588-C\OK3588-android14-source\kernel-6.1\drivers\gpio\Makefile
obj-$(CONFIG_GPIO_OMAP) += gpio-omap.o
obj-(CONFIG_GPIO_PALMAS) += gpio-palmas.o obj-(CONFIG_GPIO_PCA953X) += gpio-pca953x.o
obj-$(CONFIG_GPIO_PCA9570) += gpio-pca9570.o
obj-$(CONFIG_GPIO_PCF857X) += gpio-pcf857x.o

9、你现在摄像头还是不会亮的。你点Android14系统默认/自带的相机/Camera应用会马上闪退。
Y:\new_disk_4t\wyb\OK3588-C\RK3576_Android14.0_SDK_RELEASE\hardware\rockchip\camera\etc\camera\camera3_profiles_rk3588.xml
Z:\14TB\OK3588-C\OK3588-android14-source\hardware\rockchip\camera\etc\camera\camera3_profiles_rk3588.xml


jinhualong@jinhualong-LEGION-REN7000K-26IRX:~/new_disk_4t/wyb/OK3588-C/RK3576_Android14.0_SDK_RELEASE$
jinhualong@jinhualong-LEGION-REN7000K-26IRX:~/new_disk_4t/wyb/OK3588-C/RK3576_Android14.0_SDK_RELEASE jinhualong@jinhualong-LEGION-REN7000K-26IRX:\~/new_disk_4t/wyb/OK3588-C/RK3576_Android14.0_SDK_RELEASE make installclean
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=14
PRODUCT_INCLUDE_TAGS=com.android.mainline
TARGET_PRODUCT=rk3588_u
TARGET_BUILD_VARIANT=userdebug
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=generic
HOST_OS=linux
HOST_OS_EXTRA=Linux-6.11.0-17-generic-x86_64-Ubuntu-24.04.2-LTS
HOST_CROSS_OS=windows
BUILD_ID=UQ1A.240205.004.B1
OUT_DIR=out
============================================
12:22:54 Entire data directory removed.
12:22:55 Deleted images and staging directories.
build completed successfully (2 seconds)
jinhualong@jinhualong-LEGION-REN7000K-26IRX:~/new_disk_4t/wyb/OK3588-C/RK3576_Android14.0_SDK_RELEASE jinhualong@jinhualong-LEGION-REN7000K-26IRX:\~/new_disk_4t/wyb/OK3588-C/RK3576_Android14.0_SDK_RELEASE ./build.sh -CKAu
效果:
console:/ #
console:/ # dmesg | grep ov5645
8.364552\] ov5645 3-003c: supply vdddo not found, using dummy regulator \[ 8.364602\] ov5645 3-003c: supply vdda not found, using dummy regulator \[ 8.364626\] ov5645 3-003c: supply vddd not found, using dummy regulator \[ 8.410514\] ov5645 3-003c: ov5645_write_reg: write reg error -6: reg=3103, val=11 \[ 8.410525\] ov5645 3-003c: could not set init registers \[ 8.411177\] ov5645 3-003c: could not power up OV5645 \[ 8.411350\] ov5645 4-003c: supply vdddo not found, using dummy regulator \[ 8.411396\] ov5645 4-003c: supply vdda not found, using dummy regulator \[ 8.411418\] ov5645 4-003c: supply vddd not found, using dummy regulator \[ 8.458513\] ov5645 4-003c: ov5645_write_reg: write reg error -6: reg=3103, val=11 \[ 8.458523\] ov5645 4-003c: could not set init registers \[ 8.459175\] ov5645 4-003c: could not power up OV5645 \[ 8.459304\] ov5645 7-003c: supply vdddo not found, using dummy regulator \[ 8.459347\] ov5645 7-003c: supply vdda not found, using dummy regulator \[ 8.459369\] ov5645 7-003c: supply vddd not found, using dummy regulator \[ 8.608526\] ov5645 7-003c: OV5645 detected at address 0x3c \[ 8.801955\] ov5645 7-003c: Consider updating driver ov5645 to match on endpoints \[ 8.801975\] rockchip-csi2-dphy csi2-dphy0: dphy0 matches m00_b_ov5645 7-003c:bus type 5 console:/ # console:/ # console:/ # dmesg \| grep ov13855 \[ 8.713609\] ov13855 3-0036: driver version: 00.01.04 \[ 8.713672\] ov13855 3-0036: Failed to get power-gpios, maybe no use \[ 8.721257\] ov13855 3-0036: supply avdd not found, using dummy regulator \[ 8.726082\] ov13855 3-0036: supply dovdd not found, using dummy regulator \[ 8.726097\] ov13855 3-0036: supply dvdd not found, using dummy regulator \[ 8.741614\] ov13855 3-0036: Detected OV00d855 sensor, REVISION 0xb0 \[ 8.743092\] ov13855 4-0036: driver version: 00.01.04 \[ 8.743114\] ov13855 4-0036: Failed to get power-gpios, maybe no use \[ 8.747478\] ov13855 4-0036: supply avdd not found, using dummy regulator \[ 8.751770\] ov13855 4-0036: supply dovdd not found, using dummy regulator \[ 8.754126\] ov13855 4-0036: supply dvdd not found, using dummy regulator \[ 8.764033\] ov13855 4-0036: Unexpected sensor id(000000), ret(-5) \[ 8.799233\] ov13855 3-0036: Consider updating driver ov13855 to match on endpoints \[ 8.799269\] rockchip-csi2-dphy csi2-dcphy0: dphy0 matches m00_b_ov13855 3-0036:bus type 5 console:/ # console:/ #  console:/ # console:/ # cd /sys/class/i2 i2c-adapter/ i2c-dev/ console:/ # cd /sys/class/i2c-adapter/ console:/sys/class/i2c-adapter # console:/sys/class/i2c-adapter # ll total 0 lrwxrwxrwx 1 root root 0 2026-01-13 04:29 i2c-0 -\> ../../devices/platform/fd880000.i2c/i2c-0 lrwxrwxrwx 1 root root 0 2026-01-13 04:29 i2c-1 -\> ../../devices/platform/fea90000.i2c/i2c-1 lrwxrwxrwx 1 root root 0 2026-01-13 04:29 i2c-10 -\> ../../devices/platform/fdea0000.hdmi/i2c-10 lrwxrwxrwx 1 root root 0 2026-01-13 04:29 i2c-11 -\> ../../devices/platform/fde50000.dp/i2c-11 lrwxrwxrwx 1 root root 0 2026-01-13 04:29 i2c-12 -\> ../../devices/platform/fde60000.dp/i2c-12 lrwxrwxrwx 1 root root 0 2026-01-13 04:29 i2c-2 -\> ../../devices/platform/feaa0000.i2c/i2c-2 lrwxrwxrwx 1 root root 0 2026-01-13 04:29 i2c-3 -\> ../../devices/platform/feab0000.i2c/i2c-3 lrwxrwxrwx 1 root root 0 2026-01-13 04:29 i2c-4 -\> ../../devices/platform/feac0000.i2c/i2c-4 lrwxrwxrwx 1 root root 0 2026-01-13 04:29 i2c-6 -\> ../../devices/platform/fec80000.i2c/i2c-6 lrwxrwxrwx 1 root root 0 2026-01-13 04:29 i2c-7 -\> ../../devices/platform/fec90000.i2c/i2c-7 lrwxrwxrwx 1 root root 0 2026-01-13 04:29 i2c-9 -\> ../../devices/platform/fde80000.hdmi/i2c-9 console:/sys/class/i2c-adapter # cd i2 i2c-0/ i2c-10/ i2c-12/ i2c-3/ i2c-6/ i2c-9/ i2c-1/ i2c-11/ i2c-2/ i2c-4/ i2c-7/ console:/sys/class/i2c-adapter # cd i2c-7/ console:/sys/class/i2c-adapter/i2c-7 # ll total 0 drwxr-xr-x 3 root root 0 1970-01-01 00:00 7-0011 drwxr-xr-x 4 root root 0 1970-01-01 00:00 7-003c --w------- 1 root root 4096 2026-01-13 04:29 delete_device lrwxrwxrwx 1 root root 0 2026-01-13 04:29 device -\> ../../fec90000.i2c drwxr-xr-x 3 root root 0 1970-01-01 00:00 i2c-dev -r--r--r-- 1 root root 4096 2026-01-13 04:29 name --w------- 1 root root 4096 2026-01-13 04:29 new_device lrwxrwxrwx 1 root root 0 2026-01-13 04:29 of_node -\> ../../../../firmware/devicetree/base/i2c@fec90000 drwxr-xr-x 2 root root 0 1970-01-01 00:00 power lrwxrwxrwx 1 root root 0 2026-01-13 04:29 subsystem -\> ../../../../bus/i2c -rw-r--r-- 1 root root 4096 1970-01-01 00:00 uevent -r--r--r-- 1 root root 4096 2026-01-13 04:29 waiting_for_supplier console:/sys/class/i2c-adapter/i2c-7 # cd 7-003c console:/sys/class/i2c-adapter/i2c-7/7-003c # ll total 0 lrwxrwxrwx 1 root root 0 2026-01-13 04:29 driver -\> ../../../../../bus/i2c/drivers/ov5645 -r--r--r-- 1 root root 4096 2026-01-13 04:29 modalias -r--r--r-- 1 root root 4096 2026-01-13 04:29 name lrwxrwxrwx 1 root root 0 2026-01-13 04:29 of_node -\> ../../../../../firmware/devicetree/base/i2c@fec90000/cam3_ov5645@3c drwxr-xr-x 2 root root 0 1970-01-01 00:00 power lrwxrwxrwx 1 root root 0 2026-01-13 04:29 subsystem -\> ../../../../../bus/i2c lrwxrwxrwx 1 root root 0 2026-01-13 04:29 supplier:i2c:2-0023 -\> ../../../../virtual/devlink/i2c:2-0023--i2c:7-003c lrwxrwxrwx 1 root root 0 2026-01-13 04:29 supplier:regulator:regulator.0 -\> ../../../../virtual/devlink/regulator:regulator.0--i2c:7-003c -rw-r--r-- 1 root root 4096 1970-01-01 00:00 uevent drwxr-xr-x 3 root root 0 1970-01-01 00:00 video4linux at name \< ov5645 console:/sys/class/i2c-adapter/i2c-7/7-003c # console:/sys/class/i2c-adapter/i2c-7/7-003c # \[ 253.233404\]\[ T517\] healthd: battery l=50 v=3300 t=2.6 h=2 st=3 c=-1600 fc=100 chg=au console:/sys/class/i2c-adapter/i2c-7/7-003c #     