Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 6834

Beginners • How to get ssm2518 working with pi?

$
0
0
These are my connections:
Raspberry Pi SSM2518
GPIO4 MCLK
GPIO18 BCLK
GPIO 19 LRCLK
(I have added them as attachments)
MCLK is not shown as I connected them using a wire separately after I read that MCLK is needed because of this reddit post: https://www.reddit.com/r/embedded/comme ... et_beware/

I want to essentially get audio working, but I can't even detect i2c connection?

jmakwana@inc004test:~ $ vcgencmd measure_clock gpclk0 && i2cdetect -y 1
frequency(0)=0
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
jmakwana@inc004test:~ $


I realized I had to set GPIO26 as high to bring it out of shutdown, but even after that i2c did NOT show the ssm2518 chip (expecting 0x34)

I tried making a dt-overlay for mclk, set gpio 4 to it's alt0 (gpclk0)

Code:

/dts-v1/;/plugin/;/ {    compatible = "brcm,bcm2712";    /* Enable gpclk0 on GPIO4 */    fragment@0 {        target = <&clksrc_gp0>;        __overlay__ {            status = "okay";            assigned-clocks = <&clksrc_gp0>;            assigned-clock-parents = <&clk_osc>;   /* 19.2 MHz crystal */            assigned-clock-rates = <12288000>;     /* 12.288 MHz */        };    };    /* Apply pinmux for gpclk0 on GPIO4 */    fragment@1 {        target = <&rp1_gpio>;        __overlay__ {            ssm_mclk_pins: ssm_mclk_pins {                pins = "gpio4";                function = "gpclk0";                bias-disable;            };        };    };    fragment@2 {        target = <&clksrc_gp0>;        __overlay__ {            pinctrl-names = "default";            pinctrl-0 = <&ssm_mclk_pins>;        };    };};
I cant really set the frequency here, all this ends up doing is pinctrl set 4 a0 which doesnt really help after i do $ vcgencmd measure_clock gpclk0
I get this:
frequency(0)=0

PLEASE help me out, I really don't understand how to proceed, and I am quite new to this. I have downloaded and installed the kernel modules for ssm2518 but if I can't even detect it on i2c, how do I move forward?
ssm2518connetions.png

connections.png

Statistics: Posted by jmakwana06 — Thu Sep 25, 2025 10:05 pm — Replies 0 — Views 45



Viewing all articles
Browse latest Browse all 6834

Trending Articles