The usb2 phy driver will power off phy if it detects
usb connecting with usb charger. And then it schedule
a delayed work to check the connection state until the
usb disconnect from usb charger.
On rockchip platform, the usb2 controller utmi clk and
480MHz clk come from usb2 phy, so if we power off the
usb2 phy, the usb2 controller should not be accessed.
However, it's difficult to synchronize the phy state
between the usb2 phy driver and usb2 controller. We
find one synchronization problem in the following
case:
1. Test on rk312x platform;
2. Connect otg port with usb charger, then do suspend/
resume stress test.
3. We will find the following error log, and then the
usb controller work abnormally.
dwc2 10180000.usb: resuming usb gadget configfs-gadget
dwc2 10180000.usb: dwc2_core_reset() HANG! Soft Reset GRSTCTL=80000001
This because in dwc2 driver, it will do dwc2 core reset
during resume, although it also power on usb2 phy before
do core reset, but the otg_sm_work in the usb2 phy driver
may power off the usb2 phy again asynchronously, this will
cause dwc2 core reset failure.
So we should not power off the usb2 phy if connect to
usb charger, this patch will increase the usb2 phy power
consumption in runtime, but it don't affect the power
consumption in system standby mode, because the usb
controller can power off phy by itself during suspend.
Change-Id: I3b05c06988b7939ebf949ced34b9a6bb37ffa42a
Signed-off-by: William Wu <william.wu@rock-chips.com>
The rk3288-evb-rk1608 board doesn't share with rk3288-evb, so we
need to separate a new indepentent type of rk3288-evb-rk1608 board.
For now, these primary features have been confirmed on rk3288-evb-rk1608
board:
- The power supply for RK1608 by syr827 via i2c4
- EMMC
- MIPI LCD display
- USB HOST
- GMAC RMII
- WLAN(AP6335)
- TF CARD
Change-Id: Iee2e237027d541498ecf4d893ad6416ebc0d5c02
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Add cpuinfo dt node for android-6.0 on rk3399 platform.
Sync from rk3399-android.dtsi
Change-Id: I18dd17ac1b78d59932f40a0796faafe942fa389d
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
As the vpu needed handle the power domain for reset function, this patch
supported the vpu domain for rk3036 Socs.
Change-Id: I67ad6085e2eb9a213c364d58713f02cc78ce6849
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
The rk3036 SoCs have some domains with NOC idle function, but it can't
turn the power domain off. This patch supports it to handle some devices
for needing.
Change-Id: I515f2cea07f1af1777bb877a5f396fd21caba3ad
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
This patch add the binding documentation for power domains found on
Rockchip rk3036 SoCs.
Change-Id: I45ff200e4d891724633fe97bdc349faad82a2984
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
UART RX pin need pullup to keep high voltage when bus is idle.
Change-Id: Iaeea6535bfc42d3ffec396798778cf8803cf3e90
Signed-off-by: Liang Chen <cl@rock-chips.com>
Missing SNDRV_PCM_TRIGGER_SUSPEND/RESUME, usb-audio can not enter suspend
since pcm was always running.
Change-Id: I0f7be7345f2b5c1bd42dad4c6fc4647c8636eed8
Signed-off-by: zain wang <wzz@rock-chips.com>
Disable IO function switching between sdmmc and jtag
for RK3328 Soc.
Change-Id: Ic8f4494b11e1091fa7a4d71674940d3c8fd5b1ad
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
(cherry picked from 887758c325)
The General Register Files are an area of registers containing a lot
of single-bit settings for numerous components as well full components
like usbphy control. Therefore all used components are accessed
via the syscon provided by the grf nodes or from the sub-devices
created through the simple-mfd created from the grf node.
Some settings are not used by anything but will need to be set up
according to expectations on the kernel side.
Best example is the force_jtag setting, which defaults to on and
results in the soc switching the pin-outputs between jtag and sdmmc
automatically depending on the card-detect status. This conflicts
heavily with how the dw_mmc driver expects to do its work and also
with the clock-controller, which has most likely deactivated the
jtag clock due to it being unused.
So far the handling of this setting was living in the mach-rockchip
code for the arm32-based rk3288 but that of course doesn't work
for arm64 socs and would also look ugly for further arm32 socs.
Also always disabling this setting is quite specific to linux and
its subsystems, other operating systems might prefer other settings,
so that the bootloader cannot really set a sane default for all.
So introduce a top-level driver for the grf that handles these
settings that need to be a certain way but nobody cares about.
Other needed settings might surface in the future and can then
be added here, but only as a last option. Ideally general GRF
settings should be handled in the driver needing them.
Conflicts:
drivers/soc/rockchip/Kconfig
drivers/soc/rockchip/Makefile
Change-Id: I6c7202f8e6c51898f25ffd0775c7c2d2f456d80e
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
(cherry picked from 4c58063d42)
The vdd_logic is a pwm regulator. Since '#pwm-cells = <2>', there
is not polarity invert support by pwm driver, so we have to add
property 'pwm-dutycycle-range = <100 0>' to support polarity invert
by pwm regulator driver itself.
Change-Id: Ie5d2cda67ce19dc792f96263836bab658d385681
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
before we get it from dts, but now it must be get from driver
Change-Id: I911f02a1c4d6618c539aceb06d485b58eb4906cd
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
Turn off differential receiver in suspend mode to save power
Change-Id: Idd9b4c2d7d9d78915c94946ced99737683a2ce91
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
CTA-861-G defined Hybrid Log-Gamma (HLG) based on ITU-R
BT.2100-0.
Change-Id: Ieb18284265529ee8d76b250d8bb5b3752425814a
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
Add this a dts-file for the RK_EVB_RK1608 board,the new dts modified
on the basis of the original rk3288-evb-act8846.dts file.The screen
light and touch are added,and the edp and hdmi interface are closed.
Change-Id: I6895641ad6baa84b826587ca7bae275171bb6d08
Signed-off-by: Nuan Wen <leo.wen@rock-chips.com>
Android8.0 CTS needs to get max charging current,
max charging voltage and battery charge counter.
Change-Id: Ia0e6589e92f24ece179299040336e050b21258b1
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
1. support isp0 and isp1 run at the same time;
2. support VIDIOC_G_INPUT command;
3. support VIDIOC_G_PARM command;
4. support VIDIOC_G_PARM command;
5. add pix.bytesperline and pix.sizeimage in VIDIOC_G_FMT command;
Change-Id: I6d0347350a0bef372ee2e01c508b2fb581ea7cfc
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Current implementation of __v4l2_async_notifier_parse_fwnode_endpoints()
checks first whether subdev_count >= subdev_max and only then whether
the port being parsed matches the given port index. This triggers an
error in otherwise valid cases of skipping ports that do not match.
Fix this by moving the check below the port index check.
Fixes: 9ca4653121 ("media: v4l: fwnode: Support generic parsing of graph endpoints in a device")
Signed-off-by: Tomasz Figa <tfiga@chromium.org>
(am from https://patchwork.linuxtv.org/patch/45462/)
BUG=b:36227021
TEST=WiP Rockchip ISP driver probes without errors on Scarlet
Change-Id: Ie4d160af21d5dedde7e73e3f1a0819a0d5d4f340
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
Registering a notifier has required the knowledge of struct v4l2_device
for the reason that sub-devices generally are registered to the
v4l2_device (as well as the media device, also available through
v4l2_device).
This information is not available for sub-device drivers at probe time.
What this patch does is that it allows registering notifiers without
having v4l2_device around. Instead the sub-device pointer is stored in the
notifier. Once the sub-device of the driver that registered the notifier
is registered, the notifier will gain the knowledge of the v4l2_device,
and the binding of async sub-devices from the sub-device driver's notifier
may proceed.
The root notifier's complete callback is only called when all sub-device
notifiers are completed.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
(cherry picked from commit 6527ddc572c6fe60808ed0ee690158498cb50439)
https://git.linuxtv.org/sailus/media_tree.git/log/?h=010f7f4393fdhttp://www.spinics.net/lists/linux-media/msg122688.html
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
BUG=b:64133998
TEST=media device topology shows subdevs registered successfully
TEST=no camera regression
Change-Id: I4e95e7f72f00a8f88786a26b73fc5ef22d4e4261
Reviewed-on: https://chromium-review.googlesource.com/693695
Commit-Ready: Tomasz Figa <tfiga@chromium.org>
Tested-by: Hyungwoo Yang <hyungwoo.yang@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>