From: Neil Armstrong <neil.armstrong@linaro.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
Konrad Dybcio <konrad.dybcio@somainline.org>,
Andy Gross <agross@kernel.org>, Lee Jones <lee@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
Mark Brown <broonie@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>
Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH 1/6] dt-bindings: pinctrl: convert qcom,mdm9615-pinctrl.txt to dt-schema
Date: Thu, 6 Oct 2022 18:20:04 +0200 [thread overview]
Message-ID: <5a669cee-55b2-f5cb-56f2-279003d08578@linaro.org> (raw)
In-Reply-To: <8213587e-681a-a948-42a6-2b1632b47ac0@linaro.org>
Hi,
On 06/10/2022 13:09, Krzysztof Kozlowski wrote:
> On 06/10/2022 11:57, Neil Armstrong wrote:
>> Convert the MDM9515 pinctrl bindings to dt-schema.
>>
>> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
>> ---
>> .../bindings/pinctrl/qcom,mdm9615-pinctrl.txt | 161 ---------------------
>> .../bindings/pinctrl/qcom,mdm9615-pinctrl.yaml | 101 +++++++++++++
>> 2 files changed, 101 insertions(+), 161 deletions(-)
>>
>
> Thank you for your patch. There is something to discuss/improve.
>
>> - };
>> - };
>> diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,mdm9615-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,mdm9615-pinctrl.yaml
>> new file mode 100644
>> index 000000000000..6a5966fc0098
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/pinctrl/qcom,mdm9615-pinctrl.yaml
>> @@ -0,0 +1,101 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/pinctrl/qcom,mdm9615-pinctrl.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Qualcomm Technologies, Inc. MDM9615 TLMM block
>> +
>> +maintainers:
>> + - Bjorn Andersson <andersson@kernel.org>
>> +
>> +description: |
>
> No need for |
Ack
>
>> + This binding describes the Top Level Mode Multiplexer block found in the
>> + MDM9615 platform.
>
> Instead: "Top Level Mode Multiplexer pin controller node in Qualcomm
> MDM9615 SoC."
>
> I see this pattern is coming from other file, so I will fix all of them.
Ack, wil use this.
>
>> +
>> +allOf:
>> + - $ref: "pinctrl.yaml#"
>
> Drop it, it's included from tlmm-common
Ack
>
>> + - $ref: /schemas/pinctrl/qcom,tlmm-common.yaml#
>> +
>> +properties:
>> + compatible:
>> + const: qcom,mdm9615-pinctrl
>> +
>> + reg:
>> + maxItems: 1
>> +
>> + interrupts: true
>> + interrupt-controller: true
>> + '#interrupt-cells': true
>> + gpio-controller: true
>> + '#gpio-cells': true
>> + gpio-ranges: true
>> +
>> +required:
>> + - compatible
>> + - reg
>> +
>> +additionalProperties: false
>> +
>> +patternProperties:
>> + '-state$':
>
> Use " as quotes
Ack
>
>> + oneOf:
>> + - $ref: "#/$defs/qcom-mdm9615-pinctrl-state"
>> + - patternProperties:
>> + "-pins$":
>> + $ref: "#/$defs/qcom-mdm9615-pinctrl-state"
Interesting, if I add this subnode (that should be valid):
gsbi3-state {
pins = "gpio8", "gpio9", "gpio10", "gpio11";
function = "gsbi3";
drive-strength = <8>;
bias-disable;
};
then I get the following warning from dt_bindings_check:
Documentation/devicetree/bindings/pinctrl/qcom,mdm9615-pinctrl.example.dtb: pinctrl@1000000: gsbi3-state: More than one condition true in oneOf schema:
{'oneOf': [{'$ref': '#/$defs/qcom-mdm9615-pinctrl-state'},
{'patternProperties': {'-pins$': {'$ref': '#/$defs/qcom-mdm9615-pinctrl-state'},
'pinctrl-[0-9]+': True},
'properties': {'$nodename': True,
'phandle': True,
'pinctrl-names': True,
'secure-status': True,
'status': True}}]}
From schema: /Documentation/devicetree/bindings/pinctrl/qcom,mdm9615-pinctrl.yaml
And I don't understand why, the nodename should not match "-pins$" nor "pinctrl-[0-9]+'...
>> +
>> +'$defs':
>
> No need for quotes
>
>> + qcom-mdm9615-pinctrl-state:
>> + type: object
>> + description:
>> + Pinctrl node's client devices use subnodes for desired pin configuration.
>> + Client device subnodes use below standard properties.
>> + $ref: "qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state"
>
> No need for quotes
Ack
>
>> +
>> + properties:
>> + pins:
>> + description:
>> + List of gpio pins affected by the properties specified in this
>> + subnode.
>> + items:
>> + oneOf:
>> + - pattern: "^gpio([0-9]|[1-7][0-9]|8[0-7])$"
>
> No sd-like functions? If so, then drop oneOf
Ack
>
>> + minItems: 1
>> + maxItems: 16
>> +
>> + function:
>> + description:
>> + Specify the alternative function to be configured for the specified
>> + pins.
>> +
>> + enum: [ gpio, gsbi2_i2c, gsbi3, gsbi4, gsbi5_i2c, gsbi5_uart,
>> + sdc2, ebi2_lcdc, ps_hold, prim_audio, sec_audio, cdc_mclk, ]
>> +
>> + bias-disable: true
>> + bias-pull-down: true
>> + bias-pull-up: true
>> + drive-strength: true
>> + output-high: true
>> + output-low: true
>> + input-enable: true
>> +
>> + required:
>> + - pins
>> + - function
>> +
>> + additionalProperties: false
>> +
>> +examples:
>> + - |
>> + #include <dt-bindings/interrupt-controller/arm-gic.h>
>> + tlmm: pinctrl@1000000 {
>
> Use 4 spaces indentation.
>
>> + compatible = "qcom,mdm9615-pinctrl";
>> + reg = <0x01000000 0x300000>;
>> + interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
>> + gpio-controller;
>> + gpio-ranges = <&msmgpio 0 0 88>;
>> + #gpio-cells = <2>;
>> + interrupt-controller;
>> + #interrupt-cells = <2>;
>
> Add example of -state with and without -pins node.
>
> You dropped it with conversion.
Ack, done but I have a weird warning, see upper.
>
>
>> + };
>>
>
> Best regards,
> Krzysztof
>
Thanks,
Neil
next prev parent reply other threads:[~2022-10-06 16:20 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-06 9:57 [PATCH 0/6] arm: qcom: mdm9615: second round of bindings and DT fixes Neil Armstrong
2022-10-06 9:57 ` [PATCH 1/6] dt-bindings: pinctrl: convert qcom,mdm9615-pinctrl.txt to dt-schema Neil Armstrong
2022-10-06 11:09 ` Krzysztof Kozlowski
2022-10-06 16:20 ` Neil Armstrong [this message]
2022-10-06 20:20 ` Krzysztof Kozlowski
2022-10-06 12:27 ` Rob Herring
2022-10-06 16:21 ` Neil Armstrong
2022-10-06 19:42 ` Rob Herring
2022-10-06 9:57 ` [PATCH 2/6] arm: dts: qcom: mdm9615: fix pinctrl subnodes Neil Armstrong
2022-10-06 11:10 ` Krzysztof Kozlowski
2022-10-07 19:36 ` Konrad Dybcio
2022-10-06 9:58 ` [PATCH 3/6] arm: dts: qcom: mdm9615: wp8548-mangoh-green: fix sx150xq node names and probe-reset property Neil Armstrong
2022-10-07 19:38 ` Konrad Dybcio
2022-10-10 7:45 ` Neil Armstrong
2022-10-06 9:58 ` [PATCH 4/6] dt-bindings: soc: qcom: convert non-smd RPM bindings to dt-schema Neil Armstrong
2022-10-06 19:53 ` Rob Herring
2022-10-06 9:58 ` [PATCH 5/6] dt-bindings: regulators: convert non-smd RPM Regulators " Neil Armstrong
2022-10-06 12:27 ` Rob Herring
2022-10-06 20:04 ` Rob Herring
2022-10-06 9:58 ` [PATCH 6/6] dt-bindings: soc: qcom: ipc-rpm: refer to qcom,ipc-rpm-regulator.yaml Neil Armstrong
2022-10-06 12:27 ` Rob Herring
2022-10-06 20:05 ` Rob Herring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5a669cee-55b2-f5cb-56f2-279003d08578@linaro.org \
--to=neil.armstrong@linaro.org \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=konrad.dybcio@somainline.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=lee@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).