Commit Graph

847406 Commits

Author SHA1 Message Date
Meng Dongyang
0e16bcc09c usb: dwc3: gadget: change detemination method of connect status
In current code, the connect status will be set to connected state when
reset interrupt occur and change to disconnected state in disconnect
interrupt.

But the usb charger may bring about reset signal in accident if we
connect and disconnect quickly. In this case, the dwc3 controller will
change link state and set to connect status, yet not change to
disconnected state when disconnect. So the dwc3 controller suspend
fail and result in a mistake when quick reconnect.

This patch set connect status to connected state when transfer complete
to make sure that usb is connect to PC exactly.

Change-Id: I8e5894d2e08b88bb5434222100d8f5c91c9f1a9d
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
2019-11-14 11:15:51 +08:00
Joseph Chen
2114bd9e7a mfd: rk808: update RK818_ID 0x8181 => 0x8180
Ignore minor variant.

Change-Id: I14f9ad54dc81f8980a67d618daa7a314684acc3e
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-11-14 10:46:07 +08:00
Joseph Chen
ffc406d1d8 power: rk818-charger: support temperature charge v2
Set charge current according to bat temperature and
the v1 is abandoned on kernel 4.19.

Change-Id: I6462e5de1c153c7f774136ef67a8a17a3c7fec8a
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-11-14 10:46:07 +08:00
Joseph Chen
c6884c2558 power: rk816-battery: support temperature charge v2
Set charge current according to bat temperature.

Change-Id: I409bf33614c9e689f7a85382d6033af6b18755e1
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-11-14 10:46:07 +08:00
Joseph Chen
bfa5dfb467 power: rk816-battery: remove unused lp chrg function
Change-Id: I1a73d96f2e594081b0a44fbe981d6bb95ccdfca7
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-11-14 10:46:07 +08:00
Bian Jin chen
4f29b1cfa6 Revert "HID: core: move Usage Page concatenation to Main item"
This reverts commit 69f67200cf.

Test: CtsHardwareTestCases
  android.hardware.input.cts.tests.AsusGamepadTestCase#testAllKeys

fail: java.lang.AssertionError: Press BUTTON_A expected:<96> but
 was:<0>

Link: https://lkml.org/lkml/2019/6/13/1796

Change-Id: Icc2ceacdb7e398177628127277b00995f1b1da38
Signed-off-by: Bian Jin chen <kenjc.bian@rock-chips.com>
2019-11-14 09:28:31 +08:00
Ding Wei
f6d4385501 arm64: dts: rockchip: rk3399: match new video driver for 4.19
Change-Id: I56ff3ed1c49cf3524c9fe9284021c611c1a4b76c
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2019-11-13 20:34:59 +08:00
Ding Wei
659df9c511 arm64: dts: rockchip: px30: match new video driver for 4.19
Change-Id: Iaa282a4d154cf85cdd4124c1affb5746795613e5
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2019-11-13 20:34:45 +08:00
Ding Wei
18da42b5ac arm64: rockchip_defconfig: add video codec configs
add configs:
CONFIG_ROCKCHIP_MPP_RKVDEC
CONFIG_ROCKCHIP_MPP_VDPU1
CONFIG_ROCKCHIP_MPP_VDPU2
CONFIG_ROCKCHIP_MPP_VEPU1
CONFIG_ROCKCHIP_MPP_VEPU2

Change-Id: I384690294c45c88b2a9125827cb796b15f9cdba0
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2019-11-13 20:31:25 +08:00
Ding Wei
7cfdfe11ab video: rockchip: add path for vcodec driver
driver codec path: rockchip/mpp/

Change-Id: I1599a83097ad4c3d2c444c14fa1484497781bc23
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2019-11-13 20:29:28 +08:00
Ding Wei
5b15717952 video: rockchip: mpp: new video codec driver
This video codec driver used in kernel 4.19 version,
which is a new design framework.
In this version, codecs integrate similar hardware,
so are divided into vdpux vepux rkvdec rkvenc vepu22,
and so on.

Change-Id: Ic29b28cef8fce394ac9f950472204c172842a2df
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2019-11-13 20:22:33 +08:00
Ding Wei
f641dbbc95 dt-bindings: video: mpp: Document for video codec driver
Change-Id: I93cceb183fac592e9ea7c67c62341955f4964a8c
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2019-11-13 20:17:26 +08:00
Tao Huang
5683e16730 arm64: rockchip_defconfig: cleanup by savedefconfig
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I1eddb6875ec980b711142a6035bedc0dd48edbe3
2019-11-13 14:34:24 +08:00
LuoXiaoTan
a8ba66fd5b ASoC: rockchip: add rt5651_tc358749x driver
add rockchip_rt5651_tc358749x machine driver to
support HDMIIn function

Change-Id: Ieb0e046bec60ea0a27ee49ce1204b032ad646724
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
Signed-off-by: LuoXiaoTan <lxt@rock-chips.com>
Conflicts:
	sound/soc/rockchip/Kconfig
	sound/soc/rockchip/Makefile
	sound/soc/rockchip/rockchip_rt5651_tc358749x.c
2019-11-13 14:29:13 +08:00
Meiyou Chen
94d6a092ba ASoC: rt5651: fix hdmi-in noise
Change-Id: I23aa42b4c0775be5595a67b61ffce23845d6079b
Signed-off-by: Meiyou Chen <cmy@rock-chips.com>
2019-11-13 09:08:25 +08:00
Tao Huang
71e82aa8ac media/video: remove unused rk29xx driver
Change-Id: Ib541502c16facc6f997336c29fb73b4480e3f387
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-11-12 18:42:06 +08:00
Elaine Zhang
95302cb671 drm/rockchip: add more clock protect for loader logo
fix up the px30 issue when enable DDR automatic frequency.

Change-Id: I3671f4be7a8408a3830cc707f5b947d136f3452b
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-11-12 11:00:09 +08:00
Joseph Chen
06c8049134 arm64: dts: rk3328-rock64: add vcc supply for pmic
Change-Id: I21e98126481e0e523fa3346fe4c925031c02dd76
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-11-11 18:07:56 +08:00
Joseph Chen
563162f65d arm64: dts: rk3328-evb-android: add vcc supply for pmic
Change-Id: Ia3ba82a92e79e8f05467ce1c783f80a0a4ae24d4
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-11-11 18:07:56 +08:00
Joseph Chen
1f5a95dcf2 ARM: rockchip_defconfig: enable CONFIG_PINCTRL_RK805
Change-Id: I420e63f4ad200be6f2b9476b16001ad74f36c693
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-11-11 18:07:56 +08:00
Tao Huang
d98454e107 mfd: remove unused rk805 drivers
Change-Id: If55f51a681b9c0847015229af63de5d295bfd50e
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-11-11 18:07:56 +08:00
Joseph Chen
dd43014bfc pinctrl: rk805: add rk816 support
RK816 has 1 pin to be used as GPIO or TS function.
When used as GPIO function, the pin can be output or input.

Change-Id: I8607595826ac3125dfa2a4c7c483be6b084204c2
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-11-11 18:07:56 +08:00
Joseph Chen
05c69b4652 regulator: rk808: optimise/fix for rk805/816
RK805:
- correct enable/disable for suspend and runtime;
- add individual ramp delay set;
- add of_map_mode definition;
- buck4 has 2 line range group;

RK816:
- clean code;

Other: Add set/get mode for BUCKs.

Change-Id: Ife49259cc57c47fa54d078041724a69a42b0faae
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-11-11 18:07:56 +08:00
Joseph Chen
c45169cd08 mfd: rk808: power off system in syscore shutdown
The i2c maybe stopped before pm_power_off() is called, which
results in the PMIC power off failure issue.

Moving PMIC power off operation to syscore shutdown is better.

Change-Id: Ib43827ebd49059719b8899f90a696b6c32a6ddd1
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-11-11 18:07:56 +08:00
Hu Kejun
fd27639c39 media: rockchip: isp1: remove unnessary power control
Change-Id: I560db74bda56ef7ee5c1cade83747e030928e977
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2019-11-11 17:37:46 +08:00
Zhihuan He
efc3fbda71 drivers: devfreq: rockchip_dmc: rk3368: enable ddr 2T mode
Change-Id: I425e9ddb7d5c1d8e789283f3c6ae56efd62c252a
Signed-off-by: Zhihuan He <huan.he@rock-chips.com>
2019-11-11 16:48:42 +08:00
Zhihuan He
e671d67d33 arm64: dts: rockchip: rk3368: add ddr 2T mode control
Change-Id: I813a540ea0e7d018fb913df1ac760880d2d6dd11
Signed-off-by: Zhihuan He <huan.he@rock-chips.com>
2019-11-11 16:48:42 +08:00
Joseph Chen
721c9a683b mfd: rk808: remove rk805 buck1~4 initial setting
This setting will be added by ddr binary when necessary to
handle the high temperature-voltage issue on BUCK3.

Change-Id: Ief7d4954e459317ae571400496c4c5ef74f664af
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-11-11 14:52:39 +08:00
Joseph Chen
1035f13de8 mfd: rk808: add on/off source dump
Show the reason of this power on and last shutdown.

Change-Id: Id540433065859a0c3f4817ed66e295b7c6dfccb5
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-11-11 14:52:39 +08:00
Joseph Chen
481aa22003 mfd: rk808: remove duplicate content
Change-Id: Ie2de3186579213c565c3b38a2c68955f2a7fd227
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-11-11 14:52:39 +08:00
Joseph Chen
16e7ef95db mfd: rk808: update rk818 volatile reg range
The registers relative with fuel gauge must be volatile.

Change-Id: I8e942e8f15f66dabf24ede48b81857947575fa23
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-11-11 14:52:39 +08:00
Meiyou Chen
304901fba9 net: rkwifi: Fix sinfo use-before-initialization
Change-Id: I13be02dd133a0a725f2c4d565c47f4c1bdc2fdf3
Signed-off-by: Meiyou Chen <cmy@rock-chips.com>
2019-11-11 09:33:16 +08:00
Alex Wang
3596ca1271 arm64: dts: rockchip: rk3328: increase the vop aclk frequency to 400M
Because the default frequency is 300M will cause green horizontal
stripes when in 4K resolution zoom mode:

Change-Id: Ia571e8eb32ba62ee3e3857e2a1ee3187a14e408f
Signed-off-by: Alex Wang <alex.wang@rock-chips.com>
2019-11-08 18:07:06 +08:00
Tao Huang
b61a687aba rk: scripts/resource_tool: add sha1 for file entry
From u-boot 5e817a0ea427 ("tools: rockchip: resource_tool: add sha1 for file entry").
Merge all C files to one resource_tool.c

Change-Id: If63ba77d1f5a3660bd6ef87769bb456fa086ae71
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-11-08 14:58:56 +08:00
Alex Zhao
b270ca1085 arm64: dts: rockchip: add 4g modem for rk3399-evb-ind
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
Change-Id: I4690b0cc6bf78dafd9c0ec27005f249c065f8158
2019-11-08 14:55:48 +08:00
Alex Zhao
aea77e94f0 arm64: rockchip_defconfig: enable CONFIG_LTE_RM310
enable CONFIG_LTE & CONFIG_LTE_RM310

Change-Id: I49e96eaa1dfce93768aa13316c38cb67cb226099
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
2019-11-08 14:49:33 +08:00
Alex Zhao
2ecbb1934e usbnet: Use lte%d interface name for 4g modem
Change-Id: Ifb58d307fb090943dfd267b614deb6a08a6f7ac8
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
2019-11-08 14:45:33 +08:00
Alex Zhao
52bdf3f250 net: lte: add rm310 driver
Change-Id: Ifb4867890603888783c370d06f6653272b7665c5
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
2019-11-08 11:52:39 +08:00
Wyon Bi
ac9752584e drm/rockchip: cdn-dp: Add bus format setting
Change-Id: Id54d3dcf00dc1d535783674d3a57309469d279f3
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-11-06 15:33:41 +08:00
Wyon Bi
db9eaf1a4e drm/rockchip: cdn-dp: Compliant with eDP receiver enhanced frame capability
On an eDP connection, the eDP sink must operate only in Enhanced Framing Mode.
The Source must send only Enhanced Framing on the main link, and must only
write a '0' to DPCD 00101h: LANE_COUNT_SET Bit 7: ENHANCED_FRAME_EN bit.

Independent of method used, DP1.2-compliant eDP Receivers shall indicate any
eDP protocol differentiation method they support through the Receiver
Capability Field of DPCD (DPCD:0000Dh).

Change-Id: Ia57f3242c16e2ace0c13076992c2c14eda9e7ca7
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-11-06 15:33:32 +08:00
Chris Zhong
1b6221e375 drm/rockchip: cdn_dp: support audio info frame
Change-Id: I867b79dce73aa7c82dd06e6ed6e2963e118f1129
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-11-06 15:33:24 +08:00
Wyon Bi
726afe8431 drm/rockchip: cdn-dp: support dp training outside dp firmware
DP firmware uses fixed phy config values to do training, but some
boards need to adjust these values to fit for their unique hardware
design. So get phy config values from dts and use software link training
instead of relying on firmware, if software training fail, keep firmware
training as a fallback if sw training fails.

Change-Id: I075bff6aa153a5e18b6a5ddec2645131f1411913
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
Signed-off-by: Lin Huang <hl@rock-chips.com>
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-11-06 15:33:11 +08:00
Wyon Bi
2a15c46551 phy: rockchip-typec: support variable phy config value
the phy config values used to fix in dp firmware, but some boards
need change these values to do training and get the better eye diagram
result. So support that in phy driver.

Change-Id: I195727b2a81130606e66ffc4471df74e5782a7fa
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
Signed-off-by: Lin Huang <hl@rock-chips.com>
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-11-06 15:27:00 +08:00
Sandy Huang
aa97b53fcc drm/drv: fix drm_device_get_by_name get drm failed
the new drm driver remove idr alloc for DRM_MINOR_CONTROL, so we use
DRM_MINOR_PRIMARY to get drm device for dmc.

Change-Id: I5ac524cb98bfc4431305e341b5c659aa865bb670
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2019-11-06 15:16:38 +08:00
Jianing Ren
da4d27cc30 Revert "HACK: arm64: dts: rk3399-android: fixing the adb function cannot be used"
This reverts commit 2e4b6184c7.

Change-Id: I210e3e90855373219c805bec6bca1b1d354318d6
Signed-off-by: Jianing Ren <jianing.ren@rock-chips.com>
2019-11-06 14:22:56 +08:00
Jianing Ren
0616c7372e arm64: dts: rk3399-evb-lpddr4: fix the vbus-5v-gpios active level
The power of fusb302 is controlled by GPIO1_C2 which should be set as
ACTIVE_HIGH and it was set incorrectly in this dtsi file leading to cannot
send notifie.

Change-Id: Ibc045d266e5bc9718343e07acda8488b0d747aba
Signed-off-by: Jianing Ren <jianing.ren@rock-chips.com>
2019-11-06 14:22:35 +08:00
Jianing Ren
8bd34d5e1a arm64: dts: rk3399: fix the extcon property of usb
In kernel 4.4, we use the extcon notification function in dwc3-rockchip.c
to perform the drd mode switch. Kernel 4.19 implements the same
functionality in drd.c and writes the extcon notification function in
core.c. So we need to move extcon to the subnode of dwc3.

Besides, I deleted some useless code which is wrongly copied.

Change-Id: I1096e64d5a29f01c94a10027b846676033c7985d
Signed-off-by: Jianing Ren <jianing.ren@rock-chips.com>
2019-11-06 14:22:21 +08:00
Jianing Ren
996744d0d2 arm64: dts: rk3399: move power domain to the subnode of dwc3
In kernel 4.4, we use the pm runtime mechanism in dwc3-rockchip.c to
implement usb power management. In kernel 4.19, dwc3-rockchip.c is not
required for drd mode switching, and the extcon notification function is
written in core.c. So we use the runtime in core.c to implement power
management.

Change-Id: I483ce061a5b7b5a348e679d39c559a4ca29a40b8
Signed-off-by: Jianing Ren <jianing.ren@rock-chips.com>
2019-11-06 14:17:14 +08:00
Shawn Lin
77780b2dd8 mmc: core: Add mmc_sd_shutdown support for SD as main disk
The ROM code for Rockchip platform never support detecting
SD 3.0 mode, so if the SD card contains system image running
into SD 3.0 mode in kernel, it will fails to reboot.

The problem is SD 3.0 mode is using 1.8V signal and could only
be switched back into 2.0 mode by power cycle. If the customed
board could not switch off its power rail, the ROM code can't
soft reset the SD.

Add mmc_sd_shutdown to workaround this special case and don't
bother normal SD cards used as external disk by checking the
RESTRICT_CARD_TYPE_MMC flag.

Conflicts:
	drivers/mmc/core/sd.c

Change-Id: I4c3d3111c0bce0ad3cd4f0c6592ff595d7015afe
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2019-11-05 19:11:37 +08:00
Sandy Huang
6243095744 arm64: dts: rockchip: px30: fix vopl iommu interrupt number error
Change-Id: Iad68ab8e71e52eaec7279e509155e07f249099f0
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2019-11-05 19:09:26 +08:00