Fixes: 0b8c593910 ("BACKPORT: drm/bridge: analogix: Do not use device's drvdata")
Change-Id: I4b4bd81e895022ddee0bbfd727bf05eb4d7864f2
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Programmable THRE Interrupt mode in order to increase system
performance.
Change-Id: Ic1ef9ecae0c6feb00170ad97ee3c6245ca3bf068
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
Most SOCS have only 8 or 6 channels, but have more than 16
peripherals. If those peripherals work together, some
fails to request dma channel, because there are no enough
channels. And maybe it's unnecessary to use dma for uart
tx. It is necessary for uart rx when hardware auto flow
control is not used.
&uart0 {
dma-names = "!tx", "rx"; // disable uart tx with dma
status = "okay";
};
Change-Id: Ia74477514ba57300a4d19a5c2565ae7b5b8ab521
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
If the referenced regulator is a dummy, the voltage is invalid,
but someone doesn't need the voltage, just need the adc value,
so don't return fail at probe when the regulator is dummy. If
he wants the voltage, configures the actual referenced regulator
at dts.
Change-Id: I8eaecc1a8e7e57c3a87aa69b9b852735bf4a025a
Signed-off-by: David Wu <david.wu@rock-chips.com>
As the wifi module used the ap6398s on rk3399pro evb, not the ap6255.
Even though the wifi chip name isn't effect to load wifi module, at least
it won't be misunderstand.
Change-Id: Icd44ce27d9aebcdb0d252f7c8c1dabce657cd573
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
This patch enables the ramoops to fetch some logs for debugging and
testing, the log will save on /sys/fs/pstore/console-ramoops*.
Change-Id: I47c9efbd1a0e17228e07fd6ad87a446babb265ab
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
dvp input raw/y, will output 16bit per pixel,
so output format shuold be raw16/y16.
Change-Id: I13e05ebe62b8802fa3a4c51f603c420e8127b929
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
This patch uses the devm_extcon_register_notifier to
manage the resource automatically.
Change-Id: I427c54d59283ee97623ad829e42dac40516c3df4
Signed-off-by: William Wu <william.wu@rock-chips.com>
RK3399 Excavator Board has an USB 3.0 PHY power on issue
when Type-A USB 3.0 Host port connects with an USB 3.0
device and do system PM suspend/resume test.
When the issue happens, we gets the following error log:
phy phy-ff800000.phy.4: phy poweron failed --> -110
dpm_run_callback(): platform_pm_resume+0x0/0x54 returns -110
PM: Device fe900000.dwc3 failed to resume: error -110
xhci-hcd xhci-hcd.12.auto: port 0 resume PLC timeout
It's because that the Type-C PHY docs say that the DWC3
controller "needs to be held in reset to set the PIPE
power state in P2 before initializing the Type-C PHY",
but actually the PIPE is in P0 state because an USB 3.0
device is connected, and the current code doesn't reset
the DWC3 controller upon PM resume.
This patch prevents powering off the USB 3.0 PHY of
RK3399 Type-A USB 3.0 Host port when system enters
syspend. As a side effect, the power consumption in
standby mode will increase. However, if you want to
optimize the power consumption in standby mode and
allow the USB device to be reenumerated upon PM resume,
you can add a property "needs-reset-on-resume" in
DWC3 DTS like this:
&usbdrd3_1 {
needs-reset-on-resume;
};
Change-Id: Ia1cdf6e09cac520e99931a15423b8de7be2ba52b
Signed-off-by: William Wu <william.wu@rock-chips.com>
This patch adds a new property "needs-reset-on-resume" for
Rockchip DWC3 IP. We can use it if we want to reset the DWC3
controller upon PM resume.
Change-Id: I8ae7f8fe46388cdc9e265e758d9edeb82840d284
Signed-off-by: William Wu <william.wu@rock-chips.com>
If the discard_granularity of the NAND flash block device has not
been initialized, then the DM device will not set max_discard_sectors
while it is created,and f2fs will have exceptions when it performs
the discard function.
bug:
WARNING: at fs/f2fs/segment.c:1212
[ 28.075747] Hardware name: Rockchip rk3326 863 avb board (DT)
[ 28.075767] task: ffffffc03b08d100 task.stack: ffffffc02f0b4000
[ 28.075802] PC is at __submit_discard_cmd+0x1b4/0x4ec
[ 28.075840] LR is at __issue_discard_cmd+0x1b8/0x248
[ 28.075859] pc : [<ffffff800831f218>] lr : [<ffffff800831f8d0>] pstate: 60400145
[ 28.075874] sp : ffffffc02f0b7be0
Change-Id: I940728a675e7a30a05742bf2a7dcace92f7a2354
Signed-off-by: Yifeng Zhao <zyf@rock-chips.com>
From the TRM, the MIC PGA gains for 8 ADCs:
- version A:
0dB, 20dB
- version B:
0dB, 6.6dB, 13dB, 20dB
Change-Id: I9cf758708ec80afe06340f48a2f71f24654f36fe
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
rk817/rk809 must restore the PMIC_POWER_EN OTP value before the system reboot.
Change-Id: I2ccfbb4d47eb41cdcea048111873b6ab85477d64
Signed-off-by: Shengfei Xu <xsf@rock-chips.com>
rk3308k supports wide temperature feature, it makes system suspend
stable in extrem low temperature.
Change-Id: I07427c21263e5a48bc07c935291f8494e50ec9e3
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
The dwc3_rockchip_probe() spends lots of time to initialize
the dwc3 host and pm runtime. It significantly lengthen the
boot time.
I test on RK3399 Excavator Board, the execution time of the
dwc3_rockchip_probe() on Type-C0 is about 220ms without this
patch (Type-C0 connect to PC USB port at the same time). Most
of the time is spent on remove hcd(~16ms) and pm runtime
suspend (~180ms).
1. remove hcd (~16ms)
When do usb_remove_hcd(), the xHCI should wait 16ms to
enter the stopped state with the following log:
xhci-hcd xhci-hcd.11.auto: Host not halted after 16000 microseconds
2. pm runtime suspend (~180ms)
Race condition is observed during pm runtiem suspend.
CPU0 CPU1
---- ----
rockchip_chg_detect_work() pm_runtime_suspend
-> mutex_lock(&rport->mutex) -> dwc3_runtime_suspend()
|| -> dwc3_suspend_common()
\/ -> dwc3_core_exit()
USB_CHG_STATE_UNDEFINED -> phy_power_off(dwc->usb2_generic_phy)
|| -> rockchip_usb2phy_power_off()
\/(100ms) -> wait for rport->mutex
USB_CHG_STATE_WAIT_FOR_DCD .
|| .
\/(40ms) .
USB_CHG_STATE_DCD_DONE
||
\/(40ms)
USB_CHG_STATE_PRIMARY_DONE
-> mutex_unlock(&rport->mutex)
-> mutex_lock(&rport->mutex)
This patch runs the remove hcd operation and pm runtime
suspend in an async_domain to speed up the boot time. With
this patch, the dwc3_rockchip_probe() spends only ~12ms.
Change-Id: Ic60774e5c3e7be9f718c18ade86b2d95a9134b4c
Signed-off-by: William Wu <william.wu@rock-chips.com>
Split DT source files to separate out android firmware for Android Pie & Oreo
Change-Id: Ib16858996e236bb292bc380c0fddea2f5213c15b
Signed-off-by: wu jingchen <oven.wu@rock-chips.com>
The Seagate Expansion Portable Drive HDD (ext4 file system,
idVendor=0bc2, idProduct=2321) is reported to fail to work
on the rk3399/rk3328 platforms USB 3.0 interface with the
following error message when do read/write operation by dd
command:
xhci-hcd xhci-hcd.11.auto: Ring expansion failed
It's because that xHCI use the dma_pool_alloc() to allocate
DMA buffer for segment_pool with GFP_ATOMIC flag, however,
the default 256 KiB coherent pool is too small for the USB
HDD, so increase it to 1024 KiB to make sure that devices
will be able to allocate their DMA buffers with GFP_ATOMIC
flag.
Change-Id: Ic94c9ceeeb4adabe860af46546550aa8f73f11ca
Signed-off-by: William Wu <william.wu@rock-chips.com>
Set CPU voltage to low temperature voltage before system suspend,
so that it can resume successfully at low temperature.
Change-Id: Ib9ab16558ff69ea80e862473ef9ec6bfa7cd61ad
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
If support wide temperature, it necessary to set voltage to low temperature
voltage before system suspend, so that it can resume successfully at low
temperature.
Change-Id: Ie6787092c9510788054217bd830b5ae1e4dd6bc2
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>