Commit Graph

129 Commits

Author SHA1 Message Date
junyi.zhao 94679ab923 clk: fix coverity error [1/1]
PD#SWPL-141995

Problem:
coverity error

Solution:
fix it

Verify:
txhd2 be319

Change-Id: I66b792367385100bed5845d8bf4239f79253f6ef
Signed-off-by: junyi.zhao <junyi.zhao@amlogic.com>
2023-10-23 14:27:57 +08:00
Jianxiong Pan 1f6599c5fd zapper: rename CONFIG_AMLOGIC_ZAPPER_CUT_C1A. [1/1]
PD#SWPL-140594

Problem:
rename CONFIG_AMLOGIC_ZAPPER_C1A.

Solution:
CONFIG_AMLOGIC_ZAPPER_CUT_C1A.

Verify:
build pass.

Test:
run on s1a board normally.

Change-Id: I3a8ab8d81af2c4d14b51c117ac16d75f3980adac
Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>
2023-10-09 20:08:39 +08:00
Chuan Liu b7159326ca clk: parent of cpu_dyn_clk is incorrect [1/1]
PD#SWPL-128802

Problem:
cpu_dyn_clk may change parent when setting the frequency,
but set_parent is not executed in the driver

Solution:
Add necessary ops drivers.

Verify:
sc2_ah212

Change-Id: I128f862b8f8201136c3bc92022cb1e5beb1c92b9
Signed-off-by: Chuan Liu <chuan.liu@amlogic.com>
2023-10-07 19:28:16 +08:00
junyi.zhao d1cf92a66a clk: remove invalid flags [1/1]
PD#SWPL-131361

Problem:
there are invalid clock flags on driver

Solution:
remove these invalid flags

Verify:
t7 an400

Change-Id: Ic0295a7cbd800387028feb7d3888c9cc8e9a2ab6
Signed-off-by: junyi.zhao <junyi.zhao@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
2023-09-14 13:31:37 +08:00
yiting.deng c0235b7c43 clk: optimize driver entry function [1/1]
PD#SWPL-136064

Problem:
there are several driver entry in clock driver

Solution:
leave builtin_platform_driver

Verify:
sc2, c1, g12b, s4, s5

Change-Id: I7c34029051a9d85f07aea33ac832dcdc4f588c83
Signed-off-by: yiting.deng <yiting.deng@amlogic.com>
2023-09-13 20:37:11 +08:00
qinglin.li 9d3b531cb4 break_gki: adjust break gki config [2/2]
PD#SWPL-137861

Problem:
adjust break gki config

Solution:
CONFIG_AMLOGIC_BREAK_GKI_20 only break gki2.0
CONFIG_AMLOGIC_BREAK_GKI break gki 1.0 and 2.0

Verify:
local

Change-Id: Ic86c771027980aa24c638d5f89c014240d65ec91
Signed-off-by: qinglin.li <qinglin.li@amlogic.com>
2023-09-05 20:43:25 +08:00
Junyi Zhao 9024efdcd9 clk: pll: change hifi pll source 400m and bypass lock_f [1/1]
PD#SWPL-137041

Problem:
hifi pll crash lock after ESD test

Solution:
bypass hifi pll lock_f bit
and change source to 400m for higher performance

Verify:
txhd2

Change-Id: Iaab34549b28b03cc277caa12b731242f22451507
Signed-off-by: junyi.zhao <junyi.zhao@amlogic.com>
2023-08-21 22:54:07 -07:00
zhiqi.lai d4daf84613 clk: c1: fixed_pll frequency is incorrect [1/1]
PD#SWPL-135820

Problem:
fixed_pll frequency is incorrect

Solution:
fixed

Verify:
c1_ae400

Change-Id: I466441610dcdcdc4e444463f4105d6541fa509a0
Signed-off-by: zhiqi.lai <zhiqi.lai@amlogic.com>
2023-08-17 02:28:57 -07:00
Jianxiong Pan b75016a67d zapper: remove c1a relate code. [1/1]
PD#SWPL-126879

Problem:
memory optimization.

Solution:
remove c1a relate code.

Verify:
s1a.

Test:
run on s1a board normally.

Change-Id: Idbd24a529666278295724f26d10f1a720877ca6a
Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>
2023-08-15 20:09:03 -07:00
jian.hu a28f9036c7 clk: clean up CLK_MESON_PLL_IGNORE_INIT [1/1]
PD#SWPL-136018

Problem:
pll v3 init callback is removed

Solution:
clean up CLK_MESON_PLL_IGNORE_INIT

Verify:
t3x

Change-Id: Ibd61f6bc0ba302464b847198624e353e1bcbf782
Signed-off-by: jian.hu <jian.hu@amlogic.com>
2023-08-15 04:19:40 -07:00
Bichao Zheng 474b6b0d3c spinand: c3 fixed clock source to fix div2 [1/1]
PD#SWPL-136279

Problem:
current clock source is not fixed and may switch to PLL

Solution:
1. fixed clock source to fix div2
2. set default clk to 83MHZ

Verify:
c3

Change-Id: I0cd26da7416884e6ad89033c023477e9c609f3a6
Signed-off-by: Bichao Zheng <bichao.zheng@amlogic.com>
2023-08-15 04:19:36 -07:00
Chuan Liu 0377ab14a9 clk: s1a: lost sar_adc clock [1/1]
PD#SWPL-133117

Problem:
lost sar_adc clock

Solution:
add

Verify:
s1a_bg209

Change-Id: Ie6d3f62cdecc64e113fed51e2c41f93a679aad67
Signed-off-by: Chuan Liu <chuan.liu@amlogic.com>
2023-08-15 10:37:49 +08:00
junyi.zhao 3a6e60597f clk: ignore vdd cpu pwm clk unused [1/1]
PD#SWPL-133117

Problem:
avoid close vdd cpu  pwm clk  when bootup

Solution:
ignore unused pwm clk

Verify:
s1a bg201

Change-Id: I643a100b501ec0df083e99910da7bea0d85573b1
Signed-off-by: junyi.zhao <junyi.zhao@amlogic.com>
2023-08-15 10:36:51 +08:00
Chuan Liu b713a7059f clk: s1a: fix known issues [1/2]
PD#SWPL-133117

Problem:
1 adapts to the new driver
2 some clock descriptions are incorrect
3 unified clock naming Convention

Solution:
fixed

Verify:
s1a_bg209

Change-Id: I4a7296a81b4662978b9aab225bf615ef4ec8747e
Signed-off-by: Chuan Liu <chuan.liu@amlogic.com>
2023-08-15 10:36:50 +08:00
Chuan Liu 43b35e9123 clk: s1a: clock tree bringup [1/2]
PD#SWPL-120773

Problem:
clock tree bringup for s1a

Solution:
add support

Verify:
pxp

Change-Id: I21040ed89cbd969bf71c250ef97b55592e4a43cb
Signed-off-by: Chuan Liu <chuan.liu@amlogic.com>
2023-08-15 10:36:03 +08:00
Jian Hu 628eebb0c6 clk: optimize sys pll setting time [1/1]
PD#SWPL-136018

Problem:
optimize sys pll setting

Solution:
1.remove the unused frequency
2.remove cpu_dyn_clk 1G settings, add
it in probe avoid cpu is 24M during dvfs
3.remove deadcode in clk-pll.c

Verify:
t3x

Change-Id: I64ee9483b1821410029d315f06b83f9748009db3
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
2023-08-13 21:58:36 -07:00
junyi.zhao d509f0b4c6 clk: pll: change txhd2 hifi pll parent to xtal [1/1]
PD#SWPL-132693

Problem:
400MHz parent is not robust.
hifi pll problem with unlock.

Solution:
change hifi pll parent to xtal.

Verify:
txhd2

Change-Id: Iecf761e2d5dd6ac93bcc7a5e02a39ec58cfc0fe7
Signed-off-by: junyi.zhao <junyi.zhao@amlogic.com>
2023-08-09 02:58:40 -07:00
yiting.deng d80ccb8cc4 clk: fix s4 k5.15 hifi pll to 1179.648M [1/1]
PD#SWPL-133578

Problem:
fix hifi_pll to 1179.648M

Solution:
fix hifi_pll to 1179.648M and no set_rate ops

Verify:
s4_ap222

Change-Id: Ia485a8e7e79bcc184746f51f01bc6e40bb4888b6
Signed-off-by: yiting.deng <yiting.deng@amlogic.com>
2023-07-27 02:10:16 -07:00
Chuan Liu d07c53e20b clk: g12a/g12b/sm1: fix vpu modify hifi_pll clock [1/1]
PD#SWPL-131465

Problem:
vpu_sel modify hifi_pll clock

Solution:
1 fix vpu dont change hifi_pll clock
2 set hifi pll init value to 1806335999

Verify:
w400

Change-Id: I70f210cea2beadb56b34155f1a57925b1d5e9a2e
Signed-off-by: Chuan Liu <chuan.liu@amlogic.com>
2023-07-24 22:18:13 -07:00
Jian Hu 5e296698a4 clk: t3x: add 768M for gp1 [1/1]
PD#SWPL-130649

Problem:
gp1 need 768M

Solution:
add 768M

Verify:
t3x

Change-Id: I60e75e89dd2dbf9cd2a4d0f3590482c6bd3cee27
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
2023-07-17 07:13:12 -07:00
Jian Hu a117903841 clk: t3x: add gp1 support [1/1]
PD#SWPL-130649

Problem:
there is no gp1 pll

Solution:
add gp1 support

Verify:
t3x

Change-Id: I47954709035c28e20079de481a960924e68d3629
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
2023-07-09 15:08:35 -07:00
junyi.zhao 3e73a1874e clk: txhd2 revb clk support [1/2]
PD#SWPL-128824

Problem:
support txhd2 revb clk

Solution:
1 add 333.33 and 667 Mhz for cpu dvfs
2 fix gp0 1488Mhz for emmc and gpu

Verify:
TXHD2 REVB

Change-Id: I38ed96de9cef2bf8fe7a0ba73c76e1871db325af
Signed-off-by: junyi.zhao <junyi.zhao@amlogic.com>
2023-07-09 15:08:20 -07:00
yiting.deng 2e2c7b0353 clk: fix kernel5.15 c1 rtc_fix [1/1]
PD#SWPL-128512

Problem:
kernel5.15 c1 rtc_clk configuration error

Solution:
fix rtc_clk error configuration

Verify:
c1_ae400

Change-Id: I7e5750550a93d29ed4d3cc3b20fdcdabe769b959
Signed-off-by: yiting.deng <yiting.deng@amlogic.com>
2023-07-07 17:05:50 +08:00
yiting.deng 1439098f49 clk: adapt cpu_dyn_clk in c1 branch [1/1]
PD#SWPL-128494

Problem:
1 not support non-secure ops function for cpu_cyn_clk
2 When c1 describes the same frequency, the corresponding
defined frequency is different.

Solution:
1 add non-secure ops function for cpu_cyn_clk
2 unify frequency to 666666666Hz

Verify:
c1_ae400

Change-Id: Idec9a54d7010e18336be02fd488239dd7114986b
Signed-off-by: yiting.deng <yiting.deng@amlogic.com>
2023-07-07 14:33:12 +08:00
Chuan Liu 24330ae569 clk: c1: fclk_div2p5 frequency is incorrect [1/1]
PD#SWPL-126345

Problem:
fclk_div2p5 frequency is incorrect

Solution:
fixed

Verify:
c1_ae400

Change-Id: I2b47ac4fdcd2e51613c676372fffadd97d549766
Signed-off-by: Chuan Liu <chuan.liu@amlogic.com>
2023-07-07 14:28:27 +08:00
Chuan Liu b5a9102fa4 clk: c1: update clock tree [1/1]
PD#SWPL-124230

Problem:
1 fclk50m is not added to clock tree;
2 dsp clk failed to set the frequency;
3 clkid incorrectly defined.

Solution:
fixed

Verify:
c1_ae400

Change-Id: Ieef2f603f72a6b0104b295b37c4a9ec448923d7c
Signed-off-by: Chuan Liu <chuan.liu@amlogic.com>
2023-07-07 14:28:26 +08:00
Chuan Liu e3d9857b0f clk: c1: clock tree bringup [1/1]
PD#SWPL-121112

Problem:
clock tree bringup for c1

Solution:
support

Verify:
c1_ae400

Change-Id: Iaeacc52b6ac8266604614c2394d4a867e6edc203
Signed-off-by: Chuan Liu <chuan.liu@amlogic.com>
2023-07-07 12:49:28 +08:00
Qianggui Song 6403737bed zapper: Memory optimizations after txhd2 merge trunk [1/1]
PD#SWPL-130072

Problem:
Zapper size increase after txhd2 merge back to trunk

Solution:
optimize some code and add macro to reduce size
module: pinctrl, clk-measure, adc, audio, tvin, dtv_demod
ddr_port_desc, and amvecm

Verify:
Zapper

Change-Id: I0c781a657811cf664ffdbb4d9c18060e9b39554e
Signed-off-by: Qianggui Song <qianggui.song@amlogic.com>
2023-07-05 03:10:39 -07:00
junyi.zhao 091fa0738d clk: support pll range driver on 32bit os [1/1]
PD#SWPL-125774

Problem:
there is no range driver on 32bit os

Solution:
support

Verify:
TXHD2 be319

Change-Id: Ie8e40ade1c577d62a5cb551a4b3b08dd9d6056ac
Signed-off-by: junyi.zhao <junyi.zhao@amlogic.com>
2023-06-30 03:15:07 -07:00
Feng Chen e9d1ced61e spicc: txhd2 bringup [1/1]
PD#SWPL-125778

Problem:
txhd2 spicc bringup.

Solution:
add spicc support.

Verify:
txhd2_be319

Change-Id: I7183af777c675142adc4372afbe6dc7ad9d136cc
Signed-off-by: Feng Chen <feng.chen@amlogic.com>
2023-06-29 10:38:52 +08:00
junyi.zhao c69ea1ba48 clk: add dmux clk [1/1]
PD#SWPL-125774

Problem:
there is no dmux

Solution:
fix it

Verify:
TXHD2 be319

Signed-off-by: junyi.zhao <junyi.zhao@amlogic.com>
Change-Id: Idc946009ed96e9d718f191f2d6ec02b01a1e6894
2023-06-29 10:34:02 +08:00
junyi.zhao 458a6011a1 clk: lock mali clk parent to gp0 [1/1]
PD#SWPL-125774

Problem:
mali clk need parent lock  gp0

Solution:
add mali clk parent gp0 and lock it

Verify:
TXHD2 be319

Signed-off-by: junyi.zhao <junyi.zhao@amlogic.com>
Change-Id: Ib4132b2e913111c010b0a788246168aa9c34695a
2023-06-29 10:34:02 +08:00
junyi.zhao 54f1d72b45 clk: add clkmsr table [1/1]
PD#SWPL-125774

Problem:
there is no clkmsr table

Solution:
add table

Verify:
TXHD2 be319

Signed-off-by: junyi.zhao <junyi.zhao@amlogic.com>
Change-Id: If133b752db33b02b6c95b567dfe6bc842531e328
2023-06-29 10:34:02 +08:00
Jian Hu ae557798a5 clk: add sys pll and cpu clk support [1/1]
PD#SWPL-125774

Problem:
txhd2 bringup

Solution:
add sys pll and cpu clk support

Verify:
txhd2 be311

Change-Id: I6283d3c12729382b5e1c69c0de1d7c54ae4f20f1
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
2023-06-29 10:34:02 +08:00
Jian Hu a8eca5c400 hdmiin: panic when hdmiin 5.15+ P [2/2]
PD#SWPL-125482

Problem:
hifi pll lock failed

Solution:
update hifi pll parameter

Verify:
T3

Change-Id: I6adb8552f9255aa52dd84b250e6318ef0e956e04
Signed-off-by: lijun.meng <lijun.meng@amlogic.com>
2023-06-29 10:33:59 +08:00
junyi.zhao de73569ad7 clk: support txhd2 clk [1/1]
PD#SWPL-118428

Problem:
there is no txhd2 clk driver

Solution:
need to support clk driver

Verify:
TXHD2 PXP

Change-Id: I15f13c03768185a36a6a0eb607ff3835eaacd5b0
Signed-off-by: junyi.zhao <junyi.zhao@amlogic.com>
2023-06-29 10:33:57 +08:00
Chuan Liu 964c07ba87 clk: adapt cpu_dyn_clk [1/1]
PD#SWPL-118802

Problem:
1 not support non-secure ops function for cpu_cyn_clk
2 When each chip describes the same frequency, the corresponding
defined frequency is different.

Solution:
1 add non-secure ops function for cpu_cyn_clk
2 unify frequency to 666666666Hz

Verify:
all about board

Change-Id: Ia9fe27291ead5a56ed737c6f6aea97fbcddfd44f
Signed-off-by: Chuan Liu <chuan.liu@amlogic.com>
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
2023-06-13 21:00:26 -07:00
ziyi 1ffcc64f28 c2: kernel add sdr50 speed sdio [1/1]
PD#SWPL-125353

Problem:
sdr50 speed sdio wifi has some init err

Solution:
revise clk config

Verify:
c2

Change-Id: I443be472092a21dd322824076202ac214c9f12e6
Signed-off-by: ziyi <ziyi.huang@amlogic.com>
2023-05-29 00:55:39 -07:00
junyi.zhao 6ac1d66ccf t3: clk: fix 32bit hifi clk erro [1/1]
PD#SWPL-124395

Problem:
hifi clk rate is zero on 32bit

Solution:
support 32bit clk

Verify:
local ar321 & ar301

Change-Id: Ibd5a86d3b27a32b5206b39cff3a78be784b3bc9a
Signed-off-by: junyi.zhao <junyi.zhao@amlogic.com>
2023-05-24 20:06:57 -07:00
Dezhen Wang 72111cf847 Configs: delete the config which default to y [1/1]
PD#SWPL-121364

Problem:
some configs are set to y by default

Solution:
change to n by default in Kconfig files

Verify:
local

Change-Id: I36edad847fa0767d75202be89e749149761d44dc
Signed-off-by: Dezhen Wang <dezhen.wang@amlogic.com>
2023-05-23 01:42:16 -07:00
Xingxing Wang f4db6fac9e dvfs: correct cpu frequency from 2016M to 2004M [1/1]
PD#SWPL-117216

Problem:
correct 2016M to 2004M

Solution:
correct 2016M to 2004M

Verify:
t3x bc309

Change-Id: I4692f819b29ebd5e9a703e7309dbf27f292b89ca
Signed-off-by: Xingxing Wang <xingxing.wang@amlogic.com>
2023-05-18 21:08:41 +08:00
Jian Hu 07e9e0373c clk: fix hdmirx axi clock [1/1]
PD#SWPL-117193

Problem:
hdmirx axi clk does not work

Solution:
fix hdmirx axi clock

Verify:
t3x

Change-Id: If91f88b2645932d4b63222eca70db1a382833371
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
2023-05-18 21:08:39 +08:00
jian.hu 01fe34d579 clk: add sys2 pll random frequency support [1/1]
PD#SWPL-117193

Problem:
sys2 pll does not support 852M

Solution:
add sys2 pll random frequency support

Verify:
t3x bc302

Change-Id: Id8719e3687df5e161266f535a84aee3feb8feb8d
Signed-off-by: jian.hu <jian.hu@amlogic.com>
2023-05-18 21:08:39 +08:00
jian.hu 883034ed3a clk: add vafe clock [1/1]
PD#SWPL-117193

Problem:
vafe clock is missing

Solution:
add vafe clock

Verify:
t3x bc311

Change-Id: Id7494e44118392a7e21deddb94cc60e26d799f51
Signed-off-by: jian.hu <jian.hu@amlogic.com>
2023-05-18 21:08:39 +08:00
jian.hu e28eb409e7 clk: add cpu and sys pll support [1/1]
PD#SWPL-117193

Problem:
t3x sys pll does not work well for dvfs

Solution:
add cpu and sys pll support

Verify:
t3x

Change-Id: Ia615b66b1ebd8c04b6d66679b73e6261615767f6
Signed-off-by: jian.hu <jian.hu@amlogic.com>
2023-05-18 21:08:39 +08:00
Jian Cao 5f8291bd0f vpu: add support for t3x [1/1]
PD#SWPL-111639

Problem:
need support t3x vpu top

Solution:
add t3x vpu top support

Verify:
t3x skt

Change-Id: Ic50ca73814b17f3a2e2dc0ef49899dfe525d0be5
Signed-off-by: Jian Cao <jian.cao@amlogic.com>
2023-05-18 21:08:38 +08:00
Jian Hu 65f3fe95e1 clk: fix hevc clock [1/1]
PD#SWPL-111593

Problem:
hevc clock does not work

Solution:
fix hevc clock

Verify:
t3x mimic

Change-Id: I8aab29d01fe57d2179a4acaf9e3454f7cb9f1a19
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
2023-05-18 21:08:38 +08:00
Jian Hu 1a08f478c2 clk: add t3x clk support [1/1]
PD#SWPL-111593

Problem:
t3x clk bringup

Solution:
add t3x clk support

Verify:
t3x mimic

Change-Id: I97b83b7d53a8ad932685f7d5e606b75ccb73ed37
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
2023-05-18 21:08:38 +08:00
Xingxing Wang 38e920fb62 dvfs: change cpu frequency point from 1920M to 1908M [1/1]
PD#SWPL-123421

Problem:
change opp 1920M to 1908M

Solution:
change opp 1920M to 1908M

Verify:
T5M

Change-Id: I8f3a42f482761d170cf93ceb1e6f63e32e4a121d
Signed-off-by: Xingxing Wang <xingxing.wang@amlogic.com>
2023-05-15 04:53:00 -07:00
Chuan Liu ead62be58a clk: c3: don't init gp0_pll [1/1]
PD#SH-13928

Problem:
gp0_pll is initialized in uboot and is re-initialized after entering
the kernel, LCD display is abnormal.

Solution:
don't init gp0_pll in kernel

Verify:
C308L-AW419

Change-Id: I5bade98e4f6009dec5437d960be2e3375c16e74e
Signed-off-by: Chuan Liu <chuan.liu@amlogic.com>
2023-04-27 02:51:23 -07:00