OpenIPC / firmware

Alternative IP Camera firmware from an open community
https://openipc.org
MIT License
1.3k stars 254 forks source link

GK7205V210+sc223a (branded sc5239s) i2c not working #1404

Open miguelangel-nubla opened 7 months ago

miguelangel-nubla commented 7 months ago

Device https://www.aliexpress.com/item/2251832668606248.html 4MP 48V POE, sensor branded as sc5239s which should be a sc223a.

Flashed with burn just fine, but the sensor is not detected on ipctool.

root@openipc-gk7205v210:~# dmesg
Booting Linux on physical CPU 0x0
Linux version 4.9.37 (runner@fv-az1501-923) (buildroot-gcc-13.2.0) #1 Tue Apr 16                                                                                               17:38:40 UTC 2024
CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c53c7d
CPU: div instructions available: patching division code
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
OF: fdt:Machine model: Goke GK7205V200 DEMO Board
cma zone is not set!
Memory policy: Data cache writeback
On node 0 totalpages: 8192
free_area_init_node: node 0, pgdat c05072d8, node_mem_map c1fbb000
  Normal zone: 64 pages used for memmap
  Normal zone: 0 pages reserved
  Normal zone: 8192 pages, LIFO batch:0
CPU: All CPU(s) started in SVC mode.
pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
pcpu-alloc: [0] 0
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
Kernel command line: mem=32M console=ttyAMA0,115200 panic=20 rootfstype=squashfs                                                                                               root=/dev/mtdblock3 init=/init mtdparts=sfc:256k(boot),64k(env),2048k(kernel),5                                                                                              120k(rootfs),-(rootfs_data) mmz_allocator=gk
PID hash table entries: 128 (order: -3, 512 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 27056K/32768K available (3856K kernel code, 150K rwdata, 912K rodata, 19                                                                                              2K init, 181K bss, 5712K reserved, 0K cma-reserved)
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    vmalloc : 0xc2800000 - 0xff800000   ( 976 MB)
    lowmem  : 0xc0000000 - 0xc2000000   (  32 MB)
    modules : 0xbf000000 - 0xc0000000   (  16 MB)
      .text : 0xc0008000 - 0xc03cc3a8   (3857 kB)
      .init : 0xc04b2000 - 0xc04e2000   ( 192 kB)
      .data : 0xc04e2000 - 0xc0507ae0   ( 151 kB)
       .bss : 0xc0509000 - 0xc0536468   ( 182 kB)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:16 nr_irqs:16 16
Gic dist init...
arm_arch_timer: Architected cp15 timer(s) running at 50.00MHz (phys).
clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0xb8812736b, m                                                                                              ax_idle_ns: 440795202655 ns
sched_clock: 56 bits at 50MHz, resolution 20ns, wraps every 4398046511100ns
Switching to timer-based delay loop, resolution 20ns
clocksource: arm,sp804: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 63                                                                                              7086815595 ns
Console: colour dummy device 80x30
Calibrating delay loop (skipped), value calculated using timer frequency.. 100.0                                                                                              0 BogoMIPS (lpj=500000)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0x40008200 - 0x40008258
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911                                                                                              2604462750000 ns
futex hash table entries: 256 (order: -1, 3072 bytes)
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
Serial: AMBA PL011 UART driver
12040000.uart: ttyAMA0 at MMIO 0x12040000 (irq = 21, base_baud = 0) is a PL011 r                                                                                              ev2
console [ttyAMA0] enabled
12041000.uart: ttyAMA1 at MMIO 0x12041000 (irq = 22, base_baud = 0) is a PL011 r                                                                                              ev2
12042000.uart: ttyAMA2 at MMIO 0x12042000 (irq = 23, base_baud = 0) is a PL011 r                                                                                              ev2
ssp-pl022 12070000.spi: ARM PL022 driver, device ID: 0x00041022
ssp-pl022 12070000.spi: mapped registers from 0x12070000 to c286f000
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
clocksource: Switched to clocksource arch_sys_counter
NET: Registered protocol family 2
TCP established hash table entries: 1024 (order: 0, 4096 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
workingset: timestamp_bits=30 max_order=13 bucket_order=0
squashfs: version 4.0 (2009/01/31) Phillip Lougher
jffs2: version 2.2 (NAND) (ZLIB) (RTIME) (c) 2001-2006 Red Hat, Inc.
yaffs: yaffs Installing.
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
io scheduler noop registered
io scheduler deadline registered (default)
pl061_gpio 120b0000.gpio_chip: PL061 GPIO chip @0x120b0000 registered
pl061_gpio 120b1000.gpio_chip: PL061 GPIO chip @0x120b1000 registered
pl061_gpio 120b2000.gpio_chip: PL061 GPIO chip @0x120b2000 registered
pl061_gpio 120b4000.gpio_chip: PL061 GPIO chip @0x120b4000 registered
pl061_gpio 120b5000.gpio_chip: PL061 GPIO chip @0x120b5000 registered
pl061_gpio 120b6000.gpio_chip: PL061 GPIO chip @0x120b6000 registered
pl061_gpio 120b7000.gpio_chip: PL061 GPIO chip @0x120b7000 registered
pl061_gpio 120b8000.gpio_chip: PL061 GPIO chip @0x120b8000 registered
brd: module loaded
loop: module loaded
bsp-sfc bsp_spi_nor.0: SPI Nor ID Table Version 1.2
bsp-sfc bsp_spi_nor.0: Force global unlock
bsp-sfc bsp_spi_nor.0: SR1:[02]->[00]
bsp-sfc bsp_spi_nor.0: all blocks are unlocked.
bsp-sfc bsp_spi_nor.0: SR1 [00], SR2 [00], SR3 [00]
bsp-sfc bsp_spi_nor.0: FM25Q64-SOB-T-G (Chipsize 8 Mbytes, Blocksize 64KiB)
5 cmdlinepart partitions found on MTD device sfc
5 cmdlinepart partitions found on MTD device sfc
Creating 5 MTD partitions on "sfc":
0x000000000000-0x000000040000 : "boot"
0x000000040000-0x000000050000 : "env"
0x000000050000-0x000000250000 : "kernel"
0x000000250000-0x000000750000 : "rootfs"
0x000000750000-0x000000800000 : "rootfs_data"
SPI Nand ID Table Version 2.7
Cannot found a valid SPI Nand Device
bsp_spi_nand_probe(157): Error: driver probe, result: -19
FEPHY:addr=1, la_am=0xa, ldo_am=0x5, r_tuning=0x25
libphy: femac_mii_bus: probed
libphy: Fixed MDIO Bus: probed
femac 10040000.ethernet: using random MAC address f2:57:5b:e2:1e:2c
Generic PHY 10041100.mdio:01: attached PHY driver [Generic PHY] (mii_bus:phy_add                                                                                              r=10041100.mdio:01, irq=-1)
phy_id=0x20669906, phy_mode=mii
xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
xhci-hcd xhci-hcd.0.auto: hcc params 0x0220fe6c hci version 0x110 quirks 0x20010                                                                                              010
xhci-hcd xhci-hcd.0.auto: irq 116, io mem 0x10030000
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
hub 2-0:1.0: USB hub found
hub 2-0:1.0: hub can't support USB3.0
goke_rtc 120e0000.rtc: rtc core: registered 120e0000.rtc as rtc0
goke_rtc 120e0000.rtc: RTC driver for goke enabled
i2c /dev entries driver
goke-i2c 12060000.i2c: goke-i2c0@100000hz registered
goke-i2c 12061000.i2c: goke-i2c1@100000hz registered
goke-i2c 12062000.i2c: goke-i2c2@100000hz registered
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
mmc0: SDHCI controller on 10010000.sdhci [10010000.sdhci] using ADMA in legacy m                                                                                              ode
mmc1: SDHCI controller on 10020000.sdhci [10020000.sdhci] using ADMA in legacy m                                                                                              ode
ip_tables: (C) 2000-2006 Netfilter Core Team
NET: Registered protocol family 10
NET: Registered protocol family 17
bridge: filtering via arp/ip/ip6tables is no longer available by default. Update                                                                                               your scripts to load br_netfilter if you need this.
goke_rtc 120e0000.rtc: hctosys: unable to read the hardware clock
VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
devtmpfs: mounted
Freeing unused kernel memory: 192K (c04b2000 - c04e2000)
This architecture does not have kernel memory protection.
random: crng init done
IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
femac 10040000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
goke-i2c 12060000.i2c: wait idle timeout, RIS: 0x10, SR: 0xa0000
root@openipc-gk7205v210:~# ipctool
The ipctool installed as remote GitHub plugin
ioctl SPI_IOC_WR_MODE err, value = 11 ret = -1
---
chip:
  vendor: Goke
  model: 7205V210
  id: 2368ae0c918955e3
board:
  vendor: OpenIPC
  version: 2.4.04.16
ethernet:
  mac: "66:51:dc:24:6a:a5"
  u-mdio-phyaddr: 1
  phy-id: 0x20669906
  d-mdio-phyaddr: 0
rom:
- type: nor
  block: 64K
  partitions:
    - name: boot
      size: 0x40000
      sha1: 784cff96
    - name: env
      size: 0x10000
      sha1: b5272811
      contains:
        - name: uboot-env
          offset: 0x0
    - name: kernel
      size: 0x200000
      sha1: a99a2184
    - name: rootfs
      size: 0x500000
      sha1: 0652a542
    - name: rootfs_data
      size: 0xb0000
      path: /overlay,jffs2,rw
  size: 8M
  addr-mode: 3-byte
ram:
  total: 32M
firmware:
  kernel: "4.9.37 (Tue Apr 16 17:38:40 UTC 2024)"
  toolchain: buildroot-gcc-13.2.0

Found https://github.com/OpenIPC/ipctool/issues/112 but seems i2c is not working

root@openipc-gk7205v210:~# i2cdetect -yr 0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
root@openipc-gk7205v210:~# ipctool i2cdump 0x60 0x3100 0x310F
       0  1  2  3  4  5  6  7   8  9  A  B  C  D  E  F
3100: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  |  ................

I restored the backup and everything works fine, so I guess hardware is ok. Flashing back to OpenIPC same situation.

miguelangel-nubla commented 7 months ago

Setting the sensor manually fs_setenv sensor sc223a results in:

Booting Linux on physical CPU 0x0
Linux version 4.9.37 (runner@fv-az915-692) (buildroot-gcc-13.2.0) #1 Tue Apr 16 17:38:58 UTC 2024
CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c53c7d
CPU: div instructions available: patching division code
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
OF: fdt:Machine model: Goke GK7205V200 DEMO Board
cma zone is not set!
Memory policy: Data cache writeback
On node 0 totalpages: 8192
free_area_init_node: node 0, pgdat c05072d8, node_mem_map c1fbb000
  Normal zone: 64 pages used for memmap
  Normal zone: 0 pages reserved
  Normal zone: 8192 pages, LIFO batch:0
CPU: All CPU(s) started in SVC mode.
pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
pcpu-alloc: [0] 0
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
Kernel command line: mem=32M console=ttyAMA0,115200 panic=20 rootfstype=squashfs root=/dev/mtdblock3 init=/init mtdparts=sfc:256k(boot),64k(env),2048k(kernel),5120k(rootfs),-(rootfs_data) mmz_allocator=gk
PID hash table entries: 128 (order: -3, 512 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 27056K/32768K available (3856K kernel code, 150K rwdata, 912K rodata, 192K init, 181K bss, 5712K reserved, 0K cma-reserved)
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    vmalloc : 0xc2800000 - 0xff800000   ( 976 MB)
    lowmem  : 0xc0000000 - 0xc2000000   (  32 MB)
    modules : 0xbf000000 - 0xc0000000   (  16 MB)
      .text : 0xc0008000 - 0xc03cc3a8   (3857 kB)
      .init : 0xc04b2000 - 0xc04e2000   ( 192 kB)
      .data : 0xc04e2000 - 0xc0507ae0   ( 151 kB)
       .bss : 0xc0509000 - 0xc0536468   ( 182 kB)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:16 nr_irqs:16 16
Gic dist init...
arm_arch_timer: Architected cp15 timer(s) running at 50.00MHz (phys).
clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0xb8812736b, max_idle_ns: 440795202655 ns
sched_clock: 56 bits at 50MHz, resolution 20ns, wraps every 4398046511100ns
Switching to timer-based delay loop, resolution 20ns
clocksource: arm,sp804: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 637086815595 ns
Console: colour dummy device 80x30
Calibrating delay loop (skipped), value calculated using timer frequency.. 100.00 BogoMIPS (lpj=500000)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0x40008200 - 0x40008258
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
futex hash table entries: 256 (order: -1, 3072 bytes)
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
Serial: AMBA PL011 UART driver
12040000.uart: ttyAMA0 at MMIO 0x12040000 (irq = 21, base_baud = 0) is a PL011 rev2
console [ttyAMA0] enabled
12041000.uart: ttyAMA1 at MMIO 0x12041000 (irq = 22, base_baud = 0) is a PL011 rev2
12042000.uart: ttyAMA2 at MMIO 0x12042000 (irq = 23, base_baud = 0) is a PL011 rev2
ssp-pl022 12070000.spi: ARM PL022 driver, device ID: 0x00041022
ssp-pl022 12070000.spi: mapped registers from 0x12070000 to c286f000
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
clocksource: Switched to clocksource arch_sys_counter
NET: Registered protocol family 2
TCP established hash table entries: 1024 (order: 0, 4096 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
workingset: timestamp_bits=30 max_order=13 bucket_order=0
squashfs: version 4.0 (2009/01/31) Phillip Lougher
jffs2: version 2.2 (NAND) (ZLIB) (RTIME) (c) 2001-2006 Red Hat, Inc.
yaffs: yaffs Installing.
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
io scheduler noop registered
io scheduler deadline registered (default)
pl061_gpio 120b0000.gpio_chip: PL061 GPIO chip @0x120b0000 registered
pl061_gpio 120b1000.gpio_chip: PL061 GPIO chip @0x120b1000 registered
pl061_gpio 120b2000.gpio_chip: PL061 GPIO chip @0x120b2000 registered
pl061_gpio 120b4000.gpio_chip: PL061 GPIO chip @0x120b4000 registered
pl061_gpio 120b5000.gpio_chip: PL061 GPIO chip @0x120b5000 registered
pl061_gpio 120b6000.gpio_chip: PL061 GPIO chip @0x120b6000 registered
pl061_gpio 120b7000.gpio_chip: PL061 GPIO chip @0x120b7000 registered
pl061_gpio 120b8000.gpio_chip: PL061 GPIO chip @0x120b8000 registered
brd: module loaded
loop: module loaded
bsp-sfc bsp_spi_nor.0: SPI Nor ID Table Version 1.2
bsp-sfc bsp_spi_nor.0: Force global unlock
bsp-sfc bsp_spi_nor.0: SR1:[02]->[00]
bsp-sfc bsp_spi_nor.0: all blocks are unlocked.
bsp-sfc bsp_spi_nor.0: SR1 [00], SR2 [00], SR3 [00]
bsp-sfc bsp_spi_nor.0: FM25Q64-SOB-T-G (Chipsize 8 Mbytes, Blocksize 64KiB)
5 cmdlinepart partitions found on MTD device sfc
5 cmdlinepart partitions found on MTD device sfc
Creating 5 MTD partitions on "sfc":
0x000000000000-0x000000040000 : "boot"
0x000000040000-0x000000050000 : "env"
0x000000050000-0x000000250000 : "kernel"
0x000000250000-0x000000750000 : "rootfs"
0x000000750000-0x000000800000 : "rootfs_data"
SPI Nand ID Table Version 2.7
Cannot found a valid SPI Nand Device
bsp_spi_nand_probe(157): Error: driver probe, result: -19
FEPHY:addr=1, la_am=0xa, ldo_am=0x5, r_tuning=0x25
libphy: femac_mii_bus: probed
libphy: Fixed MDIO Bus: probed
femac 10040000.ethernet: using random MAC address ae:e5:2e:df:a6:b0
Generic PHY 10041100.mdio:01: attached PHY driver [Generic PHY] (mii_bus:phy_addr=10041100.mdio:01, irq=-1)
phy_id=0x20669906, phy_mode=mii
xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
xhci-hcd xhci-hcd.0.auto: hcc params 0x0220fe6c hci version 0x110 quirks 0x20010010
xhci-hcd xhci-hcd.0.auto: irq 116, io mem 0x10030000
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
hub 2-0:1.0: USB hub found
hub 2-0:1.0: hub can't support USB3.0
goke_rtc 120e0000.rtc: rtc core: registered 120e0000.rtc as rtc0
goke_rtc 120e0000.rtc: RTC driver for goke enabled
i2c /dev entries driver
goke-i2c 12060000.i2c: goke-i2c0@100000hz registered
goke-i2c 12061000.i2c: goke-i2c1@100000hz registered
goke-i2c 12062000.i2c: goke-i2c2@100000hz registered
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
mmc0: SDHCI controller on 10010000.sdhci [10010000.sdhci] using ADMA in legacy mode
mmc1: SDHCI controller on 10020000.sdhci [10020000.sdhci] using ADMA in legacy mode
ip_tables: (C) 2000-2006 Netfilter Core Team
NET: Registered protocol family 10
NET: Registered protocol family 17
bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
goke_rtc 120e0000.rtc: hctosys: unable to read the hardware clock
VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
devtmpfs: mounted
Freeing unused kernel memory: 192K (c04b2000 - c04e2000)
This architecture does not have kernel memory protection.
random: crng init done
IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
femac 10040000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
open_sys_config: loading out-of-tree module taints kernel.
FUNC:parse_sensor_clock line:125  SNS: is [sc223a]!
FUNC:parse_sensor_bus_type line:88  SNS is [sc223a]  !
==== online_flag=0, cmos_yuv_flag=0, sensor=sc223a, chip=gk7205v200, board=demo====
==== g_quick_start_flag=0 ====
sysconfig init success!
Module media: init ok
Media Memory Zone Manager
osal 1.0 init success!
gk7205v200_base: module license 'Proprietary' taints kernel.
Disabling lock debugging due to kernel taint
load sys.ko OK!
load region.ko OK!
load vgs.ko OK!
load vi.ko OK !
ISP Mod init!
load vpss.ko OK!
load chnl.ko OK!
load vedu.ko OK!
load rc.ko OK!
load venc.ko OK!
load h264e.ko OK!
load h265e.ko OK!
load jpege.ko OK!
load ive.ko OK!
Load sensor_spi.ko OK !
load mipi_rx driver successful!
register dev
Watchdog Timer: 0.01 initialized. default_margin=60 sec (nodeamon= 0)
wtdg init ok. ver=Apr 16 2024, 17:39:34.
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
goke-i2c 12060000.i2c: wait idle abort!, RIS: 0x611
nekromant commented 2 weeks ago
ioctl SPI_IOC_WR_MODE err, value = 11 ret = -1

Seen this stuff on one of my cams. Most likely due to weird spi flash and an error during sensor autodetect. Try running

fw_setenv sensor your_sensor

This may fix it, but if not (Just noticed teh comment above - it didn't) - please post majestic log. e.g.

killall majestic
majestic

This may give a hint. Folks in tg chat say there may be a soldering issue, so test it on stock if possible and if it doesn't work - carefully reflow. Just don't go too high. Plastic connectors on the cam are very low-temp,