zephyr/tests/drivers/build_all/adc/app.overlay
Jordan Montgomery a7014d01da drivers: adc: Add support for TI ADS1112 ADCs
This PR adds a custom driver for the ADS1112 ADCs. Unlike ADS1113/4/5
family served by the ADS1x1x driver, the ADS1112 does not use an address
pointer to address config registers. Instead, there is only one writable
register and all i2c writes will set it. The registers resemble the
ADS1119 device, but config bitmap is different, include a distinct data
rate table, gain table, and input multiplexing table. There is also not a
status register to be monitored with the ADS1112, as it uses config bit 7
for the same purpose instead of a separate register.

The driver was tested on hardware using the ADC shell interface. Manual
probing validated the voltages for the MUX_SINGLE configs at datarate 15
in CM_SINGLE. Higher gains were not tested and CM_CONTINUOUS is not
supported in this initial implementation.

The new driver has also been added to the existing ADC test using adc_emul
for completeness.

Origin: original
License: Apache 2.0
Purpose: Adding support for ADS1112 ADCs

Signed-off-by: Jordan Montgomery <jordan.montgomery@getcruise.com>
2023-06-17 07:49:59 -04:00

202 lines
4.3 KiB
Text

/*
* Copyright (c) 2020, Linaro Ltd.
*
* SPDX-License-Identifier: Apache-2.0
*
* Application overlay for testing driver builds
*
* Names in this file should be chosen in a way that won't conflict
* with real-world devicetree nodes, to allow these tests to run on
* (and be extended to test) real hardware.
*/
/ {
test {
#address-cells = <1>;
#size-cells = <1>;
adc_emul {
compatible = "zephyr,adc-emul";
nchannels = <2>;
ref-internal-mv = <3300>;
ref-external1-mv = <5000>;
#io-channel-cells = <1>;
status = "okay";
};
test_gpio: gpio@deadbeef {
compatible = "vnd,gpio";
gpio-controller;
reg = <0xdeadbeef 0x1000>;
#gpio-cells = <0x2>;
status = "okay";
};
test_i2c: i2c@11112222 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "vnd,i2c";
reg = <0x11112222 0x1000>;
status = "okay";
clock-frequency = <100000>;
test_i2c_ads1013: ads1013@0 {
compatible = "ti,ads1013";
reg = <0x0>;
#io-channel-cells = <1>;
};
test_i2c_ads1014: ads1014@1 {
compatible = "ti,ads1014";
reg = <0x1>;
#io-channel-cells = <1>;
};
test_i2c_ads1015: ads1015@2 {
compatible = "ti,ads1015";
reg = <0x2>;
#io-channel-cells = <1>;
};
test_i2c_ads1113: ads1113@3 {
compatible = "ti,ads1113";
reg = <0x3>;
#io-channel-cells = <1>;
};
test_i2c_ads1114: ads1114@4 {
compatible = "ti,ads1114";
reg = <0x4>;
#io-channel-cells = <1>;
};
test_i2c_ads1115: ads1115@5 {
compatible = "ti,ads1115";
reg = <0x5>;
#io-channel-cells = <1>;
};
test_i2c_ads1119: ads1119@6 {
compatible = "ti,ads1119";
reg = <0x6>;
#io-channel-cells = <1>;
};
test_i2c_ads1112: ads1112@7 {
compatible = "ti,ads1112";
reg = <0x7>;
#io-channel-cells = <1>;
};
};
test_spi: spi@33334444 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "vnd,spi";
reg = <0x33334444 0x1000>;
status = "okay";
clock-frequency = <2000000>;
/* one entry for every devices at spi.dtsi */
cs-gpios = <&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>;
test_spi_mcp3204: mcp3204@0 {
compatible = "microchip,mcp3204";
reg = <0>;
spi-max-frequency = <0>;
#io-channel-cells = <1>;
};
test_spi_lmp90077: lmp90077@1 {
compatible = "ti,lmp90077";
reg = <0x1>;
spi-max-frequency = <0>;
drdyb-gpios = <&test_gpio 0 0>;
#io-channel-cells = <2>;
};
test_spi_lmp90078: lmp90078@2 {
compatible = "ti,lmp90078";
reg = <0x2>;
spi-max-frequency = <0>;
drdyb-gpios = <&test_gpio 0 0>;
#io-channel-cells = <2>;
};
test_spi_lmp90079: lmp90079@3 {
compatible = "ti,lmp90079";
reg = <0x3>;
spi-max-frequency = <0>;
drdyb-gpios = <&test_gpio 0 0>;
#io-channel-cells = <2>;
};
test_spi_lmp90080: lmp90080@4 {
compatible = "ti,lmp90080";
reg = <0x4>;
spi-max-frequency = <0>;
drdyb-gpios = <&test_gpio 0 0>;
#io-channel-cells = <2>;
};
test_spi_lmp90097: lmp90097@5 {
compatible = "ti,lmp90097";
reg = <0x5>;
spi-max-frequency = <0>;
drdyb-gpios = <&test_gpio 0 0>;
#io-channel-cells = <2>;
};
test_spi_lmp90098: lmp90098@6 {
compatible = "ti,lmp90098";
reg = <0x6>;
spi-max-frequency = <0>;
drdyb-gpios = <&test_gpio 0 0>;
#io-channel-cells = <2>;
};
test_spi_lmp90099: lmp90099@7 {
compatible = "ti,lmp90099";
reg = <0x7>;
spi-max-frequency = <0>;
drdyb-gpios = <&test_gpio 0 0>;
#io-channel-cells = <2>;
};
test_spi_lmp90100: lmp90100@8 {
compatible = "ti,lmp90100";
reg = <0x8>;
spi-max-frequency = <0>;
drdyb-gpios = <&test_gpio 0 0>;
#io-channel-cells = <2>;
};
test_spi_ads7052: ads7052@9 {
compatible = "ti,ads7052";
reg = <0x9>;
spi-max-frequency = <12000000>;
#io-channel-cells = <1>;
};
test_spi_ads114s08: ads114s08@9 {
compatible = "ti,ads114s08";
reg = <0x9>;
spi-max-frequency = <0>;
#io-channel-cells = <1>;
reset-gpios = <&test_gpio 0 0>;
drdy-gpios = <&test_gpio 0 0>;
start-sync-gpios = <&test_gpio 0 0>;
};
};
};
};