From d3cb6458b00de7f1c78a089739fda1001e68996a Mon Sep 17 00:00:00 2001 From: Ricardo Pardini Date: Tue, 17 Feb 2026 16:04:56 -0300 Subject: [PATCH] rockchip64-6.19: mekotronics-r58x-4g: add analog sound es8388 - also: drop old modem (4G) to-do, as modem already works without it --- .../dt/rk3588-blueberry-edge-v12-linux.dts | 59 +++++++++++++++---- 1 file changed, 49 insertions(+), 10 deletions(-) diff --git a/patch/kernel/archive/rockchip64-6.19/dt/rk3588-blueberry-edge-v12-linux.dts b/patch/kernel/archive/rockchip64-6.19/dt/rk3588-blueberry-edge-v12-linux.dts index e91f6cd6d9..803a0fd14d 100644 --- a/patch/kernel/archive/rockchip64-6.19/dt/rk3588-blueberry-edge-v12-linux.dts +++ b/patch/kernel/archive/rockchip64-6.19/dt/rk3588-blueberry-edge-v12-linux.dts @@ -57,6 +57,17 @@ }; + sound { + compatible = "audio-graph-card"; + label = "rockchip,es8388"; + widgets = "Microphone", "Mic Jack", + "Headphone", "Headphones"; + routing = "LINPUT2", "Mic Jack", + "Headphones", "LOUT1", + "Headphones", "ROUT1"; + dais = <&i2s0_8ch_p0>; + }; + vcc12v_dcin: vcc12v-dcin { compatible = "regulator-fixed"; regulator-name = "vcc12v_dcin"; @@ -362,6 +373,26 @@ }; }; +&i2c3 { + status = "okay"; + + es8388: audio-codec@10 { + compatible = "everest,es8388", "everest,es8328"; + reg = <0x10>; + clocks = <&cru I2S0_8CH_MCLKOUT>; + clock-names = "mclk"; + assigned-clocks = <&cru I2S0_8CH_MCLKOUT>; + assigned-clock-rates = <12288000>; + #sound-dai-cells = <0>; + + port { + es8316_p0_0: endpoint { + remote-endpoint = <&i2s0_8ch_p0_0>; + }; + }; + }; +}; + // Unknown where this is wired to, maybe some header pins. Found on vendor DT. &i2c5 { pinctrl-names = "default"; @@ -386,6 +417,24 @@ }; }; +// analog sound +&i2s0_8ch { + pinctrl-names = "default"; + pinctrl-0 = <&i2s0_lrck + &i2s0_sclk + &i2s0_sdi0 + &i2s0_sdo0>; + status = "okay"; + + i2s0_8ch_p0: port { + i2s0_8ch_p0_0: endpoint { + dai-format = "i2s"; + mclk-fs = <256>; + remote-endpoint = <&es8316_p0_0>; + }; + }; +}; + //hdmi0 sound &i2s5_8ch { status = "okay"; @@ -458,16 +507,6 @@ status = "okay"; }; -/* @TODO - modem { - compatible = "rockchip,modem"; - power-on_gpio = <&gpio0 0x1d 0x00>; - reset_gpio = <&gpio0 0x00 0x00>; - status = "okay"; - }; -*/ - - &pinctrl { gpio-leds {