From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f45.google.com (mail-pj1-f45.google.com [209.85.216.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8FACD42CB1C for ; Tue, 7 Jul 2026 14:42:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783435367; cv=none; b=dgvSBztGZsJ9is9SeqiJ8XYepdVOc/Np2Gxqvy883Pt4OHa7NPuxNlZ1ZO/Auijs3WhEdHTh0UpGzJhbY7eAib2NQ4Lvd0YrtrvAwDHFn1eGncxV0eLHsryOOgy6udUI5pP++MZZth6QPy/zqS7wqp2eZt80nQphlsd5cIElbSE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783435367; c=relaxed/simple; bh=KAnqFS+pXd5ZmI8H/+IzEqlkA+a45bynbVVJ8pNh+kY=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=j7oBj7RcJwqiQueYIYoCKDd+dn422NlVLKy5zEFTFakoqCu+gGLehF3YVfEBYrSBHFo/Oi0MhJmp0gCwsVxI8bvg2+xzLZfaoeBt1Mq9sL5yvRFPiltHIB76zp5Zpc4H1s8WPU0FFVoISy5yVMcYkggc9UAkkEO9bDPRqoANwvw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=bkaD9/qC; arc=none smtp.client-ip=209.85.216.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bkaD9/qC" Received: by mail-pj1-f45.google.com with SMTP id 98e67ed59e1d1-381ed661712so3984128a91.2 for ; Tue, 07 Jul 2026 07:42:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783435365; x=1784040165; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=15Jfi3usaM1xvnYfzLTdvw/7lRtvBMgyiSIFjJe9RNk=; b=bkaD9/qCY+Q1Tts0AnZM1QzP26q+D9l9HuCio2UEzEtgB0iR6/QgTXrFfpKL8OJGDh wX2eU0MK/LYCLnMKHwYRUAPGzroKaVjWsVFByfu+2syhUA8VUb3NwrJAoqsE2LFUajTN Y+IETyEySxcWGHVBYwdCCk+K6DoymonVrdjKZn5i5rZ2mKrNpgjDJPAb9JxR7T3m6KV2 jxLYxr2QqX0hN1+/d2L4msi3QeNssRdrGOqdY+O+P/DEz6nE4XiUjW0DC8R9a60ZWpR1 3pyEzwateWNBzXZujR3TaR+9x3LuHJ0S6k6OtMWm1pl7rTRm6cJ51cisw/CXqyCAyh/b 8xcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783435365; x=1784040165; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=15Jfi3usaM1xvnYfzLTdvw/7lRtvBMgyiSIFjJe9RNk=; b=XW4FkXo0QSy2lKBFycLE4WkmQXm/NF9qlRzFwXAsZcHzrJO4sEMP+fUYmOWoZqpG9g ZPAn3qtm6rQCmAf9KzVxOBYkrz5yTBj3TKVFwEsZADZf21bB6jFp+JuqP1EQKGzwcZ8O LYu5y4Fpa3nVrIH1jC1aRE9+gUOmqwX3jhfScmRdymyfC7ZTYh7FgxkAnAHljIDTrXUW EqDXiCp3r0t9/2OkJDPSePX11NxsOOb7NRV2JeNYZKxIWXPl3ff03mtDjenKfcwA41e9 KH+NuG3CVpXRRaY9zxOIuxwmJfJ4DgwgLZSpLTd6vEUYDalLOsRbPKk59R8PIi6MGxYD nybw== X-Forwarded-Encrypted: i=1; AHgh+RowiHBdR8c9oZJFGf+8o7eLlnsdTuSQoP+Q5z22gcLYp1ocBOcQLLTwWr/2EmDIJyasi/Fyd0RRxIuLcII=@vger.kernel.org X-Gm-Message-State: AOJu0Yw87l+trdJV0wRzJNhnYGQz3VkotAmVbgynFwKdeNgpz50jctVv Zkqp7Y8a/scr6BiY9kVRLdD14tZbw9s54E8YE+7NZ+Mp6IhNBgwgZ4uGacjMNGPQ X-Gm-Gg: AfdE7cl6CRcRVn+71FKYr4ZxJMm0pOX9hnG1c9JUnBGbYQJDvWXVg6YECgxxvxbctWI PtSIs5UW9uY0d9O6+ytt9Z3jymrrHhzCOtBd0v0LGtkyCxZHhivHioYQy9wkiVp+NPMV1IBj215 a3Tfm8nIX5EtjFYwJaL5iRj29TiS6t7YdWzWH+9A0Tc9sLvTYXCo8l/U6ZFZYLWZOC3gbcdxb9Y Ay2VDFVRVud5j5pF3ZKxT6Xmcvi/xKYJKqy9TdQycRk3U7vxKpcd/hMrE6b9YedCqoRV8nBAB91 UhB7KNhp7l+ltdCfNvCM/D/FYffyv/37o+HEW3vMLtc0vMgqQOayjO9cEHPuDfvNBuLRSUqBL0p ++ktFPOLrcYkKKiINXoHSiKbdjeKBwL6moSjQP8M9GBVH8CZQ1FSqhYBXgWp4It36/dRuNifc01 NUjyN9pUZIAwN4cJttXOBRTfGri02NFg== X-Received: by 2002:a17:90b:2652:b0:37d:f206:a2ac with SMTP id 98e67ed59e1d1-38755573a58mr5320106a91.7.1783435364699; Tue, 07 Jul 2026 07:42:44 -0700 (PDT) Received: from inhnjlux1020.ls.ege.ds ([49.204.165.29]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-387d12fcd99sm1264152a91.2.2026.07.07.07.42.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jul 2026 07:42:44 -0700 (PDT) From: Udaya Kiran Challa To: linusw@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org Cc: skhan@linuxfoundation.org, me@brighamcampbell.com, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Udaya Kiran Challa Subject: [PATCH v2] dt-bindings: pinctrl: microchip,pic32mzda-pinctrl: Convert to DT schema Date: Tue, 7 Jul 2026 20:12:23 +0530 Message-Id: <20260707144223.120417-1-challauday369@gmail.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Convert Microchip PIC32 Pin Controller devicetree binding from legacy text format to DT schema. Signed-off-by: Udaya Kiran Challa --- Changelog: Changes since v1: - Add interrupts and clocks to uart2 example to satisfy uart schema validation - Corect regex patterns to accept standard DT node naming conventions - Add function property to top-level pin configuration nodes - Remove restrictive enum from function property to support all mux functions Link to v1:https://lore.kernel.org/all/20260705132521.159522-1-challauday369@gmail.com/ --- .../pinctrl/microchip,pic32-pinctrl.txt | 60 -------- .../pinctrl/microchip,pic32mzda-pinctrl.yaml | 145 ++++++++++++++++++ 2 files changed, 145 insertions(+), 60 deletions(-) delete mode 100644 Documentation/devicetree/bindings/pinctrl/microchip,pic32-pinctrl.txt create mode 100644 Documentation/devicetree/bindings/pinctrl/microchip,pic32mzda-pinctrl.yaml diff --git a/Documentation/devicetree/bindings/pinctrl/microchip,pic32-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/microchip,pic32-pinctrl.txt deleted file mode 100644 index 51efd2085113..000000000000 --- a/Documentation/devicetree/bindings/pinctrl/microchip,pic32-pinctrl.txt +++ /dev/null @@ -1,60 +0,0 @@ -* Microchip PIC32 Pin Controller - -Please refer to pinctrl-bindings.txt, ../gpio/gpio.txt, and -../interrupt-controller/interrupts.txt for generic information regarding -pin controller, GPIO, and interrupt bindings. - -PIC32 'pin configuration node' is a node of a group of pins which can be -used for a specific device or function. This node represents configurations of -pins, optional function, and optional mux related configuration. - -Required properties for pin controller node: - - compatible: "microchip,pic32mada-pinctrl" - - reg: Address range of the pinctrl registers. - - clocks: Clock specifier (see clock bindings for details) - -Required properties for pin configuration sub-nodes: - - pins: List of pins to which the configuration applies. - -Optional properties for pin configuration sub-nodes: ----------------------------------------------------- - - function: Mux function for the specified pins. - - bias-pull-up: Enable weak pull-up. - - bias-pull-down: Enable weak pull-down. - - input-enable: Set the pin as an input. - - output-low: Set the pin as an output level low. - - output-high: Set the pin as an output level high. - - microchip,digital: Enable digital I/O. - - microchip,analog: Enable analog I/O. - -Example: - -pic32_pinctrl: pinctrl@1f801400{ - #address-cells = <1>; - #size-cells = <1>; - compatible = "microchip,pic32mzda-pinctrl"; - reg = <0x1f801400 0x400>; - clocks = <&rootclk PB1CLK>; - - pinctrl_uart2: pinctrl_uart2 { - uart2-tx { - pins = "G9"; - function = "U2TX"; - microchip,digital; - output-low; - }; - uart2-rx { - pins = "B0"; - function = "U2RX"; - microchip,digital; - input-enable; - }; - }; -}; - -uart2: serial@1f822200 { - compatible = "microchip,pic32mzda-uart"; - reg = <0x1f822200 0x50>; - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_uart2>; -}; diff --git a/Documentation/devicetree/bindings/pinctrl/microchip,pic32mzda-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/microchip,pic32mzda-pinctrl.yaml new file mode 100644 index 000000000000..8fdbb3ab88f2 --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/microchip,pic32mzda-pinctrl.yaml @@ -0,0 +1,145 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pinctrl/microchip,pic32mzda-pinctrl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Microchip PIC32 Pin Controller + +maintainers: + - Linus Walleij + +description: | + PIC32 pin configuration node is a node of a group of pins which can be used + for a specific device or function. This node represents configurations of + pins, optional function, and optional mux related configuration. + +properties: + compatible: + const: microchip,pic32mzda-pinctrl + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + '#address-cells': + const: 1 + + '#size-cells': + const: 1 + +patternProperties: + '^[a-z0-9]+[_-][a-z0-9_-]*$': + type: object + description: | + Pin configuration node with pin muxing and configuration properties. + Can be either a direct pin configuration node or a container node + with child pin configuration nodes. + + properties: + pins: + description: | + List of pins to which the configuration applies. + items: + type: string + minItems: 1 + + function: true + + bias-pull-up: true + bias-pull-down: true + input-enable: true + output-low: true + output-high: true + + microchip,digital: + description: Enable digital I/O. + type: boolean + + microchip,analog: + description: Enable analog I/O. + type: boolean + + patternProperties: + '^(?!bias-|input-|output-)[a-z0-9]+[_-][a-z0-9_-]*$': + type: object + description: | + Child pin configuration node. + + properties: + pins: + items: + type: string + minItems: 1 + + function: true + + bias-pull-up: true + bias-pull-down: true + input-enable: true + output-low: true + output-high: true + + microchip,digital: + description: Enable digital I/O. + type: boolean + + microchip,analog: + description: Enable analog I/O. + type: boolean + + required: + - pins + + additionalProperties: false + + additionalProperties: false + +required: + - compatible + - reg + - clocks + +additionalProperties: false + +examples: + - | + #include + #include + + pic32_pinctrl: pinctrl@1f801400 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "microchip,pic32mzda-pinctrl"; + reg = <0x1f801400 0x400>; + clocks = <&rootclk PB1CLK>; + + pinctrl_uart2: pinctrl_uart2 { + uart2-tx { + pins = "G9"; + function = "U2TX"; + microchip,digital; + output-low; + }; + + uart2-rx { + pins = "B0"; + function = "U2RX"; + microchip,digital; + input-enable; + }; + }; + }; + + uart2: serial@1f822200 { + compatible = "microchip,pic32mzda-uart"; + reg = <0x1f822200 0x50>; + interrupts = <112 IRQ_TYPE_LEVEL_HIGH>, + <113 IRQ_TYPE_LEVEL_HIGH>, + <114 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&rootclk PB2CLK>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_uart2>; + }; -- 2.34.1