<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/drivers/clk/mediatek/clk-pll.c, branch header-removal</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=header-removal</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=header-removal'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2021-07-27T17:53:06+00:00</updated>
<entry>
<title>clk: mediatek: Add configurable enable control to mtk_pll_data</title>
<updated>2021-07-27T17:53:06+00:00</updated>
<author>
<name>Chun-Jie Chen</name>
<email>chun-jie.chen@mediatek.com</email>
</author>
<published>2021-07-26T10:57:05+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=f384c44754b7de2eceb0789a8837a11b0a80cdba'/>
<id>urn:sha1:f384c44754b7de2eceb0789a8837a11b0a80cdba</id>
<content type='text'>
In all MediaTek PLL design, bit0 of CON0 register is always
the enable bit.
However, there's a special case of usbpll on MT8192.
The enable bit of usbpll is moved to bit2 of other register.
Add configurable en_reg and pll_en_bit for enable control or
default 0 where pll data are static variables.
Hence, CON0_BASE_EN could also be removed.
And there might have another special case on other chips,
the enable bit is still on CON0 register but not at bit0.

Reviewed-by: Ikjoon Jang &lt;ikjn@chromium.org&gt;
Signed-off-by: Weiyi Lu &lt;weiyi.lu@mediatek.com&gt;
Signed-off-by: Chun-Jie Chen &lt;chun-jie.chen@mediatek.com&gt;
Link: https://lore.kernel.org/r/20210726105719.15793-8-chun-jie.chen@mediatek.com
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
</content>
</entry>
<entry>
<title>clk: mediatek: Fix asymmetrical PLL enable and disable control</title>
<updated>2021-07-27T17:53:06+00:00</updated>
<author>
<name>Chun-Jie Chen</name>
<email>chun-jie.chen@mediatek.com</email>
</author>
<published>2021-07-26T10:57:04+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=7cc4e1bbe300c5cf610ece8eca6c6751b8bc74db'/>
<id>urn:sha1:7cc4e1bbe300c5cf610ece8eca6c6751b8bc74db</id>
<content type='text'>
In fact, the en_mask is a combination of divider enable mask
and pll enable bit(bit0).
Before this patch, we enabled both divider mask and bit0 in prepare(),
but only cleared the bit0 in unprepare().
In the future, we hope en_mask will only be used as divider enable mask.
The enable register(CON0) will be set in 2 steps:
first is divider mask, and then bit0 during prepare(), and vice versa.
But considering backward compatibility, at this stage we allow en_mask
to be a combination or a pure divider enable mask.
And then we will make en_mask a pure divider enable mask in another
following patch series.

Reviewed-by: Ikjoon Jang &lt;ikjn@chromium.org&gt;
Signed-off-by: Weiyi Lu &lt;weiyi.lu@mediatek.com&gt;
Signed-off-by: Chun-Jie Chen &lt;chun-jie.chen@mediatek.com&gt;
Link: https://lore.kernel.org/r/20210726105719.15793-7-chun-jie.chen@mediatek.com
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
</content>
</entry>
<entry>
<title>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174</title>
<updated>2019-05-30T18:26:41+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-05-27T06:55:21+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=1802d0beecafe581ad584634ba92f8a471d8a63a'/>
<id>urn:sha1:1802d0beecafe581ad584634ba92f8a471d8a63a</id>
<content type='text'>
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license version 2 as
  published by the free software foundation this program is
  distributed in the hope that it will be useful but without any
  warranty without even the implied warranty of merchantability or
  fitness for a particular purpose see the gnu general public license
  for more details

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 655 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Reviewed-by: Kate Stewart &lt;kstewart@linuxfoundation.org&gt;
Reviewed-by: Richard Fontana &lt;rfontana@redhat.com&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070034.575739538@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>clk: mediatek: Allow changing PLL rate when it is off</title>
<updated>2019-04-11T20:29:19+00:00</updated>
<author>
<name>James Liao</name>
<email>jamesjj.liao@mediatek.com</email>
</author>
<published>2019-03-05T05:05:46+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=dac5d67277d654695444fe6cab94c1a596dff33c'/>
<id>urn:sha1:dac5d67277d654695444fe6cab94c1a596dff33c</id>
<content type='text'>
Some modules may need to change its clock rate before turn on it.
So changing PLL's rate when it is off should be allowed.
This patch removes PLL enabled check before set rate, so that
PLLs can set new frequency even if they are off.

On MT8173 for example, ARMPLL's enable bit can be controlled by
other HW. That means ARMPLL may be turned on even if we (CPU / SW)
set ARMPLL's enable bit as 0. In this case, SW may want and can
still change ARMPLL's rate by changing its pcw and postdiv settings.
But without this patch, new pcw setting will not be applied because
its enable bit is 0.

Signed-off-by: James Liao &lt;jamesjj.liao@mediatek.com&gt;
Acked-by: Michael Turquette &lt;mturuqette@baylibre.com&gt;
Signed-off-by: Weiyi Lu &lt;weiyi.lu@mediatek.com&gt;
Reviewed-by: James Liao &lt;jamesjj.liao@mediatek.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
</content>
</entry>
<entry>
<title>clk: mediatek: Add configurable pcw_chg_reg to mtk_pll_data</title>
<updated>2019-04-11T20:20:16+00:00</updated>
<author>
<name>Weiyi Lu</name>
<email>weiyi.lu@mediatek.com</email>
</author>
<published>2019-03-05T05:05:44+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=23fe31dedb7b1836cc23666afc1a9c67ed7de775'/>
<id>urn:sha1:23fe31dedb7b1836cc23666afc1a9c67ed7de775</id>
<content type='text'>
In previous MediaTek PLL design, it assumes the pcw change control
is always on the CON1 register.
However, the pcw change bit on MT8183 was moved onto CON0 because
the the PCW length of audio PLLs are extended to 32-bit.
Add configurable pcw_chg_reg to set the pcw change control register
address or using the default control register CON1 if without
setting in pll data.

Signed-off-by: Weiyi Lu &lt;weiyi.lu@mediatek.com&gt;
Reviewed-by: James Liao &lt;jamesjj.liao@mediatek.com&gt;
Reviewed-by: Nicolas Boichat &lt;drinkcat@chromium.org&gt;
Tested-by: Nicolas Boichat &lt;drinkcat@chromium.org&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
</content>
</entry>
<entry>
<title>clk: mediatek: Add configurable pcwibits and fmin to mtk_pll_data</title>
<updated>2019-04-11T20:13:08+00:00</updated>
<author>
<name>Owen Chen</name>
<email>owen.chen@mediatek.com</email>
</author>
<published>2019-03-05T05:05:40+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=9d7e1a82b7d195f901c2a18dd5602a1c11e9eefb'/>
<id>urn:sha1:9d7e1a82b7d195f901c2a18dd5602a1c11e9eefb</id>
<content type='text'>
1. pcwibits: The integer bits of pcw for PLLs is extend to 8 bits,
   add a variable to indicate this change and
   backward-compatible.

2. fmin: The PLL frequency lower-bound is vary from 1GHz to
   1.5GHz, add a variable to indicate platform-dependent.

Signed-off-by: Owen Chen &lt;owen.chen@mediatek.com&gt;
Signed-off-by: Weiyi Lu &lt;weiyi.lu@mediatek.com&gt;
Acked-by: Sean Wang &lt;sean.wang@kernel.org&gt;
Reviewed-by: James Liao &lt;jamesjj.liao@mediatek.com&gt;
Reviewed-by: Nicolas Boichat &lt;drinkcat@chromium.org&gt;
Tested-by: Nicolas Boichat &lt;drinkcat@chromium.org&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
</content>
</entry>
<entry>
<title>clk: mediatek: Disable tuner_en before change PLL rate</title>
<updated>2019-04-11T20:09:17+00:00</updated>
<author>
<name>Owen Chen</name>
<email>owen.chen@mediatek.com</email>
</author>
<published>2019-03-05T05:05:38+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=be17ca6ac76a5cfd07cc3a0397dd05d6929fcbbb'/>
<id>urn:sha1:be17ca6ac76a5cfd07cc3a0397dd05d6929fcbbb</id>
<content type='text'>
PLLs with tuner_en bit, such as APLL1, need to disable
tuner_en before apply new frequency settings, or the new frequency
settings (pcw) will not be applied.
The tuner_en bit will be disabled during changing PLL rate
and be restored after new settings applied.

Fixes: e2f744a82d725 (clk: mediatek: Add MT2712 clock support)
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Owen Chen &lt;owen.chen@mediatek.com&gt;
Signed-off-by: Weiyi Lu &lt;weiyi.lu@mediatek.com&gt;
Reviewed-by: James Liao &lt;jamesjj.liao@mediatek.com&gt;
Reviewed-by: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
</content>
</entry>
<entry>
<title>clk: mediatek: add the option for determining PLL source clock</title>
<updated>2017-11-02T08:07:51+00:00</updated>
<author>
<name>Chen Zhong</name>
<email>chen.zhong@mediatek.com</email>
</author>
<published>2017-10-05T03:50:23+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=c955bf3998efa3355790a4d8c82874582f1bc727'/>
<id>urn:sha1:c955bf3998efa3355790a4d8c82874582f1bc727</id>
<content type='text'>
Since the previous setup always sets the PLL using crystal 26MHz, this
doesn't always happen in every MediaTek platform. So the patch added
flexibility for assigning extra member for determining the PLL source
clock.

Signed-off-by: Chen Zhong &lt;chen.zhong@mediatek.com&gt;
Signed-off-by: Sean Wang &lt;sean.wang@mediatek.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
</content>
</entry>
<entry>
<title>clk: mediatek: Add MT2712 clock support</title>
<updated>2017-11-02T08:02:53+00:00</updated>
<author>
<name>weiyi.lu@mediatek.com</name>
<email>weiyi.lu@mediatek.com</email>
</author>
<published>2017-10-23T04:10:34+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=e2f744a82d725ab55091cccfb8e527b4220471f0'/>
<id>urn:sha1:e2f744a82d725ab55091cccfb8e527b4220471f0</id>
<content type='text'>
Add MT2712 clock support, include topckgen, apmixedsys,
infracfg, pericfg, mcucfg and subsystem clocks.

Signed-off-by: Weiyi Lu &lt;weiyi.lu@mediatek.com&gt;
[sboyd@codeaurora.org: Static on top_clk_data]
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
</content>
</entry>
<entry>
<title>clk: mediatek: Add MT2701 clock support</title>
<updated>2016-11-08T23:59:49+00:00</updated>
<author>
<name>Shunli Wang</name>
<email>shunli.wang@mediatek.com</email>
</author>
<published>2016-11-04T07:43:05+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=e9862118272aa528e35e54ef9f1e35c217870fd7'/>
<id>urn:sha1:e9862118272aa528e35e54ef9f1e35c217870fd7</id>
<content type='text'>
Add MT2701 clock support, include topckgen, apmixedsys,
infracfg, pericfg and subsystem clocks.

Signed-off-by: Shunli Wang &lt;shunli.wang@mediatek.com&gt;
Signed-off-by: James Liao &lt;jamesjj.liao@mediatek.com&gt;
Signed-off-by: Erin Lo &lt;erin.lo@mediatek.com&gt;
Tested-by: John Crispin &lt;blogic@openwrt.org&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
</content>
</entry>
</feed>
