Commit Graph

1059073 Commits

Author SHA1 Message Date
Sugar Zhang
c04fccadeb ASoC: codecs: Adds support for dummy codec
Change-Id: I86cb74994d49178525e15b61b5056fd3995e904d
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-07-22 20:09:53 +08:00
Fenrir Lin
c747e1405d ASoC: codecs: add support for rk3308 codec
This patch adds driver support for rk3308 codec.

Change-Id: Ieccdebaa27f4a46f6de9406046a6e02e20398013
Signed-off-by: Fenrir Lin <fenrir.lin@rock-chips.com>
2021-07-22 20:07:51 +08:00
Sugar Zhang
8b34d69e04 ASoC: codecs: Adds support for rk3228 codec
This patch adds driver support for rk3228 codec.

Replace digital_mute with mute_stream

Change-Id: Icf83257726f12558cbdde4d4b2876dc8a3123626
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-07-22 20:07:51 +08:00
Sugar Zhang
bf3d673e19 ASoC: codecs: Adds support for rk1000 codec
This patch adds driver support for rk1000 codec.

Replace digital_mute with mute_stream

Change-Id: I025415287f8436d5672b8f1f8d81d87c8273772a
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-07-22 20:07:51 +08:00
Chen Jinsen
673d6ade78 ASoC: codecs: add support for rk312x codec
Replace digital_mute with mute_stream
Replace xxx_dai with asoc_rtd_to_xxx(rtd, i)

Change-Id: I1679742e7f6abb4ad9d894828ddf3781fc1bc2bb
Signed-off-by: Chen Jinsen <kevin.chen@rock-chips.com>
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-07-22 20:07:51 +08:00
Shunhua Lan
747c40808e ASoC: codecs: add support for rk817 codec
Replace digital_mute with mute_stream
Replace xxx_dai with asoc_rtd_to_xxx(rtd, i)

Change-Id: If8c5ce04703b94f7eb91e61efeab6bf7dcfca7ff
Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-07-22 20:07:51 +08:00
Chris Zhong
e6b76f4bfd ASoC: es8328: Enabling support for 12Mhz sysclk
Change-Id: If9dea6039ab562023c81c2394c9286b7adc4a8c5
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
2021-07-22 20:07:51 +08:00
Shunhua Lan
1c52e7b106 ASoC: rt5651: Porting to rockchip platform
1 add mclk control
2 add speaker amplifier control

Replace digital_mute with mute_stream

Change-Id: Ib3c03cd281f1ebf4d6d583076bd3930bbe3b3fe0
Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-07-22 20:07:51 +08:00
LuoXiaoTan
46a4d57719 ASoC: rt5651: add alc5651 ASRC switch for HDMIIn
Change-Id: I447228656d5ee56b2c4b04c515ad71f34e107ba0
Signed-off-by: LuoXiaoTan <lxt@rock-chips.com>
2021-07-22 20:07:51 +08:00
Shunhua Lan
05a036ae33 ASoC: rt5640: enable MICBIAS1 when recording from mic
Change-Id: I7dd50309618835f712f85408e2281f7bd5e8b6b1
Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
2021-07-22 20:07:51 +08:00
Xu Jianqun
a5450c1b3c ASoC: rt5640: make rt5640 driver enable to be selected
Change-Id: I4600f79220ab4faf7bfde1cb75b7fbe7b5fef747
Signed-off-by: Xu Jianqun <jay.xu@rock-chips.com>
2021-07-22 20:07:51 +08:00
Xing Zheng
7c878cc62f ALSA: aloop: using raw cycles and jiffies
The system tick may be modified by NTP when we connect
with network, then  jiffies have an offset compared to
the local clock, it will cause the irq_pos / delta_play /
delta_capt also be inaccurate.

Therefore, we need a way to get raw jiffies which follows
local raw clocks.

Change-Id: I9be1790dfd98e430982dad6f03b04532889279a6
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2021-07-22 18:48:37 +08:00
wjh
7aac3b4eef ALSA: usb-audio: fix disvr usb Audio bug
The disvr usb audio sampling rate is through nanoc reported to
the kernel, so don't need the kernel again set the sampling rate.

Change-Id: I60409fc579952a196c4fe40f678e87d505a7508d
Signed-off-by: wjh <wjh@rock-chips.com>
2021-07-22 18:48:37 +08:00
lanshh
45c518d6ca ALSA: usb-audio: add USB ID for nanoc audio codec
Change-Id: I3c25691a74c9cf66e587fd4a5dcb6cef46040eec
Signed-off-by: lanshh <lsh@rock-chips.com>
2021-07-22 18:48:37 +08:00
Yu Qiaowei
d66a00298b video/rockchip: rga2: adapt to kernel 5.10
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Id7854aaa8bf39c272d9e29f721e38d49d2222727
2021-07-22 16:30:36 +08:00
Tao Huang
d0b4efe685 arm64: rockchip_gki.config: Enable CONFIG_COMMON_CLK_ROCKCHIP as module
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ia371614ffa0a0954f0945753922755c03590c509
2021-07-22 16:08:56 +08:00
Elaine Zhang
37db30fb9d clk: rockchip: support common clks driver build as tristate module
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: Id3e2ea425ce4ad59848ce537f239fba4f135fb78
2021-07-22 16:08:56 +08:00
Elaine Zhang
3151edc8a4 clk: rockchip: Avoid __clk_lookup() calls
clk pointer gets cached in the driver's private data and
can be used later instead of a __clk_lookup() call.

clk provider clk_data.clks[] and we can reference
the clk pointers directly rather than using __clk_lookup()
with global names.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I058413a912e0eaf5bf551d2515ad55ae28709985
2021-07-22 16:08:56 +08:00
Elaine Zhang
938e2f2261 clk: rockchip: drop use of rockchip_clk_protect_critical()
Rockchip common clocks to support GKI,
Avoid __clk_lookup() calls,so needed to replace the
rockchip_clk_protect_critical, and use the flag
CLK_IS_CRITICAL.(but use flag CLK_IS_CRITICAL,
the enable count is always "0")

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: Idfccd72db2abe43d5f3236e7bd065873b62279ea
2021-07-22 16:08:56 +08:00
Yu Qiaowei
ae9dcc9b51 video/rockchip: rga2: Add format support
Add BGR565/BGRA5551/BGRA4444.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I248c739d96afa2ec65a7092c7b584fb4730fb0f3
2021-07-22 11:06:34 +08:00
Yu Qiaowei
afe21ac330 video/rockchip: rga2: Modify blend formula
The maximum alpha is 255, but after the product of color and alpha
in the blend formula, the final result is >> 8 (/256) instead of
/255, which will introduce errors.
This fix is that when alpha is 0x80~0xff, then +1.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Ibba964f29a11eb226aa008a0dd5bf89048524b43
2021-07-22 11:06:34 +08:00
Yu Qiaowei
d9a8656672 video/rockchip: rga2: Fix the initialization of RGA2 version number
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Ib66a7c09def302ce7ad3c2bbff9be9946175c4c6
2021-07-22 11:06:34 +08:00
Yu Qiaowei
11dc8266de video/rockchip: rga2: Add support for full csc (RGB2YUV/YUV2YUV).
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I72fcbc85a5bc24357d64579dd56b8a20715e59bc
2021-07-22 11:06:34 +08:00
Yu Qiaowei
fd4c04f35d video/rockchip: rga2: support Y400 input.
By making the Y channel and the UV channel's access address equal,
the function of RGA input grayscale image is realized, without
need to allocate extra UV channel memory.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I0110ec6935c7233905e724be3df9f4fba9ef8cf0
2021-07-22 11:06:34 +08:00
Yu Qiaowei
f8a2033273 video/rockchip: rga2: Add new features in compat_ioctl.
Some features are not updated to compat_ioctl, so add them.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Id89a0826a4125af97398200f7ce6e3cc73de4342
2021-07-22 11:06:34 +08:00
Yu Qiaowei
011fb8af04 video/rockchip: rga2: Fix the wrong judgment of err_get_sg.
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Iec9ac3492642bb00e212b9c2862bf9fa1d8a964c
2021-07-22 11:06:34 +08:00
Yu Qiaowei
0bc139188f video/rockchip: rga2: Fix YUV output error.
Fix some modes that did not set the U/V address and
cause the output error of the YUV format image.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I41abd364576e0a73fd501f3dfc726eeaa6c9b118
2021-07-22 11:06:34 +08:00
Yu Qiaowei
ae24d87219 video/rockchip: rga2: Support 8G DDR.
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I2583cd7f96362803fd57a25f42aad21e23e837d4
2021-07-22 11:06:34 +08:00
Yu Qiaowei
190b684905 video/rockchip: rga2: Support 8K resolution.
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Icf7a3aa835560abab1b7d6981952aa1534a4f694
2021-07-22 11:06:34 +08:00
Tao Huang
e59ba88fc6 soc: rockchip: cpuinfo: system_serial_high/low depends on CONFIG_NO_GKI
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I14ff92773131360d933c288b82894a2f41a0c2ef
2021-07-21 19:28:10 +08:00
Elaine Zhang
2e0cbf871b clk: rockchip: rv1126: support driver build as tristate module
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: Ic2607451680d7ba07999e9d18e962005bc92f31a
2021-07-21 10:55:11 +08:00
Tao Huang
6fbbbac945 arm64: rockchip_gki.config: Enable CONFIG_RK_NAND
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ic5424e6ce43ad55b4b152b91f4fb98b87188727b
2021-07-20 20:01:15 +08:00
Yifeng Zhao
e2febb290f drivers: rk_nand: enable rk nand flash support
Here a short summary of the changes:
- Modify the definition of proc ops
- Support mq
- Remove mtd partition support
- Add an independent GC thread to do garbage collection in idle time
- Remove some apis that are no longer used

Change-Id: I2ea7fe6218b32666b91fce54bc17f976feb7f4d2
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
2021-07-20 20:01:10 +08:00
Bian Jin chen
cdbd84b757 rk: .gitignore: ignore lds files.
Fixes: 27eb5ffcb7 ("ANDROID: Add missing CFI jump table symbols to kallsyms")
Signed-off-by: Bian Jin chen <kenjc.bian@rock-chips.com>
Change-Id: Ib688ea9db0d434d110d12b893235dedc60e458eb
2021-07-20 19:58:52 +08:00
Yandong Lin
6d15ea1ac3 video: rockchip: mpp: adapt to kernel 5.10
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ie34b851e57c4f80c798117cea026cf7255859423
2021-07-20 19:00:04 +08:00
Huibin Hong
f7382476af serial: 8250: add /dev/ttySx when uart is enable
before the patch:
ls /dev/ttyS
ttyS0 ttyS1 ttyS2 ttyS3 ttyS4 ttyS5  ttyS6 ttyS7

after the patch:
ls /dev/ttyS
ttyS3  ttyS4  ttyS6

Change-Id: I844523408751cb579bbfb50fafb7923d5c2cafdf
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2021-07-20 18:44:49 +08:00
Finley Xiao
987c3373f8 cpufreq: governor: userspace: Fix frequency error when resume
As policy->cur may be changed by thermal and cpufreq_suspend,
the setspeed may be changed after resume.

Change-Id: I6d4e0672ff39127c522f305719afd52806c31f48
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2021-07-20 18:10:44 +08:00
Finley Xiao
d58bcc8c2b soc: rockchip_system_monitor: Add support to limit volt during system startup
Now a regulator device can supply multiple consumers at the same time,
if a consumer starts and set a low voltage, another consumer doesn't
start in kernel but has been set a high frequency in bootloader will
abort.

This patch implements the same function as the commit
d712e9b8d5 ("regulator: core: Add support to limit min_uV during system startup")
in 4.19.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I3266d120c1b9327248a509196c0c32a26c0c355e
2021-07-20 17:58:25 +08:00
Finley Xiao
b3ad66a371 regulator: debugfs: Adding debugfs functions into regulator framework
This change allows the user to read and edit regulator information
in user space through the debugfs file system.

Base on msm work.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I038d2ad43ece4ed927db1ff36c7d1a644c1cf3d1
2021-07-20 16:58:43 +08:00
Andy Yan
e9881c87d7 drm/rockchip: vop2: fix hdr delay number setting when port_mux is not at last
HDR window is fixed(not move in the overlay path with port_mux change)
and is the most slow window. And the bg is the fast. So other windows
and bg need to add delay number to keep align with the most slow window.
The delay number list in the trm is a relative value for port_mux set at
last level.

Change-Id: I731b909c0a3f483be081e16610536b4ce5b9b8b0
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-07-20 16:48:22 +08:00
Andy Yan
355191f0e3 drm/rockchip: vop2: Disable all other multi area when disable area0
When area0 is disabled, all other sub multi area must be
disabled, or the win may run into unexpected situlation:
such as post_buf_empty or iommu fault.

Change-Id: I8a92e45849cfc31af029ba0e86562751be92ddbd
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-07-20 16:48:12 +08:00
Andy Yan
e1c6772ef9 drm/rockchip: vop2: No register mirror win when only one vp used
when only one vp(crtc) is registered to drm, all the
plane->possible_crtc will be force set to this crtc.
this make current hwc think that all these planes can be
assigned to this crtc, but the mirror plane(rk3566 feature)
cant't be activated on the same crtc with source plane.

So if some boards only use one vp(crtc), don't register
mirror plane.

Change-Id: Ib25246cf44a0fc4caf98e7c6d21ebba18f1a6c88
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-07-20 16:47:59 +08:00
Sandy Huang
23110bdcf0 drm/rockchip: vop2: rk356x three vp share one gamma
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Iddaf85a902feaa1c2a6004a1b8c2f419135cd039
2021-07-20 16:47:28 +08:00
Sandy Huang
4d56f3cc51 drm/rockchip: vop2: Add vcnt event
Change-Id: If00eeee975d8f073d27ae584c096e6a7de1df95b
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2021-07-20 16:41:43 +08:00
Sandy Huang
c0b956d7c7 drm/rockchip: drv: Add vcnt event
The vcnt event is similar to vblank event, but userspace can set the
time(which scan line) when the event occur.

This add a new event type: DRM_EVENT_ROCKCHIP_CRTC_VCNT userspace create
this event by ioctl DRM_IOCTL_ROCKCHIP_GET_VCNT_EVENT

Change-Id: If3da4bb29469ac7dc379e9462994aeda3202d3d2
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2021-07-20 16:22:24 +08:00
Sandy Huang
2e79c5086d drm/rockchip: drv: add open/close function
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I5adad7f8ac7a03391c08b53ef8a931086520f2e9
2021-07-20 16:09:20 +08:00
Sandy Huang
e2355b4b8b drm/rockchip: drv: add iommu fault handler
move rockchip_register_crtc_funcs/rockchip_unregister_crtc_funcs
position by the way for easy to compare with linux 4.19

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I7959f654d9a0d3ea24bb747446f36c649797e2e0
2021-07-20 16:09:16 +08:00
Sandy Huang
4f8318d63e drm/rockchip: drv: add rockchip_drm_get_sub_dev_type
before this commit, the DMC driver use drm_device_get_by_name() to get drm
connector info, now we use rockchip_drm_get_sub_dev_type() to instead of
it.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ief6546d933fbb49e46e6e8d2a99464eb5951e069
2021-07-20 14:52:51 +08:00
Sandy Huang
b441d298c9 drm/rockchip: drv: add rockchip_drm_add_modes_noedid
rockchip_drm_add_modes_noedid() used to get the following
recommend modes at rockchip platform when get edid failed:

the recommend modes is: 480p60, 576p50, 720p50, 720p60, 768p60,
1080p50, 1080p60 and 720p60 is the preferred mode.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I9c82b3949506a616e8c98bfa2d77532bdb870390
2021-07-20 14:52:51 +08:00
Sandy Huang
a430ff906a drm/rockchip: gem: Add GEM create ioctl support
Rockchip Socs have GPU, we need allocate GPU accelerated buffers.
So add special ioctls GEM_CREATE/GEM_MAP_OFFSET to support
accelerated buffers.

Change-Id: Ia4b13798aac97d16214da7a75a2479e6e334313a
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2021-07-20 14:52:51 +08:00