The "hdmi_sys" clock is driving the HDMI TX controller. The
controller's IP seems to use this clock for example to derived the DDC
clock.
Testing has shown that we can disable this clock without locking up the
system (as long as we don't read the HDMI TX registers while this clock
is disabled - this can't happen as we don't have a driver yet and once
we have one that driver will enable this clock).
Martin Blumenstingl (2):
clk: meson8b: export the HDMI system clock
clk: meson: meson8b: make the hdmi_sys clock tree mutable
drivers/clk/meson/meson8b.c | 6 +++---
drivers/clk/meson/meson8b.h | 1 -
include/dt-bindings/clock/meson8b-clkc.h | 1 +
3 files changed, 4 insertions(+), 4 deletions(-)
--
2.26.0
The HDMI TX controller requires the hdmi_sys clock to be enabled. Allow
changing the whole clock tree now that we know that one of our drivers
requires this.
Signed-off-by: Martin Blumenstingl <[email protected]>
---
drivers/clk/meson/meson8b.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/clk/meson/meson8b.c b/drivers/clk/meson/meson8b.c
index 34a70c4b4899..7c55c695cbae 100644
--- a/drivers/clk/meson/meson8b.c
+++ b/drivers/clk/meson/meson8b.c
@@ -1725,7 +1725,7 @@ static struct clk_regmap meson8b_hdmi_sys_sel = {
},
.hw.init = &(struct clk_init_data){
.name = "hdmi_sys_sel",
- .ops = &clk_regmap_mux_ro_ops,
+ .ops = &clk_regmap_mux_ops,
/* FIXME: all other parents are unknown */
.parent_data = &(const struct clk_parent_data) {
.fw_name = "xtal",
@@ -1745,7 +1745,7 @@ static struct clk_regmap meson8b_hdmi_sys_div = {
},
.hw.init = &(struct clk_init_data){
.name = "hdmi_sys_div",
- .ops = &clk_regmap_divider_ro_ops,
+ .ops = &clk_regmap_divider_ops,
.parent_hws = (const struct clk_hw *[]) {
&meson8b_hdmi_sys_sel.hw
},
@@ -1761,7 +1761,7 @@ static struct clk_regmap meson8b_hdmi_sys = {
},
.hw.init = &(struct clk_init_data) {
.name = "hdmi_sys",
- .ops = &clk_regmap_gate_ro_ops,
+ .ops = &clk_regmap_gate_ops,
.parent_hws = (const struct clk_hw *[]) {
&meson8b_hdmi_sys_div.hw
},
--
2.26.0
Export the HDMI system clock (used by the HDMI transmitter) so it can be
used in the dt-bindings.
Signed-off-by: Martin Blumenstingl <[email protected]>
---
drivers/clk/meson/meson8b.h | 1 -
include/dt-bindings/clock/meson8b-clkc.h | 1 +
2 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/meson/meson8b.h b/drivers/clk/meson/meson8b.h
index c889fbeec30f..94ce3ef0c1d5 100644
--- a/drivers/clk/meson/meson8b.h
+++ b/drivers/clk/meson/meson8b.h
@@ -146,7 +146,6 @@
#define CLKID_CTS_VDAC0 171
#define CLKID_HDMI_SYS_SEL 172
#define CLKID_HDMI_SYS_DIV 173
-#define CLKID_HDMI_SYS 174
#define CLKID_MALI_0_SEL 175
#define CLKID_MALI_0_DIV 176
#define CLKID_MALI_0 177
diff --git a/include/dt-bindings/clock/meson8b-clkc.h b/include/dt-bindings/clock/meson8b-clkc.h
index 68862aaf977e..4c5965ae1df4 100644
--- a/include/dt-bindings/clock/meson8b-clkc.h
+++ b/include/dt-bindings/clock/meson8b-clkc.h
@@ -107,6 +107,7 @@
#define CLKID_PERIPH 126
#define CLKID_AXI 128
#define CLKID_L2_DRAM 130
+#define CLKID_HDMI_SYS 174
#define CLKID_VPU 190
#define CLKID_VDEC_1 196
#define CLKID_VDEC_HCODEC 199
--
2.26.0
On Tue, 31 Mar 2020 01:45:34 +0200, Martin Blumenstingl wrote:
> Export the HDMI system clock (used by the HDMI transmitter) so it can be
> used in the dt-bindings.
>
> Signed-off-by: Martin Blumenstingl <[email protected]>
> ---
> drivers/clk/meson/meson8b.h | 1 -
> include/dt-bindings/clock/meson8b-clkc.h | 1 +
> 2 files changed, 1 insertion(+), 1 deletion(-)
>
Acked-by: Rob Herring <[email protected]>
On Tue 31 Mar 2020 at 01:45, Martin Blumenstingl <[email protected]> wrote:
>
> Martin Blumenstingl (2):
> clk: meson8b: export the HDMI system clock
> clk: meson: meson8b: make the hdmi_sys clock tree mutable
>
> drivers/clk/meson/meson8b.c | 6 +++---
> drivers/clk/meson/meson8b.h | 1 -
> include/dt-bindings/clock/meson8b-clkc.h | 1 +
> 3 files changed, 4 insertions(+), 4 deletions(-)
Applied, Thx