Decrease RK_CRYPTO_PRIORITY from 300 to 0.Hardware driver
will only invoked by user layer through the driver name.
Change-Id: Ifeda13a2b9ce6fec6be60a2422b7507f91eedbb5
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
RIOCCRYPT_FD : used to support dma_fd crypt.
RIOCCRYPT_FD_MAP : used to map dma_fd to phys_addr.
RIOCCRYPT_FD_UNMAP : used to unmap between dma_fd and phys_addr.
RIOCCRYPT_CPU_ACCESS : for cpu access after dma_fd map
RIOCCRYPT_DEV_ACCESS : for DEV access after dma_fd map
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: Ifa016c0009fde3d6909fb4e2313af341d808f793
Add register and unregister for crypto driver.
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: I406776514374bb460875ce8bd71a3031cd110587
Add cryptodev_ prefix.
Replacements are done by the following command:
for i in kcaop_from_user kcaop_to_user adjust_sg_array release_user_pages sg_advance sg_copy; do sed -i "s/$i/cryptodev_$i/g" *.c *.h; done
sed -i -e "s/ get_userbuf(/ cryptodev_get_userbuf(/g" -e "s/ __get_userbuf(/ __cryptodev_get_userbuf(/g" *.c *.h
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I7a3aee655427faffac6baad0e155bd76638ae040
The rk3588s bbk tablet Type-C0 hardware design does not
support usb3.0 and dp functions, so it is configured as
usb2.0 and disable usbdp phy to reduce power consumption.
Change-Id: Id69964d18e31a12f240f792ea04e60e1e28d794d
Signed-off-by: Wang Jie <dave.wang@rock-chips.com>
CRYPTO_ALG_KERN_DRIVER_ONLY means the algorithm provided is hardware
accelerated but not available to userspace via instruction set or so.
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: Ia4265944a058aaaa4aeb7e6f1adc3bd1b8d4af5d
When using RGA2, import buffer will map it to dma.
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I1d8d2e35e5d55acefb7825adfbee13a3808213b4
When the error caused by software interruption is not printed.
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I05e4498391be07bd5381c9cf17dabbe1c827417e
It will be used by finding the memory corresponding to the handle
in rga_mm.
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I6bd09a3641671c69aa903010c0aa4e518cf9b5af
Support mapping virtual address to sgt and verify whether the memory
is greater than 4G.
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Iae958cd1ac408e3d72a184dc9fd92fd41259ea38
Adds "quirk-skip-phy-init" property for USB OTG0 on RK3588 SoC that
reject managing the PHY state in HCD core and fix the PHY exit failed
in "usb_phy_roothub_exit()" at PM suspend stage.
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: I508069f6836921e2f4717aee5f3baedffb9f9add
The "skip_phy_initialization" property in usb_hcd structure means
that do not manage the PHY state in the HCD core and handle it by
the controller's driver. This commit adds "quirk-skip-phy-init"
quirk which can configure the property in DT to support it.
For Rockchip DWC3 dual role scheme, we enabled the device wakeup
capability in dwc3 runtime resume that would cause the PHY exit
failed in "usb_phy_roothub_exit()" at PM suspend stage. So this
commit is also a workaround to fix it.
Fixes: f1636eb0fd ("usb: dwc3: fix failed to enter suspend")
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: Ibc9885669f25d2aeea18a9d22d49a204eb346ea1
Adds "quirk-skip-phy-init" property that can configure in DT to
support skip PHY initialization quirk in HCD core.
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: Ifd85bbfc5a39a28961e551d2ded5ddb1a904a7f5
The RK3588 usb3 otg controller connected with one usb2 phy
and one usb3 phy. The usb2 phy used UTMI+ interface, and
the usb3 phy used PIPE interface. The usb3 otg controller
initialization depends on the pipe phystatus which from
usb3 phy by default. If the usb3 phy is disabled, it needs
to select the pipe phystatus from usb grf with the property
"rockchip,sel-pipe-phystatus".
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I5015a18a19c14ccb43530fbae15200c8cb3ab242
The rk3588 usb otg0/1 controllers depend on the pipe
phystatus which from usb3 phy by default. When the usb3
phy is disabled, it needs to select the pipe phystatus
from usb grf. This patches add new properties to select
pipe phystatus if needed.
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I50b6c7ece87913af3152204da60727140d82bc3d
Some devices need rescan devices by its function drivers, because it
need special IO settings before finish training. So controller's
resume for waiting for link up must be failed at this stage. Add a
property for this kind of device to skip waiting for training.
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I45787cbd41a07f2f80cb712b896021d1367cb9dc
RK806 INT pin is connected to pmic_int(gpio0a7).
the pmic_int sets low-level interrupt, which requires pull-up
voltage(VCC_1V8_S0). but the pull-up voltage is powered off
in system suspend, causing the system to wake up immediately.
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: Id85b441c9ce7f9837e3c61647b39f03dd4c63e53
The GPIO4_B1 is reused by spdif_tx1 and PCIE20x1, and the hardware
is conneted to PCIE20x1
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
Change-Id: Ibeaec0b16add9c8dbeb91b06a667fd0bea10f0ce
Uboot use the Standard Lz4 format to decompress kernel Image.lz4,
So, we should use the standard one for lz4 compression.
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ic299314a6377e68fac477f451d1ffcae9e8466ce
This reverts commit aa5ccab207.
Linux kernel still use Legacy lz4 format for self-decompression.
So, we should use the legacy one('lz4 -l') for lz4 compression.
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ic10f9cb65bcc7fadd2071b97f8effb958f54d0a4
The usb2-phy driver needs to know the plug-in and plug-out information
from TCPM (Type-C Port Manager) for USB2.0 Type-C scheme, so adds the
orientation switch support in usb2-phy driver, and the corresponding
DT nodes is required, please refer to the following example.
[...]
&u2phy0 {
orientation-switch;
port {
#address-cells = <1>;
#size-cells = <0>;
u2phy0_orientation_switch: endpoint@0 {
reg = <0>;
remote-endpoint = <&usbc0_orien_sw>;
};
};
};
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I51ca0999dcecaf4aa9f21be453dce2fddb6f9c9f
the pmic_pins(gpio0a2,gpio0a3,gpio0a7,gpio0c1,gpio0c2,gpio0c3,gpio0d6)
are used for pmic dvs and interrupt.
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: I0f749e01d2ba7716b705fba8489f0040ae88ac7f
The RK3588 USB OTG controller already supported to switch
Device/Host mode by software, so set dr_mode to otg for
RK3588 EVB2/NVR and RK3588S EVB2.
With this patch, the USB OTG controller still works as
Device mode by default. You can use the following two
methods to switch Device/Host mode.
Method 1.[Legacy]
1. Switch to Host mode
echo 1 > /sys/devices/platform/fd5d0000.syscon/fd5d0000.syscon:usb2-phy@0/otg_mode
or
echo host > /sys/devices/platform/fd5d0000.syscon/fd5d0000.syscon:usb2-phy@0/otg_mode
2. Switch to Device mode
echo 2 > /sys/devices/platform/fd5d0000.syscon/fd5d0000.syscon:usb2-phy@0/otg_mode
or
echo peripheral > /sys/devices/platform/fd5d0000.syscon/fd5d0000.syscon:usb2-phy@0/otg_mode
Methed 2.[New]
1. Switch to Host mode
echo host > /sys/kernel/debug/usb/fc000000.usb/mode
2. Switch to Device mode
echo device > /sys/kernel/debug/usb/fc000000.usb/mode
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I291ac53cb5920c71a631cb76d1167eea8bbf4ee2