The combphy_u3_cp_test() is used for USB3 compliance test,
and it depends on the cp_test of phy_ops which will be
dropped later, so we remove combphy_u3_cp_test directly.
As a side effect, we need to use io commands to set the
USB3 enter compliance test mode instead of host_testmode
for RK1808 USB3 combphy.
Change-Id: Iac7d9a4c6b0d2a74c284586f5dcbb48925691a91
Signed-off-by: William Wu <william.wu@rock-chips.com>
This patch remove debugfs directory and host_testmode which
cause the following error:
ERROR: "xhci_set_link_state" [drivers/usb/dwc3/dwc3-rockchip-inno.ko] undefined!
We remove the code of host_testmode directly, because it
depends on the phy_cp_test() which will be dropped later.
As a side effect, we need to use io commands to set the
DWC3 Host enter compliance test mode instead of host_testmode
for RK3328 USB3.
Change-Id: Ie0b1fac63fd6458f07ad30edadc7c4c27486e894
Signed-off-by: William Wu <william.wu@rock-chips.com>
When I test the uac gadget function, I find that the uac
gadget out transfer may stop expectedly and the alsa buffer
will be empty which results to input/output error.
In some cases, we will get an endpoint event
DWC3_DEPEVT_XFERINPROGRESS and the event status is
DEPEVT_STATUS_MISSED_ISOC, and the original code try to issue
an EndTransfer command. After the EndTransfer is completed,
we will get a XferNotReady event. However, it will fail to
giveback the req to the udc gadget driver due to an additional
request unmap operation.
To fix this problem, this patch return directly in kick transfer
if there are isochronous endpoints and retry to transfer next time.
Signed-off-by: Ren Jianing <jianing.ren@rock-chips.com>
Change-Id: I80a8e7c0caa9129e5736bbf89909662c2f3ed4fe
There are some differences between hardware V12 and v10
1.Power:
The buck1 of rk809 supplies power to NPU and vepu
The discrete power supplies power to logic
2.Reset signal of camera:
The reset signal of csi rx0 is control by gpio1_D5,
The reset signal of csi rx1 is control by gpio2_A0.
Change-Id: Ib290939c9a3a47efaeabfbadbc796126e0cbf279
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
The USB2.0 OTG PHY of RV1126/1109 which is designed for lower power
consumption provides only 8.8mA current source on DM. Multiplied
by 45 Ohm host termination resistance, voltage is about 400mV.
If the threshold voltage of host is greater than 400mV, the high
speed handshake will fail and SoC communicate at full speed. So
swing calibration is necessary.
We use gpio to control the 220 Ohm pull-up resistor to provide additional
current. Experiments show that the voltage of chirpK can be increases
to about 600mV.
Signed-off-by: Ren Jianing <jianing.ren@rock-chips.com>
Change-Id: I387ae1840959540ff9ca22db26896def0e890619
This patch will enable id interrupt for otg port when the property
vbus-always-on is set in dts.
If vbus is always on, bvalid interrupt won't make sense and be
disabled. But we cat change id state to switch drd mode by software.
Change-Id: I69fc3f00430dfd73835c6e99694d8d7c72c60c8c
Signed-off-by: Jianing Ren <jianing.ren@rock-chips.com>
By bypass charge detect module, about 140uA current can be saved
on USB_AVDD_1V8 power supply when suspend. Notice that bandgap
current can not be turned off, so there is still about 165uA
current.
This patch also remove the tuning in phy resuming, because the power
of phy is always on and registers does not need to be configured
again.
Change-Id: If13d3741e3b01289c1bd0294d6e6d88278c4654c
Signed-off-by: Jianing Ren <jianing.ren@rock-chips.com>
This patch remove the clks manegement in phy operations and keep the
clks always on. Keep the clks on can avoid many errors such as USB480M
clk abnormal output and EHCI controller error.
Change-Id: If201106d432d05e8fc5f63d595a67524e2183b5c
Signed-off-by: Jianing Ren <jianing.ren@rock-chips.com>
According to VOP_VERSION register on rv1126, the
major is 0x2, minor is 0x0b.
Change-Id: Ie8f3a91d839bcd042a655881302e9b43f6f297d5
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
1. read clock setting using the common code from dtsi.
2. clock enable/disable, all devices using the same function.
3. clock frequency set to two levels: normal and advanced.
4. according to specific requirements, the frequency is set
level instead of the value.
Change-Id: Idcf8e0f49987df20f3eb2574aff316e507f82cfe
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
The sequence of operations is as follows:
1. disable the sleep pin function
2. modify the sleep pin polarity
3. delay 3 32k clock cycle
4. select the sleep pin function
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: If6df2b2f190951abe9bb31fbd18d9af47e145038
Get the calibration parameters for each chip by reading the OTP,
Calculate temperature using calibration parameters.
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I05cfb65ae95dcefc7fc52ed91326c7da9d27de55
RK1000 is a digital-analog mixed chip which has tve output function.
RK1000's registers can be written and read through I2C interaface.
Because RK1000's I2C need dclk and mclk, RK1000 TVE should be registered
after RK1000 CORE.
Change-Id: I65b40826bd1dbf07d4fa94ecdf8c75005008731f
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
This patch disable USB Gadget functions UAC1/UAC2/UVC/RNDIS,
and only support F_FS for ADB.
Change-Id: If04bb18f9c620299dde4b2452e418e63badeec12
Signed-off-by: William Wu <william.wu@rock-chips.com>
rockchip_otp_module_init() depends on nvmem_init() to init nvmem_bus_type.
But rockchip_otp_module_init() and nvmem_init() are both in the same
subsys_initcall level.
Change-Id: I58bc66519fb76179be3e6a170048a67c0861b224
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
The size of vendor_info need align to 4KB and compatible with uboot.
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: I16ae2cf5c976032e944bfb590d38ec89831f9b2f
dmarx isr is unreliable, using MI frame end to replace it
Change-Id: Iabb4f405aedf3e81995d009ce2f4bddce2d12ed3
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
1.The reset signal is directly controlled by GPIO,
so there is no need to wait for the delay of RC circuit
2.Correct the level setting of reset signal
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
Change-Id: I808a7ba13f23f630d1ab9d11c54cb33a1e85123c
drivers/input/sensors/sensor-dev.c:1600:5: warning:
no previous prototype for 'sensor_probe' [-Wmissing-prototypes]
drivers/input/sensors/sensor-dev.c:1854:3: warning:
this statement may fall through [-Wimplicit-fallthrough=]
drivers/input/sensors/sensor-dev.c:1857 sensor_probe() warn:
missing break? reassigning 'sensor->input_dev->name'
drivers/input/sensors/sensor-dev.c:1602:30: warning:
Value stored to 'sensor' during its initialization is never read
drivers/input/sensors/sensor-dev.c:504:3: warning:
Value stored to 'result' is never read
Unneeded variable: "result". Return "0" on line 893
Unneeded variable: "result". Return "0" on line 908
Fixes: a32d316fcc ("driver: sensors: improve sensor driver to pass android vts test")
Change-Id: I95bdc5373694e0a78f9a29583a3138e14eae6126
Signed-off-by: Tao Huang <huangtao@rock-chips.com>