Commit Graph

615529 Commits

Author SHA1 Message Date
Wang Panzhenzhuan
d8c65325a2 media: i2c: ov8858 fix otp null pointer crash
Change-Id: Ic80e74fa3198a6f877b69d38a225a187dc53769e
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
2019-03-20 18:52:43 +08:00
Shawn Lin
5b44e6b88e phy: rockchip-inno-combphy: change pre-emphasis value
New Inno combphy improve its pre-emphasis settings, so we
need to use new recommended value instead.

Change-Id: I5b4b2e8819c4b44d908156bb8ad99bd8c62c8bdf
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2019-03-20 18:52:01 +08:00
Jon Lin
0f2800842e drivers: rkflash: use physical continuous memory for flash stress test
otherwise cache flush will cause test fail

Change-Id: I6d4a4be405998bfe68eac0004b5fee407ed62a70
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2019-03-20 18:48:57 +08:00
Hu Kejun
6c10c70bb9 media: rk-isp10: update to v0.2.3
Change-Id: I815d41ce0f0d7e35d7b8bd133a3f203e24e69943
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2019-03-20 18:45:22 +08:00
Hu Kejun
43634de342 media: rk-isp10: add control exposure of long and short frame for hdr
modify head file to match the change of camera engine

Change-Id: Ia139e733f766cf9cbb02e80ceda81a1817b3acbf
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2019-03-20 18:45:22 +08:00
David Wu
df29350c9c arm64: dts: rockchip: rk1808: Correct the drive strength for rgmii/rmii
According to the hardware test, change the tx pin drive strength
to 4ma, and mdc/mdio 2ma.

Change-Id: Ia5ab1728c9e9ecbfa7207217649588f600070ae4
Signed-off-by: David Wu <david.wu@rock-chips.com>
2019-03-20 18:41:38 +08:00
Ziyuan Xu
4aac5d2e7c power: rk817-battery: fix compile error whitout CONFIG_SUSPEND
drivers/power/rk817_battery.c:3254:12: warning: 'rk817_bat_pm_resume' defined but not used [-Wunused-function]
error, forbidden warning:rk817_battery.c:3254
 static int rk817_bat_pm_resume(struct device *dev)
            ^~~~~~~~~~~~~~~~~~~
drivers/power/rk817_battery.c:3037:13: warning: 'rk817_bat_pm_suspend' defined but not used [-Wunused-function]
error, forbidden warning:rk817_battery.c:3037
 static int  rk817_bat_pm_suspend(struct device *dev)

Change-Id: I8cb39c95688e16027257c09a20eaeb100bd1024b
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2019-03-20 18:38:38 +08:00
Lin Huang
8b8d1e98f5 arm64: dts: rockchip: rk1808-evb-x4: assigned-clock-parents for clk_32k_ioe
we replace cru assigned clock node in rk1808-evb-x4 dts, and now clk_32k_ioe
is setted in this node, so we need to add this back in rk1808-evb-x4.dts,
otherwise the SOC can not boot normally.

Change-Id: I06a55bea97e0ef260f2549349b3211a311a913ae
Signed-off-by: Lin Huang <hl@rock-chips.com>
2019-03-20 18:15:57 +08:00
Felipe Balbi
ad5d0418d3 UPSTREAM: usb: dwc3: debug: fix ep name on trace output
There was a typo when generating endpoint name which
would be very confusing when debugging. Fix it.

Change-Id: If29433f427499674b7604b399cbc3ac6e6bf7b1f
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit 696fe69d7e)
2019-03-20 11:31:37 +08:00
Jon Lin
e27dfc2ce4 drivers: rkflash: support 8KB page size slc nand
comfirm in MT29F16G08ABABA

Change-Id: I6b1179e7e835b77176aaa0292b162ab08bb38fb7
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2019-03-19 22:12:27 +08:00
Xiaotan Luo
8a0cdc7283 arm64: dts: rockchip: add dummy i2s sound for rk3399 sapphire excavator
Change-Id: Ic7a9437eee6d9d12d25ce7fb1171faf1624d3681
Signed-off-by: Xiaotan Luo <lxt@rock-chips.com>
2019-03-19 14:49:23 +08:00
Xiaotan Luo
2b120ce738 ASoC: codec: dummy-codec: add setting mclk
Many devices require MCLK to work, So add mclk

Change-Id: I666e46c8968330afd81506d0c64769b59ad0837d
Signed-off-by: Xiaotan Luo <lxt@rock-chips.com>
2019-03-19 14:49:16 +08:00
Hu Kejun
f3ef7216c2 media: spi: RK1608: support no sensor connect to preisp
To support preisp post-processing and camera hal1,
let driver probe ok when no sensor device is connected.

Change-Id: I1830420f448b47a0bd327ee3950da0eb7af8d3fb
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2019-03-19 14:32:07 +08:00
Sandy Huang
ebc86551e6 dt-bindings: display: media-bus-format: Sync with include/uapi/linux/media-bus-format.h
Change-Id: I1da14bc81a8652dcac5f0b85035f8f1bf6e71bfe
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2019-03-19 14:09:33 +08:00
Sandy Huang
9528ba24f1 drm/rockchip: rgb: Add support srgb and srgb dummy mode
Change-Id: Ie5942b90dccec5cec74d1f1f2cbef835d95bdfd9
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2019-03-19 14:09:33 +08:00
Sandy Huang
e3655c6616 drm/rockchip: vop: Add support srgb and srgb dummy mode
Change-Id: I31892fe22db329deaca8d9e1eb4085d530b65d6f
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2019-03-19 14:09:33 +08:00
Sandy Huang
1dfe019d6a media-bus: Add SRGB888 media bus format
The output timing described at [1], focus at s888 mode and
s888 dummy mode:

[1] https://patchwork.kernel.org/patch/9992241/

Change-Id: I1bcc6d64ede243d89807acc7e842bcc7fd120c26
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2019-03-19 14:09:33 +08:00
Liao Huaping
ecccc04d21 init: support init ramfs async
If enable ramfs function, init ramfs async,
can reduce kernel init time.

Change-Id: I95d8ca6d8b9c4e9c738c635c5ee56391cbbe7c16
Signed-off-by: Liao Huaping <huaping.liao@rock-chips.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-03-19 14:06:04 +08:00
Hu Kejun
5c64ed8c2a media: i2c: fix compile error
fix the following error on RK1808.
error: implicit declaration of function 'kzalloc' [-Werror=implicit-function-declaration]
inf = kzalloc(sizeof(*inf), GFP_KERNEL);
error: implicit declaration of function 'kfree' [-Werror=implicit-function-declaration]
kfree(inf);

Change-Id: Ie46828b03a45cc523b8503fb62caeccee165142f
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2019-03-18 19:37:11 +08:00
Wang Panzhenzhuan
ae7a2bbf69 media: i2c: add sensor ov5648
Change-Id: Ia6f19841a86983dd3b8896cf4f598180076ecc7b
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
2019-03-18 18:10:14 +08:00
Shixiang Zheng
b2a750b7c6 video/rockchip: rga2 fix the issue of yuv422p format conversion
Change-Id: I5213a7be831e7a5166231f4e7179ce4a564a14fb
Signed-off-by: Shixiang Zheng <shixiang.zheng@rock-chips.com>
2019-03-18 11:15:26 +08:00
Longjian Lin
d787c5f0e0 arm64: dts: rockchip: pulldown BT irq gpio for rk3399pro evb v10
Change-Id: I8c4ac43cd2ff560f2f94a01570ec82b143a7966a
Signed-off-by: Longjian Lin <llj@rock-chips.com>
2019-03-15 19:12:20 +08:00
William Wu
ef409c6d47 usb: dwc3: rockchip: fix connect fail when force host mode
The DWC3 rockchip driver provides a sysfs interface "dwc3_mode"
to force Peripheral mode or Host mode. It has a problem to force
to Host mode when the DWC3 works as Peripheral mode and connects
to Host (e.g. PC USB Port).

This issue can be reproduced on RK1808 EVB follow these steps:

1. Set dr_mode = "otg" in DTS dwc3 node;
2. Start the system, and connect the RK1808 USB 3.0 to PC USB.
3. Make sure that PC has recognized the USB device, and then
   force DWC3 to Host mode via "dwc3_mode".

   echo "host" > /sys/devices/platform/usb/dwc3_mode

   And plug in an USB 2.0 Device to RK1808 USB 3.0 Port, then
   we can see the following error log:

   rockchip-dwc3 usb: Peripheral disconnect timeout
   rockchip-dwc3 usb: USB unconnectedxhci-hcd
   xhci-hcd.3.auto: xHCI Host Controller
   xhci-hcd xhci-hcd.3.auto: new USB bus registered, assigned bus number 3
   xhci-hcd xhci-hcd.3.auto: hcc params 0x0220fe64 hci version 0x110 quirks 0x04010010
   ...
   hub 4-0:1.0: USB hub found
   hub 4-0:1.0: 1 port detected
   rockchip-dwc3 usb: USB HOST connected
   rockchip-dwc3 usb: set new mode successfully
   usb 3-1: new high-speed USB device number 2 using xhci-hcd
   usb 3-1: new high-speed USB device number 3 using xhci-hcd
   usb usb3-port1: attempt power cycle
   usb 3-1: new full-speed USB device number 4 using xhci-hcd
   usb 3-1: Device not responding to setup address
   usb 3-1: Device not responding to setup address
   usb 3-1: device not accepting address 4, error -71

It's because that in this test case, the dr_mode is original otg
mode, and the current code only call phy_set_mode() to disconnect
the peripheral from PC host if the dr_mode is peripheral mode.
This cause dwc3_rockchip_otg_extcon_evt_work() wait peripheral
disconnect timeout, and DWC3 fail to do runtime suspend and resume
to initialized the DWC3 core register again.

This patch call phy_set_mode() to disconnect the peripheral if
the current dr_mode is peripheral or otg when force to host mode.

Change-Id: I733d364046abcb616cf3d99ed57ab8604a87eef6
Signed-off-by: William Wu <william.wu@rock-chips.com>
2019-03-15 18:34:28 +08:00
William Wu
afd36f1250 usb: dwc3: rockchip: fix NULL pointer dereference in async probe
In dwc3_rockchip_async_probe(), if it tries to get hcd in
peripheral only mode (dr_mode = "peripheral"), a NULL pointer
deference will happen. Because hcd only be allocated and
initialized in host mode or otg mode.

We can reproduce this issue when set dr_mode to peripheral
in DTS, like rk3399pro-npu.dtsi, and get the following panic
log on RK1808 EVB:

Unable to handle kernel NULL pointer dereference at virtual address 000000b0
pgd = ffffff8008b0b000
[000000b0] *pgd=000000007fffe003, *pud=000000007fffe003, *pmd=0000000000000000
Internal error: Oops: 96000005 [#1] PREEMPT SMP
Modules linked in:
CPU: 0 PID: 29 Comm: kworker/u4:1 Not tainted 4.4.167 #493
Hardware name: Rockchip RK1808 EVB V10 Board (DT)
Workqueue: events_unbound async_run_entry_fn
task: ffffffc07cd29580 task.stack: ffffffc07cd40000
PC is at dwc3_rockchip_async_probe+0x28/0x1c8
LR is at async_run_entry_fn+0x48/0x100
pc : [<ffffff80083adf5c>] lr : [<ffffff80080b445c>] pstate: 60000045
sp : ffffffc07cd43d10
...
[<ffffff80083adf5c>] dwc3_rockchip_async_probe+0x28/0x1c8
[<ffffff80080b445c>] async_run_entry_fn+0x48/0x100
[<ffffff80080acca8>] process_one_work+0x1b8/0x2b8
[<ffffff80080ad94c>] worker_thread+0x304/0x418
[<ffffff80080b206c>] kthread+0xd0/0xd8
[<ffffff8008082e80>] ret_from_fork+0x10/0x50

Fixes: f2a2b34e45 ("usb: dwc3: rockchip: use async_schedule for initial dwc3")
Change-Id: I740936e43bc4ea2b5a056d6d9dcaf18466006f0c
Signed-off-by: William Wu <william.wu@rock-chips.com>
2019-03-15 18:33:43 +08:00
Weixin Zhou
6c29e919eb arm64: rk3399pro_npu_defconfig: enable npu efuse
Change-Id: Ie3b576f3ab8a04c4c81debfd04844b8d2ef7fd73
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
2019-03-14 19:11:39 +08:00
Weixin Zhou
747f814582 arm64: dts: rockchip: rk3399pro-npu: add efuse node and info
Change-Id: I1242fc127da02dff5d0e02418c2a540d21983430
Signed-off-by: Liang Chen <cl@rock-chips.com>
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
2019-03-14 10:45:10 +08:00
Wyon Bi
b2cc197cf7 drm/rockchip: rk618: Correct the bus format setting
Change-Id: I7a22e2436c37a9c990fd7bf76aa6ddfdc1964241
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-03-14 10:00:59 +08:00
Xing Zheng
306a90793a arm64: dts: rockchip: clean up rk809-sound pdm for rk3326-evb-ai-va-v11-linux board
Change-Id: I6f554b92dc09dec640025f973548d71b89142bec
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2019-03-13 20:43:37 +08:00
Xing Zheng
7ba7b1f971 arm64: rk3326_linux_defconfig: clean up sound config
- Remove useless codecs/spdif.
- Enable PDM/multi-codecs/multi-dais.

Change-Id: I178e9fe186263722bc27d2c26170db24c08d623f
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2019-03-13 20:43:18 +08:00
Lin Huang
316f677586 arm64: dts: rockchip: rk1808-evb: enable mic array led
Change-Id: Iead1a3bc4695a7209f3d4bd82c49a00b2a8a4940
Signed-off-by: Lin Huang <hl@rock-chips.com>
2019-03-12 19:41:14 +08:00
Lin Huang
67d77be0e3 arm64: dts: rockchip: rk1808-evb: enable pdm on evb board
we use pdm mic as rk1808 evb board default mic array,
so enable pdm.

Change-Id: I45c4904fe865813185ab327da347d0b52418ef1c
Signed-off-by: Lin Huang <hl@rock-chips.com>
2019-03-12 19:41:14 +08:00
Ziyuan Xu
9e819b52e3 arm64: dts: rockchip: px30: add reset properties for watchdog
Change-Id: I83a7762c23a4caaa5d3d3cd5e8e79b288f8662b4
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2019-03-12 17:33:15 +08:00
Oleksij Rempel
5d1f66da5a BACKPORT: watchdog: dw_wdt: add stop watchdog operation
The only way of stopping the watchdog is by resetting it.
Add the watchdog op for stopping the device and reset if
a reset line is provided.

At same time WDOG_HW_RUNNING should be remove from dw_wdt_start.
As commented by Guenter Roeck:
dw_wdt sets WDOG_HW_RUNNING in its open function. Result is
that the kref_get() in watchdog_open() won't be executed. But then
kref_put() in close will be called since the watchdog now does stop.
This causes the imbalance.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: Wim Van Sebroeck <wim@iguana.be>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: linux-watchdog@vger.kernel.org
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
(cherry picked from commit 1bfe888938)
Conflicts:
    drivers/watchdog/dw_wdt.c

Change-Id: Ia6f4e16011b61f78c09b5c54669ddd18678357b9
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2019-03-12 16:21:28 +08:00
Steffen Trumtrar
328f02596a BACKPORT: watchdog: dw_wdt: get reset lines from dt
The dw_wdt has an external reset line, that can keep the device in reset
and therefore rendering it useless and also is the only way of stopping
the watchdog once it was started.

Get the reset lines for this core from the devicetree. As these lines are
optional, use devm_reset_control_get_optional_shared. If the reset line
is not specified in the devicetree, the reset framework will just skip
deasserting and continue.
This way all users of the driver will continue to function without
any harm, even if the reset line is not specified in the devicetree.

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Cc: linux-watchdog@vger.kernel.org
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
(cherry picked from commit 65a3b6935d)
Conflicts:
    drivers/watchdog/dw_wdt.c

Change-Id: Iffbc95931869a5d595a348b6c08ee7da5a1e64e4
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2019-03-12 16:21:14 +08:00
Jon Lin
3bec686dbb drivers: rkflash: reduce print tag
Warning awaits elimination, it's normal.
[   14.568343] g_gc_superblock_free 260 40 0 2f 2f
[   14.597317] lpa=c779, ppa=130000
[   14.921319] g_gc_superblock_free 1ee 40 0 3 3

Change-Id: I4b3721310fcd833152ff8a7576c997b2202bc4f0
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2019-03-12 16:13:17 +08:00
Andy Yan
797289e951 arm64: dts: rk3308: add panic and watchdog boot mode
Change-Id: I3ef0b265b1cabe152961985621336294f88bb1a7
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2019-03-12 16:11:29 +08:00
Andy Yan
0bb38bcc4d dt-bindings: add BOOT_PANIC and BOOT_WATCHDOG
Change-Id: I66e3d7caa7b8591bd5af8d481ba773f5e38e9471
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2019-03-12 16:11:07 +08:00
Andy Yan
5cc41272c3 power: reset: reboot-mode: support parse boot mode
Parse boot mode on system bootup, and export it to
userspace by sysfs: sys/kernel/boot_mode

Change-Id: I0158fc28f4dae51c798806006e49cead4ce2e923
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2019-03-12 16:10:53 +08:00
Guenter Roeck
de56d92b60 BACKPORT: watchdog: dw_wdt: Read clock rate only once and validate it
Coverity reports:

divide_by_zero: In expression readl(dw_wdt->regs + 8) /
clk_get_rate(dw_wdt->clk), division by expression clk_get_rate(dw_wdt->clk)
which may be zero has undefined behavior.

The clock used for the watchdog timer won't change its rate, so read it
only once during probe. Also validate it and abort the probe function
with an error if it is 0.

Cc: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
(cherry picked from commit c97344f73f)

Conflicts:
	drivers/watchdog/dw_wdt.c
	[due to missing:
	  f29a72c24a "watchdog: dw_wdt: Convert to use watchdog infrastructure"
	 and local version of:
	  3024e0d13b "watchdog: dw_wdt: fix signedness bug in	dw_wdt_top_in_seconds()"]

Change-Id: Iea745e27224532bf4da560e5952b372289d1c6ae
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
2019-03-12 16:09:22 +08:00
Brian Norris
da72a45cf7 FROMLIST: watchdog: dw: save/restore control and timeout across suspend/resume
Some platforms lose this state in suspend. It should be safe to do this
unconditionally.

Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
(am from https://patchwork.kernel.org/patch/10273165/)
Conflicts:
        small context changes

BUG=b:74204857
TEST=force watchdog event before/after suspend/resume on kevin and scarlet;
     check timing

Reviewed-on: https://chromium-review.googlesource.com/958089
Commit-Ready: Brian Norris <briannorris@chromium.org>
Tested-by: Brian Norris <briannorris@chromium.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>

Change-Id: I7a0e4d6c87ed3eeb3c41d9dcff014fd5f7cddef5
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
2019-03-12 16:09:22 +08:00
Brian Norris
c7acb7de66 FROMLIST: watchdog: dw: RMW the control register
RK3399 has rst_pulse_length in CONTROL_REG[4:2], determining the length
of pulse to issue for system reset. We shouldn't clobber this value,
because that might make the system reset ineffective. On RK3399, we're
seeing that a value of 000b (meaning 2 cycles) yields an unreliable
(partial?) reset, and so we only fully reset after the watchdog fires a
second time. If we retain the system default (010b, or 8 clock cycles),
then the watchdog reset is much more reliable.

Read-modify-write retains the system value and improves reset
reliability.

Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
(am from https://patchwork.kernel.org/patch/10273163/)
Conflicts:
	core watchdog frameworks were reworked, so this moved from an
        open() function to a start() function

BUG=b:74204857
TEST=force watchdog event before/after suspend/resume on kevin and scarlet;
     check timing

Reviewed-on: https://chromium-review.googlesource.com/958088
Commit-Ready: Brian Norris <briannorris@chromium.org>
Tested-by: Brian Norris <briannorris@chromium.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>

Change-Id: I18d5ec3604a44a671ba79ceea1821e733bf051fe
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
2019-03-12 16:09:22 +08:00
Wyon Bi
afdc278b18 drm/rockchip: rgb: Implement loader protect callback
Change-Id: Iffa5b17de436ad26c718725168b5eab11e4ebbfc
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-03-12 15:54:33 +08:00
Wyon Bi
64a1f84e0f clk: rockchip: rk3128: mark the hclk_vio_h2p as critical clk
Change-Id: Ib4eb985b1c3aacf6e51d593fcf71cd46e1dc0b82
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-03-12 15:54:08 +08:00
Wyon Bi
26bbb2af07 ARM: dts: rockchip: rk312x-android: set vop-dclk-mode default value to 1
Fix display abnormal caused by DDR frequency conversion.

Change-Id: Iaa3bf6177d42f8ac5f9078b58a138f48d5c1d874
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-03-12 15:53:52 +08:00
Kever Yang
bd7ce1902c ARM: dts: rockchip: add battery node for rk3128-fireprime
fireprime is using rk818, which need a battery node for fuel gauge,
or else the input current will be limit to 500mA.

Change-Id: Ie80dbc103d1ac57b704235a9b618b7e9db44c953
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2019-03-12 15:53:26 +08:00
Sugar Zhang
20ee926d4b ASoC: core: Fix panic when two cards register using the same dai
This issue was caused by two cards using the same dai(cpu_dai/codec_dai).
the second one will fail to register as a card, then will release the
same dai resource, leading to the first card crash.

[   79.032274] Unable to handle kernel paging request at virtual address ffffffffffffffe0
[   79.035543] Hardware name: Rockchip RK3399 Excavator Board edp (Android) (DT)
[   79.036171] task: ffffffc0dd126c00 task.stack: ffffffc0d109c000
[   79.036717] PC is at dapm_widget_invalidate_output_paths+0x98/0xe0
[   79.037268] LR is at soc_dapm_dai_stream_event+0x60/0x9c

[   79.184613] Call trace:
[   79.192401] [<ffffff80088e9028>] dapm_widget_invalidate_output_paths+0x98/0xe0
[   79.193044] [<ffffff80088ea0d0>] soc_dapm_dai_stream_event+0x60/0x9c
[   79.193611] [<ffffff80088eeb9c>] snd_soc_dapm_stream_event+0x44/0x94
[   79.194175] [<ffffff80088e515c>] snd_soc_suspend+0x23c/0x2fc
[   79.194686] [<ffffff800852d1f0>] platform_pm_suspend+0x38/0x54
[   79.195208] [<ffffff8008536e88>] dpm_run_callback+0x110/0x1bc
[   79.195726] [<ffffff8008537578>] __device_suspend+0x164/0x2a4
[   79.196242] [<ffffff80085392b0>] dpm_suspend+0x70/0x338
[   79.196713] [<ffffff8008539ab0>] dpm_suspend_start+0x64/0x68
[   79.197226] [<ffffff80080f0b9c>] suspend_devices_and_enter+0x74/0x2d8
[   79.197800] [<ffffff80080f140c>] pm_suspend+0x60c/0x668
[   79.198272] [<ffffff80080ef7b4>] state_store+0x50/0x84
[   79.198734] [<ffffff800839d128>] kobj_attr_store+0x14/0x24
[   79.199234] [<ffffff8008232fd8>] sysfs_kf_write+0x38/0x50
[   79.199718] [<ffffff8008232208>] kernfs_fop_write+0x124/0x180
[   79.200237] [<ffffff80081bf76c>] __vfs_write+0x38/0xfc
[   79.200695] [<ffffff80081bffd4>] vfs_write+0x9c/0x170
[   79.201153] [<ffffff80081c0a18>] SyS_write+0x5c/0xbc
[   79.201604] [<ffffff80080832f0>] el0_svc_naked+0x24/0x28
[   79.202079] Code: 54000081 f9408000 d1040000 17ffffef (39406025)
[   79.202693] ---[ end trace dec5980253348a7f ]---

Change-Id: I6bbbeefaa68a7d5dfccc1bba57d61216b4be1035
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2019-03-12 11:58:30 +08:00
Alex Zhao
c09cc8eddc arm64: dts: rockchip: rk3399-tve1030g: decrease sdio clk to 100M
Change-Id: I7c3c7bf4b3c720fce366767d4725ea4a82e0652b
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
2019-03-12 08:33:07 +08:00
Vahram Aharonyan
cafb671599 UPSTREAM: usb: dwc2: gadget: Disable enabled HW endpoint in dwc2_hsotg_ep_disable
Check if endpoint is enabled during dwc2_hsotg_ep_disable() function
processing and call dwc2_hsotg_ep_stop_xfr() to disable it and flush
associated FIFO.

Move dwc2_hsotg_ep_stop_xfr() and dwc2_hsotg_wait_bit_set() functions
upper before dwc2_hsotg_ep_enable and dwc2_hsotg_ep_disable function
definitions.

Change-Id: Ieafe29703e167c72ad8a6aa8e437bd13c395a602
Signed-off-by: Vahram Aharonyan <vahrama@synopsys.com>
Signed-off-by: John Youn <johnyoun@synopsys.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 a4f8277145)
2019-03-11 15:57:50 +08:00
Vahram Aharonyan
9b543599ed UPSTREAM: usb: dwc2: gadget: Correct dwc2_hsotg_ep_stop_xfr() function
Correct dwc2_hsotg_ep_stop_xfr() function to follow dwc2 programming
guide for setting NAK on specific endpoint, disabling it and flushing
corresponding FIFO.

Current code does not take into account whether core acts in shared or
dedicated FIFO mode, current endpoint is periodic or not. It does not
clear EPDISBLD interrupt after programming of DXEPCTL_EPDIS, does not
flush shared TX FIFO and tries to clear global out NAK in wrong manner
instead of setting DCTL_CGOUTNAK.

Change-Id: I4066fab83cf31a6c074a3d4456fdaa8144132926
Signed-off-by: Vahram Aharonyan <vahrama@synopsys.com>
Signed-off-by: John Youn <johnyoun@synopsys.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 ae79dd5ddd)
2019-03-11 15:57:34 +08:00
XiaoDong Huang
a48ab7bf75 arm64: dts: rockchip: rk1808-evb: adjust some regulator config
Poweroff vcc1v8_dvp, vdd1v5_dvp, vccio_sd, vcc3v3_sd
in rk809 sleep mode.

Change-Id: I3c3194449cd0ed17df84c9c03ad2ae4d2f3f720d
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2019-03-11 15:01:39 +08:00