Commit Graph

860292 Commits

Author SHA1 Message Date
Hu Kejun
ff78b5290b media: rockchip: isp: support iq part of isp21
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Change-Id: I2c2354c9e8ae590c907d5357803cd702c90e9577
2020-11-16 17:04:59 +08:00
Hu Kejun
2e434d977b media: rockchip: isp: add head file for isp21
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Change-Id: I3f6217cdae06e45412dcb284c32d3f1a4927f402
2020-11-16 17:04:59 +08:00
Ziyuan Xu
0f8f894bb7 phy: phy-rockchip-naneng-usb2: update USB_DCP state if cable plug-out
The *USB_DCP* should be updated when the cable plug out from dedicated
charging port. As a result, the charger could set the charging current
by *EXTCON_CHG_USB_DCP*.

Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I478e584552a627de928378c6da1e6392a8fb04c4
2020-11-16 16:30:00 +08:00
Sebastian Reichel
8334797c5f BACKPORT: power: supply: gpio-charger: add charge-current-limit feature
Add new charge-current-limit feature to gpio-charger.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>

 Conflicts:
	Documentation/devicetree/bindings/power/supply/gpio-charger.yaml

(cherry picked from commit be2919d835)
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I6a2f2df2f06dab50fadae0e6c411311088cd1ea9
2020-11-16 16:24:50 +08:00
Linus Walleij
ea25234920 BACKPORT: power: supply: gpio-charger: Convert to GPIO descriptors
This converts the GPIO charger to use exclusively GPIO
descriptors, moving the two remaining platforms passing
global GPIO numbers over to using a GPIO descriptor table.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>

 Conflicts:
	arch/arm/mach-pxa/tosa.c
        arch/arm/mach-sa1100/collie.c
        drivers/power/supply/gpio-charger.c

(cherry picked from commit 17529bcf0a)
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I22fb3dc7d42163d7a715d219665a14474cdd7422
2020-11-16 16:24:30 +08:00
Sebastian Reichel
34cf358963 BACKPORT: power: supply: gpio-charger: Make gpios optional
While strongly recommended, not all devices have a gpio to
detect if the charger is connected. This moves the 'gpios'
from required to optional section.

This also modifies error handling for the GPIO a bit: We
no longer fallback to pdata, if a GPIO is specified using
GPIO descriptor tables. This is a bit cleaner and does
not have any real impact: There are only two mainline pdata
users (arm/mach-sa1100/collie.c, arm/mach-pxa/tosa.c) and
none of them specify the GPIO via gpiod descriptor tables.
Once both have been converted the driver's support for
specifying GPIOs numbers in pdata will be dropped.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
(cherry picked from commit 1d85f6d1b0)
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I03c6f685604d954e69bcbdc55e11cfb2f16b6029
2020-11-16 16:24:06 +08:00
Artur Rojek
165c199e71 UPSTREAM: power: supply: gpio-charger: Add support for charger status.
Introduce optional support of POWER_SUPPLY_PROP_STATUS for chargers
which provide charging status GPIO.

Signed-off-by: Artur Rojek <contact@artur-rojek.eu>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
(cherry picked from commit df68c44c72)
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I1d0a5b86cfa549bcc341dcc5fc7a953509e3ab1f
2020-11-16 16:23:13 +08:00
Sebastian Reichel
728e135833 UPSTREAM: power: supply: gpio-charger: Do not use deprecated POWER_SUPPLY_TYPE_USB_*
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
(cherry picked from commit fb4d494480)
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I9fe3f6fe5faaff718921bb44f4528cc3480a5d81
2020-11-16 16:23:13 +08:00
Tao Huang
006728c018 arm64: dts: rockchip: Makefile: Sort lines
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I773533a36c929459aa7426a27662a84f2e2b7fb0
2020-11-16 16:16:20 +08:00
Jon Lin
ed63898892 arm64: dts: rockchip: rk3568: Add spi dma-names and high speed pinctrl group
Change-Id: Ib506f3d1df269ac9b18808455f73515da870d29d
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-11-16 16:07:12 +08:00
Jon Lin
4c6357d341 arm64: dts: rockchip: rk3568-pinctrl: Add spi high speed pinctrl group
Change-Id: I6e8bc0d9acb583950b62bcf7c55e47aa808e6bf1
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-11-16 16:06:47 +08:00
Huang zhibao
8b2d4d6b81 arm64/configs: rockchip_defconfig: enable LEDS_TRIGGER_TIMER for RK3568-NVR
Signed-off-by: Huang zhibao <hzb@rock-chips.com>
Change-Id: I5ad070731bf8425f10b5e752299d65ee1f674fde
2020-11-16 16:02:48 +08:00
Huang zhibao
dbf90c4ff4 arm64/configs: rockchip_linux_defconfig: enable LEDS_TRIGGER_TIMER for RK3568-NVR
Signed-off-by: Huang zhibao <hzb@rock-chips.com>
Change-Id: Ie61a77d23b1dc7652932a5c07d8bab16f90e6428
2020-11-16 16:02:48 +08:00
Shunqing Chen
125ccf92ec drm/rockchip/rk628: workaround input mode positive polarity is not supported
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
Change-Id: I41132b2320cac3d4738de6b4914d020b63579143
2020-11-16 15:25:23 +08:00
Frank Wang
e8a4d211a2 arm64: dts: rockchip: rk3568: adds mailbox device nodes
This adds mailbox device nodes for RK3568 SoCs.

Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: I3f2c0759e17f02e8f647980d386ac838097e4ca6
2020-11-16 14:48:48 +08:00
Wu Liangqing
6ce096348e arm64: dts: rockchip: sdhci enabled hs400 max-frequency 100MHZ for rk3566-rk817-tablet
Change-Id: I4a5e8060966f75e47d470a6c495b74d90cedb51d
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2020-11-16 14:36:05 +08:00
Wyon Bi
91107c1c8a drm/bridge: analogix_dp: Add bankwidth check
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: Ia2f2e53cd0b16ca6401e53f949b8746f3be15dfc
2020-11-16 11:34:05 +08:00
Cai YiWei
28f15a4887 arm64: dts: rockchip: rk3568: add isp node
Change-Id: I225988eb7aa7695f536637efb79800ba17e82e15
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2020-11-16 11:23:24 +08:00
Cai YiWei
8cf4bc70d1 media: rockchip: isp: add rk3568 config
Change-Id: I6777e281602d2dd9fb78ef54ac8793459267a3da
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2020-11-16 11:22:32 +08:00
Shunqing Chen
6d3df02fea arm64: dts: rockchip: enable hdmi in rk3568-evb
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
Change-Id: I6cf09d56bfd81c855d1b7226bad7e2ae54e2f231
2020-11-16 10:43:57 +08:00
Ding Wei
ac0e7c16a6 arm64: dts: rockchip: rk3568-evb: enable iep2 node
Change-Id: Id9e4d122f97dd630e620c812b0524fe1f370cb3e
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-11-16 10:33:30 +08:00
Ding Wei
34ce453d20 arm64: dts: rockchip: rk3568: add iep node
Change-Id: I0fa186690188d3a79d21db019d21deb0e67bc291
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-11-16 10:33:16 +08:00
Ding Wei
e034f07630 video: rockchip: mpp: add compatible for iep2
Change-Id: Ida405f81c24c3bb175564fa3afaeb4dc15716106
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-11-16 10:33:08 +08:00
Cai YiWei
70b1a4c585 media: rockchip: isp: add isp21
Change-Id: I811d691d5aa3cfe2ced91c2044ec920a53ca6d89
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2020-11-16 10:12:35 +08:00
Cai YiWei
6d260442a4 arm64: rockchip_defconfig: enable isp for isp2x
Change-Id: I3b382a13ba0587520263ec35b46fbdd7a001ae23
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2020-11-16 09:55:47 +08:00
Cai YiWei
de38a690a4 media: rockchip: isp: capture to different version
Change-Id: I8513febd4e0e8a4fc3e1cff630fc1fc98af687b3
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2020-11-15 17:58:20 +08:00
Zorro Liu
cd4471f553 arm64: dts: rockchip: rk3568: add ebc and eink node
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: Ie399fb4be729cbd048c9107500b6a4844763aee2
2020-11-15 17:45:15 +08:00
Andy Yan
85706e850f drm/rockchip: vop2: Add dump register interface.
Dump sys/ovl/vp0/vp1/vp2/cluster0/cluster1/esmart0/esmart1/smart0/smart1.

Change-Id: Ic931c99ccd5aa2e2ac2ef1f2b1345daafbe9cf29
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2020-11-15 17:40:51 +08:00
Wu Liangqing
3854090032 arm64: dts: rockchip: rk3566-tablet: set dsi lane-rate = 1000
Change-Id: I07c7857c1b6c155801e5fab80103bdc76eaf99ec
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2020-11-15 15:45:02 +08:00
Simon Xue
ebf1e1cbf5 arm64: rockchip_defconfig: enable watchdog
Change-Id: I6394e2120692443d60a1003df9570f9398067840
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2020-11-15 15:44:35 +08:00
Simon Xue
d7bb68b76b arm64: dts: rockchip: rk3568: add tclk for watchdog
Change-Id: I14018563cb2e1bd844f41859020fa7fdc6b555ec
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2020-11-15 15:40:23 +08:00
Serge Semin
be33f619b2 UPSTREAM: watchdog: dw_wdt: Support devices with asynch clocks
DW Watchdog IP core can be synthesised with asynchronous timer/APB
clocks support (WDT_ASYNC_CLK_MODE_ENABLE == 1). In this case
separate clock signals are supposed to be used to feed watchdog timer
and APB interface of the device. Currently the driver supports
the synchronous mode only. Since there is no way to determine which
mode was actually activated for device from its registers, we have to
rely on the platform device configuration data. If optional "pclk"
clock source is supplied, we consider the device working in asynchronous
mode, otherwise the driver falls back to the synchronous configuration.

Change-Id: I9c3bdc7e7b7b1fc0be0f7335cf3c1950169891d7
Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Cc: Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: linux-mips@vger.kernel.org
Cc: devicetree@vger.kernel.org
Link: https://lore.kernel.org/r/20200530073557.22661-6-Sergey.Semin@baikalelectronics.ru
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
Signed-off-by: Simon Xue <xxm@rock-chips.com>
(cherry picked from commit a16f58bf15)
2020-11-15 15:40:03 +08:00
Algea Cao
73b36b7f3e arm64: dts: rockchip: rk3568: Add hdmi cec pinctrl
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I06bd6958dd19c376bb22c73a882e692b983d8340
2020-11-14 19:22:04 +08:00
Sugar Zhang
75db99f1eb dmaengine: pl330: _prep_dma_memcpy: Fix wrong burst size
Actually, burst size is equal to '1 << desc->rqcfg.brst_size'.
we should use burst size, not desc->rqcfg.brst_size.

dma memcpy performance on Rockchip RV1126
@ 1512MHz A7, 1056MHz LPDDR3, 200MHz DMA:

dmatest:

/# echo dma0chan0 > /sys/module/dmatest/parameters/channel
/# echo 4194304 > /sys/module/dmatest/parameters/test_buf_size
/# echo 8 > /sys/module/dmatest/parameters/iterations
/# echo y > /sys/module/dmatest/parameters/norandom
/# echo y > /sys/module/dmatest/parameters/verbose
/# echo 1 > /sys/module/dmatest/parameters/run

dmatest: dma0chan0-copy0: result #1: 'test passed' with src_off=0x0 dst_off=0x0 len=0x400000
dmatest: dma0chan0-copy0: result #2: 'test passed' with src_off=0x0 dst_off=0x0 len=0x400000
dmatest: dma0chan0-copy0: result #3: 'test passed' with src_off=0x0 dst_off=0x0 len=0x400000
dmatest: dma0chan0-copy0: result #4: 'test passed' with src_off=0x0 dst_off=0x0 len=0x400000
dmatest: dma0chan0-copy0: result #5: 'test passed' with src_off=0x0 dst_off=0x0 len=0x400000
dmatest: dma0chan0-copy0: result #6: 'test passed' with src_off=0x0 dst_off=0x0 len=0x400000
dmatest: dma0chan0-copy0: result #7: 'test passed' with src_off=0x0 dst_off=0x0 len=0x400000
dmatest: dma0chan0-copy0: result #8: 'test passed' with src_off=0x0 dst_off=0x0 len=0x400000

Before:

  dmatest: dma0chan0-copy0: summary 8 tests, 0 failures 48 iops 200338 KB/s (0)

After this patch:

  dmatest: dma0chan0-copy0: summary 8 tests, 0 failures 179 iops 734873 KB/s (0)

After this patch and increase dma clk to 400MHz:

  dmatest: dma0chan0-copy0: summary 8 tests, 0 failures 259 iops 1062929 KB/s (0)

Change-Id: I45fd028263452d6aa86190e2b10d5cdc3e90c2b5
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2020-11-14 18:12:31 +08:00
Andy Yan
c83df779fd drm/rockchip: vop2: Add uv_mst and ymirror register for Esmart/Smart win
Smart and Esmart support yuv and ymirror, But all the multi area in
one windows share the same ymirror bits. This give a strict limitation
on compositor: the compositor must enable DRM_MODE_REFLECT_Y for all
the multi area plane or disable all of them, otherwise will cause
a iommu pagefault as multie area don't know how to fetch data
from framebuffer.

Change-Id: I52d6f0766f023b6b71ad3a8aace78f38d285c10c
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2020-11-14 17:52:20 +08:00
Andy Yan
113273a924 drm/rockchip: vop2: No add fb offset for afbc
When we want display from a offset of the afbc
framebuffer, afbc_hdr_hdr still need to set
from the start address of the framebufferr.
And the x/y offset set to PIC_OFFSET register.
This is different with non-afbc window.

Change-Id: I501c2071c9569dc3801f9bc588e7517d912a7972
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2020-11-14 16:51:36 +08:00
Liang Chen
672cf55e6d arm64: dts: rockchip: init board for rk3568-iotest-ddr3-v10
Change-Id: I0aab631ee785ab0bde5838e5bf8c9bce1881149f
Signed-off-by: Liang Chen <cl@rock-chips.com>
2020-11-14 16:31:39 +08:00
Wu Liangqing
f15b4fc547 arm64: dts: rockchip: rk3566-rk817-tablet bringup
Change-Id: Icd5ba7ff260e3256eaa5bb22aaf5aa93a1e4f62d
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2020-11-14 16:05:39 +08:00
Nickey Yang
0b8aec3f03 drm: rockchip: rk628: Fix reading 4block EDID for hdmi
After the current driver had read the EDID of 4block once,
hdmi->i2c->segment cannot reset to zero, which will cause the
data when restart reading to be block2 data not the expected
block0 data.
   At the same time, when msg->addr equal to DDC_SEGMENT_ADDR,
the next setting the same EDID related register, which will lead
to repeated reading of the data of block2, but unable to read the
address of block3.

Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
Change-Id: I490c4b16d977dc044ce3b3ce2d6cfaebd8922f0c
2020-11-14 16:04:01 +08:00
Nickey Yang
f251460759 drm: rockchip: rk618: Fix reading 4block EDID for hdmi
After the current driver had read the EDID of 4block once,
hdmi->i2c->segment cannot reset to zero, which will cause the
data when restart reading to be block2 data not the expected
block0 data.
   At the same time, when msg->addr equal to DDC_SEGMENT_ADDR,
the next setting the same EDID related register, which will lead
to repeated reading of the data of block2, but unable to read the
address of block3.

Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
Change-Id: I7c4ec557c6206ff2b941e9060e63b00e941c1e2b
2020-11-14 16:04:01 +08:00
Shawn Lin
b46d51c1f2 arm64: dts: rockchip: rk3568: Downgrade pcie I/O and MEM bus address to 32-bit
Change-Id: I9413405199e6ee34766a5d4dcef395e1de5f0ef8
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2020-11-14 16:01:47 +08:00
Shawn Lin
6173790b55 mmc: sdhci-of-dwcmshc: Get tap number from DT if possible for HS200/HS400
It turns out that we should allow BSP to assign tap number for different
boards or platforms.

Change-Id: I793da380fad1c4d8b96b6ec32f66dfc9e5e631f1
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2020-11-14 16:01:41 +08:00
Zefa Chen
a3907e42d2 media: add motor driver of MP6507 for camera IRIS/FOCUS/ZOOM
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I03e354473ca5fcbd972adb1f46019f01488872cb
2020-11-14 15:58:02 +08:00
Finley Xiao
239fd26d32 arm64: dts: rockchip: rk3568: Change CLK_TSADC_TSEN to 17MHz
Make the bandgap clock close to its typical frequency 16MHz.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I60b98438a89ab91fb9e2ac009ad8e2b2cba4a5a3
2020-11-14 15:42:11 +08:00
Elaine Zhang
1b479a852b clk: rockchip: rk3568: mark hclk_php and pclk_php as critical clock
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: Ie73d2b9a19d0d5f17311fb6be96e1ace96ffe999
2020-11-14 14:43:55 +08:00
Shawn Lin
5a8f78cec8 arm64: dts: rockchip: rk3568: Fix pci domain and type
Need to specify different domain for same bus ID to be attached
via pci type for multi-root PCIe bridge.

Change-Id: I91a1f1c788c777b4bbc4c6bfcccc5228497c2327
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2020-11-13 19:55:03 +08:00
Shawn Lin
4ddf7f23ca arm64: dts: rockchip: Add PCIe20 and PCIe30 bifurcation node
Change-Id: Ie59f6b0b46bef80c4c14fa2d9564e324dd3b8e6b
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2020-11-13 19:55:03 +08:00
Finley Xiao
378cbda38a arm64: dts: rockchip: rk3568: Add thermal zone device node
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ieff7e1736b052a844d780fa18149099acc9ceb4a
2020-11-13 19:07:58 +08:00
Frank Liu
0adf71df7f media: i2c: add sc2232 driver
Signed-off-by: Frank Liu <frank.liu@rock-chips.com>
Change-Id: I688398cdc757dad906e3b8a9224b3add0d7e7cf7
2020-11-13 19:05:10 +08:00
Shawn Lin
a97ac5dffc arm64: dts: rockchip: rk3568-evb: Fix max-frequency property
Change-Id: I2a5555511be2eb4e3ccf3d343d395e0eedb3d569
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2020-11-13 18:07:41 +08:00