]> git.kernelconcepts.de Git - karo-tx-linux.git/log
karo-tx-linux.git
8 years agoMerge branch 'tracking-qcomlt-usb' into integration-linux-qcomlt
Srinivas Kandagatla [Thu, 14 Jan 2016 16:06:30 +0000 (16:06 +0000)]
Merge branch 'tracking-qcomlt-usb' into integration-linux-qcomlt

* tracking-qcomlt-usb:
  drivers: usb: Add bus scaling suppport
  usb: host: ehci-msm: Use posted data writes on AHB
  usb: chipidea: msm: Use posted data writes on AHB
  usb: phy: msm: Ensure that workers are initialized before use
  usb: phy: msm: Disable driver runtime PM
  usb: phy: msm: HACK: Make Vddc configuration optional
  usb: phy: msm: fix error handling in probe.

8 years agoMerge branch 'tracking-qcomlt-coresight' into integration-linux-qcomlt
Srinivas Kandagatla [Thu, 14 Jan 2016 16:06:29 +0000 (16:06 +0000)]
Merge branch 'tracking-qcomlt-coresight' into integration-linux-qcomlt

* tracking-qcomlt-coresight:
  coresight-etm3x: Add Qualcomm PTM v1.1 peripheral ID
  amba: Defer device peripheral ID read

8 years agoMerge branch 'tracking-qcomlt-tsens' into integration-linux-qcomlt
Srinivas Kandagatla [Thu, 14 Jan 2016 16:06:29 +0000 (16:06 +0000)]
Merge branch 'tracking-qcomlt-tsens' into integration-linux-qcomlt

* tracking-qcomlt-tsens:
  thermal: qcom: tsens-8960: Add support for 8960 family of SoCs
  thermal: qcom: tsens-8974: Add support for 8974 family of SoCs
  thermal: qcom: tsens-8916: Add support for 8916 family of SoCs
  thermal: qcom: tsens: Add a skeletal TSENS drivers

8 years agoMerge branch 'tracking-qcomlt-clk' into integration-linux-qcomlt
Srinivas Kandagatla [Thu, 14 Jan 2016 16:06:28 +0000 (16:06 +0000)]
Merge branch 'tracking-qcomlt-clk' into integration-linux-qcomlt

* tracking-qcomlt-clk: (27 commits)
  clk:gcc-msm8916: add missing mss_q6_bimc_axi clock
  soc: qcom: Add support for SAW2 regulators
  clk: qcom: Add A53 clock driver
  clk: qcom: Add support for regmap mux-div clocks
  clk: qcom: Add support for apq8084 RPM-SMD clocks
  clk: qcom: msm8974: Remove gfx3d clock from MMCC
  clk: qcom: Add support for msm8974 RPM-SMD clocks
  clk: qcom: Add support for RPM Clocks
  clk: qcom: Add support for SMD-RPM Clocks
  cpufreq: Add module to register cpufreq on Krait CPUs
  clk: qcom: Add Krait clock controller driver
  clk: qcom: Add KPSS ACC/GCC driver
  clk: qcom: Add support for Krait clocks
  clk: qcom: Add IPQ806X's HFPLLs
  clk: qcom: Add MSM8960/APQ8064's HFPLLs
  clk: qcom: Add HFPLL driver
  clk: qcom: Add support for High-Frequency PLLs (HFPLLs)
  clk: Add safe switch hook
  clk: mux: Split out register accessors for reuse
  clk: Avoid sending high rates to downstream clocks during set_rate
  ...

8 years agoMerge branch 'tracking-qcomlt-adv7511' into integration-linux-qcomlt
Srinivas Kandagatla [Thu, 14 Jan 2016 16:06:27 +0000 (16:06 +0000)]
Merge branch 'tracking-qcomlt-adv7511' into integration-linux-qcomlt

* tracking-qcomlt-adv7511:
  drm/i2c: adv7511: Init regulators
  drm/i2c: adv7511: fixup the dapm bias level access
  drm/i2c: adv7511: move to use reg_sequence
  HACK: drm/i2c: adv7511: Remove hotplug event handling
  drm/i2c: adv7511: Enable the audio data and clock pads on adv7533
  drm/i2c: adv7511: Add Audio support.
  drm/i2c: adv7511: Move the common data structures to header file
  drm/i2c: adv7511: Change DSI lanes dynamically
  drm/i2c: adv7511: Use internal timing generator
  drm/i2c: adv7511: setup CEC registers during power off-power-on sequence
  drm/i2c: adv7511: Create mipi_dsi_device for ADV7533
  drm/i2c: adv7511: Add drm_bridge/connector for ADV7533
  drm/i2c: adv7511: Refactor encoder slave functions
  drm/i2c: adv7511: Initial support for adv7533
  drm/i2c: adv7511: Fix mutex deadlock when interrupts are disabled
  drm/mipi_dsi: Get DSI host by DT device node
  drm/mipi_dsi: Create dummy DSI devices
  drm/mipi_dsi: check for used channels
  drm/mipi_dsi: refactor device creation

8 years agoMerge branch 'tracking-qcomlt-arm64' into integration-linux-qcomlt
Srinivas Kandagatla [Thu, 14 Jan 2016 16:06:27 +0000 (16:06 +0000)]
Merge branch 'tracking-qcomlt-arm64' into integration-linux-qcomlt

* tracking-qcomlt-arm64:
  arm64: fixup for mm renames
  arm64: dma-mapping: map sg lists into the SMMU as virtually contiguous
  arm64: dma-mapping: fix DMA_ATTR_STRONGLY_ORDERED in __get_dma_pgprot
  arm64: mm: Fix a bug in iommu dma-mapping
  arm64: dma-mapping: add support for IOMMU mapper
  arm64: Add support for DMA_ATTR_STRONGLY_ORDERED
  arm: Add option to skip buffer zeroing
  common: DMA-mapping: Add strongly ordered memory attribute
  arm64: defconfig: add qcom specifics
  arm64: qcom: add cpu operations
  arm64: smp: move the pen to a header file
  arm64: introduce CPU_OF_TABLES for cpu ops selection
  devicetree: bindings: Document qcom,msm-id and qcom,board-id
  arm64: defconfig: qcom: Enable restart driver
  ARM: cpuidle: Add cpuidle support for QCOM cpus

8 years agoMerge branch 'tracking-qcomlt-adm-dma' into integration-linux-qcomlt
Srinivas Kandagatla [Thu, 14 Jan 2016 16:06:26 +0000 (16:06 +0000)]
Merge branch 'tracking-qcomlt-adm-dma' into integration-linux-qcomlt

* tracking-qcomlt-adm-dma:
  dmaengine: adm: Start next DMA even if there is no ongoing transaction
  dmaengine: adm: Don't reset controller during probe
  dmaengine: adm: Use 'soft' flush when stopping DMA
  dmaengine: adm: Fix ADM hardware descriptor creation when flow control is enabled
  dmaengine: Add ADM driver
  dt/bindings: qcom_adm: Fix channel specifiers

8 years agoMerge branch 'tracking-qcomlt-iommu' into integration-linux-qcomlt
Srinivas Kandagatla [Thu, 14 Jan 2016 16:06:26 +0000 (16:06 +0000)]
Merge branch 'tracking-qcomlt-iommu' into integration-linux-qcomlt

* tracking-qcomlt-iommu: (25 commits)
  iommu: qcom: v1: move iommu-sec pgtable allocation
  pci: use new of_dma_configure* apis
  iommu/msm: Fix "scheduling while atomic" bug
  drm/msm: temp: Add a check to be compatible against both iommuv0/v1
  iommu: of: Handle IOMMU lookup failure with deferred probing or error
  iommu: of: Document the of_iommu_configure() function
  drivers: platform: Configure dma operations at probe time
  of: dma: Split of_configure_dma() into mask and ops configuration
  of: dma: Make of_dma_deconfigure() public
  of: dma: Move range size workaround to of_dma_get_range()
  arm: dma-mapping: Don't override dma_ops in arch_setup_dma_ops()
  temp: Add dummy msm_iommu_get_ctx and fix broken build
  iommu/msm: Set cacheability attributes without tex remap
  iommu/msm: Add support for generic master bindings
  iommu/msm: Move the contents from msm_iommu_dev.c to msm_iommu.c
  iommu/msm: Add DT adaptation
  DOWNSTREAM: drm/msm: use downstream iommu
  qcom: iommu: Make use of domain_alloc and domain_free
  arm64: provide dma cache routines with same API as 32 bit
  iommu: msm: Invalidate properly from iommu_unmap
  ...

8 years agoMerge branch 'tracking-qcomlt-apq8016-dt' into integration-linux-qcomlt
Srinivas Kandagatla [Thu, 14 Jan 2016 16:06:25 +0000 (16:06 +0000)]
Merge branch 'tracking-qcomlt-apq8016-dt' into integration-linux-qcomlt

* tracking-qcomlt-apq8016-dt: (72 commits)
  arm64: dts: add spmi prefix to regulators
  arm64: dts: move smem node after the soc node
  arm64: dts: apq8016-sbc: add regulators support
  arm64: dts: qcom: apq8016-sbc: Limit MPP4 high state to 1.8V
  arm64: dts: qcom: apq8016-sbc: Add Volume Down definitions
  arm64: dts: qcom: apq8016-sbc: Add Volume Up key device node
  arm64: dts: Align msm8916 cpu thermal trip point ranges
  arm64: msm8916-mdss.dtsi: Add bus scaling properties for mdp
  arm64: apq8016-sbc.dtsi: Add regulators needed by adv7533
  dts: arm64: qcom: apq8016-sbc: enable vidc and vidc-rproc
  dts: arm64: msm8916: add vidc dt nodes
  arm64: dts: Add rpm_log support
  arm64: dts: usb: Add bus scaling suppport
  arm64: dt: Add msm bus nodes
  WIP:dts: arm64: add q6v5 pil support
  wcn36xx: Update DT to support wcn36xx wifi driver
  arm64: dts: remove the #if 0 around bluetooth
  arm64: dts: Fix the hypervisor and tz memory region size
  dts: qcom: Add CoreSight components for MSM8916
  arm64: dts: qcom: Add msm8916 CoreSight components
  ...

8 years agoMerge branch 'tracking-qcomlt-apq8064-dt' into integration-linux-qcomlt
Srinivas Kandagatla [Thu, 14 Jan 2016 16:06:25 +0000 (16:06 +0000)]
Merge branch 'tracking-qcomlt-apq8064-dt' into integration-linux-qcomlt

* tracking-qcomlt-apq8064-dt: (37 commits)
  arm: dts: remove duplicate entires
  arm: dts: apq8064: fix clock names according to new rpmcc
  dts: qcom: Add CoreSight components for APQ8064
  ARM: dts: ERAGON: fix uart pinctrl
  arm: dts: qcom: apq8064: Add fixed rate on-board oscillators
  arm: dts: qcom: apq8064: Add RPMCC DT node
  dts: arm: add support to digital audio via dsp
  arm: dts: apq8064: add support to smd apr_audio svc channel
  dts: arm: apq8064: add support to q6 pil via pil-tz
  arm: dts: apq8064: Add thermal zones, tsens and qfprom nodes
  ARM: dts: apq8064: Increase critical temperature to 110C
  ARM: dts: ifc6410: HACK add bt reset gpios to pwrseq
  arm: dts: Added eInfochips ERAGON600 board support
  ARM: dts: apq8064: Add ADM configuration node
  ARM: dts: apq8064: Add a DT node for the L2 data
  ARM: dts: apq8064: Add reference to the L2 clock
  ARM: dts: apq8064: Add voltage ranges of the SAW2 regulators
  ARM: dts: apq8064: Add thermal cooling maps
  ARM: dts: apq8064: Add OPP data for frequencies above 1ghz
  ARM: dts: apq8064: Assign a power supply to each CPU
  ...

8 years agoMerge branch 'tracking-qcomlt-panelpicker' into integration-linux-qcomlt
Srinivas Kandagatla [Thu, 14 Jan 2016 16:06:24 +0000 (16:06 +0000)]
Merge branch 'tracking-qcomlt-panelpicker' into integration-linux-qcomlt

* tracking-qcomlt-panelpicker:
  drm/msm: mdp4 lvds: Check the panel node in detect_panel()
  drm/msm: mdp4 lvds: continue if the panel is not connected
  drm/panel: simple-panel: Add panel picker support.
  drm/edid: export edid_vendor()
  drm/edid: Add support to get edid early

8 years agoMerge branch 'tracking-qcomlt-mainline-pcie' into integration-linux-qcomlt
Srinivas Kandagatla [Thu, 14 Jan 2016 16:06:24 +0000 (16:06 +0000)]
Merge branch 'tracking-qcomlt-mainline-pcie' into integration-linux-qcomlt

* tracking-qcomlt-mainline-pcie:
  PCI: qcom: Add Qualcomm PCIe controller driver
  DT: PCI: qcom: Document PCIe devicetree bindings
  PCI: designware: add memory barrier after enabling region

8 years agoMerge branch 'tracking-qcomlt-venus' into integration-linux-qcomlt
Srinivas Kandagatla [Thu, 14 Jan 2016 16:06:23 +0000 (16:06 +0000)]
Merge branch 'tracking-qcomlt-venus' into integration-linux-qcomlt

* tracking-qcomlt-venus:
  media: vidc: venc/vdec: vb2 structure reorganisation
  media: vidc: debug: fix build warnings
  media: vidc: Qualcomm video encoder/decoder driver
  media: v4l2-controls: add h264 5.2 level and constrained high profile

8 years agomulti_v7_defconfig: add msm iommu kconfig
Srinivas Kandagatla [Thu, 14 Jan 2016 12:50:11 +0000 (12:50 +0000)]
multi_v7_defconfig: add msm iommu kconfig

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
8 years agoarm: dts: remove duplicate entires
Srinivas Kandagatla [Thu, 14 Jan 2016 16:01:37 +0000 (16:01 +0000)]
arm: dts: remove duplicate entires

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
8 years agodrivers: usb: Add bus scaling suppport
Rajendra Nayak [Tue, 13 Oct 2015 12:08:52 +0000 (17:38 +0530)]
drivers: usb: Add bus scaling suppport

Add msm bus scaling support and hack to request
max bandwith at probe

Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org>
8 years agousb: host: ehci-msm: Use posted data writes on AHB
Andy Gross [Thu, 5 Nov 2015 21:24:59 +0000 (15:24 -0600)]
usb: host: ehci-msm: Use posted data writes on AHB

This patch sets the AHBMODE to allow for posted data writes.  This
results in higher performance.

Signed-off-by: Andy Gross <agross@codeaurora.org>
8 years agousb: chipidea: msm: Use posted data writes on AHB
Andy Gross [Thu, 5 Nov 2015 21:18:25 +0000 (15:18 -0600)]
usb: chipidea: msm: Use posted data writes on AHB

This patch sets the AHBMODE to allow for posted data writes.  This results in
higher performance.

Signed-off-by: Andy Gross <agross@codeaurora.org>
8 years agousb: phy: msm: Ensure that workers are initialized before use
Ivan T. Ivanov [Wed, 13 May 2015 12:20:12 +0000 (15:20 +0300)]
usb: phy: msm: Ensure that workers are initialized before use

Charger detect and USB state detect workers could be triggered from
USB-HOST and USB cable detect notifiers. Ensure that workers are
initialized before driver register its interest for cable events.

Signed-off-by: Ivan T. Ivanov <ivan.ivanov@linaro.org>
8 years agousb: phy: msm: Disable driver runtime PM
Ivan T. Ivanov [Wed, 13 May 2015 12:11:14 +0000 (15:11 +0300)]
usb: phy: msm: Disable driver runtime PM

Currently runtime PM for this driver is broken. Disable it until
proper fix is developed.

Signed-off-by: Ivan T. Ivanov <ivan.ivanov@linaro.org>
8 years agousb: phy: msm: HACK: Make Vddc configuration optional
Ivan T. Ivanov [Fri, 8 May 2015 09:54:47 +0000 (12:54 +0300)]
usb: phy: msm: HACK: Make Vddc configuration optional

Signed-off-by: Ivan T. Ivanov <ivan.ivanov@linaro.org>
8 years agousb: phy: msm: fix error handling in probe.
Srinivas Kandagatla [Tue, 12 Jan 2016 09:15:28 +0000 (09:15 +0000)]
usb: phy: msm: fix error handling in probe.

This driver registers for extcon events as part of its probe, but
never unregisters them in case of error in the probe path.

There were multiple issues noticed due to this missing error handling.
One of them is random crashes if the regulators are not ready yet by the
time probe is invoked.

Ivan's previous attempt [1] to fix this issue, did not really address
all the failure cases like regualtor failures.

[1] https://lkml.org/lkml/2015/9/7/62

Without this patch the kernel would carsh with log:
...
Unable to handle kernel paging request at virtual address 17d78410
pgd = ffffffc001a5c000
[17d78410] *pgd=00000000b6806003, *pud=00000000b6806003, *pmd=0000000000000000
Internal error: Oops: 96000005 [#1] PREEMPT SMP
Modules linked in:
CPU: 0 PID: 6 Comm: kworker/u8:0 Not tainted 4.4.0+ #48
Hardware name: Qualcomm Technologies, Inc. APQ 8016 SBC (DT)
Workqueue: deferwq deferred_probe_work_func
task: ffffffc03686e900 ti: ffffffc0368b0000 task.ti: ffffffc0368b0000
PC is at raw_notifier_chain_register+0x1c/0x44
LR is at extcon_register_notifier+0x88/0xc8
pc : [<ffffffc0000da43c>] lr : [<ffffffc000606298>] pstate: 80000085
sp : ffffffc0368b3a70
x29: ffffffc0368b3a70 x28: ffffffc03680c310
x27: ffffffc035518000 x26: ffffffc035518000
x25: ffffffc03bfa20e0 x24: ffffffc035580a18
x23: 0000000000000000 x22: ffffffc035518458
x21: ffffffc0355e9a60 x20: ffffffc035518000
x19: 0000000000000000 x18: 0000000000000028
x17: 0000000000000003 x16: ffffffc0018153c8
x15: 0000000000000001 x14: ffffffc03686f0f8
x13: ffffffc03686f0f8 x12: 0000000000000003
x11: 0000000000000001 x10: 0000000000000001
x9 : ffffffc03686f0f8 x8 : 0000e3872014c1a1
x7 : 0000000000000028 x6 : 0000000000000000
x5 : 0000000000000001 x4 : 0000000000000000
x3 : 00000000354fb170 x2 : 0000000017d78400
x1 : ffffffc0355e9a60 x0 : ffffffc0354fb268

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
8 years agoarm: dts: apq8064: fix clock names according to new rpmcc
Srinivas Kandagatla [Thu, 10 Dec 2015 12:00:23 +0000 (12:00 +0000)]
arm: dts: apq8064: fix clock names according to new rpmcc

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
8 years agodts: qcom: Add CoreSight components for APQ8064
Ivan T. Ivanov [Fri, 11 Sep 2015 11:48:23 +0000 (14:48 +0300)]
dts: qcom: Add CoreSight components for APQ8064

Signed-off-by: Ivan T. Ivanov <ivan.ivanov@linaro.org>
8 years agoARM: dts: ERAGON: fix uart pinctrl
Srinivas Kandagatla [Mon, 7 Dec 2015 16:45:15 +0000 (16:45 +0000)]
ARM: dts: ERAGON: fix uart pinctrl

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
8 years agoarm: dts: qcom: apq8064: Add fixed rate on-board oscillators
Georgi Djakov [Mon, 7 Dec 2015 15:24:10 +0000 (15:24 +0000)]
arm: dts: qcom: apq8064: Add fixed rate on-board oscillators

Currently the rates of the xo and sleep clocks are hard-coded in the
GCC driver, but this is a board layout description that actually should
be in the DT. Moving them into DT also allows us to insert the RPM
controlled clocks between the DT and GCC clocks.

8 years agoarm: dts: qcom: apq8064: Add RPMCC DT node
Georgi Djakov [Thu, 3 Dec 2015 14:02:56 +0000 (16:02 +0200)]
arm: dts: qcom: apq8064: Add RPMCC DT node

Add the RPM Clock Controller DT node.

Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
8 years agodts: arm: add support to digital audio via dsp
Srinivas Kandagatla [Thu, 3 Dec 2015 14:56:45 +0000 (14:56 +0000)]
dts: arm: add support to digital audio via dsp

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
8 years agoarm: dts: apq8064: add support to smd apr_audio svc channel
Srinivas Kandagatla [Thu, 3 Dec 2015 10:42:02 +0000 (10:42 +0000)]
arm: dts: apq8064: add support to smd apr_audio svc channel

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
8 years agodts: arm: apq8064: add support to q6 pil via pil-tz
Srinivas Kandagatla [Thu, 3 Dec 2015 10:37:04 +0000 (10:37 +0000)]
dts: arm: apq8064: add support to q6 pil via pil-tz

This patch adds support to q6 firmware loading using the tz-pil driver.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
8 years agoiommu: qcom: v1: move iommu-sec pgtable allocation
Stanimir Varbanov [Tue, 12 Jan 2016 13:07:55 +0000 (15:07 +0200)]
iommu: qcom: v1: move iommu-sec pgtable allocation

move the allocation of iommu-sec page table into msm_iommu_dev
in order to use properly initialised struct device.
The dma_alloc_attrs would fail to allocate memory with the fake
struct device which was the case before this change.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
8 years agomedia: vidc: venc/vdec: vb2 structure reorganisation
Stanimir Varbanov [Mon, 11 Jan 2016 10:48:28 +0000 (12:48 +0200)]
media: vidc: venc/vdec: vb2 structure reorganisation

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
8 years agomedia: vidc: debug: fix build warnings
Stanimir Varbanov [Tue, 12 Jan 2016 13:27:58 +0000 (15:27 +0200)]
media: vidc: debug: fix build warnings

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
8 years agocoresight-etm3x: Add Qualcomm PTM v1.1 peripheral ID
Ivan T. Ivanov [Fri, 31 Jul 2015 15:37:22 +0000 (09:37 -0600)]
coresight-etm3x: Add Qualcomm PTM v1.1 peripheral ID

Add Qualcomm's PTM v1.1 peripheral ID to supported devices.
This device could be found at least in MSM8974 and APQ8064
chipsets.

Signed-off-by: Ivan T. Ivanov <ivan.ivanov@linaro.org>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoamba: Defer device peripheral ID read
Ivan T. Ivanov [Fri, 15 May 2015 08:07:00 +0000 (11:07 +0300)]
amba: Defer device peripheral ID read

To be able to read peripheral ID during device create time
bus code have turn on device interface clock, but this
clock could be unavailable at this time. Fix this by defer
device ID read until driver match time.

Signed-off-by: Ivan T. Ivanov <ivan.ivanov@linaro.org>
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
8 years agothermal: qcom: tsens-8960: Add support for 8960 family of SoCs
Rajendra Nayak [Fri, 9 Oct 2015 09:41:06 +0000 (15:11 +0530)]
thermal: qcom: tsens-8960: Add support for 8960 family of SoCs

8960 family of SoCs have the TSENS device as part of GCC, hence
the driver probes the virtual child device created by GCC and
uses the parent to extract all DT properties and reuses the GCC
regmap.

Also GCC/TSENS are part of a  domain thats not always ON.
Hence add .suspend and .resume hooks to save and restore some of
the inited register context.

Also 8960 family have some of the TSENS init sequence thats
required to be done by the HLOS driver (some later versions of TSENS
do not export these registers to non-secure world, and hence need
these initializations to be done by secure bootloaders)

8660 from the same family has just one sensor and hence some register
offset/layout differences which need special handling in the driver.

Based on the original code from Siddartha Mohanadoss, Stephen Boyd and
Narendran Rajan.

Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org>
8 years agothermal: qcom: tsens-8974: Add support for 8974 family of SoCs
Rajendra Nayak [Fri, 9 Oct 2015 09:41:05 +0000 (15:11 +0530)]
thermal: qcom: tsens-8974: Add support for 8974 family of SoCs

Add .calibrate support for 8974 family as part of tsens_ops.

Based on the original code by Siddartha Mohanadoss and Stephen Boyd.

Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org>
8 years agothermal: qcom: tsens-8916: Add support for 8916 family of SoCs
Rajendra Nayak [Fri, 9 Oct 2015 09:41:04 +0000 (15:11 +0530)]
thermal: qcom: tsens-8916: Add support for 8916 family of SoCs

Add support to calibrate sensors on 8916 family and also add common
functions to read temperature from sensors (This can be reused on
other SoCs having similar TSENS device)
The calibration data is read from eeprom using the generic nvmem
framework apis.

Based on the original code by Siddartha Mohanadoss and Stephen Boyd.

Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org>
8 years agothermal: qcom: tsens: Add a skeletal TSENS drivers
Rajendra Nayak [Fri, 9 Oct 2015 09:41:03 +0000 (15:11 +0530)]
thermal: qcom: tsens: Add a skeletal TSENS drivers

TSENS is Qualcomms' thermal temperature sensor device. It
supports reading temperatures from multiple thermal sensors
present on various QCOM SoCs.
Calibration data is generally read from a non-volatile memory
(eeprom) device.

Add a skeleton driver with all the necessary abstractions so
a variety of qcom device families which support TSENS can
add driver extensions.

Also add the required device tree bindings which can be used
to describe the TSENS device in DT.

Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org>
Reviewed-by: Lina Iyer <lina.iyer@linaro.org>
8 years agoclk:gcc-msm8916: add missing mss_q6_bimc_axi clock
Srinivas Kandagatla [Tue, 24 Nov 2015 16:54:31 +0000 (16:54 +0000)]
clk:gcc-msm8916: add missing mss_q6_bimc_axi clock

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
8 years agosoc: qcom: Add support for SAW2 regulators
Georgi Djakov [Tue, 11 Aug 2015 13:35:59 +0000 (16:35 +0300)]
soc: qcom: Add support for SAW2 regulators

The SAW2 (Subsystem Power Manager and Adaptive Voltage Scalling Wrapper)
is part of the SPM subsystem. It is a hardware block in the Qualcomm
chipsets that regulates the power to the cores.

Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
8 years agoclk: qcom: Add A53 clock driver
Georgi Djakov [Thu, 19 Mar 2015 07:28:37 +0000 (09:28 +0200)]
clk: qcom: Add A53 clock driver

Add a driver for the A53 subsystem PLL, so that we can provide higher
frequency clocks for use by the system.

Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
8 years agoclk: qcom: Add support for regmap mux-div clocks
Georgi Djakov [Wed, 18 Mar 2015 15:23:29 +0000 (17:23 +0200)]
clk: qcom: Add support for regmap mux-div clocks

Add support for hardware that support switching both parent clocks and the
divider at the same time. This avoids generating intermediate frequencies
from either the old parent clock and new divider or new parent clock and
old divider combinations.

Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
8 years agoclk: qcom: Add support for apq8084 RPM-SMD clocks
Georgi Djakov [Fri, 4 Dec 2015 09:09:16 +0000 (11:09 +0200)]
clk: qcom: Add support for apq8084 RPM-SMD clocks

Add support for the RPM clock controller found on apq8084-based
platforms.

Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
8 years agoclk: qcom: msm8974: Remove gfx3d clock from MMCC
Georgi Djakov [Thu, 3 Dec 2015 09:34:09 +0000 (11:34 +0200)]
clk: qcom: msm8974: Remove gfx3d clock from MMCC

The gfx3d clocks is controlled by the RPM clock controller.

Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
8 years agoclk: qcom: Add support for msm8974 RPM-SMD clocks
Georgi Djakov [Fri, 4 Dec 2015 09:06:30 +0000 (11:06 +0200)]
clk: qcom: Add support for msm8974 RPM-SMD clocks

Add support for the RPM clock controller found on msm8974-based
platforms.

Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
8 years agoclk: qcom: Add support for RPM Clocks
Georgi Djakov [Thu, 3 Dec 2015 12:14:15 +0000 (14:14 +0200)]
clk: qcom: Add support for RPM Clocks

This adds initial support for clocks controlled by the Resource
Power Manager (RPM) processor on some Qualcomm SoCs, which use
the qcom_rpm driver to communicate with RPM.
Such platforms are apq8064 and msm8960.

Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
8 years agoclk: qcom: Add support for SMD-RPM Clocks
Georgi Djakov [Mon, 3 Aug 2015 13:30:30 +0000 (16:30 +0300)]
clk: qcom: Add support for SMD-RPM Clocks

This adds initial support for clocks controlled by the Resource
Power Manager (RPM) processor on some Qualcomm SoCs, which use
the qcom_smd_rpm driver to communicate with RPM.
Such platforms are msm8916, apq8084 and msm8974.

The RPM is a dedicated hardware engine for managing the shared
SoC resources in order to keep the lowest power profile. It
communicates with other hardware subsystems via shared memory
and accepts clock requests, aggregates the requests and turns
the clocks on/off or scales them on demand.

This driver is based on the codeaurora.org driver:
https://www.codeaurora.org/cgit/quic/la/kernel/msm-3.10/tree/drivers/clk/qcom/clock-rpm.c

Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
8 years agocpufreq: Add module to register cpufreq on Krait CPUs
Stephen Boyd [Sat, 21 Mar 2015 06:45:31 +0000 (23:45 -0700)]
cpufreq: Add module to register cpufreq on Krait CPUs

Register a cpufreq-generic device whenever we detect that a
"qcom,krait" compatible CPU is present in DT.

Cc: <devicetree@vger.kernel.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: qcom: Add Krait clock controller driver
Stephen Boyd [Sat, 21 Mar 2015 06:45:30 +0000 (23:45 -0700)]
clk: qcom: Add Krait clock controller driver

The Krait CPU clocks are made up of a primary mux and secondary
mux for each CPU and the L2, controlled via cp15 accessors. For
Kraits within KPSSv1 each secondary mux accepts a different aux
source, but on KPSSv2 each secondary mux accepts the same aux
source.

Cc: <devicetree@vger.kernel.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: qcom: Add KPSS ACC/GCC driver
Stephen Boyd [Sat, 21 Mar 2015 06:45:29 +0000 (23:45 -0700)]
clk: qcom: Add KPSS ACC/GCC driver

The ACC and GCC regions present in KPSSv1 contain registers to
control clocks and power to each Krait CPU and L2. For CPUfreq
purposes probe these devices and expose a mux clock that chooses
between PXO and PLL8.

Cc: <devicetree@vger.kernel.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: qcom: Add support for Krait clocks
Stephen Boyd [Sat, 21 Mar 2015 06:45:28 +0000 (23:45 -0700)]
clk: qcom: Add support for Krait clocks

The Krait clocks are made up of a series of muxes and a divider
that choose between a fixed rate clock and dedicated HFPLLs for
each CPU. Instead of using mmio accesses to remux parents, the
Krait implementation exposes the remux control via cp15
registers. Support these clocks.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: qcom: Add IPQ806X's HFPLLs
Stephen Boyd [Sat, 21 Mar 2015 06:45:27 +0000 (23:45 -0700)]
clk: qcom: Add IPQ806X's HFPLLs

Describe the HFPLLs present on IPQ806X devices.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: qcom: Add MSM8960/APQ8064's HFPLLs
Stephen Boyd [Sat, 21 Mar 2015 06:45:26 +0000 (23:45 -0700)]
clk: qcom: Add MSM8960/APQ8064's HFPLLs

Describe the HFPLLs present on MSM8960 and APQ8064 devices.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: qcom: Add HFPLL driver
Stephen Boyd [Sat, 21 Mar 2015 06:45:25 +0000 (23:45 -0700)]
clk: qcom: Add HFPLL driver

On some devices (MSM8974 for example), the HFPLLs are
instantiated within the Krait processor subsystem as separate
register regions. Add a driver for these PLLs so that we can
provide HFPLL clocks for use by the system.

Cc: <devicetree@vger.kernel.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: qcom: Add support for High-Frequency PLLs (HFPLLs)
Stephen Boyd [Sat, 21 Mar 2015 06:45:24 +0000 (23:45 -0700)]
clk: qcom: Add support for High-Frequency PLLs (HFPLLs)

HFPLLs are the main frequency source for Krait CPU clocks. Add
support for changing the rate of these PLLs.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: Add safe switch hook
Stephen Boyd [Sat, 21 Mar 2015 06:45:23 +0000 (23:45 -0700)]
clk: Add safe switch hook

Sometimes clocks can't accept their parent source turning off
while the source is reprogrammed to a different rate. Most
notably CPU clocks require a way to switch away from the current
PLL they're running on, reprogram that PLL to a new rate, and
then switch back to the PLL with the new rate once they're done.
Add a hook that drivers can implement allowing them to return a
'safe parent' and 'safe frequency' that they can switch their
parent to while the upstream source is reprogrammed to support
this.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
8 years agoclk: mux: Split out register accessors for reuse
Stephen Boyd [Sat, 21 Mar 2015 06:45:21 +0000 (23:45 -0700)]
clk: mux: Split out register accessors for reuse

We want to reuse the logic in clk-mux.c for other clock drivers
that don't use readl as register accessors. Fortunately, there
really isn't much to the mux code besides the table indirection
and quirk flags if you assume any bit shifting and masking has
been done already. Pull that logic out into reusable functions
that operate on an optional table and some flags so that other
drivers can use the same logic.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: Avoid sending high rates to downstream clocks during set_rate
Stephen Boyd [Sat, 21 Mar 2015 06:45:22 +0000 (23:45 -0700)]
clk: Avoid sending high rates to downstream clocks during set_rate

If a clock is on and we call clk_set_rate() on it we may get into
a situation where the clock temporarily increases in rate
dramatically while we walk the tree and call .set_rate() ops. For
example, consider a case where a PLL feeds into a divider.
Initially the divider is set to divide by 1 and the PLL is
running fairly slow (100MHz). The downstream consumer of the
divider output can only handle rates =< 400 MHz, but the divider
can only choose between divisors of 1 and 4.

 +-----+   +----------------+
 | PLL |-->| div 1 or div 4 |---> consumer device
 +-----+   +----------------+

To achieve a rate of 400MHz on the output of the divider, we
would have to set the rate of the PLL to 1.6 GHz and then divide
it by 4. The current code would set the PLL to 1.6GHz first while
the divider is still set to 1, thus causing the downstream
consumer of the clock to receive a few clock cycles of 1.6GHz
clock (far beyond it's maximum acceptable rate). We should be
changing the divider first before increasing the PLL rate to
avoid this problem.

Therefore, set the rate of any child clocks that are increasing
in rate from their current rate so that they can increase their
dividers if necessary. We assume that there isn't such a thing as
minimum rate requirements.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Conflicts:
drivers/clk/clk.c

8 years agoARM: Add Krait L2 register accessor functions
Stephen Boyd [Sat, 21 Mar 2015 06:45:20 +0000 (23:45 -0700)]
ARM: Add Krait L2 register accessor functions

Krait CPUs have a handful of L2 cache controller registers that
live behind a cp15 based indirection register. First you program
the indirection register (l2cpselr) to point the L2 'window'
register (l2cpdr) at what you want to read/write.  Then you
read/write the 'window' register to do what you want. The
l2cpselr register is not banked per-cpu so we must lock around
accesses to it to prevent other CPUs from re-pointing l2cpdr
underneath us.

Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Courtney Cavin <courtney.cavin@sonymobile.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: qcom: msm8916: Move xo and sleep clocks into DT
Georgi Djakov [Thu, 19 Nov 2015 13:57:56 +0000 (15:57 +0200)]
clk: qcom: msm8916: Move xo and sleep clocks into DT

Move the xo and sleep clocks to device-tree, instead of hard-coding
them in the driver. This allows us to insert the RPM clocks (if they
are enabled) in between the on-board oscillators and the actual clock.

Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: qcom: Move cxo/pxo/xo into dt files
Stephen Boyd [Tue, 27 Oct 2015 01:10:09 +0000 (18:10 -0700)]
clk: qcom: Move cxo/pxo/xo into dt files

Put these clocks into the dt files instead of registering them
from C code. This provides a few benefits. It allows us to
specify the frequency of these clocks at the board level instead
of hard-coding them in the driver. It allows us to insert an RPM
clock in between the consumers of the crystals and the actual
clock. And finally, it helps us transition the GCC driver to use
RPM clocks when that configuration is enabled.

Cc: Georgi Djakov <georgi.djakov@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: qcom: common: Add API to register board clocks backwards compatibly
Stephen Boyd [Tue, 27 Oct 2015 00:11:32 +0000 (17:11 -0700)]
clk: qcom: common: Add API to register board clocks backwards compatibly

We want to put the XO board clocks into the dt files, but we also
need to be backwards compatible with an older dtb. Add an API to
the common code to do this. This also makes a place for us to
handle the case when the RPM clock driver is enabled and we don't
want to register the fixed factor clock.

Cc: Georgi Djakov <georgi.djakov@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: qcom: gdsc: Manage clocks with !CONFIG_PM
Rajendra Nayak [Thu, 6 Aug 2015 10:37:54 +0000 (16:07 +0530)]
clk: qcom: gdsc: Manage clocks with !CONFIG_PM

With CONFIG_PM disabled, turn the devices clocks on during
driver binding to the device, and turn them off when the
driver is unbound from the device. Platforms can specify
all the clocks that need to be managed in !CONFIG_PM case
using qcom_pm_add_notifier().

The use of pm_clk_add_notifier() isn't appropriate here since we need
to only manage clocks with valid power domain associations done via
DT, instead of what pm_clk_add_notifier() does, which is manage clocks
for all on SoC/off SoC devices associating all of them to a dummy power
domain instead

Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org>
8 years agoclk: qcom: gdsc: Enable an RCG before turing on the gdsc
Rajendra Nayak [Thu, 6 Aug 2015 10:37:53 +0000 (16:07 +0530)]
clk: qcom: gdsc: Enable an RCG before turing on the gdsc

Some gdsc instances require a certain root clock (RCG) to be turned on
*before* the power domain itself can be turned on. Handle this as part
of the gdsc enable/disable callbacks.

Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org>
8 years agoclk: qcom: gdsc: Use PM clocks to control gdsc clocks
Rajendra Nayak [Thu, 6 Aug 2015 10:37:52 +0000 (16:07 +0530)]
clk: qcom: gdsc: Use PM clocks to control gdsc clocks

The devices within a gdsc power domain, quite often have additional
clocks to be turned on/off along with the power domain itself.
Once the drivers for these devices are converted to use runtime PM,
it would be possible to remove all clock handling from the drivers if
the gdsc driver can handle it.
Use PM clocks to add support for this. A list of clock ids specified
per gdsc would be the clocks turned on/off on every device start/stop
callbacks.

Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org>
8 years agodrm/i2c: adv7511: Init regulators
Archit Taneja [Fri, 4 Dec 2015 07:11:49 +0000 (12:41 +0530)]
drm/i2c: adv7511: Init regulators

ADV7533 requires a constant supply to the AVDD and V3P3 pins for it
to function. The driver wrongly assumed that these will be enabled
all the time.

Configure these regulators during probe itself. We can later enable
and disable it dynamically.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
8 years agodrm/i2c: adv7511: fixup the dapm bias level access
Srinivas Kandagatla [Wed, 16 Sep 2015 12:03:39 +0000 (13:03 +0100)]
drm/i2c: adv7511: fixup the dapm bias level access

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
8 years agodrm/i2c: adv7511: move to use reg_sequence
Srinivas Kandagatla [Wed, 16 Sep 2015 12:02:43 +0000 (13:02 +0100)]
drm/i2c: adv7511: move to use reg_sequence

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
8 years agoHACK: drm/i2c: adv7511: Remove hotplug event handling
Archit Taneja [Mon, 7 Sep 2015 06:15:43 +0000 (11:45 +0530)]
HACK: drm/i2c: adv7511: Remove hotplug event handling

Hotplug detect is currently unstable. Temporarily remove the driver's
hotplug handling code.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
8 years agodrm/i2c: adv7511: Enable the audio data and clock pads on adv7533
Srinivas Kandagatla [Fri, 17 Apr 2015 12:25:01 +0000 (13:25 +0100)]
drm/i2c: adv7511: Enable the audio data and clock pads on adv7533

This patch enables the Audio Data and Clock pads to the adv7533 bridge.
Without this patch audio can not be played.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
8 years agodrm/i2c: adv7511: Add Audio support.
Lars-Peter Clausen [Fri, 17 Apr 2015 12:33:24 +0000 (13:33 +0100)]
drm/i2c: adv7511: Add Audio support.

This patch adds support to Audio for both adv7511 and adv7533 bridge
chips. Content of this patch is has copied from [1].

[1] https://github.com/analogdevicesinc/linux/blob/xcomm_zynq/drivers/gpu/drm/i2c/adv7511_audio.c

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
[Srinivas Kandagatla] Adapted to new adv7511 bridge driver.
Signed-off-by: Archit Taneja <architt@codeaurora.org>
8 years agodrm/i2c: adv7511: Move the common data structures to header file
Archit Taneja [Mon, 7 Sep 2015 06:15:02 +0000 (11:45 +0530)]
drm/i2c: adv7511: Move the common data structures to header file

This patch moves the adv7511 data structure to header file so that the
audio driver file could use it.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
8 years agodrm/i2c: adv7511: Change DSI lanes dynamically
Archit Taneja [Mon, 7 Sep 2015 05:50:28 +0000 (11:20 +0530)]
drm/i2c: adv7511: Change DSI lanes dynamically

Lower modes on ADV7511 require lower number of lanes for correct
operation. Switch lanes to 3 when the target mode's pixel clock
is less than 80 Mhz.

Based on patch by Andy Green <andy.green@linaro.org>

Signed-off-by: Archit Taneja <architt@codeaurora.org>
8 years agodrm/i2c: adv7511: Use internal timing generator
Archit Taneja [Fri, 12 Jun 2015 15:32:05 +0000 (21:02 +0530)]
drm/i2c: adv7511: Use internal timing generator

ADV7533 provides an internal timing generator for certain modes that it
can't use the DSI clock directly.

We've observed that hdmi is more stable with the internal timing
generator, especially if there are instabilities in the dsi clock source.

The data spec recommends usage of the timing generator too. Use it all
the time.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
8 years agodrm/i2c: adv7511: setup CEC registers during power off-power-on sequence
Srinivas Kandagatla [Thu, 11 Jun 2015 13:46:14 +0000 (14:46 +0100)]
drm/i2c: adv7511: setup CEC registers during power off-power-on sequence

This patch sets up the CEC register during power up sequence, the reason
to do this because during power dowm the bridge can put audio pins in to
low power state.

Orignally the issue was detected on ubuntu image, where in after first
logout the audio was totally disabled.

Reported-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
8 years agodrm/i2c: adv7511: Create mipi_dsi_device for ADV7533
Archit Taneja [Thu, 9 Jul 2015 05:17:05 +0000 (10:47 +0530)]
drm/i2c: adv7511: Create mipi_dsi_device for ADV7533

In order to pass DSI specific parameters to the DSI host, we need the
driver to create a mipi_dsi_device that attaches to the host.

Use of_graph helpers to get the DSI host DT node. Create a dummy dsi
device using this host. Finally, attach this device to the host.

Populate few other DT parameters (number of data lanes etc) that are
required for DSI RX to work correctly. Hardcode few other parameters
(rgb, embedded_sync) for now.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
8 years agodrm/i2c: adv7511: Add drm_bridge/connector for ADV7533
Archit Taneja [Fri, 3 Jul 2015 10:02:48 +0000 (15:32 +0530)]
drm/i2c: adv7511: Add drm_bridge/connector for ADV7533

Create bridge and connector helper functions. These internally refer to
the ADV75xx helper functions.

The driver registers a drm_bridge object during probe. The bridge, in
turn registers a HDMI connector when a user attaches the bridge.

Therefore, when the device type is ADV7533, we create bridge and
connector entities, and when it's ADV7511, we create a slave encoder as
before.

Since the i2c driver is still wrapped around by the drm_i2c_slave_encoder
struct. We make sure the encoder_init op returns an error when the device
type is ADV7533.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
8 years agodrm/i2c: adv7511: Refactor encoder slave functions
Archit Taneja [Thu, 2 Jul 2015 10:25:55 +0000 (15:55 +0530)]
drm/i2c: adv7511: Refactor encoder slave functions

ADV7511 is represented as an i2c drm slave encoder device. ADV7533, on
the other hand, is going be a normal i2c client device creating bridge
and connector entities.

Move the code in encoder slave functions to generate helpers that are
agnostic to the drm object type. These helpers will later also be used
by bridge and connecter helper functions.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
8 years agodrm/i2c: adv7511: Initial support for adv7533
Lars-Peter Clausen [Wed, 8 Jul 2015 06:57:05 +0000 (12:27 +0530)]
drm/i2c: adv7511: Initial support for adv7533

ADV7533 is a DSI to HDMI encoder chip. It is a derivative of ADV7511,
with additional blocks to translate input DSI data to parallel RGB
data. Besides the ADV7511 i2c register map, it has additional registers
that require to be configured to activate the DSI blocks.

Use DT compatible strings to populate the adv7533 type enum. Add minimal
register configurations belonging to the DSI/CEC register map.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
8 years agodrm/i2c: adv7511: Fix mutex deadlock when interrupts are disabled
Archit Taneja [Fri, 3 Jul 2015 06:11:10 +0000 (11:41 +0530)]
drm/i2c: adv7511: Fix mutex deadlock when interrupts are disabled

When the adv7511 i2c client doesn't have an interrupt line, we observe a
deadlock on caused by trying to lock drm device's mode_config.mutex twice
in the same context.

Here is the sequence that causes it:

ioctl DRM_IOCTL_MODE_GETCONNECTOR from userspace
  drm_mode_getconnector (acquires mode_config mutex)
    connector->fill_modes()
    drm_helper_probe_single_connector_modes
      connector_funcs->get_modes
adv7511_encoder_get_modes
  adv7511_get_edid_block
    adv7511_irq_process
      drm_helper_hpd_irq_event (acquires mode_config mutex again)

In adv7511_irq_process, don't call drm_helper_hpd_irq_event when not
called from interrupt context. It doesn't serve any purpose there anyway.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
8 years agodrm/mipi_dsi: Get DSI host by DT device node
Archit Taneja [Fri, 4 Sep 2015 10:30:55 +0000 (16:00 +0530)]
drm/mipi_dsi: Get DSI host by DT device node

mipi_dsi_devices are inherently aware of their host because they
share a parent-child hierarchy in the device tree.

Non-dsi drivers that create a dummy dsi device don't have this data.
In order to get this information, they require to a phandle to the dsi
host in the device tree.

Maintain a list of all the hosts DSI that are currently registered.

This list will be used to find the mipi_dsi_host corresponding to the
device_node passed in of_find_mipi_dsi_host_by_node.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
8 years agodrm/mipi_dsi: Create dummy DSI devices
Archit Taneja [Mon, 7 Sep 2015 05:08:51 +0000 (10:38 +0530)]
drm/mipi_dsi: Create dummy DSI devices

We can have devices where the data bus is MIPI DSI, but the control bus
is something else (i2c, spi etc). A typical example is i2c controlled
encoder bridge chips.

Such devices too require passing DSI specific parameters (number of data
lanes, DSI mode flags, color format etc) to their DSI host. For a device
that isn't 'mipi_dsi_device', there is no way of passing such parameters.

Provide the option of creating a dummy DSI device. The main purpose of
this would be to attach to a DSI host by calling mipi_dsi_attach, and
pass DSI params.

Create mipi_dsi_new_dummy for creating a dummy dsi device. The driver
calling this needs to be aware of the mipi_dsi_host it wants to attach
to, and also the DSI virtual channel the DSI device intends to use.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
8 years agodrm/mipi_dsi: check for used channels
Archit Taneja [Wed, 19 Aug 2015 12:01:23 +0000 (17:31 +0530)]
drm/mipi_dsi: check for used channels

We don't check whether a previous mipi_dsi_device under the same host
shares the same virtual channel.

Before registering, check if any of the registered devices doesn't
already have the same virtual channel.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
8 years agodrm/mipi_dsi: refactor device creation
Archit Taneja [Wed, 19 Aug 2015 10:44:09 +0000 (16:14 +0530)]
drm/mipi_dsi: refactor device creation

Create a helper function mipi_dsi_device_new which takes in struct
mipi_dsi_device_info and the mipi_dsi_host. This will be called by
of_mipi_dsi_device_add.

Instead of calling device_initialize and device_add separately, merge
it into a single device_register call. This will remove the need of
having two separate funcs mipi_dsi_device_alloc and mipi_dsi_device_add.

The reason for creating mipi_dsi_device_new is that it can also be used
as a standalone way for creating a dsi device that isn't available via
DT.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
8 years agoarm64: fixup for mm renames
Srinivas Kandagatla [Tue, 5 Jan 2016 12:09:01 +0000 (12:09 +0000)]
arm64: fixup for mm renames

__GFP_WAIT was renamed for __GFP_RECLAIM and the gfpflags_allow_blocking()
helper was added.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
8 years agoarm64: dma-mapping: map sg lists into the SMMU as virtually contiguous
Mitchel Humpherys [Tue, 28 Oct 2014 20:45:02 +0000 (13:45 -0700)]
arm64: dma-mapping: map sg lists into the SMMU as virtually contiguous

In arm_iommu_map_sg, currently we map each individual link in the given
scatterlist into the SMMU individually such that they may or may not be
virtually contiguous.  However, in most (all?) of our use cases we
actually want the entire sg list mapped into the SMMU as a single
contiguous range.  Use iommu_map_range to accomplish this.

Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
[Forward Ported this from msm3.14]
Signed-off-by: Sricharan R <sricharan@codeaurora.org>
[added iommu_map_range in generic dma code]
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
8 years agoarm64: dma-mapping: fix DMA_ATTR_STRONGLY_ORDERED in __get_dma_pgprot
Stanimir Varbanov [Wed, 29 Apr 2015 11:38:01 +0000 (14:38 +0300)]
arm64: dma-mapping: fix DMA_ATTR_STRONGLY_ORDERED in __get_dma_pgprot

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
8 years agoarm64: mm: Fix a bug in iommu dma-mapping
Sricharan R [Tue, 21 Apr 2015 14:30:37 +0000 (20:00 +0530)]
arm64: mm: Fix a bug in iommu dma-mapping

iommu_alloc_attrs and arm_iommu_mmap_attrs calls
dma_pgprot with device type set to always 'coherent'
which is wrong. Should be based on the device type.

Signed-off-by: Sricharan R <sricharan@codeaurora.org>
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
8 years agoarm64: dma-mapping: add support for IOMMU mapper
Mitchel Humpherys [Tue, 12 Aug 2014 22:47:23 +0000 (15:47 -0700)]
arm64: dma-mapping: add support for IOMMU mapper

On systems with IOMMUs, it's useful to handle IOMMU mappings in the
dma-mapping layer. This is currently supported on arm but not arm64. Add
support in arm64 by gratuitously lifting most of the IOMMU-related stuff
from dma-mapping.c in arm.

The original arm work was done by Marek Szyprowski in [4ce63fcd919c32:
"ARM: dma-mapping: add support for IOMMU mapper"].

Change-Id: I1c3c8fe15049fe456751074398fd179ebd2ec64e
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
[forward ported from 3.14 tree]
Signed-off-by: R Sricharan <sricharan@codeaurora.org>
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
8 years agoarm64: Add support for DMA_ATTR_STRONGLY_ORDERED
Laura Abbott [Thu, 17 Jul 2014 23:00:33 +0000 (16:00 -0700)]
arm64: Add support for DMA_ATTR_STRONGLY_ORDERED

Strongly ordered memory prevents speculative accesses among
other features. Add support for this attribute in arm64.

Change-Id: If26459f63edfea3108ad7426e29f98c23b1a07ef
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Conflicts:
arch/arm64/mm/dma-mapping.c
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
8 years agoarm: Add option to skip buffer zeroing
Laura Abbott [Wed, 6 Aug 2014 02:39:38 +0000 (19:39 -0700)]
arm: Add option to skip buffer zeroing

The DMA framework currently zeros all buffers because it (righfully so)
assumes that drivers will soon need to pass the memory to a device.
Some devices/use case may not require zeroed memory and there can
be an increase in performance if we skip the zeroing. Add a DMA_ATTR
to allow skipping of DMA zeroing.

Note: only the header file was modified to add the enum to allow the code to
compile, however the arm32 implementation was not pulled, and the arm64
implementation is missing as well

Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
8 years agocommon: DMA-mapping: Add strongly ordered memory attribute
Laura Abbott [Mon, 29 Oct 2012 20:08:03 +0000 (13:08 -0700)]
common: DMA-mapping: Add strongly ordered memory attribute

Strongly ordered memory is occasionally needed for some DMA
allocations for specialized use cases. Add the corresponding
DMA attribute.

Change-Id: Idd9e756c242ef57d6fa6700e51cc38d0863b760d
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
8 years agoarm64: defconfig: add qcom specifics
Srinivas Kandagatla [Thu, 26 Mar 2015 11:12:38 +0000 (11:12 +0000)]
arm64: defconfig: add qcom specifics

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
8 years agoarm64: qcom: add cpu operations
Abhimanyu Kapur [Fri, 7 Feb 2014 06:03:02 +0000 (22:03 -0800)]
arm64: qcom: add cpu operations

Add qcom cpu operations for arm-v8 cpus. Implement secondary cpu boot ops
As a part of this change update device tree documentation for:

1. Arm cortex-a ACC device which provides percpu reg
2. Armv8 cortex-a compatible string in arm/cpus.txt

Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
Signed-off-by: Kumar Gala <galak@codeaurora.org>
8 years agoarm64: smp: move the pen to a header file
Abhimanyu Kapur [Tue, 18 Feb 2014 17:36:37 +0000 (09:36 -0800)]
arm64: smp: move the pen to a header file

Move the secondary_pen_release variable and the secondary_holding_pen
entry function to asm/smp_plat.h so that the other cpu ops implementations
can share them.

Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
Signed-off-by: Kumar Gala <galak@codeaurora.org>
8 years agoarm64: introduce CPU_OF_TABLES for cpu ops selection
Abhimanyu Kapur [Thu, 23 Jan 2014 20:24:33 +0000 (12:24 -0800)]
arm64: introduce CPU_OF_TABLES for cpu ops selection

Add support to arm64 to provide a dt-based method to allow soc-vendors to
supply cpu_ops. Also move psci and smp_spin_table ops to use CPU_OF_TABLES.

Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
Signed-off-by: Kumar Gala <galak@codeaurora.org>
8 years agodevicetree: bindings: Document qcom,msm-id and qcom,board-id
Kumar Gala [Tue, 3 Mar 2015 21:39:07 +0000 (15:39 -0600)]
devicetree: bindings: Document qcom,msm-id and qcom,board-id

The top level qcom,msm-id and qcom,board-id are utilized by bootloaders
on Qualcomm MSM platforms to determine which device tree should be
utilized and passed to the kernel.

Cc: <devicetree@vger.kernel.org>
Signed-off-by: Kumar Gala <galak@codeaurora.org>
8 years agoarm64: defconfig: qcom: Enable restart driver
Ivan T. Ivanov [Fri, 3 Apr 2015 09:56:14 +0000 (12:56 +0300)]
arm64: defconfig: qcom: Enable restart driver

Signed-off-by: Ivan T. Ivanov <ivan.ivanov@linaro.org>
8 years agoARM: cpuidle: Add cpuidle support for QCOM cpus
Lina Iyer [Wed, 25 Mar 2015 20:25:29 +0000 (14:25 -0600)]
ARM: cpuidle: Add cpuidle support for QCOM cpus

Define ARM_QCOM_CPUIDLE config item to enable cpuidle support.

Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Kevin Hilman <khilman@linaro.org>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Lina Iyer <lina.iyer@linaro.org>