ITE i2c smbus read and write for IT8xxx ec
Description
hi, i watch somewhere in another github project (zephyrproject) + yt video + aliexpress. there are way to read or write EC of ITE ec IT8xxx series. there are source code / linux program written in C. the folder name is IT81202 Linux Flash Tool. you can found it in here https://www.ite.com.tw/en/product/cate2/IT81202 . the read and write use something like download board with IT8390 ec in the board. there are company which sell that (XZZ) using same programmer as the link i attach above. i am too dumb to learn the source code, but i guess, the IT8390 is only used for USB to i2c, uart, serial/parallel port. the bus speed is 400kbps i guess. i dont have donor board to test it(board with ITE ec), and change the VID and PID of the source code and change it with ch341a vid and pid and run the test.
Usage tips
- Please use the 👍 reaction to show that you are interested into this.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this.
- Subscribe to receive notifications on status change and new comments, you can do also without add comment.
this is the ITE download board,
https://github.com/c0d3z3r0/i2ite this project use FT232H which supported in USBASp-flash, written in python
there also iteflash.cc in here https://chromium.googlesource.com/chromiumos/platform/ec/+/HEAD/util
How ITE EC reflashing works An ITE EC is reflashed using a Servo by:
- Sending special non-I2C waveforms over its I2C clock and data lines, to enable a debug mode / direct firmware update (DFU) mode.
- Communicating with it using I2C, including transferring the actual EC image over I2C. The ITE EC will only respond over I2C after receiving the special waveforms.
the special waveform is available in i2ite py file
https://chromium.googlesource.com/chromiumos/platform/ec/+/refs/heads/main/docs/ite-ec-reflashing.md this is how it work
first thing how it work; the pc send a bit bangs waveform to the board with ITE ec to enable Direct Firmware Upgrade via SDA and SCL. i attach the what definition of that waveform. if the ch341a can send that bitbangs waveform, i guess ch341 can program the ITE ec,
@ndarjo It's all good. What I can't figure out is, what do you want from me?
If you are interested in how the CH341A handles I2C - setarcos has the shortest code.
Also you can be see CH341aTool written by Tomek-o or my SFP-master
what i want from you is, can you integrate it into the imsprog?
I don't think the general public would be interested in a very specific microcontroller. Besides, I don't have such a chip in stock. And without verification it is ineffective to write anything.
i mean help me to prove, can the sda and scl in the ch341a make a that spesific waveform. actually, the ITE EC chip is used by many laptop like asus/lenovo. but if you didnt have that chip, it will be hard to write
I don't think the standard I2C interface will allow you to do this, but I think you can do it in GPIO mode - change level values of pins independently, as it is done in IMSProg and SNANDer to work with 93C46/93C56/93C66 chips... (MicroWire). In this case you will have to write your own I2C exchange... But the speed of operation will be very slow.
yeah. sure. that what the official programmer of ITE chip done. it send non i2c signal in sda and scl to make the ITE ec chip get into direct firmware upgrade then accept the firmware we send via i2c protocol after we send the non i2c signal. the non i2c signal in scl is 100khz and in sda is 200khz. do you think it is possible to make the sda and scl pin in ch341a act as gpio and run at that frequency?
this is that non i2c waveform
Not as it works now in IMSProg. The communication speed is much slower.
ah okay, actually the signal is only one way(the destination didnt need to respond back). from the pc with ch341 will send that waveform to the other mainboard with IT EC via i2c interface. so based on your experience, it is not possible to make that wavefrom in that frequency using ch341a? if it true, then i ican try to get one ft232h and try improve the code available.
I think the ft232h has a lot more features than the CH341a. But it is more expensive and less popular....
true. thats also my problem, couldnt buy ft232h in my country. thank you so much for answering. i will try to figure it out
I would be interested in this as well. Currently supported IT programmers starts from about 600AUD
Also more and more laptops we receive for a repair comes with blown SuperIO ic. Similiar to BIOS flash we need to reprogram them once replaced. Having an ability to program via one interface and one tool would be absolutely awesome. 💯
@ndarjo have you had any luck?
No, I haven't done that yet...
@bigbigmdm Happy to test on my end if you have spare time.
https://github.com/c0d3z3r0/i2ite/issues/3 there are working code for ft232h in here. modify by codezero
Hola , estoy trabajando en lo mismo , por ejemplo su uso un RT809H, realizo una lectura , y sin desconectar nada coloco un esp32 , escaneo y aparecen mas direcciones i2c , como son las 0x79 la cual al leer esta el firmware del ITE y puede ser leido , pero sin usar el RT809h antes es imposible , el problema es emular con un esp32 el bitbaring necesario para poder poner el ITE en modo KING , mediante la secuencia que muestran las diferentes liberias , pero aun no lo he logrado.