* [PATCH 1/3] clk: rockchip: rk3568: Add PLL rate for 292.5MHz
2023-10-18 15:33 [PATCH 0/3] Fixes for RGB30 Chris Morgan
@ 2023-10-18 15:33 ` Chris Morgan
2023-10-18 15:33 ` [PATCH 2/3] arm64: dts: rockchip: Update VPLL Frequency for RGB30 Chris Morgan
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Chris Morgan @ 2023-10-18 15:33 UTC (permalink / raw)
To: linux-rockchip
Cc: linux-clk, devicetree, sboyd, mturquette, heiko, conor+dt,
krzysztof.kozlowski+dt, robh+dt, Chris Morgan
From: Chris Morgan <macromorgan@hotmail.com>
Add support for a PLL rate of 292.5MHz so that the Powkiddy RGB30 panel
can run at a requested 60hz (59.96, close enough).
I have confirmed this rate fits with all the constraints
listed in the TRM for the VPLL (as an integer PLL) in Part 1 "Chapter
2 Clock & Reset Unit (CRU)."
Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
---
drivers/clk/rockchip/clk-rk3568.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/clk/rockchip/clk-rk3568.c b/drivers/clk/rockchip/clk-rk3568.c
index 16dabe2b9c47..db713e1526cd 100644
--- a/drivers/clk/rockchip/clk-rk3568.c
+++ b/drivers/clk/rockchip/clk-rk3568.c
@@ -72,6 +72,7 @@ static struct rockchip_pll_rate_table rk3568_pll_rates[] = {
RK3036_PLL_RATE(408000000, 1, 68, 2, 2, 1, 0),
RK3036_PLL_RATE(312000000, 1, 78, 6, 1, 1, 0),
RK3036_PLL_RATE(297000000, 2, 99, 4, 1, 1, 0),
+ RK3036_PLL_RATE(292500000, 1, 195, 4, 4, 1, 0),
RK3036_PLL_RATE(241500000, 2, 161, 4, 2, 1, 0),
RK3036_PLL_RATE(216000000, 1, 72, 4, 2, 1, 0),
RK3036_PLL_RATE(200000000, 1, 100, 3, 4, 1, 0),
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/3] arm64: dts: rockchip: Update VPLL Frequency for RGB30
2023-10-18 15:33 [PATCH 0/3] Fixes for RGB30 Chris Morgan
2023-10-18 15:33 ` [PATCH 1/3] clk: rockchip: rk3568: Add PLL rate for 292.5MHz Chris Morgan
@ 2023-10-18 15:33 ` Chris Morgan
2023-10-18 15:33 ` [PATCH 3/3] arm64: dts: rockchip: Remove UART2 from RGB30 Chris Morgan
2023-10-19 8:54 ` [PATCH 0/3] Fixes for RGB30 Heiko Stuebner
3 siblings, 0 replies; 8+ messages in thread
From: Chris Morgan @ 2023-10-18 15:33 UTC (permalink / raw)
To: linux-rockchip
Cc: linux-clk, devicetree, sboyd, mturquette, heiko, conor+dt,
krzysztof.kozlowski+dt, robh+dt, Chris Morgan
From: Chris Morgan <macromorgan@hotmail.com>
Set the VPLL frequency for the RGB30 to 292.5MHz to support running
the 720x720 display panel at 59.97hz. Without this change, the panel
runs at 59.08hz.
Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
---
arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb30.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb30.dts b/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb30.dts
index c7828c99a1bb..3ebc21608213 100644
--- a/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb30.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb30.dts
@@ -68,7 +68,7 @@ &cru {
assigned-clocks = <&pmucru CLK_RTC_32K>, <&cru PLL_GPLL>,
<&pmucru PLL_PPLL>, <&cru PLL_VPLL>;
assigned-clock-rates = <32768>, <1200000000>,
- <200000000>, <108000000>;
+ <200000000>, <292500000>;
};
&gpio_keys_control {
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/3] arm64: dts: rockchip: Remove UART2 from RGB30
2023-10-18 15:33 [PATCH 0/3] Fixes for RGB30 Chris Morgan
2023-10-18 15:33 ` [PATCH 1/3] clk: rockchip: rk3568: Add PLL rate for 292.5MHz Chris Morgan
2023-10-18 15:33 ` [PATCH 2/3] arm64: dts: rockchip: Update VPLL Frequency for RGB30 Chris Morgan
@ 2023-10-18 15:33 ` Chris Morgan
2024-03-30 13:13 ` Ahmad Fatoum
2023-10-19 8:54 ` [PATCH 0/3] Fixes for RGB30 Heiko Stuebner
3 siblings, 1 reply; 8+ messages in thread
From: Chris Morgan @ 2023-10-18 15:33 UTC (permalink / raw)
To: linux-rockchip
Cc: linux-clk, devicetree, sboyd, mturquette, heiko, conor+dt,
krzysztof.kozlowski+dt, robh+dt, Chris Morgan
From: Chris Morgan <macromorgan@hotmail.com>
The Powkiddy RGB30 has no onboard UART header, so remove the reference
to it in the device tree. This was left on by mistake in the initial
commit.
Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
---
arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb30.dts | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb30.dts b/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb30.dts
index 3ebc21608213..1ead3c5c24b3 100644
--- a/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb30.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb30.dts
@@ -64,6 +64,10 @@ simple-audio-card,cpu {
/delete-node/ &adc_keys;
+&chosen {
+ /delete-property/ stdout-path;
+};
+
&cru {
assigned-clocks = <&pmucru CLK_RTC_32K>, <&cru PLL_GPLL>,
<&pmucru PLL_PPLL>, <&cru PLL_VPLL>;
@@ -149,4 +153,9 @@ rk817_charger: charger {
};
};
+/* There is no UART header visible on the board for this device. */
+&uart2 {
+ status = "disabled";
+};
+
/delete-node/ &vibrator;
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 3/3] arm64: dts: rockchip: Remove UART2 from RGB30
2023-10-18 15:33 ` [PATCH 3/3] arm64: dts: rockchip: Remove UART2 from RGB30 Chris Morgan
@ 2024-03-30 13:13 ` Ahmad Fatoum
2024-03-30 15:34 ` Chris Morgan
0 siblings, 1 reply; 8+ messages in thread
From: Ahmad Fatoum @ 2024-03-30 13:13 UTC (permalink / raw)
To: Chris Morgan, linux-rockchip
Cc: linux-clk, devicetree, sboyd, mturquette, heiko, conor+dt,
krzysztof.kozlowski+dt, robh+dt, Chris Morgan
Hello Chris,
On 18.10.23 17:33, Chris Morgan wrote:
> From: Chris Morgan <macromorgan@hotmail.com>
>
> The Powkiddy RGB30 has no onboard UART header, so remove the reference
> to it in the device tree. This was left on by mistake in the initial
> commit.
Do you know if the UART is perhaps available over testpoints?
If yes, having a DT-overlay upstream enabling it along with documentation could be useful.
If not, how do you do low-level debugging on the RBG30 in absence of the serial console?
Thanks,
Ahmad
>
> Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
> ---
> arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb30.dts | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb30.dts b/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb30.dts
> index 3ebc21608213..1ead3c5c24b3 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb30.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb30.dts
> @@ -64,6 +64,10 @@ simple-audio-card,cpu {
>
> /delete-node/ &adc_keys;
>
> +&chosen {
> + /delete-property/ stdout-path;
> +};
> +
> &cru {
> assigned-clocks = <&pmucru CLK_RTC_32K>, <&cru PLL_GPLL>,
> <&pmucru PLL_PPLL>, <&cru PLL_VPLL>;
> @@ -149,4 +153,9 @@ rk817_charger: charger {
> };
> };
>
> +/* There is no UART header visible on the board for this device. */
> +&uart2 {
> + status = "disabled";
> +};
> +
> /delete-node/ &vibrator;
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 3/3] arm64: dts: rockchip: Remove UART2 from RGB30
2024-03-30 13:13 ` Ahmad Fatoum
@ 2024-03-30 15:34 ` Chris Morgan
2024-04-02 9:27 ` Ahmad Fatoum
0 siblings, 1 reply; 8+ messages in thread
From: Chris Morgan @ 2024-03-30 15:34 UTC (permalink / raw)
To: Ahmad Fatoum
Cc: Chris Morgan, linux-rockchip, linux-clk, devicetree, sboyd,
mturquette, heiko, conor+dt, krzysztof.kozlowski+dt, robh+dt
On Sat, Mar 30, 2024 at 02:13:05PM +0100, Ahmad Fatoum wrote:
> Hello Chris,
>
> On 18.10.23 17:33, Chris Morgan wrote:
> > From: Chris Morgan <macromorgan@hotmail.com>
> >
> > The Powkiddy RGB30 has no onboard UART header, so remove the reference
> > to it in the device tree. This was left on by mistake in the initial
> > commit.
>
> Do you know if the UART is perhaps available over testpoints?
There is not one as best I can tell on either the RGB30 or RK2023. The
Powkiddy X55 does have UART, however. I was able to exploit the fact
that the RGB30 is extremely similar to all of the Anbernic devices
(such as the RG353 series) for the purposes of low-level development.
Once I got a network connection I performed the rest of development
over SSH, but prior to that I just developed on a different device.
Thank you,
Chris.
>
> If yes, having a DT-overlay upstream enabling it along with documentation could be useful.
> If not, how do you do low-level debugging on the RBG30 in absence of the serial console?
>
> Thanks,
> Ahmad
>
> >
> > Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
> > ---
> > arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb30.dts | 9 +++++++++
> > 1 file changed, 9 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb30.dts b/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb30.dts
> > index 3ebc21608213..1ead3c5c24b3 100644
> > --- a/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb30.dts
> > +++ b/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb30.dts
> > @@ -64,6 +64,10 @@ simple-audio-card,cpu {
> >
> > /delete-node/ &adc_keys;
> >
> > +&chosen {
> > + /delete-property/ stdout-path;
> > +};
> > +
> > &cru {
> > assigned-clocks = <&pmucru CLK_RTC_32K>, <&cru PLL_GPLL>,
> > <&pmucru PLL_PPLL>, <&cru PLL_VPLL>;
> > @@ -149,4 +153,9 @@ rk817_charger: charger {
> > };
> > };
> >
> > +/* There is no UART header visible on the board for this device. */
> > +&uart2 {
> > + status = "disabled";
> > +};
> > +
> > /delete-node/ &vibrator;
>
> --
> Pengutronix e.K. | |
> Steuerwalder Str. 21 | http://www.pengutronix.de/ |
> 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 3/3] arm64: dts: rockchip: Remove UART2 from RGB30
2024-03-30 15:34 ` Chris Morgan
@ 2024-04-02 9:27 ` Ahmad Fatoum
0 siblings, 0 replies; 8+ messages in thread
From: Ahmad Fatoum @ 2024-04-02 9:27 UTC (permalink / raw)
To: Chris Morgan
Cc: Chris Morgan, linux-rockchip, linux-clk, devicetree, sboyd,
mturquette, heiko, conor+dt, krzysztof.kozlowski+dt, robh+dt
Hello Chris,
On 30.03.24 16:34, Chris Morgan wrote:
> On Sat, Mar 30, 2024 at 02:13:05PM +0100, Ahmad Fatoum wrote:
>> Hello Chris,
>>
>> On 18.10.23 17:33, Chris Morgan wrote:
>>> From: Chris Morgan <macromorgan@hotmail.com>
>>>
>>> The Powkiddy RGB30 has no onboard UART header, so remove the reference
>>> to it in the device tree. This was left on by mistake in the initial
>>> commit.
>>
>> Do you know if the UART is perhaps available over testpoints?
>
> There is not one as best I can tell on either the RGB30 or RK2023. The
> Powkiddy X55 does have UART, however. I was able to exploit the fact
> that the RGB30 is extremely similar to all of the Anbernic devices
> (such as the RG353 series) for the purposes of low-level development.
> Once I got a network connection I performed the rest of development
> over SSH, but prior to that I just developed on a different device.
Thanks for the info.
AFAICS, it should be possible to get a console by changing the pinmux
setting on the Game TF-Card:
SDMMC1_D0/UART6_RX_M0/GPIO2_A3_u
SDMMC1_D1/UART6_TX_M0/GPIO2_A4_u
SDMMC1_D2/UART7_RX_M0/GPIO2_A5_u
SDMMC1_D3/UART7_TX_M0/GPIO2_A6_u
SDMMC1_CMD/UART9_RX_M0/GPIO2_A7_u
SDMMC1_CLK/UART9_TX_M0/GPIO2_B0_d
I will give that a try.
Cheers,
Ahmad
>
> Thank you,
> Chris.
>
>>
>> If yes, having a DT-overlay upstream enabling it along with documentation could be useful.
>> If not, how do you do low-level debugging on the RBG30 in absence of the serial console?
>>
>> Thanks,
>> Ahmad
>>
>>>
>>> Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
>>> ---
>>> arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb30.dts | 9 +++++++++
>>> 1 file changed, 9 insertions(+)
>>>
>>> diff --git a/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb30.dts b/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb30.dts
>>> index 3ebc21608213..1ead3c5c24b3 100644
>>> --- a/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb30.dts
>>> +++ b/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb30.dts
>>> @@ -64,6 +64,10 @@ simple-audio-card,cpu {
>>>
>>> /delete-node/ &adc_keys;
>>>
>>> +&chosen {
>>> + /delete-property/ stdout-path;
>>> +};
>>> +
>>> &cru {
>>> assigned-clocks = <&pmucru CLK_RTC_32K>, <&cru PLL_GPLL>,
>>> <&pmucru PLL_PPLL>, <&cru PLL_VPLL>;
>>> @@ -149,4 +153,9 @@ rk817_charger: charger {
>>> };
>>> };
>>>
>>> +/* There is no UART header visible on the board for this device. */
>>> +&uart2 {
>>> + status = "disabled";
>>> +};
>>> +
>>> /delete-node/ &vibrator;
>>
>> --
>> Pengutronix e.K. | |
>> Steuerwalder Str. 21 | http://www.pengutronix.de/ |
>> 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
>> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
>>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/3] Fixes for RGB30
2023-10-18 15:33 [PATCH 0/3] Fixes for RGB30 Chris Morgan
` (2 preceding siblings ...)
2023-10-18 15:33 ` [PATCH 3/3] arm64: dts: rockchip: Remove UART2 from RGB30 Chris Morgan
@ 2023-10-19 8:54 ` Heiko Stuebner
3 siblings, 0 replies; 8+ messages in thread
From: Heiko Stuebner @ 2023-10-19 8:54 UTC (permalink / raw)
To: Chris Morgan, linux-rockchip
Cc: Heiko Stuebner, robh+dt, devicetree, mturquette, Chris Morgan,
sboyd, linux-clk, conor+dt, krzysztof.kozlowski+dt
On Wed, 18 Oct 2023 10:33:54 -0500, Chris Morgan wrote:
> From: Chris Morgan <macromorgan@hotmail.com>
>
> After preliminary testing, a few users requested that I see if I can
> make the panel run at precisely 60hz. As the device is typically used
> for retro gaming, getting the panel to refresh as close to 60hz as
> possible is important.
>
> [...]
Applied, thanks!
[1/3] clk: rockchip: rk3568: Add PLL rate for 292.5MHz
commit: bb8ab7335bd2f55706fd09f5ce431207a746d99a
[2/3] arm64: dts: rockchip: Update VPLL Frequency for RGB30
commit: 793e0d8988bc0e6bf2ff5c6df7fc81ec8c53a93e
[3/3] arm64: dts: rockchip: Remove UART2 from RGB30
commit: efa1d1c6c8e4f89eedef9035d1f74fe98861eb30
Best regards,
--
Heiko Stuebner <heiko@sntech.de>
^ permalink raw reply [flat|nested] 8+ messages in thread