Commit Graph

1058758 Commits

Author SHA1 Message Date
Tao Huang
4fad62b702 arm64: rockchip_defconfig: Enable CONFIG_THERMAL_GOV_POWER_ALLOCATOR
default y on 4.19.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ie65631ab968fe54504a33a08f004474e5979f2ad
2021-06-29 20:14:35 +08:00
Tao Huang
127d788a7f arm64: rockchip_defconfig: Disable CONFIG_TEE_SUPPORT
security/optee_linuxdriver is deprecated.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I6b731d789c31d213dc116d431fb29a381fb5287a
2021-06-29 20:14:35 +08:00
Tao Huang
20c0820771 arm64: rockchip_defconfig: update by savedefconfig
Remove unsupported configs:
-CONFIG_SCHED_TUNE=y
-CONFIG_CRYPTO_CRC32_ARM64_CE=y
-CONFIG_DM_VERITY_AVB=y
-CONFIG_DM_ANDROID_VERITY_AT_MOST_ONCE_DEFAULT_ENABLED=y
-CONFIG_ANDROID_VERSION=0x08000000
-CONFIG_EXT4_ENCRYPTION=y
-CONFIG_F2FS_FS_ENCRYPTION=y
-CONFIG_SECURITY_PERF_EVENTS_RESTRICT=y

Default n:
-# CONFIG_COMMON_CLK_XGENE is not set

Default y:
-CONFIG_IIO_BUFFER=y
-CONFIG_IIO_KFIFO_BUF=y
-CONFIG_IIO_TRIGGER=y

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I52c42ee08f425c152d51f26901c1eb6a374ebbec
2021-06-29 20:14:35 +08:00
Andy Yan
7aaf92a036 drm/rockchip: lvds: sync from 4.19
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: I167963980a3978e77ab6f2fdeca29ba2bd28db1b
2021-06-29 19:30:25 +08:00
Sandy Huang
9cbe0679b6 drm/rockchip: add rockchip_drm_sub_dev_list to record connector
use rockchip_drm_sub_dev_list to manage rockchip drm sub dev and record
connector, offer new method to find connector through the sub_dev_list.

Change-Id: If9508cf9ff51f6f9e1d13c42c60491f4aec4b9c1
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2021-06-29 19:22:52 +08:00
Andy Yan
e955b10e28 drm/rockchip: Add rockchip_drm_of_find_possible_crtcs() function
When get possible_crtcs for a encoder, skip the inactived endpoint, this
make userspace more clear about which crtc this connector should attached
to.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: I4221491307193209482fd9477a492ebba613c7ad
2021-06-29 19:18:15 +08:00
Andy Yan
ee2b4a4f87 arm64: dts: rockchip: rk3568: Add disable-device-link-resume for vop iommu
We don't want to call rk_iommu_enable when iommu driver resume.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: I5bd1ac97522af42b0e6178c28ed714c5f5d5206b
2021-06-29 14:57:37 +08:00
Jianqun Xu
81ad67699f ARM: dts: rockchip: pinconf.dtsi add output level with pull up/down
Change-Id: Id40ca9a6efbbfa05df6bc4ebe36a07874b9a837d
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-06-29 14:52:26 +08:00
Jianqun Xu
7fbdf804c1 arm64: dts: rockchip: pinconf.dtsi add output level with pull up/down
Change-Id: I3ce795514365e3f7f2302dfbc1deb73884b645be
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-06-29 14:51:39 +08:00
Jianqun Xu
853ce8706f soc: rockchip: io-domain: support rk3568
Change-Id: I097898c8f19dbd5f7caa1798bebd2506876cffc3
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-06-29 14:50:08 +08:00
Jianqun Xu
14ff5f7031 Documentation: devicetree: rockchip-io-domain add rk3568 support
RK3568 has 3 pmu io-domain, pmuio0/1/2, but the pmuio0 is 1.8v only, and
pmuio1 is 3.3v only, only pmuio2 support to select 1.8v or 3.3v.

RK3568 also has 7 io-domain, vccio1/2/3/4/5/6/7, but the vccio2
defaultly selected by the FLASH_VOL_SEL(GPIO0_A7).

Change-Id: I55ea1263c641112705b1443ff919c508cb3be2f0
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-06-29 14:48:02 +08:00
Jianqun Xu
e37aee9722 Documentation: devicetree: rockchip-io-domain add rv1126 support
Change-Id: I238b70c2559dc718ff861d592748bb885b4084ba
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-06-29 14:47:13 +08:00
Andy Yan
186788893a drm/rockchip: Fix of_device_is_available check for iommu
I think we want to fallback to non-iommu buffer if
iommu is disabled in dts.

Check for iommu->parent is meanless here.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: I78ce028a9c1215f1e8f956916f775f07b30e67be
2021-06-29 14:42:15 +08:00
Jianqun Xu
778ce099dc arm64: dts: rockchip: add the IPA needed parameters for rk3399 thermal
according to our testing results, added the ipa parameters for both cpu
big cores and cpu little cores, and updated the  parameters for gpu.

for now,the gpu thermal zone is used only to get the gpu's temperature.

Change-Id: Ifc7708de9d880e0f9cd5da0bb71a135b0c381b45
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-06-29 08:48:41 +08:00
Simon Xue
f7033adf87 drm/rockchip: gem: fix reorder page
Fixes: 773a33a1cc ("drm/rockchip: gem: reorder pages if page chunk less than 8")
Change-Id: Ib3540e67d898d579179b86ec19e367d14478ac3d
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2021-06-28 19:11:23 +08:00
Joseph Chen
93120310c3 power: battery/charger: move battery/charger drivers to power/supply
Change-Id: I70092715368a9d5c7241258a97dc51e55659499b
Signed-off-by: Shengfei Xu <xsf@rock-chips.com>
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2021-06-28 19:06:43 +08:00
Jianqun Xu
d4b9ee829e soc: rockchip: io-domain: add io selectors and supplies for rv1126
Change-Id: Iad75111f85b7b638aa4abca3eab834f2cddb6e29
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-06-28 19:06:43 +08:00
Jianqun Xu
988d82186b i2c: rk3x: fix to dev_warn_ratelimited
In some case, the log will look bad such as:
[   12.393926] rk3x-i2c ff150000.i2c: irq in STATE_IDLE, ipd = 0x51
[[[[[[[[[[[[.[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[

Let's limit the printk:
[  180.446547] rk3x_i2c_irq: 1726030 callbacks suppressed
[  180.446592] rk3x-i2c ff150000.i2c: irq in STATE_IDLE, ipd = 0x51

Change-Id: Ie91163ad3085e5dba127790b50e3beb359510120
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-06-28 19:06:43 +08:00
Johan Jonker
48fb88dc62 UPSTREAM: arm64: dts: rockchip: cleanup cpu_thermal node of rk3399-rock960.dts
The cpu_thermal node in the rk3399-rock960.dts file does not
reference &cpu_thermal directly to add the board-specific parts,
but also repeats all the SoC default properties.
Clean the whole thing up and fix alignment.
Place new nodes in the correct alphabetical order.
Compered to rk3399.dtsi the temperature property in
cpu_alert0 changes from <70000> to <65000>.
A sustainable-power property was added.
The trip property in cooling map0 points to <&cpu_alert1>
instead of <&cpu_alert0>.

Change-Id: Ic39c3c246446c87a933da382b2432670a830d095
Suggested-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Link: https://lore.kernel.org/r/20210118180054.9360-1-jbx6244@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit c73583c625)
2021-06-28 19:06:43 +08:00
Johan Jonker
a213d0ff37 UPSTREAM: arm64: dts: rockchip: rename thermal subnodes for rk3399
A test with the command below gives for example this error:
/arch/arm64/boot/dts/rockchip/rk3399-evb.dt.yaml:
thermal-zones: 'cpu', 'gpu' do not match any of the regexes:
'^[a-zA-Z][a-zA-Z0-9\\-]{1,12}-thermal$', 'pinctrl-[0-9]+'

Rename Rockchip rk3399 thermal subnodes so that it ends
with "-thermal"

make ARCH=arm64 dtbs_check
DT_SCHEMA_FILES=Documentation/devicetree/bindings/
thermal/thermal-zones.yaml

Change-Id: I10e9d6d8786557e50efb9a95ba701fe537d1884a
Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Link: https://lore.kernel.org/r/20210117150953.16475-3-jbx6244@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit e58061b597)
2021-06-28 19:06:43 +08:00
Jianqun Xu
9f2788c698 arm64: dts: rockchip: include rockchip-system-status.h for rk3399
Change-Id: I807b38fd38db89f41584dd2cee58bddbc6a34067
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-06-28 19:06:42 +08:00
Jianqun Xu
4e28f93710 arm64: dts: rockchip: quote display_subsystem for rk3399
Change-Id: I0a68650d9674d2805f661668468718a8777ea325
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-06-28 19:06:42 +08:00
Andy Yan
8fa4e4f849 phy: rockchip-inno-video: use stand phy_mode definition
Switch from rockchip defined PHY_MODE_VIDEO_xx
to stand PHY_MODE_xx

There is no PHY_MODE_TTL/RGB definition in stand
phy_mode, so use RGB as the default mode.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: Ie96c673c902881e651949cf63dce98c1005eb34c
2021-06-28 19:06:42 +08:00
Andy Yan
d08400ded4 phy: rockchip-inno-video-combo: use stand phy_mode definition
Switch from rockchip defined PHY_MODE_VIDEO_xx
to stand PHY_MODE_xx

There is no PHY_MODE_TTL/RGB definition in stand
phy_mode, so use RGB as the default mode.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: Idaa632df3bf8cd31f1f1848e0b85444c56944fc8
2021-06-28 19:06:42 +08:00
Andy Yan
bd577027f6 drm/rockchip/rk628: use stand PHY_MODE definition
Switch from rockchip defined PHY_MODE_VIDEO_xx
to stand PHY_MODE_xx

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: Id04fd6eba6438a41679044d1998cfb207aad02ca
2021-06-28 19:06:42 +08:00
Andy Yan
c9bebffd08 media: rk628_csi: use stand phy_mode definition
Switch from rockchip defined PHY_MODE_VIDEO_xx
to stand PHY_MODE_xx

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: I9421ea0b5d804671903a498e20b68b163d40e166
2021-06-28 19:06:42 +08:00
Andy Yan
7ab6e1a029 dt-bindings: media-bus-format: Sync with include/uapi/linux/media-bus-format.h
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: I71a2d11671b4a73e8534c818caabb2729a5a9eb6
2021-06-28 19:06:42 +08:00
Sandy Huang
3fe5bb89c5 media-bus: Add SRGB888 media bus format
The output timing described at [1], focus at s888 mode and
s888 dummy mode:

[1] https://patchwork.kernel.org/patch/9992241/

Note:
old kernel                   upstream
MEDIA_BUS_FMT_SRGB888_3X8 => MEDIA_BUS_FMT_RGB888_3X8
MEDIA_BUS_FMT_SBGR888_3X8 => MEDIA_BUS_FMT_BGR888_3X8

To align the same naming style:
old kernel                         upstream

MEDIA_BUS_FMT_SRGB888_DUMMY_4X8 => MEDIA_BUS_FMT_RGB888_DUMMY_4X8
MEDIA_BUS_FMT_SBGR888_DUMMY_4X8 => MEDIA_BUS_FMT_BGR888_DUMMY_4X8

Change-Id: I1bcc6d64ede243d89807acc7e842bcc7fd120c26
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2021-06-28 19:06:42 +08:00
Guochun Huang
9ca3b5d5ab media: Add MEDIA_BUS_FMT_RGB101010_1X7X5_SPWG/JEIDA media bus code definitions
This patch adds a new RGB media bus formats that describe
30-bit samples transferred over an LVDS bus with five
differential data pairs, serialized into 7 time slots,
using standard VESA/JEIDA data ordering.

Change-Id: I922a48c70f96727f0292004bb38dabab99f6a918
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2021-06-28 19:06:42 +08:00
Mark Yao
cd5593d1ae drm/rockchip: add mm dump debugfs
shell# cat /sys/kernel/debug/dri/0/mm_dump

0x0000000000000000-0x00000000000a6000: 679936: free
0x00000000000a6000-0x0000000000970000: 9216000: used
0x0000000000970000-0x000000000123a000: 9216000: used
0x000000000123a000-0x0000000001b04000: 9216000: used
0x0000000001b04000-0x00000000023ce000: 9216000: used
0x00000000023ce000-0x0000000002c98000: 9216000: used
0x0000000002c98000-0x0000000003562000: 9216000: used
0x0000000003562000-0x0000000003e2c000: 9216000: used
0x0000000003e2c000-0x0000000100000000: 4229775360: free
total: 4294967296, used 64512000 free 4230455296

Change-Id: I39cb5b12a63418c050b3bd890829f831f898db4e
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-06-28 19:06:42 +08:00
Mark Yao
528096963f drm/rockchip: add drm summary debugfs node
With the summary debug node, show current display status would be easier.

Using step:
shell# cat /sys/kernel/debug/dri/0/summary

vop name: ff900000.vop status=active
Display mode: 1200x1920 fps[60] clk[160000] type[8] flag[a]
        H: 1200 1320 1340 1361
        V: 1920 1941 1944 1962
win0-0: status=active
        format: AB24 little-endian (0x34324241)
        zpos: 0
        src: pos[0x0] rect[1200x1920]
        dst: pos[0x0] rect[1200x1920]
        buf[0]: addr: 0x9e19000 pitch: 4800 offset: 0
win1-0: status=disabled
win2-0: status=disabled
win2-0: status=disabled
win2-1: status=disabled
win2-2: status=disabled
win3-0: status=disabled
win3-0: status=disabled
win3-1: status=disabled
win3-2: status=disabled
vop name: ff8f0000.vop status=disabled

Change-Id: I386398b0617f0c18902c4cadad5906be343cc4de
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-06-28 19:06:42 +08:00
Youjun Ai
1e6c6b8122 regulator: xz3216: add driver with xz3216 series of DCDC devices to compile.
Change-Id: I5883e142c17a60cbba7e37bd4a9303efb3c867bf
Signed-off-by: Youjun Ai <ayj@rock-chips.com>
2021-06-28 10:56:55 +08:00
Tao Huang
85d757f649 regulator: xz3216: Fix gcc this statement may fall through warning
drivers/regulator/xz3216.c: In function 'xz3216_dcdc_set_suspend_mode':
drivers/regulator/xz3216.c:112:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
drivers/regulator/xz3216.c:115:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
drivers/regulator/xz3216.c:165:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
drivers/regulator/xz3216.c:168:3: warning: this statement may fall through [-Wimplicit-fallthrough=]

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I4709021a667a5def61361f27a1675099bcb7b45f
2021-06-28 10:56:32 +08:00
Weixin Zhou
e58b8f0d41 input: touchscreen: add gt1x driver
Change-Id: Ic4c5abf51c3dd5383bdc91029afbc7c903c2093a
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
2021-06-25 19:25:29 +08:00
Wang Jie
eb72037e1a input: sensors: program the sensor driver into the kernel.
Modify the code to sensor driver into the kernel and
make the compilation successful.

Change-Id: I3226b5df0084a80c63b7ad59aec7c759b3165a7b
Signed-off-by: Wang Jie <dave.wang@rock-chips.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2021-06-25 18:57:56 +08:00
Tao Huang
5b03506f7f input: sensors: hall: mh248: drop FB_EARLY_EVENT_BLANK support
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I7287af4d8a8cb3e3f6cc10e92c23fffd17eb9fbd
2021-06-25 18:57:55 +08:00
Simon Xue
b6cd53a3a2 init: defer free large memblock to Buddy allocator when CONFIG_ROCKCHIP_THUNDER_BOOT=y
The physical memory of a system is divided into several types, like
memory reserved for device, for kernel pagetable, etc. The remaining
area is for Buddy allocator. Normally, The memory for Buddy is consist
of different size blocks, so, under meeting the memory request of kernel
booting, we can defer free the large block size to Buddy which can be
done later in work queue in parallel to other kernel threads, and the
size of the large block can be defined in kernel command line

Save boot time about 6ms on 512MB rv1126 evb.

Change-Id: Ie7a8d3122d8d92ad918e8bf680f5949412709f37
Signed-off-by: Simon Xue <xxm@rock-chips.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2021-06-25 16:41:06 +08:00
Finley Xiao
4498c05042 soc: rockchip: system_monitor: Drop FB_EARLY_EVENT_BLANK support
Change-Id: I4fd76bc67578fbf12acaa9ed3004b4a565dd7a75
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2021-06-25 15:05:50 +08:00
Tao Huang
582f79266f Merge remote branch 'android12-5.10' of https://android.googlesource.com/kernel/common
* android12-5.10: (2274 commits)
  FROMGIT: mm: slub: move sysfs slab alloc/free interfaces to debugfs
  ANDROID: gki - CONFIG_NET_SCH_FQ=y
  ANDROID: GKI: Kconfig.gki: Add GKI_HIDDEN_ETHERNET_CONFIGS
  FROMLIST: media: Kconfig: Fix DVB_CORE can't be selected as module
  ANDROID: Update ABI and symbol list
  Revert "net: usb: cdc_ncm: don't spew notifications"
  ANDROID: Fips 140: move fips symbols entirely in own list
  ANDROID: core of xt_IDLETIMER send_nl_msg support
  ANDROID: start to re-add xt_IDLETIMER send_nl_msg support
  ANDROID: add fips140.ko symbols to module ABI
  ANDROID: inject correct HMAC digest into fips140.ko at build time
  ANDROID: crypto: fips140 - perform load time integrity check
  FROMLIST: crypto: shash - stop comparing function pointers to avoid breaking CFI
  ANDROID: arm64: module: preserve RELA sections for FIPS140 integrity selfcheck
  ANDROID: arm64: simd: omit capability check in may_use_simd()
  ANDROID: kbuild: lto: permit the use of .a archives in LTO modules
  ANDROID: arm64: only permit certain alternatives in the FIPS140 module
  ANDROID: crypto: lib/aes - add vendor hooks for AES library routines
  ANDROID: crypto: lib/sha256 - add vendor hook for sha256() routine
  UPSTREAM: KVM: arm64: Mark the host stage-2 memory pools static
  ...

Conflicts:
	drivers/mmc/core/mmc_ops.c
	drivers/usb/gadget/function/f_uac1.c
	drivers/usb/gadget/function/f_uac2.c
	drivers/usb/gadget/function/f_uvc.c
2021-06-25 11:32:04 +08:00
Finley Xiao
4aa418868f soc: rockchip: system_monitor: Use compat_only_sysfs_link_entry_to_kobj
Change-Id: I24b7b1a0158054c6867080c363fc73a2ca8d2506
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2021-06-25 09:37:51 +08:00
Tao Huang
915d7e128c Revert "dt-bindings: mtd: add Rockchip NAND controller V9 documentation"
This reverts commit 910d9e3f54.

Replaced by commit 9b45a7e697 ("UPSTREAM: dt-bindings: mtd: Describe Rockchip RK3xxx NAND flash controller").

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ic2f3dd56a843b4fe2e73c63b7bca6b3847955b3b
2021-06-25 09:06:13 +08:00
Tao Huang
463ee4c817 Revert "drivers: mtd: nand: add rockchip nandc v9 driver"
This reverts commit 90594ac897.

Replaced by commit d8d1943c7e ("UPSTREAM: mtd: rawnand: rockchip: NFC driver for RK3308, RK2928 and others").

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ic54177f92e9b5ed3fcb29bdc117322fb48f67180
2021-06-25 09:06:13 +08:00
Tao Huang
fa0c5bcd3f Revert "dt-bindings: mtd: add Rockchip NAND controller V6 documentation"
This reverts commit f6c33463b6.

Replaced by commit 9b45a7e697 ("UPSTREAM: dt-bindings: mtd: Describe Rockchip RK3xxx NAND flash controller").

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I71a9c3d6094fea13f8e8cda168b98bd6b42eefa3
2021-06-25 09:06:13 +08:00
Tao Huang
b38935144e Revert "drivers: mtd: nand : add rockchip nandc v6 driver"
This reverts commit f96997730d.

Replaced by commit d8d1943c7e ("UPSTREAM: mtd: rawnand: rockchip: NFC driver for RK3308, RK2928 and others").

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I1061437e4092bb415532eb6a4b8a040fbfd20a69
2021-06-25 09:06:13 +08:00
Jon Lin
d62e7a804b soc: rockchip: Add rockchip thunder boot sfc driver
This driver aimed at starting decompression as soon as
possible.

Change-Id: Iadf07e54047430153bc66fb1f92f85beaecf2c0d
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2021-06-24 20:27:59 +08:00
Jon Lin
cc770c4e7a ubifs: Recovery for cases of unclean reboot
After power lost, spinand may work in a unkonw state and result in
bit flip, including:
1.Write to cache invalid and dirty cache data write to page's array
which result in node CRC error for some pages.
2.One page write fail but the next page write success result in
empty space corruption.

Change-Id: I212c237202b32de0217efc8dd5a4e84174953a3f
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2021-06-24 20:25:10 +08:00
Simon Xue
91db0733d7 drm/rockchip: gem: add IOMMU_TLB_SHOT_ENTIRE when call iommu_map_sg
Add IOMMU_TLB_SHOT_ENTIRE prot for iommu_map_sg, this shoot down entire
iommu tlb one time after iommu_map_sg.This may save about 5ms when DRM
mapping 12MB buffer.

Change-Id: I618aff1b3928bd1ec1dd3d896db746e09e96acdc
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2021-06-24 20:00:58 +08:00
Simon Xue
253196ff1f init: Add support directly parse cpio data decompressed by hardware decompressor
The working flow of new feature is:
->bootloader decompress ramdisk.gz to cpio data first and start kernel.
  ->decompressor driver notify initramfs that cpio data ready.
    ->initramfs continue to flush cpio data to rootfs.

Change-Id: I9cd5708fc93270ce77376c26d9da5a5c219996c1
Signed-off-by: Simon Xue <xxm@rock-chips.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2021-06-24 19:52:17 +08:00
Yifeng Zhao
d8d1943c7e UPSTREAM: mtd: rawnand: rockchip: NFC driver for RK3308, RK2928 and others
This driver supports Rockchip NFC (NAND Flash Controller) found on RK3308,
RK2928, RKPX30, RV1108 and other SOCs. The driver has been tested using
8-bit NAND interface on the ARM based RK3308 platform.

Support Rockchip SoCs and NFC versions:
- PX30 and RK3326(NFCv900).
	ECC: 16/40/60/70 bits/1KB.
	CLOCK: ahb and nfc.
- RK3308 and RV1108(NFCv800).
	ECC: 16 bits/1KB.
	CLOCK: ahb and nfc.
- RK3036 and RK3128(NFCv622).
	ECC: 16/24/40/60 bits/1KB.
	CLOCK: ahb and nfc.
- RK3066, RK3188 and RK2928(NFCv600).
	ECC: 16/24/40/60 bits/1KB.
	CLOCK: ahb.

Supported features:
- Read full page data by DMA.
- Support HW ECC(one step is 1KB).
- Support 2 - 32K page size.
- Support 8 CS(depend on SoCs)

Limitations:
- No support for the ecc step size is 512.
- Untested on some SoCs.
- No support for subpages.
- No support for the builtin randomizer.
- The original bad block mask is not supported. It is recommended to use
  the BBT(bad block table).

Suggested-by: Johan Jonker <jbx6244@gmail.com>
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20201210002134.5686-3-yifeng.zhao@rock-chips.com
(cherry picked from commit 058e0e847d)
Change-Id: I3454acff6b221e17d3417476b48ff770a0d9d158
2021-06-24 16:33:17 +08:00
Yifeng Zhao
9b45a7e697 UPSTREAM: dt-bindings: mtd: Describe Rockchip RK3xxx NAND flash controller
Documentation support for Rockchip RK3xxx NAND flash controllers

Change-Id: Ic4b50fd3fd302bda0d038aed6606a4ef7392c20c
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20201210002134.5686-2-yifeng.zhao@rock-chips.com
(cherry picked from commit 2007ac9e68)
2021-06-24 16:24:08 +08:00