* [PATCH v1 1/2] dt-bindings: es8328: convert to DT schema format
@ 2023-11-09 18:44 Sebastian Reichel
2023-11-09 18:44 ` [PATCH v1 2/2] arm64: dts: rockchip: add analog audio to RK3588 EVB1 Sebastian Reichel
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Sebastian Reichel @ 2023-11-09 18:44 UTC (permalink / raw)
To: Heiko Stuebner, Mark Brown
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-rockchip,
linux-sound, devicetree, Sebastian Reichel, kernel
Convert the binding to DT schema format. Note, that "IPVDD-supply"
got fixed to be "HPVDD-supply" during the conversion. This was
obviously a typo in the old binding. The old binding example, DT
files, chip datasheet and Linux driver use HPVDD.
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
---
.../devicetree/bindings/sound/es8328.txt | 38 ---------
.../bindings/sound/everest,es8328.yaml | 77 +++++++++++++++++++
2 files changed, 77 insertions(+), 38 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/sound/es8328.txt
create mode 100644 Documentation/devicetree/bindings/sound/everest,es8328.yaml
diff --git a/Documentation/devicetree/bindings/sound/es8328.txt b/Documentation/devicetree/bindings/sound/es8328.txt
deleted file mode 100644
index 33fbf058c997..000000000000
--- a/Documentation/devicetree/bindings/sound/es8328.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-Everest ES8328 audio CODEC
-
-This device supports both I2C and SPI.
-
-Required properties:
-
- - compatible : Should be "everest,es8328" or "everest,es8388"
- - DVDD-supply : Regulator providing digital core supply voltage 1.8 - 3.6V
- - AVDD-supply : Regulator providing analog supply voltage 3.3V
- - PVDD-supply : Regulator providing digital IO supply voltage 1.8 - 3.6V
- - IPVDD-supply : Regulator providing analog output voltage 3.3V
- - clocks : A 22.5792 or 11.2896 MHz clock
- - reg : the I2C address of the device for I2C, the chip select number for SPI
-
-Pins on the device (for linking into audio routes):
-
- * LOUT1
- * LOUT2
- * ROUT1
- * ROUT2
- * LINPUT1
- * RINPUT1
- * LINPUT2
- * RINPUT2
- * Mic Bias
-
-
-Example:
-
-codec: es8328@11 {
- compatible = "everest,es8328";
- DVDD-supply = <®_3p3v>;
- AVDD-supply = <®_3p3v>;
- PVDD-supply = <®_3p3v>;
- HPVDD-supply = <®_3p3v>;
- clocks = <&clks 169>;
- reg = <0x11>;
-};
diff --git a/Documentation/devicetree/bindings/sound/everest,es8328.yaml b/Documentation/devicetree/bindings/sound/everest,es8328.yaml
new file mode 100644
index 000000000000..a0f4670fa38c
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/everest,es8328.yaml
@@ -0,0 +1,77 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/everest,es8328.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Everest ES8328 audio CODEC
+
+description:
+ Everest Audio Codec, which can be connected via I2C or SPI.
+ Pins on the device (for linking into audio routes) are
+ * LOUT1
+ * LOUT2
+ * ROUT1
+ * ROUT2
+ * LINPUT1
+ * RINPUT1
+ * LINPUT2
+ * RINPUT2
+ * Mic Bias
+
+maintainers:
+ - David Yang <yangxiaohua@everest-semi.com>
+
+properties:
+ compatible:
+ enum:
+ - everest,es8328
+ - everest,es8388
+
+ reg:
+ maxItems: 1
+
+ "#sound-dai-cells":
+ const: 0
+
+ clocks:
+ items:
+ - description: A 22.5792 or 11.2896 MHz clock
+
+ DVDD-supply:
+ description: Regulator providing digital core supply voltage 1.8 - 3.6V
+
+ AVDD-supply:
+ description: Regulator providing analog supply voltage 3.3V
+
+ PVDD-supply:
+ description: Regulator providing digital IO supply voltage 1.8 - 3.6V
+
+ HPVDD-supply:
+ description: Regulator providing analog output voltage 3.3V
+
+required:
+ - compatible
+ - clocks
+ - DVDD-supply
+ - AVDD-supply
+ - PVDD-supply
+ - HPVDD-supply
+
+additionalProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ es8328: codec@11 {
+ compatible = "everest,es8328";
+ reg = <0x11>;
+ AVDD-supply = <®_3p3v>;
+ DVDD-supply = <®_3p3v>;
+ HPVDD-supply = <®_3p3v>;
+ PVDD-supply = <®_3p3v>;
+ clocks = <&clks 169>;
+ };
+ };
--
2.42.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v1 2/2] arm64: dts: rockchip: add analog audio to RK3588 EVB1
2023-11-09 18:44 [PATCH v1 1/2] dt-bindings: es8328: convert to DT schema format Sebastian Reichel
@ 2023-11-09 18:44 ` Sebastian Reichel
2023-11-10 7:55 ` [PATCH v1 1/2] dt-bindings: es8328: convert to DT schema format Krzysztof Kozlowski
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Sebastian Reichel @ 2023-11-09 18:44 UTC (permalink / raw)
To: Heiko Stuebner, Mark Brown
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-rockchip,
linux-sound, devicetree, Sebastian Reichel, kernel
Add support for the EVB1 analog audio to its devicetree. Only
the headphone has been tested, since I don't have matching
peripherals to test headset or speakers.
I also didn't manage to record sound from the onboard microphone,
but that also fails with the vendor kernel. Thus I assume the
microphone on my board is fried.
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
---
.../boot/dts/rockchip/rk3588-evb1-v10.dts | 97 +++++++++++++++++++
1 file changed, 97 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts b/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts
index b9d789d57862..3369065f897d 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts
@@ -56,6 +56,63 @@ button-escape {
};
};
+ analog-sound {
+ compatible = "simple-audio-card";
+ pinctrl-names = "default";
+ pinctrl-0 = <&hp_detect>;
+ simple-audio-card,name = "RK3588 EVB1 Audio";
+ simple-audio-card,aux-devs = <&_headphone>, <&_speaker>;
+ simple-audio-card,bitclock-master = <&masterdai>;
+ simple-audio-card,format = "i2s";
+ simple-audio-card,frame-master = <&masterdai>;
+ simple-audio-card,hp-det-gpio = <&gpio1 RK_PD5 GPIO_ACTIVE_LOW>;
+ simple-audio-card,mclk-fs = <256>;
+ simple-audio-card,pin-switches = "Headphones", "Speaker";
+ simple-audio-card,routing =
+ "Speaker Amplifier INL", "LOUT2",
+ "Speaker Amplifier INR", "ROUT2",
+ "Speaker", "Speaker Amplifier OUTL",
+ "Speaker", "Speaker Amplifier OUTR",
+ "Headphones Amplifier INL", "LOUT1",
+ "Headphones Amplifier INR", "ROUT1",
+ "Headphones", "Headphones Amplifier OUTL",
+ "Headphones", "Headphones Amplifier OUTR",
+ "LINPUT1", "Onboard Microphone",
+ "RINPUT1", "Onboard Microphone",
+ "LINPUT2", "Microphone Jack",
+ "RINPUT2", "Microphone Jack";
+ simple-audio-card,widgets =
+ "Microphone", "Microphone Jack",
+ "Microphone", "Onboard Microphone",
+ "Headphone", "Headphones",
+ "Speaker", "Speaker";
+
+ simple-audio-card,cpu {
+ sound-dai = <&i2s0_8ch>;
+ };
+
+ masterdai: simple-audio-card,codec {
+ sound-dai = <&es8388>;
+ system-clock-frequency = <12288000>;
+ };
+ };
+
+ amp_headphone: headphone-amplifier {
+ compatible = "simple-audio-amplifier";
+ enable-gpios = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&headphone_amplifier_en>;
+ sound-name-prefix = "Headphones Amplifier";
+ };
+
+ amp_speaker: speaker-amplifier {
+ compatible = "simple-audio-amplifier";
+ enable-gpios = <&gpio1 RK_PD3 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&speaker_amplifier_en>;
+ sound-name-prefix = "Speaker Amplifier";
+ };
+
backlight: backlight {
compatible = "pwm-backlight";
power-supply = <&vcc12v_dcin>;
@@ -240,6 +297,32 @@ hym8563: rtc@51 {
};
};
+&i2c7 {
+ status = "okay";
+
+ es8388: audio-codec@11 {
+ compatible = "everest,es8388";
+ reg = <0x11>;
+ clocks = <&cru I2S0_8CH_MCLKOUT>;
+ assigned-clocks = <&cru I2S0_8CH_MCLKOUT>;
+ assigned-clock-rates = <12288000>;
+ AVDD-supply = <&avcc_1v8_codec_s0>;
+ DVDD-supply = <&avcc_1v8_codec_s0>;
+ HPVDD-supply = <&vcc_3v3_s0>;
+ PVDD-supply = <&vcc_3v3_s0>;
+ #sound-dai-cells = <0>;
+ };
+};
+
+&i2s0_8ch {
+ pinctrl-0 = <&i2s0_lrck
+ &i2s0_mclk
+ &i2s0_sclk
+ &i2s0_sdi0
+ &i2s0_sdo0>;
+ status = "okay";
+};
+
&mdio0 {
rgmii_phy: ethernet-phy@1 {
/* RTL8211F */
@@ -273,6 +356,20 @@ &pcie3x4 {
};
&pinctrl {
+ audio {
+ hp_detect: headphone-detect {
+ rockchip,pins = <1 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ headphone_amplifier_en: headphone-amplifier-en {
+ rockchip,pins = <1 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ speaker_amplifier_en: speaker-amplifier-en {
+ rockchip,pins = <1 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
rtl8111 {
rtl8111_isolate: rtl8111-isolate {
rockchip,pins = <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
--
2.42.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v1 1/2] dt-bindings: es8328: convert to DT schema format
2023-11-09 18:44 [PATCH v1 1/2] dt-bindings: es8328: convert to DT schema format Sebastian Reichel
2023-11-09 18:44 ` [PATCH v1 2/2] arm64: dts: rockchip: add analog audio to RK3588 EVB1 Sebastian Reichel
@ 2023-11-10 7:55 ` Krzysztof Kozlowski
2023-11-13 14:05 ` (subset) " Mark Brown
2023-11-17 9:50 ` Heiko Stuebner
3 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2023-11-10 7:55 UTC (permalink / raw)
To: Sebastian Reichel, Heiko Stuebner, Mark Brown
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-rockchip,
linux-sound, devicetree, kernel
On 09/11/2023 19:44, Sebastian Reichel wrote:
> Convert the binding to DT schema format. Note, that "IPVDD-supply"
> got fixed to be "HPVDD-supply" during the conversion. This was
> obviously a typo in the old binding. The old binding example, DT
> files, chip datasheet and Linux driver use HPVDD.
>
> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: (subset) [PATCH v1 1/2] dt-bindings: es8328: convert to DT schema format
2023-11-09 18:44 [PATCH v1 1/2] dt-bindings: es8328: convert to DT schema format Sebastian Reichel
2023-11-09 18:44 ` [PATCH v1 2/2] arm64: dts: rockchip: add analog audio to RK3588 EVB1 Sebastian Reichel
2023-11-10 7:55 ` [PATCH v1 1/2] dt-bindings: es8328: convert to DT schema format Krzysztof Kozlowski
@ 2023-11-13 14:05 ` Mark Brown
2023-11-17 9:50 ` Heiko Stuebner
3 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2023-11-13 14:05 UTC (permalink / raw)
To: Heiko Stuebner, Sebastian Reichel
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-rockchip,
linux-sound, devicetree, kernel
On Thu, 09 Nov 2023 19:44:43 +0100, Sebastian Reichel wrote:
> Convert the binding to DT schema format. Note, that "IPVDD-supply"
> got fixed to be "HPVDD-supply" during the conversion. This was
> obviously a typo in the old binding. The old binding example, DT
> files, chip datasheet and Linux driver use HPVDD.
>
>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/2] dt-bindings: es8328: convert to DT schema format
commit: c479f4989486b79cb92f0ee3b2ffcfc77fc3e443
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: (subset) [PATCH v1 1/2] dt-bindings: es8328: convert to DT schema format
2023-11-09 18:44 [PATCH v1 1/2] dt-bindings: es8328: convert to DT schema format Sebastian Reichel
` (2 preceding siblings ...)
2023-11-13 14:05 ` (subset) " Mark Brown
@ 2023-11-17 9:50 ` Heiko Stuebner
3 siblings, 0 replies; 5+ messages in thread
From: Heiko Stuebner @ 2023-11-17 9:50 UTC (permalink / raw)
To: Mark Brown, Sebastian Reichel
Cc: Heiko Stuebner, Krzysztof Kozlowski, kernel, Rob Herring,
linux-rockchip, Conor Dooley, linux-sound, devicetree
On Thu, 9 Nov 2023 19:44:43 +0100, Sebastian Reichel wrote:
> Convert the binding to DT schema format. Note, that "IPVDD-supply"
> got fixed to be "HPVDD-supply" during the conversion. This was
> obviously a typo in the old binding. The old binding example, DT
> files, chip datasheet and Linux driver use HPVDD.
>
>
Applied, thanks!
[2/2] arm64: dts: rockchip: add analog audio to RK3588 EVB1
commit: 97c39c7a0965b3eba87baa2b7d51443a46e21b8f
Best regards,
--
Heiko Stuebner <heiko@sntech.de>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-11-17 9:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-09 18:44 [PATCH v1 1/2] dt-bindings: es8328: convert to DT schema format Sebastian Reichel
2023-11-09 18:44 ` [PATCH v1 2/2] arm64: dts: rockchip: add analog audio to RK3588 EVB1 Sebastian Reichel
2023-11-10 7:55 ` [PATCH v1 1/2] dt-bindings: es8328: convert to DT schema format Krzysztof Kozlowski
2023-11-13 14:05 ` (subset) " Mark Brown
2023-11-17 9:50 ` Heiko Stuebner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).