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

Commit d494f5e8 authored by Shrey Vijay's avatar Shrey Vijay
Browse files

i2c-msm-v2: Add snapshot of I2C MSM V2 driver



This change adds a snapshot of I2C MSM V2 driver from the 4.4 branch.
kernel-4.4 baseline: 'e29d253ecf048
("msm: mdss: dsi: Remove redundant opmode configuration")'

Signed-off-by: default avatarShrey Vijay <shreyv@codeaurora.org>
Change-Id: Ie3edf0e8e00a27949d24c558dc30c0e39f43d4f8
parent 8322d814
Loading
Loading
Loading
Loading
+55 −0
Original line number Diff line number Diff line
Qualcomm I2C controller

Required properties:
 - reg : Offset and length of the register region for the device named in
	reg-names and has the same index.
 - reg-names : Register region name(s) referenced in reg above
	"qup_phys_addr" : Physical address of QUP register space.
 - compatible : should be "qcom,i2c-msm-v2"
 - interrupts : Interrupt number which correspond to the entry with the same
	index in interrupt-names.
 - interrupt-names: QUP core interrupt name(s) referenced in interrupts above
	"qup_irq" : QUP interrupt used by the controller.
 - dmas : DMA engine API's parameters for blsp.
	<[phandle of the dma controller] [pipe index] [number of descriptors]
				[sps_connect flags] [sps_register_event flags]>;
 - dma-names :  dma channel names.
 - qcom,clk-freq-out : Desired I2C bus clock frequency in Hz
 - qcom,clk-freq-in  : Supplied core clock frequency in Hz.

Required alias:
 - The desired bus-number is specified by an alias with the following format:
	'i2c{n}' where n is the bus number.

Optional property:
 - qcom,noise-rjct-scl : number of low samples on clock line to consider it low.
	When missing default to 0.
 - qcom,noise-rjct-sda : number of low samples on data  line to consider it low.
	When missing default to 0.
 - qcom,disable-dma : disables DMA transfer mode.
 - qcom,master-id : Master-port value used on voting for the clock path.
 - qcom,high-time-clk-div : high time divider value to configure clk-ctl
	register. When missing, default to the value given in driver.
 - qcom,fs-clk-div: fs divider value to configure clk-ctl register. When
	missing, default to the value given in driver.

Example:
	aliases {
		i2c10 = &i2c_10;
	};

	i2c_10: i2c@f9966000 {
		compatible = "qcom,i2c-msm-v2";
		reg-names = "qup_phys_addr", "dma_phys_addr";
		reg = <0xf9966000 0x1000>;
		interrupt-names = "qup_irq";
		interrupts = <0 104 0>;
		dmas = <&dma_blsp1 14 32 0x20000020 0x20>,
			<&dma_blsp1 15 64 0x20000020 0x20>;
		dma-names = "tx", "rx";
		qcom,clk-freq-out = <100000>;
		qcom,clk-freq-in  = <24000000>;
		qcom,noise-rjct-scl = <0>;
		qcom,noise-rjct-sda = <0>;

	};
+12 −0
Original line number Diff line number Diff line
@@ -1224,4 +1224,16 @@ config I2C_OPAL
	  This driver can also be built as a module. If so, the module will be
	  called as i2c-opal.

config I2C_MSM_V2
        tristate "I2C_MSM_V2"
        depends on ARCH_QCOM
        help
          If you say yes to this option, support will be included for the
          built-in I2C interface and its DMA engine on the MSM family
          processors.

          This driver can also be built as a module.  If so, the module
          will be called i2c-msm-v2.


endmenu
+1 −0
Original line number Diff line number Diff line
@@ -100,6 +100,7 @@ obj-$(CONFIG_I2C_XILINX) += i2c-xiic.o
obj-$(CONFIG_I2C_XLR)		+= i2c-xlr.o
obj-$(CONFIG_I2C_XLP9XX)	+= i2c-xlp9xx.o
obj-$(CONFIG_I2C_RCAR)		+= i2c-rcar.o
obj-$(CONFIG_I2C_MSM_V2)        += i2c-msm-v2.o

# External I2C/SMBus adapter drivers
obj-$(CONFIG_I2C_DIOLAN_U2C)	+= i2c-diolan-u2c.o
+3040 −0

File added.

Preview size limit exceeded, changes collapsed.

+666 −0

File added.

Preview size limit exceeded, changes collapsed.