Have you looked at other audio overlays? There are many in our tree, including audiosense-pi: https://github.com/raspberrypi/linux/bl ... verlay.dts
Some clocks are controllable, but the purpose of the "clocks" declaration in this case is to give the codec a way of working out how fast its clock source is running, and therefore which clock divisors to use to get the required audio frequencies. The "audiosense-pi" board has a fixed oscillator, and its overlay even uses the label "codec_osc":
You will have to set clock-frequency to match your oscillator value.
By the way, I don't see any reason why your overlay couldn't work on any Pi, so you could use the bcm2835 compatible string (it has come to mean "any Pi" as much as "only Pi 1").
Some clocks are controllable, but the purpose of the "clocks" declaration in this case is to give the codec a way of working out how fast its clock source is running, and therefore which clock divisors to use to get the required audio frequencies. The "audiosense-pi" board has a fixed oscillator, and its overlay even uses the label "codec_osc":
Code:
/* audio external oscillator */codec_osc: codec_osc {compatible = "fixed-clock";#clock-cells = <0>;clock-frequency = <12000000>;/* 12 MHz */};
You will have to set clock-frequency to match your oscillator value.
By the way, I don't see any reason why your overlay couldn't work on any Pi, so you could use the bcm2835 compatible string (it has come to mean "any Pi" as much as "only Pi 1").
Statistics: Posted by PhilE — Thu Sep 26, 2024 8:27 pm