From: Rob Herring <robh@kernel.org>
To: Ze Huang <18771902331@163.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>, Yangyu Chen <cyy@cyyself.name>,
linux-gpio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org
Subject: Re: [RESEND PATCH 1/3] dt-bindings: pinctrl: Add support for canaan,k230 SoC
Date: Wed, 18 Sep 2024 12:13:20 -0500 [thread overview]
Message-ID: <20240918171320.GA1810164-robh@kernel.org> (raw)
In-Reply-To: <20240916064225.316863-1-18771902331@163.com>
On Mon, Sep 16, 2024 at 02:42:23PM +0800, Ze Huang wrote:
> Add device tree binding details for Canaan K230 pinctrl device.
>
> Signed-off-by: Ze Huang <18771902331@163.com>
> ---
> .../bindings/pinctrl/canaan,k230-pinctrl.yaml | 128 ++++++++++++++++++
> 1 file changed, 128 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/pinctrl/canaan,k230-pinctrl.yaml
>
> diff --git a/Documentation/devicetree/bindings/pinctrl/canaan,k230-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/canaan,k230-pinctrl.yaml
> new file mode 100644
> index 000000000000..979c5bd71e3d
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/pinctrl/canaan,k230-pinctrl.yaml
> @@ -0,0 +1,128 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/pinctrl/canaan,k230-pinctrl.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Canaan Kendryte K230 Pin Controller
> +
> +maintainers:
> + - Ze Huang <18771902331@163.com>
> +
> +description:
> + The Canaan Kendryte K230 platform includes 64 IO pins, each capable of
> + multiplexing up to 5 different functions. Pin function configuration is
> + performed on a per-pin basis.
> +
> +properties:
> + compatible:
> + const: canaan,k230-pinctrl
> +
> + reg:
> + maxItems: 1
> +
> +patternProperties:
> + '-pins$':
> + type: object
> + additionalProperties: false
> + description:
> + A pinctrl node should contain at least one subnode representing the
> + pinctrl groups available on the machine.
> +
> + patternProperties:
> + '-cfg$':
> + type: object
> + $ref: /schemas/pinctrl/pincfg-node.yaml
> + additionalProperties: false
> + description:
> + Each subnode will list the pins it needs, and how they should
> + be configured, with regard to muxer configuration, bias, input
> + enable/disable, input schmitt trigger, slew-rate enable/disable,
> + slew-rate, drive strength.
> +
> + properties:
> + pinmux:
> + $ref: /schemas/types.yaml#/definitions/uint32-array
Drop. You need to add a $ref to pinmux-node.yaml (alongside
pincfg-node.yaml).
> + description:
> + The list of GPIOs and their mux settings that properties in
> + the node apply to. This should be set with the macro
> + 'K230_PINMUX(pin, mode)'
> +
> + bias-disable: true
> +
> + bias-pull-up: true
> +
> + bias-pull-down: true
> +
> + drive-strength:
> + minimum: 0
> + maximum: 15
> +
> + input-enable: true
> +
> + output-enable: true
> +
> + input-schmitt-enable: true
> +
> + slew-rate:
> + $ref: /schemas/types.yaml#/definitions/uint32
Drop. Already has a defined type.
> + description: |
> + slew rate control enable
> + 0: disable
> + 1: enable
> +
> + enum: [0, 1]
> +
> + power-source:
> + $ref: /schemas/types.yaml#/definitions/uint32
Drop. Already has a defined type.
> + description: |
> + Specifies the power source voltage for the IO bank that the
> + pin belongs to. Each bank of IO pins operate at a specific,
> + fixed voltage levels. Incorrect voltage configuration can
> + damage the chip. The defined constants represent the
> + possible voltage configurations:
> +
> + - K230_MSC_3V3 (value 0): 3.3V power supply
> + - K230_MSC_1V8 (value 1): 1.8V power supply
> +
> + The following banks have the corresponding voltage
> + configurations:
> +
> + - bank IO0 to IO1: Fixed at 1.8V
> + - bank IO2 to IO13: Fixed at 1.8V
> + - bank IO14 to IO25: Fixed at 1.8V
> + - bank IO26 to IO37: Fixed at 1.8V
> + - bank IO38 to IO49: Fixed at 1.8V
> + - bank IO50 to IO61: Fixed at 3.3V
> + - bank IO62 to IO63: Fixed at 1.8V
> +
> + enum: [0, 1]
> +
> + required:
> + - pinmux
> +
> +required:
> + - compatible
> + - reg
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + pinctrl: pinctrl@91105000 {
Drop unused labels.
> + compatible = "canaan,k230-pinctrl";
> + reg = <0x91105000 0x100>;
> +
> + uart2_pins: uart2-pins {
> + uart2-pins-cfg {
> + pinmux = <0x503>, /* uart2 txd */
> + <0x603>; /* uart2 rxd */
> + slew-rate = <0>;
> + drive-strength = <4>;
> + power-source = <1>;
> + input-enable;
> + output-enable;
> + bias-disable;
> + };
> + };
> + };
> --
> 2.46.1
>
next prev parent reply other threads:[~2024-09-18 17:13 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-16 6:30 [RESEND PATCH 0/3] Add initial support for Canaan Kendryte K230 pinctrl Ze Huang
2024-09-16 6:42 ` [RESEND PATCH 1/3] dt-bindings: pinctrl: Add support for canaan,k230 SoC Ze Huang
2024-09-18 17:13 ` Rob Herring [this message]
2024-09-23 10:01 ` Ze Huang
2024-09-16 6:47 ` [RESEND PATCH 2/3] pinctrl: canaan: Add support for k230 SoC Ze Huang
2024-09-16 15:58 ` Krzysztof Kozlowski
2024-09-18 8:10 ` Ze Huang
2024-09-16 6:47 ` [RESEND PATCH 3/3] riscv: dts: canaan: Add k230's pinctrl node Ze Huang
2024-09-16 15:52 ` Krzysztof Kozlowski
2024-09-18 8:39 ` Ze Huang
2024-09-23 9:50 ` Conor Dooley
2024-09-23 9:56 ` Ze Huang
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=20240918171320.GA1810164-robh@kernel.org \
--to=robh@kernel.org \
--cc=18771902331@163.com \
--cc=aou@eecs.berkeley.edu \
--cc=conor+dt@kernel.org \
--cc=cyy@cyyself.name \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
/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).