Other Parts Discussed in Thread: TAS5805M
Tool/software:
Hi expert,
Do we have TAS5825M and TAS5802 driver can share with customer?
Thanks,
Allan
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
There’s two different versions.
One is https://git.ti.com/cgit/lpaa-android-drivers/tasdevice-linux-driver/
The other version has been already upstream to kernel, and released with kernel. This code is in sound/soc/codecs
The driver file is tas5805m.c
You can use any of them.
if you have any sw questions, don’t hesitate to submit your thread via E2E.
Hi Shenghao!
For the "other version" that has been upstreamed to kernel, do you mean tas5805m.c can support both tas5802 and tas5825m? In that case, is there any additional change need to make? For example, add "ti,5802" and "ti,5825m" to the of_device_id table.
For other chips, I suggest you use this code
https://git.ti.com/cgit/lpaa-android-drivers/tasdevice-linux-driver/
Hi Shenghao,
Sorry I'm not familiar to the TI driver code, could you clarify what are the "other chips" you mentioned? The chips I'm trying to integrate are tas5802 and tas5825m. Does the tas5805m.c also cover these two? If not, what chips (except for tas5805m) do it cover? From your first reply, I thought you mean tas5805m.c also work with tas5802 and tas5825m?
If the tasdevice approach is preferred, I think I have additional questions:
1. Is the firmware bin necessary for the driver to work properly?
2. I don't have a Windows PC, is it the only way to run Regbin tool?
3. Is there more document how to generate reg bin? or is there a existing bin file for tas5802 and tas5825m? Sorry if this is a dumb question, but I'm not sure what configuration / blocks / commands should be added (in the regbin tool) in order to generate a bin file.
(Update - I got the answers to #1 and #3)
Thanks a lot.
Actually, tasdevice driver code can support all tas58xx chips and easy to change new firmware. In tas5805m.c, the firmware is hardcode in the code. If you want to change the firmware, you have to integrate the new firmware into the code manually and recompile it. While tasdevice won't that unncessary work, what you do is import the cfg file into jsn file and generate a new regbin file, then replace the old one in the system. Page 33 ~ Page 46 In Regbin file User Guidance describe such a feature.
Sorry, Regbin tool only suppor windows tool. If your team tuning audio acoustic, another tool for audio acoustic tuning ---- PPC3 is also run in windows.
So, windows machine is necessary for your project.
Hi Shendhao,
Thanks for the info! I will consult with hardware fellows on generating firmware binary for both chips. Meanwhile, I'd like to ask if there is any existing firmware binary with some kind of "default settings" that we can use to get the driver running for now? I traced the code and I think if the firmware is not in the device, the driver simply will failed on probe.
Thanks!
Let me know how many pieces of tas5825m in your cases?
If only one, you can use tas5805-1amp-reg.json (json - lpaa-android-drivers/tasdevice-linux-driver - Unnamed repository; edit this file 'description' to name the repository.) as your default setting.
There're two solutions. One is put both into one reg.bin file.
solution I
Suppose 7-bit i2c addr of tas5802 is 0x4f, and the one of tas5825m is 0x4c.
i2c {
/* example for three devices with interrupt support */
#address-cells = <1>;
#size-cells = <0>;
two: tasdevice@4f {
compatible = "ti,tas5802"; /*or "ti,tas5825m" */
/* The device order in reg is also the order in reg.bin file*/
reg = <0x4f>, /* dev 1: TAS5802 */
<0x4c>; /* dev 2: TAS5825M */
#sound-dai-cells = <0>;
reset-gpios = < &gpio1 10 GPIO_ACTIVE_HIGH >;
interrupt-parent = <&gpio1>;
interrupts = <15>;
};
};
This solution only work in case that both chips are connected on the same i2c bus.
Solution II
P39 ~ P41 in this document (What is Degreed?) describe solution II.
There's no same i2c bus limitation in this solution
Hi Shenghao!
The TAS5825m and TAS5802 are in the same i2c bus. So I think "Solution I" looks good for us! However, I'd like to confirm, when you said "One is put both into one reg.bin file.", can we still use tas5805-1amp-reg.json? The name has "1amp", I'm not sure if we need to use other JSON conig?
Also, in the Regbin tool, in the field "Select Number of Devices", do we have to select 2? or 1?
Thanks!
Solution 2 is better. It is easy to debug. You won't prepare the extra jsn file. You can use the jsn files for TAS5825m and TAS5802 directly from json - lpaa-android-drivers/tasdevice-linux-driver - Unnamed repository; edit this file 'description' to name the repository.