Commit Graph

854164 Commits

Author SHA1 Message Date
Jianqun Xu
63bbceab32 mm/page_isolation.c: dump page owner if fail to isolate
CMA alloc may failure due to page busy caused by isolated failure,
it's helpful to dump page owner stack for debug.

To use this debug, there should enable PAGE_OWNER debug first by
- CONFIG_PAGE_OWNER=y
- add “page_owner=on” to boot cmdline

then it will shows as following:
 page allocated via order 0, migratetype Movable, gfp_mask 0x6212ca(GFP_HIGHUSER_MOVABLE|__GFP_NOWARN|__GFP_NORETRY)
  get_page_from_freelist+0x1404/0x1920
  __alloc_pages_nodemask+0xf4/0xe90
  __do_page_cache_readahead+0x104/0x1f0
  filemap_fault+0x3d4/0x618
  ext4_filemap_fault+0x30/0x50
  __do_fault+0x50/0x118
  __handle_mm_fault+0x7e4/0xb40
  handle_mm_fault+0xcc/0x1a0
  do_page_fault+0x1f0/0x4a8
  do_translation_fault+0x5c/0x64
  do_mem_abort+0x54/0xf8
  el0_da+0x1c/0x20

Change-Id: I94b02a7c4ce9174f8151e0979e18adba4011c1d2
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2020-06-11 15:40:45 +08:00
Jianqun Xu
a45df40048 mm/page_owner: print PFN when dump page owner
Change-Id: I4a23da31ecb9ee7bff6e6d057a5118f6d154fbcf
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2020-06-11 15:40:45 +08:00
Jianing Ren
745529254c phy: phy-rockchip-naneng-usb2: fix bug of io read
Phy internal registers is read by APB bus. If you get phy registers
and APB data at the same time, you will get wrong data which is the
previous value of register. Therefore, pready_cnt must be set bigger
than rden_cnt.

Change-Id: I2e7e5544077170466bdaabc2f7d61f67a06b3283
Signed-off-by: Jianing Ren <jianing.ren@rock-chips.com>
2020-06-11 15:21:42 +08:00
Tao Huang
b155a5d744 net: wireless: rockchip_wlan: rtl8822bs: Fix clang warning
drivers/net/wireless/rockchip_wlan/rtl8822bs/hal/phydm/phydm_dfs.c:1676:4:
warning: misleading indentation; statement is not part of the previous 'if'
[-Wmisleading-indentation]
                        dfs->pri_cond4 = 1;
                        ^

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ieee0b2dac1d5fd6342bd7f6fd6a3e67af4c9b26c
2020-06-11 10:28:02 +08:00
Elaine Zhang
eefa365d11 drm/rockchip: add more clock protect for loader logo
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: Ibc3fd06b2f59d7f21e8e3567478e765b1c518ff2
2020-06-10 15:54:08 +08:00
Putin Lee
2a2bd1e413 ARM: dts: rockchip: rk3288-android: add assigned clocks for rga
Change-Id: Ice88b6a58b2f7c766b5cd42291bddbdbfb50cb2d
Signed-off-by: Putin Lee <putin.li@rock-chips.com>
2020-06-10 10:55:13 +08:00
XiaoTan Luo
9f196a0370 ARM: dts: rk3288: add spdif_2ch
Signed-off-by: XiaoTan Luo <lxt@rock-chips.com>
Change-Id: Id0abf6748053cbf0666f20c28fd68bbf9c3f2086
2020-06-10 10:21:59 +08:00
Tao Huang
2dbee53a93 OPTEE: fix clang error
security/optee_linuxdriver/core/tee_session.c:57:3: error: 'sprintf' will
always overflow; destination buffer has size 35, but format string expands
to at least 36 [-Werror,-Wfortify-source]

Change-Id: Ie5b2ccfc4fca053b6d88278b1019997ad0dd3ee5
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-06-09 22:19:16 +08:00
Sandy Huang
c10f1e9c02 drm/rockchip: vop: after create 1:1 mapping no need to wait vblank
after create 1:1 mapping, we can enable iommu at any time, because
whether the iommu is enable or not, the VOP can access the correct
phy addr.

dma_addr----->iommu module---->phy addr
        |			|
        |---------bypass--------|

Change-Id: I50f6a897d90c33e5bd0fba099654ce788d3d647d
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-06-09 16:32:38 +08:00
Sandy Huang
f831f246a0 drm/rockchip: add support drm logo buffer 1:1 mapping
we reserved the DDR last 32M as uboot logo and kernel logo, here we
create 1:1 mapping for this buffer, this is prepare for uboot logo phy
addr switch to kernel logo vir addr and iommu enable.

Change-Id: I090665f29f7f4f7cf5456b9edbddea60485376cf
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-06-09 16:32:38 +08:00
Tao Huang
4600ef8027 rtc: hym8563: Initialize in stack clk_init_data to 0
This allows adding fields to clk_init_data without having to explicitly
set those fields in all the drivers.

Fixes: 2071154513 ("ANDROID: GKI: clk: Initialize in stack clk_init_data to 0 in all drivers")
Change-Id: Idb2d492d2ceba3029d334777c0c784bce4676666
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-06-09 14:29:28 +08:00
Tao Huang
ada2a1cee3 phy: rockchip: usb: Initialize in stack clk_init_data to 0
This allows adding fields to clk_init_data without having to explicitly
set those fields in all the drivers.

Fixes: 2071154513 ("ANDROID: GKI: clk: Initialize in stack clk_init_data to 0 in all drivers")
Change-Id: I4593151b2624d2ccfaf477d36ff1f4d331f2ca91
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-06-09 14:28:04 +08:00
Tao Huang
a3b4a03c99 phy: rockchip: naneng-usb2: Initialize in stack clk_init_data to 0
This allows adding fields to clk_init_data without having to explicitly
set those fields in all the drivers.

Fixes: 2071154513 ("ANDROID: GKI: clk: Initialize in stack clk_init_data to 0 in all drivers")
Change-Id: If1fb768aadc89025cccc131441c3aa32045ba382
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-06-09 14:27:31 +08:00
Tao Huang
0482288575 phy: rockchip: inno-video-combo: Initialize in stack clk_init_data to 0
This allows adding fields to clk_init_data without having to explicitly
set those fields in all the drivers.

Fixes: 2071154513 ("ANDROID: GKI: clk: Initialize in stack clk_init_data to 0 in all drivers")
Change-Id: I6d958aa57097209165cf32a671f9612752eec4f1
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-06-09 14:27:00 +08:00
Tao Huang
a582be6e66 phy: rockchip: inno-usb2: Initialize in stack clk_init_data to 0
This allows adding fields to clk_init_data without having to explicitly
set those fields in all the drivers.

Fixes: 2071154513 ("ANDROID: GKI: clk: Initialize in stack clk_init_data to 0 in all drivers")
Change-Id: I382ee237c596e79e29bf6c4b13a4dc6c0c94344f
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-06-09 14:26:30 +08:00
Tao Huang
5734d79999 phy: rockchip: inno-mipi-dphy: Initialize in stack clk_init_data to 0
This allows adding fields to clk_init_data without having to explicitly
set those fields in all the drivers.

Fixes: 2071154513 ("ANDROID: GKI: clk: Initialize in stack clk_init_data to 0 in all drivers")
Change-Id: Ibe59e24929f89e6124ee0c74195515421625f386
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-06-09 14:26:25 +08:00
Tao Huang
cc5ecc2773 phy: rockchip: inno-hdmi: Initialize in stack clk_init_data to 0
This allows adding fields to clk_init_data without having to explicitly
set those fields in all the drivers.

Fixes: 2071154513 ("ANDROID: GKI: clk: Initialize in stack clk_init_data to 0 in all drivers")
Change-Id: I4fd81155cfbd6c257d3a52eda25714e07a4e6abb
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-06-09 14:22:18 +08:00
Tao Huang
19bdaeace0 clk: rockchip: rk618: Initialize in stack clk_init_data to 0
This allows adding fields to clk_init_data without having to explicitly
set those fields in all the drivers.

Fixes: 2071154513 ("ANDROID: GKI: clk: Initialize in stack clk_init_data to 0 in all drivers")
Change-Id: Ibc59e5fa1e6a9b7aff8612b7501e8f0644cd96ca
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-06-09 14:10:42 +08:00
Wang Panzhenzhuan
6459ce336d drivers: media: platform: rockchip: cif: fix pingpong mode issue
fix following problem when using pingpong mode
rkcif: Bad frame, pp irq:0x20b frmst:0xda900000 size:1600x600

Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
Change-Id: Iaf9222d5465a966047c26b7a7518bbc419cd5748
2020-06-09 11:40:53 +08:00
Shawn Lin
bc28e06c42 mmc: add thunder boot support
Remove unnecessary initialization process from core as possible, such
as remove some idle process, shorten delay, remove parsing ext_csd,
remove post-delay for power and so on. All these stuffs are enabled
by CONFIG_ROCKCHIP_THUNDER_BOOT.

Change-Id: I0e2326dd79d938eb82c8cfac9db09e34d6c08987
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2020-06-09 09:50:24 +08:00
Xinhuang Li
b5ef4f0d72 ARM: configs: rv1126_defconfig: enable uac1 and uac2
Signed-off-by: Xinhuang Li <buluess.li@rock-chips.com>
Change-Id: I53dd70a682a5327d60ae9064e46e0b5b8f96c68b
2020-06-09 09:48:55 +08:00
YouMin Chen
58cc992652 clk: rockchip: clk-ddr: fix return value in rockchip_ddrclk_sip_set_rate
Returns success (0) or negative errno in rockchip_ddrclk_sip_set_rate call.

Change-Id: I9c424d8625a465c235ac5f6b0795f51848e65283
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2020-06-08 20:16:41 +08:00
Finley Xiao
a840e227a0 ARM: dts: rockchip: rv11xx-evb-v10: enable otp
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Icc749f647424778fdec55bb8250d8823c3541e14
2020-06-08 19:52:07 +08:00
Sugar Zhang
b844dae719 dmaengine: pl330: Add quirk 'arm,pl330-periph-burst'
This patch adds the qurik to use busrt transfers only
for pl330 controller, even for request with a length of 1.

Although, the correct way should be: if the peripheral request
length is 1, the peripheral should use SINGLE request, and then
notify the dmac using SINGLE mode by src/dst_maxburst with 1.

For example, on the Rockchip SoCs, all the peripherals can use
SINGLE or BURST request by setting GRF registers. it is possible
that if these peripheral drivers are used only for Rockchip SoCs.
Unfortunately, it's not, such as dw uart, which is used so widely,
and we can't set src/dst_maxburst according to the SoCs' specific
to compatible with all the other SoCs.

So, for convenience, all the peripherals are set as BURST request
by default on the Rockchip SoCs. even for request with a length of 1.
the current pl330 driver will perform SINGLE transfer if the client's
maxburst is 1, which still should be working according to chapter 2.6.6
of datasheet which describe how DMAC performs SINGLE transfers for
a BURST request. unfortunately, it's broken on the Rockchip SoCs,
which support only matching transfers, such as BURST transfer for
BURST request, SINGLE transfer for SINGLE request.

Finaly, we add the quirk to specify pl330 to use burst transfers only.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I91c295a0854515131fb9a76757fbd85e5c7b0c15
2020-06-05 18:47:24 +08:00
Sugar Zhang
34d2e5f52c arm64: dts: rockchip: Add 'arm,pl330-periph-burst' for dmac
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ied0b51a3cf02dc22803c1c49448baffbdce6e1aa
2020-06-05 18:47:23 +08:00
Sugar Zhang
0c3933bfa7 ARM: dts: rockchip: Add 'arm,pl330-periph-burst' for dmac
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I291f78605b15db9ff669ff2a815bf3fd299fb7ec
2020-06-05 18:47:23 +08:00
Andy Yan
a5ab034e69 ARM: dts: rockchip: Add logo-memory-region for rv1126
logo-memory-region is used for passing framebuffer
from bootloader, which store kernel logo image data.

Change-Id: I24ba97be5abdbb8a8760861f7460120eef9ff744
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2020-06-05 10:31:27 +08:00
Jon Lin
781684d716 drivers: rkflash: should not return EIO for ecc corrected case
Change-Id: I637c48f27a4329715ec032a349c0ba56741504be
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-06-04 21:37:24 +08:00
Jon Lin
0435b850fa drivers: rkflash: Add BBT-in-flash management strategy
Change-Id: Ib825c08d60a1c56a78e0799f0acdc1f445d0ed88
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-06-04 21:37:24 +08:00
Jon Lin
e701096a22 drivers: rkflash: Add BBT framework for sfc_nand_mtd
It's a copy of mtd open source code bbt.c

Change-Id: I782b69345ef321938c76b13d6d68dfdd48265b9f
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-06-04 21:37:24 +08:00
Jon Lin
861a739c6b drivers: rkflash: Support mtd sfc nand read/write oob area
Change-Id: I3907dd7ff01b9e925ca9c5eaa0ffa53e9e65bddb
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-06-04 21:37:21 +08:00
Jon Lin
da77c1a5dc drivers: rkflash: Extern sfc nand raw read/write apis
Change-Id: Ib1e8f8cc49eba3a24c4ed85e34d0873ed3c84686
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-06-04 14:42:19 +08:00
Jon Lin
f630cce007 drivers: rkflash: Simplify soft output presetting
Change-Id: Iec38a552aaa3c6dce598787c864fa490da21820b
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-06-04 14:42:04 +08:00
Simon Xue
fb06d38cdb soc: rockchip: decompress: update driver
1. add soft reset
2. dump register when decompress failed
3. add start callback

Change-Id: Ie7d02892a5531f6510cd18ff938817a5352896dd
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2020-06-04 10:45:22 +08:00
Shawn Lin
c97fd957bb ARM: dts: rockchip: Add ext_csd parsing from loader for rv1126-evb-ddr3-v10-tb
Change-Id: I799fd30df951a86ec97eaee2a2dd7b91984558a6
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2020-06-04 10:40:15 +08:00
Sugar Zhang
449c372450 dmaengine: pl330: Make sure the debug is idle before doing DMAGO
According to the datasheet of pl330:

Example 2-1 Using DMAGO with the debug instruction registers

1. Create a program for the DMA channel
2. Store the program in a region of system memory
3. Poll the DBGSTATUS Register to ensure that the debug is idle
4. Write to the DBGINST0 Register
5. Write to the DBGINST1 Register
6. Write zero to the DBGCMD Register

so, we should make sure the debug is idle before step 4/5/6, not
only step 6. if not, there maybe a risk that fail to write DBGINST0/1.

Change-Id: I22253cc5d7cbd68f1c641fbef38617dc9a053c48
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2020-06-04 09:07:49 +08:00
Alpha Lin
1367ce868e ARM: dts: rockchip: rv1126 add node for iep2 devices.
Add dts node for iep2 devices.

Signed-off-by: Alpha Lin <alpha.lin@rock-chips.com>
Change-Id: I91cc0e078684ecf3dbbd168a0e0862e4c212c371
2020-06-03 15:58:51 +08:00
Alpha Lin
791349dc3b ARM: enable mpp iep2 driver for rv1126_defconfig
Build iep2 driver for rv1126_defconfig by default.

Signed-off-by: Alpha Lin <alpha.lin@rock-chips.com>
Change-Id: I048c3de46492134eac06190c8f25e3a5a5c19175
2020-06-03 15:58:20 +08:00
Ding Wei
ae12596959 video: rockchip: mpp: add iep2 device driver
IEP2 is a hardware ip upgrade from IEP, improving deinterlacing
processing perform, but no other post processing functions
for this version.

Change-Id: Id7f58c3f35c0c033aaa4c104a3f98849e1778f94
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
Signed-off-by: Alpha Lin <alpha.lin@rock-chips.com>
2020-06-03 15:52:06 +08:00
Sugar Zhang
3e1acca6b6 dmaengine: pl330: Fix dmac register write error
This is a workaround for dmac register write error by
read once before write to make paddr is stable, which
was caused by asynchronous between dmac_aclk and pclk.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I32e03204d6399db4fe4f40479050cc45e04ddb1f
2020-06-03 15:34:13 +08:00
Simon Xue
c50583e2af ARM: dts: rockchip: rv1126: add soft reset for decompress
Change-Id: Ie02994d08e0b9eb72abcf1b6cd0eb68583b5b23a
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2020-06-03 15:19:02 +08:00
Li Huang
aa638c0dc6 video/rockchip: rga2: Fixup wrong swap uv on YCrCb_420_P
Change-Id: I907c8687c5736fb489a21d16e87addf1f67e07c1
Signed-off-by: Li Huang <putin.li@rock-chips.com>
2020-06-03 11:27:42 +08:00
William Wu
d50829cb7f arm64: dts: rockchip: add xhci-warm-reset-on-suspend-quirk for rk3399
This patch adds property "xhci-warm-reset-on-suspend-quirk"
for rk3399 DWC3 xHC to do a warm port reset for USB3 port
upon PM suspend.

This patch also deletes the unused property:
snps,usb3-warm-reset-on-resume-quirk

Change-Id: I0d50e1c603a3114f6bc5f822334546c6e1668b0e
Signed-off-by: William Wu <william.wu@rock-chips.com>
2020-06-03 11:26:30 +08:00
William Wu
77632b0961 usb: xhci: support warm port reset quirk
The RK3399 Type-C PHY requires that it must hold the PIPE
power state in P2 before initializing the PHY. The current
code reset the whole USB3.0 OTG controller in the DWC3
PM suspend/resume to set the PIPE in P2 if the link_state
is RxDetect, and then power on/off the Type-C PHY safely
during PM suspend/resume.

In this case, we assumed that the RxDetect state meant no
USB device connected. But actually, if an USB 1.0/1.1/2.0
device connected, the link is in the RxDetect State too.
So reset the USB controller will cause the USB 1.0/1.1/2.0
device to be reenumerated upon PM resume.

This patch uses xHC warm port reset instead of controller
reset to set the PIPE in P2. It can avoid reseting the USB
1.0/1.1/2.0 device upon PM resume.

Fixes: c9b15ba1eb ("usb: dwc3: core: prevent re-enumeration in host mode")
Change-Id: I4f02f429019771699993358059731f949140eb08
Signed-off-by: William Wu <william.wu@rock-chips.com>
2020-06-03 11:25:45 +08:00
William Wu
89d01c470d dt-bindings: usb: dwc3: add a property to do warm port reset quirk
This patch adds a new property "snps,xhci-warm-reset-on-suspend-quirk"
to do a warm port reset for xHC USB3 port upon suspend if needed.

Change-Id: Id26ab9ecd933f16a491b6fc13c45346459f78109
Signed-off-by: William Wu <william.wu@rock-chips.com>
2020-06-03 11:24:56 +08:00
Nickey Yang
a77a960706 ARM: dts: rockchip: rv11xx-evb-v10: fix vcc18_lcd regulator
vcc18_lcd is the power enable pin of dsi panel board, and it
also provides the rst signal of panel through RC circuit.
When we power on and change the pin directly, the rst will not
power down completely, resulting in the probability that the
screen cannot display after reboot.
so fix it.

Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
Change-Id: Ifb47ea23a4bd2d9e41fd317d3c7777e158e54dec
2020-06-03 11:14:31 +08:00
Tao Huang
594b68feba rk: scripts: update mkbootimg/repack-bootimg/unpack_bootimg
AOSP 9f28439ba714 ("fix size of v3 boot header")
Revert 7261bb083a97 ("Check DTB image size for boot image header version 2 and above")
which failed to repack image without dtb.

Change-Id: I591c0c548229e16482352c94651740de3e0e8b76
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-06-03 10:54:15 +08:00
Tao Huang
76ada3f00a Revert "rk: add .checkpatch.conf to enable strict check"
This reverts commit 539930eb1c.

Change-Id: I399df04be7619fb05cdb78b00405ffd195b1b671
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-06-03 10:49:24 +08:00
Cai YiWei
eebf9acd6d media: rockchip: isp: fix link setup error
Change-Id: Ie357ae811627f861ba002d1de82adfe61d45b42f
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2020-06-02 21:37:02 +08:00
Finley Xiao
5dedb0163a clk: rockchip: rv1126: Change parent clock for hclk and pclk pdbus
As dmac aclk comes from hclk pdbus, dmac pclk comes frome pclk pdbus,
dmac aclk should be an integer multiple of dmac pclk and the same
parent with dmac pclk. so let hclk pdbus and pclk pdbus only come from gpll.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ia75c3613573f4a6818cbc18668a66736f011c695
2020-06-02 16:17:28 +08:00