mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
overlays: add chipcap2 overlay
Support for the Amphenol Chipcap 2 humidity and temperature sensor has been added to the Linux kernel with v6.9. This I2C device provides three interrupt sources and requires a dedicated regulator to operate, which makes it a bit more complex than the current devices supported by i2c-sensor. Therefore, a dedicated file has been implemented. Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
This commit is contained in:
committed by
Dom Cobley
parent
7dc3407819
commit
549316ebf3
@@ -38,6 +38,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
|
||||
camera-mux-2port.dtbo \
|
||||
camera-mux-4port.dtbo \
|
||||
cap1106.dtbo \
|
||||
chipcap2.dtbo \
|
||||
chipdip-dac.dtbo \
|
||||
cirrus-wm5102.dtbo \
|
||||
cm-swap-i2c0.dtbo \
|
||||
|
||||
@@ -951,6 +951,21 @@ Load: dtoverlay=cap1106,<param>=<val>
|
||||
Params: int_pin GPIO pin for interrupt signal (default 23)
|
||||
|
||||
|
||||
Name: chipcap2
|
||||
Info: Enables the Chipcap 2 humidity and temperature sensor. This device
|
||||
provides low and high humidity alarms and requires a 3V3 dedicated
|
||||
regulator to operate.
|
||||
Load: dtoverlay=chipcap2,<param>=<val>
|
||||
Params: ready_pin GPIO pin for ready signal (default 4)
|
||||
|
||||
low_pin GPIO pin for low humidity signal (default 5)
|
||||
|
||||
high_pin GPIO pin for high humidity signal (default 6)
|
||||
|
||||
reg_pin GPIO pin to control the dedicated regulator
|
||||
that powers the device (default 26)
|
||||
|
||||
|
||||
Name: chipdip-dac
|
||||
Info: Configures Chip Dip audio cards.
|
||||
Load: dtoverlay=chipdip-dac
|
||||
|
||||
66
arch/arm/boot/dts/overlays/chipcap2-overlay.dts
Normal file
66
arch/arm/boot/dts/overlays/chipcap2-overlay.dts
Normal file
@@ -0,0 +1,66 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/* Overlay for ChipCap 2 on i2c */
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
|
||||
/ {
|
||||
compatible = "brcm,bcm2835";
|
||||
|
||||
fragment@0 {
|
||||
target = <&i2c1>;
|
||||
__overlay__ {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "okay";
|
||||
|
||||
chipcap2: chipcap2@28 {
|
||||
compatible = "amphenol,cc2d23s";
|
||||
reg = <0x28>;
|
||||
interrupt-parent = <&gpio>;
|
||||
interrupts = <4 IRQ_TYPE_EDGE_RISING>,
|
||||
<5 IRQ_TYPE_EDGE_RISING>,
|
||||
<6 IRQ_TYPE_EDGE_RISING>;
|
||||
interrupt-names = "ready", "low", "high";
|
||||
vdd-supply = <&chipcap2_reg>;
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fragment@1 {
|
||||
target = <&gpio>;
|
||||
__overlay__ {
|
||||
chipcap2_pins: chipcap2_pins {
|
||||
brcm,pins = <4 5 6 26>;
|
||||
brcm,function = <0 0 0 1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fragment@2 {
|
||||
target-path = "/";
|
||||
__overlay__ {
|
||||
chipcap2_reg: chipcap2_reg {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "chipcap2_reg";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
gpio = <&gpio 26 GPIO_ACTIVE_HIGH>;
|
||||
enable-active-high;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
__overrides__ {
|
||||
ready_pin = <&chipcap2>, "interrupts:0",
|
||||
<&chipcap2_pins>, "brcm,pins:0";
|
||||
low_pin = <&chipcap2>, "interrupts:8",
|
||||
<&chipcap2_pins>, "brcm,pins:4";
|
||||
high_pin = <&chipcap2>, "interrupts:16",
|
||||
<&chipcap2_pins>, "brcm,pins:8";
|
||||
reg_pin = <&chipcap2_reg>, "gpio:4",
|
||||
<&chipcap2_pins>, "brcm,pins:12";
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user