[PATCH 0/2] ASoC: dt-bindings: renesas,rsnd.yaml: adjust to R-Car Gen4
Hi Mark, Rob, Krzysztof Cc Geert
These are R-Car Gen4 support for Renesas sound driver.
I have posted these patches as [RFC], because the schemas doesn't work correctly for me under certain conditions. "required: dmas/dma-names" always hits to "if-then" and never hits to "else" for some reasons. I'm still not sure why...
But to be very strict, actually, this schemas is not mandatory, because there is PIO transfer mode which doesn't need to have DMA settings.
Thus, this patch-set dropped the schemas for now, and ignore the issue, but it is *not* a wrong schemas IMO.
Kuninori Morimoto (2): ASoC: dt-bindings: renesas,rsnd.yaml: tidyup reg/reg-name ASoC: dt-bindings: renesas,rsnd.yaml: adjust to R-Car Gen4
.../bindings/sound/renesas,rsnd.yaml | 76 ++++++++++++++----- 1 file changed, 56 insertions(+), 20 deletions(-)
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
Tidyup reg/reg-name "maxItems". Pointed by Krzysztof, and corrected by Rob.
Link: https://lore.kernel.org/r/46974ae7-5f7f-8fc1-4ea8-fe77b58f5bfb@linaro.org Link: https://lore.kernel.org/r/20230207211621.GA4158591-robh@kernel.org Reported-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml index d106de00c6b2..c3bea5b0ec40 100644 --- a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml +++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml @@ -300,7 +300,6 @@ allOf: reg: maxItems: 3 reg-names: - maxItems: 3 items: enum: - scu @@ -309,9 +308,8 @@ allOf: else: properties: reg: - maxItems: 5 + minItems: 5 reg-names: - maxItems: 5 items: enum: - scu
On 08/02/2023 02:31, Kuninori Morimoto wrote:
All your commits still have this blank line before.
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
Tidyup reg/reg-name "maxItems". Pointed by Krzysztof, and corrected by Rob.
Drop the sentence, you should instead explain what is here to correct.
Reviewed-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org
Best regards, Krzysztof
Hi Krzysztof
Thank you for your feedback
All your commits still have this blank line before.
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
OK, I will fix it. But, I think top blank line will be ignored when applying the patch ?
Thank you for your help !!
Best regards --- Kuninori Morimoto
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
R-Car Gen4 is not compatible with Gen3, this patch adjusts to R-Car Gen4.
By this patch, "dmas/dma-names" under "rcar_sound,ssi" are dropped from "required:" property, because (A) these are not mandatory if it was PIO transfer mode, (B) Json schema if-then-else doesn't work correctly on there for some reasons. see the Link for detail.
Link: https://lore.kernel.org/r/CAMuHMdW_QHmODAKvn_GwHHUWw-=z4Tdq0NkhdK2u2piG_YgB-... Link: https://lore.kernel.org/all/87zg9vk0ex.wl-kuninori.morimoto.gx@renesas.com/#... Link: https://lore.kernel.org/all/87r0v2uvm7.wl-kuninori.morimoto.gx@renesas.com/#... Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- .../bindings/sound/renesas,rsnd.yaml | 72 ++++++++++++++----- 1 file changed, 55 insertions(+), 17 deletions(-)
diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml index c3bea5b0ec40..3214ca9bcc78 100644 --- a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml +++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml @@ -99,20 +99,6 @@ properties: minItems: 1 maxItems: 31
- clock-names: - description: List of necessary clock names. - minItems: 1 - maxItems: 31 - items: - oneOf: - - const: ssi-all - - pattern: '^ssi.[0-9]$' - - pattern: '^src.[0-9]$' - - pattern: '^mix.[0-1]$' - - pattern: '^ctu.[0-1]$' - - pattern: '^dvc.[0-1]$' - - pattern: '^clk_(a|b|c|i)$' - ports: $ref: audio-graph-port.yaml#/definitions/port-base unevaluatedProperties: false @@ -256,8 +242,6 @@ properties: $ref: /schemas/types.yaml#/definitions/flag required: - interrupts - - dmas - - dma-names additionalProperties: false
# For DAI base @@ -305,7 +289,14 @@ allOf: - scu - ssi - adg - else: + - if: + properties: + compatible: + contains: + enum: + - renesas,rcar_sound-gen2 + - renesas,rcar_sound-gen3 + then: properties: reg: minItems: 5 @@ -317,6 +308,53 @@ allOf: - ssiu - ssi - audmapp + - if: + properties: + compatible: + contains: + const: renesas,rcar_sound-gen4 + then: + properties: + reg: + minItems: 4 + reg-names: + items: + enum: + - adg + - ssiu + - ssi + - sdmc + + - if: + properties: + compatible: + contains: + const: renesas,rcar_sound-gen4 + then: + properties: + clock-names: + description: List of necessary clock names. + minItems: 3 + items: + enum: + - ssi.0 + - ssiu.0 + - clkin + else: + properties: + clock-names: + description: List of necessary clock names. + minItems: 1 + maxItems: 31 + items: + oneOf: + - const: ssi-all + - pattern: '^ssi.[0-9]$' + - pattern: '^src.[0-9]$' + - pattern: '^mix.[0-1]$' + - pattern: '^ctu.[0-1]$' + - pattern: '^dvc.[0-1]$' + - pattern: '^clk_(a|b|c|i)$'
unevaluatedProperties: false
On 08/02/2023 02:32, Kuninori Morimoto wrote:
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
R-Car Gen4 is not compatible with Gen3, this patch adjusts to R-Car Gen4.
Do not use "This commit/patch". https://elixir.bootlin.com/linux/v5.17.1/source/Documentation/process/submit...
Same below.
By this patch, "dmas/dma-names" under "rcar_sound,ssi" are dropped from "required:" property, because (A) these are not mandatory if it was PIO transfer mode, (B) Json schema if-then-else doesn't work correctly on there for some reasons. see the Link for detail.
You gave three links, so why? You should rather explain why it does not work.
Link: https://lore.kernel.org/r/CAMuHMdW_QHmODAKvn_GwHHUWw-=z4Tdq0NkhdK2u2piG_YgB-... Link: https://lore.kernel.org/all/87zg9vk0ex.wl-kuninori.morimoto.gx@renesas.com/#... Link: https://lore.kernel.org/all/87r0v2uvm7.wl-kuninori.morimoto.gx@renesas.com/#... Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
.../bindings/sound/renesas,rsnd.yaml | 72 ++++++++++++++----- 1 file changed, 55 insertions(+), 17 deletions(-)
diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml index c3bea5b0ec40..3214ca9bcc78 100644 --- a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml +++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml @@ -99,20 +99,6 @@ properties: minItems: 1 maxItems: 31
- clock-names:
- description: List of necessary clock names.
- minItems: 1
- maxItems: 31
Don't remove properties from top-level.
- items:
oneOf:
- const: ssi-all
- pattern: '^ssi\.[0-9]$'
- pattern: '^src\.[0-9]$'
- pattern: '^mix\.[0-1]$'
- pattern: '^ctu\.[0-1]$'
- pattern: '^dvc\.[0-1]$'
- pattern: '^clk_(a|b|c|i)$'
- ports: $ref: audio-graph-port.yaml#/definitions/port-base unevaluatedProperties: false
@@ -256,8 +242,6 @@ properties: $ref: /schemas/types.yaml#/definitions/flag required: - interrupts
- dmas
- dma-names
Even with your explanation in commit this does not look related to this patch. Don't mix features and fixes.
additionalProperties: false
# For DAI base @@ -305,7 +289,14 @@ allOf: - scu - ssi - adg
- else:
- if:
properties:
compatible:
contains:
enum:
- renesas,rcar_sound-gen2
- renesas,rcar_sound-gen3
- then: properties: reg: minItems: 5
@@ -317,6 +308,53 @@ allOf: - ssiu - ssi - audmapp
- if:
properties:
compatible:
contains:
const: renesas,rcar_sound-gen4
- then:
properties:
reg:
minItems: 4
You now add the same mistakes you corrected in 1/2. Really - the same.
reg-names:
items:
enum:
- adg
- ssiu
- ssi
- sdmc
- if:
properties:
compatible:
contains:
const: renesas,rcar_sound-gen4
- then:
properties:
clock-names:
description: List of necessary clock names.
minItems: 3
maxItems
items:
enum:
- ssi.0
- ssiu.0
- clkin
- else:
Best regards, Krzysztof
Hi Krzysztof
Do not use "This commit/patch".
(snip)
Same below.
OK, will fix in v2 patch
Link: https://lore.kernel.org/r/CAMuHMdW_QHmODAKvn_GwHHUWw-=z4Tdq0NkhdK2u2piG_YgB-... Link: https://lore.kernel.org/all/87zg9vk0ex.wl-kuninori.morimoto.gx@renesas.com/#... Link: https://lore.kernel.org/all/87r0v2uvm7.wl-kuninori.morimoto.gx@renesas.com/#... Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
(snip)
You gave three links, so why? You should rather explain why it does not work.
In my understanding, "Link:" is used to indicates what kind of discussion have been done in ML, etc. Above are the link to related to this patch.
And I'm not sure why it doesn't work, it is the problem.
- clock-names:
- description: List of necessary clock names.
- minItems: 1
- maxItems: 31
Don't remove properties from top-level.
It needs if-then-else, So it moved to bottom side, not removed.
@@ -256,8 +242,6 @@ properties: $ref: /schemas/types.yaml#/definitions/flag required: - interrupts
- dmas
- dma-names
Even with your explanation in commit this does not look related to this patch. Don't mix features and fixes.
Hmm.. indeed. Will fix in v2
Thank you for your help !!
Best regards --- Kuninori Morimoto
On Wed, 08 Feb 2023 01:31:19 +0000, Kuninori Morimoto wrote:
Cc Geert
These are R-Car Gen4 support for Renesas sound driver.
I have posted these patches as [RFC], because the schemas doesn't work correctly for me under certain conditions. "required: dmas/dma-names" always hits to "if-then" and never hits to "else" for some reasons. I'm still not sure why...
[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/2] ASoC: dt-bindings: renesas,rsnd.yaml: tidyup reg/reg-name commit: 55194032620ae97338ac435505f1296e13fbe821
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
participants (3)
-
Krzysztof Kozlowski
-
Kuninori Morimoto
-
Mark Brown