Skip to content

Instantly share code, notes, and snippets.

@ginkage
Last active October 15, 2023 16:04
Show Gist options
  • Save ginkage/e0d076b1a1ebc59be83d73ffa87d77fe to your computer and use it in GitHub Desktop.
Save ginkage/e0d076b1a1ebc59be83d73ffa87d77fe to your computer and use it in GitHub Desktop.
Replace es8316 with wm8960
diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts b/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
index e5576b08c0eb..cf13c5b8700a 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
@@ -93,28 +93,36 @@ dp0_sound: dp0-sound {
rockchip,cpu = <&spdif_tx2>;
rockchip,codec = <&dp0 1>;
rockchip,jack-det;
};
- es8316_sound: es8316-sound {
+ wm8960_sound: wm8960-sound {
status = "okay";
- compatible = "rockchip,multicodecs-card";
- rockchip,card-name = "rockchip-es8316";
- rockchip,format = "i2s";
- rockchip,mclk-fs = <256>;
- rockchip,cpu = <&i2s0_8ch >;
- rockchip,codec = <&es8316>;
- io-channels = <&saradc 3>;
- io-channel-names = "adc-detect";
- keyup-threshold-microvolt = <1800000>;
- pinctrl-0 = <&hp_det>;
- pinctrl-names = "default";
- hp-det-gpio = <&gpio1 RK_PC4 GPIO_ACTIVE_HIGH>;
- play-pause-key {
- label = "playpause";
- linux,code = <164>;
- press-threshold-microvolt = <2000>;
+ compatible = "simple-audio-card";
+ simple-audio-card,format = "i2s";
+ simple-audio-card,name = "wm8960-soundcard";
+ simple-audio-card,mclk-fs = <256>;
+ simple-audio-card,widgets =
+ "Microphone", "Mic Jack",
+ "Line", "Line In",
+ "Line", "Line Out",
+ "Speaker", "Speaker",
+ "Headphone", "Headphone Jack";
+ simple-audio-card,routing =
+ "Headphone Jack", "HP_L",
+ "Headphone Jack", "HP_R",
+ "Speaker", "SPK_LP",
+ "Speaker", "SPK_LN",
+ "LINPUT1", "Mic Jack",
+ "LINPUT3", "Mic Jack",
+ "RINPUT1", "Mic Jack",
+ "RINPUT2", "Mic Jack";
+ simple-audio-card,cpu {
+ sound-dai = <&i2s1_8ch>;
+ };
+ simple-audio-card,codec {
+ sound-dai = <&wm8960>;
};
};
vcc5v0_host: vcc5v0-host-regulator {
compatible = "regulator-fixed";
@@ -669,34 +677,41 @@ &gmac1_rgmii_clk
phy-handle = <&rgmii_phy1>;
};
/* I2C */
-&i2c7 {
+&i2c8 {
status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c8m2_xfer>;
+ #address-cells = <1>;
+ #size-cells = <0>;
- es8316: es8316@11 {
- compatible = "everest,es8316";
- reg = <0x11>;
- clocks = <&mclkout_i2s0>;
+ wm8960: wm8960@1a {
+ status = "okay";
+ compatible = "wlf,wm8960";
+ reg = <0x1a>;
+ clocks = <&mclkout_i2s1>;
clock-names = "mclk";
+ assigned-clocks = <&mclkout_i2s1>;
+ assigned-clock-rates = <12288000>;
pinctrl-names = "default";
- pinctrl-0 = <&i2s0_mclk>;
+ pinctrl-0 = <&i2s1m0_mclk>;
#sound-dai-cells = <0>;
+ AVDD-supply = <&vcc5v0_sys>;
+ DVDD-supply = <&vcc3v3_pcie>;
};
};
-&i2s0_8ch {
+&i2s1_8ch {
status = "okay";
- rockchip,playback-channels = <2>;
- rockchip,capture-channels = <2>;
#sound-dai-cells = <0>;
pinctrl-names = "default";
- pinctrl-0 = <&i2s0_lrck
- &i2s0_sclk
- &i2s0_sdi0
- &i2s0_sdo0>;
+ pinctrl-0 = <&i2s1m0_lrck
+ &i2s1m0_sclk
+ &i2s1m0_sdi0
+ &i2s1m0_sdo0>;
};
&pwm3 {
status = "okay";
pinctrl-0 = <&pwm3m1_pins>;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment