msm8953-mainline / linux

Linux mainline kernel with WIP patches for msm8953 devices
Other
111 stars 59 forks source link

Add BLSP DMAs for I2C #87

Closed z3ntu closed 1 year ago

z3ntu commented 1 year ago

Upstream links:

alikates commented 1 year ago

I'm testing it in daisy and I'm getting a lot of messages like this in dmesg

[    2.171636] i2c_qup 78b6000.i2c: using default clock-frequency 100000
[    2.171755] i2c_qup 78b6000.i2c: 
                tx channel not available
[    2.177438] i2c_qup 78b7000.i2c: using default clock-frequency 100000
[    2.183885] i2c_qup 78b7000.i2c: 
                tx channel not available
[    2.191397] i2c_qup 78b6000.i2c: using default clock-frequency 100000

Eventually it stops. Do you know why is that? Maybe TZ not allowing using the i2c controller?

z3ntu commented 1 year ago

Interesting, any message from the dma driver?

"tx channel not available" message is printed when it cannot get the dma (which normally is not fatal since the i2c driver can also work without dma)

alikates commented 1 year ago

Nope, i only get that error for every i2c blsp

z3ntu commented 1 year ago

I've split out the GPIO part to #97

@alikates Can you please post full dmesg, and zcat /proc/config.gz please?

alikates commented 1 year ago

I tested it again but now I found out that it's working. Actually the errors I reported before are EPROBE_DEFER, so it ends up picking up the DMA channels.

Also:

/home/user # cat /sys/class/dma/dma1chan*/slave/uevent 
DRIVER=i2c_qup
OF_NAME=i2c
OF_FULLNAME=/soc@0/i2c@78b6000
OF_COMPATIBLE_0=qcom,i2c-qup-v2.2.1
OF_COMPATIBLE_N=1
MODALIAS=of:Ni2cT(null)Cqcom,i2c-qup-v2.2.1
DRIVER=i2c_qup
OF_NAME=i2c
OF_FULLNAME=/soc@0/i2c@78b6000
OF_COMPATIBLE_0=qcom,i2c-qup-v2.2.1
OF_COMPATIBLE_N=1
MODALIAS=of:Ni2cT(null)Cqcom,i2c-qup-v2.2.1
DRIVER=i2c_qup
OF_NAME=i2c
OF_FULLNAME=/soc@0/i2c@78b7000
OF_COMPATIBLE_0=qcom,i2c-qup-v2.2.1
OF_COMPATIBLE_N=1
MODALIAS=of:Ni2cT(null)Cqcom,i2c-qup-v2.2.1
DRIVER=i2c_qup
OF_NAME=i2c
OF_FULLNAME=/soc@0/i2c@78b7000
OF_COMPATIBLE_0=qcom,i2c-qup-v2.2.1
OF_COMPATIBLE_N=1
MODALIAS=of:Ni2cT(null)Cqcom,i2c-qup-v2.2.1
alikates commented 1 year ago

LGTM, i guess. Also @M0Rf30 you can re-add the dma channels for SPI.

M0Rf30 commented 1 year ago

LGTM, i guess. Also @M0Rf30 you can re-add the dma channels for SPI.

Done https://github.com/msm8953-mainline/linux/pull/123

alikates commented 1 year ago

Merging and cherry-picking into v6.4.7