Commit Graph

844255 Commits

Author SHA1 Message Date
Jianqun Xu
2fb26d6cd9 arm64: dts: rockchip: rk1808: pick commits about rk1808 dtsi from v4.4
This patch do these operation:

42a2c3610d88 Revert "Revert "arm64: dts: rockchip: update iommu clk name from "hclk" to "iface"""
ca40255ac827 arm64: dts: rockchip: adjust dmc opp-table for rk1808
3c867de9a7f3 arm64: dts: rockchip: rk1808: set PCIe as RC default
5eab28bdf11e arm64: dts: rockchip: rk1808: add usb3phy_grf_p for combo phy
a3bb2719be95 arm64: dts: rockchip: rk1808: set min voltage for dmc when low temperature
e0d40e1af1dd arm64: dts: rockchip: limit vdd_npu to 0.88V for rk1808 SoCs
ccffc153ed72 arm64: dts: rockchip: rk1808: add mipi csi dts config
ca3c7ea638a7 arm64: dts: rockchip: rk1808: Add wide-temperature configure
6d4c56b8202a arm64: dts: rockchip: Add system monitor node
77cd099b752f arm64: dts: rockchip: rk1808: disable peri ms and sram auto CS
f4eb4471e1c2 arm64: dts: rockchip: rk1808: Correct the drive strength for rgmii/rmii
302df1d57c63 arm64: dts: rockchip: modify io driver strength for rk1808
6a8dfe606a0a arm64: dts: rockchip: rk1808: assigned-clock-parents for clk_32k_ioe
c2901bf3f30e soc: rockchip: Change the parameter of power model for cpu and npu
71812e7394a4 arm64: dts: rockchip: add soc_bus support for rk1808
2463e3323cd7 arm64: dts: rockchip: adjust opp-table for rk1808 SoCs
4c3b6ea9751c arm64: dts: rockchip: rk1808: support cpu idle
e2037aa67f8f Revert "arm64: dts: rockchip: rk1808: Correct the drive strength for rgmii/rmii"
bca7a337bb60 Revert "soc: rockchip: Change the parameter of power model for cpu and npu"
63f5e887d360 Revert "arm64: dts: rockchip: Add system monitor node"
d691a5bf4b5f Revert "arm64: dts: rockchip: update iommu clk name from "hclk" to "iface""

Change-Id: Ic5915c50019710b57d28e6d1833a6132af57c870
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2019-10-15 10:46:29 +08:00
Zhen Chen
b0ad177659 MALI: rockchip: upgrade Bifrost DDK to r20p0-01rel0, from r12p0-01rel0
I replace "sg_dma_len" with "MALI_SG_DMA_LEN"
and rename configs which have duplicated names in midgard/, as before.

Note that drivers/gpu/arm/bifrost on DDK r20
depends on drivers/base/memory_group_manager.

Change-Id: Ie51fda035a98b5151f25a0fcf7294b88d4ecc978
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2019-10-15 10:10:21 +08:00
Zhen Chen
14a1d81065 arm64: configs: rockchip_defconfig: enable CONFIG_MALI_MEMORY_GROUP_MANAGER
Change-Id: Ie62e63c7222da4da289e8fd9767f6237de1dcbf8
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2019-10-15 10:10:21 +08:00
Zhen Chen
2ec8b27024 Add memory_group_manager introduced by Bifrost DDK r20p0-01rel0
drivers/gpu/arm/bifrost on DDK r20 depends on this module.

Change-Id: I175fbd2429aa1b8a658c431ce71503c67976db3d
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2019-10-15 10:10:21 +08:00
Marc Zyngier
0f1d09351e UPSTREAM: arm64: dts: rockchip: Add capacity-dmips-mhz attributes to rk3399
The RK3399 has the interesting property to be a so called "big-little"
system, where not all the CPUs are equal (the A53s are much weaker
than the A72s).

So far, we're not telling the OS that there is such a difference in
processing capacity, and Linux assumes that they are equal. Too bad.

Let's tell the OS about this by using the capacity-dmips-mhz
property. The values used here are those used on the Juno platform,
which is quite similar. This leads to the scheduler knowing that
it can pack more tasks on the A72s, and leads to a better interactive
experience.

Tested-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from commit 97df3aa76b)
Signed-off-by: Liang Chen <cl@rock-chips.com>

Change-Id: I778b5decfbee73c8f78d9f746c9546ecff065039
2019-10-15 09:45:01 +08:00
Jianqun Xu
02a77f287b pinctrl: rockchip: add support for rk1808 SoCs
Add support for pinctrl on RK1808 SoCs.

Squash these patches:
'b2828bc4417c pinctrl: rockchip: add support for rk1808 SoCs'
'12db436a6307 pinctrl: rockchip: add rk1808 mux route'
'9fe8305b6824 pinctrl: rockchip: Fix the register offset of drive for rk1808'
'fb4f9d860bcd pinctrl: rockchip: fix rk1808_mux_route_data'
'0d9f037d8219 picntrl: rockchip: fix pull register offset for rk1808'
'56850f2349be pinctrl: rockchip: Add spi1/spi2 route select function for rk1808'

Change-Id: I0688a61af139cc24363b7515036c80d25ff6a738
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2019-10-15 09:44:02 +08:00
Shengfei Xu
647c53f05e power: battery: setup_timer() -> timer_setup()
Change-Id: I4980d5665d2465ddba0df8a078f44a83037ce285
Signed-off-by: Shengfei Xu <xsf@rock-chips.com>
2019-10-15 09:41:07 +08:00
Shengfei Xu
833f9df6a7 power: charger: replace the extcon API
This patch replaces the deprecated extcon API as following:
- extcon_get_cable_state_() -> extcon_get_state()

Change-Id: Id800b939bad8695f23841d5534c285b51dd60fb0
Signed-off-by: Shengfei Xu <xsf@rock-chips.com>
2019-10-15 09:41:07 +08:00
Shengfei Xu
74f151bae8 power: battery/charger: move battery/charger drivers to power/supply
Change-Id: I70092715368a9d5c7241258a97dc51e55659499b
Signed-off-by: Shengfei Xu <xsf@rock-chips.com>
2019-10-15 09:41:07 +08:00
Faiz Abbas
c79c899dea FROMLIST: mmc: cqhci: commit descriptors before setting the doorbell
Add a write memory barrier to make sure that descriptors are actually
written to memory before ringing the doorbell.

Change-Id: Ia9e6b72d49969c3fff49386a3a6c0d2fd5d88237
Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
(cherry picked from https://patchwork.kernel.org/patch/11189311/)
2019-10-15 08:58:15 +08:00
Shengfei xu
c17beee83e mfd: RK808: update the "pm_power_off" initalization conditons
Only the powerofff callback feature is supported through the
rockchip,system-power-controller.

Change-Id: I55e73c05a749edab6c3710e304ee86c03812ab6f
Signed-off-by: Shengfei xu <xsf@rock-chips.com>
2019-10-14 10:24:41 +08:00
shengfei Xu
39eba75127 rtc: rk808: check the rtc is available for rk816
Change-Id: I383c08cd5ad7cb282c0ec0aa12e9e84c9df52ba3
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2019-10-14 10:24:41 +08:00
Wyon Bi
c771f313d2 arm64: dts: rockchip: Change rk618 clkin rate to 11.2896MHz
Change-Id: I5d4b00855d29bc4f2ccf6754eb191e70f1632f51
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-10-14 10:07:33 +08:00
Wu Jingchen
7e2c9c679c arm64: dts: rockchip: px30-evb-ext-rk618: Create a new dtsi for rk618
Change-Id: I7511599eba331044f8e386dcc5d5840a1eec5457
Signed-off-by: Wu Jingchen <oven.wu@rock-chips.com>
2019-10-14 10:07:33 +08:00
Wu Jingchen
675c418862 arm64: dts: rockchip: px30-evb-ext-rk618-avb: Add rule in Makefile
Change-Id: I2b1d636e4be4b7758007ea5d8fbdefb9c040713b
Signed-off-by: Wu Jingchen <oven.wu@rock-chips.com>
2019-10-14 10:07:33 +08:00
Wu Jingchen
311d725cbd arm64: dts: rockchip: px30-evb-ext-rk618-avb: Add dts for 9.0 double-screen display
Change-Id: I1d6470d5fe163f8ef59a5ee2593fe2c73e3dbdfa
Signed-off-by: Wu Jingchen <oven.wu@rock-chips.com>
2019-10-14 10:07:33 +08:00
Arnd Bergmann
5520c24000 BACKPORT: soc: rockchip: work around clang warning
clang emits a warning about a negative shift count for an
unused part of a conditional constant expression:

drivers/soc/rockchip/pm_domains.c:795:21: error: shift count is negative [-Werror,-Wshift-count-negative]
        [RK3328_PD_VIO]         = DOMAIN_RK3328(-1, 8, 8, false),
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/soc/rockchip/pm_domains.c:129:2: note: expanded from macro 'DOMAIN_RK3328'
        DOMAIN_M(pwr, pwr, req, (req) + 10, req, wakeup)
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/soc/rockchip/pm_domains.c:105:33: note: expanded from macro 'DOMAIN_M'
        .status_mask = (status >= 0) ? BIT(status) : 0, \
                                       ^~~~~~~~~~~
include/linux/bits.h:6:24: note: expanded from macro 'BIT'

This is a bug in clang that will be fixed in the future, but in order
to build cleanly with clang-8, it would be helpful to shut up this
warning. This file is the only instance reported by kernelci at the
moment.

The best solution I could come up with is to move the BIT() usage
out of the macro into the instantiation, so we can avoid using
BIT(-1).

Link: https://lore.kernel.org/r/20190703153112.2767411-1-arnd@arndb.de
Link: https://bugs.llvm.org/show_bug.cgi?id=38789
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
(cherry picked from commit b27aca2e55)

Change-Id: Iaab1301533c185524d17fa95182e87ab9dd2d428
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-14 09:40:28 +08:00
Ziyuan Xu
7a3d3a4938 arm64: dts: rockchip: px30: add rng node for crypto v2 hwrng
Note that rng and crypto employ the same hardware resource, they're
incomatible.

Change-Id: I1ec49380bcc8b7ca23c1bf6b98220f0bb8b53938
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2019-10-12 17:03:16 +08:00
Tao Huang
b2fcbc0d96 video: rockchip: rga2: fix clang warning
drivers/video/rockchip/rga2/rga2_mmu_info.c:284:20: warning: explicitly assigning value of variable of type 'uint32_t' (aka 'unsigned int') to itself [-Wself-assign]
            stride = stride;
            ~~~~~~ ^ ~~~~~~

Change-Id: I1c5d3b2f3354437777c8431ad027a98815f1fe70
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-12 15:27:57 +08:00
Tao Huang
8b3fb89340 input: sensors: gyro: fix clang warning
drivers/input/sensors/gyro/l3g4200d.c:175:21: warning: address of array 'pdata->orientation' will always evaluate to 'true' [-Wpointer-bool-conversion]
        if(pdata && pdata->orientation)
                 ~~ ~~~~~~~^~~~~~~~~~~

drivers/input/sensors/gyro/l3g20d.c:175:21: warning: address of array 'pdata->orientation' will always evaluate to 'true' [-Wpointer-bool-conversion]
        if(pdata && pdata->orientation)
                 ~~ ~~~~~~~^~~~~~~~~~~

drivers/input/sensors/gyro/ewtsa.c:386:21: warning: address of array 'pdata->orientation' will always evaluate to 'true' [-Wpointer-bool-conversion]
        if(pdata && pdata->orientation)
                 ~~ ~~~~~~~^~~~~~~~~~~

Change-Id: Ic4f9f33ac1654711434a9ab383da02bfade5ab13
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-12 15:27:57 +08:00
Tao Huang
17b4bef55c video: rockchip: vpu: Update OPP users to put reference
According to
commit 8a31d9d942 ("PM / OPP: Update OPP users to put reference")

Change-Id: I38bd7f57b8836f8caa9d7046c22fdf5232b78bae
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-12 15:25:20 +08:00
Tao Huang
b66185cc7e RK3368 GPU: Update OPP users to put reference
According to
commit 8a31d9d942 ("PM / OPP: Update OPP users to put reference")

Change-Id: Iece900f2814f84d14e1f67fb3d78d724b3ad9dc3
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-12 15:25:20 +08:00
Tao Huang
088f84bf55 GPU: Rogue_M: Update OPP users to put reference
According to
commit 8a31d9d942 ("PM / OPP: Update OPP users to put reference")

Change-Id: I5a2e62f5dbac3e2b894445274dce2d3c1644f192
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-12 15:25:20 +08:00
Tao Huang
d525a9ab3d Mali: midgard_for_linux: Update OPP users to put reference
According to
commit 8a31d9d942 ("PM / OPP: Update OPP users to put reference")

Change-Id: Id38e4632f951242bcbebef3fba066c118d2203e3
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-12 15:25:20 +08:00
Tao Huang
a4513fc9c7 Mali: midgard: Update OPP users to put reference
According to
commit 8a31d9d942 ("PM / OPP: Update OPP users to put reference")

Change-Id: I355e2752197b0625123e3af61fcbd871a59f0c71
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-12 15:25:20 +08:00
Tao Huang
643e24b271 Mali: utgard: Update OPP users to put reference
According to
commit 8a31d9d942 ("PM / OPP: Update OPP users to put reference")

Change-Id: Ic142e054b3366737f0fcdc34ac0a19fc7dcd78d6
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-12 15:25:20 +08:00
Tao Huang
27f7384f3c MALI: bifrost_for_linux: Update OPP users to put reference
According to
commit 8a31d9d942 ("PM / OPP: Update OPP users to put reference")

Change-Id: I8bc69ec067623e05a610b816990e128e853d01a6
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-12 15:25:20 +08:00
Tao Huang
4b72de839f MALI: bifrost: Update OPP users to put reference
According to
commit 8a31d9d942 ("PM / OPP: Update OPP users to put reference")

Change-Id: I2b342c28a0c1d44adebd589b48ea95c9dcd7182d
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-12 15:25:20 +08:00
Tao Huang
89b1aa9ecf PM / devfreq: rockchip_dmc: Update OPP users to put reference
According to
commit 8a31d9d942 ("PM / OPP: Update OPP users to put reference")

Change-Id: Ia4dd086bdb8260a5fc839287e872c89a4b57cb22
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-12 15:25:20 +08:00
Tao Huang
de384cecb2 PM / devfreq: rockchip_bus: Update OPP users to put reference
According to
commit 8a31d9d942 ("PM / OPP: Update OPP users to put reference")

Change-Id: I56e2212f19eee5bcd570d8729d3a5154f6a02ef4
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-12 15:25:20 +08:00
Zefa Chen
7973ba63f2 media: i2c: sensor drivers synchronize with kernel 4.4
kernel 4.4 commit ends f3e1785b1893c4a7bdf543ae048b92f9696daf53

Change-Id: I666049f58cb9939e76cbe889d3f85be012ea0fc1
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2019-10-12 11:15:39 +08:00
Tao Huang
ac42acf166 rk: use gcc-wrapper.py only when CC is gcc
Fixes: b1918f4c11 ("rk: add gcc-wrapper")
Change-Id: Iaf1471c03db518b38befacbc00c2e75f5458d5cb
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-11 19:19:24 +08:00
Tao Huang
166f17ab62 arm64: rockchip_defconfig: remove unnessesary errata config
-CONFIG_CAVIUM_ERRATUM_30115
-CONFIG_QCOM_FALKOR_ERRATUM_1003
-CONFIG_QCOM_FALKOR_ERRATUM_1009
-CONFIG_QCOM_QDF2400_ERRATUM_0065
-CONFIG_SOCIONEXT_SYNQUACER_PREITS
-CONFIG_HISILICON_ERRATUM_161600802
-CONFIG_QCOM_FALKOR_ERRATUM_E1041

Change-Id: Iba5bf9d37ebd2978deff40716091b820ee8d7b5e
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-11 18:56:37 +08:00
Tao Huang
23ae6ba826 arm64: rockchip_defconfig: merge q/android-4.19/android-base.config
https://android.googlesource.com/kernel/configs
commit aa4b4db78846 ("Freeze Q kernel configs")

Change-Id: I95237b25dcad65592fcfca8129f59560ce3cd969
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-11 17:51:28 +08:00
Wyon Bi
09d4b9bcaa clk: rockchip: rk618: fix compile error
Change-Id: I1a185202a062eac73ca5f387487ab3e34dafe664
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-10-11 17:45:57 +08:00
Wyon Bi
8ad7ce2644 mfd: rk618: fix compile error
Change-Id: I9537cfba5afc37df0c450068317962c3d69ecff9
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-10-11 17:45:57 +08:00
Wyon Bi
d2ee17ae9f drm/rockchip: rk618: fix compile error
Change-Id: I959217c605f0edf0db5ec60ebfd4a61c8c58479c
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-10-11 17:45:57 +08:00
Wyon Bi
47516d0bc8 drm/rockchip: drv: Add RGB sub driver
Change-Id: If90932c3f88af2b698267054b13cdbf12c99c25b
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-10-11 17:40:25 +08:00
Wyon Bi
1c8fb1f464 drm/rockchip: rgb: export RGB sub driver
Change-Id: I45014dad9cc378a39122c081570e9420eef67b47
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-10-11 17:40:25 +08:00
Yifeng Zhao
a276487560 soc: rockchip: add some vendor storage id
Change-Id: I333a23c17839ecb3f798e9e2fec0ef3d88537705
Signed-off-by: Yifeng Zhao <zyf@rock-chips.com>
2019-10-11 17:39:03 +08:00
Yifeng Zhao
9821eee3ad drivers: soc: rockchip: disable loader update vi vendor storage
The note /dev/vendor_storage include api to update loader,
this node must config root user access only, but some
project set this node`s owner as bluetooth ,it is a high
risk that the loader data will be corrupted.

Disable this api by default.

Change-Id: I6beb1b3cf51bffebd0ae05368d8c266439a61f91
Signed-off-by: Yifeng Zhao <zyf@rock-chips.com>
2019-10-11 17:39:03 +08:00
Yifeng Zhao
910d9e3f54 dt-bindings: mtd: add Rockchip NAND controller V9 documentation
This patch adds the related dts binding document for Rockchip NAND
controller v9.

Change-Id: I783cb1cd957907744812ace2179bb861e7ca4e63
Signed-off-by: Yifeng Zhao <zyf@rock-chips.com>
2019-10-11 17:39:03 +08:00
Yifeng Zhao
90594ac897 drivers: mtd: nand: add rockchip nandc v9 driver
The nand controller V9 driver for RK3326 and RKPX30.

Change-Id: Ife2190218c29f4ed33def72c092e1fe510c838d0
Signed-off-by: Yifeng Zhao <zyf@rock-chips.com>
2019-10-11 17:39:03 +08:00
Yifeng Zhao
f6c33463b6 dt-bindings: mtd: add Rockchip NAND controller V6 documentation
This patch adds the related dts binding document for Rockchip NAND
controller v6.

Change-Id: Ib2b196d723a29f8aad95f56905a954547bc93e91
Signed-off-by: Yifeng Zhao <zyf@rock-chips.com>
2019-10-11 17:39:03 +08:00
Yifeng Zhao
f96997730d drivers: mtd: nand : add rockchip nandc v6 driver
Change-Id: Id4c0c9aee52e6cd797cc4272b04597ea69b37d61
Signed-off-by: Yifeng Zhao <zyf@rock-chips.com>
2019-10-11 17:39:03 +08:00
Simon Xue
63b187e386 PCI: rockchip: add ref_count for rk_pcie_misc_open/rk_pcie_misc_release
Don't rechanged the params of dma_trx_obj if /dev/pcie-dev be opened more
than one time

Change-Id: Ie73870e12115d091dcd33afa604c8256388b82b9
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2019-10-11 14:49:55 +08:00
Simon Xue
f285dfa7f1 phy: rockchip-pcie: enable each lane when phy_power_on
Change-Id: I9c56ee76f0c1a9c47878113d1d034760af97cc12
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2019-10-11 14:49:30 +08:00
Simon Xue
05099c58ea PCI: rockchip: update rk3399 host driver
1. Delete unused files
2. Add PCIe udma transfer support
3. Use default Max Payload size setting(128 Bytes)
   It's safe to use default Max Payload size setting to support most
   devices

Change-Id: I68b60192a90962e03fe52b907a17234e8567e4b4
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2019-10-11 14:49:30 +08:00
Cai YiWei
6d8ee90e61 media: rk1608: fix power status
Change-Id: I64055faf7fb8bf748a829b4b6de3ede4b3b8a2c8
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2019-10-11 14:45:11 +08:00
Shunqian Zheng
16ee2323d8 media: spi: add mclk for rk1608 driver
RK1608 requires 24M mclk to power on. Some boards(like our
rk1608 board) use external clock source, some are not.

This patch adds 24M mclk reference in rk1608 driver, and
enables it when power on, disables when power off.

Change-Id: I97dc5eeb7c921b53aa2b1edc70926b43a6cc18cd
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
2019-10-11 14:45:11 +08:00