* [PATCH 0/2] arm64: dts: amlogic: handle hdmi system clock
@ 2024-06-26 15:27 Jerome Brunet
2024-06-26 15:27 ` [PATCH 1/2] arm64: dts: amlogic: gx: correct hdmi clocks Jerome Brunet
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Jerome Brunet @ 2024-06-26 15:27 UTC (permalink / raw)
To: Neil Armstrong
Cc: Jerome Brunet, Kevin Hilman, linux-kernel, linux-amlogic,
devicetree, Rob Herring, Krzysztof Kozlowski, Conor Dooley
This patchset adds the setup of the HDMI system clock for HDMI Tx.
This is another step in cleaning HDMI Tx and its direct usage of HHI
register space. Eventually, this will help remove component usage from
the Amlogic display drivers.
Jerome Brunet (2):
arm64: dts: amlogic: gx: correct hdmi clocks
arm64: dts: amlogic: setup hdmi system clock
arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 5 +++++
arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 9 +++++++--
arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 9 +++++++--
3 files changed, 19 insertions(+), 4 deletions(-)
--
2.43.0
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] arm64: dts: amlogic: gx: correct hdmi clocks
2024-06-26 15:27 [PATCH 0/2] arm64: dts: amlogic: handle hdmi system clock Jerome Brunet
@ 2024-06-26 15:27 ` Jerome Brunet
2024-06-26 15:27 ` [PATCH 2/2] arm64: dts: amlogic: setup hdmi system clock Jerome Brunet
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Jerome Brunet @ 2024-06-26 15:27 UTC (permalink / raw)
To: Neil Armstrong
Cc: Jerome Brunet, Kevin Hilman, linux-kernel, linux-amlogic,
devicetree, Rob Herring, Krzysztof Kozlowski, Conor Dooley
The clocks provided to HDMI tx are not consistent between gx and g12:
* gx receives the peripheral clock as 'isfr' while g12 receives it as
'iahb'
* g12 gets the HDMI system clock as 'isfr' but gx does not even get it.
It surely needs that clock since the driver is directly poking around
the clock controller's registers for that clock.
Align gx SoCs with g12 and provide:
* the HDMI peripheral clock as 'iahb'
* the HDMI system clock as 'isfr'
Fixes: 6939db7e0dbf ("ARM64: dts: meson-gx: Add support for HDMI output")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 4 ++--
arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
index d8a386c31914..041c37b809f2 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
@@ -311,8 +311,8 @@ &hdmi_tx {
<&reset RESET_HDMI_SYSTEM_RESET>,
<&reset RESET_HDMI_TX>;
reset-names = "hdmitx_apb", "hdmitx", "hdmitx_phy";
- clocks = <&clkc CLKID_HDMI_PCLK>,
- <&clkc CLKID_CLK81>,
+ clocks = <&clkc CLKID_HDMI>,
+ <&clkc CLKID_HDMI_PCLK>,
<&clkc CLKID_GCLK_VENCI_INT0>;
clock-names = "isfr", "iahb", "venci";
power-domains = <&pwrc PWRC_GXBB_VPU_ID>;
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
index 82386feb5177..067108800a58 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
@@ -323,8 +323,8 @@ &hdmi_tx {
<&reset RESET_HDMI_SYSTEM_RESET>,
<&reset RESET_HDMI_TX>;
reset-names = "hdmitx_apb", "hdmitx", "hdmitx_phy";
- clocks = <&clkc CLKID_HDMI_PCLK>,
- <&clkc CLKID_CLK81>,
+ clocks = <&clkc CLKID_HDMI>,
+ <&clkc CLKID_HDMI_PCLK>,
<&clkc CLKID_GCLK_VENCI_INT0>;
clock-names = "isfr", "iahb", "venci";
power-domains = <&pwrc PWRC_GXBB_VPU_ID>;
--
2.43.0
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/2] arm64: dts: amlogic: setup hdmi system clock
2024-06-26 15:27 [PATCH 0/2] arm64: dts: amlogic: handle hdmi system clock Jerome Brunet
2024-06-26 15:27 ` [PATCH 1/2] arm64: dts: amlogic: gx: correct hdmi clocks Jerome Brunet
@ 2024-06-26 15:27 ` Jerome Brunet
2024-06-28 8:10 ` [PATCH 0/2] arm64: dts: amlogic: handle " Neil Armstrong
2024-06-28 8:12 ` Neil Armstrong
3 siblings, 0 replies; 6+ messages in thread
From: Jerome Brunet @ 2024-06-26 15:27 UTC (permalink / raw)
To: Neil Armstrong
Cc: Jerome Brunet, Kevin Hilman, linux-kernel, linux-amlogic,
devicetree, Rob Herring, Krzysztof Kozlowski, Conor Dooley
HDMI Tx needs the system clock set on the xtal rate.
This clock is managed by the main clock controller of the related SoCs.
Currently 2 part of the display drivers race to setup the HDMI system
clock by directly poking the controller register. The clock API should
be used to setup the rate instead.
Use assigned-clock to setup the HDMI system clock.
Fixes: 6939db7e0dbf ("ARM64: dts: meson-gx: Add support for HDMI output")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 5 +++++
arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 5 +++++
arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 5 +++++
3 files changed, 15 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
index 354f3c722b04..0c425af3174d 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
@@ -215,6 +215,11 @@ hdmi_tx: hdmi-tx@0 {
#sound-dai-cells = <0>;
status = "disabled";
+ assigned-clocks = <&clkc CLKID_HDMI_SEL>,
+ <&clkc CLKID_HDMI>;
+ assigned-clock-parents = <&xtal>, <0>;
+ assigned-clock-rates = <0>, <24000000>;
+
/* VPU VENC Input */
hdmi_tx_venc_port: port@0 {
reg = <0>;
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
index 041c37b809f2..ed00e67e6923 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
@@ -316,6 +316,11 @@ &hdmi_tx {
<&clkc CLKID_GCLK_VENCI_INT0>;
clock-names = "isfr", "iahb", "venci";
power-domains = <&pwrc PWRC_GXBB_VPU_ID>;
+
+ assigned-clocks = <&clkc CLKID_HDMI_SEL>,
+ <&clkc CLKID_HDMI>;
+ assigned-clock-parents = <&xtal>, <0>;
+ assigned-clock-rates = <0>, <24000000>;
};
&sysctrl {
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
index 067108800a58..f58d1790de1c 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
@@ -328,6 +328,11 @@ &hdmi_tx {
<&clkc CLKID_GCLK_VENCI_INT0>;
clock-names = "isfr", "iahb", "venci";
power-domains = <&pwrc PWRC_GXBB_VPU_ID>;
+
+ assigned-clocks = <&clkc CLKID_HDMI_SEL>,
+ <&clkc CLKID_HDMI>;
+ assigned-clock-parents = <&xtal>, <0>;
+ assigned-clock-rates = <0>, <24000000>;
};
&sysctrl {
--
2.43.0
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] arm64: dts: amlogic: handle hdmi system clock
2024-06-26 15:27 [PATCH 0/2] arm64: dts: amlogic: handle hdmi system clock Jerome Brunet
2024-06-26 15:27 ` [PATCH 1/2] arm64: dts: amlogic: gx: correct hdmi clocks Jerome Brunet
2024-06-26 15:27 ` [PATCH 2/2] arm64: dts: amlogic: setup hdmi system clock Jerome Brunet
@ 2024-06-28 8:10 ` Neil Armstrong
2024-06-28 9:10 ` Jerome Brunet
2024-06-28 8:12 ` Neil Armstrong
3 siblings, 1 reply; 6+ messages in thread
From: Neil Armstrong @ 2024-06-28 8:10 UTC (permalink / raw)
To: Jerome Brunet
Cc: Kevin Hilman, linux-kernel, linux-amlogic, devicetree,
Rob Herring, Krzysztof Kozlowski, Conor Dooley
Hi,
On 26/06/2024 17:27, Jerome Brunet wrote:
> This patchset adds the setup of the HDMI system clock for HDMI Tx.
>
> This is another step in cleaning HDMI Tx and its direct usage of HHI
> register space. Eventually, this will help remove component usage from
> the Amlogic display drivers.
Thanks,
Beware we will need to keep old DT with new kernel functional for a while,
do removal of component & HHI in meson_dw_hdmi would need to wait for multiple
kernel releases.
A migration step would be to add a phandle to hhi right now, so we can drop
components earlier, then in a second time add a proper PHY and then mark
the hhi reg as deprecated.
Neil
>
> Jerome Brunet (2):
> arm64: dts: amlogic: gx: correct hdmi clocks
> arm64: dts: amlogic: setup hdmi system clock
>
> arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 5 +++++
> arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 9 +++++++--
> arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 9 +++++++--
> 3 files changed, 19 insertions(+), 4 deletions(-)
>
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] arm64: dts: amlogic: handle hdmi system clock
2024-06-26 15:27 [PATCH 0/2] arm64: dts: amlogic: handle hdmi system clock Jerome Brunet
` (2 preceding siblings ...)
2024-06-28 8:10 ` [PATCH 0/2] arm64: dts: amlogic: handle " Neil Armstrong
@ 2024-06-28 8:12 ` Neil Armstrong
3 siblings, 0 replies; 6+ messages in thread
From: Neil Armstrong @ 2024-06-28 8:12 UTC (permalink / raw)
To: Jerome Brunet
Cc: Kevin Hilman, linux-kernel, linux-amlogic, devicetree,
Rob Herring, Krzysztof Kozlowski, Conor Dooley
Hi,
On Wed, 26 Jun 2024 17:27:29 +0200, Jerome Brunet wrote:
> This patchset adds the setup of the HDMI system clock for HDMI Tx.
>
> This is another step in cleaning HDMI Tx and its direct usage of HHI
> register space. Eventually, this will help remove component usage from
> the Amlogic display drivers.
>
> Jerome Brunet (2):
> arm64: dts: amlogic: gx: correct hdmi clocks
> arm64: dts: amlogic: setup hdmi system clock
>
> [...]
Thanks, Applied to https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux.git (v6.11/arm64-dt)
[1/2] arm64: dts: amlogic: gx: correct hdmi clocks
https://git.kernel.org/amlogic/c/0602ba0dcd0e76067a0b7543e92b2de3fb231073
[2/2] arm64: dts: amlogic: setup hdmi system clock
https://git.kernel.org/amlogic/c/1443b6ea806dfcdcee6c894784332c9c947ac319
These changes has been applied on the intermediate git tree [1].
The v6.11/arm64-dt branch will then be sent via a formal Pull Request to the Linux SoC maintainers
for inclusion in their intermediate git branches in order to be sent to Linus during
the next merge window, or sooner if it's a set of fixes.
In the cases of fixes, those will be merged in the current release candidate
kernel and as soon they appear on the Linux master branch they will be
backported to the previous Stable and Long-Stable kernels [2].
The intermediate git branches are merged daily in the linux-next tree [3],
people are encouraged testing these pre-release kernels and report issues on the
relevant mailing-lists.
If problems are discovered on those changes, please submit a signed-off-by revert
patch followed by a corrective changeset.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux.git
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
[3] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
--
Neil
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] arm64: dts: amlogic: handle hdmi system clock
2024-06-28 8:10 ` [PATCH 0/2] arm64: dts: amlogic: handle " Neil Armstrong
@ 2024-06-28 9:10 ` Jerome Brunet
0 siblings, 0 replies; 6+ messages in thread
From: Jerome Brunet @ 2024-06-28 9:10 UTC (permalink / raw)
To: Neil Armstrong
Cc: Kevin Hilman, linux-kernel, linux-amlogic, devicetree,
Rob Herring, Krzysztof Kozlowski, Conor Dooley
On Fri 28 Jun 2024 at 10:10, Neil Armstrong <neil.armstrong@linaro.org> wrote:
> Hi,
>
> On 26/06/2024 17:27, Jerome Brunet wrote:
>> This patchset adds the setup of the HDMI system clock for HDMI Tx.
>> This is another step in cleaning HDMI Tx and its direct usage of HHI
>> register space. Eventually, this will help remove component usage from
>> the Amlogic display drivers.
>
> Thanks,
>
> Beware we will need to keep old DT with new kernel functional for a while,
> do removal of component & HHI in meson_dw_hdmi would need to wait for multiple
> kernel releases.
Oh, I'm aware of the pain DT backward compatibility will be on this one.
Situation is slightly more complex than the PWM ...
I'm not sure how keeping support both for the 'legacy HHI direct access'
and 'modern API and region' approaches will look like. It's likely to be a
mess.
What I posted so far are things I'm sure of and will not cause issue.
When I get to the controversial stuff, I'll post an RFC first.
>
> A migration step would be to add a phandle to hhi right now, so we can drop
> components earlier, then in a second time add a proper PHY and then mark
> the hhi reg as deprecated.
Giving the hhi syscon to HDMI-Tx is solving half the problem.
IMO, HDMI-TX should just get the HDMI PHY register space in HHI. Indeed
that could be added now as well, without causing issue to the existing
DTs and drivers.
The display drivers should not directly poke in the HHI bus, nor should it have
access to the whole bus.
If we are going to take the pain of fixing the DT interface, better do
it once and for all.
The 2 main HHI offenders are HDMI-Tx and vclk:
* HDMI-TX: I've got the that mostly sorted out, for an RFC at least.
* Vclk: Here it is more a matter CCF usage that HHI
* The HDMI pll could use the regular DCO/mult-range driver from what I
can see
* The vclk display would need to get the DCO clock along with all the
ODs/divider handle. Without rate propagation, it would be free to
recreate the setups it needs. I don't have the full list and I did
not spend much time on this yet but that's the idea.
>
> Neil
>
>> Jerome Brunet (2):
>> arm64: dts: amlogic: gx: correct hdmi clocks
>> arm64: dts: amlogic: setup hdmi system clock
>> arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 5 +++++
>> arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 9 +++++++--
>> arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 9 +++++++--
>> 3 files changed, 19 insertions(+), 4 deletions(-)
>>
--
Jerome
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-06-28 9:10 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-26 15:27 [PATCH 0/2] arm64: dts: amlogic: handle hdmi system clock Jerome Brunet
2024-06-26 15:27 ` [PATCH 1/2] arm64: dts: amlogic: gx: correct hdmi clocks Jerome Brunet
2024-06-26 15:27 ` [PATCH 2/2] arm64: dts: amlogic: setup hdmi system clock Jerome Brunet
2024-06-28 8:10 ` [PATCH 0/2] arm64: dts: amlogic: handle " Neil Armstrong
2024-06-28 9:10 ` Jerome Brunet
2024-06-28 8:12 ` Neil Armstrong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®