<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/clk/thead, branch for-next</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>clk: thead: Fix TH1520 emmc and shdci clock rate</title>
<updated>2024-12-17T20:17:50+00:00</updated>
<author>
<name>Maksim Kiselev</name>
<email>bigunclemax@gmail.com</email>
</author>
<published>2024-12-10T08:30:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f4bf0b909a6bf64a2220a42a7c8b8c2ee1b77b89'/>
<id>f4bf0b909a6bf64a2220a42a7c8b8c2ee1b77b89</id>
<content type='text'>
In accordance with LicheePi 4A BSP the clock that comes to emmc/sdhci
is 198Mhz which is got through frequency division of source clock
VIDEO PLL by 4 [1].

But now the AP_SUBSYS driver sets the CLK EMMC SDIO to the same
frequency as the VIDEO PLL, equal to 792 MHz. This causes emmc/sdhci
to work 4 times slower.

Let's fix this issue by adding fixed factor clock that divides
VIDEO PLL by 4 for emmc/sdhci.

Link: https://github.com/revyos/thead-kernel/blob/7563179071a314f41cdcdbfd8cf6e101e73707f3/drivers/clk/thead/clk-light-fm.c#L454

Fixes: ae81b69fd2b1 ("clk: thead: Add support for T-Head TH1520 AP_SUBSYS clocks")
Signed-off-by: Maksim Kiselev &lt;bigunclemax@gmail.com&gt;
Link: https://lore.kernel.org/r/20241210083029.92620-1-bigunclemax@gmail.com
Tested-by: Xi Ruoyao &lt;xry111@xry111.site&gt;
Reviewed-by: Drew Fustini &lt;dfustini@tenstorrent.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In accordance with LicheePi 4A BSP the clock that comes to emmc/sdhci
is 198Mhz which is got through frequency division of source clock
VIDEO PLL by 4 [1].

But now the AP_SUBSYS driver sets the CLK EMMC SDIO to the same
frequency as the VIDEO PLL, equal to 792 MHz. This causes emmc/sdhci
to work 4 times slower.

Let's fix this issue by adding fixed factor clock that divides
VIDEO PLL by 4 for emmc/sdhci.

Link: https://github.com/revyos/thead-kernel/blob/7563179071a314f41cdcdbfd8cf6e101e73707f3/drivers/clk/thead/clk-light-fm.c#L454

Fixes: ae81b69fd2b1 ("clk: thead: Add support for T-Head TH1520 AP_SUBSYS clocks")
Signed-off-by: Maksim Kiselev &lt;bigunclemax@gmail.com&gt;
Link: https://lore.kernel.org/r/20241210083029.92620-1-bigunclemax@gmail.com
Tested-by: Xi Ruoyao &lt;xry111@xry111.site&gt;
Reviewed-by: Drew Fustini &lt;dfustini@tenstorrent.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: thead: fix dependency on clk_ignore_unused</title>
<updated>2024-07-31T21:51:47+00:00</updated>
<author>
<name>Drew Fustini</name>
<email>drew@pdp7.com</email>
</author>
<published>2024-07-31T06:14:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=39a3396558fb97e6e7d4c1eb04c2166da31904a9'/>
<id>39a3396558fb97e6e7d4c1eb04c2166da31904a9</id>
<content type='text'>
Add the CLK_IGNORE_UNUSED flag to the vp-axi clock (CLK_VP_AXI) to avoid
depending on clk_ignore_unused in the cmdline. Without this fix, the
emmc-sdio clock (CLK_EMMC_SDIO) fails to work after vp-axi is disabled.

Signed-off-by: Drew Fustini &lt;drew@pdp7.com&gt;
Link: https://lore.kernel.org/r/20240731061439.3807172-1-drew@pdp7.com
Fixes: ae81b69fd2b1 ("clk: thead: Add support for T-Head TH1520 AP_SUBSYS clocks")
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add the CLK_IGNORE_UNUSED flag to the vp-axi clock (CLK_VP_AXI) to avoid
depending on clk_ignore_unused in the cmdline. Without this fix, the
emmc-sdio clock (CLK_EMMC_SDIO) fails to work after vp-axi is disabled.

Signed-off-by: Drew Fustini &lt;drew@pdp7.com&gt;
Link: https://lore.kernel.org/r/20240731061439.3807172-1-drew@pdp7.com
Fixes: ae81b69fd2b1 ("clk: thead: Add support for T-Head TH1520 AP_SUBSYS clocks")
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: T-Head: Disable on 32-bit Targets</title>
<updated>2024-07-22T21:29:23+00:00</updated>
<author>
<name>Palmer Dabbelt</name>
<email>palmer@rivosinc.com</email>
</author>
<published>2024-07-19T15:10:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=0e91ac701c69c44840e8d36566604cac1b638880'/>
<id>0e91ac701c69c44840e8d36566604cac1b638880</id>
<content type='text'>
This fails to build on 32-bit targets because of a missing __udivdi3.
IIRC the right way to fix that is to avoid the division, but I just want
a tree that builds and the only real T-Head platforms are 64-bit right
now.

Signed-off-by: Palmer Dabbelt &lt;palmer@rivosinc.com&gt;
Link: https://lore.kernel.org/r/20240719151027.16152-1-palmer@rivosinc.com
Acked-by: Drew Fustini &lt;drew@pdp7.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fails to build on 32-bit targets because of a missing __udivdi3.
IIRC the right way to fix that is to avoid the division, but I just want
a tree that builds and the only real T-Head platforms are 64-bit right
now.

Signed-off-by: Palmer Dabbelt &lt;palmer@rivosinc.com&gt;
Link: https://lore.kernel.org/r/20240719151027.16152-1-palmer@rivosinc.com
Acked-by: Drew Fustini &lt;drew@pdp7.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: thead: Add support for T-Head TH1520 AP_SUBSYS clocks</title>
<updated>2024-07-15T19:15:01+00:00</updated>
<author>
<name>Drew Fustini</name>
<email>dfustini@tenstorrent.com</email>
</author>
<published>2024-07-11T16:56:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=ae81b69fd2b1eb4885b352749b1fd1172e2f0f18'/>
<id>ae81b69fd2b1eb4885b352749b1fd1172e2f0f18</id>
<content type='text'>
Add support for the AP sub-system clock controller in the T-Head TH1520.
This include CPU, DPU, GMAC and TEE PLLs.

Link: https://openbeagle.org/beaglev-ahead/beaglev-ahead/-/blob/main/docs/TH1520%20System%20User%20Manual.pdf
Co-developed-by: Yangtao Li &lt;frank.li@vivo.com&gt;
Signed-off-by: Yangtao Li &lt;frank.li@vivo.com&gt;
Co-developed-by: Jisheng Zhang &lt;jszhang@kernel.org&gt;
Signed-off-by: Jisheng Zhang &lt;jszhang@kernel.org&gt;
Link: https://git.beagleboard.org/beaglev-ahead/beaglev-ahead/-/tree/main/docs
Signed-off-by: Drew Fustini &lt;dfustini@tenstorrent.com&gt;
Link: https://lore.kernel.org/r/20240711-th1520-clk-v3-2-6ff17bb318fb@tenstorrent.com
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add support for the AP sub-system clock controller in the T-Head TH1520.
This include CPU, DPU, GMAC and TEE PLLs.

Link: https://openbeagle.org/beaglev-ahead/beaglev-ahead/-/blob/main/docs/TH1520%20System%20User%20Manual.pdf
Co-developed-by: Yangtao Li &lt;frank.li@vivo.com&gt;
Signed-off-by: Yangtao Li &lt;frank.li@vivo.com&gt;
Co-developed-by: Jisheng Zhang &lt;jszhang@kernel.org&gt;
Signed-off-by: Jisheng Zhang &lt;jszhang@kernel.org&gt;
Link: https://git.beagleboard.org/beaglev-ahead/beaglev-ahead/-/tree/main/docs
Signed-off-by: Drew Fustini &lt;dfustini@tenstorrent.com&gt;
Link: https://lore.kernel.org/r/20240711-th1520-clk-v3-2-6ff17bb318fb@tenstorrent.com
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
