Some of the pinmuxing bits described in rk3308_mux_recalced_data are wrong,
pointing to non-existing registers.
Fix the entire table.
Also add a comment in front of each entry with the same string that appears
in the datasheet to make the table easier to compare with the docs.
This fix has been tested on real hardware for the gpio3b3_sel entry.
Fixes: 7825aeb7b2 ("pinctrl: rockchip: add rk3308 SoC support")
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20220420142432.248565-1-luca.ceresoli@bootlin.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
(cherry picked from commit 1f3e25a068)
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: Ide1ec0fdd675a29e3359049beb7777ec13b49738
GPIO nodes are not themselves busses, so passing rockchip_bank_match
here is wrong. Passing NULL instead uses the standard bus match table
which is more appropriate.
devm_of_platform_populate() shows that this is the normal way to call
of_platform_populate() from a device driver, so in order to match that
more closely also add the pinctrl device as the parent for the newly
created GPIO controllers.
Specifically, using the wrong match here can break dynamic GPIO hogs as
marking the GPIO bank as a bus means that of_platform_notify() will set
OF_POPULATED on new child nodes and if this happens before
of_gpio_notify() is called then the new hog will be skipped as
OF_POPULATED is already set.
Fixes: 9ce9a02039 ("pinctrl/rockchip: drop the gpio related codes")
Signed-off-by: John Keeping <john@metanate.com>
Link: https://lore.kernel.org/r/20211126151352.1509583-1-john@metanate.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
(cherry picked from commit bceb6732f3)
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I21e0944d239cc85598b2638c952abadd85f55148
when doing cru reset, if there is an iommu operation, the device will be stuck
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Id29878b0ee56e5f33ecd64c25b2c6f8b0bcdf491
It's fine to call dev_err_probe() in ->probe() when error code is known.
Convert the driver to use dev_err_probe().
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from commit 0045028f31)
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: Id073cf03dc900550dae1c8a947e53693937b7de1
Use the devm_platform_get_and_ioremap_resource() helper instead of
calling platform_get_resource() and devm_ioremap_resource()
separately.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from commit fb17dcd73f)
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: Idbdfaa90a0b614e59b393e436cebefb9aca6ffcc
Use temporary variable for struct device to make code neater.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from commit e4dd7fd5ff)
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I382e5c2276febe7774d954e70341ae548ce59855
Kernel doc validator is not happy:
.../pinctrl-rockchip.c:45: warning: This comment starts with '/**', but isn't a kernel-doc comment.
Drop it as it's indeed not a kernel doc comment.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from commit 5a83227b3d)
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: Ib7d7e5efa9bb308d6173f0945928ad34b3c5ea5a
Do not enable cache_all_e when source is multi tiles.
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ie40aac145dfc481f371865efc5e962dd0cfdb451
Use the new helpers that include struct_size(),
devm_platform_ioremap_resource(), devm_hwspin_lock_register() and etc.,
which can simpify the code.
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: I6507964759d6cc123a74c5d2c0112702927e017b
The hpmcu run at [256K-512KB] address, change the mmc-escd's space to within 256KB.
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I4d3acebd30b6fa780e7e8a7cb28adbd10d13050f
The UCS12CM0 does not currently preserve settings after powered
down, it will default to the UCS12CM0 settings after powered up,
not the settings set by the host.
Reapply all the settings at resume.
Signed-off-by: Jason Zhang <jason.zhang@rock-chips.com>
Change-Id: I66967bf0f4e880650c0f715b6e353bae4e31a0cb
To implement quick reset.
Not work for CSF based Valhall GPU.
Change-Id: I4d84d3a11ec4a5632c1a5f09bd90ed241fb9fc9a
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
1. Add rockchip_drm_copy_mode_from_mode_set() to copy
drm_display_mode from rockchip_drm_mode_set, which
stores the display state information in uboot.
2. Call rockchip_drm_copy_mode_from_mode_set() if vp
failed to initialize.
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I0dea7237353dfe7b0d56bee81a47970ebb538d50
Add gpio alias for gpio controller dt nodes, which is used by the
new gpio driver to get the index of gpio controller for driver.
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I8fa25bed0193b6fcdbf617e3d457362d3734c4c8
Add 'clock-names' property for gpio dt nodes, which is used by the gpio
driver to identified as the index for the gpio controller.
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I07334122babd5773cab891f066e5086a16fe34bf
Add gpio alias for gpio controller dt nodes, which is used by the
new gpio driver to get the index of gpio controller for driver.
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I148297ea0e84d2749866858ffc60f2e0d1d38d03
when switching resolutions, the switching speed can be improved
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I4b31894274dc3238675ece907ba1682d965e71bf
linux-4.4 the trip-point name is trip-point-x, but linux-5.10
the trip-point name is trip-point@x in rk3308.dtsi
Signed-off-by: Lin Jianhua <linjh@rock-chips.com>
Change-Id: I1f484ad5081e76c18d2ab380ba2c0c13b66485e2
The RK356X DWC3 supports to set the USB 2.0 PHY enter
suspend mode if the DWC3 core suspend conditions are
valid (as per DWC3 controller databook 6.3.46 GUSB2PHYCFG
register bit6). This cause xHC driver failed to send
USB resume signal to USB 2.0 device in xhci_bus_resume().
This patch adds a quirk "xhci-u2-broken-suspend" to force
the xHC to set the link state to XDEV_RESUME and send USB
resume signal to USB 2.0 device.
Change-Id: I24c017867f80728890c0562a12e4554625913e67
Signed-off-by: William Wu <william.wu@rock-chips.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Rockchip SNPS xHC 3.0 set USB 2.0 PHY enter suspend mode
from DWC3 core if the suspend conditions are valid (as per
DWC3 controller databook 6.3.46 GUSB2PHYCFG register bit6).
In this case, it needs to set the bus_suspended bit for
USB 2.0, so that in xhci_bus_resume, it can set the xHC
link state to XDEV_RESUME and send USB resume signal to
USB 2.0 device.
Test on RK3568 USB 3.0 Host interface with USB 2.0 Camera
or USB 2.0 HUB which support USB auto suspend. Without this
patch, the xHC fails to send USB resume signal on the USB
bus to wakeup the USB 2.0 devices, and cause xHC died.
Change-Id: Icb5a553d71a5f3144d77f8d5a5132892a5795285
Signed-off-by: William Wu <william.wu@rock-chips.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
CONFIG_BCMDHD_PCIE and CONFIG_BCMDHD_SDIO can only be selected
from two configurations, since that bcmdhd driver cannot be compatible
with it at present. That just enable the CONFIG_BCMDHD_PCIE by default on
rk3588 SoCs.
Also, CONFIG_MALI_CSF_SUPPORT need be enabled by default on rk3588 SoCs.
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: I053a704f6374cf7c43cd6dfa733d3d0d4214f256
1.340M_edid:remove deep color support, config 4K50/60 YUV420 only.
2.600M_edid:remove deep color support.
Signed-off-by: Dingxian Wen <shawn.wen@rock-chips.com>
Change-Id: I3e11397670aa87abea6c13d606cd2fac466e989a
make an option to compile Rockchip HW Spinlock driver.
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: I6f51901f1787acd5ea15dcb1a0892a065b16aa98
All the pages are freed to the system heap page pools, it is a error for
pages came from the dma32 heap pools.
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I96e50c6b741e6fdbee7e358b939658809059f421
Copy from system_heap.c.
In order to make a smooth change, CONFIG_DMABUF_HEAPS_SYSTEM
will build rk_system_heap.
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I7176b6bfecb483c87128857293be67f3e19a101a
1. sys/class/hdmirx/hdmirx/status show connected or disconnected
2. echo on/off to control hpd
Signed-off-by: Chen Shunqing <csq@rock-chips.com>
Change-Id: Ib7fecdb7d227158e5278270b166b69ec2beaf8c4
Follow Documentation/devicetree/bindings/reserved-memory/ramoops.txt
This is a child-node of "/reserved-memory".
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I3f06deb6e3a49edebc03de4684c44d52d13c37e0
Follow Documentation/devicetree/bindings/reserved-memory/ramoops.txt
This is a child-node of "/reserved-memory".
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I02055d58b2e1f57f07030dbb1e1dbf74e1b37ff6