I would like to rise up topic into the following direction: Lets try to 
dump currently loaded firmware for GSL1680 on Adroid.

>From the theory on https://linux-sunxi.org/GSL1680

Chip is located on I2C bus on 0x040 address
Firmware is reading/writing from/into chip via set of chunks, each 128 byte.
Number of the chunk is located in the oxF0 register
"0xF0: PAGE register. Contains the memory page number currently mapped in 
the 0x00-0x7F registers. "
Current chunk is located inside set of registers:0x00-0x7F: these registers 
are used to load portions of the firmware 
Im my case physical device is tablet Chuwi Vi8 super (Baytrail z2735f with 
8" 1280x800) under Android 4.4.x and with GSL1680 located at /dev/i2c-4 
I2C  bus. 

So my question to community is - what are EXACT commands to READ currently 
loaded FW intro the GSL1680.


What I have tried based on Sergio Costas recommendations: 

Variant 1: Using i2cset and i2cget 
Step 1) Setting Page Register=number of chunk to be read, lets say I read 
5th chunk

i2cset -f -y 4 0x040 0xf0 0x05 b

Step 2) Reading 128 bytes chunk( 0-127 registers)
actually I wrote script, but the main idea is read each register separately

the command for reading register data I have used:  lets say I would like 
to read the last 128th byte of the chunk - its address is 0x7F

i2cread -f -y 4 0x040 0x7F b

Variant 2: using i2cset and i2cdump

 Step 1) Setting Page Register=number of chunk to be read, lets say I read 
5th chunk

i2cset -f -y 4 0x040 0xf0 0x05 b

Step 2) Read all chunk at once

i2cdump -f -y 4 0x040 -r 0x00-0x7F b


PROBLEMS:  Variant1: On the running Android with working touch screen very 
often I could NOT read via i2cget data and more over repeating reading 
makes NO RESULT. For example 
i2cset -f -y 4 0x040 0xf0 0x05 b

i2cread -f -y 4 0x040 0x00 b - OK
i2cread -f -y 4 0x040 0x01 b - error - repeat - OK
i2cread -f -y 4 0x040 0x02 b - error -repeat - OK
i2cread -f -y 4 0x040 0x03 b - error -repeat-eror - stuch with this! :(

Variant 2: 
         On the running Android with working touch screen
on the step2 = i2cdump -f -y 4 0x040 -r 0x00-0x7F b    
it returns portion of data but on the screen there are many XX bytes  (byte 
with value XX)- that I do not even know what it is - is it not able to read 
or something like forced conversion non displayed  hex value to displaying 
symbols inside i2cdump during outputing to terminal?


So ASSUMING: Is these variants correct? May be it should be done in another 
way? Why there are such problems and how to read existing loaded FW?  - I 
need to dump it all.

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to