All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 2/3] dt-bindings: Add Rockchip rk817 audio CODEC support
       [not found] <20210317202117.29926-1-macromorgan@hotmail.com>
@ 2021-03-17 20:21 ` Chris Morgan
  2021-03-17 20:44   ` Mark Brown
  2021-03-17 20:21 ` [PATCH v4 3/3] mfd: " Chris Morgan
  1 sibling, 1 reply; 8+ messages in thread
From: Chris Morgan @ 2021-03-17 20:21 UTC (permalink / raw
  To: alsa-devel; +Cc: broonie, pierre-louis.bossart, Chris Morgan, tiwai

Create dt-binding documentation to document rk817 codec.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
---
 .../bindings/sound/rockchip,rk817-codec.yaml  | 63 +++++++++++++++++++
 1 file changed, 63 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/rockchip,rk817-codec.yaml

diff --git a/Documentation/devicetree/bindings/sound/rockchip,rk817-codec.yaml b/Documentation/devicetree/bindings/sound/rockchip,rk817-codec.yaml
new file mode 100644
index 000000000000..986cebcd0832
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/rockchip,rk817-codec.yaml
@@ -0,0 +1,63 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/rockchip-rk817.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Rockchip rk817 audio codec
+
+description:
+  The rk817 codec is an I2C codec integrated with every Rockchip
+  rk817 PMIC MFD.
+
+properties:
+  compatible:
+    enum:
+      - rockchip,rk817-codec
+
+  "#sound-dai-cells":
+    const: 1
+
+  clocks:
+    maxItems: 1
+
+  clock-names:
+    const: "mclk"
+
+  mic-in-differential:
+    description: the microphone is in differential mode.
+    $ref: /schemas/types.yaml#/definitions/flag
+
+required:
+  - compatible
+  - clocks
+  - clock-names
+
+additionalProperties: false
+
+examples:
+  - |
+rk817: pmic@20 {
+	compatible = "rockchip,rk817";
+	reg = <0x20>;
+	interrupt-parent = <&gpio0>;
+	interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&pmic_int>;
+
+	........
+
+	rk817_codec: codec {
+			#sound-dai-cells = <0>;
+			compatible = "rockchip,rk817-codec";
+			clocks = <&cru SCLK_I2S_8CH_OUT>;
+			clock-names = "mclk";
+			pinctrl-names = "default";
+			pinctrl-0 = <&i2s_8ch_mclk>;
+			mic-in-differential;
+			status = "okay";
+	};
+
+	........
+
+};
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v4 3/3] mfd: Add Rockchip rk817 audio CODEC support
       [not found] <20210317202117.29926-1-macromorgan@hotmail.com>
  2021-03-17 20:21 ` [PATCH v4 2/3] dt-bindings: Add Rockchip rk817 audio CODEC support Chris Morgan
@ 2021-03-17 20:21 ` Chris Morgan
  2021-03-17 20:59   ` Mark Brown
  1 sibling, 1 reply; 8+ messages in thread
From: Chris Morgan @ 2021-03-17 20:21 UTC (permalink / raw
  To: alsa-devel; +Cc: broonie, pierre-louis.bossart, Chris Morgan, tiwai

Add rk817 codec support cell to rk808 mfd driver.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
---
 drivers/mfd/rk808.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/mfd/rk808.c b/drivers/mfd/rk808.c
index ad923dd4e007..adb8a7da29db 100644
--- a/drivers/mfd/rk808.c
+++ b/drivers/mfd/rk808.c
@@ -163,6 +163,12 @@ static const struct mfd_cell rk817s[] = {
 		.num_resources = ARRAY_SIZE(rk817_rtc_resources),
 		.resources = &rk817_rtc_resources[0],
 	},
+#ifdef CONFIG_SND_SOC_RK817
+	{
+		.name = "rk817-codec",
+		.of_compatible = "rockchip,rk817-codec",
+	},
+#endif
 };
 
 static const struct mfd_cell rk818s[] = {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH v4 2/3] dt-bindings: Add Rockchip rk817 audio CODEC support
  2021-03-17 20:21 ` [PATCH v4 2/3] dt-bindings: Add Rockchip rk817 audio CODEC support Chris Morgan
@ 2021-03-17 20:44   ` Mark Brown
  2021-03-17 20:56     ` Chris Morgan
  0 siblings, 1 reply; 8+ messages in thread
From: Mark Brown @ 2021-03-17 20:44 UTC (permalink / raw
  To: Chris Morgan; +Cc: alsa-devel, pierre-louis.bossart, tiwai

[-- Attachment #1: Type: text/plain, Size: 325 bytes --]

On Wed, Mar 17, 2021 at 03:21:16PM -0500, Chris Morgan wrote:

> +  compatible:
> +    enum:
> +      - rockchip,rk817-codec

Sorry, should have picked this up on the previous version - you
shouldn't need the compatible here, an rk817 always has a CODEC.  The
actual driver has already been updatd and doesn't use it anyway.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v4 2/3] dt-bindings: Add Rockchip rk817 audio CODEC support
  2021-03-17 20:44   ` Mark Brown
@ 2021-03-17 20:56     ` Chris Morgan
  2021-03-17 21:05       ` Mark Brown
  0 siblings, 1 reply; 8+ messages in thread
From: Chris Morgan @ 2021-03-17 20:56 UTC (permalink / raw
  To: Mark Brown; +Cc: alsa-devel, pierre-louis.bossart, tiwai

The compatible is still needed so that it can be registered with the mfd device itself in the cell.

Thank you.

On Wed, Mar 17, 2021 at 08:44:53PM +0000, Mark Brown wrote:
> On Wed, Mar 17, 2021 at 03:21:16PM -0500, Chris Morgan wrote:
> 
> > +  compatible:
> > +    enum:
> > +      - rockchip,rk817-codec
> 
> Sorry, should have picked this up on the previous version - you
> shouldn't need the compatible here, an rk817 always has a CODEC.  The
> actual driver has already been updatd and doesn't use it anyway.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v4 3/3] mfd: Add Rockchip rk817 audio CODEC support
  2021-03-17 20:21 ` [PATCH v4 3/3] mfd: " Chris Morgan
@ 2021-03-17 20:59   ` Mark Brown
  0 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2021-03-17 20:59 UTC (permalink / raw
  To: Chris Morgan; +Cc: alsa-devel, pierre-louis.bossart, tiwai

[-- Attachment #1: Type: text/plain, Size: 288 bytes --]

On Wed, Mar 17, 2021 at 03:21:17PM -0500, Chris Morgan wrote:

> +#ifdef CONFIG_SND_SOC_RK817
> +	{
> +		.name = "rk817-codec",
> +		.of_compatible = "rockchip,rk817-codec",
> +	},
> +#endif

The of_compatible should be redundant here.  I'm not sure if the config
guard is really useful?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v4 2/3] dt-bindings: Add Rockchip rk817 audio CODEC support
  2021-03-17 20:56     ` Chris Morgan
@ 2021-03-17 21:05       ` Mark Brown
  2021-03-17 21:18         ` Chris Morgan
  0 siblings, 1 reply; 8+ messages in thread
From: Mark Brown @ 2021-03-17 21:05 UTC (permalink / raw
  To: Chris Morgan; +Cc: alsa-devel, pierre-louis.bossart, tiwai

[-- Attachment #1: Type: text/plain, Size: 773 bytes --]

On Wed, Mar 17, 2021 at 03:56:54PM -0500, Chris Morgan wrote:

> The compatible is still needed so that it can be registered with the mfd device itself in the cell.

I can't parse this?  What does "registered with the mfd device itself in
the cell" mean?  If you register a MFD cell then the function device
will instantaite based on platform bus matching.

Please don't top post, reply in line with needed context.  This allows
readers to readily follow the flow of conversation and understand what
you are talking about and also helps ensure that everything in the
discussion is being addressed.

Please fix your mail client to word wrap within paragraphs at something
substantially less than 80 columns.  Doing this makes your messages much
easier to read and reply to.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v4 2/3] dt-bindings: Add Rockchip rk817 audio CODEC support
  2021-03-17 21:05       ` Mark Brown
@ 2021-03-17 21:18         ` Chris Morgan
  2021-03-18 12:38           ` Mark Brown
  0 siblings, 1 reply; 8+ messages in thread
From: Chris Morgan @ 2021-03-17 21:18 UTC (permalink / raw
  To: Mark Brown; +Cc: alsa-devel, pierre-louis.bossart, tiwai

Sorry, still getting the hang of mutt. I've got my wrap set at 80 now, and I'll try to make sure I'm replying correctly. Hopefully this one comes through correct.

As-is, when I start the driver after removing the device-tree compatible field or the of_compatible from the MFD driver, it doesn't find the mclk (and thus doesn't start). But that's my problem, and I'll try to get to the bottom of it.

Thank you.

On Wed, Mar 17, 2021 at 09:05:30PM +0000, Mark Brown wrote:
> On Wed, Mar 17, 2021 at 03:56:54PM -0500, Chris Morgan wrote:
> 
> > The compatible is still needed so that it can be registered with the mfd device itself in the cell.
> 
> I can't parse this?  What does "registered with the mfd device itself in
> the cell" mean?  If you register a MFD cell then the function device
> will instantaite based on platform bus matching.
> 
> Please don't top post, reply in line with needed context.  This allows
> readers to readily follow the flow of conversation and understand what
> you are talking about and also helps ensure that everything in the
> discussion is being addressed.
> 
> Please fix your mail client to word wrap within paragraphs at something
> substantially less than 80 columns.  Doing this makes your messages much
> easier to read and reply to.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v4 2/3] dt-bindings: Add Rockchip rk817 audio CODEC support
  2021-03-17 21:18         ` Chris Morgan
@ 2021-03-18 12:38           ` Mark Brown
  0 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2021-03-18 12:38 UTC (permalink / raw
  To: Chris Morgan; +Cc: alsa-devel, pierre-louis.bossart, tiwai

[-- Attachment #1: Type: text/plain, Size: 626 bytes --]

On Wed, Mar 17, 2021 at 04:18:16PM -0500, Chris Morgan wrote:

> Sorry, still getting the hang of mutt. I've got my wrap set at 80 now, and I'll try to make sure I'm replying correctly. Hopefully this one comes through correct.

No change visible at this end :/

> As-is, when I start the driver after removing the device-tree compatible field or the of_compatible from the MFD driver, it doesn't find the mclk (and thus doesn't start). But that's my problem, and I'll try to get to the bottom of it.

Do you have the MCLK mapped in the CODEC node or the top level node?
You will need to have it mapped in the top level node.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-03-18 12:39 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20210317202117.29926-1-macromorgan@hotmail.com>
2021-03-17 20:21 ` [PATCH v4 2/3] dt-bindings: Add Rockchip rk817 audio CODEC support Chris Morgan
2021-03-17 20:44   ` Mark Brown
2021-03-17 20:56     ` Chris Morgan
2021-03-17 21:05       ` Mark Brown
2021-03-17 21:18         ` Chris Morgan
2021-03-18 12:38           ` Mark Brown
2021-03-17 20:21 ` [PATCH v4 3/3] mfd: " Chris Morgan
2021-03-17 20:59   ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.