| [Unit] |
| Description=Configure the I2C ADT7463 for two-wire fans |
| ConditionKernelCommandLine=|czechlight=CL-ROADMv2 |
| ConditionKernelCommandLine=|czechlight=sdn-roadm-add-drop |
| ConditionKernelCommandLine=|czechlight=sdn-roadm-line |
| Before=sysrepod.service |
| |
| [Service] |
| Type=oneshot |
| |
| # Configuration for two-wire fans (0b1111) |
| ExecStart=/sbin/i2cset -y 1 0x2e 0x73 0x0f b |
| |
| # Set up the AC voltage threshold to: |
| # +/- 20mV: 0x00 (default) |
| # +/- 40mV: 0x04 |
| # +/- 80mV: 0x08 |
| # +/- 130mV: 0x0c |
| ExecStart=/sbin/i2cset -y 1 0x2e 0x7d 0x0c b |
| |
| # Pulses per revolution: |
| # 1: 0x00 |
| # 2: 0x55 (default) |
| # 3: 0xaa |
| # 4: 0xff |
| #ExecStart=/sbin/i2cset -y 1 0x2e 0x7b 0x55 b |
| |
| # Faster (250ms) period for TACH monitoring |
| ExecStart=/sbin/i2cset -y 1 0x2e 0x78 0x08 b |
| |
| # ADT7463: Register as an I2C device |
| ExecStart=/bin/sh -c 'echo adt7463 0x2e > /sys/bus/i2c/devices/i2c-1/new_device' |
| |
| [Install] |
| WantedBy=multi-user.target |