ASoC: rt5514: Add devicetree bindings for rt5514-spi
Subsystems (3)
PATCH v9 1/2 ASoC: rt5514: Add devicetree bindings for rt5514-spi
Add devicetree bindings documentation file for rt5514 spi dsp codec.
Also update rt5514 i2c dt-binding's compatible to distinguish it from rt5514 spi.
---
Changes in v9:
Address comments from Brian.
.../devicetree/bindings/sound/rt5514-spi.txt | 29 ++++++++++++++++++++++ Documentation/devicetree/bindings/sound/rt5514.txt | 4 +-- 2 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/rt5514-spi.txt
Documentation/devicetree/bindings/sound/rt5514-spi.txt new file +29 -0
@@ -0,0 +1,29 @@ +RT5514 SPI audio CODEC + +This device supports SPI only. + +Required properties: + +- compatible : "realtek,rt5514" or "realtek,rt5514", "realtek,rt5514-spi". + +- reg : The SPI address of the device. + +Optional properties: + +- interrupt-parent: Should be the phandle for the interrupt controller +- interrupts: The interrupt number to the cpu. The interrupt specifier format + depends on the interrupt controller. + +Example: + +codec: rt5514-spi@0 { + compatible = "realtek,rt5514", "realtek,rt5514-spi"; + reg = <0>; + + pinctrl-names = "default"; + pinctrl-0 = <&mic_int>; + + interrupt-parent = <&gpio1>; + interrupts = <13 IRQ_TYPE_LEVEL_HIGH>; + wakeup-source; +};
Documentation/devicetree/bindings/sound/rt5514.txt +2 -2
@@ -4,7 +4,7 @@ This device supports I2C only. Required properties: -- compatible : "realtek,rt5514". +- compatible : "realtek,rt5514" or "realtek,rt5514", "realtek,rt5514-i2c". - reg : The I2C address of the device.
@@ -28,6 +28,6 @@ Pins on the device (for linking into audio routes) for RT5514: Example: codec: rt5514@57 { - compatible = "realtek,rt5514"; + compatible = "realtek,rt5514", "realtek,rt5514-i2c"; reg = <0x57>; };
Signature · 1 line
2.11.0
PATCH v9 2/2 arm64: dts: rockchip: Update rt5514 devices' compatible for Gru
Currently the rt5514 i2c driver and rt5514 spi driver are using the same compatible string.
Add additional compatible strings to identify them for Gru boards.
---
Changes in v9: None
arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi +2 -2
@@ -610,7 +610,7 @@ ap_i2c_mic: &i2c1 { i2c-scl-rising-time-ns = <300>; headsetcodec: rt5514 at 57 { - compatible = "realtek,rt5514"; + compatible = "realtek,rt5514", "realtek,rt5514-i2c"; reg = <0x57>; realtek,dmic-init-delay-ms = <20>; };
@@ -819,7 +819,7 @@ ap_i2c_audio: &i2c8 { status = "okay"; wacky_spi_audio: spi2 at 0 { - compatible = "realtek,rt5514"; + compatible = "realtek,rt5514", "realtek,rt5514-spi"; reg = <0>; interrupt-parent = <&gpio1>; interrupts = <13 IRQ_TYPE_LEVEL_HIGH>;
Signature · 1 line
2.11.0
Rob Herring
maintainerQuoted 22 lines · Jeffy Chen
Add devicetree bindings documentation file for rt5514 spi dsp codec.
Also update rt5514 i2c dt-binding's compatible to distinguish it from rt5514 spi.
Signed-off-by Jeffy Chen <[email protected]>---
Changes in v9:
Address comments from Brian..../devicetree/bindings/sound/rt5514-spi.txt | 29 ++++++++++++++++++++++ Documentation/devicetree/bindings/sound/rt5514.txt | 4 +-- 2 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/rt5514-spi.txtDocumentation/devicetree/bindings/sound/rt5514-spi.txt new file +0
-0
Documentation/devicetree/bindings/sound/rt5514-spi.txt line 9
Quoted 9 lines
Documentation/devicetree/bindings/sound/rt5514-spi.txt new file +9
-0@@ -0,0 +1,29 @@ +RT5514 SPI audio CODEC + +This device supports SPI only. + +Required properties: + +- compatible : "realtek,rt5514" or "realtek,rt5514", "realtek,rt5514-spi". + +- reg : The SPI address of the device.
See below.
Quoted 9 lines
Documentation/devicetree/bindings/sound/rt5514-spi.txt new file +9
-0+ +Optional properties: + +- interrupt-parent: Should be the phandle for the interrupt controller +- interrupts: The interrupt number to the cpu. The interrupt specifier format + depends on the interrupt controller. + +Example: +
Documentation/devicetree/bindings/sound/rt5514-spi.txt line 28
Quoted 10 lines
Documentation/devicetree/bindings/sound/rt5514-spi.txt new file +10
-0+codec: rt5514-spi@0 { + compatible = "realtek,rt5514", "realtek,rt5514-spi"; + reg = <0>; + + pinctrl-names = "default"; + pinctrl-0 = <&mic_int>; + + interrupt-parent = <&gpio1>; + interrupts = <13 IRQ_TYPE_LEVEL_HIGH>; + wakeup-source;
This needs to be documented too.
Documentation/devicetree/bindings/sound/rt5514.txt This device supports I2C only.
Quoted 6 lines
Documentation/devicetree/bindings/sound/rt5514-spi.txt new file +1
-0+};Documentation/devicetree/bindings/sound/rt5514.txt +0
-0@@ -4,7 +4,7 @@ This device supports I2C only.
SPI support should be added to this document.
Documentation/devicetree/bindings/sound/rt5514.txt This device supports I2C only. · line 7
Quoted 5 lines
Documentation/devicetree/bindings/sound/rt5514.txt +1
-1Required properties: -- compatible : "realtek,rt5514". +- compatible : "realtek,rt5514" or "realtek,rt5514", "realtek,rt5514-i2c".
There's no need for the -spi or -i2c compatibles. This is implied by being a child of those controllers.
Quoted 14 lines
Documentation/devicetree/bindings/sound/rt5514.txt +1
-1- reg : The I2C address of the device.@@ -28,6 +28,6 @@ Pins on the device (for linking into audio routes) for RT5514: Example: codec: rt5514@57 { - compatible = "realtek,rt5514"; + compatible = "realtek,rt5514", "realtek,rt5514-i2c"; reg = <0x57>; };Signature · 1 line
2.11.0
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Rob,
Thanks for your reply.
Quoted 8 lines · Rob Herring
Documentation/devicetree/bindings/sound/rt5514.txt This device supports I2C only.
Quoted 5 lines · Jeffy Chen
Documentation/devicetree/bindings/sound/rt5514.txt +0
-0@@ -4,7 +4,7 @@ This device supports I2C only.SPI support should be added to this document.
ok, will do.
Quoted 9 lines
Documentation/devicetree/bindings/sound/rt5514.txt This device supports I2C only. · line 7
Quoted 6 lines
Documentation/devicetree/bindings/sound/rt5514.txt +1
-1Required properties: -- compatible : "realtek,rt5514". +- compatible : "realtek,rt5514" or "realtek,rt5514", "realtek,rt5514-i2c".There's no need for the -spi or -i2c compatibles. This is implied by being a child of those controllers.
heiko mentioned i should add it in the binding in:
https://patchwork.kernel.org/patch/9918987/
Heiko Stuebner
maintainerHi Jeffy,
Am Montag, 18. September 2017, 09:22:21 CEST schrieb jeffy:
Quoted 14 lines · Rob Herring
Quoted 8 lines · Jeffy Chen
Documentation/devicetree/bindings/sound/rt5514.txt This device supports I2C only.
Quoted 5 lines
Documentation/devicetree/bindings/sound/rt5514.txt +0
-0@@ -4,7 +4,7 @@ This device supports I2C only.SPI support should be added to this document.
ok, will do.
Quoted 4 lines
Quoted 4 lines
Documentation/devicetree/bindings/sound/rt5514.txt +0
-0Required properties:
Quoted 7 lines
Quoted 5 lines
Documentation/devicetree/bindings/sound/rt5514.txt This device supports I2C only. · line 7
Quoted 2 lines
Documentation/devicetree/bindings/sound/rt5514.txt +1
-1-- compatible : "realtek,rt5514". +- compatible : "realtek,rt5514" or "realtek,rt5514", "realtek,rt5514-i2c".There's no need for the -spi or -i2c compatibles. This is implied by being a child of those controllers.
heiko mentioned i should add it in the binding in:
https://patchwork.kernel.org/patch/9918987/
If you add a new compatible you need to add it to the binding. I think what Rob means is, that both the i2c and spi side can have the _same_ compatible without the -i2c or -spi, as you can check wether they are children of either a spi or i2c controller in the code itself.
Heiko
Hi Heiko,
Thanks for your reply.
Quoted 4 lines · Heiko Stuebner
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 3 lines
Quoted 3 lines
-- compatible : "realtek,rt5514".
+- compatible : "realtek,rt5514" or "realtek,rt5514", "realtek,rt5514-i2c".
Quoted 9 lines
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
Quoted 2 lines
There's no need for the -spi or -i2c compatibles. This is implied by being a child of those controllers.
heiko mentioned i should add it in the binding in:
https://patchwork.kernel.org/patch/9918987/If you add a new compatible you need to add it to the binding. I think what Rob means is, that both the i2c and spi side can have
the_same_compatible without the -i2c or -spi, as you can check wether they are children of either a spi or i2c controller in the code itself.
ok, got it.
i sent a new patch to check the bus_type instead :)
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html