https://github.com/kasbert/tw9992-linux
Linux driver for Renesas TW9992
https://github.com/kasbert/tw9992-linux
cvbs-decode linux-kernel mipi-csi raspberry-pi rpi-camera tw9992
Last synced: 8 days ago
JSON representation
Linux driver for Renesas TW9992
- Host: GitHub
- URL: https://github.com/kasbert/tw9992-linux
- Owner: kasbert
- License: gpl-2.0
- Created: 2025-04-01T01:44:32.000Z (10 months ago)
- Default Branch: rpi-6.12.y
- Last Pushed: 2025-11-09T15:25:36.000Z (3 months ago)
- Last Synced: 2025-11-09T17:24:48.450Z (3 months ago)
- Topics: cvbs-decode, linux-kernel, mipi-csi, raspberry-pi, rpi-camera, tw9992
- Language: C
- Homepage:
- Size: 694 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tw9992-linux
Linux driver for Renesas TW9992
The

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:


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