![]() |
PCA9532 - LED dimmerThe N2100 uses an I2C controller in the CPU to communicate with the PCA9532 LED driver. It can be accessed through the /dev/i2c-0 device. I use a simple C program to issue I2C_RDWR ioctl's. The PCA9532 registers are:
Default values while running Debian are 0x87 0xe1 0x31 0x80 0x00 0x80 0x00 0x00 0x00 0x08. Input register 1 toggles between 0x81 and 0xe1 because of the blinking LED. The four LED registers store two bits per LED: 00 for OFF 01 for ON 10 for PWM0 and 11 for PWM1.
The two blue HDD LEDs are not on this register but controlled from the SATA controller instead. The two green Network LEDs are controlled from the Ethernet controller. The eight unknown signals appear not to be pulled high when reading the input registers, and appear not to be connected when I measured them. This makes them ideal candidates for driving some expansion I/Os. The relevant pins on the IC are 7,8,9,10,14,15,16,17. The two switches on the front panel do not connect to the PCA9532. Be careful when writing to register 8, writing any value with the bottom two bits not both zero will turn off the power to the N2100. The device's datasheet is at http://www.nxp.com/acrobat_download/datasheets/PCA9532_3.pdf You can read out i2c by using i2cdump with ic2bus=0 and address 0x60 # i2cdump -y 0 0x60 and set values with i2cset (example register=0x09 bit=2 / orange LED off) # i2cset -y 0 0x60 0x09 0x00 You can replace 0x00 with 0x04 to turn the orange LED on, and 0x08 to make it blink. As a suggestion, you may want to add the above line in your /etc/init.d/rc.local to turn off the LED when the N2100 has correctly booted (like the original firmware does). Fintek F75375S hardware sensorA driver for the F75375S is in the Debian kernel. Chip temperatures can be read (in milidegrees) from /sys/devices/platform/IOP3xx-I2C.0/i2c-0/0-002e/temp{1,2}_input. Fan control is through /sys/devices/platform/IOP3xx-I2C.0/i2c-0/0-002e/pwm2 but seems unreasonably temperamental. My fan starts up at PWM value 63 and runs at near full speed at PWM value 80. Someone else reported a control range of 29-36. See N2100FanControl for a script to control the temperature automatically. Ricoh RS5C372 real-time clock
view ·
edit ·
print ·
history ·
Last edited by Rolland Dudemaine.
Based on work by Rolland Dudemaine, Tim Walter, and Frank Kingswood. Originally by Frank Kingswood. Page last modified on February 10, 2008, at 08:47 PM
|