Enable the ADT7463 hwmon on relevant boards

The kernel driver says that the chip should have been configured by BIOS
in case it's wired for two-wire fans, and that there's little point in
exporting a userspace configuration interface for this. We don't have
BIOS and we generally do not want to modify U-Boot for stuff that can be
handled outside of the bootloader. Patching kernel for this sounds like
a stupid idea, so the best remaining option is probably to just let the
userspace do this soon enough.

It should be possible to handle additional products (HW different from
CL-ROADMv2) by simply adding extra ConditionKernelCommandLine= stanzas.

In future when we support more mainboards, we should somehow accommodate
for possibly different bus numbers (env file?). Let's just get this done
for now. All changes are in /usr, so we can easily overwrite them via a
RAUC update, anyway.

Change-Id: I95eced7746e4f2048f6a7fdbd8bbcd2e4ddce882
diff --git a/board/czechlight/common/overlay/usr/lib/systemd/system/cla-i2c-adt7463.service b/board/czechlight/common/overlay/usr/lib/systemd/system/cla-i2c-adt7463.service
new file mode 100644
index 0000000..31ddb28
--- /dev/null
+++ b/board/czechlight/common/overlay/usr/lib/systemd/system/cla-i2c-adt7463.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Configure the I2C ADT7463 for two-wire fans
+ConditionKernelCommandLine=|czechlight=CL-ROADMv2
+Before=sysrepod.service
+
+[Service]
+Type=oneshot
+# Configuration for two-fire fans
+ExecStart=/sbin/i2cset -y 1 0x2e 0x73 0x0f 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
diff --git a/board/czechlight/common/overlay/usr/lib/systemd/system/multi-user.target.wants/cla-i2c-adt7463.service b/board/czechlight/common/overlay/usr/lib/systemd/system/multi-user.target.wants/cla-i2c-adt7463.service
new file mode 120000
index 0000000..d04e70e
--- /dev/null
+++ b/board/czechlight/common/overlay/usr/lib/systemd/system/multi-user.target.wants/cla-i2c-adt7463.service
@@ -0,0 +1 @@
+../cla-i2c-adt7463.service
\ No newline at end of file