Commit Graph

649406 Commits

Author SHA1 Message Date
Tao Zeng
1c6bee9686 dmc: adding a data to identify violation stauts [1/1]
PD#TV-5802

Problem:
irq of dmc violation happens very qiuckly, which may
have some wrong report if violation print in workqueu.

Solution:
Add a data to identify it. If data is null, then it's a
fake violation

Verify:
txhd

Change-Id: I402763fa2d20cfae3dc2d9647f7b2c2fb29ce966
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
2020-06-29 11:45:31 +09:00
Lei Qian
1965a80ac2 ddr: fix compile error [1/1]
PD#SWPL-6865

Problem:
sm1 cause compile error

Solution:
add SM1 chip id

Verify:
marconi

Change-Id: Ic3932b6f746c6eb03ab35b6c5a7ea4802457ab46
Signed-off-by: Lei Qian <lei.qian@amlogic.com>
2020-06-29 11:45:31 +09:00
Lei Qian
392e43a794 ddr: fix compile error [1/1]
PD#SWPL-6865

Problem:
sm1 cause compile error

Solution:
delete SM1 chip id

Verify:
marconi

Change-Id: Ieb3980db41772ffb1db05ab9ac7df0e05f4ec74c
Signed-off-by: Lei Qian <lei.qian@amlogic.com>
2020-06-29 11:45:31 +09:00
Tao Zeng
dc59ba248b ddr: bring up bandwidth support for sm1 [1/1]
PD#SWPL-6865

Problem:
ddr bandwidth measure is not supported on sm1

Solution:
1. Add port description and support for it
2. Record max/average bandwidth support;
3. Support up to 60 continue bandwidth sample
4. Fix bit mismatch of dmc monitor for sm1/tl1.

Verify:
sm1

Change-Id: I0b42db8214099b9cd6d1c3f00174dc65eebfc030
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
2020-06-29 11:45:30 +09:00
Tao Zeng
52d4640db5 dmc: fix panic problem when show memory in highmem [1/1]
PD#SWPL-2767

Problem:
If DMC violation address is in highmem, then it will panic
when show memory using page_address();

Solution:
map violation address for highmem

Verify:
p212

Change-Id: Ib6213eaab42b129c8c0a381511a0b3376b0d3e66
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
2020-06-29 11:45:30 +09:00
xianjun.liu
3d29868fd0 mtd: nand: support new slc nand [2/2]
PD#SWPL-14719

Problem:
4Gb SLC nand MT29F4G08ABAFAWP,MX30LF4G28AD requsted by Market

Solution:
add the nand id into amlogic nand flash id table

Verify:
AXG-S400

Change-Id: If2bd3cc90585b2a3cbcd500a9354cde4c65bc355
Signed-off-by: xianjun.liu <xianjun.liu@amlogic.com>
2020-06-29 11:45:30 +09:00
xianjun.liu
3f85e1fc88 mtd: nand: support new slc nand [2/2]
PD#SWPL-10125

Problem:
2Gb SLC Nand GD9FU2G8F2AMGI requested by Marketing

Solution:
add the nand id into amlogic nand flash id table

Verify:
AXG_S400

Change-Id: I0ebaa8322d471af7c01857ed2b39046917aad7ab
Signed-off-by: xianjun.liu <xianjun.liu@amlogic.com>
2020-06-29 11:45:30 +09:00
Yi Zeng
6769943d9c mtd: nand: support new slc nand [1/1]
PD#SWPL-4511

Problem:
1Gb SLC Nand ZDND1G08U3D-IA requested by Marketing
aka ZDND1G08U3D-xx module number in code

Solution:
add the nand id into amlogic nand flash id table

Verify:
AXG_S400

Change-Id: I4e221497b801239aa62f62f844ff247fa05925d0
Signed-off-by: Yi Zeng <yi.zeng@amlogic.com>
2020-06-29 11:45:30 +09:00
xianjun.liu
b42dd660bb MTD: slc-nand: fix signed integer overflow in erase_bootloader [1/1]
PD#SWPL-11771

Problem:
Hackers can use signed integer erase_boot_num to cause systems crash

Solution:
replace signed variable with unsigned variables

Verify:
AXG-S400

Change-Id: I9cc8d8f43c199f48e7d7bff2664bca740681d274
Signed-off-by: xianjun.liu <xianjun.liu@amlogic.com>
2020-06-29 11:45:30 +09:00
xianjun.liu
7638c27a6b MTD: slc-nand: fix boot system failed due to pointer out-bounds operating [1/1]
PD#SWPL-15894

Problem:
The audio 113D platform + TC58NVG2S0HTA00 boot system failed due
to pointer out-bounds operating

Solution:
reduce oobavail value to avoid pointer access overbounds

Verify:
AXG-S400

Change-Id: I737d16b937b39b0b03c9248e6688c1158face3b5
Signed-off-by: xianjun.liu <xianjun.liu@amlogic.com>
2020-06-29 11:45:30 +09:00
xianjun.liu
9379602caf MTD: reset some important buf before free the buf [1/1]
PD#SWPL-11772

Problem:
Inadequate clearing of keys/dtbs/env buf in memory

Solution:
clear the corresponding buf before free the buf

Verify:
AXG-S400

Change-Id: I61971c11a41c7062270a3863ae711c856d66f332
Signed-off-by: xianjun.liu <xianjun.liu@amlogic.com>
2020-06-29 11:45:30 +09:00
xianjun.liu
ab13c34734 Mtd: fix check return value for copy_from_user in uboot_write method [1/1]
PD#SWPL-11776

Problem:
missing return value check for copy_from_user in uboot_write method

Solution:
checking return value after call copy_from_user/copy_to_user

Verify:
AXG-S420

Change-Id: I087a341cbf0b603b2898e81773dc266d8e3debe1
Signed-off-by: xianjun.liu <xianjun.liu@amlogic.com>
2020-06-29 11:45:30 +09:00
xianjun.liu
2c1b501094 MTD: Coverity defect cleanup: MTD [1/1]
PD#SWPL-13991

Problem:
Out-of-bounds read in get_free_node

Solution:
fix the issue

Verify:
AXG400

Change-Id: I6e41caf3b3118d524218d6023fb51df692865cba
Signed-off-by: xianjun.liu <xianjun.liu@amlogic.com>
2020-06-29 11:45:30 +09:00
Liang Yang
6e0b454867 nand: adjust nand info page for ddr parameter function [1/1]
PD#SWPL-7804

Problem:
OTA upgrade would fail because nand info page no consisent

Solution:
Keep nand info page consisent between bl2/bl33/kernel

Verify:
s420

Change-Id: Icef5f720ba80e5f639b4ee7d1f1201833d5a5656
Signed-off-by: Liang Yang <liang.yang@amlogic.com>
2020-06-29 11:45:30 +09:00
xianjun.liu
93aa1ac99a MTD: spin_lock stuck problem about marking bad block for mtd driver [1/1]
PD#SWPL-5613

Problem:
boot fail because of the UBI write error

Solution:
fixed nested-calls spin-lock when update bbt

Verify:
AXG-S420

Change-Id: I56b603ebffa5557ab7949ead2fddd41323346d09
Signed-off-by: xianjun.liu <xianjun.liu@amlogic.com>
2020-06-29 11:45:30 +09:00
Rongjun Chen
f4a1fa707a wifi: chang the static buf to support ap6356 [2/2]
PD#SWPL-12561

Problem:
ap6356 open fail

Solution:
update static buf to fix it

Verify:
ampere

Change-Id: Iec415b0dcf46b3e5574bcb3673d5129b4f35c802
Signed-off-by: Rongjun Chen <rongjun.chen@amlogic.com>
2020-06-29 11:45:29 +09:00
qiu.zeng
a2d893177b BT: bt mac write [1/3]
PD#OTT-1590

Problem:
bt mac write

Solution:
Accept the MAC address from uboot and create nodes

Verify:
Verifying on Public Edition P212

Change-Id: I77ff3543aff937adc07bf3a0933a350c27e9dd20
Signed-off-by: Qiu Zeng <qiu.zeng@amlogic.com>
2020-06-29 11:45:29 +09:00
Yan Wang
f00819eb22 dolbyfw: axg: update for sonos dolby fw [1/1]
PD#SH-561

Problem:
sonos dolby fw request

Solution:
update critical data interface for dolby fw request;
compatible with trunk dolby fw.

Verify:
S400

Change-Id: Id20d9c9867f3e5de4ea5ca9bb260cbac152a99df
Signed-off-by: Yan Wang <yan.wang@amlogic.com>
2020-06-29 11:45:29 +09:00
Zhongfu Luo
e002c5fbce unifykey: support operate efusekey for 32bit [1/1]
PD#TV-7131

Problem:
unifykey: can operate efusekey under 32bit

Solution:
unifykey: add operate efusekey support for 32bit

Verify:
TL1 skt board verify pass

Change-Id: I0e0175554e180bb70da01e751ec5bcde4771c7a6
Signed-off-by: Zhongfu Luo <zhongfu.luo@amlogic.com>
2020-06-29 11:45:29 +09:00
Yan Wang
19c12e7f88 pixel_probe: tl1 add pixel probe control for debug [1/1]
PD#SWPL-9137

Problem:
tl1 add APIs to control pixel probe for debug

Solution:
tl1 add APIs to control pixel probe for debug

Verify:
X301

this commit MUST not be merged into trunk!!!

Change-Id: I3a538ff3afdd80ef5669fac63a3ab5f43b8e1055
Signed-off-by: Yan Wang <yan.wang@amlogic.com>

Conflicts:
	arch/arm/configs/meson64_a32_defconfig
	arch/arm64/configs/meson64_defconfig
	drivers/amlogic/Kconfig
2020-06-29 11:45:29 +09:00
Jiamin Ma
04fedcc7e8 debug: add more strict checking for show_regs [2/2]
PD#SWPL-7711

Problem:
Executing echo l > /proc/sysrq-trigger each 5 seconds for about
15 minius will trigger hardlockup

Solution:
Add more strict checking for show_regs to filter out addresses
in secure monitor region and ioremap region, deferencing which
triggers external abort on none-linefetch, and finally leading
to hardlockup

Verify:
Locally pass on U200

Change-Id: I6bd219e7dc3ad29904e6bd1b7d2f4cfb3928d8ed
Signed-off-by: Jiamin Ma <jiamin.ma@amlogic.com>
2020-06-29 11:45:29 +09:00
Jianxin Pan
27b4db3b95 debug: save irqflag locally when ftrace_ramoops io [1/1]
PD#SWPL-6028

Problem:
save irqflag locally when ftrace_ramoops io

Solution:
save irqflag locally when ftrace_ramoops io

Verify:
TL1 x301

Change-Id: I6df9700cceaccc97dc983d88ada73197a6968f73
Signed-off-by: Jianxin Pan <jianxin.pan@amlogic.com>
2020-06-29 11:45:29 +09:00
Jianxiong Pan
1d7f8c0b11 paddr16: add paddr16 to get register values for 16-bits aligned address. [1/1]
PD#SWPL-6718

Problem:
paddr just can get register and memory values for 32-bits aligned address.

Solution:
add paddr16 to get register or memory values for 16-bits aligned address.

Verify:
g12b w400_a

Change-Id: Ic7f32dcc6c2a24d0ac1e8c3ed60acc27e81887e0
Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>
2020-06-29 11:45:29 +09:00
shaochan.liu
6ba4a9a0a3 lcd: add driver for pmu data check [2/2]
PD#TV-6928

Problem:
CS602 need pmu data check

Solution:
add i2c_CS602 driver with pmu data check

Verify:
t962x3_ab301

Change-Id: I1d1f33cbb63cb4f3b3fc308d610411091cb2a65d
Signed-off-by: shaochan.liu <shaochan.liu@amlogic.com>
2020-06-29 11:45:29 +09:00
zhiqiang liang
6e3a7df6c9 soc: add mailbox interface for dsp sec reg ops [3/3]
PD#SWPL-6583

Problem:
tm2 dsp bring up

Solution:
add the mbox interface

Verify:
AB311

Change-Id: Ifddb9bb0b22c651c5a0e02c2200874dcaa6dc2ce
Signed-off-by: zhiqiang liang <zhiqiang.liang@amlogic.com>
2020-06-29 11:45:29 +09:00
Shunzhou Jiang
63979402f2 mbox: g12a: add m4 mbox driver [1/3]
PD#SWPL-12873

Problem:
add m4 mailbox driver

Solution:
add m4 mailbox driver

Verify:
test pass on sm1 skt

Change-Id: Ied77949482179014d9e695ffc606f2ac939c82ca
Signed-off-by: Shunzhou Jiang <shunzhou.jiang@amlogic.com>
2020-06-29 11:45:29 +09:00
Lei Qian
655609aed1 mailbox: merge from mainline
PD#SWPL-15312

Change-Id: I5dc77c20de33045f76bd41078684271da2257ff5
Signed-off-by: Lei Qian <lei.qian@amlogic.com>
2020-06-29 11:45:29 +09:00
Yi Zeng
cd4cf3b28c mtd: nand: support new slc nand [1/1]
PD#SWPL-3542

Problem:
2Gb SLC Nand ZDND2G08U3D-IA requested by Marketing
aka ZDND2GXXXXX module number

Solution:
add the nand id and MFR id into amlogic id table
adapt it's bad block identification

Verify:
AXG_S400

Change-Id: I6f0e2caf424e09c1f186beb42a146d92b675f161
Signed-off-by: Yi Zeng <yi.zeng@amlogic.com>
2020-06-29 11:45:28 +09:00
Lei Qian
ea62328656 pcie: merge from mainline
PD#SWPL-15312

Change-Id: I221aab43279c9fbac22c039a9c0ba186c356e73c
Signed-off-by: Lei Qian <lei.qian@amlogic.com>
2020-06-29 11:45:28 +09:00
Qianggui Song
e4597355b5 irqchip: fix WARNNING of lockdep [1/1]
PD#SWPL-14700

Problem:
When open lockdep there is a warnning:
WARNING: HARDIRQ-safe -> HARDIRQ-unsafe lock order detected

Solution:
use hardirq-safe lock to protect critical sections

Verify:
g12a

Change-Id: Icd7550efcdefb5589d248b862b77919db8581484
Signed-off-by: Qianggui Song <qianggui.song@amlogic.com>
2020-06-29 11:45:28 +09:00
Qianggui Song
8ef52279a4 irqchip: tm2 irqchip support [1/1]
PD#SWPL-5651

Problem:
tm2 has 2 extra pins than tl1, should use new param data

Solution:
add tm2 param data

Verify:
T962e2_ab319

Change-Id: I77aaaead7b10024cd5f12354ba6b47db74ba96f5
Signed-off-by: Qianggui Song <qianggui.song@amlogic.com>
2020-06-29 11:45:28 +09:00
Qianggui Song
4f17e99a9b irqchip: sm1 support double-edge gpio irq trigger [1/1]
PD#SWPL-5395

Problem:
sm1 support double-edge trigger, current code do not support.

Solution:
add relatvie bitmask to support this function.

Verify:
ptm & sm1_skt

Change-Id: I48ebc9b38db868f946c49b6fd5f98d427b2669df
Signed-off-by: Qianggui Song <qianggui.song@amlogic.com>
2020-06-29 11:45:28 +09:00
Kuibao Zhang
dd3a75038e BT: add a gpio interrupt for bt [1/1]
PD#TV-5021

Problem:
    1.bt rcu cann't wakeup host when the system is in freeze mode;
    2.There is no wake source in the bluetooth kernel.
    3.current irqchip driver will complain "Unbalanced IRQ xx wake
    disable" when gpio irq use as wakeup source, and can not wake device.

Solution:
    1.add a gpio interrupt for bt in the bt kernel;
    2.Wake up the interrupt;
    3.Add a flag to skip undefined  .irq_set_wake function in irqchip
    driver.

Verify:
    marconi.

Change-Id: Ic8d5525621e015a13fd765779f944cd1010144aa
Signed-off-by: Kuibao Zhang <kuibao.zhang@amlogic.com>
2020-06-29 11:45:28 +09:00
Lei Qian
1a7ba29cd0 irblaster: merge from mainline
PD#SWPL-15312

Change-Id: I107a28371f701c5d3207ca0b70ea9fd61650c9ab
Signed-off-by: Lei Qian <lei.qian@amlogic.com>
2020-06-29 11:45:28 +09:00
Bichao Zheng
6c7f413846 irblaster: meson: add support for tl1 [1/1]
PD#172587

Problem:
1.Bringup TL1.
2.Invalid frequency setting

Solution:
1.Add ir blaster device tree for tl1.
2.Add frequency setting

Verify:
verify on tl1.

Change-Id: I51759e32577172ff766fd4d50f92a00ef77c7495
Signed-off-by: Bichao Zheng <bichao.zheng@amlogic.com>
2020-06-29 11:45:28 +09:00
Xingyu Chen
08edcce8a4 wdt: add option to avoid the wdt is disabled casually [1/1]
PD#SWPL-14925

Problem:
The system can't be reset by wdt which is fed by the tv-service
when the tv-service is abnormally hanged.

Solution:
Add extra option to avoid the wdt is disabled when the fed dog
thread aborts, but we can disable wdt when certain condition is
met.

Verify:
test pass on customer board

Change-Id: I1fd5ff4e36f06bda99726c0a2ced399299596f95
Signed-off-by: Xingyu Chen <xingyu.chen@amlogic.com>
2020-06-29 11:45:28 +09:00
binqi zhang
b91690cd21 memtrack: enable memtrack on AndroidP [3/3]
PD#SWPL-14976

Problem:
GFX memtrack is absent

Solution:
Update memtrack from nougat

Verify:
adb shell dumpsys meminfo
Confirm GL / EGL entries

Change-Id: I1aa1ba8b8dab3103d7102ee718732881bec68ca5
Signed-off-by: binqi zhang <binqi.zhang@amlogic.com>
2020-06-29 11:45:28 +09:00
lei qian
bb06bb4196 Revert "memtrack: enable memtrack on AndroidP [3/3]"
This reverts commit 682b4fd1e67891dc5bf7736552428bc3391ae6e9.
2020-06-29 11:45:28 +09:00
binqi zhang
d5781ee315 memtrack: enable memtrack on AndroidP [3/3]
PD#SWPL-14976

Problem:
GFX memtrack is absent

Solution:
Update memtrack from nougat

Verify:
adb shell dumpsys meminfo
Confirm GL / EGL entries

Change-Id: I1aa1ba8b8dab3103d7102ee718732881bec68ca5
Signed-off-by: binqi zhang <binqi.zhang@amlogic.com>
2020-06-29 11:45:28 +09:00
Jianxin Pan
2863ee62b8 Revert "Revert "io: make register access in amvecm simple [1/1]""
merge after https://jira.amlogic.com/browse/SWPL-16378 is fixed.

This reverts commit 8f2983fb44.

Change-Id: If914ba7009d7858206d95bc61dd714d156b0924c
2020-06-29 11:45:27 +09:00
changqing.gao
dd4da0dee8 iomap: fix coverity errors [1/1]
PD#SWPL-13972

Problem:
iomap Coverity errors.

Solution:
1. remove verbose code.
2. check return value.

Verify:
test pass on tm2_ab301_v1

Change-Id: Ib8c2baaae63d3c6454ffa45a0c353a6dd9de0787
Signed-off-by: changqing.gao <changqing.gao@amlogic.com>
2020-06-29 11:45:27 +09:00
Matthew Shyu
617c1d1c5f crypto: fix and enable aes dma on G12B [1/1]
PD# SWPL-4823

Problem:
1. After stack optimization, stack memory cannot be
mapped as dma buffers and thus causing crypto dma failed to
generate correct result.
2. crypto dma was not enabled on G12B

Solution:
1. Move key_iv buffer from stack to memory provided by kzalloc
2. Enable crypto dma on G12B
3. Replace module_param with debugfs
4. Replace pr_err with dev_err

Verify:
verified on G12B

Change-Id: I6de682e3d1fc141f8c6179c7d91f9b4bff165eae
Signed-off-by: Matthew Shyu <matthew.shyu@amlogic.com>
Signed-off-by: Mingyen Hung <mingyen.hung@amlogic.com>
2020-06-29 11:45:27 +09:00
Hong Guo
6898f707ff reboot: add ffv_reboot mode [1/1]
PD#TV-10685

Problem:
add ffv_reboot mode

Solution:
add ffv_reboot mode

Verify:
test pass on tl1_x301

Change-Id: Ifdeb1819d89a54acbfebba0bcfe0865ea5c4ba5b
Signed-off-by: Hong Guo <hong.guo@amlogic.com>
2020-06-29 11:45:27 +09:00
Hong Guo
6b66f214a4 reboot: add reboot reason sys infterface [1/1]
PD#TV-9896

Problem:
provide sys interface to get last reboot reason

Solution:
add reboot reason sys infterface

Verify:
test pass on tl1_x301

Change-Id: I6c4046c892eff9f92506fadb0cddee7041c8f882
Signed-off-by: Hong Guo <hong.guo@amlogic.com>
2020-06-29 11:45:27 +09:00
Hong Guo
3b674db635 reboot: get corrent reboot reason in system panic [1/1]
PD#TV-2272

Problem:
can't get corrent reboot reason in system panic

Solution:
get corrent reboot reason in system panic

Verify:
test pass on T962x2_x301

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

Change-Id: If553c37a69e0f29f2f213a1700fd15d8477ed9b9
Signed-off-by: Lei Qian <lei.qian@amlogic.com>
2020-06-29 11:45:27 +09:00
Hong Guo
ccf064f82e supsend: update gx_pm driver [1/1]
PD#SWPL-7226

Problem:
update gx_pm driver

Solution:
update gx_pm driver

Verify:
test pass on tl1_x309

Change-Id: If078b0744cb8ce46029d77512d5755f4d40c2014
Signed-off-by: Hong Guo <hong.guo@amlogic.com>

Conflicts:
	arch/arm/boot/dts/amlogic/mesong12b_a.dtsi
	arch/arm/boot/dts/amlogic/mesontm2.dtsi
	arch/arm64/boot/dts/amlogic/mesong12b_a.dtsi
	arch/arm64/boot/dts/amlogic/mesontm2.dtsi
2020-06-29 11:45:27 +09:00
Lei Qian
1fd2cc2bfc pinctrl: merge from mainline
PD#SWPL-15312

Change-Id: I46106dd8f154fedd6ac409e4e1e87aa6f00eaccf
Signed-off-by: Lei Qian <lei.qian@amlogic.com>
2020-06-29 11:45:27 +09:00
Qianggui Song
15cf4ac5d4 pinctrl: fix tl1 bt656 wrong configuration [1/1]
PD#SWPL-5360

Problem:
According to TL1-core-pin-mux-register-spec.xlsx:
bt656 pins function number is 3 but not 2.

Solution:
bt656 func change 2-->3

Verify:
TL1-sktboard

Change-Id: I740e0a446ef2b6018b2eca706548148b8c9d1156
Signed-off-by: Qianggui Song <qianggui.song@amlogic.com>
2020-06-29 11:45:26 +09:00
Qianggui Song
b4b86acd18 pinctrl: rename m8b pinmux function gpio to gpio_periphs [1/2]
PD#SWPL-4501

Problem:
All platforms but m8b use "gpio_periphs" as gpio pinctrl function, that
breaks consistency.

Solution:
rename m8b pinctrl function "gpio" to "gpio_periphs" to make it
consistent with code and other platform.

ref:
https://patchwork.kernel.org/patch/10720219/

Verify:
m200

Change-Id: I940d1e30882cc8b042c02022ed3435a659aa3921
Signed-off-by: Qianggui Song <qianggui.song@amlogic.com>
2020-06-29 11:45:26 +09:00