(Phil) Some cleaning up and documentation.

git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@461 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Philip Edelbrock committed 1999-05-12 05:17:04 +00:00
1 parent e2eaa8a9a4
commit f55a86c7db
5 files changed
+170 -13

No files matched your search

+2 -2
View File
@@ -56,8 +56,8 @@ I2C := 1
# Uncomment the second line if you are a developer. This will enable many
# additional warnings at compile-time
WARN := 0
#WARN := 1
#WARN := 0
WARN := 1
# Uncomment the second line if you want to get (loads of) debug information.
# Not recommended, unless you are actually debugging the code
+71
View File
@@ -0,0 +1,71 @@
Kernel driver `i2c-voodoo3.o'
Status: 'Beta' and still under development and testing
Supported adapters:
* 3dfx Voodoo3 based cards
* Voodoo Banshee based cards?
Author: Frodo Looijaard <frodol@dds.nl>, Philip Edelbrock
<phil@netroedge.com>, and Ralph Metzler
<rjkm@thp.uni-koeln.de>
Main contact: Philip Edelbrock <phil@netroedge.com>
The code is based upon Ralph's test code (he did the hard stuff ;')
Module Parameters
-----------------
(none)
Description
-----------
The 3dfx Voodoo3 chip contains an I2C interface/driver (aka a I2C 'master'
or 'host'). The intent by 3dfx was to allow manufacturers to add extra
chips to the video card such as a TV-out chip such as the BT869 or possibly
even I2C based temperature sensors like the ADM1021 or LM75.
The 'feature' set of this driver is based on the i2c-piix4 (SMBus)
features. I.e., SMBus byte reads and writes, as well as detected faults in
transmission. Quick reads/writes, block transactions, word transactions,
are yet unwritten but are probably not too hard to add.
Stability
---------
Seems to be stable on the test machine, but needs more testing on other
machines.
Supported Devices
-----------------
Specifically, this driver was written and tested on the '3dfx Voodoo3 AGP
3000' which has a tv-out feature (s-video or composite). According to the
docs and discussions, this code should work for any Voodoo3 based cards as
well as Voodoo Banshee based cards. Voodoo Banshee cards, however, are not
probed or detected until I can find a test user to help out in the testing,
so please contact me (phil@netroedge.com) if you have a Banshee and want
to help.
Features
--------
This driver controls the I2C controller of the Voodoo3 chip. 'byte read'
transactions and 'data_byte write' transactions are supported, but all else
is not (but is probably easy to add if the need arises).
Issues
------
Probably many, but it seems to work OK on my system. :')
External Device Connection
--------------------------
The digital video input jumpers give availability to the I2C bus.
Specifically, pins 13 and 25 (bottom row middle, and bottom right-end) are
the I2C clock and I2C data lines, respectively. +5V and GND are probably
also easily available making the addition of extra I2C/SMBus devices easy
to implement.
+94
View File
@@ -0,0 +1,94 @@
Kernel driver `bt869.o'
======================
Status: 'Beta' and needs further development and testing
Supported chips:
* Brooktree BT869 Video Modulator chips
Prefix: `bt869'
Addresses scanned: I2C 0x44 - 0x45 (inclusive)
Datasheet: Publicly available at the brooktree web site
(www.brooktree.com)
Author: Frodo Looijaard <frodol@dds.nl>, Philip Edelbrock
<phil@netroege.com> and Ralph Metzler <rjkm@thp.uni-koeln.de>
Main Contact: Philip Edelbrock <phil@netroedge.com>
Module Parameters
-----------------
* force: short array (min = 1, max = 48)
List of adapter,address pairs to boldly assume to be present
* force_bt869: short array (min = 1, max = 48)
List of adapter,address pairs which are unquestionably assumed to contain
a `bt869' chip
* ignore: short array (min = 1, max = 48)
List of adapter,address pairs not to scan
* ignore_range: short array (min = 1, max = 48)
List of adapter,start-addr,end-addr triples not to scan
* probe: short array (min = 1, max = 48)
List of adapter,address pairs to scan additionally
* probe_range: short array (min = 1, max = 48)
List of adapter,start-addr,end-addr triples to scan additionally
Description
-----------
This driver provides some access to the Brooktree bt869 found on some video
cards (like the 'Voodoo3 3000'). Typically, the output can be either an
s-video connection or composite video. Resolutions supported using the
chip's built in configurations are 640x480 or 800x600. Other possible
implementations may allow for double resolutions with some decimations
(e.g., a monitor running at 1280x960 but the TV out getting every other
pixel for 640x480).
Driver Features
---------------
Stanards: (US) NTSC or PAL (PAL untested)
Resultions: 640x480 and 800x600
Depths: 16 bit or 32 (I forgot if 24 bit worked OK, it probably does)
Colorbars: Switch on the built-in color bar generator. (FYI- using a blue
filter, you should see only alternating bright stripes of equal brightness.
Adjust your TV's color and saturation if this isn't the case.)
In your XF86Config file, you should have these entries for NTSC output:
ModeLine "640x480NTSC" 28.195793 640 656 658 784 480 520 525 600
ModeLine "800x600NTSC" 38.769241 800 812 814 880 600 646 649 735
or for PAL (untested),
ModeLine "640x480PAL" 29.50 640 675 678 944 480 530 535 625
ModeLine "800x600PAL" 36.00 800 818 820 960 600 653 655 750
Also, don't forget to add these modes to the resolutions list in the
'screen' sections of XF86Config. You can change modes on the fly in X by
pressing (usually) ctrl-alt-+ or ctrl-alt-(minus) with + and - being the
keys on your numeric 10-key pad.
BTW- My monitor doesn't like these entries very much, and as I've read:
don't run your monitor out of spec or else it will burst into fire. So,
having the monitor turned on while in any of these modes is at your own
risk. (I've never heard of a monitor breaking from this, but it seems to
be fashionable to warn about it.)
Chip Features
-------------
The chip is very flexible and customizable for many standards. Right now
the driver sticks with the chip's built in NTSC and PAL standards. It also
does some other wacky stuff like closed-captioning, Macro-vision
copy-protection, and other things. Check out the datasheet for more info.
Issues
------
The depth register doesn't seem to do much? If you have troubles or
aren't sure the output is working, turn the color-bars on. If they display
OK, then the chip is syncing correctly. The next thing to try is the depth
setting. Lastly, turning off your computer and back on with your TV
connected but you monitor not, may force the video card to configure and
use the BT869 as your primary output device (all bets are off once X is
started). Let me know if you have problems which you can't figure out
(phil@netroedge.com).
+2 -4
View File
@@ -52,8 +52,6 @@
#define PCI_DEVICE_ID_3DFX_VOODOO3 0x05
#endif
/* insmod parameters */
static int voodoo3_init(void);
static int voodoo3_cleanup(void);
static int voodoo3_setup(void);
@@ -72,7 +70,7 @@ static unsigned int state=0xcf980020;
static unsigned char *mem;
static int v3_num;
inline outlong(int off,unsigned int dat)
inline void outlong(int off,unsigned int dat)
{
*((unsigned int*)(mem+off))=dat;
}
@@ -83,7 +81,7 @@ inline unsigned int readlong(int off)
return *((unsigned int*)(mem+off));
}
inline out(void)
inline void out(void)
{
outlong(0x78,state);
udelay(10);
+1 -7
View File
@@ -86,7 +86,6 @@ static int bt869_command(struct i2c_client *client, unsigned int cmd,
void *arg);
static void bt869_inc_use (struct i2c_client *client);
static void bt869_dec_use (struct i2c_client *client);
static u16 swap_bytes(u16 val);
static int bt869_read_value(struct i2c_client *client, u8 reg);
static int bt869_write_value(struct i2c_client *client, u8 reg, u16 value);
static void bt869_status(struct i2c_client *client, int operation, int ctl_name,
@@ -155,7 +154,7 @@ int bt869_attach_adapter(struct i2c_adapter *adapter)
/* This function is called by sensors_detect */
int bt869_detect(struct i2c_adapter *adapter, int address, int kind)
{
int i,cur,conf,hyst,os;
int i,cur;
struct i2c_client *new_client;
struct bt869_data *data;
int err=0;
@@ -309,11 +308,6 @@ void bt869_dec_use (struct i2c_client *client)
#endif
}
u16 swap_bytes(u16 val)
{
return (val >> 8) | (val << 8);
}
/* All registers are byte-sized.
bt869 uses a high-byte first convention, which is exactly opposite to
the usual practice. */