CONFIG_ROCKCHIP_MINI_KERNEL enabled in some project which perform DMA
into kmalloc area that may cause data corrupt. Use a independent config
CONFIG_ROCKCHIP_KMALLOC_NO_USE_ARCH_DMA_MINALIGN instead of CONFIG_ROCKCHIP_MINI_KERNEL
Fixes: c97fea6ed1 ("slab: allows kmalloc min size independent on arch dma min alignment when CONFIG_ROCKCHIP_MINI_KERNEL=y")
Change-Id: Idd36490d695a0f2910d2b453228688405efdd43a
Signed-off-by: Simon Xue <xxm@rock-chips.com>
When system wakeup, It will call _dwc2_hcd_resume function and the
port_suspend_change flag will be set to 1 in _dwc2_hcd_resume function.
But in current code, the autosuspend delay for hub is set to zero and
this will cause a strange phenomenon where the USB bus will repeatedly
suspending and resuming.
Considering that setting the port_suspend_change to 1 is only applicable
for partial power mode, there is no need to set port_suspend_change to
1 when DWC2 IP not support partial power mode.
Fixes: c74c26f6e3 ("usb: dwc2: Fix partial power down exiting by
system resume")
Change-Id: Ia57bfb8502cb55a5d9375a5ad609ac4104ff8acb
Signed-off-by: William Wu <william.wu@rock-chips.com>
Signed-off-by: Jianwei Zheng <jianwei.zheng@rock-chips.com>
This patch fix the port cannot suspend when a HUB is connected. The
DWC2 IP on Rockchip SOCs does not support clock gating and Current
code places the port suspend within the dwc2_host_enter_clock_gating
function, which results in the port being unable to suspend.
Change-Id: I40fe73d116a30fec6c01a8c3c988653a48175f7f
Signed-off-by: William Wu <william.wu@rock-chips.com>
Signed-off-by: Jianwei Zheng <jianwei.zheng@rock-chips.com>
Current Code USB2 PHY use extcon notifier to send USB charger
types to power driver. If we use gpio to detect vbus or id state,
the extcon device is allocated and registered by extcon-usb-gpio.c
driver and USB2 PHY obtains this extcon device through DTS. If
these cables are missing, it will cause USB2 PHY driver to be
unable to set the status of these cables, leading to functional
abnormalities.
Change-Id: Iec27dfde4ec8bf12294bd6c57c3db5dada2f35cd
Signed-off-by: William Wu <william.wu@rock-chips.com>
Signed-off-by: Jianwei Zheng <jianwei.zheng@rock-chips.com>
Disable vcc if it exists, so the rom code could relink the device
from the init state.
Change-Id: I4493df466f3ea60b8c7a7e3befd110311fce6f6c
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
The Linux OS uses the device tree to detect the wifibt module,
particularly the Bluetooth module's UART, identified via
`/sys/firmware/devicetree/base/pinctrl/wireless-bluetooth`.
Some RK3566/RK3568 board configurations redundantly register the pinctrl
for wireless-bluetooth, causing script failures in UART identification.
This commit removes the redundant node to resolve conflicts and ensure
correct UART identification for Bluetooth communication.
Change-Id: Id55c48bda38275c04a365b0ede1f740baf767da2
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
BACKGROUND
A short clk giltch (~200us) found on the mclk calibrate case in
kernel 5.10.
mclk-12.288M - mclk-49.152M (~200us) - mclk-12.288M
The root cause is:
clk_set_rate(mclk_parent, 49.152M)
clk_set_rate(mclk, 12.288M)
Prefer to get the mclk rate div from mclk_parent rate, Unfortunately,
the latter will change the mclk_parent rate again in kernel 5.10.
So, do not change mclk parent's rate when it is multiple mclk already,
let clk framework handle it.
e.g.
mclk: clk_i2s1_8ch_tx mclk_parent: clk_i2s_8ch_tx_src
clk_i2s1_8ch_tx_src 0 0 0 12288000
clk_i2s1_8ch_tx_mux 0 0 0 12288000
clk_i2s1_8ch_rx 0 0 0 12288000
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ie9e869a48b65e287e60545626e92c9090ab02229
API snd_soc_register_component will try to rebind card per
each component register. and the ASoC allow no-pcm card instance.
devm_snd_soc_register_component
snd_soc_try_rebind_card
snd_soc_bind_card
snd_soc_add_pcm_runtime
devm_snd_dmaengine_pcm_register
So, we should register PCM before DAI component.
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I275e919495280568b6b732097532f466a0cc3a2a
API snd_soc_register_component will try to rebind card per
each component register. and the ASoC allow no-pcm card instance.
devm_snd_soc_register_component
snd_soc_try_rebind_card
snd_soc_bind_card
snd_soc_add_pcm_runtime
devm_snd_dmaengine_pcm_register
So, we should register PCM before DAI component.
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I8de05cf709187afd406775998f58ed5ebdb39d38
API snd_soc_register_component will try to rebind card per
each component register. and the ASoC allow no-pcm card instance.
devm_snd_soc_register_component
snd_soc_try_rebind_card
snd_soc_bind_card
snd_soc_add_pcm_runtime
devm_snd_dmaengine_pcm_register
So, we should register PCM before DAI component.
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Id099f4774e040263a370da36427529d45071c173
API snd_soc_register_component will try to rebind card per
each component register. and the ASoC allow no-pcm card instance.
devm_snd_soc_register_component
snd_soc_try_rebind_card
snd_soc_bind_card
snd_soc_add_pcm_runtime
devm_snd_dmaengine_pcm_register
So, we should register PCM before DAI component.
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I0f9f7efd932fc9572c7574aeefb3d61bc5838db2
API snd_soc_register_component will try to rebind card per
each component register. and the ASoC allow no-pcm card instance.
devm_snd_soc_register_component
snd_soc_try_rebind_card
snd_soc_bind_card
snd_soc_add_pcm_runtime
devm_snd_dmaengine_pcm_register
So, we should register PCM before DAI component.
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I45ade9943670312be7314604cc7c34c252f515e9
API snd_soc_register_component will try to rebind card per
each component register. and the ASoC allow no-pcm card instance.
devm_snd_soc_register_component
snd_soc_try_rebind_card
snd_soc_bind_card
snd_soc_add_pcm_runtime
devm_snd_dmaengine_pcm_register
So, we should register PCM before DAI component.
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Iff41cd4151a5dedb0ae5a45897a86dcccaffb62b
Before: THD is -91.34dB.
After: THD is -103.13dB.
Change-Id: Ieaf326326a36ca320effcd924825dce33c5775fc
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
The queue nodes will be deleted if
CONFIG_DTC_OMIT_EMPTY=y, the driver cannot get it, add
status "okay" attributes to avoid deletion.
Change-Id: I5405c85d549289572807a6387fda00f074d7b1aa
Signed-off-by: Zain Wang <wzz@rock-chips.com>
Signed-off-by: David Wu <david.wu@rock-chips.com>
Before:
text data bss dec hex filename
4090877 1838576 97992 6027445 5bf8b5 vmlinux
After:
text data bss dec hex filename
4826965 2076636 104008 7007609 6aed79 vmlinux
Change-Id: Ie1a185a043dc0444712ac4acbc7c53f5e69dc55c
Signed-off-by: Yao Xiao <xiaoyao@rock-chips.com>
This can clearly tell user the block size from dump dri summry info or
dump buffer name.
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I94f830344e13f2f7c3ac5e4dbde16521caf431dd
We don't need adjust voltage at runtime, and don't want to
maintain pwm state to keep its voltage in system suspend.
Otherwise it's 0.81v but not 0.90v when system suspend.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ia3d0a0901fb0801d8af33f2fd509bab3f2d94a5b
-CONFIG_ARCH_HAS_STRICT_MODULE_RWX=y
-# CONFIG_STRICT_MODULE_RWX is not set
-CONFIG_VIDEOBUF2_CMA_SG
-CONFIG_VIDEOBUF2_DMA_CONTIG
-CONFIG_VIDEOBUF2_VMALLOC
-CONFIG_VIDEOBUF2_DMA_SG
-CONFIG_DRM_EDID
-CONFIG_DRM_DP
-CONFIG_ROCKCHIP_DRM_DEBUG
-CONFIG_SND_PCM_ELD
-CONFIG_SND_SOC_HDMI_CODEC
+CONFIG_DTC_OMIT_DISABLED=y
+CONFIG_DTC_OMIT_EMPTY=y
+CONFIG_MMC_QUEUE_DEPTH=1
before:
text data bss dec hex filename
4113328 1882232 96904 6092464 5cf6b0 vmlinux
after:
text data bss dec hex filename
4090837 1838576 97992 6027405 5bf88d vmlinux
Change-Id: Ie247122d435f7da79081b034822355f45f217f3f
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
1. Add extcon usb vbus_det/id gpios for otg0.
2. Fix the vbus control gpio for otg0.
3. Add vbus control gpio for otg1.
4. Set host mode for otg1.
Change-Id: Ia075889449559539c7a2e41a3c50e2b928a46ad0
Signed-off-by: Jianwei Zheng <jianwei.zheng@rock-chips.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
This patch enable usb2phy for rk3506g-evb1 and support
to use extcon usb gpio driver for usb2phy vbus and id
detection.
Change-Id: I389cf3801a302ff70b1db673803472e493888294
Signed-off-by: Jianwei Zheng <jianwei.zheng@rock-chips.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>