Commit Graph

605518 Commits

Author SHA1 Message Date
Finley Xiao
e8a0df4762 drm/rockchip: Avoid multiple definition
Change-Id: I091eb45fd4ccc30e648d4b743e1f541a8718cc9d
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2017-12-20 14:51:39 +08:00
Zhangbin Tong
98e3aceb3a arm64: rockchip_defconfig: enable CONFIG_GPIO_RK8XX
Change-Id: I484ff31adb057791bacea8b395d672161b9c2ef3
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
2017-12-20 14:46:03 +08:00
Zhangbin Tong
72bce93750 arm64: dts: rockchip: rk3328-evb: set rk805 ldo3 to 1.1v
Change-Id: I677331baecf15c7ac836218819564a79ef198bfd
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
2017-12-20 14:45:35 +08:00
Zhangbin Tong
22fda7a545 arm64: rockchip_defconfig: enable CONFIG_SDCARD_FS
Change-Id: I4ed24c6107032a9cb447f54154335eaf84fd7e3c
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
2017-12-20 14:45:25 +08:00
Wenping Zhang
195d8bc5df ARM: configs: rockchip_linux: add configs for echo board.
enable CX20810, ROTARY_ENCODER and led configs for echo.

Change-Id: Ie12a2a45bcfd21c8d65e8603d9b7163f0b56067b
Signed-off-by: Wenping Zhang <wenping.zhang@rock-chips.com>
2017-12-20 14:44:20 +08:00
Wenping Zhang
71598ceb82 ARM: dts: rk3036-echo: add rk3036 echo board file.
Change-Id: Ic3b920fa36de72cae7ddaa6537de323b367593e4
Signed-off-by: Wenping Zhang <wenping.zhang@rock-chips.com>
2017-12-20 14:40:15 +08:00
Wenping Zhang
c634371a6c ASoC: Add support for cx20810 codec
Change-Id: I659ab6c426304ca1ebb1b0469984d821c9fa276d
Signed-off-by: Wenping Zhang <wenping.zhang@rock-chips.com>
2017-12-20 14:40:01 +08:00
Rocky Hao
b46a22d426 thermal: rk_virtual_thermal: optimize code and fix memleak bug for rk3126
Change-Id: I17b8c673f65863320c65a96830e6583db6eb13f0
Fixes: 6568142f01ac ("thermal: rockchip: add virtual tsadc support for rk3126")
Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
2017-12-20 14:22:05 +08:00
Mayank Rana
63d50ca93e USB: f_fs: Use HS and SS descriptors without checking gadget speed
User space function driver could always provide descriptors for all
speeds irrespective of USB speed supported with USB gadget. If USB
gadget is not high/super speed capable, f_fs driver doesn't parse
HS or SS descriptors which results into OS descriptors processing
fail due to checking against wrong offset within received descriptor
buffer. Fix this issue by always processing HS and SS descriptors
without checking USB gadget speed.

Change-Id: I3b2ad8a4447c06a4302f0ef2c6759cb3f0c09cbd
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(am from https://android.googlesource.com/kernel/msm android-msm-wahoo-4.4-oreo-dr1
 commit 362a9cd1380e16a963c20d453ae14ee3611f3f21)
2017-12-20 14:16:01 +08:00
Jim Lin
ff61ac65de UPSTREAM: usb: gadget: f_fs: Fix kernel panic if use_os_string not set
If c->cdev->use_os_string flag is not set,
don't need to invoke ffs_do_os_descs() in _ffs_func_bind.
So uninitialized ext_compat_id pointer won't be accessed by
__ffs_func_bind_do_os_desc to cause kernel panic.

Change-Id: I7b04774e7bc69ce77e4cffc463d6335bb4bd64e8
Signed-off-by: Jim Lin <jilin@nvidia.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit c6010c8b4d)
2017-12-20 14:11:19 +08:00
Mayank Rana
548b453dcc usb: gadget: f_fs: Update driver to handle compat id descriptors
Extended compat ID descriptor contains fixed-length header section and
one or more function section. Function section contains five fields as:
bFirstInterfaceNumber, Reserved1, compatibleID, subCompatibleID and
Reserved2. Specification suggests that Reserved1 needs to be set as 0x1
but f_fs driver fails processing descriptors if Reserved1 field is 0x1.
This results into USB enumeration issue due to incomplete descriptors.

This issue is seen with newer adbd which is passing extended compat ID
descriptors.

Change-Id: I6c6dae3ab2322bc914e3b04c8a29b4fcab19322f
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(am from git@10.10.10.29/kernel/msm android-msm-wahoo-4.4-oreo-dr1
 commit 1431dc81797891e90c4ea37db4f00665df4fe697)
2017-12-20 14:11:05 +08:00
Huibin Hong
c8d875c9c6 rk_fiq_debugger: disable RLSI interrupt
RDI interrupt is enough, disable RLSI, which can also
reduce the risk of continuous interrupt.

Change-Id: I1946813034cb895e550c5f5ab2aa9647256dda9c
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2017-12-20 14:10:25 +08:00
Huibin Hong
f726197117 fiq_debugger: rockchip: move uart_init to the last
1.When fiq debugger driver probes, and uart rx is pulled low.
The uart interrupt comes so early that uart handler can't be
called. Which makes interrupt come frequently and block the cpu.
2.Remove '<hit enter to activate fiq debugger>'.

Change-Id: I4656d6942bb2cbb0e992852a52bc82f71deadda8
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2017-12-20 14:10:18 +08:00
Sandy Huang
d5417d3cac drm/rockchip: compare mode->flags with uboot config
If output interlace mode, we should compare the mode->flags to
make sure the vop output timing is unchanged.

Change-Id: I98b540a970cbfff2e957bb33506866dc954f3b05
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2017-12-19 17:51:54 +08:00
Sugar Zhang
5efe86359a ASoC: rockchip: pdm: change dma burst to 8
This patch is to avoid fifo xrun in some timing case.

Change-Id: I511ebc4c443f1c3369fff1c4b4eb5faf145d5ae5
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2017-12-19 16:26:46 +08:00
Sugar Zhang
e5f09b47a3 ASoC: rockchip: i2s: change dma burst to 8
This patch is to avoid fifo xrun in some timing case.

Change-Id: I0231030d054e4d3cb861dce8702898decc8ea0af
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2017-12-19 16:24:14 +08:00
Philipp Zabel
14607484a2 UPSTREAM: regmap: add iopoll-like polling macro
This patch adds a macro regmap_read_poll_timeout that works similar
to the readx_poll_timeout defined in linux/iopoll.h, except that this
can also return the error value returned by a failed regmap_read.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit 08188ba882)

Change-Id: I6f358e2b324591b311590e1b421cd7fb69f20cd7
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2017-12-19 09:37:31 +08:00
Tao Huang
94329df8b2 ARM: rockchip_defconfig: update by savedefconfig
Change-Id: I241696b752a70452c7af464f056f23bcbd52a599
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2017-12-18 18:36:07 +08:00
Tao Huang
d00f781fc2 arm64: rockchip_defconfig: update by savedefconfig
Change-Id: I60aff75acb956492a4defd187a3cd374256aacd2
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2017-12-18 18:29:33 +08:00
Sandy Huang
56c68a50e7 drm/rockchip: vop: fix vop_area->area_id define error
1.
before this commit:
	win3-0: DISABLED
	win3-0: DISABLED
	win3-1: DISABLED
	win3-2: DISABLED
after this commit:
	win3-0: DISABLED
	win3-1: DISABLED
	win3-2: DISABLED
	win3-3: DISABLED
2. fix compile error:
    vop_crtc_load_lut() error: uninitialized symbol 'lut_idx'.

Change-Id: I6cd2de972181438004a68d38ffeca939772ddb29
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2017-12-18 16:08:55 +08:00
Xing Zheng
48ec76438e ARM: dts: rk3288-evb-rk1608: using bb io-domain 1.8v
The rk3288-evb-rk1608 hardware using APIO5_VDD 1.8v,
the default 3.3v bb-iomain cause the abnormal waveform
(<1V @24MHz) on the SPI0 bus (GPIO3_B7~B4), even with max
driving strength 12mA. So we need to switch the bb-iodomain
to 1.8v, then the waveform is corrent.

Change-Id: I0fa49e5348897933ee56867ca458ec3aa519bcba
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2017-12-15 20:37:03 +08:00
Peng Zhou
53d1fcd77e arm64: dts: rockchip: rk3368: enable iommu for cif
Change-Id: If80f1a8a0a1e8dceb786568cfd3fdb4a63f82d88
Signed-off-by: Peng Zhou <benjo.zhou@rock-chips.com>
2017-12-15 17:28:12 +08:00
Peng Zhou
c599654dac camera: rockchip: cif: fix fival_list alloc and free
fix fival_list alloc and free with API doesn't match

Change-Id: I4d24a783cf8caaba3aa1575be26078cc7e1336fc
Signed-off-by: Peng Zhou <benjo.zhou@rock-chips.com>
2017-12-15 17:28:01 +08:00
Meng Dongyang
c101690c54 phy: rockchip-inno-usb2: power on phy if host connected when resume
In current code, the id irq will be disabled in suspend, if the otg
cable is connected during suspend, the id interrupt will be missing.
This patch checkout the voltage of id pin, power on phy and turn
on vbus if the otg cable is connected.

Change-Id: I988ecdf12e40fdfbc5360896cfb983879ebe23eb
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
2017-12-15 12:08:16 +08:00
Peng Zhou
3592b98ce3 media: v4l2buf: fix videobuf ext_lock locked
Fixed the videobuf ext_lock locked result no buffer used.

Change-Id: I25384fb79200bd3a9b1e604fd634d7f067168d1c
Signed-off-by: Peng Zhou <benjo.zhou@rock-chips.com>
2017-12-15 09:07:01 +08:00
Tao Huang
f121419cf8 Revert "ANDROID: binder: Add thread->process_todo flag."
This reverts commit 6c70907428.

Which unable to pass
VtsKernelBinderTest#BinderDriverInterfaceTest.Transaction_IPC64_64bit
VtsKernelBinderTest#BinderDriverInterfaceTest.Transaction_IPC64_32bit

frameworks/native/libs/binder/tests/binderDriverInterfaceTest.cpp:84
Value of: ret
 Actual: -1
Expected: expect_ret
Which is: 0
Google Test trace:
frameworks/native/libs/binder/tests/binderDriverInterfaceTest.cpp:252: 1st WriteRead
frameworks/native/libs/binder/tests/binderDriverInterfaceTest.cpp:87
Value of: (*__errno())
 Actual: 11
Expected: expect_errno
Which is: 0
Google Test trace:
frameworks/native/libs/binder/tests/binderDriverInterfaceTest.cpp:252: 1st WriteRead

Change-Id: I982d7a2a8690c9d1ae7533e91bf7d41e814cdc54
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2017-12-15 09:06:15 +08:00
Tao Huang
a979f578cc Revert "ANDROID: binder: clarify deferred thread work."
This reverts commit 3f883f9b5c.

Change-Id: I7b597f826bf975ac2221ee4558c8164408f3fc1b
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2017-12-15 09:06:09 +08:00
Xinhuang Li
2801809213 arm64: dts: rk3328-evb-android: modify spdif_tx from spdifm2_tx to spdifm0_tx
Change-Id: I6e7e82069441a9d1f5a7af1aceb18c901dacffea
Signed-off-by: Xinhuang Li <buluess.li@rock-chips.com>
2017-12-14 18:28:33 +08:00
Caesar Wang
e014552989 ARM: dts: rockchip: remove the psci on rk3036 kylin
As the kylin had not ready supported it during the short time.
Due to kylin enabled the psci will cause crash on bootup.

..
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] Bad mode in prefetch abort handler detected
[    0.000000] Internal error: Oops - bad mode: 0 [#1] SMP ARM
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 4.4.103 #294
[    0.000000] Hardware name: Generic DT based system
[    0.000000] task: c130d040 task.stack: c1300000
[    0.000000] PC is at 0xa60656a8
[    0.000000] LR is at __invoke_psci_fn_smc+0x38/0x44
[    0.000000] pc : [<a60656a8>]    lr : [<c0922234>]    psr: 600001d6

Change-Id: I2edc8d1becc63e932321698b6d4a6090b527a360
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2017-12-14 18:27:41 +08:00
xuhuicong
21622e96da arm64: dts: rk3328-evb-android: enable uboot loader logo display
Change-Id: I138ff0118882d1be11c21cd868d1b142605f6eec
Signed-off-by: xuhuicong <xhc@rock-chips.com>
2017-12-14 15:42:41 +08:00
Caesar Wang
848ba9f9b3 net: wireless: rockchip_wlan: fixes the warning with gcc-7.2 build
when used the arm-linux-gnueabihf-gcc-7.2.1, had the below
warning information:

1) drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/siutils.c:607:14:
    warning: self-comparison always evaluates to false
    [-Wtautological-compare]

2) drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_common.c:3583:16:
    warning: comparison between pointer and zero character constant
    [-Wpointer-compare] error, forbidden warning: dhd_common.c:3583

Change-Id: Ida287252b7f20b17b68365b965edbff63ae7cbf9
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2017-12-14 15:36:23 +08:00
Yankun Zheng
bdf6d5faff ARM: dts: rk3229-at-gva: delete mode-bootloader property
The reboot bootloader flag has been written in misc,
do not need to write in the register

Change-Id: I161b94d554c3a0cb21f6d85b981a247aa1b110ff
Signed-off-by: Yankun Zheng <zyk@rock-chips.com>
2017-12-14 14:30:27 +08:00
Caesar Wang
cd8c778456 net: rfkill: fixes the warning with gcc-7.2 build
when used the arm-linux-gnueabihf-gcc-7.2.1, had the below
warning information:
net/rfkill/rfkill-bt.c:711:5: warning: this ‘if’ clause does not
guard... [-Wmisleading-indentation] error, forbidden warning

Change-Id: I7834078bb731e1115f6e8328a56158b0d9f2991e
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2017-12-14 10:06:09 +08:00
Chen Liang
a9b598724b arm64: dts: rockchip: add core dtsi file for PX30 and RK3326 SoCs
This patch adds core dtsi file for Rockchip PX30 and RK3326 SoCs.

Change-Id: Iccd663330632fddfed30093303aaec7c7a1b8b13
Signed-off-by: Chen Liang <cl@rock-chips.com>
2017-12-14 09:40:08 +08:00
Finley Xiao
49dda19957 arm: dts: rockchip: Add clock assign for rk3126 and rk3128 cru
Add "assigned-clocks" for rk3126 and rk3128 cru nodes, to intalize
clock rate for plls, bus and peripher.

Change-Id: Ie91c8b194feff5db91af6e9930d5f475175242f9
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2017-12-13 20:26:50 +08:00
Rocky Hao
557c1d80b9 ARM: rockchip_defconfig: enable RK_VIRTUAL_THERMAL
Change-Id: I36db5d8e4194c96e8a63be795d6403192ca60d4b
Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
2017-12-13 18:39:59 +08:00
Rocky Hao
c6cd509617 ARM: dts: rockchip: rk3126-bnd-d708: enable tsadc node
Change-Id: I40a5e8fe4563673d51aa60a99afe21c7b855a177
Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
2017-12-13 18:39:59 +08:00
Rocky Hao
c581befe92 ARM: dts: rockchip: add tsadc node and thermal config for rk312x
Change-Id: I5d3c5c77ec8e14b26ee7ef02cf4aec4729558d02
Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
2017-12-13 18:39:59 +08:00
Rocky Hao
2954d5a6db thermal: rockchip: add virtual tsadc support for rk3126
rk previous SOCs such as rk3126 have no tsadc module, so a virtual tsadc is
implemented to control the thermal problem.

the virtual tsadc is designed on considering 2 factors, one is heating
modules' heating time and the working frequences, the other one is current
leval monitored by coulometer.

Change-Id: I0c7d8b952004d4f7918a41c925c50d38aaa65673
Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
2017-12-13 18:39:59 +08:00
Wenping Zhang
0c3d5875c3 leds: leds-is31fl32xx: enable multi-control mode and solve register failed issue during reboot.
Change-Id: I299ae4c97adde806c10ce74d2b843a82a4956682
Signed-off-by: Wenping Zhang <wenping.zhang@rock-chips.com>
2017-12-13 18:36:20 +08:00
Wenping Zhang
f745a93405 leds: add multi-control for leds's trigger.
userspace can control all leds by one ioctl through file node:
/dev/led_multi_ctrl.

Change-Id: I10ac19b86b46b3dc9a88809f1be5ebc95398212c
Signed-off-by: Wenping Zhang <wenping.zhang@rock-chips.com>
2017-12-13 18:36:20 +08:00
Wenping Zhang
a0505a722c leds: leds-is31fl32xx: merge modifies from develop-3.10.
1. fix cpu stall issue during reboot:
   In previous code, i2c write and read is executed in function
   is31fl32xx_brightness_set,this function may be called in softirq
   context if leds are in timer or oneshot trigger, so there are
   possibilities cpu will be stalled during led operations.
   Here we just move the i2c operation to workqueue to make sure
   not in irq context.
2. fix reboot crash issue.

Change-Id: If8520528b092cf4d5c4f1c7dcf2d353acd1c9b9d
Signed-off-by: Wenping Zhang <wenping.zhang@rock-chips.com>
2017-12-13 18:36:20 +08:00
Wenping Zhang
a5763e48f0 leds: leds-is31fl32xx: add delayed register function.
This function is used for led scrolling, set "default-trigger-delay-ms"
in led dts node to enable this function.

Change-Id: I4dff3ab29d8ef18344df4c3a0f18a595a404154c
Signed-off-by: Wenping Zhang <wenping.zhang@rock-chips.com>
2017-12-13 18:36:20 +08:00
Zheng Yang
a7d17fdc65 drm: bridge: dw-hdmi: fix tmds clk in status show
According to HDMI 2.0 chapter 6.1, for TMDS character Rates
avove 340Mcsc, the TMDS Clock Rate shall be one fourth of
the TMDS Character Rate.

Change-Id: I4cc78aa1a5fbf6cec93e787dde49e482d0b4d342
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-12-13 18:34:49 +08:00
Finley Xiao
09f340ba86 clk: rockchip: px30: Fix aclk and hclk for vpu, sdcard and crypto
Change-Id: I6f3d77033b493bdaac9d05c2be5eea38290a089e
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2017-12-13 18:32:21 +08:00
Wenping Zhang
a2ad800c08 leds: leds-is31fl32xx: fix compile errors.
The is32fl32xx led driver from upstream is written for new led
framework, so just modify this driver for some api difference
between our current led framework.

Change-Id: I0fd9af4bc2cd419d3e0bcd1b2348d34d166d652b
Signed-off-by: Wenping Zhang <wenping.zhang@rock-chips.com>
2017-12-13 18:05:58 +08:00
Finley Xiao
feb173722d soc: rockchip: power-domain: Modify power domain driver for px30
This driver is modified to support PX30 SoC.

Change-Id: I0226327d6d63302627a823bf73a5f8239b70adaf
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2017-12-13 18:03:22 +08:00
shengfei Xu
7051792ae3 regulator: rk808: rk816: fix up the DCDC and LDO setting off in sleep mode
Change-Id: I1022a7a8951a3115ac01a43f2165b5eac6202ab4
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2017-12-13 17:24:55 +08:00
shengfei Xu
1fca941134 ARM: dts: rockchip: rk3126-bnd-d708: set DCDC initial mode
Change-Id: Ibb18ea7605ead33abcddde6690a4ae4016c01974
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2017-12-13 17:23:32 +08:00
shengfei Xu
14d16c1848 regulator: rk808: maps a hardware mode defined in a DTS to a standard mode
Change-Id: I304e0cbb3544abde112180b6ec459670d91c99ae
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2017-12-13 17:23:19 +08:00