A node is empty node if its proplist/label/child both null or both
set as deleted.
Change-Id: Ia934c58df3305dc9531cc912322eb2728f7af689
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
As with GPIO, UART and others, allow specifying the device index via the
aliases node in the device tree.
On embedded devices, there is often a combination of removable (e.g.
SD card) and non-removable MMC devices (e.g. eMMC).
Therefore the index might change depending on
* host of removable device
* removable card present or not
This makes it difficult to hardcode the root device, if it is on the
non-removable device. E.g. if SD card is present eMMC will be mmcblk1,
if SD card is not present at boot, eMMC will be mmcblk0.
Alternative solutions like PARTUUIDs do not cover the case where multiple
mmcblk devices contain the same image. This is a common issue on devices
that can boot both from eMMC (for regular boot) and SD cards (as a
temporary boot medium for development). When a firmware image is
installed to eMMC after a test boot via SD card, there will be no
reliable way to refer to a specific device using (PART)UUIDs oder
LABELs.
The demand for this feature has led to multiple attempts to implement
it, dating back at least to 2012 (see
https://www.spinics.net/lists/linux-mmc/msg26586.html for a previous
discussion from 2014).
All indices defined in the aliases node will be reserved for use by the
respective MMC device, moving the indices of devices that don't have an
alias up into the non-reserved range. If the aliases node is not found,
the driver will act as before.
This is a rebased and cleaned up version of
https://www.spinics.net/lists/linux-mmc/msg26588.html .
Based-on-patch-by: Sascha Hauer <s.hauer@pengutronix.de>
Link: https://lkml.org/lkml/2020/8/5/194
Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Link: https://lore.kernel.org/r/20200901085004.2512-2-matthias.schiffer@ew.tq-group.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Conflicts:
drivers/mmc/core/host.c
Change-Id: I86a98bab7767d630172a552e0dc72d90aaebc2a3
(cherry picked from commit fa2d0aa969)
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
When there is no layer attach to a port, the por_mux
should set to zero.
Change-Id: I880c3ff4ce8cac8ee41bdc7e6666d13796357cc6
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
If layer_sel or port_mux config done immediately, the layer
map and port mux may change when one frame is still in display
process.
Change-Id: I5611e75c56c89fd4fa02a069acc971c9266b05b6
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
This patch is from ARM via mail
"Fwd: 00209996 - [Rockchip][IMPORTANT] Cat A(rare)- Security bug in Mali DDK (16-Nov, 2020) Edit Subject"
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
Change-Id: Ife807e5e850274222db8aea0e4cac588e02a8e53
In addition, rename some configs that have been used in drivers/gpu/arm/midgard.
Change-Id: I5356d6b3f544195eb6bebe88927abe7c8bcb7dd1
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
For high performance:
modify aclk_top_high 300M to 500M.
modify aclk_top_low 200M to 400M.
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I5ef723ed66893024e4b52e49bafb09c3b002b305
Fix character '_' not recommended in node name which complained by
node_name_chars_strict
Change-Id: I6e34ff0cffc18a33e2b3f908519161541ccd9cdd
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
This is needed for rk3566 rk817 tablet.
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: I3c19299be121549ac3232465b30245efe7d820cb
The userspace librga(im2d) is using 0x16 for BGRX8888.
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I6cac09898039aefa87f5633d60bf590e3f130e56
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>