Power **vccio3** was fixed to VCC_IO that is always supply 3.3v, and
it's used as functions pins for sfc/nandc.
Change-Id: I0f5a60ab944a773c1dd254adf1dbc6af16b35403
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Power **vccio3** was fixed to VCC_IO that is always supply 3.3v, and
it's used as functions pins for sfc/nandc.
Change-Id: I928770f34ea30fe5bc6569219385d3dbf59c3db1
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
This is because of the commit form upstream: commit 5ffa2aed38
("of: remove arch/$(SRCARCH)/boot/dts from include search path for CPP")
Change-Id: I87d332caf5b3aaf3848b709c276ddb00db1327e0
Signed-off-by: Liang Chen <cl@rock-chips.com>
Some boards have SD card connectors where the power rail cannot be switched
off by the driver. However there are various circumstances when a card
might be re-initialized, such as after system resume, warm re-boot, or
error handling. However, a UHS card will continue to use 1.8V signaling
unless it is power cycled.
If the card has not been power cycled, it may still be using 1.8V
signaling. According to the SD spec., the Bus Speed Mode (function group 1)
bits 2 to 4 are zero if the card is initialized at 3.3V signal level. Thus
they can be used to determine if the card has already switched to 1.8V
signaling. Detect that situation and try to initialize a UHS-I (1.8V)
transfer mode.
Tested with the following cards:
Transcend 4GB High Speed
Kingston 64GB SDR104
Lexar by Micron HIGH-PERFORMANCE 300x 16GB DDR50
SanDisk Ultra 8GB DDR50
Transcend Ultimate 600x 16GB SDR104
Transcend Premium 300x 64GB SDR104
Lexar by Micron Professional 1000x 32GB UHS-II SDR104
SanDisk Extreme Pro 16GB SDR104
Change-Id: Iab33b1020f857ff754f3d00494ecee44c96e02b6
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Tested-by: Zhoujie Wu <zjwu@marvell.com>
Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Bin Yang <yangbin@rock-chips.com>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
(cherry picked from 6a11fc47f1)
fix cts CaptureRequestTest#testEdgeModeControl failed
failed log:
Frame duration must be in the range of [33333333, 33333333],
value 33903000 is out of range [32833332, 33833332])
Change-Id: I054e3546736edcdba041c4a37cb9975ed3fa0870
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
PCIe spec requires max cfg space size is 4KB, and the hierarchy
of PCIe tree only support up to 256 devices. So the reserved
cfg space for RC is 1MB per spec.
If any callers access the cfg space out of range, the spec asks
PCIe RC kick back 0xffffffff. However, Rockchip RC will crash
if this happens. So the software should manually check the ECAM
size in PCIe accessors to workaround it.
Change-Id: If4d40add229f9c315eab6d99b290766695208daf
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
The ROM code for Rockchip platform never support detecting
SD 3.0 mode, so if the SD card contains system image running
into SD 3.0 mode in kernel, it will fails to reboot.
The problem is SD 3.0 mode is using 1.8V signal and could only
be switched back into 2.0 mode by power cycle. If the customed
board could not switch off its power rail, the ROM code can't
soft reset the SD.
Add mmc_sd_shutdown to workaround this special case and don't
bother normal SD cards used as external disk by checking the
RESTRICT_CARD_TYPE_MMC flag.
Change-Id: I4c3d3111c0bce0ad3cd4f0c6592ff595d7015afe
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
If the device has a 'power-domains' property that the power framework
prefer to use dev_pm_ops for suspend&resume. The legacy suspend & resume
callback for nandc driver would not be used.
Anyway, it's better use dev_pm_ops whether 'power-domains' is existent.
Change-Id: I0e2822a44f3f0d458b778636cd84c5ae54505cf5
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
1.Filling the HDMI AVI infoframe quantization range information.
2.If output is limited enable color space conversion to convert.
Change-Id: I75f666424f00f3f6ec695047f7851824e89cd1a5
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
New Inno combphy improve its pre-emphasis settings, so we
need to use new recommended value instead.
Change-Id: I5b4b2e8819c4b44d908156bb8ad99bd8c62c8bdf
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
modify head file to match the change of camera engine
Change-Id: Ia139e733f766cf9cbb02e80ceda81a1817b3acbf
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
According to the hardware test, change the tx pin drive strength
to 4ma, and mdc/mdio 2ma.
Change-Id: Ia5ab1728c9e9ecbfa7207217649588f600070ae4
Signed-off-by: David Wu <david.wu@rock-chips.com>
drivers/power/rk817_battery.c:3254:12: warning: 'rk817_bat_pm_resume' defined but not used [-Wunused-function]
error, forbidden warning:rk817_battery.c:3254
static int rk817_bat_pm_resume(struct device *dev)
^~~~~~~~~~~~~~~~~~~
drivers/power/rk817_battery.c:3037:13: warning: 'rk817_bat_pm_suspend' defined but not used [-Wunused-function]
error, forbidden warning:rk817_battery.c:3037
static int rk817_bat_pm_suspend(struct device *dev)
Change-Id: I8cb39c95688e16027257c09a20eaeb100bd1024b
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
we replace cru assigned clock node in rk1808-evb-x4 dts, and now clk_32k_ioe
is setted in this node, so we need to add this back in rk1808-evb-x4.dts,
otherwise the SOC can not boot normally.
Change-Id: I06a55bea97e0ef260f2549349b3211a311a913ae
Signed-off-by: Lin Huang <hl@rock-chips.com>
There was a typo when generating endpoint name which
would be very confusing when debugging. Fix it.
Change-Id: If29433f427499674b7604b399cbc3ac6e6bf7b1f
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit 696fe69d7e)
To support preisp post-processing and camera hal1,
let driver probe ok when no sensor device is connected.
Change-Id: I1830420f448b47a0bd327ee3950da0eb7af8d3fb
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
fix the following error on RK1808.
error: implicit declaration of function 'kzalloc' [-Werror=implicit-function-declaration]
inf = kzalloc(sizeof(*inf), GFP_KERNEL);
error: implicit declaration of function 'kfree' [-Werror=implicit-function-declaration]
kfree(inf);
Change-Id: Ie46828b03a45cc523b8503fb62caeccee165142f
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
The DWC3 rockchip driver provides a sysfs interface "dwc3_mode"
to force Peripheral mode or Host mode. It has a problem to force
to Host mode when the DWC3 works as Peripheral mode and connects
to Host (e.g. PC USB Port).
This issue can be reproduced on RK1808 EVB follow these steps:
1. Set dr_mode = "otg" in DTS dwc3 node;
2. Start the system, and connect the RK1808 USB 3.0 to PC USB.
3. Make sure that PC has recognized the USB device, and then
force DWC3 to Host mode via "dwc3_mode".
echo "host" > /sys/devices/platform/usb/dwc3_mode
And plug in an USB 2.0 Device to RK1808 USB 3.0 Port, then
we can see the following error log:
rockchip-dwc3 usb: Peripheral disconnect timeout
rockchip-dwc3 usb: USB unconnectedxhci-hcd
xhci-hcd.3.auto: xHCI Host Controller
xhci-hcd xhci-hcd.3.auto: new USB bus registered, assigned bus number 3
xhci-hcd xhci-hcd.3.auto: hcc params 0x0220fe64 hci version 0x110 quirks 0x04010010
...
hub 4-0:1.0: USB hub found
hub 4-0:1.0: 1 port detected
rockchip-dwc3 usb: USB HOST connected
rockchip-dwc3 usb: set new mode successfully
usb 3-1: new high-speed USB device number 2 using xhci-hcd
usb 3-1: new high-speed USB device number 3 using xhci-hcd
usb usb3-port1: attempt power cycle
usb 3-1: new full-speed USB device number 4 using xhci-hcd
usb 3-1: Device not responding to setup address
usb 3-1: Device not responding to setup address
usb 3-1: device not accepting address 4, error -71
It's because that in this test case, the dr_mode is original otg
mode, and the current code only call phy_set_mode() to disconnect
the peripheral from PC host if the dr_mode is peripheral mode.
This cause dwc3_rockchip_otg_extcon_evt_work() wait peripheral
disconnect timeout, and DWC3 fail to do runtime suspend and resume
to initialized the DWC3 core register again.
This patch call phy_set_mode() to disconnect the peripheral if
the current dr_mode is peripheral or otg when force to host mode.
Change-Id: I733d364046abcb616cf3d99ed57ab8604a87eef6
Signed-off-by: William Wu <william.wu@rock-chips.com>
In dwc3_rockchip_async_probe(), if it tries to get hcd in
peripheral only mode (dr_mode = "peripheral"), a NULL pointer
deference will happen. Because hcd only be allocated and
initialized in host mode or otg mode.
We can reproduce this issue when set dr_mode to peripheral
in DTS, like rk3399pro-npu.dtsi, and get the following panic
log on RK1808 EVB:
Unable to handle kernel NULL pointer dereference at virtual address 000000b0
pgd = ffffff8008b0b000
[000000b0] *pgd=000000007fffe003, *pud=000000007fffe003, *pmd=0000000000000000
Internal error: Oops: 96000005 [#1] PREEMPT SMP
Modules linked in:
CPU: 0 PID: 29 Comm: kworker/u4:1 Not tainted 4.4.167 #493
Hardware name: Rockchip RK1808 EVB V10 Board (DT)
Workqueue: events_unbound async_run_entry_fn
task: ffffffc07cd29580 task.stack: ffffffc07cd40000
PC is at dwc3_rockchip_async_probe+0x28/0x1c8
LR is at async_run_entry_fn+0x48/0x100
pc : [<ffffff80083adf5c>] lr : [<ffffff80080b445c>] pstate: 60000045
sp : ffffffc07cd43d10
...
[<ffffff80083adf5c>] dwc3_rockchip_async_probe+0x28/0x1c8
[<ffffff80080b445c>] async_run_entry_fn+0x48/0x100
[<ffffff80080acca8>] process_one_work+0x1b8/0x2b8
[<ffffff80080ad94c>] worker_thread+0x304/0x418
[<ffffff80080b206c>] kthread+0xd0/0xd8
[<ffffff8008082e80>] ret_from_fork+0x10/0x50
Fixes: f2a2b34e45 ("usb: dwc3: rockchip: use async_schedule for initial dwc3")
Change-Id: I740936e43bc4ea2b5a056d6d9dcaf18466006f0c
Signed-off-by: William Wu <william.wu@rock-chips.com>