From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1998ACA5FED for ; Tue, 6 Oct 2026 15:52:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=2Ub01gSpzkIPPc4VtXS/tUHnccetbhBgf8QWwTXERhw=; b=YIL8Bn3c+81WOmchcOz5b+XT13 8n7ns5Qvrg2dq72xTRY+bm8JY3UBAovpQzj+VsCq7pALB8BRd37mLPAJt8gcGm9iMBzMu1YtE9crI qIpB932yr1ctM4DjDeZCNYpFToC9MEHDJYKdDK0wjKIdhJcs5+TU7CMSV93N2rszQl9PzKvJFxum8 XscsKTULsaKTotabpf4VtfTlKFleEuP2do4BLiP65wa5aGJ2bh2n/ntV28TBF0IATZFvP464rLIBW B/O5deKjFG7dSwfaURj7u6ido+2MeZmTK3lacA0P8G5r+VwqGczcJ2BNVePWg1CbsrhShggHjqICq 8XppxIuA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1xE7Sl-000000014fG-1eZL; Tue, 06 Oct 2026 15:52:19 +0000 Received: from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1xE7Sk-000000014ew-0OlM; Tue, 06 Oct 2026 15:52:18 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 8C96940585; Tue, 6 Oct 2026 15:52:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 455931F0089B; Tue, 6 Oct 2026 15:52:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1791301937; bh=2Ub01gSpzkIPPc4VtXS/tUHnccetbhBgf8QWwTXERhw=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=KOX43lIHXnXkOiPR8I7vX0iKTjhaYX1YpvjfUgBRcZYDu3hJU0USj+jKBrcKJnMcY Ph5T7kQ8XvvxDD/389E5TWK6DIRy+b4fxBwVa211/ZSpLoqTjEFLeY1ohgVBkWTO6B s5Mwrnjv0JfUixAu6KuzmciG0OUJbJI2idVC7h/hpeEmi/OqHs6MxY2+lnEaGoHpuO 7JS4jaMRCs5GnPpb9/svHfMvW+zJjDppK6xW5xohEImdypQtfh1h+WITqlGmw8rq+X RDUkzM42SA5YNpl0Femws1pLptpj3T3EHvXrAy4BSm7iQDbhy+76QCUmf948ra1K/v fX/9qNmcyMrHQ== Date: Tue, 6 Oct 2026 10:52:16 -0500 From: "Rob Herring (Arm)" To: Quchaosheng Cc: Conor Dooley , Lee Jones , mfd@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Zhang Qing , linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, Krzysztof Kozlowski , Heiko Stuebner , Chris Zhong , linux-kernel@vger.kernel.org Subject: Re: [PATCH v5] dt-bindings: mfd: rockchip,rk805: Convert pinctrl to DT schema Message-ID: <179130193622.2397071.7473599240811145793.robh@kernel.org> References: <20260923083001.606935-1-quchaosheng000406@163.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260923083001.606935-1-quchaosheng000406@163.com> X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, 23 Sep 2026 16:30:01 +0800, Quchaosheng wrote: > pinctrl-rk805.txt describes the pinmux controller that is part of the > Rockchip RK805 PMIC. The PMIC itself is already described by > rockchip,rk805.yaml, so the pinmux part belongs there as well: the > pinctrl node is a child of the PMIC node, not a separate device. > > Fold the pinmux description into rockchip,rk805.yaml and drop the > standalone text binding. > > While doing so, add the missing child node schema. The rockchip,rk805.yaml > schema ends with 'additionalProperties: false' but did not describe the pin > configuration child nodes at all, so a valid pinmux node like the one shown > in pinctrl-rk805.txt was rejected: > > pmic@18 (rockchip,rk805): 'rk805-default-pins' does not match any of > the regexes: '^pinctrl-[0-9]+$' > > The pin configuration nodes require 'pins'; without it a node that names > no pin is accepted silently, while the text binding it replaces listed > 'pins' as required. The RK805 exposes two output-only GPIOs, so 'pins' is > an enum of gpio0 and gpio1 and a typo such as "gpio2" is caught. > > The nodes may be direct children of the PMIC, or sit one level deeper > inside a "pinmux" grouping node, which is the layout the example of the > text binding used. pinctrl-bindings.txt allows the configuration nodes to > be grandchildren of the pin controller, and the driver reaches both > layouts: pinconf_generic_dt_node_to_map() parses the referenced node and > then walks its children. The example shows both. > > The example also regains the gpio-controller and #gpio-cells lines that the > example of the text binding had. > > Reported-by: Sashiko > Link: https://sashiko.dev/#/patchset/20260923034245.396417-1-quchaosheng000406@163.com?part=1 > Link: https://sashiko.dev/#/patchset/20260923062746.516666-1-quchaosheng000406@163.com?part=1 > Link: https://sashiko.dev/#/patchset/20260923074337.575122-1-quchaosheng000406@163.com?part=1 > Assisted-by: LLM > Signed-off-by: Quchaosheng > --- > Changes in v5: > - The child nodes of the "pinmux" node were matched with a patternProperties > entry guarded by "if: type: object". That has no "else", so a non-object > property of the grouping node, a misspelled "typo = <1>;" for instance, > matched the pattern and passed. Match them with additionalProperties > against the same definition instead. dtschema puts phandle and status into > the allowed properties there, so the grouping node keeps the phandle that > pinctrl-0 points at, and every other property has to be a pin > configuration node. > > Changes in v4: > - Describe the pin configuration nodes both as direct children and inside a > "pinmux" grouping node. Only the flat form was described, so the layout > used by the example of the text binding this replaces was still rejected: > > pmic@18 (rockchip,rk805): 'pinmux' does not match any of the regexes: > '-pins$', '^pinctrl-[0-9]+$' > > The nodes are now one definition referenced from both places, and the > example shows the flat node and a "pinmux" node holding one. > - Name the binding in the summary, as > Documentation/devicetree/bindings/submitting-patches.rst shows for a > conversion ("dt-bindings: iio: adc: adi,ad7476: Convert to DT schema"). > > Changes in v3: > - Capitalize the summary phrase. dt-bindings: mfd: titles are capitalized > after the subsystem prefix (Add 61, Convert 20 against convert 6). > - Add gpio-controller and #gpio-cells to the example, which the text > binding's example had and the conversion dropped. > - gpio-controller and #gpio-cells are deliberately *not* added to the > required list. rv1108-evb, rv1108-elgin-r1 and rk3328-a1 do not set > them, so requiring them breaks three in-tree boards: > > rv1108-evb.dtb: pmic@18 (rockchip,rk805): 'gpio-controller' is a required property > > No rk8xx PMIC schema requires the pair, and gpio.yaml already enforces > that they appear together ("'#gpio-cells' is a dependency of > 'gpio-controller'"). The pinctrl driver calls devm_gpiochip_add_data() > unconditionally, so the property is not what makes the GPIO controller > work either. > > Changes in v2: > - Require 'pins' in the pin configuration nodes. Without it a node that > names no pin passes validation, while the text binding listed 'pins' > as required. > --- > .../bindings/mfd/rockchip,rk805.yaml | 60 +++++++++++++++++- > .../bindings/pinctrl/pinctrl-rk805.txt | 63 ------------------- > 2 files changed, 59 insertions(+), 64 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/pinctrl/pinctrl-rk805.txt > Reviewed-by: Rob Herring (Arm)