Firefly开源社区

123
发表新贴
打印 上一主题 下一主题

[Linux] linux 在dts中添加子节点,编译通过 log中找不到节点信息

123

积分

0

威望

0

贡献

技术小白

积分
123

linux 在dts中添加子节点,编译通过 log中找不到节点信息

发表于 2022-5-16 16:04:55      浏览:19436 | 回复:29        打印      只看该作者   [复制链接] 楼主
  • 固件类型: 自行编译的固件
  • SDK包名称: rk356x_linux_release_v1.2.0_20211012.xml
  • SDK更新到哪个COMMIT: 0000-00-00 00:00:00
  • SDK修改内容: i2c1下添加了子节点
  • Log日志: log.zip
问题描述及复现步骤:

对应的dts文件下在ic1下添加了rk628d子节点,编译通过后,烧录固件,打印出来的log中找不到添加的rk628节点信息。
dts修改如下:
&i2c1{
    clock-frequency = <400000>;
    status = "okay";

    rk628: rk628@50{
        reg = <0x50>;
        interrupt-parent = <&gpio3>;
        interrupts = <RK_PA3 IRQ_TYPE_LEVEL_HIGH>;

        reset-gpios = <&gpio3 RK_PA5 GPIO_ACTIVE_LOW>;
         //

        status = "okay";

    };
};

#include <arm/rk628.dtsi>

&rk628_combtxphy{
    status = "okay";
};

&rk628_combrxphy{
    status = "okay";
};

&rk628_csi {
    status = "okay";
    /** If the hpd output level is inverted on the circuit, * the following configuration needs to be enabled. */
    /* hpd-output-inverted; */
    //plugin-det-gpios = <&gpio4 RK_PB4 GPIO_ACTIVE_LOW>; //
    plugin-det-gpios = <&gpio0 RK_PD6 GPIO_ACTIVE_LOW>; //


    //plugin-det-gpios = <&gpio0 RK_PD6 GPIO_ACTIVE_LOW>;
    //power-gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>;
    rockchip,camera-module-index = <0>;
    rockchip,camera-module-facing = "back";
    rockchip,camera-module-name = "RK628-CSI";
    rockchip,camera-module-lens-name = "NC";

    port {
        hdmiin_out0: endpoint {
            remote-endpoint = <&mipi_in>;
            data-lanes = <1 2 3 4>;
        };
    };
};

&csi2_dphy_hw {
    status = "okay";
};

&csi2_dphy0 {
    status = "okay";

    ports {
        #address-cells = <1>;
        #size-cells = <0>;
        port@0 {
            reg = <0>;
            #address-cells = <1>;
            #size-cells = <0>;

            mipi_in: endpoint@0 {
                reg = <0>;
                remote-endpoint = <&hdmiin_out0>;
                data-lanes = <1 2 3 4>;
            };
        };

        port@1 {
            reg = <1>;
            #address-cells = <1>;
            #size-cells = <0>;

            csidphy0_out: endpoint@0 {
                reg = <0>;
                remote-endpoint = <&isp0_in>;
            };
        };
    };
};

&rkisp {
    status = "okay";
};

&rkisp_mmu {
    status = "okay";
};

&rkisp_vir0 {
    status = "okay";

    port {
        #address-cells = <1>;
        #size-cells = <0>;

        isp0_in: endpoint@0 {
            reg = <0>;
            remote-endpoint = <&csidphy0_out>;
        };
    };
};



log.zip

25.1 KB, 下载次数: 1, 下载积分: 灯泡 -1 , 经验 -1

回复

使用道具 举报

123

积分

0

威望

0

贡献

技术小白

积分
123
发表于 2022-5-16 16:11:35        只看该作者  沙发
编译打包过程如下:
litong@ubuntu:~/linux/rk356x_linux_release_20211019$ ./build.sh
processing option: allff
============================================
TARGET_ARCH=arm64
TARGET_PLATFORM=rk356x
TARGET_UBOOT_CONFIG=firefly-rk3568
TARGET_SPL_CONFIG=
TARGET_KERNEL_CONFIG=firefly_linux_defconfig
TARGET_KERNEL_DTS=rk3568-firefly-aioj
TARGET_TOOLCHAIN_CONFIG=
TARGET_BUILDROOT_CONFIG=
TARGET_RECOVERY_CONFIG=
TARGET_PCBA_CONFIG=
TARGET_RAMBOOT_CONFIG=
============================================
============Start building uboot============
TARGET_UBOOT_CONFIG=firefly-rk3568
=========================================
## make firefly-rk3568_defconfig -j4
#
# configuration written to .config
#
scripts/kconfig/conf  --silentoldconfig Kconfig
  CHK     include/config.h
  GEN     include/autoconf.mk.dep
  CFG     u-boot.cfg
  CFG     tpl/u-boot.cfg
  CFG     spl/u-boot.cfg
  GEN     spl/include/autoconf.mk
  GEN     include/autoconf.mk
  GEN     tpl/include/autoconf.mk
  CHK     include/config/uboot.release
  CHK     include/generated/timestamp_autogenerated.h
  UPD     include/generated/timestamp_autogenerated.h
  CHK     include/generated/version_autogenerated.h
  CHK     include/generated/asm-offsets.h
  CHK     include/generated/generic-asm-offsets.h
  CHK     include/config.h
  CFG     u-boot.cfg
  HOSTCC  tools/mkenvimage.o
  HOSTCC  tools/image-host.o
  HOSTCC  tools/fit_image.o
  HOSTCC  tools/dumpimage.o
  HOSTCC  tools/mkimage.o
  HOSTCC  tools/rockchip/boot_merger.o
  HOSTCC  tools/rockchip/loaderimage.o
  HOSTLD  tools/loaderimage
  HOSTLD  tools/mkenvimage
  HOSTLD  tools/dumpimage
  HOSTLD  tools/mkimage
  HOSTLD  tools/boot_merger
  CC      arch/arm/cpu/armv8/fwcall.o
  LD      arch/arm/cpu/armv8/built-in.o
  CC      cmd/version.o
  CC      common/main.o
  LD      cmd/built-in.o
  LD      common/built-in.o
  CC      drivers/usb/gadget/f_fastboot.o
  CC      lib/display_options.o
  LD      drivers/usb/gadget/built-in.o
  LD      lib/built-in.o
  LD      u-boot
  OBJCOPY u-boot.srec
  OBJCOPY u-boot-nodtb.bin
make[2]: 'arch/arm/dts/rk3568-firefly.dtb' is up to date.
  SYM     u-boot.sym
start=$(/home/litong/linux/rk356x_linux_release_20211019/prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-nm u-boot | grep __rel_dyn_start | cut -f 1 -d ' '); end=$(/home/litong/linux/rk356x_linux_release_20211019/prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-nm u-boot | grep __rel_dyn_end | cut -f 1 -d ' '); tools/relocate-rela u-boot-nodtb.bin 0x00a00000 $start $end
  COPY    u-boot.dtb
  CAT     u-boot-dtb.bin
  MKIMAGE u-boot.img
  MKIMAGE u-boot-dtb.img
  COPY    u-boot.bin
  ALIGN   u-boot.bin
  CC      spl/arch/arm/cpu/armv8/fwcall.o
  CC      tpl/arch/arm/mach-rockchip/tpl.o
  CC      tpl/arch/arm/cpu/armv8/fwcall.o
  LD      spl/arch/arm/cpu/armv8/built-in.o
  LD      tpl/arch/arm/cpu/armv8/built-in.o
  LD      tpl/arch/arm/mach-rockchip/built-in.o
  CC      spl/common/spl/spl.o
  LD      tpl/u-boot-tpl
  LD      spl/common/spl/built-in.o
  OBJCOPY tpl/u-boot-tpl-nodtb.bin
  COPY    tpl/u-boot-tpl.bin
  COPY    spl/u-boot-spl.dtb
  CC      spl/lib/display_options.o
  LD      spl/lib/built-in.o
  LD      spl/u-boot-spl
  OBJCOPY spl/u-boot-spl-nodtb.bin
  CAT     spl/u-boot-spl-dtb.bin
  COPY    spl/u-boot-spl.bin
  CFGCHK  u-boot.cfg
SEC=1
pack u-boot.itb okay! Input: /home/litong/linux/rk356x_linux_release_20211019/rkbin/RKTRUST/RK3568TRUST.ini

FIT description: FIT Image with ATF/OP-TEE/U-Boot/MCU
Created:         Mon May 16 00:23:50 2022
Image 0 (uboot)
  Description:  U-Boot
  Created:      Mon May 16 00:23:50 2022
  Type:         Standalone Program
  Compression:  uncompressed
  Data Size:    1210656 Bytes = 1182.28 KiB = 1.15 MiB
  Architecture: AArch64
  Load Address: 0x00a00000
  Entry Point:  unavailable
  Hash algo:    sha256
  Hash value:   5febe2d56ca5740b3333366f74bd6e228434dd82cea7f1eebdef61d2a04da190
Image 1 (atf-1)
  Description:  ARM Trusted Firmware
  Created:      Mon May 16 00:23:50 2022
  Type:         Firmware
  Compression:  uncompressed
  Data Size:    155648 Bytes = 152.00 KiB = 0.15 MiB
  Architecture: AArch64
  Load Address: 0x00040000
  Hash algo:    sha256
  Hash value:   fe4f274c0624c2d7e7b9aa0d5b40a3331801664bf625367702d2116dbe452466
Image 2 (atf-2)
  Description:  ARM Trusted Firmware
  Created:      Mon May 16 00:23:50 2022
  Type:         Firmware
  Compression:  uncompressed
  Data Size:    19531 Bytes = 19.07 KiB = 0.02 MiB
  Architecture: AArch64
  Load Address: 0x00068000
  Hash algo:    sha256
  Hash value:   8d440360954c39a1d9a1eb604c0642e7201f4a47679272a9885cfd46205aa418
Image 3 (atf-3)
  Description:  ARM Trusted Firmware
  Created:      Mon May 16 00:23:50 2022
  Type:         Firmware
  Compression:  uncompressed
  Data Size:    8192 Bytes = 8.00 KiB = 0.01 MiB
  Architecture: AArch64
  Load Address: 0xfdcd0000
  Hash algo:    sha256
  Hash value:   e410275b51692587b5d09c794ae13f2dcd4d187bd6ab1eb2998bf18d44750876
Image 4 (atf-4)
  Description:  ARM Trusted Firmware
  Created:      Mon May 16 00:23:50 2022
  Type:         Firmware
  Compression:  uncompressed
  Data Size:    8192 Bytes = 8.00 KiB = 0.01 MiB
  Architecture: AArch64
  Load Address: 0xfdcc9000
  Hash algo:    sha256
  Hash value:   990c53fc0167a7bcd877235f09a3ac6911841c978a4e270d89f6259ec1d36144
Image 5 (atf-5)
  Description:  ARM Trusted Firmware
  Created:      Mon May 16 00:23:50 2022
  Type:         Firmware
  Compression:  uncompressed
  Data Size:    7668 Bytes = 7.49 KiB = 0.01 MiB
  Architecture: AArch64
  Load Address: 0x00066000
  Hash algo:    sha256
  Hash value:   315a4195a9f6536f971c695a79fcab4870363fc7fc97f355bd091d8d7092261a
Image 6 (optee)
  Description:  OP-TEE
  Created:      Mon May 16 00:23:50 2022
  Type:         Firmware
  Compression:  uncompressed
  Data Size:    457112 Bytes = 446.40 KiB = 0.44 MiB
  Architecture: AArch64
  Load Address: 0x08400000
  Hash algo:    sha256
  Hash value:   f3f0302d4cf61565726829783ee08321117a2e409b8933199ce36b3f0ea60677
Image 7 (fdt)
  Description:  U-Boot dtb
  Created:      Mon May 16 00:23:50 2022
  Type:         Flat Device Tree
  Compression:  uncompressed
  Data Size:    15115 Bytes = 14.76 KiB = 0.01 MiB
  Architecture: AArch64
  Hash algo:    sha256
  Hash value:   30938731debb4198eb74f983facf8e81a2a52dfccdbac4a0a35ddeccaba3402a
Default Configuration: 'conf'
Configuration 0 (conf)
  Description:  rk3568-firefly
  Kernel:       unavailable
  Firmware:     atf-1
  FDT:          fdt
  Loadables:    uboot
                atf-2
                atf-3
                atf-4
                atf-5
                optee
pack loader ok.(rk356x_spl_loader_v1.11.112.bin)(0.02)
pack loader(SPL) okay! Input: /home/litong/linux/rk356x_linux_release_20211019/rkbin/RKBOOT/RK3568MINIALL.ini

/home/litong/linux/rk356x_linux_release_20211019/u-boot
pack loader with new: spl/u-boot-spl.bin

Image(no-signed, version=0):  uboot.img (FIT with uboot, trust...) is ready
Image(no-signed):  rk356x_spl_loader_v1.11.112.bin (with spl, ddr, usbplug) is ready
pack uboot.img okay! Input: /home/litong/linux/rk356x_linux_release_20211019/rkbin/RKTRUST/RK3568TRUST.ini

Platform RK3568 is build OK, with new .config(make firefly-rk3568_defconfig -j4)
/home/litong/linux/rk356x_linux_release_20211019/prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
Mon May 16 00:23:50 PDT 2022
Image Type:   Rockchip RK35 boot image
Init Data Size: 59392 bytes
Boot Data Size: 241664 bytes
Input:
    /home/litong/linux/rk356x_linux_release_20211019/rkbin/RKBOOT/RK3568MINIALL.ini
    /home/litong/linux/rk356x_linux_release_20211019/rkbin/bin/rk35/rk3568_ddr_1560MHz_v1.11.bin
    /home/litong/linux/rk356x_linux_release_20211019/rkbin/bin/rk35/rk356x_spl_v1.12.bin

Pack rk3568 idblock.bin okay!

Running build_uboot succeeded.
Skipping build_loader for missing configs:  RK_LOADER_BUILD_TARGET.
============Start building kernel============
TARGET_ARCH          =arm64
TARGET_KERNEL_CONFIG =firefly_linux_defconfig
TARGET_KERNEL_DTS    =rk3568-firefly-aioj
TARGET_KERNEL_CONFIG_FRAGMENT =
==========================================
/home/litong/linux/rk356x_linux_release_20211019
#
# configuration written to .config
#
scripts/kconfig/conf  --syncconfig Kconfig
  DTC     arch/arm64/boot/dts/rockchip/rk3568-firefly-aioj.dtb
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  GZIP    kernel/config_data.gz
  Image:  kernel.img is ready
  CALL    scripts/checksyscalls.sh
  Building modules, stage 2.
  MODPOST 0 modules
found ./arch/arm64/boot/dts/rockchip/.rk3568-firefly-aioj.dtb.dts.tmp
found ./arch/arm64/boot/dts/rockchip/.rk3568-firefly-aioj.dtb.dts.tmp
found ./arch/arm64/boot/dts/rockchip/.rk3568-firefly-aioj.dtb.dts.tmp
found ./arch/arm64/boot/dts/rockchip/.rk3568-firefly-aioj.dtb.dts.tmp
found ./arch/arm64/boot/dts/rockchip/.rk3568-firefly-aioj.dtb.dts.tmp
found ./arch/arm64/boot/dts/rockchip/.rk3568-firefly-aioj.dtb.dts.tmp
found ./arch/arm64/boot/dts/rockchip/.rk3568-firefly-aioj.dtb.dts.tmp
  Image:  resource.img (with rk3568-firefly-aioj.dtb logo.bmp logo_kernel.bmp) is ready
  Image:  boot.img (with Image ramdisk.img resource.img) is ready
  Image:  zboot.img (with Image.lz4 ramdisk.img resource.img) is ready
fdt {
kernel {
ramdisk {
resource {
FIT description: U-Boot FIT source file for arm
Created:         Mon May 16 00:24:11 2022
Image 0 (fdt)
  Description:  unavailable
  Created:      Mon May 16 00:24:11 2022
  Type:         Flat Device Tree
  Compression:  uncompressed
  Data Size:    141421 Bytes = 138.11 KiB = 0.13 MiB
  Architecture: AArch64
  Load Address: 0xffffff00
  Hash algo:    sha256
  Hash value:   db6ea2523a521ca322006d378709b4e874b9d8d59160e7262ce5780e160654cc
Image 1 (kernel)
  Description:  unavailable
  Created:      Mon May 16 00:24:11 2022
  Type:         Kernel Image
  Compression:  uncompressed
  Data Size:    24252424 Bytes = 23684.01 KiB = 23.13 MiB
  Architecture: AArch64
  OS:           Linux
  Load Address: 0xffffff01
  Entry Point:  0xffffff01
  Hash algo:    sha256
  Hash value:   d5a1f03c8b4bdca57b51dc8a58352643ec3c444cccd8dd8fd0237763c12bd53d
Image 2 (ramdisk)
  Description:  unavailable
  Created:      Mon May 16 00:24:11 2022
  Type:         RAMDisk Image
  Compression:  uncompressed
  Data Size:    8860887 Bytes = 8653.21 KiB = 8.45 MiB
  Architecture: AArch64
  OS:           Linux
  Load Address: 0xffffff02
  Entry Point:  unavailable
  Hash algo:    sha256
  Hash value:   252b580d48d2afa60baba78b73045c9ccc36e894535d5683b9d1d2f4158db7e1
Image 3 (resource)
  Description:  unavailable
  Created:      Mon May 16 00:24:11 2022
  Type:         Multi-File Image
  Compression:  uncompressed
  Data Size:    399872 Bytes = 390.50 KiB = 0.38 MiB
  Hash algo:    sha256
  Hash value:   44ce1d1d11f206617d1c788d05ddf77377f3621e69ac1e54c4099203f3c80278
Default Configuration: 'conf'
Configuration 0 (conf)
  Description:  unavailable
  Kernel:       kernel
  Init Ramdisk: ramdisk
  FDT:          fdt
Running build_kernel succeeded.
Skipping build_toolchain for missing configs:  RK_CFG_TOOLCHAIN.
Skipping build_buildroot for missing configs:  RK_CFG_BUILDROOT.
buildroot/output//images/rootfs.ext4 not generated?
Running build_rootfs succeeded.
==========Start building recovery==========
TARGET_RECOVERY_CONFIG=
========================================
config is
use prebuilt rk356x-recovery-arm64.cpio.gz for CPIO image
found kernel image
pack recovery.img...fdt {
kernel {
ramdisk {
resource {
FIT description: U-Boot FIT source file for arm
Created:         Mon May 16 00:24:11 2022
Image 0 (fdt)
  Description:  unavailable
  Created:      Mon May 16 00:24:11 2022
  Type:         Flat Device Tree
  Compression:  uncompressed
  Data Size:    141421 Bytes = 138.11 KiB = 0.13 MiB
  Architecture: AArch64
  Load Address: 0xffffff00
  Hash algo:    sha256
  Hash value:   db6ea2523a521ca322006d378709b4e874b9d8d59160e7262ce5780e160654cc
Image 1 (kernel)
  Description:  unavailable
  Created:      Mon May 16 00:24:11 2022
  Type:         Kernel Image
  Compression:  uncompressed
  Data Size:    24252424 Bytes = 23684.01 KiB = 23.13 MiB
  Architecture: AArch64
  OS:           Linux
  Load Address: 0xffffff01
  Entry Point:  0xffffff01
  Hash algo:    sha256
  Hash value:   d5a1f03c8b4bdca57b51dc8a58352643ec3c444cccd8dd8fd0237763c12bd53d
Image 2 (ramdisk)
  Description:  unavailable
  Created:      Mon May 16 00:24:11 2022
  Type:         RAMDisk Image
  Compression:  uncompressed
  Data Size:    6956263 Bytes = 6793.23 KiB = 6.63 MiB
  Architecture: AArch64
  OS:           Linux
  Load Address: 0xffffff02
  Entry Point:  unavailable
  Hash algo:    sha256
  Hash value:   848757f81587ca00f60eeb52788b237c9cde5bb2b94663176b2393ad70038702
Image 3 (resource)
  Description:  unavailable
  Created:      Mon May 16 00:24:11 2022
  Type:         Multi-File Image
  Compression:  uncompressed
  Data Size:    399872 Bytes = 390.50 KiB = 0.38 MiB
  Hash algo:    sha256
  Hash value:   44ce1d1d11f206617d1c788d05ddf77377f3621e69ac1e54c4099203f3c80278
Default Configuration: 'conf'
Configuration 0 (conf)
  Description:  unavailable
  Kernel:       kernel
  Init Ramdisk: ramdisk
  FDT:          fdt
done.
you take 0:00.86 to build recovery
====Build recovery ok!====
Running build_recovery succeeded.
Skipping build_ramboot for missing configs:  RK_CFG_RAMBOOT.
Running build_all succeeded.
/usr/bin/fakeroot
create rootfs.img...done.
create parameter...done.
/home/litong/linux/rk356x_linux_release_20211019/device/rockchip/rk356x/parameter-ubuntu-fit.txt
0x00002000@0x00004000(uboot),0x00002000@0x00006000(misc),0x00020000@0x00008000(boot),0x00020000@0x00028000(recovery),0x00010000@0x00048000(backup),0x00c00000@0x00058000(rootfs),-@0x00c58000(userdata:grow)
create misc.img...done.
warning:   not found!
create uboot.img...done.
create idblock.bin...done.
uboot fotmat type is fit, so ignore trust.img...
create loader...done.
create boot.img...done.
mkupdate.sh will resize the rootfs partition.
Image: image in rockdev is ready
Make image ok!
File name is  AIO-3568J-UBUNTU20.04-GPT
Rename the file? [N|y]n
Make update.img
start to make update.img...
Resize rootfs partition size
dumpe2fs 1.44.1 (24-Mar-2018)
Android Firmware Package Tool v1.66
------ PACKAGE ------
Add file: ./package-file
Add file: ./package-file done,offset=0x800,size=0x11a,userspace=0x1
Add file: ./Image/MiniLoaderAll.bin
Add file: ./Image/MiniLoaderAll.bin done,offset=0x1000,size=0x701c0,userspace=0xe1
Add file: ./Image/parameter.txt
Add file: ./Image/parameter.txt done,offset=0x71800,size=0x1d5,userspace=0x1
Add file: ./Image/uboot.img
Add file: ./Image/uboot.img done,offset=0x72000,size=0x400000,userspace=0x800
Add file: ./Image/misc.img
Add file: ./Image/misc.img done,offset=0x472000,size=0xc000,userspace=0x18
Add file: ./Image/boot.img
Add file: ./Image/boot.img done,offset=0x47e000,size=0x2019800,userspace=0x4033
Add file: ./Image/recovery.img
Add file: ./Image/recovery.img done,offset=0x2497800,size=0x1e48800,userspace=0x3c91
Add file: ./Image/rootfs.img
Add file: ./Image/rootfs.img done,offset=0x42e0000,size=0xa744fc00,userspace=0x14e8a0
Add CRC...
Make firmware OK!
------ OK ------
********RKImageMaker ver 1.66********
Generating new image, please wait...
Writing head info...
Writing boot file...
Writing firmware...
Generating MD5 data...
MD5 data generated successfully!
New image generated successfully!
Making ./Image/update.img OK.
Make update image ok!
/home/litong/linux/rk356x_linux_release_20211019/rockdev/pack/AIO-3568J-UBUNTU20.04-GPT-20220516-0024.img
Running build_updateimg succeeded.
回复

使用道具 举报

123

积分

0

威望

0

贡献

技术小白

积分
123
发表于 2022-5-18 15:41:08        只看该作者  板凳
之前的问题解决了,是添加模块的问题,现在又遇到了新的问题。

i2c找不到模块信息
回复

使用道具 举报

1万

积分

18

威望

20

贡献

神级创客

Rank: 8Rank: 8

积分
10851

突出贡献

发表于 2022-5-19 09:00:16        只看该作者  地板
Android调通了,可以对比一下linux相关的差异。内核差别应该不大
回复

使用道具 举报

123

积分

0

威望

0

贡献

技术小白

积分
123
发表于 2022-5-19 15:11:27        只看该作者  5#
本帖最后由 513453733 于 2022-5-19 15:12 编辑
zyk 发表于 2022-5-19 09:00
Android调通了,可以对比一下linux相关的差异。内核差别应该不大

贵厂的rk628d什么时候上线呢,你们是适配了那些soc呢
回复

使用道具 举报

1万

积分

18

威望

20

贡献

神级创客

Rank: 8Rank: 8

积分
10851

突出贡献

发表于 2022-5-20 14:44:53        只看该作者  6#
目前还没具体日期、主要适配RK356x、RK3399
回复

使用道具 举报

123

积分

0

威望

0

贡献

技术小白

积分
123
发表于 2022-5-25 22:20:55        只看该作者  7#
zyk 发表于 2022-5-20 14:44
目前还没具体日期、主要适配RK356x、RK3399

您好,我现在遇到了如下问题,之前我用原厂提供的for all版本的代码,修改drivers/media/i2c/Makefile,添加rk628的编译,在i2c1下添加节点,报找不到模块信息。
dts修改如下:
&i2c1 {
    clock-frequency = <400000>;
    status = "okay";
    rk628_csi_v4l2: rk628_csi_v4l2@51 {
            reg = <0x50>;
            compatible = "rockchip,rk628-csi-v4l2";
            interrupt-parent = <&gpio3>;
            interrupts = <RK_PA3 IRQ_TYPE_LEVEL_HIGH>;
            
            reset-gpios = <&gpio0 RK_PD6 GPIO_ACTIVE_LOW>;
            /* hpd-output-inverted; */
            //plugin-det-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
            //power-gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>;
            //hdcp-enable = <1>;
            status = "okay";
        };
};
log为:



之后我发现linux内核里面带有628d的驱动信息,直接用3568内核里面的驱动。(之前安卓平台验证该方案可行)
dts修改为:
&i2c1{
    clock-frequency = <400000>;
    status = "okay";

    rk628: rk628@50{
        reg = <0x50>;
        interrupt-parent = <&gpio3>;
        interrupts = <RK_PA3 IRQ_TYPE_LEVEL_HIGH>;

        reset-gpios = <&gpio3 RK_PA5 GPIO_ACTIVE_LOW>;
         //

        status = "okay";

    };
};

#include <arm/rk628.dtsi>

&rk628_combtxphy{
    status = "okay";
};

&rk628_combrxphy{
    status = "okay";
};

&rk628_csi {
    status = "okay";
    /** If the hpd output level is inverted on the circuit, * the following configuration needs to be enabled. */
    /* hpd-output-inverted; */
    //plugin-det-gpios = <&gpio4 RK_PB4 GPIO_ACTIVE_LOW>; //
    plugin-det-gpios = <&gpio0 RK_PD6 GPIO_ACTIVE_LOW>; //


    //plugin-det-gpios = <&gpio0 RK_PD6 GPIO_ACTIVE_LOW>;
    //power-gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>;
    rockchip,camera-module-index = <0>;
    rockchip,camera-module-facing = "back";
    rockchip,camera-module-name = "RK628-CSI";
    rockchip,camera-module-lens-name = "NC";

    port {
        hdmiin_out0: endpoint {
            remote-endpoint = <&mipi_in>;
            data-lanes = <1 2 3 4>;
        };
    };
};

&csi2_dphy_hw {
    status = "okay";
};

&csi2_dphy0 {
    status = "okay";

    ports {
        #address-cells = <1>;
        #size-cells = <0>;
        port@0 {
            reg = <0>;
            #address-cells = <1>;
            #size-cells = <0>;

            mipi_in: endpoint@0 {
                reg = <0>;
                remote-endpoint = <&hdmiin_out0>;
                data-lanes = <1 2 3 4>;
            };
        };

        port@1 {
            reg = <1>;
            #address-cells = <1>;
            #size-cells = <0>;

            csidphy0_out: endpoint@0 {
                reg = <0>;
                remote-endpoint = <&isp0_in>;
            };
        };
    };
};

&rkisp {
    status = "okay";
};

&rkisp_mmu {
    status = "okay";
};

&rkisp_vir0 {
    status = "okay";

    port {
        #address-cells = <1>;
        #size-cells = <0>;

        isp0_in: endpoint@0 {
            reg = <0>;
            remote-endpoint = <&csidphy0_out>;
        };
    };
};


kernel config 打开如下配置:
CONFIG_MFD_RK628=Y
CONFIG_VIDEO_RK628_CSI=Y

log中找不到rk628的节点信息,即无法调用rk628d驱动

现在怀疑是i2c节点中子节点添加失败,导致以上错误,请问如何检验或者如何解决。

使用固件版本:roc-rk3568-pc-ubuntu

非常感谢。

回复

使用道具 举报

2129

积分

20

威望

24

贡献

中级创客

Rank: 4

积分
2129
发表于 2022-5-26 09:23:23        只看该作者  8#
添加的节点中根本没有compatible属性,肯定是匹配不上驱动的啊
你不是安卓调通了吗,dts节点照搬过来应该就可以的吧,安卓和linux的dts基本一致的
回复

使用道具 举报

123

积分

0

威望

0

贡献

技术小白

积分
123
发表于 2022-5-26 09:56:56        只看该作者  9#
Liuth 发表于 2022-5-26 09:23
添加的节点中根本没有compatible属性,肯定是匹配不上驱动的啊
你不是安卓调通了吗,dts节点照搬过来应该 ...

compatible信息在3568自带的rk628.dtsi里,不需要在dts里面定义。








回复

使用道具 举报

123

积分

0

威望

0

贡献

技术小白

积分
123
发表于 2022-5-26 10:00:56        只看该作者  10#
513453733 发表于 2022-5-26 09:56
compatible信息在3568自带的rk628.dtsi里,不需要在dts里面定义。

之前安卓dts就是这么写的
回复

使用道具 举报

返回列表
123
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

友情链接 : 爱板网 电子发烧友论坛 云汉电子社区 粤ICP备14022046号-2
快速回复 返回顶部 返回列表