Skip to content

kasbert/tw9992-linux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tw9992-linux

Linux driver for Renesas TW9992

The TW9992 is a low Power NTSC/PAL Video Decoder with Differential CVBS Inputs and MIPI-CSI2 Output Interface.

It can be connected to Raspberry Pi camera interface or other MIPI-CSI2 receiver.

To compile and install:

cd driver
make crash

There is a test program in src/fb.c. It works on console framebuffer. Just gcc fb.c and ./a.out

There are special v4l controls "setaddr", "getreg" and "setreg". You can use them to peek and poke i2c registers. For example get value of register 3

v4l2-ctl -c setaddr=0x03; v4l2-ctl -C getreg | sed 's/getreg:/obase=2;/' | bc
1101001

bc did not display value 0 on bit 7, meaning "0 = Video detected."

Register 3 bits:

Bit Description
7 VDLOSS R 1 = Video not present. (Sync is not detected in number of line periods specified by MISSCNT register)
0 = Video detected.
6 HLOCK R 1 = Horizontal sync PLL is locked to the incoming video source.
0 = Horizontal sync PLL is not locked.
5 SLOCK R 1 = Subcarrier PLL is locked to the incoming video source.
0 = Subcarrier PLL is not locked.
4 FIELD R 1 = Even field is being decoded.
0 = Odd field is being decoded.
3 VLOCK R 1 = Vertical logic is locked to the incoming video source.
0 = Vertical logic is not locked.
2 Reserved R Reserved -
1 MONO R 1 = No color burst signal detected.
0 = Color burst signal detected.
0 DET50 R 0 = 60Hz source detected
1 = 50Hz source detected

Get the datasheet for register info.

Example module for Raspberry Pi:

Image

Schematics

An EasyEDA project can be found in https://oshwlab.com/jarkko.sonninen/tw9992-pmod-1-0

About

Linux driver for Renesas TW9992

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published