# http://rptl.io/configtxt
# vim: ft=config tw=76

# WATTER Apollo Config
gpio=14=op,dh
dtparam=i2c_arm=on

# Built-in watchdog hardware
dtparam=watchdog=on

dtoverlay=i2c1-pi5,pins_2_3
dtoverlay=i2c2-pi5,pins_4_5
dtoverlay=i2c3-pi5,pins_6_7

# I2C GPIO expander
dtoverlay=i2c-gpio,bus=5,i2c_gpio_sda=12,i2c_gpio_scl=13

arm_boost=0
dtparam=audio=off
camera_auto_detect=0

# Automatically load overlays for detected DSI displays
display_auto_detect=1

# Automatically load initramfs files, if found
auto_initramfs=1

# Enable DRM VC4 V3D driver
# XXX: Disabling this somehow disables the i2c-gpio expander - BenC
dtoverlay=vc4-kms-v3d,noaudio
max_framebuffers=2

# Don't have the firmware create an initial video= setting in cmdline.txt.
# Use the kernel's default instead.
disable_fw_kms_setup=1

# Run in 64-bit mode
arm_64bit=1

# Disable compensation for displays with overscan
disable_overscan=1

### Board Specific Rules ###

## Apollo rev1 boards
[boot_arg1=0]
# I/O Expander
dtoverlay=mcp23017,addr=0x20,noints,i2c2

# Enable the RTC device, disable rpi_rtc that isn't battery backed
dtoverlay=i2c-rtc,pcf85363,addr=0x51,i2c2
dtparam=rtc=off

# WATTER overlay. Includes TMP116 and EMC2303 and GPIO names
dtoverlay=watter-apollo-rev1

# ADC for Thermistors
dtoverlay=ad7998,addr=0x23,i2c2
# ADC for Current Sense
dtoverlay=ad7998,addr=0x24,i2c2

## Squid boards
[boot_arg1=1]
dtoverlay=watter-squid
dtparam=rtc=on
