How to write the dts of ov7740

122 Views Asked by At

My development board is licheepi-zero, and its chip is Allwinner v3s. I successfully compiled the kernel of ov2640 according to the tutorial.

I want to change the device tree configuration based on the content of the OV7740 case

But I use media-ctl --print-topology command after startup it shows # media-ctl --print-topology Failed to enumerate /dev/media0 (-2) I use dmesg | grep ov7740 command it shows nothing

My dts code is as follows

&csi1 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&csi1_clk &csi1_8bit>;
    assigned-clock-rates = <24000000>;
    status = "okay";

    port {
        csi1_ep: endpoint {
        remote-endpoint = <&ov7740_0>;
        hsync-active = <1>;
        vsync-active = <0>;
        bus-width = <8>;
        pclk-sample = <1>;
         };
    };

 };
 
&i2c1 {
        pinctrl-0 = <&i2c1_pins>;
        pinctrl-names = "default";
        clock-frequency = <400000>;
        status = "okay";
    
    ov7740: camera@21 {
        compatible = "ovti,ov7740";
        reg = <0x21>;
        pinctrl-names = "default";
        pinctrl-0 = <&csi1_mclk_pin>;
        clocks = <&ccu CLK_CSI1_MCLK>;
        clock-names = "xvclk";
        assigned-clocks = <&ccu CLK_CSI1_MCLK>;
        assigned-clock-rates = <24000000>;
        port {
        ov7740_0: endpoint {
                remote-endpoint = <&csi1_ep>;
                bus-width = <8>;
            };
        };
     };
};

    
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.2.0-licheepi-zero (root@c69d2c2e2d0f) (gcc version 6.3.1 20170404 (Linaro GCC 6.3-2017.05)) #4 SMP Sat Sep 2 10:30:45 UTC 2023
[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Lichee Pi Zero with Dock
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] percpu: Embedded 16 pages/cpu s34508 r8192 d22836 u65536
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait panic=10 earlyprintk rw
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 55052K/65536K available (6144K kernel code, 302K rwdata, 1704K rodata, 1024K init, 252K bss, 10484K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu:     RCU event tracing is enabled.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] random: get_random_bytes called from start_kernel+0x300/0x48c with crng_init=0
[    0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (virt).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000008] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000020] Switching to timer-based delay loop, resolution 41ns
[    0.000206] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000449] Console: colour dummy device 80x30
[    0.000503] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.000519] pid_max: default: 32768 minimum: 301
[    0.000678] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.000696] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.001512] CPU: Testing write buffer coherency: ok
[    0.002011] /cpus/cpu@0 missing clock-frequency property
[    0.002039] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.002796] Setting up static identity map for 0x40100000 - 0x40100060
[    0.003003] rcu: Hierarchical SRCU implementation.
[    0.003528] smp: Bringing up secondary CPUs ...
[    0.003549] smp: Brought up 1 node, 1 CPU
[    0.003558] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[    0.003565] CPU: All CPU(s) started in SVC mode.
[    0.004648] devtmpfs: initialized
[    0.007961] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.008266] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.008299] futex hash table entries: 256 (order: 2, 16384 bytes, linear)
[    0.008539] pinctrl core: initialized pinctrl subsystem
[    0.009584] NET: Registered protocol family 16
[    0.010217] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.011445] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.011463] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.034982] SCSI subsystem initialized
[    0.035154] usbcore: registered new interface driver usbfs
[    0.035211] usbcore: registered new interface driver hub
[    0.035333] usbcore: registered new device driver usb
[    0.035551] mc: Linux media interface: v0.10
[    0.035588] videodev: Linux video capture interface: v2.00
[    0.035864] Advanced Linux Sound Architecture Driver Initialized.
[    0.037131] clocksource: Switched to clocksource arch_sys_counter
[    0.049220] NET: Registered protocol family 2
[    0.050024] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.050067] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.050092] TCP bind hash table entries: 1024 (order: 1, 8192 bytes, linear)
[    0.050116] TCP: Hash tables configured (established 1024 bind 1024)
[    0.050260] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.050312] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.050611] NET: Registered protocol family 1
[    0.052454] Initialise system trusted keyrings
[    0.052842] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    0.088809] Key type asymmetric registered
[    0.088834] Asymmetric key parser 'x509' registered
[    0.088935] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250)
[    0.088949] io scheduler mq-deadline registered
[    0.088957] io scheduler kyber registered
[    0.089955] sun4i-usb-phy 1c19400.phy: Couldn't request ID GPIO
[    0.093649] sun8i-v3s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.160781] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.163078] sun8i-v3s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pb not found, using dummy regulator
[    0.164187] printk: console [ttyS0] disabled
[    0.184493] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 37, base_baud = 1500000) is a U6_16550A
[    0.692170] printk: console [ttyS0] enabled
[    0.700420] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.706957] ehci-platform: EHCI generic platform driver
[    0.712543] ehci-platform 1c1a000.usb: EHCI Host Controller
[    0.718210] ehci-platform 1c1a000.usb: new USB bus registered, assigned bus number 1
[    0.726157] ehci-platform 1c1a000.usb: irq 26, io mem 0x01c1a000
[    0.757145] ehci-platform 1c1a000.usb: USB 2.0 started, EHCI 1.00
[    0.764348] hub 1-0:1.0: USB hub found
[    0.768310] hub 1-0:1.0: 1 port detected
[    0.772942] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.779269] ohci-platform: OHCI generic platform driver
[    0.784797] ohci-platform 1c1a400.usb: Generic Platform OHCI controller
[    0.791518] ohci-platform 1c1a400.usb: new USB bus registered, assigned bus number 2
[    0.799474] ohci-platform 1c1a400.usb: irq 27, io mem 0x01c1a400
[    0.872225] hub 2-0:1.0: USB hub found
[    0.876066] hub 2-0:1.0: 1 port detected
[    0.883384] usbcore: registered new interface driver usb-storage
[    0.890705] input: 1c22800.lradc as /devices/platform/soc/1c22800.lradc/input/input0
[    0.899982] sun6i-rtc 1c20400.rtc: registered as rtc0
[    0.905046] sun6i-rtc 1c20400.rtc: RTC enabled
[    0.909773] i2c /dev entries driver
[    0.914680] input: ns2009_ts as /devices/platform/soc/1c2ac00.i2c/i2c-0/0-0048/input/input1
[    0.923713] sun8i-v3s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pe not found, using dummy regulator
[    0.937787] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[    0.946378] sun8i-v3s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pf not found, using dummy regulator
[    0.983045] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[    0.990346] sun8i-v3s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pg not found, using dummy regulator
[    1.025307] sunxi-mmc 1c10000.mmc: initialized, max. request size: 16384 KB
[    1.033433] usbcore: registered new interface driver usbhid
[    1.039093] usbhid: USB HID core driver
[    1.045067] sun4i-codec 1c22c00.codec: ASoC: codec-analog@01c23000 not registered
[    1.052710] sun4i-codec 1c22c00.codec: Failed to register our card
[    1.060200] Initializing XFRM netlink socket
[    1.064508] NET: Registered protocol family 17
[    1.069701] Registering SWP/SWPB emulation handler
[    1.075593] Loading compiled-in X.509 certificates
[    1.086874] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[    1.098435] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[    1.104202] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 3
[    1.113760] hub 3-0:1.0: USB hub found
[    1.117800] hub 3-0:1.0: 1 port detected
[    1.124219] debugfs: Directory '1c22c00.codec' with parent 'V3s Audio Codec' already present!
[    1.132898] sun4i-codec 1c22c00.codec: ASoC: Failed to create component debugfs directory: -17
[    1.142962] sun4i-codec 1c22c00.codec: Codec <-> 1c22c00.codec mapping ok
[    1.150318] mmc0: host does not support reading read-only switch, assuming write-enable
[    1.159813] sun6i-rtc 1c20400.rtc: setting system clock to 1970-01-01T00:02:22 UTC (142)
[    1.168285] vcc5v0: disabling
[    1.171262] ALSA device list:
[    1.174228]   #0: V3s Audio Codec
[    1.178173] mmc0: Problem switching card into high-speed mode!
[    1.184329] mmc0: new SDHC card at address 0001
[    1.191218] mmcblk0: mmc0:0001 SD16G 14.6 GiB
[    1.197738]  mmcblk0: p1 p2
[    1.232100] random: fast init done
[    1.292536] EXT4-fs (mmcblk0p2): recovery complete
[    1.298562] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    1.306776] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    1.313841] devtmpfs: mounted
[    1.318056] Freeing unused kernel memory: 1024K
[    1.322751] Run /sbin/init as init process
[    1.532534] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
Starting logging: OK
Populating /dev using udev: [    1.721692] udevd[96]: starting version 3.2.5
[    1.729678] random: udevd: uninitialized urandom read (16 bytes read)
[    1.738942] random: udevd: uninitialized urandom read (16 bytes read)
[    1.745519] random: udevd: uninitialized urandom read (16 bytes read)
[    1.798034] udevd[97]: starting eudev-3.2.5
done
Starting watchdog...
Initializing random number generator... [    3.644281] random: dd: uninitialized urandom read (512 bytes read)
done.
Starting system message bus: [    3.706586] random: dbus-uuidgen: uninitialized urandom read (12 bytes read)
[    3.713986] random: dbus-uuidgen: uninitialized urandom read (8 bytes read)
done
Starting network: OK
Starting dhcpcd...
no valid interfaces found
no interfaces have a carrier
forked to background, child pid 144
Starting dropbear sshd: OK

Welcome to Buildroot
Blueberry-PI login:

Welcome to Buildroot
Blueberry-PI login:


  [1]: https://i.stack.imgur.com/tZeOB.png
0

There are 0 best solutions below