<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/clk/meson/Makefile, branch vsnprintf</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>clk: meson: c3: add c3 clock peripherals controller driver</title>
<updated>2024-06-04T08:38:32+00:00</updated>
<author>
<name>Xianwei Zhao</name>
<email>xianwei.zhao@amlogic.com</email>
</author>
<published>2024-05-22T08:27:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f06ac3ed04e877cc424f150700b582d0b2ee5b44'/>
<id>f06ac3ed04e877cc424f150700b582d0b2ee5b44</id>
<content type='text'>
Add the C3 peripherals clock controller driver in the C3 SoC family.

[jbrunet: fix Kconfig select order and probe function name]
Co-developed-by: Chuan Liu &lt;chuan.liu@amlogic.com&gt;
Signed-off-by: Chuan Liu &lt;chuan.liu@amlogic.com&gt;
Signed-off-by: Xianwei Zhao &lt;xianwei.zhao@amlogic.com&gt;
Link: https://lore.kernel.org/r/20240522082727.3029656-6-xianwei.zhao@amlogic.com
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add the C3 peripherals clock controller driver in the C3 SoC family.

[jbrunet: fix Kconfig select order and probe function name]
Co-developed-by: Chuan Liu &lt;chuan.liu@amlogic.com&gt;
Signed-off-by: Chuan Liu &lt;chuan.liu@amlogic.com&gt;
Signed-off-by: Xianwei Zhao &lt;xianwei.zhao@amlogic.com&gt;
Link: https://lore.kernel.org/r/20240522082727.3029656-6-xianwei.zhao@amlogic.com
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: meson: c3: add support for the C3 SoC PLL clock</title>
<updated>2024-06-04T08:38:16+00:00</updated>
<author>
<name>Xianwei Zhao</name>
<email>xianwei.zhao@amlogic.com</email>
</author>
<published>2024-05-22T08:27:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=8a9a129dc565599a877ceac059ddd96ec81104eb'/>
<id>8a9a129dc565599a877ceac059ddd96ec81104eb</id>
<content type='text'>
Add the C3 PLL clock controller driver for the Amlogic C3 SoC family.

[jbrunet: fixed probe function name]
Co-developed-by: Chuan Liu &lt;chuan.liu@amlogic.com&gt;
Signed-off-by: Chuan Liu &lt;chuan.liu@amlogic.com&gt;
Signed-off-by: Xianwei Zhao &lt;xianwei.zhao@amlogic.com&gt;
Link: https://lore.kernel.org/r/20240522082727.3029656-5-xianwei.zhao@amlogic.com
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add the C3 PLL clock controller driver for the Amlogic C3 SoC family.

[jbrunet: fixed probe function name]
Co-developed-by: Chuan Liu &lt;chuan.liu@amlogic.com&gt;
Signed-off-by: Chuan Liu &lt;chuan.liu@amlogic.com&gt;
Signed-off-by: Xianwei Zhao &lt;xianwei.zhao@amlogic.com&gt;
Link: https://lore.kernel.org/r/20240522082727.3029656-5-xianwei.zhao@amlogic.com
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: meson: add vclk driver</title>
<updated>2024-04-10T07:46:21+00:00</updated>
<author>
<name>Neil Armstrong</name>
<email>neil.armstrong@linaro.org</email>
</author>
<published>2024-04-03T07:46:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=bb5aa08572b5313157c093a09d53ebf2efda3dc1'/>
<id>bb5aa08572b5313157c093a09d53ebf2efda3dc1</id>
<content type='text'>
The VCLK and VCLK_DIV clocks have supplementary bits.

The VCLK gate has a "SOFT RESET" bit to toggle after the whole
VCLK sub-tree rate has been set, this is implemented in
the gate enable callback.

The VCLK_DIV clocks as enable and reset bits used to disable
and reset the divider, associated with CLK_SET_RATE_GATE it ensures
the rate is set while the divider is disabled and in reset mode.

The VCLK_DIV enable bit isn't implemented as a gate since it's part
of the divider logic and vendor does this exact sequence to ensure
the divider is correctly set.

Signed-off-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
Link: https://lore.kernel.org/r/20240403-amlogic-v6-4-upstream-dsi-ccf-vim3-v12-2-99ecdfdc87fc@linaro.org
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The VCLK and VCLK_DIV clocks have supplementary bits.

The VCLK gate has a "SOFT RESET" bit to toggle after the whole
VCLK sub-tree rate has been set, this is implemented in
the gate enable callback.

The VCLK_DIV clocks as enable and reset bits used to disable
and reset the divider, associated with CLK_SET_RATE_GATE it ensures
the rate is set while the divider is disabled and in reset mode.

The VCLK_DIV enable bit isn't implemented as a gate since it's part
of the divider logic and vendor does this exact sequence to ensure
the divider is correctly set.

Signed-off-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
Link: https://lore.kernel.org/r/20240403-amlogic-v6-4-upstream-dsi-ccf-vim3-v12-2-99ecdfdc87fc@linaro.org
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: meson: S4: add support for Amlogic S4 SoC peripheral clock controller</title>
<updated>2023-09-27T09:01:03+00:00</updated>
<author>
<name>Yu Tu</name>
<email>yu.tu@amlogic.com</email>
</author>
<published>2023-09-04T07:55:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=57b55c76aaf1ba50ecc6dcee5cd6843dc4d85239'/>
<id>57b55c76aaf1ba50ecc6dcee5cd6843dc4d85239</id>
<content type='text'>
Add the peripherals clock controller driver in the S4 SoC family.

[jbrunet: remove extra new line at end of s4-peripherals.h]
Signed-off-by: Yu Tu &lt;yu.tu@amlogic.com&gt;
Link: https://lore.kernel.org/r/20230904075504.23263-5-yu.tu@amlogic.com
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add the peripherals clock controller driver in the S4 SoC family.

[jbrunet: remove extra new line at end of s4-peripherals.h]
Signed-off-by: Yu Tu &lt;yu.tu@amlogic.com&gt;
Link: https://lore.kernel.org/r/20230904075504.23263-5-yu.tu@amlogic.com
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: meson: S4: add support for Amlogic S4 SoC PLL clock driver</title>
<updated>2023-09-27T08:54:24+00:00</updated>
<author>
<name>Yu Tu</name>
<email>yu.tu@amlogic.com</email>
</author>
<published>2023-09-04T07:55:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e787c9c55edadb5d9d6c75ce5080dd3c64bd996b'/>
<id>e787c9c55edadb5d9d6c75ce5080dd3c64bd996b</id>
<content type='text'>
Add the S4 PLL clock controller driver in the S4 SoC family.

Signed-off-by: Yu Tu &lt;yu.tu@amlogic.com&gt;
Link: https://lore.kernel.org/r/20230904075504.23263-4-yu.tu@amlogic.com
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add the S4 PLL clock controller driver in the S4 SoC family.

Signed-off-by: Yu Tu &lt;yu.tu@amlogic.com&gt;
Link: https://lore.kernel.org/r/20230904075504.23263-4-yu.tu@amlogic.com
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: meson: introduce meson-clkc-utils</title>
<updated>2023-08-08T14:06:16+00:00</updated>
<author>
<name>Neil Armstrong</name>
<email>neil.armstrong@linaro.org</email>
</author>
<published>2023-06-12T09:57:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=230b6f3a765d0d0737ba9fd24649ee0ddfa441ba'/>
<id>230b6f3a765d0d0737ba9fd24649ee0ddfa441ba</id>
<content type='text'>
Let's introduce a new module called meson-clkc-utils that
will contain shared utility functions for all Amlogic clock
controller drivers.

The first utility function is a replacement of of_clk_hw_onecell_get
in order to get rid of the NR_CLKS define in all Amlogic clock
drivers.

The goal is to move all duplicate probe and init code in this module.

[jbrunet: Fixed MODULE_LICENCE checkpatch warning]
Signed-off-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
Link: https://lore.kernel.org/r/20230607-topic-amlogic-upstream-clkid-public-migration-v2-1-38172d17c27a@linaro.org
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Let's introduce a new module called meson-clkc-utils that
will contain shared utility functions for all Amlogic clock
controller drivers.

The first utility function is a replacement of of_clk_hw_onecell_get
in order to get rid of the NR_CLKS define in all Amlogic clock
drivers.

The goal is to move all duplicate probe and init code in this module.

[jbrunet: Fixed MODULE_LICENCE checkpatch warning]
Signed-off-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
Link: https://lore.kernel.org/r/20230607-topic-amlogic-upstream-clkid-public-migration-v2-1-38172d17c27a@linaro.org
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: meson: a1: add Amlogic A1 Peripherals clock controller driver</title>
<updated>2023-05-30T15:53:09+00:00</updated>
<author>
<name>Dmitry Rokosov</name>
<email>ddrokosov@sberdevices.ru</email>
</author>
<published>2023-05-23T13:53:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=84af914404dbc01f388c440cac72428784b8a161'/>
<id>84af914404dbc01f388c440cac72428784b8a161</id>
<content type='text'>
Introduce Peripherals clock controller for Amlogic A1 SoC family.

A1 SoC has four clock controllers on the board: PLL, Peripherals, CPU,
and Audio.
This patchset adds support for Amlogic A1 Peripherals clock driver and
allows to generate clocks for all A1 SoC peripheral IPs.

Signed-off-by: Jian Hu &lt;jian.hu@amlogic.com&gt;
Signed-off-by: Dmitry Rokosov &lt;ddrokosov@sberdevices.ru&gt;
Reviewed-by: Martin Blumenstingl &lt;martin.blumenstingl@googlemail.com&gt;
Link: https://lore.kernel.org/r/20230523135351.19133-7-ddrokosov@sberdevices.ru
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Introduce Peripherals clock controller for Amlogic A1 SoC family.

A1 SoC has four clock controllers on the board: PLL, Peripherals, CPU,
and Audio.
This patchset adds support for Amlogic A1 Peripherals clock driver and
allows to generate clocks for all A1 SoC peripheral IPs.

Signed-off-by: Jian Hu &lt;jian.hu@amlogic.com&gt;
Signed-off-by: Dmitry Rokosov &lt;ddrokosov@sberdevices.ru&gt;
Reviewed-by: Martin Blumenstingl &lt;martin.blumenstingl@googlemail.com&gt;
Link: https://lore.kernel.org/r/20230523135351.19133-7-ddrokosov@sberdevices.ru
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: meson: a1: add Amlogic A1 PLL clock controller driver</title>
<updated>2023-05-30T15:53:05+00:00</updated>
<author>
<name>Dmitry Rokosov</name>
<email>ddrokosov@sberdevices.ru</email>
</author>
<published>2023-05-23T13:53:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=28f3be518081b2127f98105fa9735a19812a33ca'/>
<id>28f3be518081b2127f98105fa9735a19812a33ca</id>
<content type='text'>
Introduce PLL clock controller for Amlogic A1 SoC family.
The clock unit is an APB slave module that is designed for generating all
of the internal and system clocks.
The SoC uses an external 24MHz crystal; there are 4 internal PLLs:
SYS_PLL/HIFI_PLL/USB_PLL/(FIXPLL), these PLLs generate 27 clock sources.

Signed-off-by: Jian Hu &lt;jian.hu@amlogic.com&gt;
Signed-off-by: Dmitry Rokosov &lt;ddrokosov@sberdevices.ru&gt;
Reviewed-by: Martin Blumenstingl &lt;martin.blumenstingl@googlemail.com&gt;
Link: https://lore.kernel.org/r/20230523135351.19133-5-ddrokosov@sberdevices.ru
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Introduce PLL clock controller for Amlogic A1 SoC family.
The clock unit is an APB slave module that is designed for generating all
of the internal and system clocks.
The SoC uses an external 24MHz crystal; there are 4 internal PLLs:
SYS_PLL/HIFI_PLL/USB_PLL/(FIXPLL), these PLLs generate 27 clock sources.

Signed-off-by: Jian Hu &lt;jian.hu@amlogic.com&gt;
Signed-off-by: Dmitry Rokosov &lt;ddrokosov@sberdevices.ru&gt;
Reviewed-by: Martin Blumenstingl &lt;martin.blumenstingl@googlemail.com&gt;
Link: https://lore.kernel.org/r/20230523135351.19133-5-ddrokosov@sberdevices.ru
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: meson: add a driver for the Meson8/8b/8m2 DDR clock controller</title>
<updated>2019-12-11T13:06:29+00:00</updated>
<author>
<name>Martin Blumenstingl</name>
<email>martin.blumenstingl@googlemail.com</email>
</author>
<published>2019-11-17T14:07:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=64aa7008e957a0a60f1ca3227d85ad1e507252cd'/>
<id>64aa7008e957a0a60f1ca3227d85ad1e507252cd</id>
<content type='text'>
The Meson8/Meson8b/Meson8m2 SoCs embed a DDR clock controller in the
MMCBUS registers. There is no public documentation, but the u-boot GPL
sources from the Amlogic BSP show that the DDR clock controller is
identical on all three SoCs:
  #define CFG_DDR_CLK 792
  #define CFG_PLL_M (((CFG_DDR_CLK/12)*12)/24)
  #define CFG_PLL_N 1
  #define CFG_PLL_OD 1

  // from set_ddr_clock:
  t_ddr_pll_cntl= (CFG_PLL_OD &lt;&lt; 16)|(CFG_PLL_N&lt;&lt;9)|(CFG_PLL_M&lt;&lt;0)
  writel(timing_reg-&gt;t_ddr_pll_cntl|(1&lt;&lt;29),AM_DDR_PLL_CNTL);
  writel(readl(AM_DDR_PLL_CNTL) &amp; (~(1&lt;&lt;29)),AM_DDR_PLL_CNTL);

  // from hx_ddr_power_down_enter: shut down DDR PLL
  writel(readl(AM_DDR_PLL_CNTL)|(1&lt;&lt;30),AM_DDR_PLL_CNTL);

  do { ... } while((readl(AM_DDR_PLL_CNTL)&amp;(1&lt;&lt;31))==0)

This translates to:
- AM_DDR_PLL_CNTL[29] is the reset bit
- AM_DDR_PLL_CNTL[30] is the enable bit
- AM_DDR_PLL_CNTL[31] is the lock bit
- AM_DDR_PLL_CNTL[8:0] is the m value (assuming the width is 9 bits
  based on the start of the n value)
- AM_DDR_PLL_CNTL[13:9] is the n value (assuming the width is 5 bits
  based on the start of the od)
- AM_DDR_PLL_CNTL[17:16] is the od (assuming the width is 2 bits based
  on other PLLs on this SoC)

Add a driver for this PLL setup because it's used as one of the inputs
of the audio clocks. There may be more clocks inside that clock
controller - those can be added in subsequent patches.

Signed-off-by: Martin Blumenstingl &lt;martin.blumenstingl@googlemail.com&gt;
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The Meson8/Meson8b/Meson8m2 SoCs embed a DDR clock controller in the
MMCBUS registers. There is no public documentation, but the u-boot GPL
sources from the Amlogic BSP show that the DDR clock controller is
identical on all three SoCs:
  #define CFG_DDR_CLK 792
  #define CFG_PLL_M (((CFG_DDR_CLK/12)*12)/24)
  #define CFG_PLL_N 1
  #define CFG_PLL_OD 1

  // from set_ddr_clock:
  t_ddr_pll_cntl= (CFG_PLL_OD &lt;&lt; 16)|(CFG_PLL_N&lt;&lt;9)|(CFG_PLL_M&lt;&lt;0)
  writel(timing_reg-&gt;t_ddr_pll_cntl|(1&lt;&lt;29),AM_DDR_PLL_CNTL);
  writel(readl(AM_DDR_PLL_CNTL) &amp; (~(1&lt;&lt;29)),AM_DDR_PLL_CNTL);

  // from hx_ddr_power_down_enter: shut down DDR PLL
  writel(readl(AM_DDR_PLL_CNTL)|(1&lt;&lt;30),AM_DDR_PLL_CNTL);

  do { ... } while((readl(AM_DDR_PLL_CNTL)&amp;(1&lt;&lt;31))==0)

This translates to:
- AM_DDR_PLL_CNTL[29] is the reset bit
- AM_DDR_PLL_CNTL[30] is the enable bit
- AM_DDR_PLL_CNTL[31] is the lock bit
- AM_DDR_PLL_CNTL[8:0] is the m value (assuming the width is 9 bits
  based on the start of the n value)
- AM_DDR_PLL_CNTL[13:9] is the n value (assuming the width is 5 bits
  based on the start of the od)
- AM_DDR_PLL_CNTL[17:16] is the od (assuming the width is 2 bits based
  on other PLLs on this SoC)

Add a driver for this PLL setup because it's used as one of the inputs
of the audio clocks. There may be more clocks inside that clock
controller - those can be added in subsequent patches.

Signed-off-by: Martin Blumenstingl &lt;martin.blumenstingl@googlemail.com&gt;
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: meson: add g12a cpu dynamic divider driver</title>
<updated>2019-08-09T10:10:03+00:00</updated>
<author>
<name>Neil Armstrong</name>
<email>narmstrong@baylibre.com</email>
</author>
<published>2019-07-31T08:40:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=26d34431add04a98a60b8935c25765914fa773f7'/>
<id>26d34431add04a98a60b8935c25765914fa773f7</id>
<content type='text'>
Add a clock driver for the cpu dynamic divider, this divider needs
to have a flag set before setting the divider value then removed
while writing the new value to the register.

This drivers implements this behavior and will be used essentially
on the Amlogic G12A and G12B SoCs for cpu clock trees.

Signed-off-by: Neil Armstrong &lt;narmstrong@baylibre.com&gt;
Reviewed-by: Martin Blumenstingl &lt;martin.blumenstingl@googlemail.com&gt;
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a clock driver for the cpu dynamic divider, this divider needs
to have a flag set before setting the divider value then removed
while writing the new value to the register.

This drivers implements this behavior and will be used essentially
on the Amlogic G12A and G12B SoCs for cpu clock trees.

Signed-off-by: Neil Armstrong &lt;narmstrong@baylibre.com&gt;
Reviewed-by: Martin Blumenstingl &lt;martin.blumenstingl@googlemail.com&gt;
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
