Sunday, October 28, 2012

Fixing the Linux Camera Driver on an AllWinner A13 Tablet (Part 2)

This is a continuation of Part 1 Now we solder some very fine wires to the ends of the 0402 resistors on the camera's I2C bus. You can see an american penny in the image for scale.
Now we can use a multimeter to probe the pins on the A13 to find out which pins the camera's I2C bus are connected to.
Interesting... Probing has not gone as expected and the two locations which I thought were I2C lines do not seem to be directly connected to the pins on the A13 CPU. OK, time to do some systematic checking of the pins. From the configuration file for the tablet, it looks like the following pins should be connected
Pixel Clock  - E00 (114) *
Clock        - E01 (115) *
HSYNC        - E02 (116)
VSYNC        - E03 (117)
D0           - E04 (118) *
D1           - E05 (119) *
D2           - E06 (120) *
D3           - E07 (121) *
D4           - E08 (122) *
D5           - E09 (123) *
D6           - E10 (124) *
D7           - E11 (125) *
RESET        - Power3 (No idea what this means)
POWER_ENABLE - NC
STANDBY      - B10 (10)
As best as I can figure out after probing with a multimeter for two hours, the pins from the camera connector (pin 1 nearest the edge of the pcb) are connected to the following:
#1  - NC      
#2  - POWER    
#3  - [160] PB18 / TWI2_SDA  (I2C Data)
#4  - No Idea 
#5  - [161] PB17 / TWI2_SCK  (I2C Clock)
#6  - No Idea, but has a pullup resistor
#7  - No Idea
#8  - [01] PB10 (Standby)
#9  - No Idea
#10 - (Filter Capacitor)
#11 - (Filter Capacitor)
#12 - [125] D7
#13 - [114] PIXEL CLOCK
#14 - [124] D6
#15 - No Idea
#16 - [123] D5
#17 - [115] CLOCK
#18 - [122] D4
#19 - [118] D0
#20 - [121] D3
#21 - [119] D1
#22 - [120] D2
#23 - GND
#24 - GND
Which means I have soldered wires to the wrong place. It looks like the I2C pullup resistors are actually located very close the the CPU. It's going to be a tight squeeze, but what can you do. Here is a shot of the correct placement of the I2C debug wires on the pullup resistors next to the CPU.
On a side note, I think my tablet may have counterfeit memory chips (not really surprised). I had electrical tape over the memory chips to hold down some wires and when I removed the tape, the markings came off the chips and stuck to the electrical tape.

DISASTER! I seem to have broken something. I suspect when I pulled the tape off the DDR RAM, it broke a solder joint underneath the chip. All I get now is
HELLO! BOOT0 is starting!
boot0 version : 1.3.0
initializing SDRAM Fail.
I think my only choice is to attempt to reflow the memory chip with a heat gun. That's it for now. Check in for Part 3 if I can get it working again.

4 comments:

  1. Wow, tough luck. What trouble were you having with the camera driver? On our PengPod1000 the camera drivers load, link up with v4l but then when the capture programs we have tested call it up there is a kernel crash. I hadn't looked into it up but I was rooting for your success :-)

    We have a project to offer pre-installed Linux on Allwinner tablets and devices, the PengPod, http://www.pengpod.com. Also we have pre-orders available on http://www.indiegogo.com/pengpod. The devices will support XBMC with hardware decoding, Plasma active and more right out of the box.

    I hope you will help spread the word.

    Thanks.

    ReplyDelete
    Replies
    1. Your project looks really interesting. Best of luck to you on it!

      On my A13 tablet, the csi driver wasn't able to communicate with the camera in Linux but could in android. I was planning on sniffing the I2C bus and comparing the outputs of the two to modify the csi driver to make it work.

      I've run into a few issues with the camera driver on the A10 tablets before crashing the kernel which is very similar to what you are seeing. Which kernel crash are you getting?

      Delete
  2. Hello Lawrence, I recently had a problem with my android tablet and found your blog about the I2C camera and touch screen controller / driver fix you did. I posted my problem on www.freaktab.com (http://www.freaktab.com/showthread.php?11750-Tablet-TITAN-PC7007ME-with-Rockchip-RK2906-has-touch-screen-Goodnix-gt811-inverted-everything-else-works-OK&highlight=rk2906) hoping it was a software problem, but apparently, it is NOT a software but a hardware problem.

    It seems that in my attempts to flash a working ROM, I flashed one which reprogrammed the goodix GT811 chip and now one of the touchscreen axes is inverted. My question is if there is a way to reprogram that GT811 either by building hardware or using some software technique. Is there any way you could help?

    Thank you very much

    ReplyDelete
  3. Hi i am Jayson Gomez


    im always subscribe in your blog and it is so awsome :)

    you have idea about my allwinner i am resseller allwinner tablet here in philippines

    may customer problem is forget pattern lock,password,to many pattern attemps

    but the usb debugging is disable in developer option ... i can't wipe data using adb

    you have sulotion to remove password,gmail problem etc, or enable usb debugging so that i can wipe using adb in allwinner a13 ?

    using your tools? i'm willing to pay if you have sulotion becuase that is the main problem in my shop

    i can't flash using livesuite becuase the rom are not compatible sometimes inverted touchscreen,,gsensor error, camera error etc :(

    hope you have sulotion to enable usb debugging :)

    thanks god blese ..

    you can contact me at

    Facebook : https://www.facebook.com/jayhan14
    Yahoo : PrinceDevs@yahoo.com

    ReplyDelete