Hi JiadaCan you let me know how it breaks sound clock / module stop
(snip)I have some local device-tree change, which expends 'adg' register+ avb = devm_kzalloc(dev, sizeof(*avb), GFP_KERNEL);This parent_name is very strange to me.
+ if (!avb)
+ return ERR_PTR(-ENOMEM);
+
+ parent_name = __clk_get_name(adg->clkadg);
AVB parent clk is "AUDIO_CLK_A/B/C/I" (= clk_a/b/c/i in this driver)
or "AUDIO_CLK_OUT_A/B/C/D" (= audio_clkout/1/2/3 in this driver).
And we don't have "adg" clock.
Please double check it.
range and add
"adg" clock to rcar_sound node which refer to newly added 'adg' clock
(S0D1Ï) in this patch-set
-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ clocks = <&cpg CPG_MOD 1005>,Noooo !!
+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ clocks = <&cpg CPG_MOD 922>, <&cpg CPG_MOD 1005>,
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ <&cpg CPG_MOD 1006>, <&cpg CPG_MOD 1007>,
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ <&cpg CPG_MOD 1008>, <&cpg CPG_MOD 1009>,
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ <&cpg CPG_MOD 1010>, <&cpg CPG_MOD 1011>,
@@ -1856,7 +1856,7 @@
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ <&audio_clk_a>, <&audio_clk_b>,
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ <&audio_clk_c>,
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ <&cpg CPG_CORE R8A7795_CLK_S0D4>;
-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ clock-names = "ssi-all",
+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ clock-names = "adg", "ssi-all",
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ "ssi.9", "ssi.8", "ssi.7", "ssi.6",
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ "ssi.5", "ssi.4", "ssi.3", "ssi.2",
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ "ssi.1", "ssi.0",
It breaks sound clock / module stop controling !!
OK, now I checked more detail of ADG for EAVB/IF.as this device-tree change is only local, I will move 'adg' clock to 'last' of clocks,
1st, I don't think we need to add "adg" clock.
It is not exist on Gen2, and default ON on Gen3.
If you want to add it, please add it to "last" of clocks, not "first".
"first" clock is handling whole SSI power.
2nd, it is "Module stop clock", not "S0D1Ï".SMSTPCR922 controls input of two clocks "S0D1Ï" and "S0D4Ï",
We already handling it as "clk_i".
I agree, besides avb_counter8 there are other clocks which need to be added as you have mentioned,
3rd, we need to create new clock/handler for
avb_counter8 / audio_clk_div3 / avb_div8 for "internal" purpose,
and need to create avb_adg_syn[] clock for "external" purpose for EAVB/IF.
Your code is creating / registering adg->clkavb[],
but it is for avb_counter8 in my understanding.
We don't need to register it as formal clock IMO.
4th, EAVB driver need to get clock from AVB via DTyes, EAVB driver only needs to get 'avb_adg_sync[]' clock,
as "avb_adg_syn[]" clock, not "avb_counter8".
I'm not sure EAVB side driver, but please double check these.
Best regards
---
Kuninori Morimoto