It's better to force link into L2 before we power off devices,
especially if link is in L1. L2 routine is fully defined as:
1) host brings all downstream components back to D0 and L0 before
PCIe stack set D2hot to all devices.
2) send PME_Turn_Off to downstream components and wait for PME_To_Ack
3) check if we are ready to enter L23
4) check if link is already in L2
5) release all kinds of resources including power, #PERST, etc.
6) reset controller when resume
7) brings all downstream components to L0s and L1 after resume
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I27d7e41079d5e15b4a93d66aa8d6b9286e182ecd
This driver aimed at starting decompression as soon as
possible.
Change-Id: Ie29f43935f0642ae8c9c605d3ebc40292d4d1781
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
The current runtime suspend/resume do nothing when the
current_dr_role is not set. It may fail to do core init
in some scenes.
Test on RK3588 EVB2 or NVR Demo which have Type-A OTG
port, without this patch, the USB ADB enumeration failed
occasionally. When this error happens, we can find that
the register GUSB2PHYCFG(0) isn't initialized correctly.
It's because that during dwc3 probe, if the drd_work which
called from dwc3_drd_init() is scheduled behind the runtime
suspend process, the current_dr_role will be uninitialized,
this cause the runtime resume process doing nothing and put
the dwc3 phy in uninitialized status.
This patch add dwc3_core_init and dwc3_core_exit operation
for runtime suspend/resume when the current_dr_role is not
initialized.
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I294bcf2ad68136e9eb24a9e4a1ad389e73c974d2
The RV1106 SoC have one channel TS-ADC(CPU).
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: Ib8485cd438feb5aab0e359ab1517ea263a6a978e
HASH_ALGO_SHA224 was misspelled as HASH_ALGO_SHA256.
In hMAC-224 algorithm, key digest errors occur when the key
length exceeds the blocksize length.
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: I38c20028b390f32fa7326e4b4e4adeb43902f2e0
This adds mailbox and pmu_mailbox nodes for RV1106 SoCs.
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: I2c1f6c9f64f0ec04d981c1491495611bc2cff09a
usleep shouldn't be used in an atomic context.
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I9c6accd1b17488f4ad25b79681856c47fab29d20
Export the rfkill_get_wifi_power_state() for use by pcie-dw-rockchip.
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I122d74da9271f2f808fbd474386994778561cbf8
1. disable crypto interrupt when crypto is idle
2. ahash init/update/final use hardware crypto
3. reset crypto cc before cipher/hash hardware init
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: Id2c85c36c9f2fbe34af553b3ba12239e3cd281b4
1. add sha224/sha384 support.
2. XTS mode was removed due to panic on some platforms(RV1126 kernel 4.19).
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: I339cb21c6abefa684f9d36e8faaa04d6ab43d3b1
1. On RV1126/RV1109, AES-192 dma-fd should not use hardware crypto.
2. Fixed a bug with CTR rk_iv_copyback in chain mode.
3. Modify cryptodev log information to reduce runtime logging.
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: Ib197e0df4f0ff0c7f4cd20832f25be1b21e8cbf3
make gki config invisible when ROCKCHIP_MINI_KERNEL=y.
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I63e92df2af93a8022be64755610c890eb1726d3f
Android healthd try to listen power_supply subsystem uevent,
but which will block system from suspend on big.LITTLE system
because thermal_cooling_device_unregister will called when
cpufreq_exit. So ignore this uevent when suspend.
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I2ce98efce1bcaa06cfc87f305b6730f67eb1eb3c
For nvr product,the USB OTG controller works device mode by default.
for box,the USB OTG controller works otg mode by default.
Signed-off-by: Mark Huang <huangjc@rock-chips.com>
Change-Id: I23942704a0617739b37fe93a319322b03d653bac
When dp show uboot logo, It need skip the init process of dp
controller and set the phy status as power on.
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: I7dc3a00c1e71f92648cbb49ca527eb2a9f9026ac
When DP show the uboot logo, the usbdp phy will work in uboot.
In this case, the display on DP will be broken if we initialize
the usbdp phy again when system enter kernel.
Reading the lane mux and enable register when probe the usbdp
phy driver. If DP used the usbdp phy in uboot, It should skip
the initialization.
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: I55dcf8bd9c0b8be94326dd17c53ad47237cd1975