<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/clk/rockchip, branch v4.19</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>clk: rockchip: Add pclk_rkpwm_pmu to PMU critical clocks in rk3399</title>
<updated>2018-08-06T21:46:52+00:00</updated>
<author>
<name>Levin Du</name>
<email>djw@t-chip.com.cn</email>
</author>
<published>2018-08-04T07:31:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=640332d1a089909df08bc9f3e42888a2019c66e2'/>
<id>640332d1a089909df08bc9f3e42888a2019c66e2</id>
<content type='text'>
PWM2 is commonly used to control voltage of PWM regulator of VDD_LOG in
RK3399. On the Firefly-RK3399 board, PWM2 outputs 40 KHz square wave
from power on and the VDD_LOG is about 0.9V. When the kernel boots
normally into the system, the PWM2 keeps outputing PWM signal.

But the kernel hangs randomly after "Starting kernel ..." line on that
board. When it happens, PWM2 outputs high level which causes VDD_LOG
drops to 0.4V below the normal operating voltage.

By adding "pclk_rkpwm_pmu" to the rk3399_pmucru_critical_clocks array,
PWM clock is ensured to be prepared at startup and the PWM2 output is
normal. After repeated tests, the early boot hang is gone.

This patch works on both Firefly-RK3399 and ROC-RK3399-PC boards.

Signed-off-by: Levin Du &lt;djw@t-chip.com.cn&gt;
Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PWM2 is commonly used to control voltage of PWM regulator of VDD_LOG in
RK3399. On the Firefly-RK3399 board, PWM2 outputs 40 KHz square wave
from power on and the VDD_LOG is about 0.9V. When the kernel boots
normally into the system, the PWM2 keeps outputing PWM signal.

But the kernel hangs randomly after "Starting kernel ..." line on that
board. When it happens, PWM2 outputs high level which causes VDD_LOG
drops to 0.4V below the normal operating voltage.

By adding "pclk_rkpwm_pmu" to the rk3399_pmucru_critical_clocks array,
PWM clock is ensured to be prepared at startup and the PWM2 output is
normal. After repeated tests, the early boot hang is gone.

This patch works on both Firefly-RK3399 and ROC-RK3399-PC boards.

Signed-off-by: Levin Du &lt;djw@t-chip.com.cn&gt;
Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: rockchip: fix clk_i2sout parent selection bits on rk3399</title>
<updated>2018-07-07T22:19:19+00:00</updated>
<author>
<name>Alberto Panizzo</name>
<email>alberto@amarulasolutions.com</email>
</author>
<published>2018-07-06T13:18:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a64ad008980c65d38e6cf6858429c78e6b740c41'/>
<id>a64ad008980c65d38e6cf6858429c78e6b740c41</id>
<content type='text'>
Register, shift and mask were wrong according to datasheet.

Fixes: 115510053e5e ("clk: rockchip: add clock controller for the RK3399")
Cc: stable@vger.kernel.org
Signed-off-by: Alberto Panizzo &lt;alberto@amarulasolutions.com&gt;
Signed-off-by: Anthony Brandon &lt;anthony@amarulasolutions.com&gt;
Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Register, shift and mask were wrong according to datasheet.

Fixes: 115510053e5e ("clk: rockchip: add clock controller for the RK3399")
Cc: stable@vger.kernel.org
Signed-off-by: Alberto Panizzo &lt;alberto@amarulasolutions.com&gt;
Signed-off-by: Anthony Brandon &lt;anthony@amarulasolutions.com&gt;
Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: rockchip: add clock controller for px30</title>
<updated>2018-07-06T17:17:57+00:00</updated>
<author>
<name>Elaine Zhang</name>
<email>zhangqing@rock-chips.com</email>
</author>
<published>2018-06-15T02:16:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=243229b11121fbc90d9ee875292dfc75ecf53040'/>
<id>243229b11121fbc90d9ee875292dfc75ecf53040</id>
<content type='text'>
Add the clock tree definition for the new px30 SoC.

Signed-off-by: Elaine Zhang &lt;zhangqing@rock-chips.com&gt;
Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add the clock tree definition for the new px30 SoC.

Signed-off-by: Elaine Zhang &lt;zhangqing@rock-chips.com&gt;
Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: rockchip: add support for half divider</title>
<updated>2018-07-06T17:17:57+00:00</updated>
<author>
<name>Elaine Zhang</name>
<email>zhangqing@rock-chips.com</email>
</author>
<published>2018-06-15T02:16:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=956060a52795a060833e8de2d1bb89209e61bed2'/>
<id>956060a52795a060833e8de2d1bb89209e61bed2</id>
<content type='text'>
The new Rockchip socs have optional half divider:
The formula is shown as:
	freq_out = 2*freq_in / (2*div + 3)
Is this the same for all of new SoCs.

So we use "branch_half_divider" + "COMPOSITE_NOMUX_HALFDIV \
DIV_HALF \ COMPOSITE_HALFDIV \ CMPOSITE_NOGATE_HALFDIV"
to hook that special divider clock-type into our clock-tree.

Signed-off-by: Elaine Zhang &lt;zhangqing@rock-chips.com&gt;
Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The new Rockchip socs have optional half divider:
The formula is shown as:
	freq_out = 2*freq_in / (2*div + 3)
Is this the same for all of new SoCs.

So we use "branch_half_divider" + "COMPOSITE_NOMUX_HALFDIV \
DIV_HALF \ COMPOSITE_HALFDIV \ CMPOSITE_NOGATE_HALFDIV"
to hook that special divider clock-type into our clock-tree.

Signed-off-by: Elaine Zhang &lt;zhangqing@rock-chips.com&gt;
Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: rockchip: remove deprecated gate-clk code and dt-binding</title>
<updated>2018-05-23T11:19:06+00:00</updated>
<author>
<name>Heiko Stuebner</name>
<email>heiko@sntech.de</email>
</author>
<published>2018-05-12T14:30:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=1d646229f28d2c413572905f03f71af33b903cc5'/>
<id>1d646229f28d2c413572905f03f71af33b903cc5</id>
<content type='text'>
Initially we tried modeling clocks via the devicetree before switching
to clocks declared in the clock drivers and only exporting specific
ids to the devicetree.

As the old code was in the kernel for 1-2 releases when the new mode
of operation was added we kept it for backwards compatibility.

That deprecation notice is in the binding since july 2014, so nearly
4 years now and I think it's time to drop the old cruft.

Especially as at the time using the mainline kernel on Rockchip devices
was not really possible, except for experiments on the really old socs of
the rk3066 + rk3188 line, so there shouldn't be any devicetrees still
around that rely on that code.

Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Acked-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Reviewed-by: Rob Herring &lt;robh@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Initially we tried modeling clocks via the devicetree before switching
to clocks declared in the clock drivers and only exporting specific
ids to the devicetree.

As the old code was in the kernel for 1-2 releases when the new mode
of operation was added we kept it for backwards compatibility.

That deprecation notice is in the binding since july 2014, so nearly
4 years now and I think it's time to drop the old cruft.

Especially as at the time using the mainline kernel on Rockchip devices
was not really possible, except for experiments on the really old socs of
the rk3066 + rk3188 line, so there shouldn't be any devicetrees still
around that rely on that code.

Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Acked-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Reviewed-by: Rob Herring &lt;robh@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: rockchip: use match_string() helper</title>
<updated>2018-05-22T11:32:09+00:00</updated>
<author>
<name>Yisheng Xie</name>
<email>xieyisheng1@huawei.com</email>
</author>
<published>2018-05-21T11:57:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a425702f684a3430a67ab7b373b108e9710e4d07'/>
<id>a425702f684a3430a67ab7b373b108e9710e4d07</id>
<content type='text'>
match_string() returns the index of an array for a matching string,
which can be used intead of open coded variant.

Cc: Michael Turquette &lt;mturquette@baylibre.com&gt;
Cc: Stephen Boyd &lt;sboyd@kernel.org&gt;
Cc: Heiko Stuebner &lt;heiko@sntech.de&gt;
Cc: linux-clk@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-rockchip@lists.infradead.org
Signed-off-by: Yisheng Xie &lt;xieyisheng1@huawei.com&gt;
Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
match_string() returns the index of an array for a matching string,
which can be used intead of open coded variant.

Cc: Michael Turquette &lt;mturquette@baylibre.com&gt;
Cc: Stephen Boyd &lt;sboyd@kernel.org&gt;
Cc: Heiko Stuebner &lt;heiko@sntech.de&gt;
Cc: linux-clk@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-rockchip@lists.infradead.org
Signed-off-by: Yisheng Xie &lt;xieyisheng1@huawei.com&gt;
Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: rockchip: assign correct id for pclk_ddr and hclk_sd in rk3399</title>
<updated>2018-03-23T08:09:19+00:00</updated>
<author>
<name>Lin Huang</name>
<email>hl@rock-chips.com</email>
</author>
<published>2018-03-20T02:06:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=9dc486fdf6cc0d7f635954810ab119c5db2cbb60'/>
<id>9dc486fdf6cc0d7f635954810ab119c5db2cbb60</id>
<content type='text'>
Since hclk_sd and pclk_ddr source clock from CPLL or GPLL,
and these two PLL may change their frequency. If we do not
assign right id to pclk_ddr and hclk_sd, they will alway use
default cur register value, and may get the frequency
exceed their signed off frequency. So assign correct Id
for them, then we can assign frequency for them in dts.

Signed-off-by: Lin Huang &lt;hl@rock-chips.com&gt;
Reviewed-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Reviewed-by: Shawn Lin &lt;shawn.lin@rock-chips.com&gt;
Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since hclk_sd and pclk_ddr source clock from CPLL or GPLL,
and these two PLL may change their frequency. If we do not
assign right id to pclk_ddr and hclk_sd, they will alway use
default cur register value, and may get the frequency
exceed their signed off frequency. So assign correct Id
for them, then we can assign frequency for them in dts.

Signed-off-by: Lin Huang &lt;hl@rock-chips.com&gt;
Reviewed-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Reviewed-by: Shawn Lin &lt;shawn.lin@rock-chips.com&gt;
Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: rockchip: Fix error return in phase clock registration</title>
<updated>2018-03-23T08:08:43+00:00</updated>
<author>
<name>Shawn Lin</name>
<email>shawn.lin@rock-chips.com</email>
</author>
<published>2018-03-21T02:39:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=0d92d1802ced45dab0cbb1d130ace7410bcaec99'/>
<id>0d92d1802ced45dab0cbb1d130ace7410bcaec99</id>
<content type='text'>
The newly added clock notifier may return an error code but so far the
error output in the function would only return an error pointer from
registering the clock.

So when the clock notifier fails the clock would be unregistered but the
return would still be the clock pointer which could then not be
dereferenced correctly. So fix the error handling to prevent that.

Fixes: 60cf09e45fbc ("clk: rockchip: Restore the clock phase after the rate was changed")
Signed-off-by: Shawn Lin &lt;shawn.lin@rock-chips.com&gt;
Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The newly added clock notifier may return an error code but so far the
error output in the function would only return an error pointer from
registering the clock.

So when the clock notifier fails the clock would be unregistered but the
return would still be the clock pointer which could then not be
dereferenced correctly. So fix the error handling to prevent that.

Fixes: 60cf09e45fbc ("clk: rockchip: Restore the clock phase after the rate was changed")
Signed-off-by: Shawn Lin &lt;shawn.lin@rock-chips.com&gt;
Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: rockchip: Correct the behaviour of restoring cached phase</title>
<updated>2018-03-23T08:02:58+00:00</updated>
<author>
<name>Shawn Lin</name>
<email>shawn.lin@rock-chips.com</email>
</author>
<published>2018-03-21T02:39:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=570fda972b3178f9a981d1b7ac18e05245a52eab'/>
<id>570fda972b3178f9a981d1b7ac18e05245a52eab</id>
<content type='text'>
We can't restore every phase, for instance the invalid phase and
the phase for coming rate which is out of the scope of boards'
ability. And this patch also corrects the error path to return
invalid pointer to clk if clk_notifier_register failed introduced
by the same offending commit.

Fixes: 60cf09e45fbc ("clk: rockchip: Restore the clock phase after the rate was changed")
Reported-by: wlq &lt;wlq@rock-chips.com&gt;
Signed-off-by: Shawn Lin &lt;shawn.lin@rock-chips.com&gt;
Tested-by: wlq &lt;wlq@rock-chips.com&gt;
Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We can't restore every phase, for instance the invalid phase and
the phase for coming rate which is out of the scope of boards'
ability. And this patch also corrects the error path to return
invalid pointer to clk if clk_notifier_register failed introduced
by the same offending commit.

Fixes: 60cf09e45fbc ("clk: rockchip: Restore the clock phase after the rate was changed")
Reported-by: wlq &lt;wlq@rock-chips.com&gt;
Signed-off-by: Shawn Lin &lt;shawn.lin@rock-chips.com&gt;
Tested-by: wlq &lt;wlq@rock-chips.com&gt;
Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: rockchip: Fix wrong parents for MMC phase clock for rk3328</title>
<updated>2018-03-23T07:58:19+00:00</updated>
<author>
<name>Shawn Lin</name>
<email>shawn.lin@rock-chips.com</email>
</author>
<published>2018-03-21T02:39:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=ce84eca927af24ca27897ba5fee4fbeed443d5fc'/>
<id>ce84eca927af24ca27897ba5fee4fbeed443d5fc</id>
<content type='text'>
commit c420c1e4db22 ("clk: rockchip: Prevent calculating mmc phase if
clock rate is zero") catches some gremlins for clk-rk3328.c that the
parents of MMC phase clock should be clk_{sdmmc, sdio, emmc}, but not
sclk_{sdmmc, sdio, emmc}.

Signed-off-by: Shawn Lin &lt;shawn.lin@rock-chips.com&gt;
Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit c420c1e4db22 ("clk: rockchip: Prevent calculating mmc phase if
clock rate is zero") catches some gremlins for clk-rk3328.c that the
parents of MMC phase clock should be clk_{sdmmc, sdio, emmc}, but not
sclk_{sdmmc, sdio, emmc}.

Signed-off-by: Shawn Lin &lt;shawn.lin@rock-chips.com&gt;
Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
</pre>
</div>
</content>
</entry>
</feed>
