[PATCH v3 3/3] dt-bindings: rockchip: rk809: Document audio codec clock

From: Tim Lunn
Date: Sat Jan 20 2024 - 08:56:33 EST


Rockchip RK809 shares the same audio codec block as the rk817 mfd, and
is compatible with the existing rk817_codec driver. This patch
introduces the clock required for the audio codec.

This clock provides the I2S master clock for the audio data. The codec
driver finds the clock by the name "mclk" and will fail to register if
this is missing. Clock-names is kept here to keep compatibility with the
exisitng driver ABI and also to be consistent with the rk817 binding.

This series fixes the following warning from dtb check:

pmic@20: '#sound-dai-cells', 'assigned-clock-parents', 'assigned-clocks',
'clock-names', 'clocks', 'codec' do not match any of the regexes:
'pinctrl-[0-9]+'
Signed-off-by: Tim Lunn <tim@xxxxxxxxxxxxxx>

---

Changes in v3:
- split out clocks into separate patch and group example properties
where properties are introduced.
- Address review comments
- drop clock descriptions that arent required
- set maxitems on clocks

Changes in v2:
- Fix missing include and pinctrl for codec example

.../devicetree/bindings/mfd/rockchip,rk809.yaml | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml b/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml
index be0616201f52..0174261449ab 100644
--- a/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml
+++ b/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml
@@ -93,6 +93,13 @@ properties:
unevaluatedProperties: false
unevaluatedProperties: false

+ clocks:
+ maxItems: 1
+
+ clock-names:
+ items:
+ - const: mclk
+
'#sound-dai-cells':
const: 0

@@ -135,6 +142,7 @@ additionalProperties: false

examples:
- |
+ #include <dt-bindings/clock/px30-cru.h>
#include <dt-bindings/pinctrl/rockchip.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/gpio/gpio.h>
@@ -149,8 +157,10 @@ examples:
clock-output-names = "xin32k", "rk808-clkout2";
interrupt-parent = <&gpio3>;
interrupts = <10 IRQ_TYPE_LEVEL_LOW>;
+ clock-names = "mclk";
+ clocks = <&cru SCLK_I2S1_OUT>;
pinctrl-names = "default";
- pinctrl-0 = <&pmic_int_l_pin>;
+ pinctrl-0 = <&pmic_int_l_pin>, <&i2s1_2ch_mclk>;
rockchip,system-power-controller;
wakeup-source;
#sound-dai-cells = <0>;
--
2.40.1