From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sonic307-2.consmr.mail.bf2.yahoo.com (sonic307-2.consmr.mail.bf2.yahoo.com [74.6.134.41]) (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 F07F148E0EA for ; Mon, 12 Oct 2026 14:35:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.6.134.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791815727; cv=none; b=UczWWOqt96yZ+BiAow5bI1sV/vrW+p7U99v9eLdgxo6N0V9IcJLbb2zr7S/7lBlKXpR//0OSoz2i0T+4L+T0urvHhNr5XUAa8sTktqsbvcMfnwnQJHiG7l8I06TPnVqb3O19ajrJ4TZaYB3+0H2LFnW0Sv6b2+SEs8/qFFCaBlM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791815727; c=relaxed/simple; bh=HT0TXwWMj17JblcErkt+7GOKgaMKNsDosmRrGsBJ9wE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:References; b=jdG0XeR3ezamZxoQeHZMsFivxOR/uKgR9dSuPPfTuRTTD4nNoqA7Nel2wYfo149+xTTiDPNKXEGni3BphBr1f8FIcnoP1v7mgKgf+ogR/GxpFDziBfQnrjKcYE+5AiBzNJcynQe6NJCuMbZAVhB31jjp1ewLdni7WLMbImwKBsE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=yahoo.com; spf=pass smtp.mailfrom=yahoo.com; dkim=pass (2048-bit key) header.d=yahoo.com header.i=@yahoo.com header.b=mVG33PqZ; arc=none smtp.client-ip=74.6.134.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=yahoo.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=yahoo.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=yahoo.com header.i=@yahoo.com header.b="mVG33PqZ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1791815718; bh=gCX/LDnnjg5pxVmTukcGyCAsVe2HawPgkJZ36yq3vhg=; h=From:To:Cc:Subject:Date:References:From:Subject:Reply-To; b=mVG33PqZkVQnOXFiLzFB/lVmj2+Es+x2tXhNqFhx7p1Ds1UNifjvgtxj/+w4o5dAHxmUEDzzMsRuuBLc9bC3SyG4XAL240caEc6Mf63dJ96m/M22NLyGwSQPnApDDnNHv3gE5ZmSEjg/XFpiHa4NM+1b85AOajkcW1ouB3z39eFVFa1l/zxzjS/A/X20pbXWZH8YuxZDfWNcszajscPM/vud1IBptna9HnwA7VHUnjmvz6vgiKSQW5vyR+J+6OIXCQlw9t1H5eUTTFVZh19D+xRJnhwWjlQTkpa8G2hlR2L7fqEjRPlV4SL57amNtuWII+AYeUa3ydjg8VzalPpZTw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1791815718; bh=Wo13mhmOSTnhUysfpVMdm53A6a4zT0m0067Dns9QRb4=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=FnxyD4IYFWLV/OefR3XMDBf391oOyJKR6esD+5oLKxeirBYv1isT/r9K6n4T3RVtoOkUU/XMbWGEFe5eJ2ZaFZIrvlVd2bB4nT+0RmgPwI7HvWvGOPIoc72dRxLN22kWA2TNj6rYAD459eOwLndwOU+tt+8vcExYFa//tmYgZps1iB7LG1Qhn3kG5ErIibGq5nZk60skNAJvmX8NYNAcXHgvW4JbJnUcJaUY+vDEc+qDJCVTuRekuxTtuueEMOmgB6th4MO1ukZYgIt6HfN2G0ons5IoS0g1yAvWmfz9s+qDGWtPh6kHvH55Bmg+PmTIX2TwJpfrMAVWMvcW1lZrBg== X-YMail-OSG: NxPO.JEVM1nxbMNGZsNTEO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fPei8X2y1PG kBUOK1.XVnKTW4FkT.0ESkNn7tWXXMjQjMS2N14_Ka0G3eXSnbSE3jWIx4DixYaezI6TN0fZJKmE .AgeZ5jwv_6mfyRry6Q9NKJ6l8KtaGtKiCs81M1_29ic- X-Sonic-MF: X-Sonic-ID: 305669ed-14c4-4448-b4ec-cdc985f800df Received: from sonic.gate.mail.ne1.yahoo.com by sonic307.consmr.mail.bf2.yahoo.com with HTTP; Mon, 12 Oct 2026 14:35:18 +0000 Received: by hermes--production-bf1-6d6877594b-clgz5 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID e251438cb2097fb36b325920ed61dcc7; Mon, 12 Oct 2026 14:03:59 +0000 (UTC) From: Jeremy Dean Clifton To: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-pwm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Jeremy Dean Clifton Subject: [PATCH v3] dt-bindings: pwm: Convert NXP PCA9685 PWM controller to DT schema Date: Mon, 12 Oct 2026 14:03:46 +0000 Message-ID: <20261012140346.3065-1-deaner92@yahoo.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit References: <20261012140346.3065-1-deaner92.ref@yahoo.com> Convert the NXP PCA9685 PWM controller binding to DT schema format. Changes from the text binding: Document the 'reg' property and make it required. It was missing from the text binding, although the example used it and the device cannot work without the I2C address. Rename the example node to the generic 'pwm', as required by pwm.yaml. Describe both cells of the PWM specifier, and state that 'invert' and 'open-drain' apply to all outputs, as per the datasheet (INVRT and OUTDRV bits in MODE2). Assisted-by: LLM Signed-off-by: Jeremy Dean Clifton --- Changes in v3: - Full name in From, Signed-off-by and maintainers. (Jeremy Dean Clifton) v2: https://lore.kernel.org/all/0aabb9f2-a144-4267-b67e-a0972d228f2a@yahoo.com/ though the storage width was widened. - Use the same name in 'maintainers' as in the Signed-off-by. v1: https://lore.kernel.org/all/20261006033518.34332-1-deaner92@yahoo.com/ The schema and commit message were drafted with AI assistant. I verified each property against the driver source, the PCA9685 datasheet and the binding. Passes make dt_binding_check. .../bindings/pwm/nxp,pca9685-pwm.txt | 27 -------- .../bindings/pwm/nxp,pca9685-pwm.yaml | 62 +++++++++++++++++++ 2 files changed, 62 insertions(+), 27 deletions(-) delete mode 100644 Documentation/devicetree/bindings/pwm/nxp,pca9685-pwm.txt create mode 100644 Documentation/devicetree/bindings/pwm/nxp,pca9685-pwm.yaml diff --git a/Documentation/devicetree/bindings/pwm/nxp,pca9685-pwm.txt b/Documentation/devicetree/bindings/pwm/nxp,pca9685-pwm.txt deleted file mode 100644 index f21b55c95738..000000000000 --- a/Documentation/devicetree/bindings/pwm/nxp,pca9685-pwm.txt +++ /dev/null @@ -1,27 +0,0 @@ -NXP PCA9685 16-channel 12-bit PWM LED controller -================================================ - -Required properties: - - compatible: "nxp,pca9685-pwm" - - #pwm-cells: Should be 2. See pwm.yaml in this directory for a description of - the cells format. - The index 16 is the ALLCALL channel, that sets all PWM channels at the same - time. - -Optional properties: - - invert (bool): boolean to enable inverted logic - - open-drain (bool): boolean to configure outputs with open-drain structure; - if omitted use totem-pole structure - -Example: - -For LEDs that are directly connected to the PCA, the following setting is -applicable: - -pca: pca@41 { - compatible = "nxp,pca9685-pwm"; - #pwm-cells = <2>; - reg = <0x41>; - invert; - open-drain; -}; diff --git a/Documentation/devicetree/bindings/pwm/nxp,pca9685-pwm.yaml b/Documentation/devicetree/bindings/pwm/nxp,pca9685-pwm.yaml new file mode 100644 index 000000000000..04d2ddd8f108 --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/nxp,pca9685-pwm.yaml @@ -0,0 +1,62 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pwm/nxp,pca9685-pwm.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP PCA9685 16-channel 12-bit PWM LED controller + +maintainers: + - Jeremy Dean Clifton + +allOf: + - $ref: pwm.yaml# + +properties: + compatible: + const: nxp,pca9685-pwm + + reg: + maxItems: 1 + + "#pwm-cells": + const: 2 + description: + The first cell is the PWM channel index, from 0 to 15, or 16 for the + ALLCALL channel, which sets all PWM channels at the same time. The + second cell is the PWM period in nanoseconds. + + invert: + type: boolean + description: + Invert the logic state of all outputs (INVRT bit in the MODE2 + register). The setting applies to the whole chip, not to individual + channels, and is typically used when the outputs drive an external + driver stage. + + open-drain: + type: boolean + description: + Configure all outputs with an open-drain structure (OUTDRV bit in the + MODE2 register). If omitted, the outputs use a totem-pole structure. + +required: + - compatible + - reg + +unevaluatedProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + pwm@41 { + compatible = "nxp,pca9685-pwm"; + reg = <0x41>; + #pwm-cells = <2>; + invert; + open-drain; + }; + }; base-commit: aac26bee2287c88af5be5a5ff96d783b19a28790 -- 2.43.0