Commit Graph

596718 Commits

Author SHA1 Message Date
Elaine Zhang
adebb103c7 regulator: lp8752: add set_voltage_time_sel func
support delay time in microseconds required to
rise or fall to this new voltage

Change-Id: I1f7c77356e650b9ff01ad0e63fd384e25f774eac
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2016-10-10 20:19:36 +08:00
wenping.zhang
9aea250d9d mfd: fusb302: add usb super speed property support.
The meaning of the property value is as below:
The value of the property EXTCON_PROP_USB_SS is 0: USB1.0 or USB2.0
The value of the property EXTCON_PROP_USB_SS is 1: USB3.0

we change the logic of fusb302 notification , if dp sink device is connected, dfp is set to 1,
and use pin assignment value to define if sink device support usb3.0.

Change-Id: Ib7afaf9b754b4585b0ef211dd246059b8ab72904
Signed-off-by: wenping.zhang <wenping.zhang@rock-chips.com>
2016-10-10 20:16:45 +08:00
wjh
bad81ba668 drivers: sound: usb: fix disvr usb Audio bug
The disvr usb audio sampling rate is through nanoc reported to
the kernel, so don't need the kernel again set the sampling rate.

Change-Id: I60409fc579952a196c4fe40f678e87d505a7508d
Signed-off-by: wjh <wjh@rock-chips.com>
2016-10-09 19:15:08 +08:00
Huang Jiachai
7f670e7e26 video: rockchip: rk fb: add hot plug state indicate extent screen state
Change-Id: If7dea36a420ef21763c309d12d64d95574b3dcf3
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
2016-10-09 18:47:36 +08:00
Xubilv
2c2d00abe9 video: rockchip: edp: add support connect to vopl
Change-Id: I13347beed5548b073f616fe94d3b900c19c50c5d
Signed-off-by: Xubilv <xbl@rock-chips.com>
2016-10-09 18:46:20 +08:00
Huang Jiachai
ca39ea0b6d video: rockchip: vop: 3399: fix vop little win1/3 property error
Change-Id: I32580745f0b4ad252225756d793ec7c0247be452
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
2016-10-09 18:42:27 +08:00
Binyuan Lan
7b2fd8b3f5 usb: phy-rockchip-inno-usb2: fix wrong charging state when otg host connect
No need notify charging-external-connector state when otg host connect.

Change-Id: I1d5c6e4fb2ad504f169ef0fd5b82b06f31783922
Signed-off-by: Binyuan Lan <lby@rock-chips.com>
2016-10-09 18:27:16 +08:00
Bin Yang
76830805a1 power: rk818: use EXTCON_USB_VBUS_EN to notify rk818 enable otg
Change-Id: Ica0a28f07d5ca474fb8a8385748a6b4adf9d4b82
Signed-off-by: Bin Yang <yangbin@rock-chips.com>
2016-10-09 18:21:15 +08:00
Bin Yang
c5e75fc60d mfd: fusb302: Add EXTCON_USB_VBUS_EN for fusb302
Some rk3399 board(rk3399 MID or rk3399 VR) is use rk81x generated vbus.
So need fusb302 send a extcon to notify rk818 when OTG or DP cable plugin.

If use EXTCON_USB_HOST, the extcon will notify dwc3 and rk818_charger at
the same time,so need to add a new extcon EXTCON_USB_VBUS_EN.

Change-Id: Ib019ed7c2d4343c50dcef739ab3076f592979ea0
Signed-off-by: Bin Yang <yangbin@rock-chips.com>
2016-10-09 18:20:05 +08:00
Xubilv
4190022d1f video: rockchip: edp: read/write register before pm_runtime_put
Change-Id: I3a6a910857ff4c6921996f625807b4aefc4cd5a1
Signed-off-by: Xubilv <xbl@rock-chips.com>
2016-10-08 20:06:49 +08:00
Kishon Vijay Abraham I
b369a605c8 UPSTREAM: phy: xgene: rename "enum phy_mode" to "enum xgene_phy_mode"
No functional change. Rename "enum phy_mode" to
"enum xgene_phy_mode" in xgene phy driver in
preparation for adding set_mode callback in
phy core.

Change-Id: I7e569e1fb82a308e79d30a80323e0c3c338dd68c
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Reviewed-by: Loc Ho <lho@apm.com>
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
(cherry picked from commit 65048f4dd9)
2016-10-08 17:27:01 +08:00
Wu Liang feng
c9db0eeafd arm64: dts: rockchip: set dwc3 dr_mode as otg for rk3399-box
rk3399-box Type-C0 USB needs to support peripheral mode
and host mode, so we set dr_mode as otg.

Change-Id: If94cdca3ec1d018c3f9aad14bb2c1e15e10e9c51
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
2016-10-08 11:46:13 +08:00
Wu Liang feng
e9cfaddeec usb: dwc3: gadget: fix trb ring full bug
The upstream commit 5e8ec28765 (usb: dwc3: gadget: Handle TRB
index 0 when full or empty) only use the HWO = 1 to check if
the TRB ring is full. But refer to DWC3 databook Version 3.00a,
8.2.3.2 TRB Control Bit Rules: When an OUT endpoint receives a
short packet, some TRBs in a chain may still have their HWO bit
set to 1 while belonging to software.

So if HWO=1 and CSP=1 on OUT endpoint, it also means that TRB
ring is empty, software may reclaim those TRBs even though HWO=1.

TEST=use MTP to transfer big data, and then cancel the transition,
check if it can transfer again.

Change-Id: I45cc683dc733ff7a642cfcd3ebc20455ef677753
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
2016-10-07 16:40:12 +08:00
David Lechner
f17ca45e71 UPSTREAM: phy: Add set_mode callback
The initial use for this is for PHYs that have a mode related to USB OTG.
There are several SoCs (e.g. TI OMAP and DA8xx) that have a mode setting
in the USB PHY to override OTG VBUS and ID signals.

Of course, the enum can be expaned in the future to include modes for
other types of PHYs as well.

Change-Id: Iebc730d7e41c2910fa1be98cbf275d2c73358050
Suggested-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: David Lechner <david@lechnology.com>
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
(cherry picked from commit 300eb0139c)
2016-10-07 16:32:58 +08:00
Bin Yang
c0a875c060 arm64: dts: rockchip: enable ldo5 and ldo6 in suspend for rk3399 mid
Hall-sensor must keep power on in suspend.

Change-Id: I149e6434f793a6686693f2dabe5959814d134c5e
Signed-off-by: Bin Yang <yangbin@rock-chips.com>
2016-10-07 16:10:25 +08:00
Bin Yang
0d543f7452 extcon: Add EXTCON_USB_VBUS_EN for USB Type-C
Add the new extcon EXTCON_USB_VBUS_EN to enable
vbus output.

Change-Id: I83fb75b2a82ad617dc292967bb4917bbfbcb84cb
Signed-off-by: Bin Yang <yangbin@rock-chips.com>
2016-10-07 15:42:26 +08:00
Guenter Roeck
d3b46bb977 UPSTREAM: extcon: Introduce EXTCON_PROP_USB_SS property for SuperSpeed mode
EXTCON_PROP_USB_SS (SuperSpeed)[1] is necessary to distinguish
between USB/USB2 and USB3 connections on USB Type-C cables.

[1] https://en.wikipedia.org/wiki/USB#Overview

Change-Id: Iae845b7e2125291bba0646c7219f485299e7d375
Cc: Chris Zhong <zyw@rock-chips.com>
Signed-off-by: Guenter Roeck <groeck@chromium.org>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
(cherry picked from commit 8df0cfe6c6)
2016-10-07 15:35:19 +08:00
Huang, Tao
f36cb4e3bf extcon: remove EXTCON_PROP_USB_ID property
Fix commit 536277d550 ("FROMLIST: extcon: Add the support for
extcon property according to extcon type"), which introduce
EXTCON_PROP_USB_ID property, but upstream don't have such property.
Remove it make merge easy.

Change-Id: I7905049629aa85158b7e705b40018f83fa85a9ac
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2016-10-07 15:27:44 +08:00
Bin Yang
8131a15d7b arm64: dts: rockchip: enable cdn_dp_fb node for rk3399-mid
Change-Id: I2f2dd5758f449749e5b25dc1c8bb36aa829401f3
Signed-off-by: Bin Yang <yangbin@rock-chips.com>
2016-10-07 15:18:26 +08:00
Jacob Chen
ec6659a06c UPSTREAM: Bluetooth: hci_ldisc: Fix null pointer derefence in case of early data
HCI_UART_PROTO_SET flag is set before hci_uart_set_proto call. If we
receive data from tty layer during this procedure, proto pointer may
not be assigned yet, leading to null pointer dereference in rx method
hci_uart_tty_receive.

This patch fixes this issue by introducing HCI_UART_PROTO_READY flag in
order to avoid any proto operation before proto opening and assignment.

Signed-off-by: Loic Poulain <loic.poulain@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>

Change-Id: Ibe366f3222cbe7a093cd08aaecbc0de1004088c8
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
(cherry picked from commit 84cb3df02a)
2016-10-07 11:35:58 +08:00
Huang Jiachai
91737eb0b5 video: rockchip: vop: 3399: vop lite lut and edp output is 8 bit
Change-Id: Icb333d92713cba2dda14b977ea9c6a1617e88bbf
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
2016-09-30 19:58:11 +08:00
Binyuan Lan
f214b9baf8 mfd: rk808: close rtc int when power off
Change-Id: I1f1bfe3d6c106632c45b51bec3c18361572df865
Signed-off-by: Binyuan Lan <lby@rock-chips.com>
2016-09-30 19:57:32 +08:00
Huang Jiachai
39ac2a068d video: rockchip: vop: 3399: update for cabc
If enable cabc function, close auto gating, because cabc and auto gating
can't enable at the same time, in addition cabc open and close will lead
to splash screen, so when close cabc, we just set stage up and down to 0.

Change-Id: Ia4561d6adafa956c26d1921caecc7eed97dd218a
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
2016-09-30 15:39:13 +08:00
zhangjun
190390b40e arm64: rockchip_defconfig: enable rk_headset
Change-Id: I6644e71b9a1fc5a10a711b55fab3056c4152105c
Signed-off-by: zhangjun <zhangjun@rock-chips.com>
2016-09-30 15:31:52 +08:00
Jianhong Chen
a2b672fd1b power: rk818 charger: fix otg supply on/off error
As we register regmap irq to manage rk818 irqs, it should
not enable/disable irq by modifying register directly. And
check otg on/off line state before setting new state.

Change-Id: I45d45d62bea05b1c489337ac7f3334fbafcd4166
Signed-off-by: Jianhong Chen <chenjh@rock-chips.com>
2016-09-30 15:29:49 +08:00
Jianhong Chen
fffb397c49 power: rk818 charger: remove suspend and resume callback
CHG_CVTLIM_INT is default disabled yet

Change-Id: I07123ad023322e7a88a3b992988980498256b284
Signed-off-by: Jianhong Chen <chenjh@rock-chips.com>
2016-09-30 15:22:32 +08:00
Jianhong Chen
ef3cb3a604 mfd: rk808: add RK818_IRQ_CHG_CVTLIM into rk818 regmap irq
Change-Id: Iae2bf8e6aa86c0fd82b6905c9f37fffe2c719479
Signed-off-by: Jianhong Chen <chenjh@rock-chips.com>
2016-09-30 15:22:08 +08:00
Elaine Zhang
fc6056b76f clk: rockchip: rk3399: fix up the spi softrst ID
fix up the spi3 and spi5 softrst ID.

Change-Id: Ib8870ef765284e04674ce80acf0b4702ed77cebc
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2016-09-29 16:39:02 +08:00
chenzhen
ef0f93264c MALI: midgard: RK: not to power off all the pm cores
This is a workaround for the issue that
"400M, 500M and 600M of clk_gpu needs high vdd_gpu",
according to "6.1" of Mali Application Note
"Potential glitches on Power Domain interfaces".

Change-Id: I58daa3cf796802f073f67bacb62734516be76205
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
2016-09-29 16:38:10 +08:00
Zorro Liu
7be137a0f4 dt-bindings: screen-timing: Add RAYKEN RK055AUWI5003 single channel MIPI screen dts
Change-Id: I2e2e9b30bdb19be765cecd38f31e651872d03e82
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2016-09-29 11:44:44 +08:00
Zorro Liu
f8452e4ab4 dt-bindings: screen-timing: set h381dln01 75fps, add screen-width and screen-hight
Change-Id: I88166845112a2c17c86a44a6c43bdea4ac26347f
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2016-09-29 10:38:06 +08:00
Elaine Zhang
d8cbb1aec8 clk: rockchip: rk3399: fix up the dclk_vop1_div parents
if the dclk_vop0_div allow CLK_SET_RATE_PARENT for VPLL,
the dclk_vop1_div parent is not allowed in vpll.

Change-Id: I9973014e8ed2fcf1c351e3f62c00040677391ff7
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2016-09-29 10:22:44 +08:00
zhangjun
904247b6d7 rk_headset: re-enable driver/headset_observe/
Change-Id: I84a05b94894b0240d8dd6fbd9ef7bc693b933da9
Signed-off-by: zhangjun <zhangjun@rock-chips.com>
2016-09-27 18:14:36 +08:00
Jacob Chen
9a60f35e5e arm64: dts: rk3399: add power-domain property for edp
Change-Id: Ic6df7a80cbb1572725d4b8cbb7b3074bcd28d13c
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-09-27 10:17:30 +08:00
Huibin Hong
7f436b9cf7 ARM64: dts: rk3399-android: Set ramoops_mem size to 0xf0000
Change-Id: I3c0c4a51ed2ff19e4baad17349e3e87efc43a2f6
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2016-09-26 19:04:07 +08:00
Huibin Hong
c26a25a7fd ARM64: dts: rk3399-android-next: Set ramoops_mem size to 0xf0000
Change-Id: I69c2416fb07b4364f1e02fe21be351771b1b6c6b
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2016-09-26 19:04:06 +08:00
lanshh
245ae3931a drivers: iio: imu: fix initial screen offset when switch app
Change-Id: Ia65b4b5e03b712d0c69546d69ea7b4364f30b05b
Signed-off-by: lanshh <lsh@rock-chips.com>
2016-09-26 18:35:39 +08:00
Huibin Hong
087633170d rk_fiq_debugger: Reset and set uart to loopback mode before init
The uart may be reinitialized when resume, if uart is in busy
state, which would fail to configure the baud rate. So reset
and set uart to loopback mode can make sure uart is in idle
state.

Change-Id: I54d9ac8de1531cd06da8c223583cd2e330178eff
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2016-09-26 18:33:23 +08:00
Bin Yang
97ff73ffbc arm64: rockchip_defconfig: enable hall sensor mh248
Change-Id: Id2818a07865e114f45f57b2bb5a70bb886d7fc38
Signed-off-by: Bin Yang <yangbin@rock-chips.com>
2016-09-26 18:09:06 +08:00
Huang, Tao
c682b23147 input: sensors: hall: do not enable hall default
Change-Id: I773b1cd05b8cf5aef26035f356732b3a487fc6e0
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2016-09-26 16:03:13 +08:00
Meng Dongyang
ad23b5c8bd usb: dwc3: unregister extcon notify if probe fail
When the pointer of hcd is NULL, dwc3 driver will probe again. In this
case the notify sync function will issue "Bad mode in Synchronous Abort
handler detected" error if the extcon notify is not unregisted before
next probe. This patch add unregister extcon notify function and
unregister extcon notify when hcd is NULL.

Change-Id: Id55ce4280518e0c7e36a64133e38189bb4a7d29e
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
2016-09-25 16:12:08 +08:00
David Wu
63e8d019d4 input: keyboard: rk_keys: Add support for configuring adc drift value from DT
If the adc drift value is 70, some keys maybe report twice, because
the range of adc_value +/-70 is overlapping other keys' adc range.
So it is better configuring adc drift value from DT, that also can
support more keys at a adc channel. The default adc drift value is
70, if it does not get the drift value from DT.

Change-Id: I46cef235094116d4f03af5e5c0cd3a6dfe7e8b0d
Signed-off-by: David Wu <david.wu@rock-chips.com>
2016-09-24 14:36:06 +08:00
Meng Dongyang
7f7a1313ef usb: u2phy: add support for otg function
In the case of platform designed in usb2.0 only mode, which
the dwc3 controller connect without fusb302 and type-c phy
does not work, the u2phy need to support hot plug and detect
otg mode, this patch add support of otg function in this mode.

Change-Id: I428a4f6d17d847c6114d124733e62c0a6236b94e
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
2016-09-23 21:41:32 +08:00
Meng Dongyang
5c2303a10b usb: dwc3: fix logical error during controller probe
The probe function of usb controller will remove hcd struct in host
or otg mode, while the hcd is alloced after xhci driver registed. So
there is a logical error if xhci driver is registed after usb
controller and it results in the pointer of hcd point to NULL. This
patch make usb controller probe again if hcd point to NULL.

Change-Id: I659f86decac59fca610b355356fc971b3a86d4be
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
2016-09-23 18:26:06 +08:00
zain wang
fe2fc59322 mfd: fusb302: correct the wrong pointer type used in regmap_read
used unsigned int pointer that regmap_read wanted instead of unsigned char
pointer

Change-Id: I89f838144a4d27a3bf695232acc4dbbe920863bf
Signed-off-by: zain wang <wzz@rock-chips.com>
2016-09-23 17:13:41 +08:00
xiaoyao
3527e57090 HACK: mmc: core: fix switching clk 400K to 52/200M status error
Change-Id: I56285d306e8e3a52039a7612fae666ed40117a4a
Signed-off-by: xiaoyao <xiaoyao@rock-chips.com>
2016-09-23 17:11:07 +08:00
xiaoyao
65b3ac3a8c mmc: sdhci-of-arasan: add sdhci_arasan_voltage_switch for arasan,5.1
Per the vendor's requirement, we shouldn't do any setting for
1.8V Signaling Enable, otherwise the interaction/behaviour between
phy and controller will be undefined. Mostly it works fine if we do
that, but we still see failures. Anyway, let's fix it to meet the
vendor's requirement. The error log looks like:

 [   93.405085] mmc1: unexpected status 0x800900 after switch
 [   93.408474] mmc1: switch to bus width 1 failed
 [   93.408482] mmc1: mmc_select_hs200 failed, error -110
 [   93.408492] mmc1: error -110 during resume (card was removed?)
 [   93.408705] PM: resume of devices complete after 213.453 msecs

Change-Id: Icc5457355c3f57b84bd6073f0c4e01350bcc9ee6
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: xiaoyao <xiaoyao@rock-chips.com>
2016-09-23 17:10:28 +08:00
xiaoyao
5b0edb353a mmc: core: changes frequency to hs_max_dtr when selecting hs400es
Per JESD84-B51 P69, Host need to change frequency to <=52MHz after
setting HS_TIMING to 0x1, and host may changes frequency to <= 200MHz
after setting HS_TIMING to 0x3. It seems there is no difference if
we don't change frequency to <= 52MHz as f_init is already less than
52MHz. But actually it does make difference. When doing compatibility
test we see failures for some eMMC devices without changing the
frequency to hs_max_dtr. And let's read the spec again, we could see
that "Host may changes frequency to 200MHz" implies that it's not
mandatory. But the "Host need to change frequency to <= 52MHz" implies
that we should do this.

Change-Id: I1dc9f5fa8dc217e033fc4b1689ca1b0204c294c0
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: xiaoyao <xiaoyao@rock-chips.com>
2016-09-23 17:08:41 +08:00
xiaoyao
09c5c21b64 mmc: core: switch to 1V8 or 1V2 for hs400es mode
When introducing hs400es, I didn't notice that we haven't
switched voltage to 1V2 or 1V8 for it. That happens to work
as the first controller claiming to support hs400es, arasan(5.1),
which is designed to only support 1V8. So the voltage is fixed to 1V8.
But it actually is wrong, and will not fit for other host controllers.
Let's fix it.

Change-Id: I982bf34b3d305123ab7debd858e60f2454123c24
Fixes: commit 81ac2af657 ("mmc: core: implement enhanced strobe support")
Cc: <stable@vger.kernel.org> 4.4# +
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: xiaoyao <xiaoyao@rock-chips.com>
2016-09-23 17:07:55 +08:00
Ziyuan Xu
a586397e80 mmc: core: don't try to switch block size for dual rate mode
Per spec, block size should always be 512 bytes for dual rate mode,
so any attempts to switch the block size under dual rate mode should
be neglected.

Change-Id: I6ede0d8fd6c7b8e4903a51c1c2a1b96d350bd2e2
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: xiaoyao <xiaoyao@rock-chips.com>
2016-09-23 17:06:40 +08:00