Commit Graph

78 Commits

Author SHA1 Message Date
jian.hu 03c0bd6aae clk: fix global-out-of-bounds in rtc clk [1/1]
PD#SWPL-180321

Problem:
there is global-out-of-bounds

Solution:
1.fix rtc global-out-of-bounds
2.update rtc clocks

Verify:
t6d br301

Change-Id: I08ada01d6c055e6983a33b6c2db99e4c70125508
Signed-off-by: jian.hu <jian.hu@amlogic.com>
2024-08-22 14:27:53 +08:00
jian.hu 4733a6fb58 clk: add usb pll and usb clock [1/1]
PD#SWPL-180321

Problem:
there are no usb pll and usb clock

Solution:
add usb pll and usb clock

Verify:
t6d br301

Change-Id: I24f381493a3f8d7d3510252fdc35ab2eb9b09b7e
Signed-off-by: jian.hu <jian.hu@amlogic.com>
2024-08-22 14:27:52 +08:00
jian.hu db9d456652 clk: add amfc clk support [1/1]
PD#SWPL-180321

Problem:
it does not support amfc

Solution:
add amfc support

Verify:
t6d br301

Change-Id: Idb0d1d8aa3571402a636bd75018735fcb82bc489
Signed-off-by: jian.hu <jian.hu@amlogic.com>
2024-08-22 14:27:52 +08:00
jian.hu b97695c773 clk: correct eth phy clock name [1/1]
PD#SWPL-180321

Problem:
there is no eth phy clock

Solution:
correct eth phy clock name

Verify:
t6d br301

Change-Id: Ie8ff90cf998c4a8064f01e4e52d63b7e284b4dd3
Signed-off-by: jian.hu <jian.hu@amlogic.com>
2024-08-22 14:27:51 +08:00
Jian Hu 3e86a15c72 clk: add cpu clock [1/2]
PD#SWPL-166006

Problem:
t6d bringup

Solution:
1.fix rtc_32k
2.add cpu clk

Verify:
pxp

Change-Id: If0156b569b577fce2b01a8f8f4d2f1d510cfdd23
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
2024-08-22 14:27:50 +08:00
Jian Hu 822ddf5a2b clk: add t6d support [1/1]
PD#SWPL-166006

Problem:
t6d bringup

Solution:
add clk support

Verify:
pxp

Change-Id: Ia365d5a4aa389dbcd6f57b0df6da07f799e28790
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
2024-08-22 14:27:49 +08:00
Chuan Liu 40e030d862 clk: s6: Fix known issue [1/1]
PD#SWPL-179629

Problem:
1 Optimize driver file formats using automated tools.
2 vpu_clk adds a flag feature to prevent glitch when operating the
clock.
3 The naming of hifi_pll is inconsistent with the clkid style.
4 The latest documentation provided by vlsi has changed the sys_clk
definition for USB and PCIe.

Solution:
1 Optimized
2 vpu_clk added flag CLK_OPS_PARENT_ENABLE.
3 The clkid of hifi_pll is named CLKID_HIFI_PLL.
4 USB and PCIe sys_clk have been updated.

Verify:
s6_bl201

Change-Id: I4560f7bc6d42583d4e62d184c182bfe199cb6955
Signed-off-by: Chuan Liu <chuan.liu@amlogic.com>
2024-08-02 02:52:10 -07:00
yiting.deng ffbb7c05de clk: s7: update pwm_clk to secure [3/3]
PD#SWPL-174549

Problem:
secure permission needs to be set for the pwm_clk register
related to voltage regulation. Relevant clk configurations
need to be stored in bl31. kernel configurations need to
be deleted.

Solution:
fix it

Verify:
s7

Change-Id: If3477940b33f4a612743cb1c5c58ce45e59a8505
Signed-off-by: yiting.deng <yiting.deng@amlogic.com>
2024-07-07 20:13:49 -07:00
Chuan Liu 79c74dc207 clk: s6: Fix mclk0 output exception [1/1]
PD#SWPL-172965

Problem:
1 The mclk0 power supply uses the power supply inside the mclk_pll, so the
mclk0 output must ensure that mclk_pll is also enabled.
mclk_pll_clk can output clocks mclk_pll_src and fclk50m. The existence of
these two clock sources is meaningless.
2 If mclk0 uses mclk_pll as the clock source, div2 must be selected for
the clock of the later stage; otherwise, the output clock waveform of
mclk0 is abnormal.

Solution:
1 Delete the mclk_pll_src and fclk50m clock sources and set mclk_pll_clk
as the clock source of mclk0.
2 mclk0 selects div2 by default.

Verify:
s6_bl201

Change-Id: I9a8e3e1616b4c9b3b9c86990f86dc337f9f9c877
Signed-off-by: Chuan Liu <chuan.liu@amlogic.com>
2024-07-05 10:44:47 +08:00
Chuan Liu 5d5ac8b435 clk: s6: Fix some parent issue with sys_clk [1/1]
PD#SWPL-172965

Problem:
1 All I2C Masters (i2c_m_a-f) in a chip share an APB bus, which is
provided by sys_i2c_m_a. PWM is designed with a similar architecture, and
the APB bus of PWM is clock provided by sys_pwm_a.
2 The CLKID definition of smart card is inconsistent.

Solution:
1 The parent of sys_i2c_m_b-f is set to sys_i2c_m_a.
2 The parent of sys_pwm_b-i is set to sys_pwm_a.
3 CLKID_SC_DIV was renamed CLKID_SC.

Verify:
s6_bl201

Change-Id: I94482625f3a9fe387113edce21ed16e9dc63a074
Signed-off-by: Chuan Liu <chuan.liu@amlogic.com>
2024-07-05 10:44:46 +08:00
Chuan Liu 136b96ae1d clk: s6: Fixed known issues [1/1]
PD#SWPL-172965

Problem:
1 mclk_pll and dspa_clk output are incorrect
2 mmc failed to insmod
3 Lost sys_i2c_s_a

Solution:
1 Update the table for mclk_pll
2 Update the parent table of the dspa
3 Ignore initializing gp0_pll
4 Added sys_i2c_s_a

Verify:
s6_bl201

Change-Id: I23586623d908ef871e178acf0da8883aabc12fc9
Signed-off-by: Chuan Liu <chuan.liu@amlogic.com>
2024-07-05 10:44:46 +08:00
Chuan Liu dcccf4e11d clk: s6: Clock bringup [2/2]
PD#SWPL-172965

Problem:
1 Lost mclk and aclkm clocks
2 Discard meson_clk_pll_v3_ops
3 clk_measure table has been updated
4 hifipll and gp0pll cannot be locked
5 Optimize clock naming

Solution:
1 Added mclk and aclkm clocks
2 Replace meson_clk_pll_v3_ops with meson_clk_pll_v4_ops
3 Updated hifipll and gp0pll configuration timing

Verify:
s6_bl201

Change-Id: Ia5407b3b529c38a241e0a038aad371b5822c0c02
Signed-off-by: Chuan Liu <chuan.liu@amlogic.com>
2024-07-05 10:40:49 +08:00
Chuan Liu 097bb34999 clk: s6: Optimize clock driver [2/2]
PD#SWPL-158289

Problem:
1 The register corresponding to oscin was updated;
2 Put some of the key clocks into bl31 for processing.

Solution:
fixed

Verify:
pxp

Change-Id: Ie5ea8b6c507ce136ba397e8e54362b72f05cf45c
Signed-off-by: Chuan Liu <chuan.liu@amlogic.com>
2024-07-05 10:40:49 +08:00
Chuan Liu d888b53768 clk: s6: clock tree bringup [2/2]
PD#SWPL-154653

Problem:
clock tree bringup

Solution:
added

Verify:
pxp

Change-Id: I421aad497bbd7d1bd46430bf5c708cede10c7301
Signed-off-by: Chuan Liu <chuan.liu@amlogic.com>
2024-07-05 10:40:48 +08:00
yao zhang1 bdfb73ddc4 bringup: Add s6 dts and dtsi. [1/1]
PD#SWPL-149346

Problem:
Bringup s6.

Solution:
Add s6 dts and dtsi.

Verify:
s6 pxp

Change-Id: I545254ab574a29c65d586db054bf8e29f09a090d
Signed-off-by: yao zhang1 <yao.zhang1@amlogic.com>
Signed-off-by: Yan Wang <yan.wang@amlogic.com>
2024-07-05 10:40:48 +08:00
qing.zhang 861319cbd6 Audio: add earc rx for s7d [1/1]
PD#SWPL-163105

Problem:
new earc Rx design

Solution:
changelist from https://scgit.amlogic.com/#/c/417153
1. new default setting for arc in
2. remove pll refresh when startup
3. when cmdc init, need refresh pll after pll default setting
4. force channel sync for channel mapping
5. add dmac bit29 check for common arc check
6. add iec raw channel status check
7. use chip info(arc_ch_sync/arc_in_new)

Verify:
use s7d

Change-Id: Id681334bfde57bfe71a870a16859e24712e262e3
Signed-off-by: qing.zhang <qing.zhang@amlogic.com>
2024-04-24 02:06:36 -07:00
Chuan Liu ae4943530e clk: s7d: Fix known issue [1/1]
PD#SWPL-163050

Problem:
1 PLL driver adds rstn features
2 Add ACLKM clock
3 Adapts to pll_v4_ops

Solution:
Fixed

Verify:
s7d_bm209

Change-Id: Ide5199539d388d9ee415ecf65f3c162b2e4c881c
Signed-off-by: Chuan Liu <chuan.liu@amlogic.com>
2024-04-17 19:31:21 +08:00
Chuan Liu 5c2c80108d clk: s7d: add scmi clocks [2/2]
PD#SWPL-158288

Problem:
1 Adding the logic associated with the en0p5 member makes the driver's
processing more complicated and messy.
2 Added clocks with security permissions.

Solution:
1 Only add CLK_MESON_PLL_FIXED_EN0P5 flag to implement the functions
of en0p5, so that the driver change cost is minimal.
2 Determine whether to add the CLK_MESON_PLL_FIXED_EN0P5 flag based
on whether en0p5 is enabled in init_regs.
3 Added scmi clocks

Verify:
pxp

Change-Id: I2f9e258569f4bed44cb5fd9b57368dbfa3c425cb
Signed-off-by: Chuan Liu <chuan.liu@amlogic.com>
2024-04-17 19:31:20 +08:00
Chuan Liu 1c692807f3 clk: s7d: clock tree bringup [2/2]
PD#SWPL-147273

Problem:
clock tree bringup for s7d

Solution:
added

Verify:
pxp

Change-Id: I629a0465ad61aa7935fea2d850fbd3418f7a840e
Signed-off-by: Chuan Liu <chuan.liu@amlogic.com>
2024-04-17 19:29:58 +08:00
yiting.deng d64b311bb5 clk: s5: fix k5.15 wrong clk config [1/1]
PD#SWPL-161479

Problem:
fix s5 kernel5.15 clk wrong config

Solution:
fix it

Verify:
s5

Change-Id: I5d9fb22d5d9d15d00adfa92975ad332add647fa2
Signed-off-by: yiting.deng <yiting.deng@amlogic.com>
2024-03-25 03:13:18 -07:00
yiting.deng fb7c7e28a1 clk: s7: add aclkm in clktree [2/2]
PD#SWPL-156824

Problem:
s7 add aclkm in clk tree, need check aclkm

Solution:
fix it

Verify:
s7

Change-Id: I8dfaac712901e2ad219b6b719c50d8e4e3448cf7
Signed-off-by: yiting.deng <yiting.deng@amlogic.com>
2024-02-05 05:45:08 -07:00
yiting.deng 190319d231 clk: fix s7 improper clk config [2/2]
PD#SWPL-155329

Problem:
fix s7 improper clk config

Solution:
fxi it

Verify:
s7

Change-Id: I5eb2b0bcbbbeb71cbb8cbf2d4922a3f8ac6d4907
Signed-off-by: yiting.deng <yiting.deng@amlogic.com>
2024-01-30 06:13:16 -07:00
yiting.deng f238ea0672 clk: s7: clk upgrade clk-scmi [2/2]
PD#SWPL-152400

Problem:
s7 clk upgrade clk-scmi

Solution:
s7 clk upgrade clk-scmi

Verify:
s7

Change-Id: I4b9d5bc69e6da1000314741eedc22842aa7768b5
Signed-off-by: yiting.deng <yiting.deng@amlogic.com>
Signed-off-by: Shunzhou Jiang <shunzhou.jiang@amlogic.com>
2024-01-22 12:48:45 +08:00
yiting.deng 4b6c14e6ff clk: s7 clk bringup [1/1]
PD#SWPL-152400

Problem:
fix sys_clk_gate
fix clk measure name

Solution:
fix it

Verify:
s7

Change-Id: I3d403c0d4ae17b7a6dd768aceaf5d47054d7b0ad
Signed-off-by: yiting.deng <yiting.deng@amlogic.com>
2024-01-22 12:48:44 +08:00
Chuan Liu e6f1d9db24 clk: s7: optimize clock performance [2/2]
PD#SWPL-135780

Problem:
optimize clock performance.

Solution:
1 Optimize cpu_clk switching frequency timing;
2 Move all cpu_clk set frequency operations to bl31.

Verify:
pxp

Change-Id: I6147683b713a9b4854cd8f92e13b396f8705ea30
Signed-off-by: Chuan Liu <chuan.liu@amlogic.com>
2024-01-22 12:48:44 +08:00
yiting.deng 1a55a1607d clk: specifies s7 clock name and CLKID [1/1]
PD#SWPL-137984

Problem:
need specifies s7 clock name and CLKID

Solution:
fix it

Verify:
ptm

Change-Id: Ia9e3d126d275252ece4c76b6b98450d9c2707406
Signed-off-by: yiting.deng <yiting.deng@amlogic.com>
2024-01-22 12:48:43 +08:00
yiting.deng 24fbbcfdb8 clk: s7 kernel pxp clk bringup [1/2]
PD#SWPL-132405

Problem:
s7 kernel pxp clk bringup

Solution:
s7 kernel pxp clk bringup

Verify:
pxp

Change-Id: I9905c650ffc6e39d22c441d5fef4f89a78f10e3a
Signed-off-by: yiting.deng <yiting.deng@amlogic.com>
2024-01-22 12:48:43 +08:00
junyi.zhao 0639855d82 clk: support sys pll and dsu clk for tm2 [1/1]
PD#SWPL-143585

Problem:
need support sys pll 1404M and 1500M
dsu clk need parent sys pll

Solution:
support sys pll and dsu clk

Verify:
tm2 ab311

Change-Id: I20dc2922d6f90bacad66542edc75b64a1f3b0b4c
Signed-off-by: Junyi Zhao <junyi.zhao@amlogic.com>
2023-12-22 16:08:59 +08:00
Qianggui Song 34c7c4751d dtb: tm2: bringup to console [1/1]
PD#SWPL-143601

Problem:
Need to bringup to console

Solution:
bringup to console for ab301

Verify:
tm2_ab301

Change-Id: I8f78a322da984eafa71ee21bee330eeccc224058
Signed-off-by: Qianggui Song <qianggui.song@amlogic.com>
2023-12-22 16:08:59 +08:00
Chuan Liu 9ecf96e6a7 clk: g12a/g12b/sm1: lost gen_clk [1/1]
PD#SH-16937

Problem:
gen_clk is missing from the clock tree.

Solution:
added

Verify:
g12b

Change-Id: I66f2bd0b98ba0e4f05bb502ea72fe6b64ac45887
Signed-off-by: Chuan Liu <chuan.liu@amlogic.com>
2023-10-30 02:27:46 -07:00
Chuan Liu 631a6fc5a9 clk: g12a/g12b/sm1: standard the naming of the clock [1/1]
PD#SWPL-137162

Problem:
Some clock names are ambiguous

Solution:
fixed

Verify:
w400

Change-Id: Ia5cba038a1b57d2274f9bfff931fcb0d49d421b9
Signed-off-by: Chuan Liu <chuan.liu@amlogic.com>
2023-08-24 03:54:11 -07:00
Jian Hu 554b203a3c dts: add t5d device tree [1/1]
PD#SWPL-128885

Problem:
kernel 5.15 t5d bringup

Solution:
add dts support

Verify:
t5d

Change-Id: Ia3bf3a2923d0a949389d1397b952a343da8a8da6
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
2023-08-24 10:49:21 +08: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
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 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
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 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
pengzhao.liu e2515b3c23 kernel: c1 kernel bringup [1/1]
PD#SWPL-121076

Problem:
c1 kernel bringup

Solution:
c1 kernel bringup

Verify:
AE400-C308X

Change-Id: Ica758daab67c582a2647bb4ca1e7d9fa58d62e0c
Signed-off-by: pengzhao.liu <pengzhao.liu@amlogic.com>
2023-07-07 12:45:20 +08: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
junyi.zhao 0a028a6b56 clk: fix vapb_1 register fail [1/1]
PD#SWPL-130041

Problem:
vapb_1 clk is invalid

Solution:
fix it CLK_ID

Verify:
T3X BC302

Change-Id: I1b196cbfcebe57fa7ea3d6b5e26820d66d59636b
Signed-off-by: junyi.zhao <junyi.zhao@amlogic.com>
2023-06-30 01:51:13 -07: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
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
jiebing chen 440fb802d2 Audio: bringup txhd2 audio [1/1]
PD#SWPL-124883

Problem:
bringup txhd2 audio

Solution:
bringup txhd2 audio

Verify:
use txhd2

Change-Id: I63bcd61778cb7f89ad44bf01854d93d163c77630
Signed-off-by: jiebing chen <jiebing.chen@amlogic.com>
2023-06-29 10:34:01 +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
jiebing chen 778b416c79 Audio: bring up t3x audio [1/1]
PD#SWPL-117252

Problem:
bring up t3x audio

Solution:
bring up t3x audio

Verify:
use BC311

Change-Id: Ic8484ce63dad096a8c7d0a4631fae3f25b0e19df
Signed-off-by: jiebing chen <jiebing.chen@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