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

Commit 712d7e74 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ARM: dts: msm: Add virtio spmi and pmic gpios on sa6155p and sa8155 VMs"

parents 4bfc2e37 ff4d0c76
Loading
Loading
Loading
Loading
+38 −0
Original line number Diff line number Diff line
QTI Virtio SPMI controller (Virtio PMIC Arbiter)

The Virtio SPMI PMIC Arbiter is a frontend proxy based on backend virtio device.

Required properties:
- compatible : should be "qcom,viospmi-pmic-arb".
- #address-cells : must be set to 2
- #size-cells : must be set to 0
- interrupt-controller : boolean indicator that the PMIC arbiter is an interrupt controller
- #interrupt-cells :  must be set to 4. Interrupts are specified as a 4-tuple:
    cell 1: slave ID for the requested interrupt (0-15)
    cell 2: peripheral ID for requested interrupt (0-255)
    cell 3: the requested peripheral interrupt (0-7)
    cell 4: interrupt flags indicating level-sense information, as defined in
            dt-bindings/interrupt-controller/irq.h

Example Virtio PMIC-Arbiter:

     spmi_bus: qcom,spmi {
         compatible = "qcom,viospmi-pmic-arb";
         interrupt-names = "periph_irq";
         interrupts = <GIC_SPI 481 IRQ_TYPE_NONE>;
         qcom,ee = <0>;
         #address-cells = <2>;
         #size-cells = <0>;
         interrupt-controller;
         #interrupt-cells = <4>;
         cell-index = <0>;
     };

     viospmi: virtio-spmi@c440000 {
         compatible = "virtio,mmio";
         #address-cells = <1>;
         #size-cells = <1>;
         reg = <0xc440000 0x1100>;
         interrupts = <GIC_SPI 100 IRQ_TYPE_NONE>;
         status = "okay";
     };
+49 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2019, 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 <dt-bindings/input/input.h>
#include <dt-bindings/input/qcom,qpnp-power-on.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/spmi/spmi.h>
#include <dt-bindings/iio/qcom,spmi-vadc.h>

&spmi_bus {
	qcom,pm6155@0 {
		compatible = "qcom,spmi-pmic";
		reg = <0x0 SPMI_USID>;
		#address-cells = <2>;
		#size-cells = <0>;

		pm6155_1_gpios: pinctrl@c000 {
			compatible = "qcom,spmi-gpio";
			reg = <0xc000 0xa00>;
			interrupts = <0x0 0xc0 0 IRQ_TYPE_NONE>,
					<0x0 0xc1 0 IRQ_TYPE_NONE>,
					<0x0 0xc2 0 IRQ_TYPE_NONE>,
					<0x0 0xc3 0 IRQ_TYPE_NONE>,
					<0x0 0xc4 0 IRQ_TYPE_NONE>,
					<0x0 0xc5 0 IRQ_TYPE_NONE>,
					<0x0 0xc6 0 IRQ_TYPE_NONE>,
					<0x0 0xc7 0 IRQ_TYPE_NONE>,
					<0x0 0xc8 0 IRQ_TYPE_NONE>,
					<0x0 0xc9 0 IRQ_TYPE_NONE>;
			interrupt-names = "pm6155_1_gpio1", "pm6155_1_gpio2",
					  "pm6155_1_gpio3", "pm6155_1_gpio4",
					  "pm6155_1_gpio5", "pm6155_1_gpio6",
					  "pm6155_1_gpio7", "pm6155_1_gpio8",
					  "pm6155_1_gpio9", "pm6155_1_gpio10";
			gpio-controller;
			#gpio-cells = <2>;
		};
	};
};
+77 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2019, 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 <dt-bindings/clock/qcom,rpmh.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/input/qcom,qpnp-power-on.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/spmi/spmi.h>
#include <dt-bindings/iio/qcom,spmi-vadc.h>

&spmi_bus {
	qcom,pm8150@0 {
		compatible = "qcom,spmi-pmic";
		reg = <0x0 SPMI_USID>;
		#address-cells = <2>;
		#size-cells = <0>;

		pm8150_gpios: pinctrl@c000 {
			compatible = "qcom,spmi-gpio";
			reg = <0xc000 0xa00>;
			interrupts = <0x0 0xc0 0 IRQ_TYPE_NONE>,
					<0x0 0xc2 0 IRQ_TYPE_NONE>,
					<0x0 0xc3 0 IRQ_TYPE_NONE>,
					<0x0 0xc5 0 IRQ_TYPE_NONE>,
					<0x0 0xc8 0 IRQ_TYPE_NONE>,
					<0x0 0xc9 0 IRQ_TYPE_NONE>;
			interrupt-names = "pm8150_gpio1", "pm8150_gpio3",
					"pm8150_gpio4", "pm8150_gpio6",
					"pm8150_gpio9", "pm8150_gpio10";
			gpio-controller;
			#gpio-cells = <2>;
			qcom,gpios-disallowed = <2 5 7 8>;
		};
	};
};

&pm8150_gpios {
	key_home {
		key_home_default: key_home_default {
			pins = "gpio1";
			function = "normal";
			input-enable;
			bias-pull-up;
			power-source = <0>;
		};
	};

	storage_sd_detect {
		storage_cd_default: storage_cd_default {
			pins = "gpio4";
			function = "normal";
			input-enable;
			bias-pull-up;
			power-source = <0>;
		};
	};

	key_vol_up {
		key_vol_up_default: key_vol_up_default {
			pins = "gpio6";
			function = "normal";
			input-enable;
			bias-pull-up;
			power-source = <1>;
		};
	};
};
+22 −0
Original line number Diff line number Diff line
@@ -248,4 +248,26 @@
		compatible = "qcom,vm-restart";
		status = "ok";
	};

	spmi_bus: qcom,spmi {
		compatible = "qcom,viospmi-pmic-arb";
		interrupt-names = "periph_irq";
		interrupts = <GIC_SPI 481 IRQ_TYPE_NONE>;
		qcom,ee = <0>;
		qcom,channel = <0>;
		#address-cells = <2>;
		#size-cells = <0>;
		interrupt-controller;
		#interrupt-cells = <4>;
		cell-index = <0>;
	};

	viospmi: virtio-spmi@1c800000 {
		compatible = "virtio,mmio";
		#address-cells = <1>;
		#size-cells = <1>;
		reg = <0x1c800000 0x1100>;
		interrupts = <GIC_SPI 43 IRQ_TYPE_NONE>;
		status = "okay";
	};
};
+1 −0
Original line number Diff line number Diff line
@@ -323,6 +323,7 @@
#include "sa6155p-vm-usb.dtsi"
#include "sa8155-vm-audio.dtsi"
#include "sa6155p-vm-pcie.dtsi"
#include "pm6155-vm.dtsi"

&tlmm {
	dirconn-list =  <100 216 1>,
Loading