devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: "Ivan T. Ivanov" <iivanov@suse.de>,
	linus.walleij@linaro.org, robh@kernel.org, krzk+dt@kernel.org
Cc: conor+dt@kernel.org, florian.fainelli@broadcom.com,
	wahrenst@gmx.net, andrea.porta@suse.com,
	linux-gpio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/7] dt-bindings: pinctrl: Add support for Broadcom STB pin controller
Date: Thu, 1 Aug 2024 10:17:34 +0200	[thread overview]
Message-ID: <dcc13c9a-ea74-4fa4-9c74-57e576e01ae6@kernel.org> (raw)
In-Reply-To: <20240731062814.215833-2-iivanov@suse.de>

On 31/07/2024 08:28, Ivan T. Ivanov wrote:
> It looks like they are few revisions of this chip which varies
> by number of pins. Perhaps not all of them are available on the
> market. Perhaps some of them where early engineering samples,
> I don't know. I decided to keep all of them just in case.
> 
> Cc: Andrea della Porta <andrea.porta@suse.com>
> Signed-off-by: Ivan T. Ivanov <iivanov@suse.de>
> ---
>  .../pinctrl/brcm,brcmstb-pinctrl.yaml         | 73 +++++++++++++++++++
>  1 file changed, 73 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/pinctrl/brcm,brcmstb-pinctrl.yaml
> 
> diff --git a/Documentation/devicetree/bindings/pinctrl/brcm,brcmstb-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/brcm,brcmstb-pinctrl.yaml
> new file mode 100644
> index 000000000000..c5afdb49d784
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/pinctrl/brcm,brcmstb-pinctrl.yaml

bcm2712 is Rpi, so not really STB. The name is confusing. Please use
compatible as filename, so:
brcm,bcm2712-pinctrl.yaml

> @@ -0,0 +1,73 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/pinctrl/brcm,brcmstb-pinctrl.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Broadcom STB family pin controller
> +
> +maintainers:
> +  - Ivan T. Ivanov <iivanov@suse.de>
> +
> +description:
> +  Broadcom's STB family memory-mapped pin controller.
> +
> +properties:
> +  compatible:
> +    enum:
> +      - brcm,bcm2712-pinctrl
> +      - brcm,bcm2712-aon-pinctrl
> +      - brcm,bcm2712c0-pinctrl
> +      - brcm,bcm2712c0-aon-pinctrl
> +      - brcm,bcm2712d0-pinctrl
> +      - brcm,bcm2712d0-aon-pinctrl
> +
> +  reg:
> +    maxItems: 1
> +
> +allOf:
> +  - $ref: pinctrl.yaml#

"allOf:" block goes after "required:".

> +
> +required:
> +  - compatible
> +  - reg
> +
> +additionalProperties:
> +  anyOf:
> +    - type: object
> +      allOf:
> +        - $ref: pincfg-node.yaml#
> +        - $ref: pinmux-node.yaml#
> +
> +      properties:
> +        function:
> +          enum:
> +            [

Unnecessary new line

> +              gpio, alt1, alt2, alt3, alt4, alt5, alt6, alt7, alt8,
> +              aon_cpu_standbyb, aon_fp_4sec_resetb, aon_gpclk, aon_pwm,
> +              arm_jtag, aud_fs_clk0, avs_pmu_bsc, bsc_m0, bsc_m1, bsc_m2,
> +              bsc_m3, clk_observe, ctl_hdmi_5v, enet0, enet0_mii, enet0_rgmii,
> +              ext_sc_clk, fl0, fl1, gpclk0, gpclk1, gpclk2, hdmi_tx0_auto_i2c,
> +              hdmi_tx0_bsc, hdmi_tx1_auto_i2c, hdmi_tx1_bsc, i2s_in, i2s_out,
> +              ir_in, mtsif, mtsif_alt, mtsif_alt1, pdm, pkt, pm_led_out, sc0,
> +              sd0, sd2, sd_card_a, sd_card_b, sd_card_c, sd_card_d, sd_card_e,
> +              sd_card_f, sd_card_g, spdif_out, spi_m, spi_s, sr_edm_sense, te0,
> +              te1, tsio, uart0, uart1, uart2, usb_pwr, usb_vbus, uui, vc_i2c0,
> +              vc_i2c3, vc_i2c4, vc_i2c5, vc_i2csl, vc_pcm, vc_pwm0, vc_pwm1,
> +              vc_spi0, vc_spi3, vc_spi4, vc_spi5, vc_uart0, vc_uart2, vc_uart3,
> +              vc_uart4,
> +            ]
> +
> +        pins:
> +          items:
> +            pattern: "^((aon_)?s?gpio[0-6]?[0-9])|(emmc_(clk|cmd|dat[0-7]|ds))$"
> +
> +        bias-disable: true
> +        bias-pull-down: true
> +        bias-pull-up: true
> +      additionalProperties: false
> +
> +    - type: object
> +      additionalProperties:
> +        $ref: "#/additionalProperties/anyOf/0"

I suggest going with patternProperties, fixed suffix for node names and
$defs. See for example:
Documentation/devicetree/bindings/pinctrl/qcom,x1e80100-tlmm.yaml

Missing example. I don't see this being part of other complete device,
so example is a requirement.

Best regards,
Krzysztof


  reply	other threads:[~2024-08-01  8:17 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-31  6:28 [PATCH 0/7] Add pin control driver for BCM2712 SoC Ivan T. Ivanov
2024-07-31  6:28 ` [PATCH 1/7] dt-bindings: pinctrl: Add support for Broadcom STB pin controller Ivan T. Ivanov
2024-08-01  8:17   ` Krzysztof Kozlowski [this message]
2024-08-01  8:38     ` Ivan T. Ivanov
2024-08-01 14:19       ` Krzysztof Kozlowski
2024-08-05  9:27         ` Ivan T. Ivanov
2024-08-02 18:09   ` Stefan Wahren
2024-08-12 16:28     ` Dave Stevenson
2024-08-22 10:54       ` Stefan Wahren
2024-07-31  6:28 ` [PATCH 2/7] pinctrl: bcm: Add STB family pin controller driver Ivan T. Ivanov
2024-08-02 10:22   ` Phil Elwell
2024-08-02 18:36   ` Stefan Wahren
2024-08-05  9:13   ` Stefan Wahren
2024-07-31  6:28 ` [PATCH 3/7] arm64: dts: broadcom: Add support for BCM2712 Ivan T. Ivanov
2024-07-31 21:57   ` Florian Fainelli
2024-08-01  6:45     ` Ivan T. Ivanov
2024-07-31  6:28 ` [PATCH 4/7] arm64: dts: broadcom: bcm2712: Add pin controller nodes Ivan T. Ivanov
2024-08-02 19:16   ` Stefan Wahren
2024-07-31  6:28 ` [PATCH 5/7] arm64: dts: broadcom: bcm2712: Add one more GPIO node Ivan T. Ivanov
2024-07-31 22:11   ` Florian Fainelli
2024-08-01  7:19     ` Ivan T. Ivanov
2024-08-02 18:49   ` Stefan Wahren
2024-08-02 19:08   ` Stefan Wahren
2024-08-05  9:37     ` Ivan T. Ivanov
2024-07-31  6:28 ` [PATCH 6/7] arm64: dts: broadcom: bcm2712: Add second SDHCI controller node Ivan T. Ivanov
2024-08-02 19:01   ` Stefan Wahren
2025-05-12 13:42     ` Ivan T. Ivanov
2024-07-31  6:28 ` [PATCH 7/7] arm64: dts: broadcom: bcm2712: Add UARTA " Ivan T. Ivanov
2024-07-31 22:13   ` Florian Fainelli
2024-08-01  7:50     ` Ivan T. Ivanov
2024-08-02 19:12   ` Stefan Wahren
2024-07-31 14:25 ` [PATCH 0/7] Add pin control driver for BCM2712 SoC Rob Herring (Arm)
  -- strict thread matches above, loose matches on Subject: below --
2025-07-15 18:31 Andrea della Porta
2025-07-15 18:31 ` [PATCH 1/7] dt-bindings: pinctrl: Add support for Broadcom STB pin controller Andrea della Porta
2025-07-15 19:27   ` Rob Herring (Arm)

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=dcc13c9a-ea74-4fa4-9c74-57e576e01ae6@kernel.org \
    --to=krzk@kernel.org \
    --cc=andrea.porta@suse.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=florian.fainelli@broadcom.com \
    --cc=iivanov@suse.de \
    --cc=krzk+dt@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=wahrenst@gmx.net \
    /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).