Coder Social home page Coder Social logo

Comments (5)

widgetii avatar widgetii commented on July 4, 2024

Proposed example doesn't work on cameras:

# /utils/spi_id /dev/spidev0.0
response(7): 00 00 00 00 00 00 
# /utils/spi_id /dev/spidev1.0
response(7): ff ff ff ff ff ff 
# /utils/spi_id /dev/spidev1.1
response(7): ff ff ff ff ff ff 

from ipctool.

widgetii avatar widgetii commented on July 4, 2024

One approach could be parse dmesg output but needed more examples for different hardware:

original cv300
# dmesg | grep hisi_spi_nor.0
hisi-sfc hisi_spi_nor.0: lk=>8, 0x800000.
hisi-sfc hisi_spi_nor.0: mx25l12835f (16384 Kbytes)
hisi-sfc hisi_spi_nor.0: lk=>7, 0x400000.

ev300
# dmesg | grep hisi_spi_nor.0
hisi-sfc hisi_spi_nor.0: SPI Nor ID Table Version 1.2
hisi-sfc hisi_spi_nor.0: (Fast) Read:  opcode=3Bh, protocol=112, mode=0, wait=8
hisi-sfc hisi_spi_nor.0: xm_w25q128fv,w25q128jv (Chipsize 16 Mbytes, Blocksize 64KiB)

ev200
# dmesg | grep hisi_spi_nor.0
hisi-sfc hisi_spi_nor.0: SPI Nor ID Table Version 1.2
hisi-sfc hisi_spi_nor.0: (Fast) Read:  opcode=3Bh, protocol=112, mode=0, wait=8
hisi-sfc hisi_spi_nor.0: xm_xt25f64b-s (Chipsize 8 Mbytes, Blocksize 64KiB)

18ev100
Spi id table Version 1.22
Hisilicon Spi Flash Controller V350 Device Driver, Version 1.10
Spi(cs1) ID: 0xC2 0x20 0x18 0xC2 0x20 0x18
SPI FLASH start_up_mode is 3 Bytes
Spi(cs1): 
Block:64KB 
Chip:16MB 
Name:"MX25L128XX"
spi size: 16MB
chip num: 1
2 cmdlinepart partitions found on MTD device hi_sfc
Creating 2 MTD partitions on "hi_sfc":
0x000000000000-0x000000300000 : "boot"
0x000000300000-0x000001000000 : "rootfs"

16ev100+imx307:
# dmesg | grep hisi_spi_nor.0
hisi-sfc hisi_spi_nor.0: lk=>10, 0x780000.
hisi-sfc hisi_spi_nor.0: xm25q64hig (8192 Kbytes)

16ev200+imx307:
# dmesg | grep hisi_spi_nor.0
hisi-sfc hisi_spi_nor.0: SPI Nor ID Table Version 1.2
hisi-sfc hisi_spi_nor.0: (Fast) Read:  opcode=3Bh, protocol=112, mode=0, wait=8
hisi-sfc hisi_spi_nor.0: xm_w25q64fv,w25q64jv (Chipsize 8 Mbytes, Blocksize 64KiB)

from ipctool.

widgetii avatar widgetii commented on July 4, 2024
dmesg | grep hisi_spi_nor.0

ev300
hisi-sfc hisi_spi_nor.0: SPI Nor ID Table Version 1.2
hisi-sfc hisi_spi_nor.0: (Fast) Read:  opcode=3Bh, protocol=112, mode=0, wait=8
hisi-sfc hisi_spi_nor.0: xm_w25q128fv,w25q128jv (Chipsize 16 Mbytes, Blocksize 64KiB)

ev200
hisi-sfc hisi_spi_nor.0: SPI Nor ID Table Version 1.2
hisi-sfc hisi_spi_nor.0: (Fast) Read:  opcode=3Bh, protocol=112, mode=0, wait=8
hisi-sfc hisi_spi_nor.0: xm_w25q64fv,w25q64jv (Chipsize 8 Mbytes, Blocksize 64KiB)

ev100
hisi-sfc hisi_spi_nor.0: lk=>6, 0x400000.
hisi-sfc hisi_spi_nor.0: w25q64/s25fl064k (8192 Kbytes)

from ipctool.

widgetii avatar widgetii commented on July 4, 2024
/tmp # cat /proc/cpuinfo 
processor       : 0
model name      : ARM926EJ-S rev 5 (v5l)
BogoMIPS        : 398.13
Features        : swp half fastmult edsp java 
CPU implementer : 0x41
CPU architecture: 5TEJ
CPU variant     : 0x0
CPU part        : 0x926
CPU revision    : 5

Hardware        : Hisilicon Hi3516cv300 (Flattened Device Tree)
Revision        : 0000
Serial          : 0000000000000000

/tmp # dmesg | grep hisi_spi_nor.0
hisi-sfc hisi_spi_nor.0: all blocks is unlocked.
hisi-sfc hisi_spi_nor.0: gd25q128 (16384 Kbytes)

from ipctool.

widgetii avatar widgetii commented on July 4, 2024

Added XM specific ioctl calls to obtain SPI NOR chip name and id in 81d3e84

Also, ipc_chip_info has code to implement a basic dmesg regex finder which will be probably added further

from ipctool.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.