Commit Graph

649268 Commits

Author SHA1 Message Date
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
zhenxin.pu
2bdb3aecd3 Thermal: SM1: thermal driver print error [2/2]
PD#SWPL-18939

Problem:
high temp restart fails to offline cpus

Solution:
make cpucore current state update at meson cdev probe

Verify:
S905X3_AC214

Change-Id: I124f7795045db89142b1fb4949163f5dd60416ea
Signed-off-by: zhenxin.pu <zhenxin.pu@amlogic.com>
2020-06-29 11:45:18 +09:00
Huan Biao
52ecb98133 tsensor: Coverity(upgraded) defect cleanup: thermal [1/1]
PD#SWPL-16529

Problem:
4.9 Coverity defect cleanup:thermal

Solution:
fix 4.9 Coverity defect cleanup:thermal

Verify:
test pass W400

Change-Id: I3ea920489aecef10188b67c59a18bd6821351453
Signed-off-by: Huan Biao <huan.biao@amlogic.com>
2020-06-29 11:45:18 +09:00
Lei Qian
a3f31cd7da thermal: merge from mainline
PD#SWPL-15312

Change-Id: Icc4841dbb5145c96eca8f54d1358d301b9f6b863
Signed-off-by: Lei Qian <lei.qian@amlogic.com>
2020-06-29 11:45:18 +09:00
Huan Biao
ca03c19082 thermal: update read sensor times for performance [1/1]
PD#SWPL-10836

Problem:
read sensor time too long

Solution:
read sensor once

Verify:
verified on t1 t962x2 x301

Change-Id: Iddf4c903ba8a3836666943adb5c02c5d287728df
Signed-off-by: Huan Biao <huan.biao@amlogic.com>
2020-06-29 11:45:18 +09:00
shikai.guo
a1bcd53c94 USB: Coverity(upgrade) defect cleanup [1/1]
PD#SWPL-16527

Problem:
   CONSTANT_EXPRESSION_RESULT,FORWARD_NULL,UNINIT

Solution:
   1.Delete invalid conditional statement
   2.Add else statement
   3.Local variable initialization

Verify:
   Coverity test pass

Change-Id: If13c8175fe923b353b52c61c2a824c6ef057b60a
Signed-off-by: shikai.guo <shikai.guo@amlogic.com>
2020-06-29 11:45:18 +09:00
Jianxin Pan
a9cd2cd9f1 debug: improve ftrace_ramoops for io trace [2/2]
PD#SWPL-6028

Problem:
improve ftrace_ramoops to debug bus hang

Solution:
1. in uboot
setenv initargs $initargs ramoops_io_en=1 loglevel=3;save;reset
2. in linux command line:
cat /sys/module/kernel/parameters/ramoops_io_en
to check if success.
3. after watchdog reboot, get trace data with:
cat /sys/fs/pstore/ftrace-ramoops-0

Verify:
TL1 x301

Change-Id: If1a2582b40a3ded31eedef5355eb0b8a5bf495c3
Signed-off-by: Jianxin Pan <jianxin.pan@amlogic.com>
2020-06-29 11:45:17 +09:00
Dianzhong Huo
a749b4dfa5 uart: change baud rate minimum value to 2400 [1/1]
PD#SH-327

Problem:
uart default min baud rate was set 9600, but PTZ PELCO-D
and PELCO-P need uart driver support 2400 and 4800 baud rate

Solution:
change baud rate minimum value to 2400

Verify:
Local

Change-Id: Iee20ea30a95b89f89a59fab95cecf7d559cbff51
Signed-off-by: Dianzhong Huo <dianzhong.huo@amlogic.com>
2020-06-29 11:45:17 +09:00
Yong Qin
de6cc6ebe2 cec: sm1 send bus level check fail [1/1]
PD#SWPL-17583

Problem:
cec send msg, cec bus level check fail.
the register define is not right.

Solution:
cec bus input register is PREG_PAD_GPIO3_I.

Verify:
SM1

Change-Id: I2eb49cab79a0141141ae3fafb704239c2c779485
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
2020-06-29 11:45:17 +09:00
Yong Qin
630b68335a cec: cec b ARB timing cause cec 9.6.1 fail [1/1]
PD#SWPL-17658

Problem:
ARB timing setting is too large, it will cause
cec cts 9.6.1 fail

Solution:
reducec ARB timing

Verify:
sm1-AC214

Change-Id: I09f135c63f0f6f810719f6313b58bf84ebc574c1
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
2020-06-29 11:45:17 +09:00
Yong Qin
3e916617cd cec: store msg after bootup from st [1/2]
PD#SWPL-15856

Problem:
Device auto power off set off, after pressing the DVD
play button to wake up the TV, the TV cannot
automatically switch to the HDMI channel

Solution:
driver store msg during bootup st. after app task
restart, put these msg to cec hal.

Verify:
tl1

Change-Id: Ifdf5e9d3ed8fbea7142b4f4ed94130e0535f0766
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
2020-06-29 11:45:17 +09:00
Yong Qin
bb1fca4a7f cec: Add poll function for app chk new msg [1/1]
PD#SWPL-14177

Problem:
Add feature, for support poll function for check
cec new msg.

Solution:
Add feature, add poll api

Verify:
tl1

Change-Id: I1582438aa945201753fe04732a78f8f8d499dfca
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
2020-06-29 11:45:17 +09:00
Yong Qin
5f76278b11 cec: avoid kmalloc fail, and system crash [1/1]
PD#OTT-4870

Problem:
avoid kmalloc fail, and system crash

Solution:
add pointer null pretect this.

Verify:
W400

Change-Id: I86cdb44eb82baa70077bbe7830c3e752115016ae
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
2020-06-29 11:45:17 +09:00
Yong Qin
b7b25a0770 cec: sometime got err ack when send ping msg [1/1]
PD#SWPL-16005

Problem:
Sometime got err ack when send ping msg

Solution:
When ping and got no ack, but irq sts is tx done and
initial error, need return a err code. and app leayer
will retry ping msg.

Verify:
tl1

Change-Id: I0aea99878bb3924f6699d34821de0740c223f933
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
2020-06-29 11:45:17 +09:00
Yong Qin
506e6c9215 cec: finetune cecb ARB rising time [1/1]
PD#SWPL-15616

Problem:
when cec bus conect other cec connector, may lose cec ARB

Solution:
finetune ARB rising time.

Verify:
tl1

Change-Id: Icf422505602f75307f0b91c7841f0aae5e09c22d
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
2020-06-29 11:45:17 +09:00
Yong Qin
13ab9c8646 cec: remove the delay time when get phy addr [1/1]
PD#OTT-6364

Problem:
When no hdmi cable connect, framework call get phy address,
will case 2s delay.

Solution:
1.If there is no HPD,needn't waitting TX finished reading the EDID
2.Reduce time out sleep time.

Verify:
W400

Change-Id: I2749e877e8b214355094390364e3711e6f1bbf12
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
2020-06-29 11:45:17 +09:00
xian
c0302005ff cec: fix tv cec wake up select source issue [6/6]
PD#SWPL-13135

Problem:
When tv is waked up by one playback, it may wake up the
other playback ans show the source.

Solution:
LiveTv should take care of the situation and make the right
choice with information provided by cec hal service.

Verify:
verify it on Marconi

Change-Id: Ic27cdf77f0796a659400f90f60190354235777f3
Signed-off-by: xian <an.xi@amlogic.com>
2020-06-29 11:45:16 +09:00
Yong Qin
9bb1af8114 cec: Add Feature for freeze mode power on [2/2]
PD#TV-10483

Problem:
Add feature for freeze mode power on by cec.

Solution:
Add feature for freeze mode power on by cec.

Verify:
tl1

Change-Id: I5be3d672f71a30ed4a7ab445de616023946596ff
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
2020-06-29 11:45:16 +09:00
Yong Qin
d36627f141 cec: Add Feature for freeze mode power on [1/2]
PD#TV-10483

Problem:
Add feature for freeze mode power on by cec.

Solution:
Add feature for freeze mode power on by cec.

Verify:
tl1
Change-Id: I3e0271cb000d64c4b30cfc75c59e8ca374993d7f
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
2020-06-29 11:45:16 +09:00
Yong Qin
11381e86b9 cec: Fix coverity error [1/1]
PD#SWPL-13936

Problem:
Fix coverity error.

Solution:
Fix coverity error.

Verify:
TL1

Change-Id: I3e1af9370b47c1c9e06634f6cd4d04b2a229d664
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
2020-06-29 11:45:16 +09:00
Yong Qin
3cc112360c cec: during resume received OTP msg again [1/1]
PD#TV-7837

Problem:
when tv power on by OTP, when during power on, tv received
OTP again, then needn't send power key. and need send a event
to android.

Solution:
when cec driver is power on, needn't send power event to android.

Verify:
tl1

Change-Id: I8807c5cbbcab831577fdc23062a78454c2106167
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
2020-06-29 11:45:16 +09:00
Yong Qin
6b752d167f cec: none tv chip set arc cause crash [1/1]
PD#OTT-5149

Problem:
ceca isr cost long time, and delayed vdin vs.

Solution:
move function to tasklet

Verify:
test on txlx customer platform.

Change-Id: Iaae5b682f858787b25527518d2f787c3ee73e1be
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
2020-06-29 11:45:16 +09:00
Yong Qin
6b1df50cfd cec: ceca interrupt cost long time [1/1]
PD#SWPL-6068

Problem:
ceca isr cost long time, and delayed vdin vs.

Solution:
move function to tasklet

Verify:
txlx

Change-Id: I861dd2ba145a64a88ad126abc00944d2358914c8
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
2020-06-29 11:45:16 +09:00
Yong Qin
1cdf89a3d2 cec: enable two IP, share cec pin mux on TM2 [1/1]
PD#SWPL-5638

Problem:
tm2 ab311 only have one pin for every ip,
when enable two cec IPs, need share pin mux to
another IP

Solution:
when enable two IPs, enable pinmux share.

Verify:
ab311

Change-Id: I4845418b8d6c9bd6b9512a8479311489a42740d1
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
2020-06-29 11:45:16 +09:00
Yong Qin
85d2be88df cec: framework suspend condition error [1/1]
PD#SWPL-3715

Problem:
set startup to TV,when DVD power on,the platform
autoshutdown after enter HDMI source

Solution:
suspend condition is wrong when not in suspend mode.

Verify:
TL1 (X301_T962x2)

Change-Id: I057cfe6b9a7f5806fa54eac063c02a7e3dc0179e
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
2020-06-29 11:45:16 +09:00
Yong Qin
38f878dd1c cec: cec a support multi-logical addr for tm2 [1/1]
PD#SWPL-5637

Problem:
1.verify cec a function on tm2
2.cec a support multi-address

Solution:
verify the cec a multi-addr function

Verify:
ab311

Change-Id: I641621212fa3096b3906a87d443c7bd40cb6d7e9
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
2020-06-29 11:45:15 +09:00
Yong Qin
0ec9373199 cec: interrupt irq src number is not right for tl1 [1/1]
PD#SWPL-6994

Problem:
Sometime will lose msg. because of the isr src
number connected to timer.

Solution:
modify irq src number to 203

Verify:
tl1

Change-Id: I12586b543dbf87a964ba79e1c82561f9516f8e3c
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
2020-06-29 11:45:15 +09:00
Yong Qin
db8a2a605b cec: cec bringup for tm2 [1/1]
PD#SWPL-6945

Problem:
bringup for tm2

Solution:
add chip support and modify dts

Verify:
tm2

Change-Id: I718c3b81912a3555e19866f96d392bfb09d27384
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
2020-06-29 11:45:15 +09:00
Yue Wang
e6f8c74b7e usb: coverity fix [1/1]
PD#SWPL-14009

Problem:
Coverity defect cleanup - usb.

Solution:
Coverity defect cleanup - usb.

Verify:
sm1

Change-Id: Ib194a82e54f819e4ab59eab944b446683c894f15
Signed-off-by: Yue Wang <yue.wang@amlogic.com>
2020-06-29 11:45:15 +09:00
Luke Go
82f6416f09 Revert "usb: usb C port bad recognition rate more than 3%. [1/1]"
This reverts commit 5d804f257d.
2020-06-29 11:45:15 +09:00
he.he
43f4d2ccde usb: TOSHIBA Disk Can't Be Recognized on the Port of USB 2.0 [1/1]
PD#SWPL-14156

Problem:
TOSHIBA Disk can't be recognized on the Port of USB 2.0 and since then
any disk can't be recognized.This is because
that the CCS flag of the PORTSC is still set and if write 0
to 0x38 of usb phy register the CCS will change to
0 and so that other disks can be recognized.

Solution:
when the enumeration fails, call set_usb_phy_host_tuning.

Verify:
test pass on u212

Change-Id: I507f269afc825de75c7dcce5f79c9c1dd7793d84
Signed-off-by: he.he <he.he@amlogic.com>
2020-06-29 11:45:15 +09:00
Yue Wang
a198dd1991 usb: add USB + PCIE feature [1/1]
PD#SWPL-8058

Problem:
usb + pcie.

Solution:
add usb + pcie feature.

Verify:
TM2

Change-Id: Ib5838cb0093753d346e46ce0fa6007c0edf511c2
Signed-off-by: Yue Wang <yue.wang@amlogic.com>
2020-06-29 11:45:15 +09:00
Yue Wang
8e1d15d8b9 usb: bringup TM2 usb3 [1/1]
PD#SWPL-5609

Problem:
bringup TM2 usb3.

Solution:
bringup TM2 usb3.

Verify:
TM2

Change-Id: Iea60a85e7d344f8f1cd44d07a634a6edd351218c
Signed-off-by: Yue Wang <yue.wang@amlogic.com>
2020-06-29 11:45:15 +09:00
Dongjin Kim
349cf343ce ODROID-C3/N2: usb/phy: use 'CONFIG_ARCH_MESON64_ODROID_COMMON'
Change-Id: Ib78b7e773705e930f3493fa3b56be2617450d0f2
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
2020-06-29 11:45:15 +09:00
Chris KIM
0843e19ef6 ODROID: Add multitouch v/pid.
/* DELL HDMI capacitive Screen */
 #define USB_VENDOR_ID_DELL_P2418HT 0x1fd2
 #define USB_DEVICE_ID_DELL_P2418HT 0x6103

Change-Id: If441a2046dd7d6e452c28a8ddf05c95530e2f6bd
2020-06-16 09:47:43 +09:00
Luke Go
1fbc1ea16a ODROID-N2: cpu-opp-table: Add 1000 microvolts.
Change-Id: I4f317468f1cae81cd090cb4483135c9ed4c85e16
2020-06-12 17:01:22 +09:00
Luke go
a410abc40e Merge changes Id1932552,I2ceb31b9,Ie9d2325e,Id0262986,Idd344270, ... into odroidn2-4.9.y-android
* changes:
  ODROID-COMMON: arm64/dts: move can0 node to each overlay directory
  ODROID-COMMON: arm64/dts: Extract spidev node from main dts to spi0 dtbo
  ODROID-COMMON: arm64/dts: Rename uart DTBOs to use numerical order
  ODROID-COMMON: arm64/dts: move onewire node to each overlay directory
  ODROID-C4/N2: fix to remove compile warning of 'Warning (reg_format): "reg" property in ...'
  ODROID-COMMON: arm64/dts: Move peripheral nodes from dts to each dtbos.
  ODROID-COMMON: arm64/dts: Support device tree overlay.
  ODROID-COMMON: arm64/dts: modify i2c alias bus number
  ODROID-C4: arm64/dts: Add hktft35 node to support HK 3.5 inch touchscreen shield
  ODROID-C4: dts/amlogic: add new device entry 'hk-lirc-helper'
  ODROID-C4: dts/amlogic: add new devcie entry 'gpio_keypad'
2020-06-12 17:01:04 +09:00
he.he
5d804f257d usb: usb C port bad recognition rate more than 3%. [1/1]
PD#SWPL-21646

Problem:
usb C port bad recognition rate more than 3%.

Solution:
Using new PHY (that starting at TL1) parameters
that is different from the old PHY (g12a).

Verify:
test pass on tl1

Change-Id: I41885936645a90658318883b8556312814430633
Signed-off-by: he.he <he.he@amlogic.com>
2020-06-12 09:45:24 +09:00
Chris KIM
421dbd9150 ODROID-C4: defconfig: Update features.
Change-Id: I2905a268a9cf6d88ff0857c6df7a1158396ffed1
2020-06-12 09:45:24 +09:00
Chris KIM
ef8c882961 ODROID: Update for latest media_module.
to use media_module in 20200314 BSP.

Change-Id: I0364346d3361c49a1ee172d61a606bbacd804692
2020-06-12 09:45:20 +09:00