power: qpnp-charger: Use the BUCK_CTRL_TRIM1 to adjust VDDMAX

When the battery is charging, the buck regulates a set voltage at the
battery terminals. This is set by the software in the charger
peripheral's VDDMAX register.

The charger's VDDMAX setting has a 20 millivolt resolution. This is
not enough, as being even 10mV over the max battery voltage can cause
the battery over voltage protection circuits to disconnect the
battery.

Use the buck's BUCK_CTRL_TRIM1 MSB's VDDMAX trim to adjust the VDDMAX
instead, providing a charging voltage resolution of 10mV, resolving
this issue.

Change-Id: I5e87b996d48286e69e58335ac18ef9ffda7c6fc0
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
ARM: dts: msm: enable ovp monitor for 8226 qrd

Enable ovp status monitor for high voltage charger.

Change-Id: I95f33dfa8bffc69d2878089d368b03477f8c054d
Signed-off-by: Wu Fenglin <fenglinw@codeaurora.org>
ARM: dts: msm: Update flash LED headroom and startup delay

Per PMIC system suggestion, headroom should be set to 500mV and
startup delay should be set to 128us to avoid any potential issue.

Change-Id: Iae8d866adde573ddf775b528896dd9a5e9bcd9dd
Signed-off-by: Chun Zhang <chunz@codeaurora.org>
power: qpnp-charger: add charger OVP status monitor

Enable coarse-det-usb irq for charger OVP monitor. When insert a
high voltage charger, coarse-det-usb irq trigger, after wait for
usb valid debounce time, check the OVP condition, and report usb
health state; When an OVP happened in the process of charging, a
falling usbin valid_irq trigger, check OVP condition in usb plug out
condition, and report the usb health state.

Change-Id: Idedcdd7084aa24505675cf016d869444a89ca46c
Signed-off-by: Wu Fenglin <fenglinw@codeaurora.org>
Merge "ARM: dts: msm: Update flash LED headroom and startup delay"
Merge "power: qpnp-charger: Use the BUCK_CTRL_TRIM1 to adjust VDDMAX"
Merge "power: qpnp-charger: add charger OVP status monitor"
Merge "ARM: dts: msm: enable ovp monitor for 8226 qrd"
ARM: dts: msm8226: Add common dts file for qrd skuf

Add common dts file for qrd skuf to avoid duplicate
modification in v1 and v2.

Conflicts:

	arch/arm/boot/dts/msm8226-v1-qrd-skuf.dts
	arch/arm/boot/dts/msm8226-v2-qrd-skuf.dts

Change-Id: I436bb75fd3d2d526a439537cc4d63d22642fe639
Signed-off-by: Maria Yu <aiquny@codeaurora.org>
ARM: dts: msm8226: Add skuf pvt device tree

SKUF PVT device will use different pmic version
and which have different hardware design need to
be distinguished with original DVT and EVT.

Change-Id: I5411706650414ee628839d854c6a897fe77146b8
Signed-off-by: Maria Yu <aiquny@codeaurora.org>
ARM: dts: msm8226: Move Rsense setting to skuf v2 dts file

Move the external Rsense setting for BMS && IADC driver from common dts
file to V2 dts file, because only V2 pmic hardware using external
Rsense.

Conflicts:

	arch/arm/boot/dts/msm8226-v2-qrd-skuf.dts

Change-Id: I8c4b229986dabe31a9d49394efd056bb1fb8644b
Signed-off-by: Wu Fenglin <fenglinw@codeaurora.org>
Merge "ARM: dts: msm8226: Add common dts file for qrd skuf"
Merge "ARM: dts: msm8226: Add skuf pvt device tree"
Merge "ARM: dts: msm8226: Move Rsense setting to skuf v2 dts file"
Revert "ARM: dts: msm8226: Move Rsense setting to skuf v2 dts file"

This reverts commit 5f61696a87782196a4601042b8e4f6ea712d8767

Change-Id: Iea3eaf6b66d6a96d1dc1442bd7719a1df16d5586
Merge "Revert "ARM: dts: msm8226: Move Rsense setting to skuf v2 dts file""
ARM: dts: msm8226: add something missing in v2

fix the merged conflict solving

Conflicts:

	arch/arm/boot/dts/msm8226-v2-qrd-skuf.dts

Signed-off-by: Maria Yu <aiquny@codeaurora.org>
Change-Id: I69ef7ac39f2462795faa3c2027af1fdfe035addf
ARM: dts: msm: add support for new 8x26 variants

Several new 8x26 variants now exist. Add support for all these
variants.

Conflicts:
        arch/arm/boot/dts/msm8226-v1.dtsi
        arch/arm/boot/dts/msm8226-v2.dtsi
        arch/arm/boot/dts/msm8926.dtsi

Change-Id: I1716c9f579a49009894e4491718e22ad5b2af074
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
msm: soc: add machine name check for msm8x28

Here change the machine_name when the soc is msm8x28 in setup_arch().
But it will involve the msm related API into the arm boot code in
arch/arm/kernel/setup.c.

Another sulution:
1. Add another DT_MACHINE_START for 8228
2. Select the 8228 machine in setup_machine_fdt() - devtree.c
3. But it will broke the normal machine parsing/matching process. In
another words, we need add msm specific check in common DT parsing process,
which is not accepted.

So adopt the first solution here as a trade-off.

Change-Id: I8693ddda888340ccbc19f4f528fe766ace9e9689
Signed-off-by: Xiaocheng Li <lix@codeaurora.org>
Merge "ARM: dts: msm8226: add something missing in v2"