Hi Stephen
Thank you for checking path
+Required properties:
+- compatible : "simple-audio" +- simple-audio,card-name : simple-audio card name
+- simple-audio,platform,controller : phandle for platform
Rename that simple-audio,dma-controller perhaps? "platform" is a word specific to ASoC, and the bindings really should be generic across OSs.
But I wonder why you'd even need the ASoC platform to be specified in DT; instead, the following seem better:
a) Have the CPU DAI's driver register the platform itself. Tegra does this.
b) Assume the ASoC "platform" device simply does DMA via a standard dmaengine driber, and instead refer to the DMA controller using DMA engine DT bindings.
This is the feature of this "simple-audio" driver. "simple-audio" produces board/SoC specific relationship between codec/cpu.
For example, we are using FSI for cpu, and AK4642/WM8978/DA7210 for codec. In our old style, we created fsi-ak4642, fsi-wm8978, fsi-da7210... This means that new fsi-xxx driver is required whenever new boards were created. This simple-audio was created to avoid it
+- simple-audio,platform,name : simple-audio platform name
Can you explain why you'd need the platform name in the DT? Doesn't the phandle always uniquely identify it? The example doesn't use this property.
Ahh yes, this simple-audio supports both phandle and name matching for compatibility. example showed phandle matching only.
+- simple-audio,cpu,controller : phandle for CPU DAI +- simple-audio,cpu,dai,name : simple-audio CPU DAI name
It'd be a bit more typical of device-tree to have a single property that defines both the controller and any properties of the controller at once, e.g. something like:
simple-audio,cpu-interface = <&codec_phandle AK4648_I2S_ITF_A>;
where we assume something like:
#define AK4648_I2S_ITF_A 0 // Interface A's ID
That would remove the need to put string names into the DT.
Hmm... this "name" is required on ASoC matching... Especially, "codec dai name" is must item.
Should I modify ASoC itself ?
+simple-audio,xxx,dai,clock-gating
- "continuous"
- "gated"
Don't you need to use the common clock bindings to define which clock to gate? Or, is the I2S/... node's binding supposed to provide that information?
I guess it is dependent on SoC/board. No ?
Best regards --- Kuninori Morimoto