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

Commit 36587ce7 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ARM: dts: msm: Add slimbus instance for KONA"

parents 2df621c7 ab8bf96b
Loading
Loading
Loading
Loading
+0 −50
Original line number Diff line number Diff line
SLIM(Serial Low Power Interchip Media Bus) bus

SLIMbus is a 2-wire bus, and is used to communicate with peripheral
components like audio-codec.

Required property for SLIMbus controller node:
- compatible	- name of SLIMbus controller

Child nodes:
Every SLIMbus controller node can contain zero or more child nodes
representing slave devices on the bus. Every SLIMbus slave device is
uniquely determined by the enumeration address containing 4 fields:
Manufacturer ID, Product code, Device index, and Instance value for
the device.
If child node is not present and it is instantiated after device
discovery (slave device reporting itself present).

In some cases it may be necessary to describe non-probeable device
details such as non-standard ways of powering up a device. In
such cases, child nodes for those devices will be present as
slaves of the SLIMbus controller, as detailed below.

Required property for SLIMbus child node if it is present:
- reg		- Should be ('Device index', 'Instance ID') from SLIMbus
		  Enumeration  Address.
		  Device Index Uniquely identifies multiple Devices within
		  a single Component.
		  Instance ID Is for the cases where multiple Devices of the
		  same type or Class are attached to the bus.

- compatible	-"slimMID,PID". The textual representation of Manufacturer ID,
	 	  Product Code, shall be in lower case hexadecimal with leading
		  zeroes suppressed

SLIMbus example for Qualcomm's slimbus manager component:

	slim@28080000 {
		compatible = "qcom,apq8064-slim", "qcom,slim";
		reg = <0x28080000 0x2000>,
		interrupts = <0 33 0>;
		clocks = <&lcc SLIMBUS_SRC>, <&lcc AUDIO_SLIMBUS_CLK>;
		clock-names = "iface", "core";
		#address-cells = <2>;
		#size-cell = <0>;

		codec: wcd9310@1,0{
			compatible = "slim217,60";
			reg = <1 0>;
		};
	};
+97 −0
Original line number Diff line number Diff line
 Qualcomm Technologies,Inc SLIMBUS controller
 Qualcomm Technologies,Inc implements 2 type of slimbus controllers:
1. "qcom,slim-msm": This controller is used if applications processor
	driver is controlling slimbus master component. This driver is
	responsible for communicating with slave HW directly using
	messaging interface, and doing data channel management. Driver
	also communicates with satellite component (driver implemented
	by other execution environment, such as ADSP) to get its
	requirements for data channel and bandwidth requirements.
2. "qcom,slim-ngd": This controller is used if applications processor
	driver is controlling slimbus satellite component (also known as
	Non-ported Generic Device, or NGD). This is light-weight slimbus
	controller responsible for communicating with slave HW directly
	over bus messaging interface, and communicating with master component
	(driver residing on other execution environment, such as ADSP)
	for bandwidth and data channel management.

Required properties:

 - reg : Offset and length of the register region(s) for the device
 - reg-names : Register region name(s) referenced in reg above
	 Required register resource entries are:
	 "slimbus_physical": Physical adderss of controller register blocks
	 "slimbus_bam_physical": Physical address of Bus Access Module (BAM)
				 for this controller
 - compatible : should be "qcom,slim-msm" if this is master component driver
 - compatible : should be "qcom,slim-ngd" if this is satellite component driver
 - cell-index : SLIMBUS number used for this controller
 - interrupts : Interrupt numbers used by this controller
 - interrupt-names : Required interrupt resource entries are:
	"slimbus_irq" : Interrupt for SLIMBUS core
	"slimbus_bam_irq" : Interrupt for controller core's BAM

Optional property:
 - reg entry for slew rate : If slew rate control register is provided, this
	 entry should be used.
 - reg-name for slew rate: "slimbus_slew_reg"
 - qcom,min-clk-gear : Minimum clock gear at which this controller can be run
		 (range: 1-10)
		 Default value will be 1 if this entry is not specified
 - qcom,max-clk-gear: Maximum clock gear at which this controller can be run
		 (range: 1-10)
		 Default value will be 10 if this entry is not specified
 - qcom,rxreg-access: This boolean indicates that slimbus RX should use direct
		 register access to receive data. This flag is only needed if
		 BAM pipe is not available to receive data from slimbus
 - qcom,apps-ch-pipes: This value represents BAM pipe-mask used by application
		 processor for data channels. If this property is not defined,
		 default mask of 0 is used indicating that application
		 processor does not use BAM pipes for data channels.
 - qcom,ea-pc: This value represents product code (PC) field of enumeration
		 address (EA) for the QTI slimbus controller hardware.
		 This value is needed if data-channels originating from apps
		 are to be used, so that application processor can query
		 logical address of the ported generic device to be used.
		 Other than PC, fields of EA are same across platforms.
 - qcom,slim-mdm: This value provides the identifier of slimbus component on
		 external mdm. This property enables the slimbus driver to
		 register and receive subsytem restart notification from mdm
		 and follow appropriate steps to ensure communication on the bus
		 can be resumed after mdm-restart.
 - qcom,subsys-name: This value provides the subsystem name where slimbus master
		 is present. This property enables the slimbus driver to
		 register and receive subsytem restart notification from subsystem
		 and follow appropriate steps to ensure communication on the bus
		 can be resumed after subsytem restart. By default slimbus driver
		 register with ADSP subsystem.
 - qcom,iommu-s1-bypass: Boolean flag to bypass IOMMU stage 1 translation.

Optional subnodes:
qcom,iommu_slim_ctrl_cb : Child node representing the Slimbus controller
                          context bank.

Subnode Required properties:
- compatible : Must be "qcom,slim-ctrl-cb";
- iommus : A list of phandle and IOMMU specifier pairs that
           describe the IOMMU master interfaces of the device.

Example:
	slim@fe12f000 {
		cell-index = <1>;
		compatible = "qcom,slim-msm";
		reg = <0xfe12f000 0x35000>,
		      <0xfe104000 0x20000>;
		reg-names = "slimbus_physical", "slimbus_bam_physical";
		interrupts = <0 163 0 0 164 0>;
		interrupt-names = "slimbus_irq", "slimbus_bam_irq";
		qcom,min-clk-gear = <10>;
		qcom,rxreg-access;
		qcom,apps-ch-pipes = <0x60000000>;
		qcom,ea-pc = <0x30>;

		iommu_slim_ctrl_cb: qcom,iommu_slim_ctrl_cb {
			compatible = "qcom,iommu-slim-ctrl-cb";
			iommus = <&apps_smmu 0x1 0x0>;
		};
	};
+0 −84
Original line number Diff line number Diff line
Qualcomm SLIMBus Non Generic Device (NGD) Controller binding

SLIMBus NGD controller is a light-weight driver responsible for communicating
with SLIMBus slaves directly over the bus using messaging interface and
communicating with master component residing on ADSP for bandwidth and
data-channel management

Please refer to slimbus/bus.txt for details of the common SLIMBus bindings.

- compatible:
	Usage: required
	Value type: <stringlist>
	Definition: must be "qcom,slim-ngd-v<MAJOR>.<MINOR>.<STEP>"
	must be one of the following.
	"qcom,slim-ngd-v1.5.0" for MSM8996
	"qcom,slim-ngd-v2.1.0" for SDM845

- reg:
	Usage: required
	Value type: <prop-encoded-array>
	Definition: must specify the base address and size of the controller
		    register space.
- dmas
	Usage: required
	Value type: <array of phandles>
	Definition: List of rx and tx dma channels

- dma-names
	Usage: required
	Value type: <stringlist>
	Definition: must be "rx" and "tx".

- interrupts:
	Usage: required
	Value type: <prop-encoded-array>
	Definition: must list controller IRQ.

#address-cells
	Usage: required
	Value type: <u32>
	Definition: Should be 1, reflecting the instance id of ngd.

#size-cells
	Usage: required
	Value type: <u32>
	Definition: Should be 0

= NGD Devices
Each subnode represents an instance of NGD, must contain the following
properties:

- reg:
	Usage: required
	Value type: <u32>
	Definition: Should be instance id of ngd.

#address-cells
	Usage: required
	Refer to slimbus/bus.txt for details of the common SLIMBus bindings.

#size-cells
	Usage: required
	Refer to slimbus/bus.txt for details of the common SLIMBus bindings.

= EXAMPLE

slim@91c0000 {
	compatible = "qcom,slim-ngd-v1.5.0";
	reg = <0x91c0000 0x2c000>;
	interrupts = <0 163 0>;
	dmas =	<&slimbam 3>, <&slimbam 4>;
	dma-names = "rx", "tx";
	#address-cells = <1>;
	#size-cells = <0>;
	ngd@1 {
		reg = <1>;
		#address-cells = <1>;
		#size-cells = <1>;
		codec@1 {
			compatible = "slim217,1a0";
			reg  = <1 0>;
		};
	};
};
+0 −39
Original line number Diff line number Diff line
Qualcomm SLIMbus controller
This controller is used if applications processor driver controls SLIMbus
master component.

Required properties:

 - #address-cells - refer to Documentation/devicetree/bindings/slimbus/bus.txt
 - #size-cells	- refer to Documentation/devicetree/bindings/slimbus/bus.txt

 - reg : Offset and length of the register region(s) for the device
 - reg-names : Register region name(s) referenced in reg above
	 Required register resource entries are:
	 "ctrl": Physical address of controller register blocks
 	 "slew": required for "qcom,apq8064-slim" SOC.
 - compatible : should be "qcom,<SOC-NAME>-slim" for SOC specific compatible
 		followed by "qcom,slim" for fallback.
 - interrupts : Interrupt number used by this controller
 - clocks : Interface and core clocks used by this SLIMbus controller
 - clock-names : Required clock-name entries are:
	"iface" : Interface clock for this controller
	"core" : Interrupt for controller core's BAM

Example:

	slim@28080000 {
		compatible = "qcom,apq8064-slim", "qcom,slim";
		reg = <0x28080000 0x2000>, <0x80207C 4>;
		reg-names = "ctrl", "slew";
		interrupts = <0 33 0>;
		clocks = <&lcc SLIMBUS_SRC>, <&lcc AUDIO_SLIMBUS_CLK>;
		clock-names = "iface", "core";
		#address-cells = <2>;
		#size-cell = <0>;

		wcd9310: audio-codec@1,0{
			compatible = "slim217,60";
			reg = <1 0>;
		};
	};
+22 −0
Original line number Diff line number Diff line
@@ -595,6 +595,28 @@
	thermal_zones: thermal-zones {
	};

	slim_aud: slim@3ac0000 {
		cell-index = <1>;
		compatible = "qcom,slim-ngd";
		reg = <0x3ac0000 0x2c000>,
			<0x3a84000 0x2c000>;
		reg-names = "slimbus_physical", "slimbus_bam_physical";
		interrupts = <0 163 0>, <0 164 0>;
		interrupt-names = "slimbus_irq", "slimbus_bam_irq";
		qcom,apps-ch-pipes = <0x700000>;
		qcom,ea-pc = <0x2d0>;
		status = "disabled";
		qcom,iommu-s1-bypass;

		iommu_slim_aud_ctrl_cb: qcom,iommu_slim_ctrl_cb {
			compatible = "qcom,iommu-slim-ctrl-cb";
			iommus = <&apps_smmu 0x1826 0x0>,
				 <&apps_smmu 0x182f 0x0>,
				 <&apps_smmu 0x1830 0x1>;
			status = "disabled";
		};
	};

	intc: interrupt-controller@17a00000 {
		compatible = "arm,gic-v3";
		#interrupt-cells = <3>;