msm8953-mainline / linux

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

arm64: dts: qcom: msm8953: add missing SPI interfaces and ir-spi-led IrDA transmitter on some xiaomi devices #95

Closed M0Rf30 closed 1 year ago

M0Rf30 commented 1 year ago

On downstream device-tree the vendor is Peel Technologies (module named peelir).

https://github.com/GhostMaster69-dev/android_kernel_xiaomi_vince/blob/f38ebd5d711ea84d727f247aebab2328a98f94cd/arch/arm64/boot/dts/qcom/vince/vince-general.dtsi#LL58C1-L58C1

https://github.com/GhostMaster69-dev/android_kernel_xiaomi_vince/blob/master/arch/arm64/boot/dts/qcom/vince/vince-qrd.dtsi#L479

seems to present on sakura, daisy, vince and tissot (look for peel_ir in downstream)

need to set CONFIG_IR_SPI=m and CONFIG_SPI_QUP=m

M0Rf30 commented 1 year ago
[   12.283757] spi_qup 7af6000.spi: IN:block:16, fifo:64, OUT:block:16, fifo:64
[   12.503101] rc rc0: IR SPI as /devices/platform/soc@0/7af6000.spi/spi_master/spi0/spi0.0/rc/rc0
[   12.503234] rc rc0: lirc_dev: driver ir-spi registered at minor = 0, no receiver, raw IR transmitter

After a simple lircd setup you can list detected devices with: irsend LIST "" "" you can list available keycodes with: irsend LIST devinput-32 "" irsend LIST devinput-64 ""

M0Rf30 commented 1 year ago

on the other side markw and mido seems to share a pwm irda gpio led. something like

    gpio-leds {
        compatible = "gpio-leds";
        pinctrl-0 = <&irled_default>;
        pinctrl-names = "default";

        irda-led {
            label = "irled";
            gpios = <&tlmm 45 GPIO_ACTIVE_HIGH>;
            linux,default-trigger = "infra-red";
            default-state = "off";
            retain-state-suspended;
        };
    };
    irled_default: irled-default-state {
        pins = "gpio45";
        function = "gpio";
        drive-strength = <2>;
        bias-disable;
        output-low;
    };

So wise decision to have this out of xiaomi-common

z3ntu commented 1 year ago

Does this work now? Ready to merge?

M0Rf30 commented 1 year ago

not usable