Some platforms such as rk356x require more detailed configuration
partitioning to accommodate hdmi signal at different resolutions.
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I4cc5fd4769ec51a5608b1901776d91f77324af3b
ASPM is not a stable optional function for All devices from history,
and make us hard to debug any conflict issues. So remove it from default
configs.
Change-Id: I5a061a7758e32c5ddbbef677ba37c57fa635a88f
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
ASPM is not a stable optional function for All devices from history,
and make us hard to debug any conflict issues. So remove it from default
configs.
Change-Id: I3417889dd4ab78fdc0a73d25f2e83db115558e89
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
1.support s_power function
2.fixed hts_def error value
3.change analog gain max to 16x
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I6f7d3d5c090dc3238cc299e28f7c39d3b74e1e7f
It's should be called by dwc core driver by walking up
the capability registers.
Change-Id: I27ff106dc7688734339c627e32360841d58d68a5
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
rk_pcie_establish_link() will be called by dwc core driver for RC,
so we only need it for ep function.
Change-Id: I278f3749bc0571037192ff0c4d03ba306c453316
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
NVR board logic and GPU are combined, so fixed voltage is required
Signed-off-by: Huang zhibao <hzb@rock-chips.com>
Change-Id: I5e6d52882cb11028803f037c20e0113c1259ad0c
When gadget is disconnected, running sequence is like this.
. composite_disconnect
. Call trace:
usb_string_copy+0xd0/0x128
gadget_config_name_configuration_store+0x4
gadget_config_name_attr_store+0x40/0x50
configfs_write_file+0x198/0x1f4
vfs_write+0x100/0x220
SyS_write+0x58/0xa8
. configfs_composite_unbind
. configfs_composite_bind
In configfs_composite_bind, it has
"cn->strings.s = cn->configuration;"
When usb_string_copy is invoked. it would
allocate memory, copy input string, release previous pointed memory space,
and use new allocated memory.
When gadget is connected, host sends down request to get information.
Call trace:
usb_gadget_get_string+0xec/0x168
lookup_string+0x64/0x98
composite_setup+0xa34/0x1ee8
If gadget is disconnected and connected quickly, in the failed case,
cn->configuration memory has been released by usb_string_copy kfree but
configfs_composite_bind hasn't been run in time to assign new allocated
"cn->configuration" pointer to "cn->strings.s".
When "strlen(s->s) of usb_gadget_get_string is being executed, the dangling
memory is accessed, "BUG: KASAN: use-after-free" error occurs.
BUG=chrome-os-partner:58412
TEST=After smaug device was connected to ubuntu PC host, detached and attached
type-C cable quickly several times without seeing
"BUG: KASAN: use-after-free in usb_gadget_get_string".
Change-Id: I58240ee7c55ae8f8fb8597d14f09c5ac07abb032
Signed-off-by: Jim Lin <jilin@nvidia.com>
Reviewed-on: https://chromium-review.googlesource.com/428059
Commit-Ready: Jim Lin <jilin%nvidia.com@gtempaccount.com>
Tested-by: Jim Lin <jilin%nvidia.com@gtempaccount.com>
Reviewed-by: Adrian Salido <salidoa@google.com>
Reviewed-by: Benson Leung <bleung@chromium.org>
Git-repo: https://chromium.googlesource.com/chromiumos/third_party/kernel
Git-commit: a7b597d255d70f6f0c6bfdfb7e4e04f67fcebf9d
Signed-off-by: Dennis Cagle <d-cagle@codeaurora.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from https://android.googlesource.com/kernel/msm
commit fcf0e822fce098b27b6735d96e5414d6ff8de762)
Change port_mux/layer_sel register as less as possible.
Change-Id: I7436cafcb9dd40ae9495091a08b0df479a79c978
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
The pipe clk of rk3568 is used for PIPE_GRF module, we
need to manage this clk so that the USB IP can access
the registers of PIPE_GRF.
Change-Id: I9ebfd5d25bdf1e95a9c5a3390b1030aed5f5c7ba
Signed-off-by: William Wu <william.wu@rock-chips.com>
This patch to generate the rk3568-pinctrl.dtsi again by pin2dts tool
which has been updated with some bugs fixed, such as lack of comment
for some nodes.
Now the pin2dts can generate the auto part of pinctrl file absolutely,
changes including:
* file header
/SPDX-License head
/#include <something>
&pinctrl {
};
* full rules
make the auto part can be generated by rules without any handly modify
special case: pwm4 which may be matched as pw-m4, that means the module
is pw and its mux mode is m4.
Change-Id: Ia92668ab938c1c05dfe430cf67b6f73bafaa31c3
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
There is a case, the app may call s_ctrl before device power on,
pm_runtime_get will increment usage counter and call Sensor_runtime_resume,
but when the s_ctrl function judges that the return value of pm_runtime_get
is less than or equal to 0, it returns directly, causing pm_runtime_put
not to be executed. so device can't be suspended.
pm_runtime_get_if_in_use increment the device's counter when runtime PM status
is RPM_ACTIVE and the runtime PM usage counter is nonzero.
so used pm_runtime_get_if_in_use can avoid usage counter error.
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I4e61cdefafd82083f2628f67181a6bb2eee50507
This patch support to disable u3 root port for USB3.0 controller
if needed. Such as RK3568 EVB6 USB3.0 OTG1 xHCI controller, it
only used USB2.0 PHY, so we need to disable u3 port by set the
xHCI u3 port number to zero and select the clk_usb3otg0_utmi for
source clk at the same time.
Change-Id: I4aee7cc0d2947e478ff7437e47e329411e67297c
Signed-off-by: William Wu <william.wu@rock-chips.com>
This patch add new property to disable u3 root port for
usb3.0 controller if we want to force the controller
to u2 only mode.
Change-Id: I53da3a7816585f1d3f9ac7fd3ee5ba8ba323eff1
Signed-off-by: William Wu <william.wu@rock-chips.com>
A workaround to avoid display image shift on
screen when window enable.
Change-Id: I37064f580f7050997b521282d9cbae4193ace05d
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Add optee node to supply OP-TEE required properties.
/optee node is supposed to be below /firmware node.
Signed-off-by: Hisping Lin <hisping.lin@rock-chips.com>
Change-Id: Ib7a96ea6b72915703ae3a9595a32fd84802c7a22
default enable mipi camera ov5695,
disable dvp camera gc2145;
for dvp camrea pinctrl conflicts with gmac1 & ov5695
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: I74697200539249e006e505af2e69cec2300b25ec
This is needed by rk3566 rkg11 2k tablet LCD power supply.
Signed-off-by: Jason Song <sxj@rock-chips.com>
Change-Id: I0a752a92f62b4e72e8778a62ffaabf6fb3cf793f