* [PATCH 0/4] Getting rid of the reset controller in i2s-tdm
@ 2021-10-16 10:53 Nicolas Frattaroli
2021-10-16 10:53 ` [PATCH 2/4] ASoC: dt-bindings: rockchip: i2s-tdm: Drop rockchip,cru property Nicolas Frattaroli
` (4 more replies)
0 siblings, 5 replies; 8+ messages in thread
From: Nicolas Frattaroli @ 2021-10-16 10:53 UTC (permalink / raw)
Cc: Nicolas Frattaroli, Liam Girdwood, Mark Brown, Rob Herring,
Heiko Stuebner, Jaroslav Kysela, Takashi Iwai, Philipp Zabel,
linux-rockchip, alsa-devel, devicetree, linux-arm-kernel,
linux-kernel
Hello,
after some discussion with Heiko on IRC, he has admitted to me
that the rockchip,cru property, and its corresponding half a reset
controller in the driver, is weighing heavily on his mind.
The background is that if the lrck only uses one clock for both rx
and tx direction, then according to the downstream driver, the rx
and tx resets should be asserted at roughly the same time to keep
things in sync.
Since there is no existing kernel way of doing this, the driver
would manually write to the CRU's registers to achieve this,
violating abstractions.
We've agreed that an atomic bulk reset API would be the best way to
achieve what it does in a clean fashion. The details of such an API
have yet to be worked out by me, but as it turns out, this is not
a pressing need.
During my investigation, I noticed that I can simply drop the
synchronised reset for now and assert the two resets manually one
after the other, and deassert them in the same manner.
For the case I care about, which is audio playback, this seems to
work just fine. Should someone actually find a case where this
causes a problem, it should be fixed with an atomic bulk reset API.
Patch 1 removes the direct CRU writing stuff from the i2s-tdm driver.
Patch 2 drops the rockchip,cru property from the bindings; they have
not yet been in a kernel release, so as far as I know, we can still
change them with no regard for backwards compatibility.
Patch 3 adds the rk356x i2s1 node without the rockchip,cru property.
Patch 4 adds the analog audio output on Quartz64, included here for
Heiko's convenience.
Regards,
Nicolas Frattaroli
Nicolas Frattaroli (4):
ASoC: rockchip: i2s-tdm: Strip out direct CRU use
ASoC: dt-bindings: rockchip: i2s-tdm: Drop rockchip,cru property
arm64: dts: rockchip: Add i2s1 on rk356x
arm64: dts: rockchip: Add analog audio on Quartz64
.../bindings/sound/rockchip,i2s-tdm.yaml | 16 ---
.../boot/dts/rockchip/rk3566-quartz64-a.dts | 31 ++++-
arch/arm64/boot/dts/rockchip/rk356x.dtsi | 25 ++++
sound/soc/rockchip/rockchip_i2s_tdm.c | 126 +++---------------
4 files changed, 76 insertions(+), 122 deletions(-)
--
2.33.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 2/4] ASoC: dt-bindings: rockchip: i2s-tdm: Drop rockchip,cru property
2021-10-16 10:53 [PATCH 0/4] Getting rid of the reset controller in i2s-tdm Nicolas Frattaroli
@ 2021-10-16 10:53 ` Nicolas Frattaroli
2021-10-16 15:47 ` Heiko Stuebner
2021-10-16 10:53 ` [PATCH 3/4] arm64: dts: rockchip: Add i2s1 on rk356x Nicolas Frattaroli
` (3 subsequent siblings)
4 siblings, 1 reply; 8+ messages in thread
From: Nicolas Frattaroli @ 2021-10-16 10:53 UTC (permalink / raw)
To: Nicolas Frattaroli, Liam Girdwood, Mark Brown, Rob Herring,
Heiko Stuebner
Cc: linux-rockchip, alsa-devel, devicetree, linux-arm-kernel, linux-kernel
This property was only needed for a driver hack, which we can
remove. Since the bindings were not in any kernel release yet, we
are able to just drop the property instead of silently accepting
and ignoring it.
Signed-off-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>
---
.../bindings/sound/rockchip,i2s-tdm.yaml | 16 ----------------
1 file changed, 16 deletions(-)
diff --git a/Documentation/devicetree/bindings/sound/rockchip,i2s-tdm.yaml b/Documentation/devicetree/bindings/sound/rockchip,i2s-tdm.yaml
index ce3e18b50230..6a7c004bef17 100644
--- a/Documentation/devicetree/bindings/sound/rockchip,i2s-tdm.yaml
+++ b/Documentation/devicetree/bindings/sound/rockchip,i2s-tdm.yaml
@@ -82,12 +82,6 @@ properties:
- tx-m
- rx-m
- rockchip,cru:
- $ref: /schemas/types.yaml#/definitions/phandle
- description:
- The phandle of the cru.
- Required if neither trcm-sync-tx-only nor trcm-sync-rx-only are specified.
-
rockchip,grf:
$ref: /schemas/types.yaml#/definitions/phandle
description:
@@ -144,15 +138,6 @@ required:
- rockchip,grf
- "#sound-dai-cells"
-allOf:
- - if:
- properties:
- rockchip,trcm-sync-tx-only: false
- rockchip,trcm-sync-rx-only: false
- then:
- required:
- - rockchip,cru
-
additionalProperties: false
examples:
@@ -177,7 +162,6 @@ examples:
resets = <&cru SRST_M_I2S1_8CH_TX>, <&cru SRST_M_I2S1_8CH_RX>;
reset-names = "tx-m", "rx-m";
rockchip,trcm-sync-tx-only;
- rockchip,cru = <&cru>;
rockchip,grf = <&grf>;
#sound-dai-cells = <0>;
pinctrl-names = "default";
--
2.33.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 2/4] ASoC: dt-bindings: rockchip: i2s-tdm: Drop rockchip,cru property
2021-10-16 10:53 ` [PATCH 2/4] ASoC: dt-bindings: rockchip: i2s-tdm: Drop rockchip,cru property Nicolas Frattaroli
@ 2021-10-16 15:47 ` Heiko Stuebner
0 siblings, 0 replies; 8+ messages in thread
From: Heiko Stuebner @ 2021-10-16 15:47 UTC (permalink / raw)
To: Nicolas Frattaroli, Liam Girdwood, Mark Brown, Rob Herring,
Nicolas Frattaroli
Cc: linux-rockchip, alsa-devel, devicetree, linux-arm-kernel, linux-kernel
Am Samstag, 16. Oktober 2021, 12:53:51 CEST schrieb Nicolas Frattaroli:
> This property was only needed for a driver hack, which we can
> remove. Since the bindings were not in any kernel release yet, we
> are able to just drop the property instead of silently accepting
> and ignoring it.
>
> Signed-off-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Thanks for doing that change :-)
Heiko
> ---
> .../bindings/sound/rockchip,i2s-tdm.yaml | 16 ----------------
> 1 file changed, 16 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/sound/rockchip,i2s-tdm.yaml b/Documentation/devicetree/bindings/sound/rockchip,i2s-tdm.yaml
> index ce3e18b50230..6a7c004bef17 100644
> --- a/Documentation/devicetree/bindings/sound/rockchip,i2s-tdm.yaml
> +++ b/Documentation/devicetree/bindings/sound/rockchip,i2s-tdm.yaml
> @@ -82,12 +82,6 @@ properties:
> - tx-m
> - rx-m
>
> - rockchip,cru:
> - $ref: /schemas/types.yaml#/definitions/phandle
> - description:
> - The phandle of the cru.
> - Required if neither trcm-sync-tx-only nor trcm-sync-rx-only are specified.
> -
> rockchip,grf:
> $ref: /schemas/types.yaml#/definitions/phandle
> description:
> @@ -144,15 +138,6 @@ required:
> - rockchip,grf
> - "#sound-dai-cells"
>
> -allOf:
> - - if:
> - properties:
> - rockchip,trcm-sync-tx-only: false
> - rockchip,trcm-sync-rx-only: false
> - then:
> - required:
> - - rockchip,cru
> -
> additionalProperties: false
>
> examples:
> @@ -177,7 +162,6 @@ examples:
> resets = <&cru SRST_M_I2S1_8CH_TX>, <&cru SRST_M_I2S1_8CH_RX>;
> reset-names = "tx-m", "rx-m";
> rockchip,trcm-sync-tx-only;
> - rockchip,cru = <&cru>;
> rockchip,grf = <&grf>;
> #sound-dai-cells = <0>;
> pinctrl-names = "default";
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 3/4] arm64: dts: rockchip: Add i2s1 on rk356x
2021-10-16 10:53 [PATCH 0/4] Getting rid of the reset controller in i2s-tdm Nicolas Frattaroli
2021-10-16 10:53 ` [PATCH 2/4] ASoC: dt-bindings: rockchip: i2s-tdm: Drop rockchip,cru property Nicolas Frattaroli
@ 2021-10-16 10:53 ` Nicolas Frattaroli
2021-10-16 10:53 ` [PATCH 4/4] arm64: dts: rockchip: Add analog audio on Quartz64 Nicolas Frattaroli
` (2 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Nicolas Frattaroli @ 2021-10-16 10:53 UTC (permalink / raw)
To: Rob Herring, Heiko Stuebner
Cc: Nicolas Frattaroli, devicetree, linux-arm-kernel, linux-rockchip,
linux-kernel
This adds the necessary device tree node on rk3566 and rk3568
to enable the I2S1 TDM audio controller.
I2S0 has not been added, as it is connected to HDMI and there is
no way to test that it's working without a functioning video
clock (read: VOP2 driver).
Signed-off-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>
---
arch/arm64/boot/dts/rockchip/rk356x.dtsi | 25 ++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk356x.dtsi b/arch/arm64/boot/dts/rockchip/rk356x.dtsi
index b721a34ffa8c..dbe0123e74e8 100644
--- a/arch/arm64/boot/dts/rockchip/rk356x.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk356x.dtsi
@@ -608,6 +608,31 @@ sdhci: mmc@fe310000 {
status = "disabled";
};
+ i2s1_8ch: i2s@fe410000 {
+ compatible = "rockchip,rk3568-i2s-tdm";
+ reg = <0x0 0xfe410000 0x0 0x1000>;
+ interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>;
+ assigned-clocks = <&cru CLK_I2S1_8CH_TX_SRC>, <&cru CLK_I2S1_8CH_RX_SRC>;
+ assigned-clock-rates = <1188000000>, <1188000000>;
+ clocks = <&cru MCLK_I2S1_8CH_TX>, <&cru MCLK_I2S1_8CH_RX>,
+ <&cru HCLK_I2S1_8CH>;
+ clock-names = "mclk_tx", "mclk_rx", "hclk";
+ dmas = <&dmac1 3>, <&dmac1 2>;
+ dma-names = "rx", "tx";
+ resets = <&cru SRST_M_I2S1_8CH_TX>, <&cru SRST_M_I2S1_8CH_RX>;
+ reset-names = "tx-m", "rx-m";
+ rockchip,grf = <&grf>;
+ #sound-dai-cells = <0>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2s1m0_sclktx &i2s1m0_sclkrx
+ &i2s1m0_lrcktx &i2s1m0_lrckrx
+ &i2s1m0_sdi0 &i2s1m0_sdi1
+ &i2s1m0_sdi2 &i2s1m0_sdi3
+ &i2s1m0_sdo0 &i2s1m0_sdo1
+ &i2s1m0_sdo2 &i2s1m0_sdo3>;
+ status = "disabled";
+ };
+
dmac0: dmac@fe530000 {
compatible = "arm,pl330", "arm,primecell";
reg = <0x0 0xfe530000 0x0 0x4000>;
--
2.33.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 4/4] arm64: dts: rockchip: Add analog audio on Quartz64
2021-10-16 10:53 [PATCH 0/4] Getting rid of the reset controller in i2s-tdm Nicolas Frattaroli
2021-10-16 10:53 ` [PATCH 2/4] ASoC: dt-bindings: rockchip: i2s-tdm: Drop rockchip,cru property Nicolas Frattaroli
2021-10-16 10:53 ` [PATCH 3/4] arm64: dts: rockchip: Add i2s1 on rk356x Nicolas Frattaroli
@ 2021-10-16 10:53 ` Nicolas Frattaroli
[not found] ` <20211017114506.ij4K-yKeT-8L2-CPP1oLZBjhrru7CDyG5FH8aInLkhU@z>
2021-10-17 12:36 ` Heiko Stuebner
4 siblings, 0 replies; 8+ messages in thread
From: Nicolas Frattaroli @ 2021-10-16 10:53 UTC (permalink / raw)
To: Rob Herring, Heiko Stuebner
Cc: Nicolas Frattaroli, devicetree, linux-arm-kernel, linux-rockchip,
linux-kernel
On the Quartz64 Model A, the I2S1 TDM controller is connected
to the rk817 codec in I2S mode. Enabling it and adding the
necessary simple-sound-card and codec nodes allows for analog
audio output on the PINE64 Quartz64 Model A SBC.
Signed-off-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>
---
.../boot/dts/rockchip/rk3566-quartz64-a.dts | 31 ++++++++++++++++++-
1 file changed, 30 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.dts b/arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.dts
index a244f7b87e38..f1261f25cb35 100644
--- a/arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.dts
@@ -58,6 +58,20 @@ led-diy {
};
};
+ rk817-sound {
+ compatible = "simple-audio-card";
+ simple-audio-card,format = "i2s";
+ simple-audio-card,name = "Analog RK817";
+ simple-audio-card,mclk-fs = <256>;
+
+ simple-audio-card,cpu {
+ sound-dai = <&i2s1_8ch>;
+ };
+ simple-audio-card,codec {
+ sound-dai = <&rk817>;
+ };
+ };
+
vcc12v_dcin: vcc12v_dcin {
compatible = "regulator-fixed";
regulator-name = "vcc12v_dcin";
@@ -199,8 +213,13 @@ rk817: pmic@20 {
interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
clock-output-names = "rk808-clkout1", "rk808-clkout2";
+ #sound-dai-cells = <0>;
+ clock-names = "mclk";
+ clocks = <&cru I2S1_MCLKOUT_TX>;
+ assigned-clocks = <&cru I2S1_MCLKOUT_TX>;
+ assigned-clock-parents = <&cru CLK_I2S1_8CH_TX>;
pinctrl-names = "default";
- pinctrl-0 = <&pmic_int_l>;
+ pinctrl-0 = <&pmic_int_l>, <&i2s1m0_mclk>;
rockchip,system-power-controller;
wakeup-source;
#clock-cells = <1>;
@@ -392,6 +411,16 @@ regulator-state-mem {
};
};
+&i2s1_8ch {
+ status = "okay";
+ rockchip,trcm-sync-tx-only;
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2s1m0_sclktx
+ &i2s1m0_lrcktx
+ &i2s1m0_sdi0
+ &i2s1m0_sdo0>;
+};
+
&mdio1 {
rgmii_phy1: ethernet-phy@0 {
compatible = "ethernet-phy-ieee802.3-c22";
--
2.33.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
[parent not found: <20211017114506.ij4K-yKeT-8L2-CPP1oLZBjhrru7CDyG5FH8aInLkhU@z>]
* Re: (subset) [PATCH 0/4] Getting rid of the reset controller in i2s-tdm
[not found] ` <20211017114506.ij4K-yKeT-8L2-CPP1oLZBjhrru7CDyG5FH8aInLkhU@z>
@ 2021-10-17 11:45 ` Mark Brown
0 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2021-10-17 11:45 UTC (permalink / raw)
To: Nicolas Frattaroli
Cc: Mark Brown, Liam Girdwood, Rob Herring, Philipp Zabel,
linux-rockchip, devicetree, linux-arm-kernel, Jaroslav Kysela,
alsa-devel, Heiko Stuebner, linux-kernel, Takashi Iwai
On Sat, 16 Oct 2021 12:53:49 +0200, Nicolas Frattaroli wrote:
> after some discussion with Heiko on IRC, he has admitted to me
> that the rockchip,cru property, and its corresponding half a reset
> controller in the driver, is weighing heavily on his mind.
>
> The background is that if the lrck only uses one clock for both rx
> and tx direction, then according to the downstream driver, the rx
> and tx resets should be asserted at roughly the same time to keep
> things in sync.
>
> [...]
Applied, thanks!
[1/4] ASoC: rockchip: i2s-tdm: Strip out direct CRU use
commit: d6365d0f0a03c1feb28d86dfd192972ddc647013
[2/4] ASoC: dt-bindings: rockchip: i2s-tdm: Drop rockchip,cru property
commit: 4e52cb9e2c22c9d860910794c82461064baadd9f
Best regards,
--
Mark Brown <broonie@kernel.org>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: (subset) [PATCH 0/4] Getting rid of the reset controller in i2s-tdm
2021-10-16 10:53 [PATCH 0/4] Getting rid of the reset controller in i2s-tdm Nicolas Frattaroli
` (3 preceding siblings ...)
[not found] ` <20211017114506.ij4K-yKeT-8L2-CPP1oLZBjhrru7CDyG5FH8aInLkhU@z>
@ 2021-10-17 12:36 ` Heiko Stuebner
4 siblings, 0 replies; 8+ messages in thread
From: Heiko Stuebner @ 2021-10-17 12:36 UTC (permalink / raw)
To: Nicolas Frattaroli
Cc: Heiko Stuebner, devicetree, alsa-devel, Takashi Iwai,
Liam Girdwood, Philipp Zabel, linux-kernel, linux-rockchip,
Rob Herring, Mark Brown, linux-arm-kernel
On Sat, 16 Oct 2021 12:53:49 +0200, Nicolas Frattaroli wrote:
> after some discussion with Heiko on IRC, he has admitted to me
> that the rockchip,cru property, and its corresponding half a reset
> controller in the driver, is weighing heavily on his mind.
>
> The background is that if the lrck only uses one clock for both rx
> and tx direction, then according to the downstream driver, the rx
> and tx resets should be asserted at roughly the same time to keep
> things in sync.
>
> [...]
Applied, thanks!
[3/4] arm64: dts: rockchip: Add i2s1 on rk356x
commit: ef5c913570040df1955dd49cea221783468faeaf
[4/4] arm64: dts: rockchip: Add analog audio on Quartz64
commit: 1938b585ed19bb01969b4e923664db88c5ee8798
Best regards,
--
Heiko Stuebner <heiko@sntech.de>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 0/4] Rockchip I2S/TDM controller
@ 2021-08-17 10:11 Nicolas Frattaroli
2021-08-17 10:11 ` [PATCH 4/4] arm64: dts: rockchip: add analog audio on Quartz64 Nicolas Frattaroli
0 siblings, 1 reply; 8+ messages in thread
From: Nicolas Frattaroli @ 2021-08-17 10:11 UTC (permalink / raw)
Cc: Nicolas Frattaroli, alsa-devel, devicetree, linux-arm-kernel,
linux-rockchip, linux-kernel
Hello,
I come bearing four patches for your consideration.
The first of these four patches adds a driver for the Rockchip
I2S/TDM controller, used in interfacing between the AHB bus and the
I2S bus on some Rockchip SoCs. This allows for audio playback with
a matching codec.
The controller has three different modes: I2S, I2S/TDM and PCM.
It is distinct from the earlier Rockchip I2S controller, and
therefore not just an extension of that driver.
The driver is based on the downstream version, though various
changes have been made to hopefully make it more palatable to
upstream. Some needless code duplication has been refactored, and
the probe function will no longer let wrong device tree values
write nonsense to hardware registers. Properties have been renamed
and had their semantics changed. I won't bore you with the details
of what downstream did, since that's not what I'm submitting, but
the changes are significant enough that I've added myself to the
list of authors.
The second patch adds the YAML device tree bindings for this, which
have been written from scratch by yours truly. Since I didn't like
having random integers mean things, I defined them as constants in
a header file for the bindings.
The third patch adds the i2s1 controller to the rk356x device tree.
I didn't add any of the other i2s controllers on that SoC for now as
I have no way of testing them; in particular, i2s0 is tied to HDMI,
so needs a functioning VOP2 driver to even have a chance of working.
The fourth patch makes use of the i2s1 controller to enable analog
audio output on the Quartz64 Model A through its RK817 codec. I've
tested this to work properly at both 44.1 kHz and 96 kHz, so both
mclk_root0 and mclk_root1 are definitely functioning.
This is my first kernel contribution, so I most likely did
something horribly wrong. That's why I'm more than happy to receive
any criticisms and concerns over how the driver is implemented,
because I've run out of ideas on how to make it clearly better
myself.
I'd also like to extend my thanks to Peter Geis, who has been
acting as somewhat of a mentor and gave me occasional feedback
and ideas during the writing of this patch series.
Regards,
Nicolas Frattaroli
Nicolas Frattaroli (4):
ASoC: rockchip: add support for i2s-tdm controller
dt-bindings: sound: add rockchip i2s-tdm binding
arm64: dts: rockchip: add i2s1 on rk356x
arm64: dts: rockchip: add analog audio on Quartz64
.../bindings/sound/rockchip,i2s-tdm.yaml | 221 ++
.../boot/dts/rockchip/rk3566-quartz64-a.dts | 36 +-
arch/arm64/boot/dts/rockchip/rk356x.dtsi | 26 +
include/dt-bindings/sound/rockchip,i2s-tdm.h | 9 +
sound/soc/rockchip/Kconfig | 11 +
sound/soc/rockchip/Makefile | 2 +
sound/soc/rockchip/rockchip_i2s_tdm.c | 1804 +++++++++++++++++
sound/soc/rockchip/rockchip_i2s_tdm.h | 400 ++++
8 files changed, 2508 insertions(+), 1 deletion(-)
create mode 100644 Documentation/devicetree/bindings/sound/rockchip,i2s-tdm.yaml
create mode 100644 include/dt-bindings/sound/rockchip,i2s-tdm.h
create mode 100644 sound/soc/rockchip/rockchip_i2s_tdm.c
create mode 100644 sound/soc/rockchip/rockchip_i2s_tdm.h
--
2.32.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 4/4] arm64: dts: rockchip: add analog audio on Quartz64
2021-08-17 10:11 [PATCH 0/4] Rockchip I2S/TDM controller Nicolas Frattaroli
@ 2021-08-17 10:11 ` Nicolas Frattaroli
0 siblings, 0 replies; 8+ messages in thread
From: Nicolas Frattaroli @ 2021-08-17 10:11 UTC (permalink / raw)
To: Rob Herring, Heiko Stuebner
Cc: Nicolas Frattaroli, devicetree, linux-arm-kernel, linux-rockchip,
linux-kernel
On the Quartz64 Model A, the I2S1 TDM controller is connected
to the rk817 codec in I2S mode. Enabling it and adding the
necessary simple-sound-card and codec nodes allows for analog
audio output on the PINE64 Quartz64 Model A SBC.
Signed-off-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>
---
.../boot/dts/rockchip/rk3566-quartz64-a.dts | 36 ++++++++++++++++++-
1 file changed, 35 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.dts b/arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.dts
index b239f314b38a..8da4d1f600c3 100644
--- a/arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.dts
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/rockchip.h>
+#include <dt-bindings/sound/rockchip,i2s-tdm.h>
#include "rk3566.dtsi"
/ {
@@ -50,6 +51,20 @@ led-diy {
};
};
+ rk817-sound {
+ compatible = "simple-audio-card";
+ simple-audio-card,format = "i2s";
+ simple-audio-card,name = "Analog RK817";
+ simple-audio-card,mclk-fs = <256>;
+
+ simple-audio-card,cpu {
+ sound-dai = <&i2s1_8ch>;
+ };
+ simple-audio-card,codec {
+ sound-dai = <&rk817>;
+ };
+ };
+
vcc12v_dcin: vcc12v_dcin {
compatible = "regulator-fixed";
regulator-name = "vcc12v_dcin";
@@ -174,8 +189,13 @@ rk817: pmic@20 {
interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
clock-output-names = "rk808-clkout1", "rk808-clkout2";
+ #sound-dai-cells = <0>;
+ clock-names = "mclk";
+ clocks = <&cru I2S1_MCLKOUT_TX>;
+ assigned-clocks = <&cru I2S1_MCLKOUT_TX>;
+ assigned-clock-parents = <&cru CLK_I2S1_8CH_TX>;
pinctrl-names = "default";
- pinctrl-0 = <&pmic_int_l>;
+ pinctrl-0 = <&pmic_int_l>, <&i2s1m0_mclk>;
rockchip,system-power-controller;
wakeup-source;
#clock-cells = <1>;
@@ -364,9 +384,23 @@ regulator-state-mem {
};
};
};
+
+ rk817_codec: codec {
+ };
+
};
};
+&i2s1_8ch {
+ status = "okay";
+ rockchip,trcm-sync = <RK_TRCM_TX>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2s1m0_sclktx
+ &i2s1m0_lrcktx
+ &i2s1m0_sdi0
+ &i2s1m0_sdo0>;
+};
+
&mdio1 {
rgmii_phy1: ethernet-phy@0 {
compatible = "ethernet-phy-ieee802.3-c22";
--
2.32.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-10-17 12:36 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-16 10:53 [PATCH 0/4] Getting rid of the reset controller in i2s-tdm Nicolas Frattaroli
2021-10-16 10:53 ` [PATCH 2/4] ASoC: dt-bindings: rockchip: i2s-tdm: Drop rockchip,cru property Nicolas Frattaroli
2021-10-16 15:47 ` Heiko Stuebner
2021-10-16 10:53 ` [PATCH 3/4] arm64: dts: rockchip: Add i2s1 on rk356x Nicolas Frattaroli
2021-10-16 10:53 ` [PATCH 4/4] arm64: dts: rockchip: Add analog audio on Quartz64 Nicolas Frattaroli
[not found] ` <20211017114506.ij4K-yKeT-8L2-CPP1oLZBjhrru7CDyG5FH8aInLkhU@z>
2021-10-17 11:45 ` (subset) [PATCH 0/4] Getting rid of the reset controller in i2s-tdm Mark Brown
2021-10-17 12:36 ` Heiko Stuebner
-- strict thread matches above, loose matches on Subject: below --
2021-08-17 10:11 [PATCH 0/4] Rockchip I2S/TDM controller Nicolas Frattaroli
2021-08-17 10:11 ` [PATCH 4/4] arm64: dts: rockchip: add analog audio on Quartz64 Nicolas Frattaroli
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).