orangepi-xunlong / linux-orangepi

Other
200 stars 173 forks source link

OrangePi Zero 2w: [AHUB_DAM snd_soc_sunxi_ahub_mem_get] regmap is invalid #80

Open mtojek opened 5 months ago

mtojek commented 5 months ago

Hi folks,

I'm working on connecting OPi Zero 2w with max98357a, and I'm trying to setup the device tree:

/dts-v1/;
/plugin/;
/ {
    compatible = "allwinner,sun50i-h616";
    fragment@0 {
        target = <&pio>;
        __overlay__ {
            ahub_daudio0_pins_a: ahub_daudio0@0 {
                pins = "PI0", "PI1", "PI2";
                function = "i2s0";
                drive-strength = <0x14>;
                bias-disable;
            };
            ahub_daudio0_pins_b: ahub_daudio0@1 {
                pins = "PI3";
                function = "i2s0_dout0";
                drive-strength = <0x14>;
                bias-disable;
            };
            ahub_daudio0_pins_c: ahub_daudio0@2 {
                pins = "PI4";
                function = "i2s0_din0";
            drive-strength = <0x14>;
        bias-disable;
            };
            ahub_daudio0_pins_d: ahub_daudio0_sleep {
        pins = "PI0", "PI1", "PI2", "PI3", "PI4";
        function = "gpio_in";
        drive-strength = <0x14>;
            bias-disable;
            };
        };
    };
    fragment@1 {
        target-path = "/soc";
        __overlay__ {
            ahub0_plat: ahub0_plat {
                #sound-dai-cells = <0>;
        compatible  = "allwinner,sunxi-snd-plat-ahub";
                apb_num     = <0>;  /* for dma port 3 */
        dmas        = <&dma 3>, <&dma 3>;
        dma-names   = "tx", "rx";
        playback_cma    = <128>;
        capture_cma = <128>;
        tx_fifo_size    = <128>;
        rx_fifo_size    = <128>;

        pinctrl-names = "default", "sleep";
                pinctrl_used;
        pinctrl-0 = <&ahub_daudio0_pins_a>, <&ahub_daudio0_pins_b>, <&ahub_daudio0_pins_c>;
        pinctrl-1 = <&ahub_daudio0_pins_d>;

                status = "okay";
            };
            ahub0_mach: ahub0_mach {
                compatible = "allwinner,sunxi-snd-mach";
        soundcard-mach,name = "ahubi2s0";
        soundcard-mach,format = "i2s";

        status = "okay";

                soundcard-mach,cpu {
            sound-dai = <&ahub0_plat>;
        };

        soundcard-mach,codec {
        };
            };
        };
    };
};

Unfortunately, I can't figure out what is wrong with sunxi-snd-plat-ahub:

[    9.671505] [sound  231][AHUB_DAM snd_soc_sunxi_ahub_mem_get] regmap is invalid
[    9.671520] [sound 1342][AHUB sunxi_ahub_dev_probe] remap get failed
[    9.671526] sunxi-snd-plat-ahub: probe of soc:ahub0_plat failed with error -22

Is it a known issue?