Dear Support,
We have finished evaluating the TAS2770 amplifier with the EVM board, and are currently in the process of integrating it in the design of our audio module. We are facing two issues
1) Creating devicetree for it
The i2c section for the tas 2770 amplifier is like this:
&i2c0 {
status = "okay";
clock-frequency = <400000>;
tas2770: tas2770@41 {
#address-cells = <1>;
#sound-dai-cells = <0>;
#size-cells = <0>;
compatible = "ti,tas2770";
reg = <0x41>;
ti,asi-format = <0>;
ti,imon-slot-no = <0>;
ti,vmon-slot-no = <2>;
};
};
In this case the linux kernel panics with "no pinctrl hande" error:
[ 1.760000] bus: 'i2c': really_probe: probing driver tas2770 with device 0-0041
[ 1.761000] tas2770 0-0041: no pinctrl handle
[ 1.763000] 8<--- cut here ---
[ 1.764000] Unable to handle kernel NULL pointer dereference at virtual address 00000044
[ 1.765000] pgd = (ptrval)
[ 1.766000] [00000044] *pgd=00000000
[ 1.767000] Internal error: Oops: 5 [#1] PREEMPT SMP THUMB2
[ 1.767000] Modules linked in:
[ 1.767000] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.5.0-rc5 #1
[ 1.767000] Hardware name: Allwinner sun8i Family
[ 1.767000] PC is at snd_soc_component_write+0x0/0x20
[ 1.767000] LR is at tas2770_i2c_probe+0xd7/0x190
[ 1.767000] pc : [<8048c050>] lr : [<804de08f>] psr: 00000033
[ 1.767000] sp : 8e82dde8 ip : 8e048c00 fp : 00000000
[ 1.767000] r10: 80ed8524 r9 : 00000000 r8 : 00000000
[ 1.767000] r7 : 8e035820 r6 : 8e035800 r5 : 8e149bc0 r4 : 00000000
[ 1.767000] r3 : f03e5b2d r2 : 00000001 r1 : 00000001 r0 : 00000000
[ 1.767000] Flags: nzcv IRQs on FIQs on Mode SVC_32 ISA Thumb Segment none
[ 1.767000] Control: 50c5387d Table: 4000406a DAC: 00000051
[ 1.767000] Process swapper/0 (pid: 1, stack limit = 0x(ptrval))
[ 1.767000] Stack: (0x8e82dde8 to 0x8e82e000)
[ 1.767000] dde0: 00000000 8e035820 804ddfb9 80e7720c 8e035800 804017b1
[ 1.767000] de00: 80ed8520 00000000 8e035820 00000000 80e7720c 8036933d 8e031940 00000000
[ 1.767000] de20: 8e035820 80e7720c 80c375e4 80e03e88 00000000 000000d9 00000007 803695f5
[ 1.767000] de40: 80c375e4 8043c2f5 80e3df2c 8e035820 00000000 80e7720c 80e03e88 00000000
Do we miss some entry in the devictree? We are using the tas2770 driver fromkernel 5.5-rc5. There is a thread in the forums pointing to another driver that TI provides-which one chall be th eprevferred one to use? Could you provide some tips how to compile it and configure the devicetree for it?
2) Manually controlling the TAS2770 via i2c
In order to continue the SW development until 1) is solved, we have created some scripts to initialize and control the TAS2770 amplifier using the t2c-tools from userspace. This works well, with one exception: we cannot power up the amplifier at the end.
We do a reset, and then the register 0x02 comes up with a value of 0xE. If we try to set bits 0 and 1 to 0 (amplifier active), the operation results always in 0x2 (SW shutdown). Whaever we do attempt, the value does not change. We are using the EVM board connected to our audio module via the I2C lines. These are the commands we do try:
setting page 0:
i2cset -y 0 0x41 0x0 0x0
Setting the power register
i2cset -y 0 0x41 0x02 0x0 b
Checking the set value:
i2cget -y 0 0x41 0x02
0x02
Do you have any idea what is going wrong here? Shall I disconnect the USB cable from the EVM board when the jumper is set to use the external i2c?
Thank you very much in advance,
Alex