From: sashiko-bot@kernel.org
To: "Jia Wang via B4 Relay" <devnull+wangjia.ultrarisc.com@kernel.org>
Cc: robh@kernel.org, krzk+dt@kernel.org, devicetree@vger.kernel.org,
conor+dt@kernel.org
Subject: Re: [PATCH 4/9] dt-bindings: pinctrl: Add UltraRISC DP1000 pinctrl bindings
Date: Fri, 15 May 2026 01:49:37 +0000 [thread overview]
Message-ID: <20260515014938.540FDC2BCB3@smtp.kernel.org> (raw)
In-Reply-To: <20260515-ultrarisc-pinctrl-v1-4-bf559589ea8a@ultrarisc.com>
Thank you for your contribution! Sashiko AI review found 6 potential issue(s) to consider:
- [High] The schema lacks a top-level `required` block for mandatory controller properties.
- [Medium] The binding introduces custom legacy vendor properties and magic macros instead of using generic pinctrl properties.
- [Medium] The `maxItems: 32` constraint on the legacy array properties allows structurally incomplete configuration tuples.
- [Medium] The schema incorrectly uses `additionalProperties: false` alongside `$ref` inclusions, forcing redundant property definitions.
- [Low] The documentation incorrectly describes the legacy properties as a `phandle-array`.
- [Low] The schema fails to enforce the hardware limitation that `func1` is unsupported on `LPC` pins.
--
commit 20f50ac043d77ef903b805d0902034551c955519
Author: Jia Wang <wangjia@ultrarisc.com>
dt-bindings: pinctrl: Add UltraRISC DP1000 pinctrl bindings
Add bindings for the pin controllers on the UltraRISC DP1000 RISC-V SoC.
> diff --git a/Documentation/devicetree/bindings/pinctrl/ultrarisc,dp1000-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/ultrarisc,dp1000-pinctrl.yaml
> new file mode 100644
> index 0000000000000..c7ed1f96382af
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/pinctrl/ultrarisc,dp1000-pinctrl.yaml
> @@ -0,0 +1,168 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/pinctrl/ultrarisc,dp1000-pinctrl.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: UltraRISC DP1000 Pin Controller
> +maintainers:
> + - Jia Wang <wangjia@ultrarisc.com>
> +
> +description: |
> + UltraRISC RISC-V SoC DP1000 pin controller.
> +
> + The binding supports two child node styles under the same controller
> + compatible:
> +
> + - legacy DP1000-specific nodes using phandle-array properties
> + `pinctrl-pins` and `pinconf-pins`
Is "phandle-array" accurate here? The schema defines these as flat uint32
arrays, and the examples show raw integer arrays without any phandles.
> + - generic pinctrl nodes using `pins`, `function` and generic pin
> + configuration properties
> +
> +properties:
> + compatible:
> + const: ultrarisc,dp1000-pinctrl
> +
> + reg:
> + maxItems: 1
> +
> + "#pinctrl-cells":
> + $ref: /schemas/types.yaml#/definitions/uint32
Should there be a top-level required block for compatible and reg?
Without it, a device tree node omitting the reg property or left entirely
empty could silently pass schema validation.
> +patternProperties:
> + '.*-pins$':
> + type: object
> + allOf:
> + - $ref: /schemas/pinctrl/pincfg-node.yaml#
> + - $ref: /schemas/pinctrl/pinmux-node.yaml#
> + additionalProperties: false
Should this use unevaluatedProperties: false instead? Using
additionalProperties: false alongside $ref ignores properties imported by
the references and forces redundantly redefining generic properties locally
in this file.
> + properties:
> + pinctrl-pins:
> + description: |
> + The list of pins and their mux settings that properties in the node
> + apply to. The format: `PORT PIN FUNCTION`.
> + $ref: /schemas/types.yaml#/definitions/uint32-array
> + minItems: 1
> + maxItems: 32
Since the format requires 3 integers per tuple, does a maxItems: 32
constraint allow structurally incomplete configuration tuples? 32 is not a
multiple of 3, so it rejects a valid 11-pin configuration (33 integers) while
permitting an invalid array ending with a partial tuple.
> + pinconf-pins:
> + description: |
> + The list of pins and their pad configuration that properties in the
> + node apply to. The format: `PORT PIN CONF`.
> + CONF is a DP1000-specific encoding of pull and drive strength as
> + defined in dt-bindings/pinctrl/ultrarisc,dp1000-pinctrl.h.
> + $ref: /schemas/types.yaml#/definitions/uint32-array
> + minItems: 1
> + maxItems: 32
Is it appropriate to encode distinct physical characteristics like bias and
drive strength into a single integer using a macro? The pinctrl subsystem's
architectural design typically models these as individual, human-readable DT
properties.
For a new upstream driver, shouldn't it rely exclusively on the standard
generic pinctrl framework rather than introducing new custom vendor properties?
[ ... ]
> + function:
> + description: |
> + Mux function to select for the listed pins.
> + gpio maps to the hardware default mode. The default mode is
> + GPIO for PA/PB/PC/PD pins and LPC for LPC pins.
> + func1 is not supported on LPC pins.
> + enum:
> + - gpio
> + - func0
> + - func1
Could the schema enforce the hardware limitation that func1 is unsupported
on LPC pins? Adding an allOf with an if/then block would prevent this
invalid combination from passing schema validation.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260515-ultrarisc-pinctrl-v1-0-bf559589ea8a@ultrarisc.com?part=4
next prev parent reply other threads:[~2026-05-15 1:49 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-15 1:17 [PATCH 0/9] riscv: ultrarisc: add DP1000 SoC DT and pinctrl support Jia Wang via B4 Relay
2026-05-15 1:17 ` Jia Wang via B4 Relay
2026-05-15 1:17 ` Jia Wang
2026-05-15 1:17 ` [PATCH 1/9] dt-bindings: vendor-prefixes: add Rongda Jia Wang via B4 Relay
2026-05-15 1:17 ` Jia Wang via B4 Relay
2026-05-15 1:17 ` Jia Wang
2026-05-15 1:20 ` sashiko-bot
2026-05-15 1:25 ` Jia Wang
2026-05-15 1:17 ` [PATCH 2/9] dt-bindings: riscv: cpus: Add UltraRISC CP100 compatible Jia Wang via B4 Relay
2026-05-15 1:17 ` Jia Wang via B4 Relay
2026-05-15 1:17 ` Jia Wang
2026-05-15 10:06 ` Conor Dooley
2026-05-15 10:06 ` Conor Dooley
2026-05-15 1:17 ` [PATCH 3/9] dt-bindings: riscv: Add UltraRISC DP1000 bindings Jia Wang via B4 Relay
2026-05-15 1:17 ` Jia Wang via B4 Relay
2026-05-15 1:17 ` Jia Wang
2026-05-15 10:08 ` Conor Dooley
2026-05-15 10:08 ` Conor Dooley
2026-05-15 1:18 ` [PATCH 4/9] dt-bindings: pinctrl: Add UltraRISC DP1000 pinctrl bindings Jia Wang via B4 Relay
2026-05-15 1:18 ` Jia Wang via B4 Relay
2026-05-15 1:18 ` Jia Wang
2026-05-15 1:49 ` sashiko-bot [this message]
2026-05-15 8:43 ` Jia Wang
2026-05-15 10:12 ` Conor Dooley
2026-05-15 10:12 ` Conor Dooley
2026-05-15 1:18 ` [PATCH 5/9] riscv: dts: ultrarisc: Add initial device tree for UltraRISC DP1000 Jia Wang via B4 Relay
2026-05-15 1:18 ` Jia Wang via B4 Relay
2026-05-15 1:18 ` Jia Wang
2026-05-15 2:02 ` sashiko-bot
2026-05-15 10:26 ` Conor Dooley
2026-05-15 10:26 ` Conor Dooley
2026-05-15 1:18 ` [PATCH 6/9] pinctrl: ultrarisc: Add UltraRISC DP1000 pinctrl driver Jia Wang via B4 Relay
2026-05-15 1:18 ` Jia Wang via B4 Relay
2026-05-15 1:18 ` Jia Wang
2026-05-15 2:28 ` sashiko-bot
2026-05-15 1:18 ` [PATCH 7/9] riscv: dts: ultrarisc: add Rongda M0 board device tree Jia Wang via B4 Relay
2026-05-15 1:18 ` Jia Wang via B4 Relay
2026-05-15 1:18 ` Jia Wang
2026-05-15 2:37 ` sashiko-bot
2026-05-15 10:28 ` Conor Dooley
2026-05-15 10:28 ` Conor Dooley
2026-05-15 1:18 ` [PATCH 8/9] riscv: dts: ultrarisc: add Milk-V Titan " Jia Wang via B4 Relay
2026-05-15 1:18 ` Jia Wang via B4 Relay
2026-05-15 1:18 ` Jia Wang
2026-05-15 2:50 ` sashiko-bot
2026-05-15 1:18 ` [PATCH 9/9] riscv: defconfig: enable ARCH_ULTRARISC Jia Wang via B4 Relay
2026-05-15 1:18 ` Jia Wang via B4 Relay
2026-05-15 1:18 ` Jia Wang
2026-05-15 2:59 ` sashiko-bot
2026-05-15 10:05 ` [PATCH 0/9] riscv: ultrarisc: add DP1000 SoC DT and pinctrl support Conor Dooley
2026-05-15 10:05 ` Conor Dooley
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=20260515014938.540FDC2BCB3@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=devnull+wangjia.ultrarisc.com@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.