<feed xmlns='http://www.w3.org/2005/Atom'>
<title>starfive-tech/u-boot.git/drivers/clk/ti, branch master</title>
<subtitle>StarFive Tech U-Boot for VisionFive (JH7110) boards (mirror)</subtitle>
<id>https://git.radix-linux.su/starfive-tech/u-boot.git/atom?h=master</id>
<link rel='self' href='https://git.radix-linux.su/starfive-tech/u-boot.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/u-boot.git/'/>
<updated>2021-10-11T18:27:32+00:00</updated>
<entry>
<title>clk: ti: add am33xx/am43xx spread spectrum clock support</title>
<updated>2021-10-11T18:27:32+00:00</updated>
<author>
<name>Dario Binacchi</name>
<email>dariobin@libero.it</email>
</author>
<published>2021-09-26T09:58:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/u-boot.git/commit/?id=165e8fe5db64542d64fff6f81edb77c350e993cf'/>
<id>urn:sha1:165e8fe5db64542d64fff6f81edb77c350e993cf</id>
<content type='text'>
The patch enables spread spectrum clocking (SSC) for MPU and LCD PLLs.
As reported by the TI spruh73x/spruhl7x RM, SSC is only supported for
the DISP/LCD and MPU PLLs on am33xx/am43xx. SSC is not supported for
DDR, PER, and CORE PLLs.

Calculating the required values and setting the registers accordingly
was taken from the set_mpu_spreadspectrum routine contained in the
arch/arm/mach-omap2/am33xx/clock_am33xx.c file of the u-boot project.

In locked condition, DPLL output clock = CLKINP *[M/N]. In case of
SSC enabled, the reference manual explains that there is a restriction
of range of M values. Since the clk_ti_am3_dpll_round_rate() attempts
to select the minimum possible N, the value of M obtained is not
guaranteed to be within the range required. With the new "ti,min-div"
parameter it is possible to increase N and consequently M to satisfy the
constraint imposed by SSC.

Link: https://lore.kernel.org/r/20210606202253.31649-6-dariobin@libero.it
Signed-off-by: Dario Binacchi &lt;dariobin@libero.it&gt;
</content>
</entry>
<entry>
<title>clk: ti: k3: Update driver to account for divider flags</title>
<updated>2021-09-17T18:47:03+00:00</updated>
<author>
<name>Suman Anna</name>
<email>s-anna@ti.com</email>
</author>
<published>2021-09-07T22:16:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/u-boot.git/commit/?id=cfd50dfb729ab2268a5a44eaeea00ffa557919cd'/>
<id>urn:sha1:cfd50dfb729ab2268a5a44eaeea00ffa557919cd</id>
<content type='text'>
The K3 SoCs have some PLL output clocks (POSTDIV clocks) which in
turn serve as inputs to other HSDIV output clocks. These clocks use
the actual value to compute the divider clock rate, and need to be
registered with the CLK_DIVIDER_ONE_BASED flags. The current k3-clk
driver and data lacks the infrastructure to pass in divider flags.
Update the driver and data to account for these divider flags.

Signed-off-by: Suman Anna &lt;s-anna@ti.com&gt;
Signed-off-by: Dave Gerlach &lt;d-gerlach@ti.com&gt;
</content>
</entry>
<entry>
<title>clk: ti: k3-pll: Change DIV_CTRL programming to read-modify-write</title>
<updated>2021-09-17T18:47:03+00:00</updated>
<author>
<name>Dave Gerlach</name>
<email>d-gerlach@ti.com</email>
</author>
<published>2021-09-07T22:16:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/u-boot.git/commit/?id=d3c56e2a823caa1e2d09daccd1b0d8a529d8df69'/>
<id>urn:sha1:d3c56e2a823caa1e2d09daccd1b0d8a529d8df69</id>
<content type='text'>
There are three different divider values in the DIV_CTRL register
controlled by the k3-pll driver. Currently the ti_pll_clk_set_rate
function writes the entire register when programming plld, even though
plld only resides in the lower 6 bits.

Change the plld programming to read-modify-write to only affect the
relevant bits for plld and to preserve the other two divider values
present in the upper 16 bits, otherwise they will always get set to zero
when programming plld.

Fixes: 0aa2930ca192 ("clk: add support for TI K3 SoC PLL")
Signed-off-by: Dave Gerlach &lt;d-gerlach@ti.com&gt;
</content>
</entry>
<entry>
<title>clk: add support for TI K3 SoC clocks</title>
<updated>2021-06-11T11:04:52+00:00</updated>
<author>
<name>Tero Kristo</name>
<email>t-kristo@ti.com</email>
</author>
<published>2021-06-11T08:45:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/u-boot.git/commit/?id=b4a72a9f5b805b438312fd239fc8bfffd8f7b771'/>
<id>urn:sha1:b4a72a9f5b805b438312fd239fc8bfffd8f7b771</id>
<content type='text'>
Add driver to support TI K3 generation SoC clocks. This driver registers
the clocks provided via platform data, and adds support for controlling
the clocks via DT handles.

Signed-off-by: Tero Kristo &lt;t-kristo@ti.com&gt;
Signed-off-by: Tero Kristo &lt;kristo@kernel.org&gt;
</content>
</entry>
<entry>
<title>clk: add support for TI K3 SoC PLL</title>
<updated>2021-06-11T11:04:52+00:00</updated>
<author>
<name>Tero Kristo</name>
<email>t-kristo@ti.com</email>
</author>
<published>2021-06-11T08:45:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/u-boot.git/commit/?id=0aa2930ca192a8738d1da8222fc6ac21d7c19182'/>
<id>urn:sha1:0aa2930ca192a8738d1da8222fc6ac21d7c19182</id>
<content type='text'>
Add support for TI K3 SoC PLLs. This clock type supports
enabling/disabling/setting and querying the clock rate for the PLL. The
euclidean library routine is used to calculate divider/multiplier rates
for the PLLs.

Signed-off-by: Tero Kristo &lt;t-kristo@ti.com&gt;
Signed-off-by: Tero Kristo &lt;kristo@kernel.org&gt;
</content>
</entry>
<entry>
<title>clk: sci-clk: fix return value of set_rate</title>
<updated>2021-06-11T11:04:52+00:00</updated>
<author>
<name>Tero Kristo</name>
<email>t-kristo@ti.com</email>
</author>
<published>2021-06-11T08:45:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/u-boot.git/commit/?id=c319572abd95826b958c753ebcd3b83884eb60af'/>
<id>urn:sha1:c319572abd95826b958c753ebcd3b83884eb60af</id>
<content type='text'>
Set rate should return the new clock rate on success, and negative error
value on failure. Fix this, as currently set_rate returns 0 on success.

Signed-off-by: Tero Kristo &lt;t-kristo@ti.com&gt;
Signed-off-by: Tero Kristo &lt;kristo@kernel.org&gt;
</content>
</entry>
<entry>
<title>clk: ti: am3-dpll: use custom API for memory access</title>
<updated>2021-05-12T10:57:57+00:00</updated>
<author>
<name>Dario Binacchi</name>
<email>dariobin@libero.it</email>
</author>
<published>2021-05-01T15:05:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/u-boot.git/commit/?id=5a6caf916cb302a6b83edce8c60d830d9261956d'/>
<id>urn:sha1:5a6caf916cb302a6b83edce8c60d830d9261956d</id>
<content type='text'>
Using the custom TI functions required not only replacing common memory
access functions but also rewriting the routines used to set bypass and
lock states. As for readl() and writel(), they also required the address
of the register to be accessed, a parameter that is hidden by the TI clk
module.

Signed-off-by: Dario Binacchi &lt;dariobin@libero.it&gt;
</content>
</entry>
<entry>
<title>clk: ti: gate: use custom API for memory access</title>
<updated>2021-05-12T10:57:57+00:00</updated>
<author>
<name>Dario Binacchi</name>
<email>dariobin@libero.it</email>
</author>
<published>2021-05-01T15:05:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/u-boot.git/commit/?id=b178e1f77b57f44743f6fbc34517a48fd0551d6f'/>
<id>urn:sha1:b178e1f77b57f44743f6fbc34517a48fd0551d6f</id>
<content type='text'>
Replaces the common memory access functions used by the driver with the
ones exported from the TI clk module.

Signed-off-by: Dario Binacchi &lt;dariobin@libero.it&gt;
</content>
</entry>
<entry>
<title>clk: ti: change clk_ti_latch() signature</title>
<updated>2021-05-12T10:57:57+00:00</updated>
<author>
<name>Dario Binacchi</name>
<email>dariobin@libero.it</email>
</author>
<published>2021-05-01T15:05:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/u-boot.git/commit/?id=2dd2f3ea6d2a5f685c7a275cad7e2526f899e439'/>
<id>urn:sha1:2dd2f3ea6d2a5f685c7a275cad7e2526f899e439</id>
<content type='text'>
The clock access functions exported by the clk header use the
struct clk_ti_reg parameter to get the address of the register. This
must also apply to clk_ti_latch(). Changes to TI's clk-mux and
clk-divider drivers prevented the patch from generating compile errors.

Signed-off-by: Dario Binacchi &lt;dariobin@libero.it&gt;
</content>
</entry>
<entry>
<title>clk: ti: add custom API for memory access</title>
<updated>2021-05-12T10:57:57+00:00</updated>
<author>
<name>Dario Binacchi</name>
<email>dariobin@libero.it</email>
</author>
<published>2021-05-01T15:05:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/u-boot.git/commit/?id=b1aef0384fcce4ae9cb8485c0df0cdc64bc0cf83'/>
<id>urn:sha1:b1aef0384fcce4ae9cb8485c0df0cdc64bc0cf83</id>
<content type='text'>
As pointed by [1] and [2], commit
d64b9cdcd4 ("fdt: translate address if #size-cells = &lt;0&gt;") is wrong:
- It makes every 'reg' DT property translatable. It changes the address
  translation so that for an I2C 'reg' address you'll get back as reg
  the I2C controller address + reg value.
- The quirk must be fixed with platform code.

The clk_ti_get_reg_addr() is the platform code able to make the correct
address translation for the AM33xx clocks registers. Its implementation
was inspired by the Linux Kernel code.

[1] https://patchwork.ozlabs.org/project/uboot/patch/1614324949-61314-1-git-send-email-bmeng.cn@gmail.com/
[2] https://lore.kernel.org/linux-clk/20210402192054.7934-1-dariobin@libero.it/T/

Signed-off-by: Dario Binacchi &lt;dariobin@libero.it&gt;
</content>
</entry>
</feed>
