#
✕ nick:marcan
#asahi · 2021-04-11 18:55
marcanthey're clock gates
#asahi · 2021-04-11 18:41
marcanand doing this in the DT might mean the difference between a random Ubuntu release booting on newer Macs with just a m1n1 update, and needing to wait a year for a kernel bump
#asahi · 2021-04-11 18:40
marcanI mean, DTs may live in the kernel tree but they aren't bundled inside the kernel
#asahi · 2021-04-11 18:39
marcanlike regmap stuff and such
#asahi · 2021-04-11 18:39
marcanwell, ultimately custom bindings for any given block are pretty much necessary depending on what needs to be expressed, but at least here we were trying to look at ways of expressing this using established patterns
#asahi · 2021-04-11 18:37
marcanbut I'd like to hear the reason :)
#asahi · 2021-04-11 18:37
marcanif there's a good reason for doing it this way, fine
#asahi · 2021-04-11 18:37
marcanI mean... I don't particularly care about "where linux has been heading" (especially when it's vendor people writing the code) and more about "where linux should head" :-)
#asahi · 2021-04-11 18:36
marcanbut then we're back to the driver being soc-specific
#asahi · 2021-04-11 18:36
marcanah, and then embed it in the driver?
#asahi · 2021-04-11 18:35
marcanm1n1 is the bridge between adt and fdt, linux doesn't get to see the adt (by design)
#asahi · 2021-04-11 18:34
marcanlinux doesn't touch the adt
#asahi · 2021-04-11 18:34
marcanand do what with the data? :)
#asahi · 2021-04-11 18:34
marcanuse that from where?
#asahi · 2021-04-11 18:33
marcanwith random packed structures
#asahi · 2021-04-11 18:33
marcanapple really likes to put blobs in DT properties
#asahi · 2021-04-11 18:27
marcanmore like a pile of python scripts that can, say, automatically fill in IRQ numbers and clocks and such, but without restricting how our bindings look
#asahi · 2021-04-11 18:26
marcanthe plan is to write some tooling to parse and convert apple devicetrees as a human-guided operation for bringing up new boards and SoCs, but it wouldn't be structured as a straight conversion
#asahi · 2021-04-11 18:25
marcanbut I would much rather have drivers generic enough that they can work with multiple SoC generations if the register interface and such is the same, so we only need new devicetrees where possible
#asahi · 2021-04-11 18:25
marcanwe're not processing the apple dtb, we're writing our own devicetrees
#asahi · 2021-04-11 18:17
marcanif we start hardcoding the tree in the driver, that means the driver becomes soc-specific
#asahi · 2021-04-11 18:16
marcanbut obviously they will have different hierarchies
#asahi · 2021-04-11 18:16
marcanAIUI this clock stuff is uniform enough it ought to work for quite a few apple SoCs
#asahi · 2021-04-11 18:16
marcanbut then that makes the driver less generic
#asahi · 2021-04-11 18:12
marcani.e. dependencies
#asahi · 2021-04-11 18:12
marcantmlind: it's not about the clock controller itself, it's about encoding the hierarchy of clocks it controls
#asahi · 2021-04-11 17:15
marcansubnodes of the clock controller? something else?
#asahi · 2021-04-11 17:14
marcantmlind: the question is how to declare the hierarchy in the dts
#asahi · 2021-04-11 15:07
marcanand omap54xx-clocks.dtsi
#asahi · 2021-04-11 15:07
marcansee: arch/arm/boot/dts/omap5-l4.dtsi
#asahi · 2021-04-11 15:06
marcansince the regmap is on real mmio, apparently another way to do it is as a bus
#asahi · 2021-04-11 14:58
marcanso if we have to define a new binding or use a new style, we do :p
#asahi · 2021-04-11 14:58
marcanbut we're doing things right here (see: how I fixed the arm timer to suck less after several SoCs were already using dirty hacks to work around it)
#asahi · 2021-04-11 14:57
marcanheh, ugly
#asahi · 2021-04-11 14:57
marcanmaybe ask robher? :)
#asahi · 2021-04-11 14:56
marcanoption #2 above
#asahi · 2021-04-11 14:56
marcanyou still want one device bound to the overall clock controller, but you can have subnodes for the actual clocks
#asahi · 2021-04-11 14:56
marcansven: what kettenis_ said, use a regmap and child nodes
#asahi · 2021-04-11 13:34
marcansure
#asahi · 2021-04-11 13:34
marcanhahaha
#asahi · 2021-04-11 13:33
marcanwhich it *is*
#asahi · 2021-04-11 13:33
marcanyup
#asahi · 2021-04-11 13:33
marcan:)
#asahi · 2021-04-11 13:33
marcanwhich makes sense if you think about it
#asahi · 2021-04-11 13:33
marcanlooks like it works everywhere
#asahi · 2021-04-11 13:32
marcanyou should be able to do the same thing, and just have one single clock controller instance
#asahi · 2021-04-11 13:32
marcanas well as some default rates
#asahi · 2021-04-11 13:32
marcanthat sets up parents within a single clock controller
#asahi · 2021-04-11 13:31
marcanon clk:
#asahi · 2021-04-11 13:31
marcansven: look at freescale/imx8mq.dtsi

plus ›