Commit Graph

608716 Commits

Author SHA1 Message Date
William Wu
0c5fe85302 phy: rockchip-inno-usb2: fix a clang warning
This patch fix the following clang warning:
[clang]drivers/phy/rockchip/phy-rockchip-inno-usb2.c:1255:3:
warning: Value stored to 'delay' is never read

Change-Id: I8c70975e1bc2b24a78d0934ccefc9d67fe3a5da9
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-04-16 11:49:41 +08:00
William Wu
b33c8e4b63 usb: dwc_otg_310: hcd: assign reg address to hc_regs
In dwc_otg_hcd_endpoint_disable(), the hc_regs is initialized
to NULL, but never assign a host channel reg address to it,
so the chdis operation can't be handled for ever.

This patch gets a host channenl reg address for hc_regs via
qh->channel->hc_num.

Change-Id: I5917df1975000876d28868ed51e218489ed3d209
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-04-16 11:49:41 +08:00
William Wu
fbd5567d33 phy: rockchip-inno-usb2: reduce the otg schedule delay time
Reduce the otg schedule delay time from 6s to 1s to do
the first time usb charger detection earlier when power
on system with usb cable connect to PC USB. Because the
usb connection willed be disconnectted during usb charger
detection.

And the patch also makes the phy detect the usb disconnetion
more quickly after usb cable plug out.

Change-Id: I9b55317ab3592f517fdf590fea85c4ed403bbd8d
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-04-16 11:49:41 +08:00
Liang Chen
381d236c72 clk: rockchip: mark rkvdec clk as critical clk on rk3228
Change-Id: I08d8eaa8002a955cf38a90b0a750731e7afae63e
Signed-off-by: Liang Chen <cl@rock-chips.com>
2018-04-16 10:45:56 +08:00
Hu Kejun
53219cd8f3 arm64: dts: rockchip: Add rkisp1 for rk3399
Change-Id: Ie0eb7088d08f9c0cbd0443b6f9c635ade9b4cc8f
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-04-13 18:46:31 +08:00
Finley Xiao
c05bc80b87 soc: rockchip: pvtm: Fix the number of channels for px30
Change-Id: Ieaa208baa2abbdc5cc8f341c183587354a202a13
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-04-13 17:06:39 +08:00
William Wu
d26a856c7e phy: rockchip-inno-usb2: open pre-emphasize for rk322x
Open pre-emphasize in non-chirp state for rk322x USB
PHY0 otg port to increase HS slew rate.

Change-Id: Ia565746286a750a251619a83cbbead99c0ddecbd
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-04-13 15:20:29 +08:00
Yifeng Zhao
bde144277c drivers: rk_nand: improve the processing mechanism of nand flash read and write exception
When NAND FLASH reads and writes with UECC, it may lose data.
Add a additional reading process to restore the data.

Change-Id: I08edc0f9f7867266e4e620c463b54f7813f66602
Signed-off-by: Yifeng Zhao <zyf@rock-chips.com>
2018-04-13 14:24:19 +08:00
YouMin Chen
0ddf8164ca arm64: dts: rockchip: rk3399: fix VDD_CENTER to 0.9V
Change-Id: I1226b92fd96be7a86208a9363cc38060115043be
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2018-04-13 14:11:28 +08:00
Rimon Xu
f33a586497 arm64: dts: rockchip: rk3328-evb-android: set cma memory to 32M
When playing secure video, you need to interact with secure OS.
The interaction to secureOS must be a physical continuous memory,
so CMA needs to be used, and now CMA is not enough and 32M is
enough.

Change-Id: Ie665152808a048045e702b3e0e9d9137f30975b5
Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com>
2018-04-12 20:42:47 +08:00
Sandy Huang
eae144a7cc drm/rockchip: vop: update lineflag1 number for ddr freq conver
except rk3368 and rk3328 lineflag1 number should be set before last
active line 1000us, other platform lineflag1 number should be
set at the last active line.

Change-Id: I4598ae79f437e180c4de261894f09b421b473572
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-04-12 09:33:32 +08:00
Zheng Yang
82961381f2 phy: rockchip: inno-hdmi: remove unreasonable code
Change-Id: Ia35359e590c01a696a90f8fdb471f568eb1fd464
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2018-04-11 18:49:12 +08:00
Hu Kejun
ea18c34e39 arm64: dts: rockchip: px30: and dts of rkisp1 and ov5695
Change-Id: I7dccf31cd6b781d53d25a5e53ea6642460cb14ac
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-04-11 18:30:37 +08:00
Hu Kejun
064b747bf0 arm64: dts: rockchip: add dts of rkisp1 for rk3326
Change-Id: I0e6fe49d8560aee7404e9685f9356978b7148c7a
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-04-11 18:30:37 +08:00
Hu Kejun
87dfc62bcb media: i2c: modify ov5695 driver for rkisp1
Change-Id: I31e73224120dcf67d65c833d767f55200a8ed6cb
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-04-11 18:30:37 +08:00
Hu Kejun
440f7f5fde media: rockchip: phy: Support for RK3326
Change-Id: I76d076a110a773a9c1c24742564699900476a8d9
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-04-11 18:30:37 +08:00
Hu Kejun
c16d640f8e media: rockchip: isp: Support for RK3326
Change-Id: Iceca3111e6fd03ea6cd64a3c1fcf9627acc4a8c6
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-04-11 18:30:37 +08:00
Ziyuan Xu
75e03927ee mmc: dw_mmc: add xfer timer for avoid DTO without actual data payload
It has proved the controller has a potention broken state with a DTO
interrupt comes while the data payload is missing, which was not covered
by current software state machine. Add a xfer timer to work around
this buggy behaviour introduced by broken design.

Change-Id: I5019c5ba0cdeb59adcdd3a5231a2000b448762bc
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2018-04-11 16:51:53 +08:00
Zheng Yang
0f160e2bd2 phy: rockchip: inno-hdmi: enable RK3328 phy irq
RK3328 hdmi phy introduces an irq to detect ESD status
of TMDS link. If irq is triggered, it is need to reset
pdata_en signal.

Change-Id: I6190d57d3b4f7c4f6791e1204cb9d8a99da988e2
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2018-04-11 16:51:39 +08:00
Hu Kejun
97ed8ef8c8 media: rockchip: isp1: enable CIF_ISP_CTRL_ISP_CFG_UPD_PERMANENT of isp ctrl register
For those sub modules that have shadow registers in core isp, if
CIF_ISP_CTRL_ISP_CFG_UPD_PERMANENT of isp ctrl is disabled, the
new parameters will not be updated to shadow registers automatically.

BUG=b:36227021
TEST=scarlet can preview, LSC data table can be switched.

Change-Id: I804ddfc45b3c2fca9a6f51627af4264a25075070
Signed-off-by: ZhongYiChong <zyc@rock-chips.com>

Change-Id: I801f49e5b9ff2ec30cfe2cf821904b61174226d5
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-04-11 16:31:00 +08:00
Hu Kejun
e4b5ad1093 media: rockchip: isp1: fix config lsc error
LSC data table size is 17x17, but when configuring data to ISP,
should be aligned to 18x17. That means every last data of last
line should be filled with 0, and not filled with the data of
next line.

BUG=b:36227021
TEST=scarlet can preview.

Change-Id: I5e923529429a1c60efff3827e594f32db7112c1f
Signed-off-by: ZhongYiChong <zyc@rock-chips.com>

Change-Id: Ib7805802fe616635c524ce2b17812cde3012b81a
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-04-11 16:31:00 +08:00
Hu Kejun
ef0e90d8e4 CHROMIUM: media: rockchip-isp1: sort out the locks in isp stats
This sorts out the locks in isp_stats.c to fix the warning of
new work queued when workqueue is draining.

BUG=b:36227021
TEST=camera recording stress on Dru, check not wq timeout

Change-Id: I83597dd6764c7fea861e7e5a2ca4614e074c9821
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>

Change-Id: I5fdc9b1e9913aa1286d70e3342f63008d5b140a0
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-04-11 16:31:00 +08:00
Hu Kejun
ce38205c50 CHROMIUM: media: rockchip-isp1: cleanup alloc_ctx properly
Fix the memleak of alloc_ctx which is allocated twice and
doesn't cleanup properly.

BUG=b:71686724
TEST=check the kmemleak scan result

Change-Id: I17d15bf69bcdb33bb2cf6d446316d268a0df1e96
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>

Change-Id: I9a7e821b2d08c008a6a5a463953281ddee2ba245
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-04-11 16:31:00 +08:00
Hu Kejun
8792e5c8ed media: rockchip: phy: add dphy config
Change-Id: I1dcfbea5dd7b2341a3b3431c20a0552d0ef929ff
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-04-11 16:31:00 +08:00
Hu Kejun
edbc7305b6 CHROMIUM: media: fix module building error of rockchip isp1
Split the Rockchip ISP MIPI DPHY as a standalone driver.

This fix the error of rockchip isp1 and mipi_dphy_sy when
building as modules, "multiple definition of `init_module'".

Since the
  commit 4aa8d9814f21 ("CHROMIUM: media: rockchip/isp1: fixup for different media/v4l API")
merged, this patch also removes the BROKEN flag in
  commit 58d5a7a7ca76 ("CHROMIUM: Mark Rockchip ISP1 driver as BROKEN")

BUG=b:36227021
TEST=make allmodconfig

Change-Id: I7016842bbc97820d260c3200d25cb10b62ba903d
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/851556
Reviewed-by: Ricky Liang <jcliang@chromium.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>

VIDEO_ROCKCHIP_ISP_DPHY_SY part is not included

Change-Id: I8ec9c6af5491511ff88669dbbb302b60f3d43d11
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-04-11 16:31:00 +08:00
David Wu
8e9f6575a9 arm64: dts: rockchip: Add recovery key support for rk3308-evb
If uboot used the kernel dtb, need to enable the recovery key.

Change-Id: I5cc4ad22cc143b4aec04f5e75a5bd9727b208978
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-04-11 14:15:13 +08:00
Zheng Yang
66df6ae0b9 drm: dw-hdmi: fix RK3328/RK3229 phy abnormal enabling
Under the following conditions, phy will be abnormally enabled.

1. HDMI is enabled in uboot.

2. disabled/bridge_is_on/phy.enabled/mc_clkdis were updated to
   work when probe.

3. HDMI is disconnected.

4. drm_helper_probe_single_connector_modes update connector->status
   to disconnected and power off phy by dw_hdmi_update_power. But the
   polled type of HDMI is DRM_CONNECTOR_POLL_HPD, output_poll_execute
   will not process this disconnection, and dw_hdmi_bridge_disable is
   not called, hdmi->disabled is still false.

5. vop will be switch to Tv encoder, and dclk is 27MHz.

6. HDMI is connected.

7. dw_hdmi_update_power is called in dw_hdmi_irq, for hdmi->disabled
   is false, then phy is powered up with parameter of 27MHz, and
   bridge_is_on is set to on.

8. VOP switch to HDMI mode, set the new dclk rate.

9. dw_hdmi_bridge_enable is called, but the bridge_is_on is already on,
   phy will not set again, still maintain the parameters that do not
   conform to the new dclk rate.

This patch introduced an variable initialized to indicate hdmi is
initialized before probe, e.g. uboot. When power off hdmi, initialized
and disabled is updated.

Change-Id: I163967ac02e7f29ab586acbfd25d5a15679470c8
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2018-04-11 14:09:14 +08:00
shengfei Xu
9c40f62785 arm64: dts: rockchip: rk3308-evb: update pwm-regulator parameter
Change-Id: I66c6fe69d8ebeb101e32dae2f425013dab3964c6
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2018-04-11 12:07:57 +08:00
Rocky Hao
938602b807 arm64: dts: rockchip: add cpu's thermal config for rk3308
Change-Id: Ie21e753ac46794bc8f3a56b1f0f2a894d1c65d19
Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
2018-04-10 18:14:04 +08:00
Wang Panzhenzhuan
21ce61fe39 arm64: dts: rockchip: change camera orientation on rk3326-863-cif-sensor
Change-Id: I4097d51f543ac840cbab2929fe5bffdd8d5a26c8
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
2018-04-10 18:00:52 +08:00
Wang Panzhenzhuan
4b007bc0db camera: rockchip: fix rk3326 sample machine camera flip/mirror problem
Change-Id: Iaec3320959aa21df05e5c14f79c9df606077dfef
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
2018-04-10 18:00:26 +08:00
Sugar Zhang
c25ab439ba arm64: dts: rockchip: rk3308-evb-dmic-pdm-v10: enable pdm-m2-clkm
Change-Id: I5a3fb3c958691a0609db09a5b4028481c438435a
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-04-10 15:40:27 +08:00
Sugar Zhang
d03b961457 arm64: dts: rockchip: rk3308: fixup pdm-m2-clkm
Change-Id: Ia9417c5b8713bd371c0eee85da63a6678b78d17c
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-04-10 15:40:27 +08:00
Sugar Zhang
babeb168cc pinctrl: rockchip: fixup pdm-clkm-m2 for rk3308
Change-Id: If3a65e59f3685786220ac7cf00710f666d3a8203
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-04-10 15:40:27 +08:00
Tao Huang
9ac0d29989 arm64: dts: rockchip: disable uart2 on rk3399-android
fiq-debugger use uart2.

Change-Id: Id1225fa871f7a4252011b9c004b68b2f1522abc6
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-04-10 14:38:42 +08:00
Meng Dongyang
27edbe3583 usb: gadget: configfs: send connect detective event when get descriptor
In current code, the connect detective event will be send before the
connect state of controller change. The event is sent when receive
the first setup packet and the connect state of controller is changed
when receive set address command. So if disconnect interrupt trigger
between the first setup packet and set address command, the disconnect
process will not be done, while the application state has been changed
and keep in connected. As a result, the UI may still show the USB connect
option event if the device has been disconnect from PC. This patch send
the connect uevent when get descriptor of configuration which follow
set address command to make sure the application state change after
controller.

Change-Id: Icf2124327db93687b4b644672edb0dbecc8f127a
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
2018-04-10 12:07:10 +08:00
David Wu
305a9ad1ca arm64: dts: rockchip: Add mac node for rk3308-evb
According to the hardware, the mac is not active, so
disable it's status.

Change-Id: I59d6f6232529de3945ce1c766bb7a3c325bdfa8e
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-04-10 12:06:23 +08:00
Dingqiang Lin
7fd54fb7dc arm64: configs: rk3308_linux_defconfig: enable nand driver
Change-Id: Ide7df47c9ccd3db577ac1d258b91361648cbbb8b
Signed-off-by: Dingqiang Lin <jon.lin@rock-chips.com>
2018-04-10 11:53:25 +08:00
Zhaoyifeng
c655c413b2 drivers: rk_nand: update ftl for rk3226, px30 and rk3308
1. fix gc data lost issue.
2. Add debug interface.

Change-Id: I07f572e9ff182dd3cde4080516b13c7de3f2a5bf
Signed-off-by: Yifeng Zhao <zyf@rock-chips.com>
2018-04-10 09:53:16 +08:00
Caesar Wang
2b3fe0f350 arm64: dts: rockchip: add the readable and writable for rk3399 linux
There are some progresses need the readable and writable, when the debian
rootfs brings up.

Change-Id: I0f3b4fab5d591e35f5aacb4901f4e7733e46c306
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2018-04-09 18:23:19 +08:00
Dingqiang Lin
6f32e1d8ba arm64: dts: rockchip: enable nandc for rk3308-evb-v10
Change-Id: I67004a3354496df9a33f14eacc6f40d1fd33b49d
Signed-off-by: Dingqiang Lin <jon.lin@rock-chips.com>
2018-04-09 16:12:03 +08:00
Zheng Yang
0010953e75 ARM: dts: rk3229: remove redundant hdmi phy table
The property rockchip,phy_table is no longer used.

Change-Id: I11a84a0ffaf85d80c1a850abc666cea74f7f6e35
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2018-04-09 14:52:25 +08:00
David Wu
62eb965b90 pinctrl: rockchip: Add IOMUX_WRITABLE_32BIT flag for rk3288 gpio0 iomux
There are writable 32 bits for PMU_GPIO0's iomux, so add the
IOMUX_WRITABLE_32BIT to read iomux register at first, it would
not change others' bits.

Change-Id: I1fb27c60d5d26e5719b6911a78e7cdf144feba26
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-04-09 14:45:06 +08:00
Binyuan Lan
c9d22180e1 arm64: dts: rockchip: add rk3326 ai-va evaluate board
Change-Id: I60b94ad8c05226c574106d879dd32103fa956d9f
Signed-off-by: Binyuan Lan <lby@rock-chips.com>
2018-04-09 14:41:55 +08:00
Wyon Bi
09866a1911 drm/rockchip: vop: slit dither register field definitions
Change-Id: Id6fb68b88641839fa66c01eda980e07b4317b435
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-04-09 10:58:27 +08:00
Binyuan Lan
2bb9ec21ad ASoC: rockchip: rk817-codec: add ext amplifier and loopback support
Change-Id: Icef0c8a72784260b0d49d8260b0f3377e53b953f
Signed-off-by: Binyuan Lan <lby@rock-chips.com>
2018-04-09 10:53:44 +08:00
Sugar Zhang
e31aec5414 arm64: dts: rockchip: rk3308: add reset property for i2s_8ch_0~3
Change-Id: Ib70a5e31f224916c90f6d51a328164b8995661c7
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-04-09 10:52:12 +08:00
Sugar Zhang
e909c8f5f0 ASoC: rockchip: i2s-tdm: add support for clk-trcm mode.
This patch adds support for clk tx/rx common mode.
rockchip,clk-trcm: tx and rx lrck/bclk common use.
- 0: both tx_lrck/bclk and rx_lrck/bclk are used
- 1: only tx_lrck/bclk is used
- 2: only rx_lrck/bclk is used

Change-Id: I7342ed25b0573bfc0ce0785838d5ee192ca6300d
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-04-09 10:49:29 +08:00
Sandy Huang
3ac2bdcfa0 arm64: dts: rockchip: enable uboot logo for rk3308-evb-ext board
Change-Id: I849d03ff50f6573e2d377a507e3fa8d2592be785
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-04-09 10:01:26 +08:00
Tao Huang
0b3ed0efcd Merge branch 'linux-linaro-lsk-v4.4-android' of git://git.linaro.org/kernel/linux-linaro-stable.git
* linux-linaro-lsk-v4.4-android: (395 commits)
  Linux 4.4.126
  net: systemport: Rewrite __bcm_sysport_tx_reclaim()
  net: fec: Fix unbalanced PM runtime calls
  ieee802154: 6lowpan: fix possible NULL deref in lowpan_device_event()
  s390/qeth: on channel error, reject further cmd requests
  s390/qeth: lock read device while queueing next buffer
  s390/qeth: when thread completes, wake up all waiters
  s390/qeth: free netdevice when removing a card
  team: Fix double free in error path
  skbuff: Fix not waking applications when errors are enqueued
  net: Only honor ifindex in IP_PKTINFO if non-0
  netlink: avoid a double skb free in genlmsg_mcast()
  net/iucv: Free memory obtained by kzalloc
  net: ethernet: ti: cpsw: add check for in-band mode setting with RGMII PHY interface
  net: ethernet: arc: Fix a potential memory leak if an optional regulator is deferred
  l2tp: do not accept arbitrary sockets
  ipv6: fix access to non-linear packet in ndisc_fill_redirect_hdr_option()
  dccp: check sk for closed state in dccp_sendmsg()
  net: Fix hlist corruptions in inet_evict_bucket()
  Revert "genirq: Use irqd_get_trigger_type to compare the trigger type for shared IRQs"
  ...

Conflicts:
	include/linux/usb/quirks.h

Change-Id: I125065cef66846e4cdee799f4b34d07c309d353e
2018-04-08 18:28:30 +08:00