Commit Graph

3688 Commits

Author SHA1 Message Date
Tony Xie
1c1653f366 mfd: rk808: remove suspend config for rk817&rk809
rk817&rk809 run in auto mode always.

Change-Id: Iaa0f257445e6b0c3bddccbb722c8e36c7086a759
Signed-off-by: Tony Xie <tony.xie@rock-chips.com>
2018-03-05 16:53:13 +08:00
Linus Walleij
8aba7c88ee UPSTREAM: gpio: change member .dev to .parent
The name .dev in a struct is normally reserved for a struct device
that is let us say a superclass to the thing described by the struct.
struct gpio_chip stands out by confusingly using a struct device *dev
to point to the parent device (such as a platform_device) that
represents the hardware. As we want to give gpio_chip:s real devices,
this is not working. We need to rename this member to parent.

This was done by two coccinelle scripts, I guess it is possible to
combine them into one, but I don't know such stuff. They look like
this:

@@
struct gpio_chip *var;
@@
-var->dev
+var->parent

and:

@@
struct gpio_chip var;
@@
-var.dev
+var.parent

and:

@@
struct bgpio_chip *var;
@@
-var->gc.dev
+var->gc.parent

Plus a few instances of bgpio that I couldn't figure out how
to teach Coccinelle to rewrite.

This patch hits all over the place, but I *strongly* prefer this
solution to any piecemal approaches that just exercise patch
mechanics all over the place. It mainly hits drivers/gpio and
drivers/pinctrl which is my own backyard anyway.

Change-Id: Ib178cec5ee519164386cb60ba7f6c3f796e84f0e
Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
Cc: Rafał Miłecki <zajec5@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Cc: Alek Du <alek.du@intel.com>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Acked-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit 58383c7842)
2018-02-28 14:55:00 +08:00
Tao Huang
94cf234d60 mfd: remove unused rk808-irq
Change-Id: I27138971c78d2ed9dae87e887b8804cdf499a69c
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-02-26 17:30:52 +08:00
shengfei Xu
69441faf9e mfd: rk808: rk809 chip name register is same as rk817
Change-Id: I22f5735ab3272a53d2e97012f452c340f16b0bff
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2018-02-10 14:58:46 +08:00
Algea Cao
0b86943d0e mfd: rk1000: Support rk1000 uboot logo
Reading rk1000's register to see whether uboot logo was on.

Change-Id: Iee6d15213f16ccd59136a5cf4f4017f5cd40ab62
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2018-02-09 16:44:58 +08:00
shengfei Xu
75b2bdbcf3 mfd: rk808: fix the shutdown function for rk817
Change-Id: Ieb980e9d2c779821d90061e79cebd302554176fc
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2018-02-09 16:10:50 +08:00
Binyuan Lan
8c4db84a0a ASoC: rockchip: add support for rk817 codec
Change-Id: I4fd64900d3ac0e573371af5ba47a3cb7b83a7c93
Signed-off-by: Binyuan Lan <lby@rock-chips.com>
2018-02-08 21:00:48 +08:00
Tao Huang
8590206686 mfd/fusb302: fix compile warning
drivers/mfd/fusb302.c:1164:3: warning: memset used with length
equal to number of elements without multiplication by element
size [-Wmemset-elt-size]

Change-Id: I33ac6408bc4cee656c7f18948d418527619b3d6b
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-02-08 09:24:58 +08:00
shengfei Xu
92e570a84f power: rk817: support rk817 battery driver
Change-Id: Ie0e2f4baab33949506ef835e068a10610863ab73
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2018-02-05 16:25:34 +08:00
shengfei Xu
90aca5321d power: rk817: support rk817 charger driver
Change-Id: I2c1aca9706ee43f0b119cf775140a11fdb837e47
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2018-02-05 16:22:18 +08:00
tony.xie
4a56c8edc7 mfd: RK817 & RK809: Add new mfd driver for RK817 & RK809
The RK817 & RK809 chip is a power management IC for multimedia and handheld
devices. It contains the following components:

- Regulators
- RTC
- Clkout
- Pinctrl
- Powerkey

The RK817 & RK809 core driver is registered as a platform driver and provides
communication through I2C with the host device for the different
components.

The following is the different between the RK817 and the RK809.
1、The dcdc-buck5 is a boost dcdc for RK817 and is a buck for RK809.
2、The RK817 have one switch but The Rk809 have two.
3、The RK817 have a charger and powerpatch function but RK809 not.

Change-Id: I132029c5b28978db7ae06e13c327a1edf70f5b69
Signed-off-by: Tony Xie <tony.xie@rock-chips.com>
2018-02-05 16:18:20 +08:00
Tao Huang
f9eefeeaa7 rk: add SPDX license identifier to files with no license
Change-Id: I754250669891307b0deab2bdab1bd01512713f79
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-01-31 20:56:06 +08:00
Tao Huang
640193f76b Merge branch 'linux-linaro-lsk-v4.4-android' of git://git.linaro.org/kernel/linux-linaro-stable.git
* linux-linaro-lsk-v4.4-android: (733 commits)
  LSK-ANDROID: memcg: Remove wrong ->attach callback
  LSK-ANDROID: arm64: mm: Fix __create_pgd_mapping() call
  ANDROID: sdcardfs: Move default_normal to superblock
  blkdev: Refactoring block io latency histogram codes
  FROMLIST: arm64: kpti: Fix the interaction between ASID switching and software PAN
  FROMLIST: arm64: Move post_ttbr_update_workaround to C code
  FROMLIST: arm64: mm: Rename post_ttbr0_update_workaround
  sched: EAS: Initialize push_task as NULL to avoid direct reference on out_unlock path
  fscrypt: updates on 4.15-rc4
  ANDROID: uid_sys_stats: fix the comment
  BACKPORT: tee: indicate privileged dev in gen_caps
  BACKPORT: tee: optee: sync with new naming of interrupts
  BACKPORT: tee: tee_shm: Constify dma_buf_ops structures.
  BACKPORT: tee: optee: interruptible RPC sleep
  BACKPORT: tee: optee: add const to tee_driver_ops and tee_desc structures
  BACKPORT: tee.txt: standardize document format
  BACKPORT: tee: add forward declaration for struct device
  BACKPORT: tee: optee: fix uninitialized symbol 'parg'
  BACKPORT: tee: add ARM_SMCCC dependency
  BACKPORT: selinux: nlmsgtab: add SOCK_DESTROY to the netlink mapping tables
  ...

Conflicts:
	arch/arm64/kernel/vdso.c
	drivers/usb/host/xhci-plat.c
	include/drm/drmP.h
	include/linux/kasan.h
	kernel/time/timekeeping.c
	mm/kasan/kasan.c
	security/selinux/nlmsgtab.c

Also add this commit:
0bcdc0987c ("time: Fix ktime_get_raw() incorrect base accumulation")
2018-01-26 19:26:47 +08:00
Tao Huang
5bd9647081 mfd: remove unused rk-rk808 drivers
Change-Id: I3f20b66b9e1c426407d8a09b0a61f7445158f75c
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-01-25 11:11:40 +08:00
Shunqing Chen
9ff817b7ab drm/rockchip: inno_hdmi: add support for rk618
Change-Id: Ic4fcfbc9adec378c67666455e45ae581e3a46ecd
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-01-12 15:03:05 +08:00
Wyon Bi
08d59c7d52 mfd: rk618: add vif subdev
Change-Id: Ib2516da15406e232d5836f7476db935e7343d7d8
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-01-11 16:50:11 +08:00
Joseph Chen
0e7d55e6f0 mfd: rk808: initialize rk808_i2c_client by default
Even "rockchip,system-power-controller" is not found,
rk808_i2c_client is needed for suspend/resume and the
other.

Change-Id: I17ebb3a1d1e7ec8dc9f4a3ee2dbdcd9ae4c1648b
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-01-09 14:34:34 +08:00
Johan Hovold
e7f1c0da02 mfd: twl6040: Fix child-node lookup
commit 85e9b13cbb upstream.

Fix child-node lookup during probe, which ended up searching the whole
device tree depth-first starting at the parent rather than just matching
on its children.

To make things worse, the parent node was prematurely freed, while the
child node was leaked.

Note that the CONFIG_OF compile guard can be removed as
of_get_child_by_name() provides a !CONFIG_OF implementation which always
fails.

Fixes: 37e13cecaa ("mfd: Add support for Device Tree to twl6040")
Fixes: ca2cad6ae3 ("mfd: Fix twl6040 build failure")
Signed-off-by: Johan Hovold <johan@kernel.org>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-02 20:33:20 +01:00
Johan Hovold
ee54e7a18e mfd: twl4030-audio: Fix sibling-node lookup
commit 0a423772de upstream.

A helper purported to look up a child node based on its name was using
the wrong of-helper and ended up prematurely freeing the parent of-node
while leaking any matching node.

To make things worse, any matching node would not even necessarily be a
child node as the whole device tree was searched depth-first starting at
the parent.

Fixes: 019a7e6b7b ("mfd: twl4030-audio: Add DT support")
Signed-off-by: Johan Hovold <johan@kernel.org>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-02 20:33:20 +01:00
Jon Hunter
381d368c99 mfd: cros ec: spi: Don't send first message too soon
commit 15d8374874 upstream.

On the Tegra124 Nyan-Big chromebook the very first SPI message sent to
the EC is failing.

The Tegra SPI driver configures the SPI chip-selects to be active-high
by default (and always has for many years). The EC SPI requires an
active-low chip-select and so the Tegra chip-select is reconfigured to
be active-low when the EC SPI driver calls spi_setup(). The problem is
that if the first SPI message to the EC is sent too soon after
reconfiguring the SPI chip-select, it fails.

The EC SPI driver prevents back-to-back SPI messages being sent too
soon by keeping track of the time the last transfer was sent via the
variable 'last_transfer_ns'. To prevent the very first transfer being
sent too soon, initialise the 'last_transfer_ns' variable after calling
spi_setup() and before sending the first SPI message.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Brian Norris <briannorris@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Acked-by: Benson Leung <bleung@chromium.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-02 20:33:20 +01:00
Joseph Chen
94a7fc2cbd mfd: rk808: power off system in syscore shutdown
For PMIC that power off supplies by write register via i2c bus,
it's better to do power off at syscore shutdown.

Because when run to kernel's "pm_power_off" call, i2c may has
been stopped or PMIC may not be able to get i2c transfer while
there are too many devices are competiting.

This patch effects on PMIC: RK808/RK818/RK816, not including RK805
which power off system by pull up pmic sleep pin in ATF.

Change-Id: I116f79dc91f6f10c6d8070a9168eea44954bf01f
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2017-12-28 16:35:54 +08:00
Wyon Bi
2ef4ee93f4 mfd: Add support for rk618
RK618 is a partner chip for Rockchip mobile application processor.

RK618 includes two RGB display input interface with double data rate.
With the internal MUX function, it can output 1080P HDMI signal to
TV and output RGB/LVDS/MIPI signal to TFT panel. In this case, RK618
can support dual panel (TV and TFT) display.

RK618 includes a audio codec, which with two I2S/PCM interface, two
differential microphone input and audio processing function.

Change-Id: Id18c251cbe1613de98e84c2b022826f85b3dd82b
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2017-12-21 10:29:40 +08:00
Tao Huang
afd240d168 Merge branch 'linux-linaro-lsk-v4.4-android' of git://git.linaro.org/kernel/linux-linaro-stable.git
* linux-linaro-lsk-v4.4-android: (510 commits)
  Linux 4.4.103
  Revert "sctp: do not peel off an assoc from one netns to another one"
  xen: xenbus driver must not accept invalid transaction ids
  s390/kbuild: enable modversions for symbols exported from asm
  ASoC: wm_adsp: Don't overrun firmware file buffer when reading region data
  btrfs: return the actual error value from from btrfs_uuid_tree_iterate
  ASoC: rsnd: don't double free kctrl
  netfilter: nf_tables: fix oob access
  netfilter: nft_queue: use raw_smp_processor_id()
  spi: SPI_FSL_DSPI should depend on HAS_DMA
  staging: iio: cdc: fix improper return value
  iio: light: fix improper return value
  mac80211: Suppress NEW_PEER_CANDIDATE event if no room
  mac80211: Remove invalid flag operations in mesh TSF synchronization
  drm: Apply range restriction after color adjustment when allocation
  ALSA: hda - Apply ALC269_FIXUP_NO_SHUTUP on HDA_FIXUP_ACT_PROBE
  ath10k: set CTS protection VDEV param only if VDEV is up
  ath10k: fix potential memory leak in ath10k_wmi_tlv_op_pull_fw_stats()
  ath10k: ignore configuring the incorrect board_id
  ath10k: fix incorrect txpower set by P2P_DEVICE interface
  ...

Conflicts:
	drivers/media/v4l2-core/v4l2-ctrls.c
	kernel/sched/fair.c

Change-Id: I48152b2a0ab1f9f07e1da7823119b94f9b9e1751
2017-12-01 11:04:13 +08:00
shengfei Xu
50f088463d mfd: rk808: fix the rtc resource for rk816
Change-Id: Ia237fbd0bb63b1e8ccad3b95240251d8d4ded533
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2017-11-24 10:21:42 +08:00
Joseph Chen
b6f8d1d25b mfd: rk808: add rk818 suspend/resume registers setting
set 3.4v interrupt signal assert when suspend, set 3.0v shutdown
signal assert when resume.

Change-Id: Id15b721bbdc9665a18cf9946b92c435a23f1666c
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2017-11-22 09:21:15 +08:00
Joseph Chen
9ad17c3dbf mfd: rk808: add rk816 suspend/resume registers setting
set 3.4v interrupt signal assert when suspend, set 3.0v shutdown
signal assert when resume.

Change-Id: Ie91d8ce6a79e5ea50b654ea52c3ed8acf047f8fb
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2017-11-22 09:21:15 +08:00
Joseph Chen
3599b49698 mfd: rk808: fix position typo of mask and value for rk816
Change-Id: I29fa67327b18a6c3cd2a22d223a30c7546c7ffac
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2017-11-22 09:21:15 +08:00
Zhou weixin
024b72d737 mfd: rk808: set buck4 output ripple voltage 3%
Change-Id: I6db5db62edb0a8e1e543f8ff6c021b6dbca475b2
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Signed-off-by: Zhou weixin <zwx@rock-chips.com>
2017-11-16 09:37:09 +08:00
Hans de Goede
f9776d7ee5 mfd: axp20x: Fix axp288 PEK_DBR and PEK_DBF irqs being swapped
[ Upstream commit 1af468ebe4 ]

The R in PEK_DBR stands for rising, so it should be mapped to
AXP288_IRQ_POKP where the last P stands for positive edge.

Likewise PEK_DBF should be mapped to the falling edge, aka the
_N_egative edge, so it should be mapped to AXP288_IRQ_POKN.

This fixes the inverted powerbutton status reporting by the
axp20x-pek driver.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-08 10:06:29 +01:00
Linus Walleij
8800aba502 mfd: ab8500-sysctrl: Handle probe deferral
[ Upstream commit 7e9c40c639 ]

In the current boot, clients making use of the AB8500 sysctrl
may be probed before the ab8500-sysctrl driver. This gives them
-EINVAL, but should rather give -EPROBE_DEFER.

Before this, the abx500 clock driver didn't probe properly,
and as a result the codec driver in turn using the clocks did
not probe properly. After this patch, everything probes
properly.

Also add OF compatible-string probing. This driver is all
device tree, so let's just make a drive-by-fix of that as
well.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-08 10:06:29 +01:00
Joseph Chen
029f5a92bc mfd: rk808: add rk816-battery child cell of rk816s
Change-Id: I6a6a1c05be947f9084f80e7357b32b1708b27c57
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2017-10-25 14:38:27 +08:00
Joseph Chen
248c73b6b3 mfd: rk808: add rk816 battery regmap irq chip
Due to different irq_reg_stride of register, add individual
irq chip for battery.

Change-Id: Ic37b136ebc543d4f7bd22d5748b59df73526ccbe
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2017-10-25 14:38:02 +08:00
zain wang
fc19dcd36a mfd: fusb302: bring softreset to completion
Change-Id: I27e10b8b9197e6526d3fb59d0a88c28414637a9a
Signed-off-by: zain wang <wzz@rock-chips.com>
2017-10-20 16:22:38 +08:00
zain wang
a026f64e8b mfd: fusb302: Don't send hardreset when hot reset
FUSB302 default cc status is UFP. If we reset the UFP system,
the UFP PD status would be reset, but the DPF can't detecte
the disconnection since cc status did not changed. Reset UFP
would send hardreset to DPF due to wait power caps timeout.
And that would cause the power reset.

So, let's use softreset instead of hardreset in this case.

Change-Id: Ic896597569adb125bea3bf145c5c93712fa77539
Signed-off-by: zain wang <wzz@rock-chips.com>
2017-10-20 16:22:25 +08:00
zain wang
7be531e0bd mfd: fusb302: Add notify when received attention HPD signal
Fix DP drivers can't get the HPD signal changed when DP mode is on.

Change-Id: I0e8eefadb677e956cca4f62a4befa9ee47e7e013
Signed-off-by: zain wang <wzz@rock-chips.com>
2017-10-20 15:33:57 +08:00
Joseph Chen
84445051da mfd: rk808: set rk816 interrupt status and mask register as volatile
Change-Id: I6b0b4d9bb5afcbe201973cf3406819465f26f648
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2017-10-19 14:27:02 +08:00
Joseph Chen
208ce417cb mfd: rk808: add suspend and resume register setting for rk805
Because Buck3 don't have sleep state register, so we need a manual
switch: set BUCK3 suspend as Auto PWM mode and resume as FPWM mode.

This is for power saving in system suspend.

Change-Id: I67db458e650b6e85ed4267f0b0dcdb01dff4c635
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2017-08-17 12:04:07 +08:00
algea.cao
bce841cc7f mfd: rk1000: update mfd rk1000 core driver
RK1000's control register block need mclk for i2c communication.
So mclk should be enabled in advance.
RK1000's control register block should be registered before RK1000
TVE.

Change-Id: Iba9a2a410fe927666072f8d246995462a860ec3a
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2017-08-14 16:42:57 +08:00
Huang, Tao
6ee6d6d68b Merge tag 'lsk-v4.4-17.07-android' of git://git.linaro.org/kernel/linux-linaro-stable.git
LSK 17.07 v4.4-android

* tag 'lsk-v4.4-17.07-android': (402 commits)
  dt/vendor-prefixes: remove redundant vendor
  Linux 4.4.77
  saa7134: fix warm Medion 7134 EEPROM read
  x86/mm/pat: Don't report PAT on CPUs that don't support it
  ext4: check return value of kstrtoull correctly in reserved_clusters_store
  staging: comedi: fix clean-up of comedi_class in comedi_init()
  staging: vt6556: vnt_start Fix missing call to vnt_key_init_table.
  tcp: fix tcp_mark_head_lost to check skb len before fragmenting
  md: fix super_offset endianness in super_1_rdev_size_change
  md: fix incorrect use of lexx_to_cpu in does_sb_need_changing
  perf tools: Use readdir() instead of deprecated readdir_r() again
  perf tests: Remove wrong semicolon in while loop in CQM test
  perf trace: Do not process PERF_RECORD_LOST twice
  perf dwarf: Guard !x86_64 definitions under #ifdef else clause
  perf pmu: Fix misleadingly indented assignment (whitespace)
  perf annotate browser: Fix behaviour of Shift-Tab with nothing focussed
  perf tools: Remove duplicate const qualifier
  perf script: Use readdir() instead of deprecated readdir_r()
  perf thread_map: Use readdir() instead of deprecated readdir_r()
  perf tools: Use readdir() instead of deprecated readdir_r()
  ...

Conflicts:
	Makefile
	drivers/Kconfig
	drivers/Makefile
	drivers/usb/dwc3/gadget.c

Change-Id: Ib4aae2e34ebbf0d7953c748a33f673acb3e744fc
2017-07-26 19:32:04 +08:00
shengfei Xu
ce4e02a88b mfd: rk808: add rk816 support
include sub modules: regulator, rtc, gpio, pwrkey

Change-Id: I59cc4b943403f1e0b1210a314cfcbf61fc193bdf
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2017-07-19 14:33:51 +08:00
Tony Lindgren
e59d911445 mfd: omap-usb-tll: Fix inverted bit use for USB TLL mode
commit 8b8a84c54a upstream.

Commit 16fa3dc75c ("mfd: omap-usb-tll: HOST TLL platform driver")
added support for USB TLL, but uses OMAP_TLL_CHANNEL_CONF_ULPINOBITSTUFF
bit the wrong way. The comments in the code are correct, but the inverted
use of OMAP_TLL_CHANNEL_CONF_ULPINOBITSTUFF causes the register to be
enabled instead of disabled unlike what the comments say.

Without this change the Wrigley 3G LTE modem on droid 4 EHCI bus can
be only pinged few times before it stops responding.

Fixes: 16fa3dc75c ("mfd: omap-usb-tll: HOST TLL platform driver")
Signed-off-by: Tony Lindgren <tony@atomide.com>
Acked-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-26 07:13:09 +02:00
zain wang
d672fca08d mfd: fusb302: move notify to PD startup state
The PD policy would take 5-7s to enter PD disabled state (send
50 times caps, the more bytes of caps cmd, the more time it
takes), So we ough to pick usb notify to PD startup state for
better user experience.

Change-Id: I3b2dc1c5df31296520685ba57e892a30ef3c28aa
Signed-off-by: zain wang <wzz@rock-chips.com>
2017-05-25 11:57:00 +08:00
zain wang
7b793ece1e mfd: fusb302: fix some variable following PD specification
In the spec:
The tTypeCSendSourceCap is defined from 100ms to 200ms.
The nCapsCount is defined 50.

Change-Id: I09bcdb7a83c353ab099d51228cf8ca13e562d839
Signed-off-by: zain wang <wzz@rock-chips.com>
2017-05-25 11:56:35 +08:00
zain wang
8bb22ed2c8 mfd: fusb302: Add is_pd_support to struct fusb30x_chip
As the PD spec, we ough to tell policy engine if the cable
support PD, some state would run depend on this value.

Change-Id: Ied725ecb53f71a5e367b1ca91acd7f23372c54a1
Signed-off-by: zain wang <wzz@rock-chips.com>
2017-05-25 11:56:31 +08:00
Elaine Zhang
356a1db8fe mfd: rk808: add rk808-clkout mfd cell for rk805
support rk805 two clk output,xin32k and rk805-clkout2.

Change-Id: If4f820f53feaf6ab2804f4acd0cce925667b7bc0
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2017-05-16 09:22:49 +08:00
zain wang
7cf052ec4d mfd: fusb302: Don't mistake meaningful packets for Good_CRC
If a partner port sends a packet at approximately the same time as we
send a packet, we may end up with the initial packet followed by the
GOOD_CRC reply in our HW FIFO. Don't automatically discard the first
packet in the FIFO. Instead, discard the packet only if it's a GOOD_CRC
packet. And, modify our get_message function to automatically discard
GOOD_CRC in search of a meaningful packet.

In addition, due to interrupt latency, we can't rely on receiving one
interrupt per incoming packet. If our Rx FIFO is non-empty, assume that
it contains at least one packet.

Change-Id: Iaad80a4c55eea3e9e2791d81d7c5d28ce97bd2f5
Signed-off-by: zain wang <wzz@rock-chips.com>
2017-05-12 18:20:03 +08:00
zain wang
e469f94ad8 mfd: fusb302: ignored the timeout if vdm got the message.
The PD spec define the source should ensure that a message requesting
a response is responded within 30ms(tSenderResponse). But if the
message responded is received close to 30ms, we may hit the case:

tcpm_get_message(); //get the data and close to 30ms
	... takes about 600us, meanwhile the 30ms timer came.
auto_vdm_machine
	vdm_send... //we get the message, but timeout.

So, let's ignored the timeout if we get the message.

Change-Id: I64ced1bd2d32d8ef996dcec27cf35c3e333386f8
Signed-off-by: zain wang <wzz@rock-chips.com>
2017-05-11 15:34:17 +08:00
Elaine Zhang
3a45555460 rk808: rtc: set rtc stopped by default
set rtc stopped by default, start rtc in rtc device probe.
add rtc node, whether RTC need to initialize.

Change-Id: Ifab269786f316d33149a50a18e23af1b6206d57d
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2017-03-28 11:14:53 +08:00
Elaine Zhang
d0d722eff1 mfd: rk818: use rk808-regulator
Change-Id: Ib7150f229a4682b6d0f4c5a6776a9ebc8565d221
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2017-03-07 16:03:03 +08:00
chenjh
2c7a28a62b mfd: rk808: add sysfs debug node "/sys/rk8xx/rk8xx_dbg"
Change-Id: I197dc97b7337414a7d52426da0e0cb8c7480c917
Signed-off-by: chenjh <chenjh@rock-chips.com>
2017-02-17 17:18:56 +08:00