From: Jianlong Huang Date: Fri, 19 Aug 2022 02:58:36 +0000 (+0800) Subject: dts: starfive: Add ac108 dts config X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=754c30ef00d1ec8a7624e99941575d8f2dc24b6f;p=platform%2Fkernel%2Flinux-starfive.git dts: starfive: Add ac108 dts config Add ac108 dts and config Signed-off-by: Jianlong Huang --- diff --git a/arch/riscv/boot/dts/starfive/jh7110-visionfive-v2.dts b/arch/riscv/boot/dts/starfive/jh7110-visionfive-v2.dts index 3723b61..818c0301f6 100644 --- a/arch/riscv/boot/dts/starfive/jh7110-visionfive-v2.dts +++ b/arch/riscv/boot/dts/starfive/jh7110-visionfive-v2.dts @@ -10,11 +10,18 @@ #include "jh7110.dtsi" #include "codecs/sf_pwmdac.dtsi" #undef WM8960_ENABLED +#undef AC108_ENABLED #ifdef WM8960_ENABLED +#define WM8960_AC108_COMMON 1 #include "codecs/sf_wm8960.dtsi" #endif +#ifdef AC108_ENABLED +#define WM8960_AC108_COMMON 1 +#include "codecs/sf_ac108.dtsi" +#endif + / { model = "StarFive VisionFive V2"; compatible = "starfive,visionfive-v2", "starfive,jh7110"; @@ -451,7 +458,7 @@ }; }; -#ifdef WM8960_ENABLED +#ifdef WM8960_AC108_COMMON i2srx_pins: i2srx-pins { i2srx-pins0 { sf,pins = ; @@ -479,7 +486,8 @@ sf,pin-gpio-doen = ; }; }; - +#endif +#ifdef WM8960_ENABLED i2stx_pins: i2stx-pins { i2stx-pins0 { sf,pins = ; @@ -523,13 +531,14 @@ pinctrl-names = "default"; pinctrl-0 = <&i2c0_pins>; status = "okay"; - +#ifdef AC108_ENABLED ac108_a: ac108@3b { compatible = "x-power,ac108_0"; reg = <0x3b>; #sound-dai-cells = <0>; data-protocol = <0>; }; +#endif #ifdef WM8960_ENABLED wm8960: codec@1a { compatible = "wlf,wm8960"; @@ -767,16 +776,18 @@ status = "okay"; }; -#ifdef WM8960_ENABLED +#ifdef WM8960_AC108_COMMON &i2srx_3ch { pinctrl-names = "default"; - pinctrl-0 = <&i2srx_pins>; + pinctrl-0 = <&i2s_clk_pins &i2srx_pins>; status = "okay"; }; +#endif +#ifdef WM8960_ENABLED &i2stx_4ch1 { pinctrl-names = "default"; - pinctrl-0 = <&i2s_clk_pins &i2stx_pins>; + pinctrl-0 = <&i2stx_pins>; status = "okay"; }; #endif diff --git a/arch/riscv/boot/dts/starfive/vf2-overlay/vf2-overlay-uart3-i2c.dts b/arch/riscv/boot/dts/starfive/vf2-overlay/vf2-overlay-uart3-i2c.dts index 90f44c8c..6fb902f 100644 --- a/arch/riscv/boot/dts/starfive/vf2-overlay/vf2-overlay-uart3-i2c.dts +++ b/arch/riscv/boot/dts/starfive/vf2-overlay/vf2-overlay-uart3-i2c.dts @@ -65,8 +65,8 @@ __overlay__ { clock-frequency = <100000>; i2c-sda-hold-time-ns = <300>; - i2c-sda-falling-time-ns = <3000>; - i2c-scl-falling-time-ns = <3000>; + i2c-sda-falling-time-ns = <510>; + i2c-scl-falling-time-ns = <510>; auto_calc_scl_lhcnt; pinctrl-names = "default"; pinctrl-0 = <&dt_i2c1_pins>; diff --git a/arch/riscv/configs/starfive_visionfive2_defconfig b/arch/riscv/configs/starfive_visionfive2_defconfig index 3c0939f..c2f2259 100644 --- a/arch/riscv/configs/starfive_visionfive2_defconfig +++ b/arch/riscv/configs/starfive_visionfive2_defconfig @@ -82,7 +82,7 @@ CONFIG_MAC80211=y CONFIG_NET_9P=y CONFIG_NET_9P_VIRTIO=y CONFIG_PCI=y -CONFIG_PCIEASPM_POWERSAVE=y +# CONFIG_PCIEASPM is not set CONFIG_PCIE_PLDA=y CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS_MOUNT=y @@ -203,6 +203,7 @@ CONFIG_SND_SOC=y CONFIG_SND_DESIGNWARE_I2S=y CONFIG_SND_DESIGNWARE_I2S_STARFIVE_JH7110=y CONFIG_SND_STARFIVE_PWMDAC=y +CONFIG_SND_SOC_AC108=y CONFIG_SND_SOC_WM8960=y CONFIG_SND_SIMPLE_CARD=y CONFIG_USB=y