NV21/NV61/NV42 are uv swap format for NV12/NV16/NV24
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: I5bffb542bcaacde38089880e7738ab00e32d27d3
Registering orien switch only when "orientation-switch" property
is configured in DT.
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: Ic2701911583d8ad047d596c3c91ba32b56d62fff
The uboot Type-C PD driver needs to poll the interrupt gpio level,
but the uboot code does not have a suitable interface to convert the
attributes of "interrupt-parent" and "interrupts" to standard gpio,
so add int-n-gpios configure for uboot to analyze and use.
Change-Id: Ib415902f11a35f8f8ee141297a53aa80dbb1cbaa
Signed-off-by: Wang Jie <dave.wang@rock-chips.com>
Register a virtual drm connector driver to
replace the real hardware connector like HDMI/DP/MIPI.
This can be used for some vop test.
When a virtual connector is enabled, the corresponding
real hardware connector should be disabled.
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: Ic10436e97208cafe3013a4ff800c9b4168bf6e7e
Ensure that the device registers system monitor successfully when use
scmi clk or read margin, so that the volt_adjust_mutex is available.
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ieecaa763f0c423658259a05d9f843c7860673e44
If the devices had been used by firmware and the resource had
been assigned to them but not from the kernel. It won't work for all
as not all devices allowed to reassign resource except for reset it.
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: Ica9ff9f52e1099aafdc03ae686788f8d8818ddd0
Enable wakeup in the hym8563 driver if the IRQ was successfully
requested or if wakeup-source is set in the devicetree.
As per the description of device_init_wakeup(), it should be enabled
for "devices that everyone expects to be wakeup sources". One would
expect this to be the case with a real-time clock.
Tested on rk3288-rock2-square, which has an IRQ configured for the
RTC. As a result, wakeup was enabled during driver initialisation.
Change-Id: I1e0c3f99d38c84ba7e6c15bf8919a3f30289e7ae
Fixes: dcaf038493 ("rtc: add hym8563 rtc-driver")
Reported-by: kernelci.org bot <bot@kernelci.org>
Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/1ea023e2ba50a4dab6e39be93d7de3146af71a60.1604653374.git.guillaume.tucker@collabora.com
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit c56ac7a0f4)
This patch sets iddig_en to 1 for RK3588 USB3_0 and
USB3_1 by default, then it can handle the id irq in
rockchip_usb2phy_irq() if the mode is USB_DR_MODE_HOST
when the PD_BUS is power off.
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: Ifee1155c72eead4d9faf74b7808c4dd2f6f719eb
When the ‘reg’ of the debugger is turned on, since the RGA has been
executed, after turning off the pd in the interrupt, the register
may continue to be read.
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Ic23e5e5bfe879ea6879a9322972500988415966d
standby vop2 to ensure dsi2 core not busy when DSI2_MODE_CTRL
change from data stream to command mode.
Change-Id: Id46d1a199ae1b9421b61622dd9fca6dda08c2781
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
This patch aims to reduce the power consumptiom of usb2 phys
for rk3588. For lowest power consumption, we set the phy1/2/3
enter IDDQ mode by default in uboot spl stage.
IDDQ mode power consumption:
AVCC_1V8_S0 : 0.2mA (0.05mA per phy)
AVDD_0V75_S0: 0.2mA (0.05mA per phy)
VCC_3V3_S0 : 0.2mA (0.05mA per phy)
In kernel, we needs to set the phy exit from IDDQ mode and
reset the phy to enter normal mode firstly. We use suspend
mode instead of IDDQ mode for dynamic power management,
because IDDQ mode will power down all analog blocks and that
cause the usb controllers working abnormally.
Suspend mode power consumption:
AVCC_1V8_S0 : 12.5mA (3.125mA per phy)
AVDD_0V75_S0: 10.3mA (2.575mA per phy)
VCC_3V3_S0 : 0.2mA (0.050mA per phy)
For Type-C0 USB OTG mode, set phy suspend control from GRF,
it can help to reduce the suspend power consumption:
AVCC_1V8_S0 : reduce 5.1mA
AVDD_0V75_S0 : reduce 4.6mA
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I610b95f9bb6da38d25ed2e78b0a87dcb4db8cc38
Enable Low power mode for PCIE by default, the PCIe subsystem will enter
L0s/L1 under hardware control.
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Change-Id: I9558587f23cf6b4f852ca6b5d1ab5a9f9eb014ca
PCIe Link up state is not only L0(0x11), but also other state like L0s,
L1 and etc.
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Change-Id: I9b04d01ea38be6423c214f6cb474d045dff235d5
As we don't do it in resume routine, so in order to be better
compatibale with devices, set it to low.
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I0613e05f6d35ba7def7eedd902cfaff73d716952
tablet's camera hardware power has been modified,
modify configs to adapt it.
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: Ibc1804c9a1730a8b9d32dafe4cdcb722f603d7a2
Individual port can be suspended or resumed separately.
This can save some time for resuming from deep sleep if
multiports are used.
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I44ed4a4a5cbda46425bce13a15809f68856d2174
This patch fix crash in mpp_dev_release.
In multi-instance case the session on deinit is attached to session_detach
and trigger the taskqueue to release session. But the session is
released just after unlock and before trigger then the session and
invalid and the session->mpp is also invalid.
The crash log is shown below:
[71267.807643] Call trace:
[71267.810099] do_raw_spin_lock+0x20/0xd8
[71267.813937] _raw_spin_lock_irqsave+0x28/0x38
[71267.818292] kthread_queue_work+0x2c/0x80
[71267.822298] mpp_dev_release+0x118/0x154
[71267.826219] __fput+0xf4/0x1a8
[71267.829272] ____fput+0x20/0x2c
[71267.832409] task_work_run+0x88/0xb0
[71267.835982] do_notify_resume+0xe8/0x10c
[71267.839902] work_pending+0x8/0x10
[71267.843306] Code: aa1e03e0 d503201f 5289d5a0 72bbd5a0 (b9400661)
[71267.849396] ---[ end trace d8082e9114a3a9da ]---
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ib9825de2f1bc9f7999bdfe193aa440fd85d41448