#asahi · 2021-04-12 11:37
tmlindshould that be linked somewhere on the wiki if not already there?#asahi · 2021-04-12 11:37
tmlindi think that was from #armlinux channel few months ago, helps to keep notes.. but could not find the notes earlier#asahi · 2021-04-12 11:36
tmlindah i found the adt link i was looking for: http://csgraf.de/tmp2/m1.json#asahi · 2021-04-12 10:36
tmlindheh with pseudo-translated i mean adt to dts translation, not url translation naturally#asahi · 2021-04-12 10:33
tmlindhmm i can't find the link to view the adt files.. wasn't there some pseudo-translated url for those to look at?#asahi · 2021-04-11 19:10
tmlindso there might be something like a clock controller device, then a bunch of gate or mux registers#asahi · 2021-04-11 19:00
tmlindso is there any grouping of these clocks by the controller in the apple dtb?#asahi · 2021-04-11 18:57
tmlindhmm right#asahi · 2021-04-11 18:53
tmlindso with the apple-specific clock layout, what's the info, like parent and rate?#asahi · 2021-04-11 18:52
tmlindtyping from it :)#asahi · 2021-04-11 18:51
tmlindyeah ok like pcie_ref_clk#asahi · 2021-04-11 18:50
tmlindthe clk24 there or something else?#asahi · 2021-04-11 18:47
tmlindhmm so what is the meaning of the apple-specific clock layout then?#asahi · 2021-04-11 18:45
tmlindoh, do you have some example to look at?#asahi · 2021-04-11 18:44
tmlindsounds like expressing a clock hierarchy in a dts file in a generic way could be few years of mailing list discussions though :)#asahi · 2021-04-11 18:41
tmlindpersonally, i do not like the ongoing static data bloat in drivers/clk and drivers/pinctrl, and ideally we'd have devicetree provide the necessary data for the booted processor#asahi · 2021-04-11 18:40
tmlindyeah try to leave out custom bindings, that will save many merge cycles on mailing list discussions :)#asahi · 2021-04-11 18:39
tmlindthen some folks do not like the idea of a driver doing something purely based on devicetree data#asahi · 2021-04-11 18:38
tmlindwell one issue is dealing with the sprawling amount of custom bindings, so the binding should be ideally generic, like interrupts-extended for example#asahi · 2021-04-11 18:37
tmlindwell after find for .c files that is#asahi · 2021-04-11 18:36
tmlindyeah that's where linux has been heading good or bad.. see wc -l for drivers/clk and drivers/pinctrl for example#asahi · 2021-04-11 18:35
tmlindnot parsed in the kernel#asahi · 2021-04-11 18:35
tmlindheh i mean one-time parse with some script to produce the driver internal data#asahi · 2021-04-11 18:34
tmlindset up the clock controller driver clock instances for regs and bits#asahi · 2021-04-11 18:34
tmlindparse from the apple dtb if it has the necessary data#asahi · 2021-04-11 18:33
tmlindwell you could use that to automatically generate the clock controller driver clocks and just expose the top level dts node :)#asahi · 2021-04-11 18:32
tmlindheh#asahi · 2021-04-11 18:31
tmlindok, it's been few months since i looked that that stuff#asahi · 2021-04-11 18:27
tmlindyeah sure. so you're thinking the whole clock hierarchy is there too already in the apple dtb?#asahi · 2021-04-11 18:26
tmlindsure that would be ideal if you can do that with mostly standard bindings :)#asahi · 2021-04-11 18:21
tmlindafter translating to the standard dts format i mean#asahi · 2021-04-11 18:21
tmlindso are you thinking to just process the apple dtb for clocks, then have driver use that?#asahi · 2021-04-11 18:18
tmlindsure if you can make something generic with minimal bindings, even better#asahi · 2021-04-11 18:18
tmlindyeah that's where all the drivers are heading though to avoid custom bindings with the logic being the driver needs to understand the hardware :)#asahi · 2021-04-11 18:16
tmlindwell you can do the clock tree hierarchy in the clock controller driver, no need to stuff it into dts#asahi · 2021-04-11 18:15
tmlindok makes more sense now thanks :)#asahi · 2021-04-11 18:13
tmlindyeah ok.. so is the clock controller really a child of the uart or am i missing something?#asahi · 2021-04-11 18:11
tmlindhmm so is the clock gate register stuffed somewhre within the uart address space? or is the uart clock gate in some clock controller device with a bunch of clocks?#asahi · 2021-04-11 18:06
tmlindwell aic in this case, not gic :)#asahi · 2021-04-11 18:01
tmlindwell you could just have the clock controller as a top level node, along what's done for gic etc#asahi · 2021-04-11 18:00
tmlindwell on some interconnect inside the soc i mean :)#asahi · 2021-04-11 17:58
tmlindyeah so those are on some device that's always powered, probably best to keep it out of the hierarchy, or probe those parts of the hierarchy first#asahi · 2021-04-11 17:48
tmlindand assigned-clock-parents works just fine for a single node for a clock controller no problem#asahi · 2021-04-11 17:46
tmlindto me it sounded like you just want #clock-cells = <1>, or <2> if you also need to map bits in a single clock register#asahi · 2021-04-11 17:43
tmlindhmm so which hieararchy are you talking about? should not be needed for clocks?#asahi · 2021-04-11 17:12
tmlindin any case, don't use any artificial indexing with dts for the instances, makes things hard if you find an extra clock somewhere in between later on :)#asahi · 2021-04-11 17:11
tmlindthen it's worth checking if each clock controller instance might have some clock domain specific bit for pm for example?#asahi · 2021-04-11 17:07
tmlindbut yeah i'd recommend one dts node for a clock controller, then have the binding map the clock instances from that base with offset and optional bits if needed#asahi · 2021-04-11 17:06
tmlindkettenis: there's a ti specific wrapper ip for each device target on the interconnect that needs to be configured for pm, well the hierarchy also brings genpd stuff for free then#asahi · 2021-04-11 17:05
tmlindmarcan: the "new" clkctrl clocks for omaps use a clockdomain controller + reg offset + gate/mux/divider bit offset, no need to look at any of the old omap54xx-clocks.dtsi stuff for most part