#include "cinder-pmic-overlay.dtsi"
#include <dt-bindings/gpio/gpio.h>

&chosen {
	bootargs = "cpufreq.default_governor=performance msm_rtb.filter=0x237 reboot=w";
};

&soc {
	pcie_ep: qcom,pcie@48020000 {
		compatible = "qcom,pcie-ep";
		status = "ok";
	};

	vbus_supply_regulator: vbus_supply_regulator {
		compatible = "regulator-fixed";
		regulator-name = "vdd_supply";
		enable-active-high;
		gpio = <&tlmm 43 GPIO_ACTIVE_HIGH>;
		pinctrl-names = "default";
		pinctrl-0 = <&usb_vbus_boost_default>;
	};

	usb_conn_gpio: usb_conn_gpio {
		compatible = "gpio-usb-b-connector";
		vbus-gpio =  <&pm8150_gpios 7 GPIO_ACTIVE_HIGH>;
		id-gpio = <&tlmm 42 GPIO_ACTIVE_HIGH>;
		vbus-supply = <&vbus_supply_regulator>;

		pinctrl-names = "default";
		pinctrl-0 = <&usb_vbus_det_default
			     &usb_id_det_default>;

		port {
			usb_port0_connector: endpoint {
				remote-endpoint = <&usb_port0>;
			};
		};
	};
};

&usb0 {
	usb-role-switch;
	port {
		usb_port0: endpoint {
			remote-endpoint = <&usb_port0_connector>;
		};
	};
};

&qupv3_se5_i2c {
	clock-frequency = <400000>;
	status = "ok";

	exp0: gpio@21 {
		compatible = "ti,tca6408";
		reg = <0x21>;
		vcc-supply = <&L15A>;
		gpio-controller;
		#gpio-cells = <2>;
	};
};

&qupv3_se6_i2c {
	clock-frequency = <400000>;

	exp1: gpio@20 {
		compatible = "ti,tca6408";
		reg = <0x20>;
		interrupt-parent = <&intc>;
		interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
		vcc-supply = <&L15A>;
		gpio-controller;
		#gpio-cells = <2>;
		status = "disabled";
	};
};
