Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3d1593e8 authored by Vidyasagar Pasmel's avatar Vidyasagar Pasmel Committed by Gerrit - the friendly Code Review server
Browse files

ARM: dts: msm: Move IO-Expander to specific dtsi file for APQ8017



Move IO-expander nodes configuration to dtsi specific file
for resolving the build conflict.

Change-Id: Ia1655cf473689e2e2123f959979f8bb5b86100df
Signed-off-by: default avatarVidyasagar Pasmel <vpasme@codeaurora.org>
parent ecb24cf6
Loading
Loading
Loading
Loading
+95 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2015-2017, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * only version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

#include "msm8917-pinctrl.dtsi"
#include "msm8917-camera-sensor-cdp.dtsi"

&soc {
	usbhub_vbus_vreg: usbhub_vbus_vreg {
		compatible = "regulator-fixed";
		regulator-name = "usbhub_vbus_vreg";
		gpio = <&ioexp_gpios 3 0>;
		enable-active-high;
	};

	usbeth_vbus_vreg: usbeth_vbus_vreg {
		compatible = "regulator-fixed";
		regulator-name = "usbeth_vbus_vreg";
		gpio = <&ioexp_gpios 7 0>;
		enable-active-high;
		vin-supply = <&usbhub_vbus_vreg>;
	};
};

/* SX1509q i/o expander */
&i2c_2 {
	status = "ok";
	ioexp2_gpios: sx150x@3e {
		status = "ok";
		compatible = "sx1509q";
		#gpio-cells = <2>;
		gpio-controller;
		reg = <0x3e>; /* I2C Client Addr */
		sx150x,pullup_ena = <0x0>;
		sx150x,pulldn_ena = <0x0>;
		sx150x,float_ena = <0x00>;
		sx150x,polarity = <0x0>;
		sx150x,gpio_base= <300>;
	};
};

/* SX1508q i/o expander */
&i2c_4 {
	status = "ok";
	ioexp_gpios: sx150x@20 {
		status = "ok";
		compatible = "sx1508q";
		#gpio-cells = <2>;
		gpio-controller;
		reg = <0x20>; /* I2C Client Addr */
		sx150x,pullup_ena = <0x0>;
		sx150x,pulldn_ena = <0x0>;
		sx150x,float_ena = <0x00>;
		sx150x,polarity = <0x0>;
		sx150x,gpio_base = <200>;
		vdd-supply = <&pm8917_l6>;
		qcom,vdd-max-voltage = <1800000>;
		qcom,vdd-min-voltage = <1800000>;
	};

	/* usb2533 flex hub */
	usb2533@2c {
		status = "disabled";
		compatible = "qcom,usb2533-flex-hub";
		reg = <0x2d>;
		vbus-supply = <&usbeth_vbus_vreg>;
		pinctrl-names = "default";
		pinctrl-0 = <&usb2533_hub_reset>;
		qcom,hub-reset-gpio = <&tlmm 100 0>;
		qcom,usbeth-reset-gpio = <&ioexp_gpios 5 0>;
	};
};

/* KS8851 eth over spi */
&spi_6 {
	status = "ok";
	ethernet@0 {
		status = "ok";
		compatible = "micrel,ks8851";
		reg = <1>;  /* CS-1 */
		interrupt-parent = <&tlmm>;
		interrupts = <97 0>;
		reset-gpios = <&ioexp_gpios 2 0>;
		spi-max-frequency = <40000000>;
	};
};
+1 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
#include "apq8017-no-pmi-cdp.dtsi"
#include "apq8017-rome.dtsi"
#include "apq8017-audio.dtsi"
#include "apq8017-io-expander-cdp.dtsi"

/ {
	model = "Qualcomm Technologies, Inc. APQ8017 CDP no-PMI \
+0 −77
Original line number Diff line number Diff line
@@ -78,21 +78,6 @@
		qcom,notify-host-mode;
		status = "disabled";
	};

	usbhub_vbus_vreg: usbhub_vbus_vreg {
		compatible = "regulator-fixed";
		regulator-name = "usbhub_vbus_vreg";
		gpio = <&ioexp_gpios 3 0>;
		enable-active-high;
	};

	usbeth_vbus_vreg: usbeth_vbus_vreg {
		compatible = "regulator-fixed";
		regulator-name = "usbeth_vbus_vreg";
		gpio = <&ioexp_gpios 7 0>;
		enable-active-high;
		vin-supply = <&usbhub_vbus_vreg>;
	};
};

&spi_3 { /* BLSP1 QUP3 */
@@ -264,65 +249,3 @@
	status = "ok";
};
/* SX1509q i/o expander */
&i2c_2 {
	status = "ok";
	ioexp2_gpios: sx150x@3e {
		status = "ok";
		compatible = "sx1509q";
		#gpio-cells = <2>;
		gpio-controller;
		reg = <0x3E>; /* I2C Client Addr */
		sx150x,pullup_ena = <0x0>;
		sx150x,pulldn_ena = <0x0>;
		sx150x,float_ena = <0x00>;
		sx150x,polarity = <0x0>;
		sx150x,gpio_base= <300>;
	};
};

/* SX1508q i/o expander */
&i2c_4 {
	status = "ok";
	ioexp_gpios: sx150x@20 {
		status = "ok";
		compatible = "sx1508q";
		#gpio-cells = <2>;
		gpio-controller;
		reg = <0x20>; /* I2C Client Addr */
		sx150x,pullup_ena = <0x0>;
		sx150x,pulldn_ena = <0x0>;
		sx150x,float_ena = <0x00>;
		sx150x,polarity = <0x0>;
		sx150x,gpio_base = <200>;
		vdd-supply = <&pm8917_l6>;
		qcom,vdd-max-voltage = <1800000>;
		qcom,vdd-min-voltage = <1800000>;
	};
	/* usb2533 flex hub */
	usb2533@2c {
		status = "disabled";
		compatible = "qcom,usb2533-flex-hub";
		reg = <0x2d>;
		vbus-supply = <&usbeth_vbus_vreg>;
		pinctrl-names = "default";
		pinctrl-0 = <&usb2533_hub_reset>;
		qcom,hub-reset-gpio = <&tlmm 100 0>;
		qcom,usbeth-reset-gpio = <&ioexp_gpios 5 0>;
	};
};

/* KS8851 eth over spi */
&spi_6 {
	status = "ok";
	ethernet@0 {
		status = "ok";
		compatible = "micrel,ks8851";
		reg = <1>;  /* CS-1 */
		interrupt-parent = <&tlmm>;
		interrupts = <97 0>;
		reset-gpios = <&ioexp_gpios 2 0>;
		spi-max-frequency = <40000000>;
	};
};