Commit Graph

860318 Commits

Author SHA1 Message Date
Andy Yan
866abfdc6d drm/rockchip: vop2: Change scale factor calculate algorithm
Vop2 can't share the same scale factor calculate
algorithm with rk3399 on some situation, even they
use the same scale algorithm.

Change-Id: I90dd39b2482d39d56ee94046830facc4d20f5cb2
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2020-11-17 15:20:22 +08:00
Bian Jin chen
0c17853c97 dm table: Avoid null pointer dereference
Test: vts_libdm_test

Unable to handle kernel access to user memory outside uaccess routines
at virtual address 0000000000000018
[   83.108561] Mem abort info:
[   83.108896]   ESR = 0x96000005
[   83.109191]   Exception class = DABT (current EL), IL = 32 bits
[   83.110203]   SET = 0, FnV = 0
[   83.110505]   EA = 0, S1PTW = 0
[   83.110894] Data abort info:
[   83.111182]   ISV = 0, ISS = 0x00000005
[   83.111537]   CM = 0, WnR = 0
[   83.111929] user pgtable: 4k pages, 39-bit VAs, pgdp = 00000000cff2854e
[   83.112534] [0000000000000018] pgd=0000000033f28003, pud=0000000033f28003, pmd=0000000000000000
[   83.113403] Internal error: Oops: 96000005 [#1] PREEMPT SMP
[   83.113912] Modules linked in: 8723cs
[   83.114257] Process vts_libdm_test (pid: 1985, stack limit = 0x000000007ea1bacc)
[   83.114923] CPU: 3 PID: 1985 Comm: vts_libdm_test Not tainted 4.19.154 #41
[   83.115534] Hardware name: Rockchip rk3326 863 rkisp1 board (DT)
[   83.116082] pstate: 40400005 (nZcv daif +PAN -UAO)
[   83.116534] pc : __pi_strncmp+0x24/0x208
[   83.116908] lr : dm_table_add_target+0x184/0x3bc
[   83.117326] sp : ffffff8012bcbb70

Fixes: 531fc5e280 ("dm: add check target device probe completely")
Signed-off-by: Bian Jin chen <kenjc.bian@rock-chips.com>
Change-Id: Icb943c4d1dfe116b3b39f4cd77b2eda232de65fe
2020-11-17 15:20:08 +08:00
Huang zhibao
64e1eacb73 arm64: dts: rockchip: Add support for rk3568-nvr demo board
Signed-off-by: Huang zhibao <hzb@rock-chips.com>
Change-Id: Iefe072f9b18e5e8c0103391f782aa510b6c326e0
2020-11-17 14:56:01 +08:00
Guochun Huang
35d1482625 drm/rockchip: dsi: enable hclk before pclk
There is a risk of access failure, if pclk
is enabled without enabling hclk in rk3568.

Change-Id: I02c2a0d8ad6c0d2c6649ee16ab50dda0da542aac
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2020-11-17 14:54:41 +08:00
Wyon Bi
ad3cad3616 drm/rockchip: analogix_dp: Covert to use bulk clk
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I79466efdcce0c0495a67948f3d36a03e39f4b9ed
2020-11-17 14:28:12 +08:00
Wyon Bi
00425aeadd arm64: dts: rockchip: rk3568: Fix edp clock
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: If35282b9f0fc740f174e240803de6ebc2a049c66
2020-11-17 14:24:44 +08:00
Guochun Huang
f8956385bc arm64: dts: rockchip: rk3568: dsi add HCLK_VO clk
Change-Id: Ib900d0c2028599d55c2ee03dac74172d1b403a6c
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2020-11-17 14:12:57 +08:00
Jianqun Xu
0ec895a5ac regulator: fix regulator_summary name show issue
Before this patch:
vcc_1v8                    0    3      0  1800mV     0mA  1800mV  1800mV
   fdc20000.syscon:io-domains                                     0mV     0mV
   fdc20000.syscon:io-domains                                     0mV     0mV
   deviceless                                                0mV     0mV
vdda0v9_image              0    1      0   900mV     0mA   900mV   900mV
   deviceless                                                0mV     0mV

With this patch:
vcc_1v8                                        0    3      0  1800mV     0mA  1800mV  1800mV
   fdc20000.syscon:io-domains-vccio6                                             0mV     0mV
   fdc20000.syscon:io-domains-vccio4                                             0mV     0mV

Change-Id: Iaae22f406bb75027279eeb234b570edee952abc4
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2020-11-17 11:28:52 +08:00
Lee Jones
35dbcb55c6 UPSTREAM: regulator: consumer: Supply missing prototypes for 3 core functions
regulator_suspend_enable(), regulator_suspend_disable() and
regulator_set_suspend_voltage() are all exported members of the
API, but are all missing prototypes.

Fixes the following W=1 warning(s):

 drivers/regulator/core.c:3805:5: warning: no previous prototype for ‘regulator_suspend_enable’ [-Wmissing-prototypes]
 3805 | int regulator_suspend_enable(struct regulator_dev *rdev,
 | ^~~~~~~~~~~~~~~~~~~~~~~~
 drivers/regulator/core.c:3812:5: warning: no previous prototype for ‘regulator_suspend_disable’ [-Wmissing-prototypes]
 3812 | int regulator_suspend_disable(struct regulator_dev *rdev,
 | ^~~~~~~~~~~~~~~~~~~~~~~~~
 drivers/regulator/core.c:3851:5: warning: no previous prototype for ‘regulator_set_suspend_voltage’ [-Wmissing-prototypes]
 3851 | int regulator_set_suspend_voltage(struct regulator *regulator, int min_uV,
 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Change-Id: I1ccdd34e5a7c42976472a00b4b17547bd741509e
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20200625163614.4001403-2-lee.jones@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit da6690767c)
2020-11-17 11:24:32 +08:00
Andy Yan
aa049c3686 drm/rockchip: vop2: Add rb swap for yuv444 output
According to the test on HDMI, when vop do csc(rgb2yuv444),
it need a rb_swap to show right color. But yuv420 don't
need to do so.

Change-Id: I16c7530b015bd67a584cf39304df9b9f5b0d7a29
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2020-11-17 11:15:35 +08:00
Sugar Zhang
1b8e5ce927 arm64: dts: rockchip: rk3568: Move property '#sound-dai-cells" into dtsi
Change-Id: Ia4a24f5730c8e985e7ec59d5f9174a7ce3d0e2f8
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2020-11-17 10:56:47 +08:00
Ziyuan Xu
68f8b78c75 ARM: configs: rv1126-battery.config: enable gpio-charger and u2phy
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I5f37b46ca821eb8fbc20f93e909a1acfc80085b7
2020-11-17 10:48:35 +08:00
Ziyuan Xu
8e168f9d13 ARM: dts: rv1126-bat-ipc-v10: enable gpio-charger for QC feature
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I8d53db0b528e72f15ad094915122b6894343852b
2020-11-17 10:48:35 +08:00
Ziyuan Xu
56a786838b power: supply: gpio-charger: change current limit automatically by *USB_DCP*
The usb phy could update the state of the EXTCON_CHG_USB_DCP duly, so
that we can change the current limit to maximum within the USB dedicated
charging port.

Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I32f0361a2f0153424627bef0bd75c3b93e51ec03
2020-11-17 10:48:35 +08:00
Tao Huang
ca4017a761 arm64: dts: rockchip: rk3568-evb: Sort the nodes alphabetically
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Iacdcabbd3def46db8747e6fb69529218c3880a91
2020-11-17 10:16:55 +08:00
Shawn Lin
7b2bd67677 arm64: dts: rockchip: Remove HS400 support from RK356X platforms
It turns out to be that RK356X platforms is only support to work
reliably under HS200 mode. We now officially remove HS400
support from datasheet, as well as dts.

Change-Id: Icb7cff46a6d757d1615360c04f4b20b3a5bdd6d2
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2020-11-17 09:50:37 +08:00
Shunqing Chen
8dcec60e5c arm64: dts: rockchip: rk3568-evb6: add rk628 rgb2hdmi
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
Change-Id: Id22fdf762aa34f52c5bc682540afbddd896d7a51
2020-11-16 20:20:56 +08:00
Elaine Zhang
df00b8368c clk: rockchip: rk3568: fix up the spi clk
Fix up the TRM and RXBB are not sync.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I8d9bec5292686169707a945759c4389919c3430a
2020-11-16 19:57:15 +08:00
Ding Wei
d9f357e5bc video: rockchip: mpp: rkvenc: fix writing error
Fixes: 932a0e8311 ("video: rockchip: mpp: add register for rkvenc translate table")
Change-Id: I3a1e9eac96d201d0c16243e0bff6280b2c07e422
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-11-16 19:56:22 +08:00
Sandy Huang
cca2ba1a69 arm64: dts: rockchip: rk3568: vop add grf reference
used to config rgb/bt1120/bt656 dclk invert

Change-Id: I2ff601f63fe2fd037a5345ed8217ba526a02a5d9
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-11-16 17:40:56 +08:00
Zefa Chen
78fe7a72b4 media: i2c: support ov4686 camera driver
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I0f11e99672b8fc53c10c00a2d9ba85dfe6a605a6
2020-11-16 17:37:25 +08:00
Bin Yang
d36cebdd6b arm64: dts: rockchip: rk3568-evb: set dr_mode to otg for usbdrd_dwc3
Signed-off-by: Bin Yang <yangbin@rock-chips.com>
Change-Id: I49c1ef94d80844e070bea0fd8da83df308154a8d
2020-11-16 17:36:59 +08:00
Allon Huang
b3e55713e0 arm64: dts: rockchip: rk3568: add vicap nodes
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
Change-Id: If418edfa6f4155e4fd3e88f161b0f9a8a7a16c0a
2020-11-16 17:18:41 +08:00
Allon Huang
9ad8b0cdcf media: rockchip: cif: support rk3568 csi host
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
Change-Id: I78e3ff7722041153134c4411cf48abe2a609868e
2020-11-16 17:15:51 +08:00
Allon Huang
3e3dd37a46 media: rockchip: cif: support rk3568 vicap
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
Change-Id: If78619cd89ebc1e586a940fd7fac02cea21f0124
2020-11-16 17:15:18 +08:00
Cai YiWei
44673b5ea7 media: rockchip: isp/ispp add lock for multi dev runtime
Change-Id: If4cb8f6c6e1f99102c8a9bb23d06eaf609d0b86e
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2020-11-16 17:05:24 +08:00
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