Commit Graph

847525 Commits

Author SHA1 Message Date
Bin Yang
c00cc673bf mfd/fusb302: Add fusb302 suspend/resume functions
We found that the Type-C OTG cable was plugged in while the system
was suspending, it may fail to detect the Type-C OTG cable after
resume. That's because the fusb302 registers will fail to operate
during suspend, this will cause the fusb302 CC logic to be abnormal.
So we should not operate queue_work function while the suspend.

Change-Id: Idc675c25de5452ec39513eb484cfaa75534790cd
Signed-off-by: Bin Yang <yangbin@rock-chips.com>
2019-11-22 15:53:47 +08:00
Zain Wang
52b7a55db3 mfd/fusb302: add input event for Accessory insert
Change-Id: Ifbdbadbb198146f1dc904c33bf9948c4316fc8d5
Signed-off-by: Zain Wang <wzz@rock-chips.com>
2019-11-22 15:53:31 +08:00
Zain Wang
f86fc39e3e mfd/fusb302: Add Type-C Audio Accessory support
Change-Id: I7b7c1fe7ecc30ded6149c3d0d4e1f82ee9cc52c9
Signed-off-by: Zain Wang <wzz@rock-chips.com>
2019-11-22 15:53:19 +08:00
Algea Cao
4d8a1760c1 drm: rockchip: dw-hdmi: Set bus width 8 bits when check mode valid
4.19 kernel will check mode valid before encoder atomic check
when resolution switch. Because when checking mode the
detailed color format and color depth are not considered, some
mode can be mistaken for unsupported, such as 4K-60HZ YUV420 10 bits.
So bus width should be set 8 bits when check mode valid.

Change-Id: I0869868b73060bc0f539243d7fccb6c775141ec4
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2019-11-22 15:27:54 +08:00
Sugar Zhang
bd1d86e5e3 ASoC: codecs: Adds support for conexant cx2072x
Change-Id: I9a0eb611a4e0d861b7d47d4944b93203f823738b
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2019-11-22 15:16:38 +08:00
Weiguo Hu
e63a92198b net: rfkill-bt: control bt host wake when power on bt
some broadcom bt chip need bt host wake is high level when power on,
like ap6356

Change-Id: I509268b84d22b8c17a0996cdd3b2c3e4e05af1bb
Signed-off-by: Weiguo Hu <hwg@rock-chips.com>
2019-11-22 14:54:53 +08:00
Tao Huang
b8f2e67cb1 rk: add scripts/clang-wrapper.py
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ic51c803563c9f32080c7ee93077d22469cb47df5
2019-11-22 12:43:07 +08:00
Tao Huang
591d2512ef ARM: dts: rockchip: rk3126-bnd-d708: fix clang warning
In file included from arch/arm/boot/dts/rk3126-bnd-d708.dts:7:
arch/arm/boot/dts/rk3126-bnd-d708.dtsi:558:38: warning: '/*' within block comment [-Wcomment]
                                /* <2 RK_PB1 1 &pcfg_pull_none>, /* HSYNC */
                                                                 ^

Change-Id: Id05936c12f3cbad6bcbf9ed5a4eacb149e8bc5d4
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-11-22 12:24:51 +08:00
Finley Xiao
6795fd4467 clk: rockchip: add a COMPOSITE_HALFDIV_OFFSET clock-type
The div offset of some clocks are different from their mux offset
and the COMPOSITE clock-type require that div and mux offset are
the same, so add a new COMPOSITE_DIV_OFFSET clock-type to handle
that.

Change-Id: I1c97f7464c3c80ea6dbd7d4052565dd4e35c0931
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-11-22 11:09:39 +08:00
Tao Huang
1470eea92e ARM: rockchip_defconfig: CONFIG_FRAME_WARN=1280
Avoid clang warning:

s/select.c:594:5: warning: stack frame size of 1056 bytes in function 'core_sys_select' [-Wframe-larger-than=]
int core_sys_select(int n, fd_set __user *inp, fd_set __user *outp,
    ^
net/core/ethtool.c:2628:5: warning: stack frame size of 1216 bytes in function 'dev_ethtool' [-Wframe-larger-than=]
int dev_ethtool(struct net *net, struct ifreq *ifr)
    ^

Change-Id: Id2d961993e9823fe74854d33cd24d28869a541ef
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-11-22 10:01:24 +08:00
Tao Huang
e54e597dbf input: touchscreen: vtl_ts: fix clang warning
drivers/input/touchscreen/vtl_ts/vtl_ts.c:52:31: warning: unused variable 'thread_running_flag' [-Wunused-variable]
static volatile unsigned char thread_running_flag =0;
                              ^

Change-Id: Ibaafeff284140a42ccca8a21f455fa5baeb178b6
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-11-22 09:58:11 +08:00
Tao Huang
a280bd69c2 net: wireless: rockchip: rtl8723cs: fix clang warning
drivers/net/wireless/rockchip_wlan/rtl8723cs/os_dep/linux/ioctl_cfg80211.c:3876:20: warning: implicit conversion from enumeration type 'enum mlme_auth_type' to different enumeration type 'enum nl80211_auth_type' [-Wenum-conversion]
                sme->auth_type = MLME_AUTHTYPE_SAE;
                               ~ ^~~~~~~~~~~~~~~~~

MLME_AUTHTYPE_SAE == NL80211_AUTHTYPE_SAE, so this fix is safe.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ia3fc1afc6375cc86168c0d9a744e0817df9614c7
2019-11-22 08:52:42 +08:00
Tao Huang
90ba1072c8 net: wireless: rockchip: rkwifi: fix and ignore clang warning
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I7aa01d20b22673cb29bf65040aa0f6eeaa450043
2019-11-21 21:10:23 +08:00
Tao Huang
2bf8b46e46 net: wireless: rockchip: rtl8723cs: fix and ignore clang warning
drivers/net/wireless/rockchip_wlan/rtl8723cs/os_dep/linux/rtw_cfgvendor.c:177:25: warning: implicit conversion from 'unsigned int' to 'u16' (aka 'unsigned short') changes value from 4718624 to 32 [-Wconstant-conversion]
        kflags = in_atomic() ? GFP_ATOMIC : GFP_KERNEL;
               ~               ^~~~~~~~~~

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I2ade593775f56ef2276ff9e13aed5c0bb70132d6
2019-11-21 21:05:19 +08:00
Tao Huang
3dc9a21f53 net: wireless: rockchip: rtl8822bs: fix and ignore clang warning
drivers/net/wireless/rockchip_wlan/rtl8822bs/os_dep/linux/rtw_cfgvendor.c:177:25: warning: implicit conversion from 'unsigned int' to 'u16' (aka 'unsigned short') changes value from 4718624 to 32 [-Wconstant-conversion]
        kflags = in_atomic() ? GFP_ATOMIC : GFP_KERNEL;
               ~               ^~~~~~~~~~

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I4b648f20f665f563d7af7130d983918ff4889100
2019-11-21 20:59:11 +08:00
Tao Huang
d318496383 video: rockchip: rga2: fix clang warning
drivers/video/rockchip/rga2/rga2_mmu_info.c:326:20: warning: explicitly assigning value of variable of type 'uint32_t' (aka 'unsigned int') to itself [-Wself-assign]
            stride = stride;
            ~~~~~~ ^ ~~~~~~

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I8143bbe53f4e106c6b875e2db562d11240d7de34
2019-11-21 20:56:30 +08:00
Tao Huang
170c6b7522 ARM: rockchip_defconfig: cleanup by savedefconfig
-CONFIG_RTL8188EU=m
-CONFIG_RTL8188FU=m
-CONFIG_RTL8189ES=m
-CONFIG_RTL8189FS=m
-CONFIG_RTL8723BS=m
-CONFIG_RTL8723BU=m
-CONFIG_RTL8723DS=m
-CONFIG_SSV6051=m

Change-Id: I7613337cfa5ceddb4fa4ab56a5c22e93456b00eb
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-11-21 20:56:18 +08:00
Tao Huang
baf14918e4 arm64: rockchip_defconfig: cleanup by savedefconfig
-CONFIG_RTL8188EU=m
-CONFIG_RTL8188FU=m
-CONFIG_RTL8189ES=m
-CONFIG_RTL8189FS=m
-CONFIG_RTL8723BS=m
-CONFIG_RTL8723BU=m
-CONFIG_RTL8723DS=m
-CONFIG_RTL8822BE=m

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Iacd3b8b5452739640a49e80ae608f5292e9f4555
2019-11-21 20:50:04 +08:00
Sugar Zhang
ceea23ef86 ASoC: codecs: Adds support for es8396
Change-Id: I45b01dfa336e88b9eb74e65739fa0ed863c2da90
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2019-11-21 20:46:44 +08:00
Sugar Zhang
77c6f3eb53 ASoC: codecs: Adds support for es8323
Change-Id: I8e0647310eb11325c39ebb408f75cc9ed28df71d
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2019-11-21 20:44:17 +08:00
Sugar Zhang
faaf476d0a ASoC: codecs: Adds support for dummy codec
Change-Id: I86cb74994d49178525e15b61b5056fd3995e904d
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2019-11-21 20:14:27 +08:00
Sugar Zhang
daf07e4866 ASoC: codecs: remove unused codecs
Change-Id: I8ed1e51666c767c8698d6d0a8f647ee64cfa5a02
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2019-11-21 20:14:27 +08:00
Weiguo Hu
5a7879bb74 net: rfkill: coding style fix of rfkill-bt.c and rfkill-wlan.c
Change-Id: I8ccd3623431cad27fabed8241ad8f7bf59b2e175
Signed-off-by: Weiguo Hu <hwg@rock-chips.com>
2019-11-21 19:15:24 +08:00
Simon Xue
0dfd457645 video: rockchip: mpp: re-attach domain if on arm32-arch
on arm32-arch, domain stored in mapping created by arm32-arch,
we need to re-attach when master start to work

Change-Id: I14ae67d0bfa76d2581eebae100ebf6bad15f8614
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2019-11-21 19:10:39 +08:00
Simon Xue
b2141a00d2 iommu: dma: fix iommu mapping issue on ARM32
1. select ARM_DMA_USE_IOMMU only ARM32

2. fix iova hole
   __alloc_iova will return un-continuous va if align non-zero

3. don't break iommu_attach_device
   iommu_attach_device will break if iommu shared by two or more
   masters

Change-Id: Ifd1c652341e2270bfde57ebe1e0cd00d51d38eec
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2019-11-21 18:44:08 +08:00
Huibin Hong
89f86b7101 ARM: dts: rockchip: add en 2t mode for rk3128
Disable it default, because we found it is unstable when using
some ddr chip.

Change-Id: Iffd98a0f5ab9c9256ec9a1450ce105a5b7f6127b
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2019-11-21 18:37:59 +08:00
Huibin Hong
e89f34170a drivers: devfreq: rockchip_dmc: rk3128: add en 2t mode
Change-Id: I27e0ae7397cf4693c64d37ae1c5f7702b48863b9
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2019-11-21 18:37:59 +08:00
Ding Wei
a211b64397 video: rockchip: mpp: update grf_info read from dtsi
Change-Id: Ie2e66ef87d76eb79a6dd34439633beb6226b0d70
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2019-11-21 16:09:59 +08:00
Elaine Zhang
ccf87a15a5 clk: rockchip: rk3328: Update the h264 and h265 clocks
fixed up the h264 and h265 clk tree change:
old:
aclk_rkvenc-->
        --> aclk_h265
        --> aclk_h264
        --> aclk_axisram
        --> hclk_rkvenc -->
       		 --> hclk_265
                 --> hclk_264
new:
sclk_venc_core-->
	--> aclk_h265
	--> aclk_h264
	--> aclk_axisram
	--> hclk_venc -->
		 --> hclk_265
		 --> hclk_264

Change-Id: I3d4b61fe545ecfc2353cb2993245fc813739084a
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-11-21 15:00:14 +08:00
Fenrir Lin
2fe68cb77a ASoC: rockchip: Adds config for i2s-tdm
This patch adds Kconfig option for i2s-tdm controller

Change-Id: I428e311402220ff14441c48e13fa51356ced46e8
Signed-off-by: Fenrir Lin <fenrir.lin@rock-chips.com>
2019-11-21 10:09:50 +08:00
Fenrir Lin
9e6dcf44e3 ASoC: rockchip: Adds config for multicodecs machine driver
This patch adds Kconfig for multicodecs machine driver.

Change-Id: I77d3e9c10d03c2b8809c6d82b5268dba279ee6f0
Signed-off-by: Fenrir Lin <fenrir.lin@rock-chips.com>
2019-11-21 10:09:25 +08:00
Fenrir Lin
f2bb3ebc78 ASoC: rockchip: add support for rk3308 codec
This patch replace codec to component.

Change-Id: Ieccdebaa27f4a46f6de9406046a6e02e20398013
Signed-off-by: Fenrir Lin <fenrir.lin@rock-chips.com>
2019-11-21 10:09:09 +08:00
Grey Li
822e7c2530 video: rockchip: mpp: fix error when mpp_dev_reset
If the power domain of iommu is not change, it will be
return when iommu attach. So there must refresh pm_runtime
for iommu really attach.

Change-Id: I0c8443bd7b9c640c24c23af1693261930144674b
Signed-off-by: Grey Li <grey.li@rock-chips.com>
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2019-11-21 09:18:23 +08:00
Shengfei Xu
0c1f8a7449 power: rk817_charger: support otg device get power from DC
Change-Id: I9490dc97edaf64b9d3264c0a8a0988ff1ea9d25f
Signed-off-by: Shengfei Xu <xsf@rock-chips.com>
2019-11-20 17:50:36 +08:00
Finley Xiao
a94728873c arm64: dts: rockchip: rk3399-ind: enable dmc auto-freq
Change-Id: I89a694a781e09847343be7fdbbec720eb680fc6d
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-11-20 17:34:16 +08:00
Meiyou Chen
0b11a4a681 ASoC: rockchip: rename rt5651_tc358749x to rt5651
Change-Id: I2f6aba01a0d80f45a527e1c1bb680d8b68d98b2a
Signed-off-by: Meiyou Chen <cmy@rock-chips.com>
2019-11-20 17:05:19 +08:00
Meiyou Chen
438f0da00a arm64: dts: rockchip: rk3399-sapphire-excavator-edp: remove tc358749x DAI
Change-Id: I1b5dc6282e5351a29d26f9c82f630292267df4d8
Signed-off-by: Meiyou Chen <cmy@rock-chips.com>
2019-11-20 17:04:38 +08:00
Meiyou Chen
0db43c9197 ASoC: rt5651: remove tc358749x DAI
Change-Id: Ia4d60491bc3e49616e24df2868120372f40ff905
Signed-off-by: Meiyou Chen <cmy@rock-chips.com>
2019-11-20 17:04:20 +08:00
Ding Wei
36c02844b6 video: rockchip: mpp: fix error when alloc_task failed
When alloc task failed, it must return NULL instead of the PTR_ERR.

Change-Id: I309e934badd0c88a66beccbb8f03096f1eb91745
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2019-11-19 21:53:25 +08:00
Sugar Zhang
35728f6644 ASoC: codecs: Adds support for rk3228 codec
- replace codec to component
- convert to SPDX identifiers

Change-Id: Icf83257726f12558cbdde4d4b2876dc8a3123626
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2019-11-19 20:15:22 +08:00
Sugar Zhang
34f6429ad2 ASoC: codecs: Adds support for rk1000 codec
- replace codec to component
- convert to SPDX identifiers

Change-Id: I025415287f8436d5672b8f1f8d81d87c8273772a
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2019-11-19 20:12:34 +08:00
Jon Lin
a51866a6c5 arm: dts: rv1108: add nandc node
Change-Id: I34a1c10ada37b0473eb78d6daf650f1c152724d1
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2019-11-19 20:06:53 +08:00
Bian Jin chen
2b3a59ee72 net: rockchip_wlan: rtl8822bs: fix clang compile error
drivers/net/wireless/rockchip_wlan/rtl8822bs/core/rtw_debug.c:45:44: error: expansion of date or time macro is not reproducible [-Werror,-Wdate-time]
        RTW_PRINT_SEL(sel, "build time: %s %s\n", __DATE__, __TIME__);

Change-Id: I9f786a4305e668dac97d527baac4e948b53332ed
Signed-off-by: Bian Jin chen <kenjc.bian@rock-chips.com>
2019-11-19 19:27:07 +08:00
Ding Wei
316a8ec31a ARM: dts: rockchip: rk312x: dtsi for video codec
Change-Id: I911f413d05a7ca10eeb7abbb808cc3165b6a56bc
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2019-11-19 16:54:39 +08:00
Zhou Jing
d30a7f302e ARM: rockchip_defconfig: add video codec configs
add configs:
    CONFIG_ROCKCHIP_MPP_RKVDEC
    CONFIG_ROCKCHIP_MPP_VDPU1
    CONFIG_ROCKCHIP_MPP_VDPU2
    CONFIG_ROCKCHIP_MPP_VEPU1
    CONFIG_ROCKCHIP_MPP_VEPU2

Signed-off-by: Zhou Jing <tracy.zhou@rock-chips.com>
Change-Id: I3ccf676986e737e40ff9713c47f0500ac95987b1
2019-11-19 16:21:25 +08:00
Zheng Yang
28566d7a06 drm/bridge: synopsys: dw-hdmi: fix kernel logo flash when output YCbCr422 mode
On rockchip platform, hdmi input format is YCbCr444 when output mode
is YCbCr422. Then the value of HDMI_TX_INVID0 on YCbCr422 is same as
the value of YCbCr444, both is 0x09/0x0b. This make enc_out_bus_format
stroed in struct hdmi_data is wrong, which is MEDIA_BUS_FMT_YUV8_1X24
or MEDIA_BUS_FMT_YUV10_1X30.

When android set enc_out_bus_format to YCbCr422, dw_hdmi_setup will be
called and logo will flash.

This patch use colorspace restored in HDMI_FC_AVICONF0 to distinguish them.

Change-Id: I6b913951b58fb47628617c11d6059bc1be4e370a
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2019-11-19 16:18:14 +08:00
Zheng Yang
7ef4b6eef9 drm: bridge: dw-hdmi: fix VP_PR_CD pixel repetition factor configuration
The configured value sets H13T PHY PLL to multiply pixel clock by the
factor in order to obtain the desired repetition clock. For the CEA
modes some are already defined with pixel repetition in the input video.
So for CEA modes this shall be always 0.

Change-Id: Iea4a00247f25c134dbd67ba77c00eb4393622385
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2019-11-19 16:18:14 +08:00
Alex Zhao
978ed0fdc2 net: rockchip_wlan: rtl8723cs: fix VTS test fail
update rtl8723cs wifi driver to version v5.7.1.3_35649.20191114_beta

Change-Id: Ic8991add439050919284ba53c49ba2469055450a
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
2019-11-19 15:58:49 +08:00
Alex Wang
c51f92a9ae arm64: rockchip_defconfig: add wifi config: CONFIG_RTL8822BS
Change-Id: I982f8629451c1e628959cd8cb084eb27bc5c4b7b
Signed-off-by: Alex Wang <alex.wang@rock-chips.com>
2019-11-19 15:54:14 +08:00
Guochun Huang
7dd63e4010 drm/rockchip: calculate lanes and rate for Main Link Lanes
the numbers and rate of Main Link lanes depend on
the panel display resolution and corlor depth, it
is recommended that the minimum number of lanes be
used, using the minimum link rate allowed for that
lane configuration.

Change-Id: Id207410589e1f77ebff79615f3367f153a9b2755
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2019-11-19 15:53:27 +08:00