Stephen Boyd [Thu, 31 Mar 2016 01:57:49 +0000 (18:57 -0700)]
regulator: qcom_spmi: Add slewing delays for all SMPS types
Only the FT SMPS type regulators have slewing supported in the
driver, but all types of SMPS regulators need the same support.
The only difference is that some SMPS regulators don't have a
step size and the step delay is typically 20, not 8. Luckily, the
step size reads as 0 for the non-FT types, so we can always read
that, but we need to detect which type of regulator we're using
to figure out what step delay to use. Make these minor
adjustments to the slew rate calculations and add support for the
delay function to the appropriate regulator ops.
Reported-by: Georgi Djakov <georgi.djakov@linaro.org> Cc: David Collins <collinsd@codeaurora.org> Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
Andy Gross [Mon, 20 Jul 2015 22:25:52 +0000 (17:25 -0500)]
firmware: qcom: scm: Convert to platform driver
This patch creates a platform driver for the SCM so that we can adequately
manage resources. This removes clients having to carry the necessary
clocks to use the SCM resources.
Signed-off-by: Andy Gross <agross@codeaurora.org>
Conflicts:
drivers/firmware/qcom_scm.c
Archit Taneja [Tue, 16 Feb 2016 05:10:56 +0000 (10:40 +0530)]
drm/i2c: adv7511: Add HPD support
Add Hot Plug detect support for ADV7533. This involves:
1) Enabling the correct HPD interrupt enable registers in
adv7511_power_on, adv7511_get_modes and adv7533_bridge_attach.
2) Flushing the irq stat registers in adv7511_irq_process only after
we have called drm_helper_hpd_irq_event.
3) Getting rid of the HPD_ENABLE macro instances.
4) Add a 200 ms sleep in adv7511_get_modes after powering on the
chip. This seems to be needed when we rely on EDID_READY
interrupt to start reading EDID.
usb: phy: msm: Fix state machine worker logic for OTG mode.
Issue is that if the board is booted without micro usb cable and usb
device attached, kernel fails to populate the usb host and device.
The reason for this is that the state machine worker logic only checks
for USB_DR_MODE_PERIPHERAL and USB_DR_MODE_HOST modes to run worker
thread. However if the phy is configured in OTG mode it would fail
to run the state machine, resulting in failure to detect for very
first time.
This patch fixes by adding OTG checks in to the logic.
This patch adds mic support to the lpass driver, most of the driver is
reused as it is, only the register level access is changed depending on
te direction of the stream.
ASoC: qcom: add generic bit masks for RDMA and WRDMA
This patch adds generic masks for accessing bits in rdma/wrdma
registers. Doing this would simplify the driver and adding capture
support would be much simpler. Also there is no point in having same
bit masks for bits in both rdma and wrdma registers.
This patch also deletes the RDMA specific bit masks and makes the code
use the generic bit masks.
ASoC: qcom: rename rdma_ch_bit_map to dma_ch_bit_map
rdma_ch_bit_map can be reused for wrdma channel allocations as wrdma
channel numbering start after rdma channel numbers.
With capture support referring rdma_ch_bit_map for wrdma channel allocation
is confusing, so renaming rdma_ch_bit_map to dma_ch_bit_map makes sense.
This patch updates the internal dma allocation callbacks to take the
stream direction so that it can allocate channels suitable for that
stream direction. Before the capture support this was not necessary.
ASoC: qcom: rename rdmactl_audif_start to dmactrl_audif_start
This patch renames rdmactl_audif_start to dmactrl_audif_start as this
is common for both rdma and wrdma. Without this patch the name would be
bit misleading to the readers.
There is no point in having local allocation functions when the driver
can use snd_dma_alloc/free() apis. This patch replaces the local versions
of the dma allocation apis with the snd_dma_alloc/free() apis.
This patch adds msm8x16-wcd codec support which has been tested for
Audio In using Headset Mic/Secondary Mic/Primary Mic and Audio out via
Speaker/Headset.
Bjorn Andersson [Mon, 11 Jan 2016 18:33:27 +0000 (10:33 -0800)]
wcn36xx: Disable power save for now
Enabling power save results in extremely long ping times and stalling
transfers. So disable it for not until we can figure out how to work
around this.
Jason Mobarak [Tue, 11 Mar 2014 22:49:01 +0000 (15:49 -0700)]
wcn36xx: don't pad beacons for mesh
Patch "wcn36xx: Pad TIM PVM if needed" has caused a regression in mesh
beaconing. The field tim_off is always 0 for mesh mode, and thus
pvm_len (referring to the TIM length field) and pad are both incorrectly
calculated. Thus, msg_body.beacon_length is incorrectly calculated for
mesh mode. Fix this.
Signed-off-by: Jason Mobarak <jam@cozybit.com> Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@cozybit.com>
Pontus Fuchs [Mon, 17 Feb 2014 07:36:13 +0000 (08:36 +0100)]
wcn36xx: Copy all members in config_sta v1 conversion
When converting to version 1 of the config_sta struct not all
members where copied. This fixes the problem of multicast frames
not being delivered on an encrypted network.
Pontus Fuchs [Mon, 17 Feb 2014 20:20:53 +0000 (21:20 +0100)]
wcn36xx: Add helper macros to cast sta to priv
While poking at this I also change two related things. I rename one
variable to make the names consistent. I also move one assignment of
priv_sta to the declaration to save a few lines.
Pontus Fuchs [Mon, 10 Feb 2014 20:33:54 +0000 (21:33 +0100)]
wcn36xx: Pad TIM PVM if needed
The wcn36xx FW expects a fixed size TIM PVM in the beacon template. If
supplied with a shorter than expected PVM it will overwrite the IE
following the TIM.
Fengwei Yin [Sun, 20 Dec 2015 13:20:41 +0000 (21:20 +0800)]
wcn36xx: split DMA mask register writing.
Per comments from Bjorn Andersson <bjorn.andersson@sonymobile.com>,
split DMA mask register writing as seperate patch in case we need
bi-sect in the furture.
Fengwei Yin [Sun, 20 Dec 2015 13:20:40 +0000 (21:20 +0800)]
wcn36xx: handle rx skb allocation failure to avoid system crash
Lawrence reported that git clone could make system crash on a
Qualcomm ARM soc based device (DragonBoard, 1G memory without
swap) running 64bit Debian.
It's turned out the crash is related with rx skb allocation
failure. git could consume more than 600MB anonymous memory.
And system is in extremely memory shortage case.
But driver didn't handle the rx allocation failure case. This patch
doesn't submit skb to upper layer if rx skb allocation fails.
Instead, it reuse the old skb for rx DMA again. It's more like
drop the packets if system is in memory shortage case.
With this change, git clone is OOMed instead of system crash.
Reported-by: King, Lawrence <lking@qti.qualcomm.com> Signed-off-by: Fengwei Yin <fengwei.yin@linaro.org>
Merge branch 'tracking-qcomlt-wcnss' into integration-linux-qcomlt
* tracking-qcomlt-wcnss: (21 commits)
wcn36xx: avoid alloc mem with GFP_KERNEL in smd callback.
wcn36xx: eliminate the warning for unsupported SMD_EVENT
wcn36xx: Update the smd client driver to use new smd channel match method.
Bluetooth: btqcomsmd: Qualcomm WCNSS HCI driver
Bluetooth: Add HCI device identifier for Qualcomm SMD
Migrate the wifi driver from old smd driver to new smd driver.
Update the initialization sequence to enable DB410c.
Set the dma mask for platform device which is not created from DT.
Got workable wireless driver.
wcn36xx: add later fw capabilities
net wireless wcn36xx adapt wcnss platform to select module by DT
net wireless wcn36xx add wcnss platform code
wcn3620: use new response format for wcn3620 remove_bsskey
wcn3620: use new response format for wcn3620 trigger_ba
wcn36xx: handle new hal response format
wcn36xx: remove powersaving for wcn3620
wcn36xx: swallow two wcn3620 IND messages
wcn36xx: introduce WCN36XX_HAL_AVOID_FREQ_RANGE_IND
wcn36xx: use 3680 dxe regs for 3620
wcn36xx: get chip type from platform ops
...
Merge branch 'tracking-qcomlt-power-regulator' into integration-linux-qcomlt
* tracking-qcomlt-power-regulator:
cpufreq-dt: Add missing rcu_read_lock() for find_device_opp()
cpufreq-dt: Add L2 frequency scaling support
pwer:avs: cpr: fix with new reg_sequence structures
power: avs: cpr: Fix Duplicate OPPs warning
power: avs: Register CPR with cpufreq-dt
power: avs: cpr: Use raw mem access for qfprom
power: avs: Add support for CPR (Core Power Reduction)
cpufreq-dt: Handle OPP voltage adjust events
OPP: Allow notifiers to call dev_pm_opp_get_{voltage, freq} RCU-free
PM / OPP: Support adjusting OPP voltages at runtime
Merge branch 'tracking-qcomlt-mainline-rpm-smd-pil' into integration-linux-qcomlt
* tracking-qcomlt-mainline-rpm-smd-pil: (65 commits)
Move to new qcom_smem_get() api
Fix: Make it buildable on v4.3
soc: qcom: Stub IPCRTR client driver
soc: qcom: rpm_log: Add rpm log driver
soc: qcom: Add msm_bus driver
remoteproc: tz: Allow no scm clocks support
WIP: remoteproc: HACK to get it working on DB410c
WIP: remoteproc: q6: add support to scm restart
WIP: remoteproc: q6: add support to memory-region
WIP:remoteproc:q6pil: add segment_is_loadable and segment_is_relocatable macros
WIP: remoteproc: q6: remove some commented out code
soc: qcom: smd: Support opening additional channels
soc: qcom: smd: Support multiple channels per sdev
soc: qcom: smd: Refactor channel open and close handling
soc: qcom: smd: Split discovery and state change work
soc: qcom: smd: Introduce callback setter
soc: smd: Migrate the wifi driver from old smd driver to new smd driver.
qcom-smd-rpm: Add MSM8916 support
gpio:smp2p:qcom: kill set_irq_flags and use genirq
remoteproc: tz_pil: skip waiting ready irq if it not provided
...
Merge branch 'tracking-qcomlt-dsi' into integration-linux-qcomlt
* tracking-qcomlt-dsi:
drm/msm/mdp5: Update bus scaling support
drm/msm/dsi: Update the "vdd" voltage range
drm/msm: remove pm_runtime_put() calls
mdp4: Add iommu detach_dev in error path
HACK: drm/msm/mdp5: Make sure mdp5 clocks aren't disbaled when we need them
drm/msm/dsi: Don't call hpd helper unconditionally
drm/msm/dsi: Remove incorrect warning on host attach
drm/msm/dsi: Add a delay when performing software reset
drm/msm/dsi: Parse lane swap information from DT
Merge branch 'tracking-qcomlt-i2c' into integration-linux-qcomlt
* tracking-qcomlt-i2c:
i2c: qup: Remove verbose messages.
i2c: qup: Add bam dma capabilities
i2c: qup: Transfer each i2c_msg in i2c_msgs without a stop bit
i2c: qup: Add V2 tags support
qup: i2c: factor out common code for reuse
i2c: qup: Change qup_wait_writeready function to use for all timeouts
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.
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
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
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
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
...
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
ASoC: qcom: use correct device pointer in dma allocation
dev pointer in struct snd_soc_pcm_runtime does not have dma_ops set. In
v4.4 kernel dma_ops would end up pointing to dummy_dma_ops in such cases.
So attempting to use such device in allocating coherent memory on aarch64
would fail.
According to commit 1dccb598df549d892b6450c261da54cdd7af44b4 ("arm64:
simplify dma_get_ops") The current behavior of dma_get_ops is to fall
back to the global dma_ops when a device has not set its own dma_ops,
but only for DT based systems.
So, this patch fixes the driver to use correct device pointer while
allocating coherent memory, and also deletes un-necessary dma_mask setup
on soc_runtime->dev.
Without this patch lpass driver would fail with below log:
...
[ 6.541542] ADV7533: lpass_platform_alloc_buffer: Could not allocate DMA buffer
[ 6.541914] apq8016-lpass-cpu 7708000.lpass-cpu: ASoC: pcm constructor failed: -12
[ 6.548216] qcom-apq8016-sbc 7702000.sound: ASoC: can't create pcm ADV7533 :-12
[ 6.555581] qcom-apq8016-sbc 7702000.sound: ASoC: failed to instantiate card -12
[ 6.566072] qcom-apq8016-sbc: probe of 7702000.sound failed with error -12
...
On msm8x16 SOCs the codec integration is split into digital and analog
parts, digitial part is integrated with SOC and the analog part is
integrated as part of pmic chip pm8916.
This driver provides basic playback support with lot of todos:
1> Capture support
2> Cleanup
3> Multi button head set support.
4> Impedenace matching logic.
ALSA: pcm: add IEC958 channel status helper for hw_params
Add IEC958 channel status helper that gets the audio properties from
snd_pcm_hw_params instead of snd_pcm_runtime. This is needed to
produce the channel status bits already in audio stream configuration
phase.
ASoC: hdmi-codec: Add hdmi-codec for external HDMI-encoders
The hdmi-codec is a platform device driver to be registered from
drivers of external HDMI encoders with I2S and/or spdif interface. The
driver in turn registers an ASoC codec for the HDMI encoder's audio
functionality.
The structures and definitions in the API header are mostly redundant
copies of similar structures in ASoC headers. This is on purpose to
avoid direct dependencies to ASoC structures in video side driver.
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>