Commit Graph

649307 Commits

Author SHA1 Message Date
ruixuan.li
2dfb3f09d3 tm2: emmc run hs200 busmode [1/1]
PD#SWPL-5658

Problem:
emmc run high speed now

Solution:
modify dts

Verify:
passed on t962e2_ab319

Change-Id: Iedef30bed9547e7f57c883077462f1762c55fda3
Signed-off-by: ruixuan.li <ruixuan.li@amlogic.com>

Conflicts:
	arch/arm/boot/dts/amlogic/tm2_t962e2_ab319.dts
	arch/arm64/boot/dts/amlogic/tm2_t962e2_ab311.dts
	arch/arm64/boot/dts/amlogic/tm2_t962e2_ab319.dts
2020-06-29 11:45:22 +09:00
Long Yu
97964df0de emmc: After standby sleep, clear the CMD tuning flag [1/1]
PD#SWPL-9075

Problem:
Because the CMD tune flag was not cleared before standby,
debug printing was performed during auto tune

Solution:
After standby sleep, clear the CMD tuning flag

Verify:
passed on TL1

Change-Id: Ie4a531346f50983009477131408d81c76d5c020f
Signed-off-by: Long Yu <long.yu@amlogic.com>
2020-06-29 11:45:22 +09:00
Long Yu
60f5d0668e emmc: report response crc error on G12B when hs400 200M busmode [1/1]
PD#SWPL-8670

Problem:
G12B report response crc error when hs400 200M busmode

Solution:
find a eyetest hole between 14-20 or 48-54, otherwise
tuning tx_delay and find again and
adjust CMD rx timing dynamically in HS400 mode

Verify:
passed on G12B

Change-Id: I23e4d5118e0ca0564367a77102aea9e1085633a9
Signed-off-by: Long Yu <long.yu@amlogic.com>
2020-06-29 11:45:22 +09:00
Ruixuan Li
b29ea67a5d emmc: report response crc error on tl1 when hs400 200M busmode [1/1]
PD#SWPL-7740

Problem:
tl1 report response crc error on tl1 when hs400 200M busmode

Solution:
find a eyetest hole between 14-20 or 48-54, otherwise
tuning tx_delay and find again

Verify:
passed on tl1_skt

Change-Id: I46e2c3c4d7ef24bcac7b44fee73112894540fc33
Signed-off-by: Ruixuan Li <ruixuan.li@amlogic.com>
2020-06-29 11:45:22 +09:00
Long Yu
5be14ba9ab emmc: Clear the value of txdelay in legacy mode on the resume process [1/1]
PD#SWPL-7181

Problem:
switch to high-speed from hs200 failed for resume process.

Solution:
set tx_delay as 0 for legacy mode.
clear cfg_cmd_setup

Verify:
verify by TL1

Change-Id: I5dbb1bbc391da864464bf137837a2b0f54ccda42
Signed-off-by: Long Yu <long.yu@amlogic.com>
2020-06-29 11:45:22 +09:00
long yu
b5217bc0ee emmc: backward compatible with all HS400 clock sources [1/1]
PD#SWPL-6294

Problem:
TL1 and G12B uses clkin3,TXLX uses clkin2

Solution:
unifying the HS400 source clock name in DTS

Verify:
TL1-T962X2_X301 G12B-Reva G12B-Revb

Change-Id: I7acaf7b4392d757955f43a0b17ac1fad84f53d26
Signed-off-by: Long Yu <long.yu@amlogic.com>
2020-06-29 11:45:22 +09:00
long yu
de8540862b storage: emmc: reduce cmd/ds/data pins driver strength for TL1 SOC [1/1]
PD#SWPL-5334

Problem:
TX window is not stable

Solution:
Reduce the drive capability of emmc controller pins

Verify:
TL1-T962X2_X301

Change-Id: Ib641c66131c2dee41eb68fb262f4770f431676b9
Signed-off-by: long yu <long.yu@amlogic.com>
2020-06-29 11:45:22 +09:00
long yu
35a4be18ba storage: emmc: Add HS400 busmode support for G12B-RevB [1/1]
PD#SWPL-5040

Problem:
not support HS400 busmode

Solution:
add HS400 busmode support for G12B-RevB

Verify:
T962X-R311,TL1-T962X2_X301,G12B-W400

Change-Id: I11a1f47b9473fa341c7d754a51d6e270551758a7
Signed-off-by: long yu <long.yu@amlogic.com>
2020-06-29 11:45:22 +09:00
Nan Li
0f16306557 sdio: set sdio hs mode co_phase [1/1]
PD#SWPL-5206

Problem:
Setup time in sdio highspeed mode of txlx is
inconsistent with the protocol standard.

Solution:
set co_phase = 2.

Verify:
r321

Change-Id: I3e5a1bca335faea6397513de772d3ee35ea76d40
Signed-off-by: Nan Li <nan.li@amlogic.com>
2020-06-29 11:45:21 +09:00
Nan Li
35bc41f8d8 sd: add sduart not supported flag [1/1]
PD#SWPL-4858

Problem:
tl1 not support sduart

Solution:
add not supported flag in match_data

Verify:
verify by tl1 skt

Change-Id: I651765433bb62892fad770c85a5eccd4805e7c79
Signed-off-by: Nan Li <nan.li@amlogic.com>
2020-06-29 11:45:21 +09:00
Long Yu
e6bbfaf869 storage: emmc: Add HS400 busmode support for TL1 [1/1]
PD#SWPL-2311

Problem:
not support HS400 busmode

Solution:
add HS400 busmode support for TL1

Verify:
TL1-T962X2_X301

Change-Id: I95ac19e9c0c5b84c9225602cda6964aaaee4151e
Signed-off-by: Long Yu <long.yu@amlogic.com>
2020-06-29 11:45:21 +09:00
long yu
1d2e33a395 storage: emmc: Set core_phase to 2 for HS200 mode [1/1]
PD#TV-2112

Problem:
eMMC timing test failed on item tISU

Solution:
set core_phase to 2 for HS200 busmode

Verify:
TL1-T962X2_X301

Change-Id: I1025b6b6b66b2591b7a8faca68ff1852eeb9b85c
Signed-off-by: long yu <long.yu@amlogic.com>
2020-06-29 11:45:21 +09:00
Ruixuan Li
2406d5a0e6 emmc: modify cophase for tl1 [1/1]
PD#172587

Problem:
emmc data crc error

Solution:
modify cophase under kernel for tl1

Verify:
test pass on skt

Change-Id: Id4997ef2288a53e6f401744664aaf6b05cf36e38
Signed-off-by: Ruixuan Li <ruixuan.li@amlogic.com>
2020-06-29 11:45:21 +09:00
Hong Guo
2f44178eef cpufreq: defect clean up overrun [1/1]
PD#SWPL-16541

Problem:
defect clean up overrun

Solution:
defect clean up overrun

Verify:
test pass on g12a_u200

Change-Id: Ib9b5c1f5da9fed34a552eb7ee539e7276d922e38
Signed-off-by: Hong Guo <hong.guo@amlogic.com>
2020-06-29 11:45:21 +09:00
Hong Guo
479df3b358 cpufreq: add different freqs variable for big&little core [1/1]
PD#SWPL-15315

Problem:
add different freqs variable for big&little core

Solution:
add different freqs variable for big&little core

Verify:
test pass on g12b_w400

Change-Id: I3fbe4c6ee4f2a0868c84b362acddf16ac41a3dbd
Signed-off-by: Hong Guo <hong.guo@amlogic.com>
2020-06-29 11:45:21 +09:00
Hong Guo
98521f67a4 cpufreq: add different freqs variable for big&little core [1/1]
PD#SWPL-15315

Problem:
add different freqs variable for big&little core

Solution:
add different freqs variable for big&little core

Verify:
test pass on g12b_w400

Change-Id: I2a5e00b5bbd4a1d084b925733a051497c6e92b0b
Signed-off-by: Hong Guo <hong.guo@amlogic.com>
2020-06-29 11:45:21 +09:00
Lei Qian
fed4a57891 cpufreq: merge from mainline
PD#SWPL-15312

Change-Id: I1b354d551721e80f6b3052e9ed4c66437c0b5242
Signed-off-by: Lei Qian <lei.qian@amlogic.com>
2020-06-29 11:45:21 +09:00
Hong Guo
85672bbe4d CPUFREQ: Setting different cpufreq tables according to efuse information. [1/1]
PD#SWPL-4035

Problem:
Setting different cpufreq tables according to efuse information.

Solution:
Setting different cpufreq tables according to efuse information.

Verify:
g12a_u200, verify pass

Change-Id: I1bf571f332244f5727ef3cd8743f215f71248146
Signed-off-by: Hong Guo <hong.guo@amlogic.com>
2020-06-29 11:45:21 +09:00
Hanjie Lin
f5f239177e sched: add hmp boost for big-little cluster [1/1]
PD#SWPL-6980

Problem:
memory bound tasks running in a high freq cluster will get a low performance
when another cluster freq is too low.

Solution:
We boost big cluster freq for a appropriate duration when we detect that
little cluster have lasting a period with highest freq.

Verify:
w400

Change-Id: Ic513604cb329992782c9c2e1d71273080e2e336a
Signed-off-by: Hanjie Lin <hanjie.lin@amlogic.com>
2020-06-29 11:45:21 +09:00
Sunny Luo
3d98c25680 spi nor: spicc: change to use spicc to access spi nor [1/1]
PD#TV-8401

Problem:
Customer needs to access spi nor by the spicc.

Solution:
add spi nor interfaces in spicc driver.
add gd25q80c/FM25Q08A surpport

Verify:
tl1 x301

Change-Id: If94858d46c31fea6b37034a8b1dfe94a9e9f4603
Signed-off-by: Sunny Luo <sunny.luo@amlogic.com>
2020-06-29 11:45:21 +09:00
Sunny Luo
61beb18a8f spi: export the spi_register_board_info for ko [1/1]
PD#SWPL-9815

Problem:
spi_register_board_info's export has been removed in kernel 4.9,
but TV need to use it in ko.

Solution:
package it in a new dirspi_register_board_info and export

Verify:
T312

Change-Id: Ic7e5d8cef6840551e2925eda6162156320877833
Signed-off-by: Sunny Luo <sunny.luo@amlogic.com>
2020-06-29 11:45:20 +09:00
Daogao Xu
e69752f803 i2c: add retry-process when slave NACK. [1/1]
PD#SWPL-4761

Problem:
When slave device is busy processing, it is unable to handle the
incoming communication attempts. i2c master have to repeatedly attemp
communication  until the slave sends an ACK after receiving its slave
address.

Solution:
add retry-process when slave NACK.

Verify:
mesonaxg_s420_32_release

Change-Id: Ieb195176cac4b80e223ea6adb502ffd3bc9ef728
Signed-off-by: Daogao Xu <daogao.xu@amlogic.com>
2020-06-29 11:45:20 +09:00
Jian Hu
5222bf6f1a i2c: meson: add detail calculation process for i2c duty cycle [1/1]
PD#SWPL-7197

Problem:
There is not detail calculation process for i2c duty cycle

Solution:
add detail calculation process for i2c duty cycle

Verify:
verified on x301

Change-Id: Ifc222acda3268f792f63e84c6dc3513d80568e19
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
2020-06-29 11:45:20 +09:00
Xingyu Chen
645e63770f remote: fix compatibility issue for RC5 protocol [1/1]
PD#SWPL-6161

Problem:
partial ir-keys with RC5 can’t been decoded on some boards(Eg: TL1, TXLX)

Solution:
adjust the register to extend the detection range of half/whole bit

Verify:
test pass on TL1

Change-Id: I6ff0af79b3bf9f624c1f249f056b729df7b5dd0c
Signed-off-by: Xingyu Chen <xingyu.chen@amlogic.com>
2020-06-29 11:45:20 +09:00
Qianggui Song
f08cce9ca9 ir: cannot wakeup system when keep pressing power key [1/1]
PD#SWPL-14797

Problem:
In freeze mode, keep press power key won't wake up system.

Solution:
replace pm_wakup_event with pm_stay_awake

Verify:
tl1

Change-Id: I5b88714ff45034280ec1d638f86b51fa54e2a011
Signed-off-by: Qianggui Song <qianggui.song@amlogic.com>
2020-06-29 11:45:20 +09:00
Qiufang Dai
41ee9383b5 freeze: add IRQF_NO_SUSPEND for ir irq flag for avoid wakeup by any IR key
PD#TV-10438

Problem:
system can be wake up by any IR key

Solution:
Add IRQF_NO_SUSPEND to avoid IR interrupt being seen as wakeup source IRQ
When IR irq check current key is power key, then send pm_wakeup_event()

Verify:
X32A0-T972

Change-Id: I753fe15f859480954bb569f2da3d3e0dd93c29e3
Signed-off-by: Qiufang Dai <qiufang.dai@amlogic.com>
2020-06-29 11:45:20 +09:00
Qianggui Song
6805ee9472 ir: fix coverity unchecked return value issue [1/1]
PD#SWPL-13969

Problem:
In sysfs.c, return value of class_register is not checked.

Solution:
check return value of class_register

Verify:
local coverity check

Change-Id: If8deb3e388e784650e4812257143c3ac919c2d9a
Signed-off-by: Qianggui Song <qianggui.song@amlogic.com>
2020-06-29 11:45:20 +09:00
Qianggui Song
1c88be3eb3 ir: remove irq affinity in hard decode mode [1/1]
PD#SWPL-9797

Problem:
ir irq is binded to cup 1 and will re-set in every resume process.
cup 0 wakeup first in resume, if there comes a irq during resume in
a critical time it may occurs concurrency.

Solution:
remove irq affinity in hard decode mode and only use it in learning
mode.

Verify:
w400

Change-Id: I26fad9f67665a2bfe9c6d2455559eb1d95e8b2ba
Signed-off-by: Qianggui Song <qianggui.song@amlogic.com>
2020-06-29 11:45:20 +09:00
Qianggui Song
d52040136f ir: add ir learning function [1/1]
PD#SWPL-4130

Problem:
No ir learning function in current source code

Solution:
Provide two ways to use ir learning function
1. sysfs
	/*start learning*/
	echo 1 > /sys/class/remote/amremote/ir_learnning
	/*get data*/
	cat /sys/class/remote/amremote/learned_pulse
	/*stop learning*/
	echo 0 > /sys/class/remote/amremote/ir_learnning
2. ioctl
	/*start/stop learnning 1/0*/
	REMOTE_IOC_SET_IR_LEARING
	/*get raw data*/
	REMOTE_IOC_GET_RAW_DATA

Verify:
U200 and W400

Change-Id: Ibb03838402d9baa6e910b3162ffcc63b57048890
Signed-off-by: Qianggui Song <qianggui.song@amlogic.com>
2020-06-29 11:45:20 +09:00
Qianggui Song
f7f3031015 ir: fix mem leak issue when probe [1/1]
PD#SWPL-12483

Problem:
during probe stage, some unused mems are not be freed.

Solution:
free mem after using.

Verify:
gxl_p212

Change-Id: I24a91d81f0db9fb1edbab8f63b4e8c7f940d5947
Signed-off-by: Qianggui Song <qianggui.song@amlogic.com>
2020-06-29 11:45:20 +09:00
Qianggui Song
a86eb23fed ir: fix allocation of memory without size check issue [1/1]
PD#SWPL-11248

Problem:
When handling the set attribute IOCTL REMOTE_IOC_SET_KEY_NUMBER, the driver
does not limit the size of allocation with kzalloc.

Solution:
Limit the size of alllcation range, if given a value out of range, set
update flag to false and do nothing in kzalloc stage.

Verify:
W400

Change-Id: I6a4150f5615557c372738c918aad86120d149340
Signed-off-by: Qianggui Song <qianggui.song@amlogic.com>
2020-06-29 11:45:20 +09:00
Qianggui Song
efa523b92b ir: support rca ir protocol [1/1]
PD#SWPL-8050

Problem:
current driver does not support rca ir protocol

Solution:
add register setting and code for rca use REMOTE_RYPE_RCA to configure.

Verify:
G12b_W400 & tl1 x301

Change-Id: I76d860d66a43071803fb60debeafcbf18f42b283
Signed-off-by: Qianggui Song <qianggui.song@amlogic.com>
2020-06-29 11:45:19 +09:00
Qianggui Song
3dd602667c ir: add toshiba protocol support [1/1]
PD#SWPL-3543

Problem:
current driver does not support toshiba ir remote control protocol

Solution:
add register setting and decode code for toshiba protocol
use REMOTE_TYPE_TOSHIBA/REMOTE_TYPE_NEC_TOSHIBA to configure toshiba
only/toshiba and nec.

Verify:
tl1_t962x2_x301

Change-Id: Idad70c3879fad6e8267f0c4d80d2447c34114103
Signed-off-by: Qianggui Song <qianggui.song@amlogic.com>
2020-06-29 11:45:19 +09:00
Lei Qian
d32bf0570d jtag: tm2: add SWD interface
Change-Id: I4a31de854be2e6d3985a8fec5c11bfbc54803ec5
Signed-off-by: Lei Qian <lei.qian@amlogic.com>
2020-06-29 11:45:19 +09:00
Zhongfu Luo
fdb67c7098 efuse: fix KASAN bug [1/1]
PD#TV-11119

Problem:
BUG: KASAN: stack-out-of-bounds in
meson64_trustzone_efuse+0x168/0x268

Solution:
fix retcnt variable type

Verify:
tl1 skt

Change-Id: I54d9bb598277db539b68f2e741288348eb026e01
Signed-off-by: Zhongfu Luo <zhongfu.luo@amlogic.com>
2020-06-29 11:45:19 +09:00
Jiamin Ma
d58f336aaf efuse: fix potential memory info leakage issue [1/1]
PD#OTT-4656

Problem:
When handling the set attribute IOCTL EFUSE_INFO_GET the driver
makes a call to efuse_getinfo(line 177) passing it a potentially
non-null terminated string. efuse_getinfo() function then uses
this potentially non-null terminated string in strcmp (line 99).
the method efuse_getinfo does not cater to non-null terminated
strings and thus can likely be made to overrun the "item" string
beyond any printable ascii data.
Further more, if attackers can control the item value well enough,
the function efuse_getinfo can be used to potentially disclose
values in kernel memory i.e. by checking the results of lots of
strcmp calls on items values, essentially acting as an oracle for
memory values surrounding the efusekey_info[n].keyname variable in
stack memory.

Solution:
force a null terminator for the keyname argument before comparing
it to kernel memory

Verify:
U200

Change-Id: I851dd7045d0a9e7855e9899c4745eac475cb9233
Signed-off-by: Jiamin Ma <jiamin.ma@amlogic.com>
2020-06-29 11:45:19 +09:00
Jiamin Ma
f49dbe73e2 cpu_affinity: restore the original cpu affinity correctly [1/1]
PD#SWPL-5595

Problem:
set_cpus_allowed_ptr(current, cpu_all_mask) is always errorly
called to retore CPU affinity for current task. In some cases,
the current may be a bounded kworker thread, and we should not
set its CPU affinity to all CPUs

Solution:
Save the original CPU affinity and restore it

Verify:
W400 revB

Change-Id: I3cd65e79791563af9dacc09639b8645b97979c44
Signed-off-by: Jiamin Ma <jiamin.ma@amlogic.com>
2020-06-29 11:45:19 +09:00
Zhongfu Luo
fc11723850 efuse: tl1: add efuse burning support [1/1]
PD#172587

Problem:
efuse: tl1: need to add efuse burning support

Solution:
efuse: tl1: add efuse burning support

Verify:
TL1 skt board verify pass

Change-Id: Id65f182c71fc6f3f2b2536bbb6b859ad2f558360
Signed-off-by: Zhongfu Luo <zhongfu.luo@amlogic.com>
2020-06-29 11:45:19 +09:00
Yingyuan Zhu
3b0c4a5026 jtag: meson: fix jtag pinmux settings issue [2/2]
PD#SWPL-4501

Problem:
Standard pinmux APIs were not used

Solution:
Setting pinmux instead of require for gpio

Verify:
tl1,g12a,g12b,axg,txl,txlx,gxl

Change-Id: I0ad88f414832686d795d252f70e81a34f6cb0f9e
Signed-off-by: Yingyuan Zhu <yingyuan.zhu@amlogic.com>
2020-06-29 11:45:19 +09:00
Lei Qian
6456487cc0 meson_saradc: merge from mainline
PD#SWPL-15312

Change-Id: I77692c66e245135f8f325702626c52c24eb3e180
Signed-off-by: Lei Qian <lei.qian@amlogic.com>
2020-06-29 11:45:19 +09:00
Xingyu Chen
c705f69697 key: fix wakeup issues of gpiokey and adckey in freeze mode [1/1]
PD#SWPL-14597

Problem:
- it is risky to replace directly system_freezable_wq with system_wq
for input poll device.
- the system can't be awakened by gpiokey or adckey when system in
freeze mode.

Solution:
- because of the input poll-device can't compatible freeze mode, we
replace it with input device.
- perfect wakeup operation when system works in freeze mode.

Verify:
test pass on ac200

Change-Id: I81c867da7325480712aa5903289e02ebb20d6f07
Signed-off-by: Xingyu Chen <xingyu.chen@amlogic.com>
2020-06-29 11:45:19 +09:00
Jiamin Ma
5c7241b365 rtc: fix fail to set wakealarm via standard way [1/1]
PD#SWPL-16508

Problem:
Fail to set wakealarm via standard way

Solution:
Enable the required read_alarm method for vrtc

Verify:
P212

Change-Id: I5a081c07a16ed7ecc158344671bd5077c6f55435
Signed-off-by: Jiamin Ma <jiamin.ma@amlogic.com>
2020-06-29 11:45:19 +09:00
Hong Guo
20dfc049ca supsend: clear wakeup reason after reusme. [1/1]
PD#SWPL-11035

Problem:
clear wakeup reason after reusme.

Solution:
clear wakeup reason after reusme.

Verify:
test pass on t962x2-x301 ,g12b_400

Change-Id: I19360dbf1c7a1cf9460417b00c8af6ebc818beba
Signed-off-by: Hong Guo <hong.guo@amlogic.com>
2020-06-29 11:45:19 +09:00
yuehu mi
00b12daa3a vrtc: add debug nodes, set alarm time and wake up system [1/1]
PD#TV-3085

Problem:
Add VRTC debug interface into TL1 Android P

Solution:
add wakeup and wakeup_time debug nodes

if you want to set alarm time, for example, set alarm wakeup time 10s
echo 10 > /sys/kernel/debug/wakeup_time

if you want to wake the system when an alarm is triggered, like this
echo 1 > /sys/kernel/debug/wakeup

Verify:
tl1_t962x2_x301

Change-Id: Ic40db0d9cb4ac2cab615206518d8db22b4095f72
Signed-off-by: yuehu mi <yuehu.mi@amlogic.com>
2020-06-29 11:45:18 +09:00
Xingyu Chen
943e50cc06 iio: adc: coverity defect cleanup [1/1]
PD#SWPL-13967

Problem:
unchecked return value of regmap_write

Solution:
to check the return value

Verify:
test pass on g12a

Change-Id: Ibb45e36d7c24f0e0ea8b14da75e887321ee5b791
Signed-off-by: Xingyu Chen <xingyu.chen@amlogic.com>
2020-06-29 11:45:18 +09:00
wenbiao zhang
dabc4d5f19 suspend: default suspend adc in freeze mode for power consumption [1/1]
PD#SWPL-8587

Problem:
in freeze mode detect adc key cause power consumption problem

Solution:
adckeyswitch from bootargs to decide whether resume by adc key
in freeze mode, default set to POWER_WAKEUP_NONE
adckeyswitch values POWER_WAKEUP_NONE/POWER_WAKEUP_POWER/POWER_WAKEUP_ANY

Verify:
X301

Change-Id: I2726c2ec394e1ffa528acb0862ef302983683b3b
Signed-off-by: wenbiao zhang <wenbiao.zhang@amlogic.com>
2020-06-29 11:45:18 +09:00
Qiufang Dai
bc31836e60 suspend: remote: do not do suspend action under freeze mode [1/1]
PD#SWPL-2399

Problem:
Miss IR (power) key value when wakeup from freeze.

Solution:
Do not suspend/resume IR device under freeze mode

Verify:
x301_tl1

Change-Id: I7bdf0b847fa1a8b96bb2896426e15faf8143e820
Signed-off-by: Qiufang Dai <qiufang.dai@amlogic.com>
2020-06-29 11:45:18 +09:00
wenbiao zhang
a062f11425 suspend: not do suspend action under freeze mode [1/1]
PD#TV-4213

Problem:
can't wake up by gpio/adc key when suspend into freeze mode

Solution:
not suspend gpio/adc when freeze

Verify:
X301

Change-Id: I32ff27aafebe35d8deb6e9b4d3daee686bbf90bc
Signed-off-by: wenbiao zhang <wenbiao.zhang@amlogic.com>
2020-06-29 11:45:18 +09:00
Xingyu Chen
46960f383f saradc: saradc register initialization is incomplete [1/1]
PD#SWPL-4975

Problem:
some basic saradc registers are only initialized at bl2 stage, the ADC
value is abnormal when bl2 disable saradc init.

Solution:
to re-initialize the basic saradc registers in kernel.

Verify:
test pass on w400 and p212

Change-Id: Ie98e8789fd47cc43cafcb49d9862ccccbe1d9b66
Signed-off-by: Xingyu Chen <xingyu.chen@amlogic.com>
2020-06-29 11:45:18 +09:00
Jian Hu
ae8733d2f9 i2c: meson: add suspend/resume to set gpio status [1/1]
PD#SWPL-17544

Problem:
it will cause Current reverse irrigation if the gpio
to i2c function when the system is in STR mode

Solution:
keep the gpio to sleep mode to protect to slave device

there are two sleep mode for i2c pins, and it depends the
pull up power. we can choose the exact sleep mode.

1)pull up power is on, set the sleep mode to input
2)pull up power if off, set low the gpio

Verify:
verified on x301

Change-Id: Ie62f70449be2ff2cef7e3ab5c918ac379d861ca1
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
2020-06-29 11:45:18 +09:00