[<prev] [next>] [day] [month] [year] [list]
Message-ID: <FEB1C345F6214D57+20240912025539.1928223-4-wangyuli@uniontech.com>
Date: Thu, 12 Sep 2024 10:55:08 +0800
From: WangYuli <wangyuli@...ontech.com>
To: stable@...r.kernel.org,
gregkh@...uxfoundation.org,
sashal@...nel.org,
william.qiu@...rfivetech.com,
emil.renner.berthing@...onical.com,
conor.dooley@...rochip.com,
wangyuli@...ontech.com,
xingyu.wu@...rfivetech.com,
walker.chen@...rfivetech.com,
robh@...nel.org,
hal.feng@...rfivetech.com
Cc: kernel@...il.dk,
robh+dt@...nel.org,
krzysztof.kozlowski+dt@...aro.org,
conor+dt@...nel.org,
paul.walmsley@...ive.com,
palmer@...belt.com,
aou@...s.berkeley.edu,
devicetree@...r.kernel.org,
linux-riscv@...ts.infradead.org,
linux-kernel@...r.kernel.org,
richardcochran@...il.com,
netdev@...r.kernel.org
Subject: [PATCH 6.6 v2 4/4] riscv: dts: starfive: Add JH7110 PWM-DAC support
From: Hal Feng <hal.feng@...rfivetech.com>
[ Upstream commit be326bee09374a2ebd18cb5af8fcd6f1e7825260 ]
Add PWM-DAC support for StarFive JH7110 SoC.
Reviewed-by: Walker Chen <walker.chen@...rfivetech.com>
Signed-off-by: Hal Feng <hal.feng@...rfivetech.com>
Signed-off-by: Conor Dooley <conor.dooley@...rochip.com>
Signed-off-by: WangYuli <wangyuli@...ontech.com>
---
.../jh7110-starfive-visionfive-2.dtsi | 49 +++++++++++++++++++
arch/riscv/boot/dts/starfive/jh7110.dtsi | 13 +++++
2 files changed, 62 insertions(+)
diff --git a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
index caa59b9b2f19..0e077f2f02d1 100644
--- a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
+++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
@@ -40,6 +40,33 @@ gpio-restart {
gpios = <&sysgpio 35 GPIO_ACTIVE_HIGH>;
priority = <224>;
};
+
+ pwmdac_codec: pwmdac-codec {
+ compatible = "linux,spdif-dit";
+ #sound-dai-cells = <0>;
+ };
+
+ sound-pwmdac {
+ compatible = "simple-audio-card";
+ simple-audio-card,name = "StarFive-PWMDAC-Sound-Card";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ simple-audio-card,dai-link@0 {
+ reg = <0>;
+ format = "left_j";
+ bitclock-master = <&sndcpu0>;
+ frame-master = <&sndcpu0>;
+
+ sndcpu0: cpu {
+ sound-dai = <&pwmdac>;
+ };
+
+ codec {
+ sound-dai = <&pwmdac_codec>;
+ };
+ };
+ };
};
&dvp_clk {
@@ -253,6 +280,12 @@ &mmc1 {
status = "okay";
};
+&pwmdac {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pwmdac_pins>;
+ status = "okay";
+};
+
&qspi {
#address-cells = <1>;
#size-cells = <0>;
@@ -463,6 +496,22 @@ GPOEN_SYS_SDIO1_DATA3,
};
};
+ pwmdac_pins: pwmdac-0 {
+ pwmdac-pins {
+ pinmux = <GPIOMUX(33, GPOUT_SYS_PWMDAC_LEFT,
+ GPOEN_ENABLE,
+ GPI_NONE)>,
+ <GPIOMUX(34, GPOUT_SYS_PWMDAC_RIGHT,
+ GPOEN_ENABLE,
+ GPI_NONE)>;
+ bias-disable;
+ drive-strength = <2>;
+ input-disable;
+ input-schmitt-disable;
+ slew-rate = <0>;
+ };
+ };
+
spi0_pins: spi0-0 {
mosi-pins {
pinmux = <GPIOMUX(52, GPOUT_SYS_SPI0_TXD,
diff --git a/arch/riscv/boot/dts/starfive/jh7110.dtsi b/arch/riscv/boot/dts/starfive/jh7110.dtsi
index 621b68c02ea8..9f31dec57c0d 100644
--- a/arch/riscv/boot/dts/starfive/jh7110.dtsi
+++ b/arch/riscv/boot/dts/starfive/jh7110.dtsi
@@ -536,6 +536,19 @@ i2srx: i2s@...e0000 {
status = "disabled";
};
+ pwmdac: pwmdac@...b0000 {
+ compatible = "starfive,jh7110-pwmdac";
+ reg = <0x0 0x100b0000 0x0 0x1000>;
+ clocks = <&syscrg JH7110_SYSCLK_PWMDAC_APB>,
+ <&syscrg JH7110_SYSCLK_PWMDAC_CORE>;
+ clock-names = "apb", "core";
+ resets = <&syscrg JH7110_SYSRST_PWMDAC_APB>;
+ dmas = <&dma 22>;
+ dma-names = "tx";
+ #sound-dai-cells = <0>;
+ status = "disabled";
+ };
+
usb0: usb@...00000 {
compatible = "starfive,jh7110-usb";
ranges = <0x0 0x0 0x10100000 0x100000>;
--
2.43.4
Powered by blists - more mailing lists