// SPDX-License-Identifier: GPL-2.0 OR MIT
//
// Device Tree Source for General Electric B1x5v2
// patient monitor series
//
// Copyright 2018-2021 General Electric Company
// Copyright 2018-2021 Collabora

#include <dt-bindings/input/input.h>
#include "imx6dl-b1x5pv2.dtsi"

/ {
	reg_3v3_acm: regulator-3v3-acm {
		compatible = "regulator-fixed";
		regulator-name = "3V3 ACM";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		regulator-always-on;
		vin-supply = <&reg_3v3>;
	};
};

&i2c1 {
	tca6416: gpio-controller@21 {
		compatible = "ti,tca6416";
		reg = <0x21>;
		gpio-controller;
		#gpio-cells = <2>;
		reset-gpios = <&tca6424a 9 GPIO_ACTIVE_LOW>;
		vcc-supply = <&reg_3v3_acm>;
		gpio-line-names = "ACM1_EN", "ACM1_CL0", "ACM1_CL1", "ACM1_CL2",
				  "", "ACM2_EN", "ACM2_CL0", "ACM2_CL1",
				  "ACM2_CL2", "", "", "",
				  "", "", "", "";

		/*
		 * The interrupt pin is connected to &tca6424a pin 1, but the Linux
		 * TCA6424 driver cannot handle low type interrupts at the moment
		 * (and support cannot be added without some ugly hacks). Since this
		 * controller does not have any input type GPIOs, just pretend
		 * that the interrupt pin is unconnected.
		 */
	};
};

&i2c5 {
	mpl3115a2: pressure-sensor@60 {
		compatible = "fsl,mpl3115";
		reg = <0x60>;

		/*
		 * The MPL3115 interrupts are connected to pin 22 and 23
		 * of &tca6424a, but the binding does not yet support
		 * interrupts.
		 */
	};
};