Commit Graph

645569 Commits

Author SHA1 Message Date
Evoke Zhang
f790c9bed5 lcd: add retry flow to ensure power on state
PD#166330: mipi panel status is incorrect sometimes when lcd enable

Change-Id: Iace4963e576752208815d672befa4e215f860097
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
2018-05-16 02:40:56 -07:00
Weiming Liu
556215ab62 lcd: premote a common lcd_extern_i2c_probe
PD#164139: lcd: premote a common lcd_extern_i2c_probe

premote a common lcd_extern_i2c_probe() function,
so it will be shared by various display controller IC

Change-Id: I47638520f32a0865829a1fd776c3a9ca626798ba
Signed-off-by: Weiming Liu <weiming.liu@amlogic.com>
2018-05-16 02:39:26 -07:00
MingLiang Dong
17d1b73f7a amvecm: fix G12A eye protect function unused
PD#165151: amvecm: fix G12A eye protect function unused

1. G12A use post matrix as wb adjust module
2. fix 905x eye protect function bug

Change-Id: Ic161cafbb455cf278283d20ef9d93f18c07f5811
Signed-off-by: MingLiang Dong <mingliang.dong@amlogic.com>
2018-05-16 02:23:03 -07:00
Jianxin Qin
110731404c usb: phy2: analog tuning for aml-phy
PD#164286: usb: phy2: analog tuning for aml-phy

Packet lost occures with high probability in High Speed mode, This patch
re-configurate PHY parameters for improving this issue.

Change-Id: If51d300a01d8c30dce27454ad887a0d14f2d1e52
Signed-off-by: Jianxin Qin <jianxin.qin@amlogic.com>
2018-05-16 01:08:45 -07:00
Ao Xu
21b537a651 script: amlogic: add code scan script
PD#166377: script: amlogic: add code scan script

Add code scan script.

Usage: ./script/amlogic/code_scan.sh [path]

Examples:
	# scan all code
	./script/amlogic/code_scan.sh

	# scan specified directory
	./script/amlogic/code_scan.sh drivers/amlogic

scan result is in src code's parent directory, named coverity_html

Change-Id: I069cd99d08014cc50a3bf127e199690649e196c8
Signed-off-by: Ao Xu <ao.xu@amlogic.com>
2018-05-16 01:02:03 -07:00
yicheng shen
bf188aa05d hdmirx: fixed the pink screen issue when connect with roku box
PD#165686: hdmirx: fixed the pink screen issue when connect with roku box

Change-Id: Ia1723b9e88bcf7dd0773bc301301e682d35a9c5c
Signed-off-by: yicheng shen <yicheng.shen@amlogic.com>
2018-05-16 00:54:12 -07:00
hongmin hua
86d7bfd6fa cec: add err initiator int for cec error [2/3]
PD#163965: cec: add err initiator int for cec error

Change-Id: I7a10f4d6a90d2e3a15ec3ed969735aadb230db43
Signed-off-by: hongmin hua <hongmin.hua@amlogic.com>
2018-05-16 00:05:03 -07:00
shuze.ma
00a2de0827 hdmitx: update hdmi phsycial size during hotplug [1/1]
PD#163001: update hdmi phsycial size during hotplug

Change-Id: I71e863c56abbe5ae8dd151de481b1465317cebf1
Signed-off-by: shuze.ma <shuze.ma@amlogic.com>
2018-05-15 20:05:08 -07:00
Xingyu Chen
b65a914943 arm64: dts: txlx: adjust the position of saradc node
PD#165196: arm64: dts: txlx: adjust the position of saradc node

In order to compatible with the saradc driver in uboot, the node
must be placed in the /{}.

Change-Id: I135a89866249b23b89f466699ecdb8cd7f21db82
Signed-off-by: Xingyu Chen <xingyu.chen@amlogic.com>
2018-05-15 18:55:10 -07:00
yicheng shen
89905942e2 hdmirx: add new atmos edid handle method
PD#164867: hdmirx: add new atmos edid handle method

Change-Id: I03865be263d195b3b38bf782bd52b992e2084c71
Signed-off-by: yicheng shen <yicheng.shen@amlogic.com>
2018-05-15 04:52:43 -07:00
Mark Rutland
d1a183b101 arm64: cpufeature: Pass capability structure to ->enable callback
PD#166068: arm64: cpufeature: Pass capability structure to ->enable callback

Fix CPU-hotplug fail to bringup issue once stopped CPU.

From: Will Deacon <will.deacon@arm.com>

commit 0a0d111d40 upstream.

In order to invoke the CPU capability ->matches callback from the ->enable
callback for applying local-CPU workarounds, we need a handle on the
capability structure.

This patch passes a pointer to the capability structure to the ->enable
callback.

Change-Id: I2c002dfbba4e923d0e44ab085ede46e6f47c9755
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Mark Rutland <mark.rutland@arm.com> [v4.9 backport]
Tested-by: Greg Hackmann <ghackmann@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Yixun Lan <yixun.lan@amlogic.com>
2018-05-15 04:22:05 -07:00
Mark Rutland
484099ffe9 arm64: cpufeature: __this_cpu_has_cap() shouldn't stop early
PD#166068: arm64: cpufeature: __this_cpu_has_cap() shouldn't stop early

From: James Morse <james.morse@arm.com>

Fix CPU-hotplug fail to bringup issue once stopped CPU.

commit edf298cfce upstream.

this_cpu_has_cap() tests caps->desc not caps->matches, so it stops
walking the list when it finds a 'silent' feature, instead of
walking to the end of the list.

Prior to v4.6's 644c2ae198 ("arm64: cpufeature: Test 'matches' pointer
to find the end of the list") we always tested desc to find the end of
a capability list. This was changed for dubious things like PAN_NOT_UAO.
v4.7's e3661b128e ("arm64: Allow a capability to be checked on
single CPU") added this_cpu_has_cap() using the old desc style test.

Change-Id: I29788b05eb636de777de5d4f423097804d465a7b
CC: Suzuki K Poulose <suzuki.poulose@arm.com>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Mark Rutland <mark.rutland@arm.com> [v4.9 backport]
Tested-by: Greg Hackmann <ghackmann@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Yixun Lan <yixun.lan@amlogic.com>
2018-05-15 04:21:16 -07:00
Jihong Sui
d9e5bb5cc1 hdr: fix the bug that sdr can't switch to hdr for g12a
PD#166004: hdr: fix the bug that sdr can't switch to hdr for g12a

Change-Id: Ia7c14f86d63aa8b00617c47abad14e2eab96d2f6
Signed-off-by: Jihong Sui <jihong.sui@amlogic.com>
2018-05-15 02:14:03 -07:00
Hong Guo
b1afe9a41a arm64: dts: g12a: add cpufreq 1.92G.
PD#165143: cpufreq: add cpufreq 1.92G.

Change-Id: I8b9dddf8c4c138bf4b5763f707c174ad48e8a53a
Signed-off-by: Hong Guo <hong.guo@amlogic.com>
2018-05-15 02:13:24 -07:00
bin pang
27336a865c audio: add 16K mic aux and 32bit feature
PD#164543: audio: 16K mic aux and 32bit support[2/2]

Change-Id: I7e19374cae45821c6189c60eff4b1e2d872ba4c6
Signed-off-by: bin pang <bin.pang@amlogic.com>
2018-05-15 00:58:54 -07:00
Jian Hu
af5ce8ab69 arm64: dts: g12a: add default drive strength for i2c controllers
PD#165715: arm64: dts: g12a: add default drive strength for i2c controllers

Change-Id: I4d909e25d08fa29ac6ebdf756af76bef86bf0bf6
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
2018-05-14 23:51:08 -07:00
nengwen.chen
9625dc1c42 atv_demod: Add atv color and sound system setting separately [7/8]
PD#165560: Add atv color and sound system setting separately.

Change-Id: I8279143706ddfd705bce95c3f40f701ae9af7829
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
2018-05-14 06:47:30 -07:00
Huan Biao
c2ed0f2264 thermal: fix thermal issue
PD#166068: thermal: fix cpu cooldev work issue and gpupp not match

Change-Id: I26f4626b309cad984e59f3c2f30eb60f1ec5121b
Signed-off-by: Huan Biao <huan.biao@amlogic.com>
2018-05-14 17:33:53 +08:00
Zhuo Wang
3f1189a31d ethernet: bypass wol_reg12 check when 10M
PD#166287: 10M wol_reg12 error

Change-Id: I1b9bd412786509d2a4889c58ef634f6391b54e9e
Signed-off-by: Zhuo Wang <zhuo.wang@amlogic.com>
2018-05-14 00:54:37 -07:00
Jihong Sui
ad89d594a7 dtv_demod: modified dtv demod
PD#165971: dtv_demod: modified dtv demod

1. change folder name(amldemod ->dtv_demod);
2. set status 0 when not support;

Change-Id: I96c23b0b333ee0967d5013ebc8915fdffa097433
Signed-off-by: Jihong Sui <jihong.sui@amlogic.com>
2018-05-14 14:16:55 +08:00
Jian Xu
be86cef171 Merge "audio: add audio spdif format kcontrol [1/2]" into amlogic-4.9-dev 2018-05-11 07:39:17 -07:00
Brian Zhu
f5f991e58c vpp: fix the bypass pps condition for non-linear scaler
PD#164896: vpp: fix the bypass pps condition for non-linear scaler

Change-Id: Ie4e30499b6fe12253da52194d2b89002faf28bd2
Signed-off-by: Brian Zhu <brian.zhu@amlogic.com>
2018-05-11 05:20:38 -07:00
Hang Cheng
ccdf0e8a94 hdmirx: optimize for cases do hdcp1.4 interaction very early
PD#165229: hdmirx: optimize for cases do hdcp1.4 interaction very early

Change-Id: I8b07c2f1be524eed47bde77681c3724b110db618
Signed-off-by: Hang Cheng <hang.cheng@amlogic.com>
2018-05-11 02:09:49 -07:00
Sandy Luo
5b2aa87573 dts: g12 socket: change max freq
PD#164108: change max freq to 2G Hz

Change-Id: I6ccb051485ee2ff04ddb6558a63340cd52151464
Signed-off-by: Sandy Luo <sandy.luo@amlogic.com>
2018-05-11 16:41:34 +08:00
Zhe Wang
efbe77bad0 audio: add audio spdif format kcontrol [1/2]
PD#165552: add audio spdif format kcontrol

1) remove drc control for ground noise
2) fast attrack for volume
3) add spdif format kcontrol

Change-Id: I3b4574170d808dd7fe955d249e3414880285eb3e
Signed-off-by: Zhe Wang <Zhe.Wang@amlogic.com>
2018-05-11 14:56:00 +08:00
Yixun Lan
77768fda23 debug: drop sscanf, use kstrto variant instead
PD#165796: debug: drop sscanf, use kstrto variant instead

kstrto is kernel reconmmend function which is more safe than sscanf
this will also fix the following checkpatch.pl warning

WARNING: Prefer kstrto<type> to single variable sscanf
+       ret = sscanf(buf, "%ld", &val);

Change-Id: I9a4673b9aa43c10f51a20778ba520461ee0a7984
Signed-off-by: Yixun Lan <yixun.lan@amlogic.com>
2018-05-11 14:21:50 +08:00
Lei Qian
bf91668e9c hdmirx: fix deadlock issue
PD#164867: fix deadlock issue

Revert "hdmirx: add new atmos edid handle method"

This reverts commit 6bf27f9a5a.

Change-Id: Ica0d99c9b4b3f05ccb86c85693c5cc4d2871bd7a
Signed-off-by: Lei Qian <lei.qian@amlogic.com>
2018-05-10 21:32:37 +08:00
Nian Jing
9eef6844fe cvbs: cvbs performance for g12a Rev.B
PD#164108: cvbs performance for g12a Rev.B

Change-Id: If140535984762cf6d843878e78ab285e014868e7
Signed-off-by: Nian Jing <nian.jing@amlogic.com>
2018-05-10 03:13:17 -07:00
wenbiao zhang
9b131e8ee7 ethernet: chage u200 buildroot default as internal phy
PD#163830: ethernet: chage u200 buildroot default as internal phy

Change-Id: I1be5bfddae6fc0c43e3da5f604a80cca36cfad6e
Signed-off-by: wenbiao zhang <wenbiao.zhang@amlogic.com>
2018-05-10 02:29:21 -07:00
Jihong Sui
3241fc8804 dtv_demod: modify dtv demod to adapter tuner
PD#165971: dtv_demod: Modify atv demod to adapter tuner

1. add get_strength;
2. call release when switch to not-support format;
3. chang DVBT/DVBC from DVBFE_ALGO_SW to DVBFE_ALGO_HW;

Change-Id: I5d58542dd1dded1579e950ec36c395d6a01e6cd7
Signed-off-by: Jihong Sui <jihong.sui@amlogic.com>
2018-05-10 01:47:20 -07:00
Jian Hu
0339f49966 i2c: fix i2c clock-frequency inaccurate in fast-mode
PD#165568: i2c: fix i2c clock-frequency in fast-mode

1.When i2c controller used in U-boot,may affect i2c
  controller in Kernel,should clear i2c registers.
2.Add i2c default clock-frequency for axg.
3.Add i2c clock-frequency debug sysfs, for i2c-0:
  /sys/class/i2c-adapter/i2c-0/device/speed
4.change clock high/low = 1:2 to 2:3

Change-Id: I44ca7ecd8e2e7aec978f3240ff837121ae478ba7
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
2018-05-10 01:17:46 -07:00
Nian Jing
615a0322da vdin: fix atv nosignal after snowon
PD#164655: dynamic config clamp for signal stable

Change-Id: I29c42053d2014b2ba17ab62b9a670b82b0d3550e
Signed-off-by: Nian Jing <nian.jing@amlogic.com>
2018-05-10 01:17:18 -07:00
Jian Hu
9e832877f5 pwm: fix min and max duty cycle
PD#165774: pwm: fix min and max duty cycle

When the duty equal 0% and 100%, there is one high or low
count ,the constant bit should be enabled;and constant
bit should be disabled for other duty_cycle.

Change-Id: I36eefee3613f113f6c30db076e41cd8223086c54
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
2018-05-10 01:12:09 -07:00
Shunzhou Jiang
0520011c45 cpuidle: enable cpu idle
PD#163959: G12A: enable cpu idle

Change-Id: If5493f037f51092358b8f1c4151655aafec6e379
Signed-off-by: Shunzhou Jiang <shunzhou.jiang@amlogic.com>
2018-05-09 23:26:14 -07:00
qi.yuan
325e369e0d audio: add an interface for HDMI out disable [1/2]
PD#165284: add an interface control for audio hdmi out disable

1)add a gpio control switch for ARCIN and SPDIFIN
2)clean global value in audio driver
3)rewrite HDMITX audio control interface
4)remove HDMITX user space control SYSFS
  Forbidden user space control of HDMITX audio, must via AUDIO

Change-Id: Ifc69c8553df903631d80f414771d91966045f85f
Signed-off-by: qi.yuan <qi.yuan@amlogic.com>
Signed-off-by: Zongdong Jiao <zongdong.jiao@amlogic.com>
Signed-off-by: Zhe Wang <Zhe.Wang@amlogic.com>
2018-05-09 22:23:33 -07:00
jiamin ma
41a30dee3d ir: fix ir memory overflow issue
PD#164774: kernel panic after mtk_cfg80211_set_power_mgmt

two possible overflow cases:
1. dev->debug_current + len == dev->debug_buffer_size
2. len > dev->debug_buffer_size

for the first case(currently triggered case)
  the last byte of string pointed to by fmt, aka.'\0', will
overwrite the first byte of memory pointed to by header(in
function __register_sysctl_table), which is just the LSB of
ipv4_table[]'s base address. Leading to "Unable to handle
kernel paging request at virtual address xxxx" panic

for the second case
  a bunch of memory pointed to by header(in function
__register_sysctl_table) will be overwritten

Change-Id: I6bc42308323b7ffb52fe4d1fa9d22742a31e8b1f
Signed-off-by: jiamin ma <jiamin.ma@amlogic.com>
2018-05-09 21:32:04 -07:00
jianxin.pan
160f1e245e workqueue: add more debug when null pwq
PD#158184: print work and worker function when null pwq

Change-Id: I552c6585935e47abfb9593f4a2d2f1588906aaf8
Signed-off-by: jianxin.pan <jianxin.pan@amlogic.com>
2018-05-09 21:30:48 -07:00
Nian Jing
98aa399781 tvafe: reset vdin asynchronous fifo in tvafe reset
PD#165571: fix greenscreen on repeatly power on/off

Change-Id: Iefa412c2c4f86ba525bfdebbf395d38d34b77a30
Signed-off-by: Nian Jing <nian.jing@amlogic.com>
2018-05-09 21:24:25 -07:00
jianxin.pan
5aa2357ea0 debug: add watchdog trigger in sysrq
PD#165796: watchdog trigger to debug wdt related behavior
"echo x > /proc/sysrq-trigger" to trigger watchdog

Change-Id: Iddd92cd64c9a7ccdf452f23706b396eaf50ae448
Signed-off-by: jianxin.pan <jianxin.pan@amlogic.com>
2018-05-09 21:14:17 -07:00
jianxin.pan
91d7a0007a debug: hard lockup detect
PD#165796: detect dead lock in isr and dead lock with irq disabled

Change-Id: I0aace28fd29e5aeb8c514f6ab1700ac1248f836c
Signed-off-by: jianxin.pan <jianxin.pan@amlogic.com>
2018-05-09 19:39:28 -07:00
Yi Zhou
fdaf7bd612 hdmitx: remove setting BT2020 in 4k color deptch mode
PD#162864: hdmitx: remove setting BT2020 in 4k color deptch mode

some TVs flash when changing colormetry
such as bt2020 to bt709, or bt709 to bt601

Change-Id: I360dfc1ea3299d4ec75903d435530425afb4f546
Signed-off-by: Yi Zhou <yi.zhou@amlogic.com>
2018-05-09 18:54:42 -07:00
yicheng shen
6bf27f9a5a hdmirx: add new atmos edid handle method
PD#164867: hdmirx: add new atmos edid handle method

Change-Id: I4f6fa58ebfe106cedb9f814c92657f08dc6d2aaf
Signed-off-by: yicheng shen <yicheng.shen@amlogic.com>
2018-05-09 07:56:03 -07:00
tao zeng
0c2c8fb684 ddr: fix wrong bandwidth result on g12 platform
PD#161475: ddr: fix wrong bandwidth result on g12 platform

Correct function name get_ddr_freq to get_dmc_freq in order
to avoid misunderstanding.

Change-Id: I9000970f100394cf63468149d431d05ece2aaa1d
Signed-off-by: tao zeng <tao.zeng@amlogic.com>
2018-05-08 23:38:14 -07:00
Hong Guo
922fb52799 arm64: dts: g12a: dvfs voltage duty modify.
PD#165143: cpufreq: dvfs voltage duty modify for 0.731mv.

Change-Id: I85370ea18b68eb3b37636629a9e0da8b26491f83
Signed-off-by: Hong Guo <hong.guo@amlogic.com>
2018-05-08 22:21:26 -07:00
Jian Hu
16a0d05225 pwm: optimizing pwm duty calculation
PD#165143: pwm: optimizing pwm duty calculation

1.Fix duty equal 0% and 100% duty count incorrect
2.Change period unit to ps to increase accuracy

Change-Id: Ied478f21ac4b4f9f3d1508d69dfbcdbb9ca4e732
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
2018-05-08 18:45:58 -07:00
Nan Li
7ed184dc94 sd: add sd_uart to g12a.
PD#165584: add sd_uart on g12a.
test on u211.

Change-Id: Ia8e5cde6c60b3019329324445593d82cf2543afe
Signed-off-by: Nan Li <nan.li@amlogic.com>
2018-05-08 04:53:18 -07:00
Zongdong Jiao
6a927947f8 hdmitx: set frac_rate_policy as 1.[1/2]
PD#165862: hdmitx: set frac_rate_policy as 1
For most video/films or NTSC, they are 23.976/29.97/59.94fps, so
hdmitx should adjust set frac_rate_policy as 1.

Change-Id: I9671935c5121634d1af6879d8ccd91eb4f92c9cb
Signed-off-by: Zongdong Jiao <zongdong.jiao@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
2018-05-08 04:46:44 -07:00
manhao liang
b3aeeb5e81 dtv_mode: R311 add tuner mxl661
PD#165368: dtv_mode: R311 add tuner mxl661

Change-Id: Ifbc3ffece7d30d29e295f3e70c37d9d25ee0ac69
Signed-off-by: manhao liang <manhao.liang@amlogic.com>
2018-05-08 04:34:46 -07:00
Nan Li
dd85726020 sd: sd & wifi TDMA crash.
PD#164804: when system run with SD card in,
system will be crashed. rm post_dma() crash error.

Change-Id: I99c10fcbf151a4c349bf6b0584056cd9080349e8
Signed-off-by: Nan Li <nan.li@amlogic.com>
2018-05-08 00:50:49 -07:00
Zhuo Wang
1e1290ae25 ethernet: add delay after reset phy
PD#165891: can't readout phyid when bootup

Change-Id: I775f4fe9b8c4b2e76475f239e75539ecbe2bf843
Signed-off-by: Zhuo Wang <zhuo.wang@amlogic.com>
2018-05-08 00:39:02 -07:00