This patch fixes the error base address for the i2s controller from
0xff88b0000 to 0xff8b0000.
Also order the i2s node by mapping address.
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I613eaf64ee010c41208f1c8169e55efbf39fd34c
warning: drivers/rk_nand/rk_ftlv5_arm32.o uses 4-byte wchar_t yet
the output is to use 2-byte wchar_t;
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: I9ea1cdb05be5e4edb297517a9ae8c5e5377538be
In rk3326-evb-lp3-avb, gpio2_b6 is used for CAM_PDN0 instead of cif_data1.
Change-Id: I926474f2b06cc39052997750eb1894a8b0fe04d7
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
The camera device should keep *power on* until stream off, that make
sure the mclk is enable.
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I2db0070793d755d8d1fe2cda3f87aaa498e052d3
While investigating the clang `ge` uninitialized variable report, it was
discovered the default switch would have unintended consequences. Due to
the switch to __phy_modify, the driver would modify the ID values in the
default scenario.
Fix this by promoting the interface mode switch and aborting when the
mode is not a supported RGMII mode.
This prevents the `ge` and `fe` variables from ever being used
uninitialized.
Fixes: 48e8c6f161 ("net: phy: add driver for Motorcomm yt8511 phy")
Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Peter Geis <pgwipeout@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David Wu <david.wu@rock-chips.com>
(cherry-pick from commit 0cc8bddb5b)
Change-Id: I610c03a4f032a8a8dde8ef58d105b721c0541bf5
clang doesn't preinitialize variables. If phy_select_page failed and
returned an error, phy_restore_page would be called with `ret` being
uninitialized.
Even though phy_restore_page won't use `ret` in this scenario,
initialize `ret` to silence the warning.
Fixes: 48e8c6f161 ("net: phy: add driver for Motorcomm yt8511 phy")
Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Peter Geis <pgwipeout@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David Wu <david.wu@rock-chips.com>
(cherry-pick from commit 546d6bad18)
Change-Id: I0467ca4b5846e71ddca8a6818e5c021010a72d98
Add a driver for the Motorcomm yt8511 phy that will be used in the
production Pine64 rk3566-quartz64 development board.
It supports gigabit transfer speeds, rgmii, and 125mhz clk output.
Signed-off-by: Peter Geis <pgwipeout@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: David Wu <david.wu@rock-chips.com>
(cherry-pick from commit 48e8c6f161)
Change-Id: If0af67cda0ad607e4a31f126804547e9d8b3df50
In platform arm32, iommu is shared in different device,
it must attach to ensure hardware working in current device.
Change-Id: I854a362adf6145dcfd796885922683f8a6b7e131
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
Calling ioctl PCIE_DMA_GET_FLASH_INFO to get spi nor id.
Change-Id: I1ecfdd527f18c0c323fba9673546c167032d1726
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
These two interrupts are managed by data routine and not need to
enable it via runtime_resume each time.
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I9ef2ae0acabefeba4a69ff6b4c7edc3c0318fdeb
If kick transfer command fail and the return value isn't
EAGAIN, the current code will issue end transfer command
to stop the active transfer, and only set dep->flags with
DWC3_EP_END_TRANSFER_PENDING if the end transfer command
is done successfully. If the DWC3_EP_END_TRANSFER_PENDING
isn't set, it cleanup the cancelled requests and give the
request back to the gadget layer immediately.
For uvc gadget, the uvc gadget driver hold spinlock and
then call usb_ep_queue() to submit uvc usb request to dwc3
controller. The dwc3 controller may kick transfer for the
request sequentially, if the kick transfer command and
the end transfer command all failed, the dwc3 will give
the request back to the uvc gadget driver via the request
complete function uvc_video_complete(), in this function,
it try to get the spinlock again that lead to deadlock.
This case always happens with the following warning log:
WARNING: CPU: 0 PID: 14450 at drivers/usb/dwc3/gadget.c:1839 __dwc3_gadget_kick_transfer+0x3a0/0x3b0
...
Workqueue: events uvcg_video_pump
...
Call trace:
__dwc3_gadget_kick_transfer+0x3a0/0x3b0
__dwc3_gadget_ep_queue+0x128/0x1f0
dwc3_gadget_ep_queue+0x40/0x6c
usb_ep_queue+0x44/0x100
uvcg_video_pump+0xd0/0x1d4
process_one_work+0x1f4/0x490
worker_thread+0x278/0x4dc
kthread+0x13c/0x344
ret_from_fork+0x10/0x30
Fixes: 0ec00e864a ("UPSTREAM: usb: dwc3: gadget: move cmd_endtransfer to extra function")
Change-Id: I43d455a45d542efcaa9234de60e37277611b3c47
Signed-off-by: William Wu <william.wu@rock-chips.com>
drivers/pci/controller/dwc/pcie-dw-ep-rockchip.c:533:70: error: too few arguments to function call, expected 6, have 5
ret = dw_pcie_prog_inbound_atu(pci, free_win, bar, cpu_addr, as_type);
Change-Id: Iaa3083f6cfe4edbba422fff5a245515f40c70db4
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
Validate vmf_insert_pfn return value with VM_FAULT_NOPAGE
Signed-off-by: Jacob Chen <cc@rock-chips.com>
Change-Id: I53b1eabd20ab76f08f5edf571ead1ffaccd19ec1
Fix the error from pinctrl
[ 5.112827] rockchip-pinctrl pinctrl: could not request pin 235 (gpio7-19) from group i2c5-xfer on device rockchip-pinctrl
[ 5.123951] rk3x-i2c ff170000.i2c: Error applying setting, reverse things back
[ 5.131207] rk3x-i2c: probe of ff170000.i2c failed with error -22
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I7bdf76832fb2805ced05f0a5bb52612f528d8ebf
when uvc calls uvcg_video_enable() to disable the video
stream, it dequeues all requests from the usb endpoint,
and it expects the usb controller to giveback the requests
immediately, and then it can free the requests safely.
But for usb dwc3 controller, it doesn't giveback the
started requests in dequeue ops. Instead, it issues the
end transfer command and wait for the command completion
IRQ, then giveback the requests to uvc. If the uvc driver
free req before the command completion IRQ, it will led
to null pointer dereference problem. So need to wait
for the req complete before free it.
Example call stack on RK3588 platform:
Thread#1:
uvcg_video_enable()
-> usb_ep_dequeue()
-> dwc3_gadget_ep_dequeue()
-> dwc3_stop_active_transfer()
issue end transfer command
-> dwc3_gadget_move_cancelled_request()
...
-> uvc_video_free_requests()
-> Thread#2 executes
Thread#2:
dwc3 end transfer command completion IRQ occurs
dwc3_gadget_endpoint_command_complete()
-> dwc3_gadget_ep_cleanup_cancelled_requests()
-> dwc3_gadget_giveback()
-> usb_gadget_giveback_request()
-> uvc_video_complete()
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I0bcb8d18e851448fc973f901d74afa19ab1e2406
Due to the particularity of the px30 iommu, it is necessary to configure
the grf to switch iommu.
So need to configure rockchip,shootdown-entire to prevent a case from
happening: when one device is running, the task of another device
operates iommu when doing map.
This commit relies on the following commit:
commit 3b67ff56d6 ("video: rockchip: mpp: add iommu flush tlb before hw run for px30")
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ifd94ab4b5d7f53f711320b608ff105539fd9b38d
The rk3568 usb dwc3 controller has phy management at its
own driver to cover both device and host mode. And for
usb otg0, it enable device wakeup that make the usb hcd
core to keep the phy initialized so the device can wake
up the system. However, most of rk3568 platforms power
off the logic and cause phy grf lost power, thus we need
to add quirk-skip-phy-init to reinit phy grf upon system
resume.
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I14061e3b8bad05818e8496d4710695ef31deed9f