From nobody Sat Oct 4 12:45:48 2025 Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (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 5C3431B3925; Sat, 16 Aug 2025 02:18:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755310703; cv=none; b=Gwxh5TRbhK5QzSXyrGgYvcMxfq1LrcxCZihI6eMvLJEaTGEE+SqvxfHg+6U3by5a49e6eANCP4RTi4WrlxsinDOvk2qH/vZO20hoqlWBRgRyyTzh3wWAeWhn3PvP/RPm0CsfyQM2qtVib6Q2vhG7xpYen/AjhTwphB2lNkgaQ3c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755310703; c=relaxed/simple; bh=EM29FsRGqIxFFvtqqat5TZ+FjW5uguU1/OmrFAhkcJo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Ld31CUQabQvqYTnSlmFO7SaDSxo0CChqj53b764oEIBpVyyafslC4ylF59o2vKvfANSTA3juN2O9uojP2m+Bq1+VSdNUeB3HLIy7KMNb+J/3fvBYWDfQxEOFDWXhLsiWlnsVqHukIHX4AgALFvkO0sFF+K5yHy86643ZiGqczkQ= 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=FZ3TQs8L; arc=none smtp.client-ip=209.85.221.51 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="FZ3TQs8L" Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-3b9dc5c2f0eso1556094f8f.1; Fri, 15 Aug 2025 19:18:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1755310698; x=1755915498; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=dOO0HBYS0opU+SY86AqpGaDJz3ELoTgglgKZi026/yo=; b=FZ3TQs8LS2fC+t0DnCaZTkxEcphuYnU5aTWuFLF9L8tRicAPxlmNLcdL+mYEqlW1xM rq0lz0BvauwBvh8rco8JX+zIbbxIKuPxRaTW0X5r3SfmpAkqo7l5eth29dzTQz5hiS4G jOfw3ECsVwYXg8rFEt9OetpM21bn8oeX6dT1VVHAH5mMcsm0VHlswmTOrr2uBN+ij2ay BEBd8ffn2hijsDRbhvd6FwRb5G7wiajXUlBD8QbvjlYYort8h6VMQhSqsPghOTYimXhL uvXqkLYv3k5pYs2gUFeyx5bR5AJh2N1Q6XOzMEe2B1kGI1cZ+Zb0QajcYIimQLgaM8RO fGIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1755310698; x=1755915498; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dOO0HBYS0opU+SY86AqpGaDJz3ELoTgglgKZi026/yo=; b=oqNWCux/UzPHv883CxuQ3hir9bgPfieSJrriOb7pJVQMgZ3zWeprr/Mh9Mrqogrm08 v7DUZT9uoKDe4kdiVDZaUkNjtxOE2APrGCVWJ35Z9T0xuwKttlycEb2unMcS/tsiRM/p BPlyfSNcX6dyBQaOGcBoLCBxcm5kcrj0vn8ciaaUPTrTzdIpliyb9+3rw6lsg+noAD6g t4m7rx73LjKEiRLkj053wf16ADw6FCSUuwwLyO2lxs8hs1T87StRYar1YpxL2OG+UY/n 8he+kMfHth4x58snjQH9r90T/n817u8zuf0fLJvooX01mfz7GgXd4IBJ9oBEEnCIG41T V1kA== X-Forwarded-Encrypted: i=1; AJvYcCUISSohtgfxuhKzFjGOTWxwwmGKxYO43vcsrJFUuJ1rl+JlSeLRpnj3jY7AtwCESV0zZvIUInKOLdmx@vger.kernel.org, AJvYcCUJl4HiZ2kjnemumN6y9jQg9OXD8kvWTbIKupe2g83QxOYi3GJzAJBGnAXvalRAWFFuYe3p7/tsVVIU@vger.kernel.org, AJvYcCVz+u8XGw66WH1RqmjLzyG9pZ02r+mx+hy9DQV1uTV+dpWbL5YF+tO0K7oDTX0UFKMg2WnZp7E5YNHedFo=@vger.kernel.org, AJvYcCWj8Baq02GXAARvfLkANKX+zpuG1C2j+Ky2UkDoQyMYEwpYx2eYb5Xtw0CoY5M2U+ItOLEgzmwO1aLM@vger.kernel.org, AJvYcCWt8aQd2Q2Ubj2W0QaJYq/kot/YjebaUb/CibRsZyMU83LQlZUQh3jR0kFwCGWGhXpkeXJ7Y5TZr5uZsw==@vger.kernel.org, AJvYcCXDbcTULIqnTvtlrJCjGzJ2mFSqx9FPFRuCn8nmDriS8sGVw+fGI6pmdS0FcNKBLbwDxuAL1+Vfx7v3Yw==@vger.kernel.org, AJvYcCXTr5InERRLjADXoMijt7IN9IeuiN6DpOyZ+MN4tLZnS8A63UwKLFvp56OqG52ph185qTjDuWkSLABDZ7w=@vger.kernel.org X-Gm-Message-State: AOJu0YzvzQ43Q/61P38pMaO6k+XYCmzn5ubIFhOqwdoqhSZmWT584Rxo uCANmUVnvndcGuUf0wv36uLvCqelDZrublXiBWdLTu2JnCIJNiAiAZPmRvE3hnc= X-Gm-Gg: ASbGncuiC74v8V0OF/HK3enDq7/oh/1oulQ45NHkQ0q8hvIMzCT9+9TDaSjnSgYOJiT kVIMwjnFCZ0jXDrHg0F3Fp2YITuh3VU9uZDwdOtTc3UHFaIjfKJxXLb5aIwgDRznsP65ID0fY/z rp7uOT3Gg3i5elk1tYK9fXTvWN7Kf4nohcGGsHxwY8Me6fvS9YAWpjH308wQJPGpvpzZpGV816j mgg7WAfT6uoZfPV5RtbiYxEU+7UEluJW56tpbU6USB35If4TlVQntNIWlmfJBzAY0Ra0A5CvTQp CvTtQ2MdhBY+EQ4wld0fXCSRaQMRLrlK+uOGH8huZHEJmcsNAJqh0ScRGMJ+b9IBoUl0knUxRy0 2d/4LlGBhvxTLhCPKkDui57qlzmCrA3rzlfhW1/0ujgMj3UfTUpN8I9Blxg== X-Google-Smtp-Source: AGHT+IHjs7ef2KeCtD4dRaJIa6kr4DCONO9sMn6dSkdPTJPZjsWUn/7FHMSOW7fJAW/etvtTdmmnPQ== X-Received: by 2002:a05:600c:19d1:b0:43d:9d5:474d with SMTP id 5b1f17b1804b1-45a26e1f0c3mr6172265e9.0.1755310698276; Fri, 15 Aug 2025 19:18:18 -0700 (PDT) Received: from localhost.localdomain ([2a0d:e487:212f:1af8:ee74:5774:2fc2:70a1]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-45a1fe2c019sm58712535e9.17.2025.08.15.19.18.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Aug 2025 19:18:17 -0700 (PDT) From: Jihed Chaibi To: linux-kernel@vger.kernel.org Cc: andreas@kemnade.info, peter.ujfalusi@gmail.com, dmitry.torokhov@gmail.com, robh@kernel.org, krzk+dt@kernel.org, lgirdwood@gmail.com, tiwai@suse.com, conor+dt@kernel.org, lee@kernel.org, ukleinek@kernel.org, broonie@kernel.org, gregkh@linuxfoundation.org, linus.walleij@linaro.org, brgl@bgdev.pl, aaro.koskinen@iki.fi, khilman@baylibre.com, rogerq@kernel.org, tony@atomide.com, linux-gpio@vger.kernel.org, linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-pwm@vger.kernel.org, linux-sound@vger.kernel.org, linux-usb@vger.kernel.org, linux-omap@vger.kernel.org, shuah@kernel.org, jihed.chaibi.dev@gmail.com Subject: [PATCH v3 1/6] dt-bindings: mfd: twl: Add missing sub-nodes for TWL4030 & TWL603x Date: Sat, 16 Aug 2025 04:15:18 +0200 Message-Id: <20250816021523.167049-2-jihed.chaibi.dev@gmail.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250816021523.167049-1-jihed.chaibi.dev@gmail.com> References: <20250816021523.167049-1-jihed.chaibi.dev@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Update the TI TWL family Device Tree binding to include additional subnodes for TWL4030, TWL6030, and TWL6032 devices. The simple power and PWM bindings (ti,twl4030-power, ti,twl-pwm, and ti,twl-pwmled) are now defined directly within this binding. Other child node definitions (audio, gpio, keypad, usb, etc.) are also added to the schema. These additions fix 'unevaluated properties' errors found during dtbs_check for boards like the omap3-beagle and improve the binding's overall completeness. Signed-off-by: Jihed Chaibi --- Changes in v3: - New patch to consolidate simple bindings (power, pwm) and add definitions for all child nodes to fix dtbs_check validation errors found in v2. --- .../devicetree/bindings/mfd/ti,twl.yaml | 191 ++++++++++++++++++ .../devicetree/bindings/mfd/twl4030-power.txt | 48 ----- .../devicetree/bindings/pwm/ti,twl-pwm.txt | 17 -- .../devicetree/bindings/pwm/ti,twl-pwmled.txt | 17 -- 4 files changed, 191 insertions(+), 82 deletions(-) delete mode 100644 Documentation/devicetree/bindings/mfd/twl4030-power.txt delete mode 100644 Documentation/devicetree/bindings/pwm/ti,twl-pwm.txt delete mode 100644 Documentation/devicetree/bindings/pwm/ti,twl-pwmled.txt diff --git a/Documentation/devicetree/bindings/mfd/ti,twl.yaml b/Documentat= ion/devicetree/bindings/mfd/ti,twl.yaml index f162ab60c..b0f1cb7b5 100644 --- a/Documentation/devicetree/bindings/mfd/ti,twl.yaml +++ b/Documentation/devicetree/bindings/mfd/ti,twl.yaml @@ -76,6 +76,98 @@ allOf: properties: compatible: const: ti,twl4030-wdt + + audio: + type: object + $ref: /schemas/sound/ti,twl4030-audio.yaml# + unevaluatedProperties: false + + keypad: + type: object + $ref: /schemas/input/ti,twl4030-keypad.yaml# + unevaluatedProperties: false + + pwm: + type: object + $ref: /schemas/pwm/pwm.yaml# + unevaluatedProperties: false + description: | + TWL4030 series: PWMA and PWMB (connected to LEDA and LEDB term= inals) + properties: + compatible: + enum: + - ti,twl4030-pwm + '#pwm-cells': + const: 2 + required: + - compatible + - '#pwm-cells' + + pwmled: + type: object + $ref: /schemas/pwm/pwm.yaml# + unevaluatedProperties: false + description: | + TWL4030 series: PWMA and PWMB (connected to LEDA and LEDB term= inals) + properties: + compatible: + enum: + - ti,twl4030-pwmled + '#pwm-cells': + const: 2 + required: + - compatible + - '#pwm-cells' + + 'twl4030-usb': + type: object + $ref: /schemas/usb/ti,twlxxxx-usb.yaml# + unevaluatedProperties: false + + gpio: + type: object + $ref: /schemas/gpio/ti,twl4030-gpio.yaml# + unevaluatedProperties: false + + power: + type: object + additionalProperties: false + description: + The power management module inside the TWL4030 provides severa= l facilities + to control the power resources, including power scripts. For n= ow, the + binding only supports the complete shutdown of the system afte= r poweroff. + properties: + compatible: + description: | + The compatible string determines the specific power config= uration. + "ti,twl4030-power": Standard power control. + "ti,twl4030-power-reset": Recommended for OMAP3530 and sim= ilar SoCs + that require a special configuration for warm reset to w= ork correctly. + "ti,twl4030-power-idle": Loads the TI-recommended configur= ation for + idle modes into the PMIC. + "ti,twl4030-power-idle-osc-off": Uses the recommended idle= configuration + but also shuts down the external oscillator. This may no= t work on all + boards depending on the oscillator wiring. + enum: + - ti,twl4030-power + - ti,twl4030-power-reset + - ti,twl4030-power-idle + - ti,twl4030-power-idle-osc-off + + ti,system-power-controller: + type: boolean + deprecated: true + description: | + DEPRECATED. The standard 'system-power-controller' property + on the parent node should be used instead. + + ti,use_poweroff: + type: boolean + deprecated: true + + required: + - compatible + - if: properties: compatible: @@ -115,6 +207,44 @@ allOf: properties: compatible: const: ti,twl6030-gpadc + + pwm: + type: object + $ref: /schemas/pwm/pwm.yaml# + unevaluatedProperties: false + description: | + TWL6030 series: LED PWM (mainly used as charging indicator LED) + properties: + compatible: + enum: + - ti,twl6030-pwm + '#pwm-cells': + const: 2 + required: + - compatible + - '#pwm-cells' + + pwmled: + type: object + $ref: /schemas/pwm/pwm.yaml# + unevaluatedProperties: false + description: | + TWL6030 series: LED PWM (mainly used as charging indicator LED) + properties: + compatible: + enum: + - ti,twl6030-pwmled + '#pwm-cells': + const: 2 + required: + - compatible + - '#pwm-cells' + + 'twl6030-usb': + type: object + $ref: /schemas/usb/ti,twlxxxx-usb.yaml# + unevaluatedProperties: false + - if: properties: compatible: @@ -154,6 +284,43 @@ allOf: compatible: const: ti,twl6032-gpadc =20 + pwm: + type: object + $ref: /schemas/pwm/pwm.yaml# + unevaluatedProperties: false + description: | + TWL6030 series: LED PWM (mainly used as charging indicator LED) + properties: + compatible: + enum: + - ti,twl6030-pwm + '#pwm-cells': + const: 2 + required: + - compatible + - '#pwm-cells' + + pwmled: + type: object + $ref: /schemas/pwm/pwm.yaml# + unevaluatedProperties: false + description: | + TWL6030 series: LED PWM (mainly used as charging indicator LED) + properties: + compatible: + enum: + - ti,twl6030-pwmled + '#pwm-cells': + const: 2 + required: + - compatible + - '#pwm-cells' + + 'twl6030-usb': + type: object + $ref: /schemas/usb/ti,twlxxxx-usb.yaml + unevaluatedProperties: false + properties: compatible: description: @@ -271,6 +438,16 @@ examples: compatible =3D "ti,twl6030-vmmc"; ti,retain-on-reset; }; + + pwm { + compatible =3D "ti,twl6030-pwm"; + #pwm-cells =3D <2>; + }; + + pwmled { + compatible =3D "ti,twl6030-pwmled"; + #pwm-cells =3D <2>; + }; }; }; =20 @@ -325,6 +502,20 @@ examples: watchdog { compatible =3D "ti,twl4030-wdt"; }; + + power { + compatible =3D "ti,twl4030-power"; + }; + + pwm { + compatible =3D "ti,twl4030-pwm"; + #pwm-cells =3D <2>; + }; + + pwmled { + compatible =3D "ti,twl4030-pwmled"; + #pwm-cells =3D <2>; + }; }; }; ... diff --git a/Documentation/devicetree/bindings/mfd/twl4030-power.txt b/Docu= mentation/devicetree/bindings/mfd/twl4030-power.txt deleted file mode 100644 index 3d1996331..000000000 --- a/Documentation/devicetree/bindings/mfd/twl4030-power.txt +++ /dev/null @@ -1,48 +0,0 @@ -Texas Instruments TWL family (twl4030) reset and power management module - -The power management module inside the TWL family provides several facilit= ies -to control the power resources, including power scripts. For now, the -binding only supports the complete shutdown of the system after poweroff. - -Required properties: -- compatible : must be one of the following - "ti,twl4030-power" - "ti,twl4030-power-reset" - "ti,twl4030-power-idle" - "ti,twl4030-power-idle-osc-off" - -The use of ti,twl4030-power-reset is recommended at least on -3530 that needs a special configuration for warm reset to work. - -When using ti,twl4030-power-idle, the TI recommended configuration -for idle modes is loaded to the tlw4030 PMIC. - -When using ti,twl4030-power-idle-osc-off, the TI recommended -configuration is used with the external oscillator being shut -down during off-idle. Note that this does not work on all boards -depending on how the external oscillator is wired. - -Optional properties: - -- ti,system-power-controller: This indicates that TWL4030 is the - power supply master of the system. With this flag, the chip will - initiate an ACTIVE-to-OFF or SLEEP-to-OFF transition when the - system poweroffs. - -- ti,use_poweroff: Deprecated name for ti,system-power-controller - -Example: -&i2c1 { - clock-frequency =3D <2600000>; - - twl: twl@48 { - reg =3D <0x48>; - interrupts =3D <7>; /* SYS_NIRQ cascaded to intc */ - interrupt-parent =3D <&intc>; - - twl_power: power { - compatible =3D "ti,twl4030-power"; - ti,use_poweroff; - }; - }; -}; diff --git a/Documentation/devicetree/bindings/pwm/ti,twl-pwm.txt b/Documen= tation/devicetree/bindings/pwm/ti,twl-pwm.txt deleted file mode 100644 index d97ca1964..000000000 --- a/Documentation/devicetree/bindings/pwm/ti,twl-pwm.txt +++ /dev/null @@ -1,17 +0,0 @@ -Texas Instruments TWL series PWM drivers - -Supported PWMs: -On TWL4030 series: PWM1 and PWM2 -On TWL6030 series: PWM0 and PWM1 - -Required properties: -- compatible: "ti,twl4030-pwm" or "ti,twl6030-pwm" -- #pwm-cells: should be 2. See pwm.yaml in this directory for a descriptio= n of - the cells format. - -Example: - -twl_pwm: pwm { - compatible =3D "ti,twl6030-pwm"; - #pwm-cells =3D <2>; -}; diff --git a/Documentation/devicetree/bindings/pwm/ti,twl-pwmled.txt b/Docu= mentation/devicetree/bindings/pwm/ti,twl-pwmled.txt deleted file mode 100644 index 31ca1b032..000000000 --- a/Documentation/devicetree/bindings/pwm/ti,twl-pwmled.txt +++ /dev/null @@ -1,17 +0,0 @@ -Texas Instruments TWL series PWM drivers connected to LED terminals - -Supported PWMs: -On TWL4030 series: PWMA and PWMB (connected to LEDA and LEDB terminals) -On TWL6030 series: LED PWM (mainly used as charging indicator LED) - -Required properties: -- compatible: "ti,twl4030-pwmled" or "ti,twl6030-pwmled" -- #pwm-cells: should be 2. See pwm.yaml in this directory for a descriptio= n of - the cells format. - -Example: - -twl_pwmled: pwmled { - compatible =3D "ti,twl6030-pwmled"; - #pwm-cells =3D <2>; -}; --=20 2.39.5 From nobody Sat Oct 4 12:45:48 2025 Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) (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 209CB1A76BB; Sat, 16 Aug 2025 02:18:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755310704; cv=none; b=BCdlxtAzY1zfXzTZ33OJK2/jiZML/c1fvPLpoRN30ghGbAyc3zS/rkoxOQ2MrSgH9xRRgMgZLqHep4ljuOr0azT7Fo3KRmDJhV8N+GySPRRyZLDZ1VP7WSxLyFJHaJzVxQenyx13ppyHlWqZul6HzfdtUuJ+vMftgh9n21OXgFE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755310704; c=relaxed/simple; bh=jbZCunKxRmzW54eRdGFMx1EPI04q2ckQbFHtdWw4rVI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=Gartge+ReCqe/A1LB8rnQP97qIourNkS3ZWOv2cXn2PprNuhDrXKhWV85FZ41uzwe+Ly2K1NMyLQ55aO6BdXMcx2iqAksX7n/KlwwD/BNsd+YNQMiu3IStN0gSuPBbfdtMZIz6sp2J5WTEbkXqatJ4h7eFcdtoSK/X89b2wKd14= 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=i/JR2mJg; arc=none smtp.client-ip=209.85.221.43 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="i/JR2mJg" Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-3b9e418ba08so1357653f8f.3; Fri, 15 Aug 2025 19:18:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1755310700; x=1755915500; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=nZN9bP9H+qPp8fpqZRzlhEjRrMc4Qa6tjW94WuAua4I=; b=i/JR2mJgQAXhOqttvwsxQrqkbIORWlTYov+byemXw+DQnPcfadWv+020C8BND8xVqW QEopCYAHoL3ifvHRgNndGc+jlaFky0bYw9al4+4J6xCDEmDvQ5K1w3Le2XXNZEKQh+vd g+jo9s17boyPpOZKhorRPRdZqOJYIz6r9qGJ5tmvfjzC9GtoFWGUqlQqqQwXLChU6p7N weiFoO002xXIta4JU/HhIUPeCXducIuaSJPHH0fDeK09SthW4mW2pmtJmwtmMe6a9RJL ttDsU0dXSpKIQGwYT5LcnbS279M4zP6zvKD1PCJg5ezvgjyE0yi7ubLV2I81PwLHBlqt AesA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1755310700; x=1755915500; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nZN9bP9H+qPp8fpqZRzlhEjRrMc4Qa6tjW94WuAua4I=; b=qT8Eqp3gIUAhRDd/QWi5ynFIFYcjGdvI3uev1Pm5pl8gzrOQiTwLaPRaqNOah1ZMkE +D8gF2DEAhI0CU3fOeLwduBlVuyCqqVlBhuAvh7ltTsQsPTOD4evix/ReHTIN925Ok14 4upICifHMmZ5UG2BDnNpsUBpNE2b1XImD/dWQxuOhyPEIFtMWAKz3vcoHVLQoZ7E6XBb fjgBQV8D6X4zIclE+BwJ5WknZP00gVxEJvEctuZCJvzcknOCO59EHphv3eEEOJbtVmOv mYP70jLmVauTf2USU1hH6zn3zcKRVwJDbbDcn8hIFleGu7BapRivtwnFGgbQ/0dgeX44 igHg== X-Forwarded-Encrypted: i=1; AJvYcCUjyuCSRWlqWpVY+aVlhCZ+RRtn1JZPuwTu8g+og8Pl4Xqq0N6YHh+in6CEX4hvH+8G2uZR8dKPXucx@vger.kernel.org, AJvYcCV1gvVy7/hoCN3c0zjtJQ4a5xkNNUJCKug+D+yq7DzLhXuOFxhnoLkxayOOsJtD670KLF3rrJQGXgZDpw==@vger.kernel.org, AJvYcCVoVvnaHX/K+Th29Id+xXHExtjBLz5Rn23c98c14p5BPkrjk3MKmTOC3FfY0Kl/8DrD3O2O/Y2YCuK+Ij8=@vger.kernel.org, AJvYcCVscW10qr07NKHGoMpk3A5NWaKbItOnbPJQY8mHaJwAOPHIWFBBrA/cDO7+BP0PuqVLlI9cxQM58hkQrL8=@vger.kernel.org, AJvYcCWK+NGqwfEO63eL/2rh5Mxt54RmpluFQCHeGgrOafLZQ6/ER2nPp4VaIuhdt0vKjXBinZ2eBead6DsJ@vger.kernel.org, AJvYcCWRIixgm4MKG9VpFWa6nSMgfWQa/YNiT4M6SWGzsoT3jQE2giTGYs01cr10j/APnHN/1bE4i3FhGzRkWQ==@vger.kernel.org, AJvYcCWw/+f2GlSPuG2SYRu3oBZ24UBJaUWBysKLREIbCnzcgnlgjW8If6ozWtH/pwnr1DIXsYB6lkkTT6D5@vger.kernel.org X-Gm-Message-State: AOJu0YwnWnhFcEaYqhqNwGnJv3HTLxwI6Xjv4OMgZNfY38N5n6p5+Cxe Y+dUVbhm0wnsOzXyFLhVqUuNjdlvcWneAB5LOzPv4Q7xLnT7wRKcIi/fk75DJ+I= X-Gm-Gg: ASbGncu+fFl+GScBhkv6NNtzBa4JjDL+WDZEJrEmlJtGtEphMNP2cxqjZOrguDs5R1R Q9LVkc9p10QiPe9ubwS7ws5knCh8sg61KGooiEJ1wsXqYzFSytqTQPTTJrrWzMD7EfqSKrwQLVx 43woznWDxGlbz8743A9NQpgm7doRItj/a/sO5xT06PzxJUN2SMcND1O4gG9fQ9kvk0O4SEvlmkb ERPpk98mgJn0eL3y8NVugDidxGr46f5NbqfeoAwWDqPfwie3fsvdVb3G299P+tMMmUogyjWEKTV Tdtt+2ee8ja+4BzYZunaNksCI2N0oC9VMAMIpC5fh4G9Ow3L71di+H06eA74iuvz20DGx/Eo2nC lLGNvgnV3kdGtwTKdQw9qA3rZlrj33ACDknlWRf1FAOv2EOw= X-Google-Smtp-Source: AGHT+IGxzqOGpcA9bTZa5RCXTgePA7Ph/aSndBF/AC3QQ3qQ11Ft14TPMYaSW2ATNY28F3G1XC+30A== X-Received: by 2002:a05:600c:c8f:b0:458:c045:ee99 with SMTP id 5b1f17b1804b1-45a26794ce2mr5618795e9.28.1755310699964; Fri, 15 Aug 2025 19:18:19 -0700 (PDT) Received: from localhost.localdomain ([2a0d:e487:212f:1af8:ee74:5774:2fc2:70a1]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-45a1fe2c019sm58712535e9.17.2025.08.15.19.18.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Aug 2025 19:18:19 -0700 (PDT) From: Jihed Chaibi To: linux-kernel@vger.kernel.org Cc: andreas@kemnade.info, peter.ujfalusi@gmail.com, dmitry.torokhov@gmail.com, robh@kernel.org, krzk+dt@kernel.org, lgirdwood@gmail.com, tiwai@suse.com, conor+dt@kernel.org, lee@kernel.org, ukleinek@kernel.org, broonie@kernel.org, gregkh@linuxfoundation.org, linus.walleij@linaro.org, brgl@bgdev.pl, aaro.koskinen@iki.fi, khilman@baylibre.com, rogerq@kernel.org, tony@atomide.com, linux-gpio@vger.kernel.org, linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-pwm@vger.kernel.org, linux-sound@vger.kernel.org, linux-usb@vger.kernel.org, linux-omap@vger.kernel.org, shuah@kernel.org, jihed.chaibi.dev@gmail.com Subject: [PATCH v3 2/6] mfd: dt-bindings: ti,twl4030-audio: convert to DT schema Date: Sat, 16 Aug 2025 04:15:19 +0200 Message-Id: <20250816021523.167049-3-jihed.chaibi.dev@gmail.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250816021523.167049-1-jihed.chaibi.dev@gmail.com> References: <20250816021523.167049-1-jihed.chaibi.dev@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Convert the TWL4030 audio module bindings from txt to YAML format and move them to the sound subsystem bindings directory. This patch also refines the schema by adding an enum constraint for ti,enable-vibra and updates the example to remove irrelevant I2C clock-frequency property. Signed-off-by: Jihed Chaibi --- Changes in v3: - No changes. Changes in v2: - Moved binding from mfd to sound directory. - Added enum: [0, 1] to ti,enable-vibra for stricter validation. - Removed clock-frequency from the example as it=E2=80=99s not relevant to= the binding. - Simplified example by removing unnecessary I2C node properties. --- .../devicetree/bindings/mfd/twl4030-audio.txt | 46 ---------- .../bindings/sound/ti,twl4030-audio.yaml | 90 +++++++++++++++++++ 2 files changed, 90 insertions(+), 46 deletions(-) delete mode 100644 Documentation/devicetree/bindings/mfd/twl4030-audio.txt create mode 100644 Documentation/devicetree/bindings/sound/ti,twl4030-audi= o.yaml diff --git a/Documentation/devicetree/bindings/mfd/twl4030-audio.txt b/Docu= mentation/devicetree/bindings/mfd/twl4030-audio.txt deleted file mode 100644 index 414d2ae0a..000000000 --- a/Documentation/devicetree/bindings/mfd/twl4030-audio.txt +++ /dev/null @@ -1,46 +0,0 @@ -Texas Instruments TWL family (twl4030) audio module - -The audio module inside the TWL family consist of an audio codec and a vib= ra -driver. - -Required properties: -- compatible : must be "ti,twl4030-audio" - -Optional properties, nodes: - -Audio functionality: -- codec { }: Need to be present if the audio functionality is used. Within= this - section the following options can be used: -- ti,digimic_delay: Delay need after enabling the digimic to reduce artifa= cts - from the start of the recorded sample (in ms) --ti,ramp_delay_value: HS ramp delay configuration to reduce pop noise --ti,hs_extmute: Use external mute for HS pop reduction --ti,hs_extmute_gpio: Use external GPIO to control the external mute --ti,offset_cncl_path: Offset cancellation path selection, refer to TRM for= the - valid values. - -Vibra functionality -- ti,enable-vibra: Need to be set to <1> if the vibra functionality is use= d. if - missing or it is 0, the vibra functionality is disabled. - -Example: -&i2c1 { - clock-frequency =3D <2600000>; - - twl: twl@48 { - reg =3D <0x48>; - interrupts =3D <7>; /* SYS_NIRQ cascaded to intc */ - interrupt-parent =3D <&intc>; - - twl_audio: audio { - compatible =3D "ti,twl4030-audio"; - - ti,enable-vibra =3D <1>; - - codec { - ti,ramp_delay_value =3D <3>; - }; - - }; - }; -}; diff --git a/Documentation/devicetree/bindings/sound/ti,twl4030-audio.yaml = b/Documentation/devicetree/bindings/sound/ti,twl4030-audio.yaml new file mode 100644 index 000000000..c9c3f7513 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/ti,twl4030-audio.yaml @@ -0,0 +1,90 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/ti,twl4030-audio.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Texas Instruments TWL4030-family Audio Module + +maintainers: + - Peter Ujfalusi + +description: + The audio module within the TWL4030-family of companion chips consists + of an audio codec and a vibra driver. This binding describes the parent + node for these functions. + +properties: + compatible: + const: ti,twl4030-audio + + codec: + type: object + description: Node containing properties for the audio codec functional= ity. + + properties: + ti,digimic_delay: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Delay in milliseconds after enabling digital microphones to redu= ce + artifacts. + + ti,ramp_delay_value: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Headset ramp delay configuration to reduce pop noise. + + ti,hs_extmute: + type: boolean + description: + Enable the use of an external mute for headset pop reduction. + + ti,hs_extmute_gpio: + $ref: /schemas/types.yaml#/definitions/phandle-array + description: + The GPIO specifier for the external mute control. + maxItems: 1 + + ti,offset_cncl_path: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Offset cancellation path selection. Refer to the Technical + Reference Manual for valid values. + + # The 'codec' node itself is optional, but if it exists, it can be empty. + # We don't require any of its sub-properties. + + ti,enable-vibra: + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [0, 1] + description: + Enable or disable the vibra functionality. + +additionalProperties: false + +required: + - compatible + +examples: + - | + i2c { + #address-cells =3D <1>; + #size-cells =3D <0>; + + twl: twl@48 { + reg =3D <0x48>; + interrupts =3D <7>; /* SYS_NIRQ cascaded to intc */ + interrupt-parent =3D <&intc>; + + twl_audio: audio { + compatible =3D "ti,twl4030-audio"; + + ti,enable-vibra =3D <1>; + + codec { + ti,ramp_delay_value =3D <3>; + }; + + }; + }; + }; --=20 2.39.5 From nobody Sat Oct 4 12:45:48 2025 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.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 B0DF81CAA65; Sat, 16 Aug 2025 02:18:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755310705; cv=none; b=rqWoETP5shXyMuNbQQKpzBBiOlEDy1MHHZwTSx45sGZSVcyuT8V624Tgll2BEvlBOIhlCf01n2OeZstQJqmcs8FQ4LRQ05STXCQjBz8r9b4ZJiwByLQDEaqfol1v9DqYfFInWGWcjdCBPvFxuvoNCp1TGhor94OdZzeUgekLKT0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755310705; c=relaxed/simple; bh=tzbURwJlE4sv3qsrae+WruTMwS+zOGlsmhWYYQO/3dE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=s1d5TRBLq/TNCbw9oTmwyX9RyhkQkjoqcED5KLUmM49STluqfvzPCOfm0OOb5V0UtA8/JNgYqCHWCfV4uT2gISF1MKBkDWfLmKN258Oe5WTFXnPo/6SLofDtBZpEJ426AQ31skGSseO3zXg9y/tBUxvJJMcam+XfZdqmhuYka8Q= 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=H4CVDg1H; arc=none smtp.client-ip=209.85.128.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="H4CVDg1H" Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-45a1b05a59fso16452775e9.1; Fri, 15 Aug 2025 19:18:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1755310702; x=1755915502; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=uGIyJ0TCKzvsKaDMmUW3Wdsvfi8CtjWi28UHZHisKpg=; b=H4CVDg1H8elpcQMuHfn2ZHdfjQ+yE3m/zRB8tfIWtJuKTrOBI+6DqGDMzYeMIvnOZ9 5LLp25XrLxHDlHqCNPjrHWDeSpMycz1GqPLOC5jkp1zARr6yA6bM8ARE8S3MqHjxnNvN YbtXOg9XndWsh4mlpzC7ERb3ZdJtPys7APAyP75PmzFyyLOG0pI6Se64mEmTdktYsZl8 O2PPdbfJtHXziqhNaXcEAENoiqfxw9oIVc3DmcK9IWBQP3rIN9vQTQ73JLxgZOqsj1Zg BK3w73oDDSNrhjJQjOMqES7bfGvT8tOqpBnxNudqNgfJM9fKOaD0FwTW+7Xwkwqwo9vN bHOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1755310702; x=1755915502; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uGIyJ0TCKzvsKaDMmUW3Wdsvfi8CtjWi28UHZHisKpg=; b=lFCrHWOZ0ZiT+pZQ/Uso1SToCo20iQd3lNae0oTzgN6QnQ6LbgeXzZlXVPNVkMTxNb Bpyvb3MSlhEBJTlkbCteVrgIPwjNrBVMjNBU9tVsHrjbuGN6bFq24Xd9M9Ran/ArKHYp bld8d6tvr3Zqa2yRLRXtbFYnIdbTiDg2+Dx67Gk9MgNcD0xGIZeUNvMMjeEwqeh5HYd3 wpUDN4GVEcYFRPr70ENlFIavR7eDAK+0QCFOhB+mBRqcjJEsXlZL5I6+EuDbbkkzVt2w c7tRGr85HMu6lLRmRP5QIRkOzrTTOos1cKbmphnvDeR/IpOl26irDx5Qmq++8PRuhEBl 9cpA== X-Forwarded-Encrypted: i=1; AJvYcCUOLcbP5gl1Aj1H4y6wD1WTRxr8FaTV2nxLFiFia8+MG3vWSgtGA6WaHWf7ZG9UX9rxhBLwOFsMh5mdPA==@vger.kernel.org, AJvYcCUW32tx/EfXneAntT10ddSS797LUku4LgWaJxgaJD8NO6DLUmTcUQQHS4dBK6HEh7AcaVV+Y0k4fMa9@vger.kernel.org, AJvYcCUslA+7/tCHO2aIHZNxyqtcg2p2fcrySzBZn8gaj8r20d1ZH6Zz4RkkJMjxHSaewWV3RvxBwUrIlRzi@vger.kernel.org, AJvYcCVeq5QJgAg3YtvgaN65thVDn4CsC6PIVRzKZ7xiEEcXPAPveU+3HgIU3l/FBS9Kjhedafq+an0feP89U1M=@vger.kernel.org, AJvYcCWLXrIIjs2M/GaHXDwujdB6xpqlPS4u5h3+/UdekJFn9UVYDGw8HtvnkThPQgEGGyYiuMf+XajVGY7ljg==@vger.kernel.org, AJvYcCWuAPWlwQdo+bQdLWcqZ+Qw/Y4jDM8iUKARhzAF/ajjMNepvq4SH/IEsJvSU+N7nI78clH3eAZ3t63T5tk=@vger.kernel.org, AJvYcCXiZh+s7dGHFgxupIbPtJNVFuhzqHa0ic7EH/T4un7zbIIALEnkZZL8o0ATGgcIiBc2U91fKJlSBPQQ@vger.kernel.org X-Gm-Message-State: AOJu0YzWXKBZZAghTcuStyvftoohqKoeFa1NZwA8OJwF3ezxmmDD3p/a 0uyZSgqfNY2M3hpp59IRaAfFmKqcEENFPdghfipR2WAK9YY9MGTdVw3k/gw7Ars= X-Gm-Gg: ASbGnctgxnZhsha8bPLGs3IHUzFplivjPX4MWNPYe9f87nsX10PyraQUyd6ETlZj+lF tH2cj/zngPIoC7KFkNwBFKgGrFm7ilQVBeanzmnc1AiHunxFHt5Kt7iDFBZ4H3rmOyfvCS+g7Ig u2JzH20OqNZpeIzjqrXm4p0YBbFnEh+9s817SvBtkNC6Ny4vBqmxL/SOQb5O/LaZ3iYtI6TpurU 9RtFQv83hdEBUy+/V9OaBsyRO2uvIDATtI1c6PZYFEyC6Jxu3vmKNw0qMRtexGM77DZzM7NbdyR CrwX108jwMNLe6iJyaRLuK1Fb9C4X6xXSPz1OMteHAP7OOMVHfzk0OKRhY5dlGQMeFHOuO6KjRM lN7PHOor+RfBCOprdaS2Z4DS2TxH0kBt5em7vxqhcGgBaUHw= X-Google-Smtp-Source: AGHT+IEne0jj9qlJaGNIVJ3iI9oeGSARVy+s4LjvS+VakdEpY2SsAdktmDdjFPHvfEFebR7AOFYRAA== X-Received: by 2002:a05:600c:4f4c:b0:458:a992:6f1e with SMTP id 5b1f17b1804b1-45a27151275mr4507915e9.5.1755310701636; Fri, 15 Aug 2025 19:18:21 -0700 (PDT) Received: from localhost.localdomain ([2a0d:e487:212f:1af8:ee74:5774:2fc2:70a1]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-45a1fe2c019sm58712535e9.17.2025.08.15.19.18.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Aug 2025 19:18:21 -0700 (PDT) From: Jihed Chaibi To: linux-kernel@vger.kernel.org Cc: andreas@kemnade.info, peter.ujfalusi@gmail.com, dmitry.torokhov@gmail.com, robh@kernel.org, krzk+dt@kernel.org, lgirdwood@gmail.com, tiwai@suse.com, conor+dt@kernel.org, lee@kernel.org, ukleinek@kernel.org, broonie@kernel.org, gregkh@linuxfoundation.org, linus.walleij@linaro.org, brgl@bgdev.pl, aaro.koskinen@iki.fi, khilman@baylibre.com, rogerq@kernel.org, tony@atomide.com, linux-gpio@vger.kernel.org, linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-pwm@vger.kernel.org, linux-sound@vger.kernel.org, linux-usb@vger.kernel.org, linux-omap@vger.kernel.org, shuah@kernel.org, jihed.chaibi.dev@gmail.com Subject: [PATCH v3 3/6] input: dt-bindings: ti,twl4030-keypad: convert to DT schema Date: Sat, 16 Aug 2025 04:15:20 +0200 Message-Id: <20250816021523.167049-4-jihed.chaibi.dev@gmail.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250816021523.167049-1-jihed.chaibi.dev@gmail.com> References: <20250816021523.167049-1-jihed.chaibi.dev@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Convert the legacy TXT binding for the TWL4030 keypad module to the modern YAML DT schema format. This adds formal validation and improves documentation by inheriting from the matrix-keymap schema. Signed-off-by: Jihed Chaibi --- Changes in v3: - Made 'linux,keymap' a required property as suggested by the reviewer. Changes in v2: - Simplified the description field by removing redundant '|' as it does not affect formatting in this context. --- .../bindings/input/ti,twl4030-keypad.yaml | 59 +++++++++++++++++++ .../bindings/input/twl4030-keypad.txt | 27 --------- 2 files changed, 59 insertions(+), 27 deletions(-) create mode 100644 Documentation/devicetree/bindings/input/ti,twl4030-keyp= ad.yaml delete mode 100644 Documentation/devicetree/bindings/input/twl4030-keypad.= txt diff --git a/Documentation/devicetree/bindings/input/ti,twl4030-keypad.yaml= b/Documentation/devicetree/bindings/input/ti,twl4030-keypad.yaml new file mode 100644 index 000000000..c69aa7f5c --- /dev/null +++ b/Documentation/devicetree/bindings/input/ti,twl4030-keypad.yaml @@ -0,0 +1,59 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/input/ti,twl4030-keypad.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Texas Instruments TWL4030-family Keypad Controller + +maintainers: + - Peter Ujfalusi + +description: + TWL4030's Keypad controller is used to interface a SoC with a matrix-type + keypad device. The keypad controller supports multiple row and column li= nes. + A key can be placed at each intersection of a unique row and a unique co= lumn. + The keypad controller can sense a key-press and key-release and report t= he + event using a interrupt to the cpu. + +allOf: + - $ref: matrix-keymap.yaml# + +properties: + compatible: + const: ti,twl4030-keypad + + interrupts: + maxItems: 1 + +required: + - compatible + - interrupts + - keypad,num-rows + - keypad,num-columns + - linux,keymap + +unevaluatedProperties: false + +examples: + - | + #include + + keypad { + compatible =3D "ti,twl4030-keypad"; + interrupts =3D <1>; + keypad,num-rows =3D <8>; + keypad,num-columns =3D <8>; + linux,keymap =3D < + /* row 0 */ + MATRIX_KEY(0, 0, KEY_1) + MATRIX_KEY(0, 1, KEY_2) + MATRIX_KEY(0, 2, KEY_3) + + /* ...and so on for a full 8x8 matrix... */ + + /* row 7 */ + MATRIX_KEY(7, 6, KEY_Y) + MATRIX_KEY(7, 7, KEY_Z) + >; + }; diff --git a/Documentation/devicetree/bindings/input/twl4030-keypad.txt b/D= ocumentation/devicetree/bindings/input/twl4030-keypad.txt deleted file mode 100644 index e4be2f76a..000000000 --- a/Documentation/devicetree/bindings/input/twl4030-keypad.txt +++ /dev/null @@ -1,27 +0,0 @@ -* TWL4030's Keypad Controller device tree bindings - -TWL4030's Keypad controller is used to interface a SoC with a matrix-type -keypad device. The keypad controller supports multiple row and column line= s. -A key can be placed at each intersection of a unique row and a unique colu= mn. -The keypad controller can sense a key-press and key-release and report the -event using a interrupt to the cpu. - -This binding is based on the matrix-keymap binding with the following -changes: - - * keypad,num-rows and keypad,num-columns are required. - -Required SoC Specific Properties: -- compatible: should be one of the following - - "ti,twl4030-keypad": For controllers compatible with twl4030 keypad - controller. -- interrupt: should be one of the following - - <1>: For controllers compatible with twl4030 keypad controller. - -Example: - twl_keypad: keypad { - compatible =3D "ti,twl4030-keypad"; - interrupts =3D <1>; - keypad,num-rows =3D <8>; - keypad,num-columns =3D <8>; - }; --=20 2.39.5 From nobody Sat Oct 4 12:45:48 2025 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (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 7BA921DE4C9; Sat, 16 Aug 2025 02:18:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755310707; cv=none; b=DoR9fp066p4tBe+DxKdu3U270O8VGegng1oNnBIqHu3GhipNC52e78zY0epvMbKqEQveeH2Evzdo/zsEOJbo4z/W3kTkw5BlPNKg8kvLraPQASmitueYlIcz/gvf6yQ2KFyidne2UWmsB9+CYhP5E7uqGGGEremMYY77Em9/+Zc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755310707; c=relaxed/simple; bh=jkO8p+3zOrzC2yaGP5yQflX4JgF012QEpQkuYa/TkzI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=soUWdYcN6bvdOtjHyleQdqw141o0BCrkNTugTPLl7IcehBoQkN6LvX2uBCw1KrLRQpAHlp8vZCAQxyIQcgsz1rTgSGyxVERLigWxLVixGFX5RrvetLTQaCBmRiUDALSQ921bScb9Yktewquu+WvLNMjiIDxZpPqoC7BsDlVx42A= 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=PzAbd55k; arc=none smtp.client-ip=209.85.128.43 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="PzAbd55k" Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-45a1b0c82eeso17984535e9.3; Fri, 15 Aug 2025 19:18:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1755310703; x=1755915503; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=gjtdgClxqAryqHymCU6m/Gc+SPOzF3E/t04HFbVAGPs=; b=PzAbd55kOJhQmSIsWMHRvVYq+Zsk2RAvGL8+GgVEOK8uEiFnAns4ceVnE3W2jumMH8 LlKxqmBJkjgZb0mgRoXwHaHFUQ1HIr/hP+72FAl7HIYU4LXIheIRla3MLB8Om8IacCA+ zZI5kpqChI+UTV3hoem/0l/k6kC4HwRpIy3W2jTVK/AtohvUbH8Gr0wVGVnN7uuUkCJJ cO26a/QXHlOcXyJpP/LNnpwSLbb08jaInsEt6xx9WhqKHk/xXS19zcuFYpPLuEm1VGm4 wokXm99qHD3BSEfDLr8a9Kpbuek+aWeEf0c9OiYmbQy0fP1e/TjARPC+Xix1/qK1Q9xk xolg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1755310703; x=1755915503; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gjtdgClxqAryqHymCU6m/Gc+SPOzF3E/t04HFbVAGPs=; b=X3aVEck6jNsrXh4/wO7B7ug0DZq7oxsUzMJKAmDlnUy+1Bc9amuc2HpE6kz8xIK7gK E4eK7M5eic/sYP83z045QqUO+VNp7MFIp5vFFCf8P+QchDCMx72r3w4TPnymYT5lMrS1 brkBRfX7p6Tf/U0j1afW9dQ05zhaz0JsKb3gVBVfEh4l3Gt3Pcvq42hnik7SoamZbWE8 Upihj9SMA8Pi9mKonyljsTjM4L1xIMyALWbSDXEPP97wXjpPRtNT+oiMg4EzuzDUuMaj T8Zlrvi8qmhgzSOxS2VvcC+u4mp8/XzFN8vZc6d/Yk30AvfbIhvTkOjUto0KtotlebwD 3dzw== X-Forwarded-Encrypted: i=1; AJvYcCUL3xmvUrwiTZ6sC5RC9+hBYbC/webW/taew6ciT8qSVcULKwwVnX2NHYwT8eCsYmeIbKJ7/Hn6bXrHYg==@vger.kernel.org, AJvYcCUWXdryezWKWuomn/Pt2MyXWIiOoc6uTSQIF6XPjTNB44w3K17agmNMpYhBQY+FfQc94sLC91p2tF6g@vger.kernel.org, AJvYcCW/Sbp74B4crCsKgPwwwfphcoY49Y3yo07rYyH9cvdRZQ8Tor0JtJJzCNGD4+hP/rQNrBzUN/P41umWUg==@vger.kernel.org, AJvYcCXNF+rh3HD7ktLmFk41uPKwB2L70IiYBXv/CFcwtLERHCL8qqI3zmPBC57Rn+w9TPsOYtHMPlHT4Hf2@vger.kernel.org, AJvYcCXQDG7jFFVr3ssjZiH08PFZPgdzsE1ipc/VMPPOYp+vAe83cl6t791JmrSSGHE6x5FzAwY9Jfq7EnoX@vger.kernel.org, AJvYcCXjsWxQm9jgPawZaG0hhAXiQVhyN/kJBmlI9br0qH5IrLGi6kdsJFYxz4Iu2HBHmBo/fbfRRZOy28YGBbU=@vger.kernel.org, AJvYcCXyQNyZhxbAf/Nw0r5R58jeLjhaUHxjvLM4vWLkHE8uL0Kc5GKzgVU2kpJAPoniMIE3IbfVJiekN2hLPTY=@vger.kernel.org X-Gm-Message-State: AOJu0YwSRFyjehEhx69WpgUjlT72dHnqwIkDNPgZCGOzKZjUxDfhxJob MxoGs6z1jxjNOJ1ie76ZVPJs40+U4ub7g3vDlB9ubJ+TTuEfzqmFuw2HR3piGGs= X-Gm-Gg: ASbGnctpHH9mMsaV8k5x0mSKnzjQm+/WNvvliBTnrqeTG4H1/4Zd3eXgRFcwSUj6b0N GJxNNX2Jo6OsGPL5CU9+LNvKlbNtlf9wH9se6hM5HQkPROZTxFYfeyb5PcWRUvcTpGmyFZ8Qt39 4U4tXoJF8OxtTlxVfcyyDIYvrXJfVjmflIxwCm+o5n+SgzKGfwI9lhGXiPLHCRtfeI/Hdvnw5DG juIvp9t79/7Z41zMvfDS2Ev9bXSxaqCxHDbWFzqyueUxHSY1yBvhWwFsucs6WVHrtADbfNF6Znd 94+HkPAkd/dhu+6tvX7PW+KcLGUQHbry0jA8IRYrP6WYTBp+m0dyEmuCtOC47GbYcAAwnYU33bO tBmG1UCdoJV7xOfhzTNF7UuPtYXUMj6mKyemr0wqVup9jdLQ= X-Google-Smtp-Source: AGHT+IEDpwyX1ziaBMwO3Ayd4p94N1AgBI3i3qn7uRV2GGOlAxLv2zqLhXSoifjqb3glF8hmwrsfLg== X-Received: by 2002:a05:600c:19d1:b0:459:d709:e5d4 with SMTP id 5b1f17b1804b1-45a26e1f0cemr6380985e9.0.1755310703376; Fri, 15 Aug 2025 19:18:23 -0700 (PDT) Received: from localhost.localdomain ([2a0d:e487:212f:1af8:ee74:5774:2fc2:70a1]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-45a1fe2c019sm58712535e9.17.2025.08.15.19.18.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Aug 2025 19:18:22 -0700 (PDT) From: Jihed Chaibi To: linux-kernel@vger.kernel.org Cc: andreas@kemnade.info, peter.ujfalusi@gmail.com, dmitry.torokhov@gmail.com, robh@kernel.org, krzk+dt@kernel.org, lgirdwood@gmail.com, tiwai@suse.com, conor+dt@kernel.org, lee@kernel.org, ukleinek@kernel.org, broonie@kernel.org, gregkh@linuxfoundation.org, linus.walleij@linaro.org, brgl@bgdev.pl, aaro.koskinen@iki.fi, khilman@baylibre.com, rogerq@kernel.org, tony@atomide.com, linux-gpio@vger.kernel.org, linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-pwm@vger.kernel.org, linux-sound@vger.kernel.org, linux-usb@vger.kernel.org, linux-omap@vger.kernel.org, shuah@kernel.org, jihed.chaibi.dev@gmail.com Subject: [PATCH v3 4/6] ASoC: dt-bindings: omap-twl4030: convert to DT schema Date: Sat, 16 Aug 2025 04:15:21 +0200 Message-Id: <20250816021523.167049-5-jihed.chaibi.dev@gmail.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250816021523.167049-1-jihed.chaibi.dev@gmail.com> References: <20250816021523.167049-1-jihed.chaibi.dev@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Convert the legacy TXT binding for the OMAP TWL4030 sound card to the modern YAML DT schema format. This adds formal validation and improves documentation. Acked-by: Mark Brown Signed-off-by: Jihed Chaibi --- Changes in v3: - No change to binding content, only updating commit message format. Changes in v2: - Fixed comment formatting (added spaces for better alignment). - Updated commit subject to align with subsystem style. - Retained Acked-by from v1 as changes are cosmetic. --- .../bindings/sound/omap-twl4030.txt | 62 ----------- .../bindings/sound/ti,omap-twl4030.yaml | 102 ++++++++++++++++++ 2 files changed, 102 insertions(+), 62 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/omap-twl4030.txt create mode 100644 Documentation/devicetree/bindings/sound/ti,omap-twl4030= .yaml diff --git a/Documentation/devicetree/bindings/sound/omap-twl4030.txt b/Doc= umentation/devicetree/bindings/sound/omap-twl4030.txt deleted file mode 100644 index f6a715e4e..000000000 --- a/Documentation/devicetree/bindings/sound/omap-twl4030.txt +++ /dev/null @@ -1,62 +0,0 @@ -* Texas Instruments SoC with twl4030 based audio setups - -Required properties: -- compatible: "ti,omap-twl4030" -- ti,model: Name of the sound card (for example "omap3beagle") -- ti,mcbsp: phandle for the McBSP node - -Optional properties: -- ti,codec: phandle for the twl4030 audio node -- ti,mcbsp-voice: phandle for the McBSP node connected to the voice port o= f twl -- ti, jack-det-gpio: Jack detect GPIO -- ti,audio-routing: List of connections between audio components. - Each entry is a pair of strings, the first being the connection's sink, - the second being the connection's source. - If the routing is not provided all possible connection will be available - -Available audio endpoints for the audio-routing table: - -Board connectors: - * Headset Stereophone - * Earpiece Spk - * Handsfree Spk - * Ext Spk - * Main Mic - * Sub Mic - * Headset Mic - * Carkit Mic - * Digital0 Mic - * Digital1 Mic - * Line In - -twl4030 pins: - * HSOL - * HSOR - * EARPIECE - * HFL - * HFR - * PREDRIVEL - * PREDRIVER - * CARKITL - * CARKITR - * MAINMIC - * SUBMIC - * HSMIC - * DIGIMIC0 - * DIGIMIC1 - * CARKITMIC - * AUXL - * AUXR - - * Headset Mic Bias - * Mic Bias 1 /* Used for Main Mic or Digimic0 */ - * Mic Bias 2 /* Used for Sub Mic or Digimic1 */ - -Example: - -sound { - compatible =3D "ti,omap-twl4030"; - ti,model =3D "omap3beagle"; - - ti,mcbsp =3D <&mcbsp2>; -}; diff --git a/Documentation/devicetree/bindings/sound/ti,omap-twl4030.yaml b= /Documentation/devicetree/bindings/sound/ti,omap-twl4030.yaml new file mode 100644 index 000000000..7c9371860 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/ti,omap-twl4030.yaml @@ -0,0 +1,102 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/ti,omap-twl4030.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Texas Instruments SoC with twl4030 based audio setups + +maintainers: + - Peter Ujfalusi + +description: + Bindings for audio setups on TI OMAP SoCs using TWL4030-family audio + codec connected via a McBSP port. + +properties: + compatible: + const: ti,omap-twl4030 + + ti,model: + $ref: /schemas/types.yaml#/definitions/string + description: Name of the sound card (for example "omap3beagle"). + + ti,mcbsp: + $ref: /schemas/types.yaml#/definitions/phandle + description: phandle for the McBSP node. + + ti,codec: + $ref: /schemas/types.yaml#/definitions/phandle + description: phandle for the twl4030 audio node. + + ti,mcbsp-voice: + $ref: /schemas/types.yaml#/definitions/phandle + description: phandle to the McBSP node connected to the voice port. + + ti,jack-det-gpio: + description: GPIO specifier for jack detection. + maxItems: 1 + + ti,audio-routing: + description: | + A list of audio routing connections. Each entry is a pair of strings, + with the first being the connection's sink and the second being the + source. If not provided, all possible connections are available. + + Available TWL4030 Pins: "HFL", "HFR", + "PREDRIVEL", "PREDRIVER", "CARKITL", "CARKITR", "MAINMIC", "SUBMIC= ", + "HSMIC", "DIGIMIC0", "DIGIMIC1", "CARKITMIC", "AUXL", "AUXR", + "Headset Mic Bias", "Mic Bias 1", "Mic Bias 2" + $ref: /schemas/types.yaml#/definitions/non-unique-string-array + items: + enum: + # Board Connectors + - Headset Stereophone + - Earpiece Spk + - Handsfree Spk + - Ext Spk + - Main Mic + - Sub Mic + - Headset Mic + - Carkit Mic + - Digital0 Mic + - Digital1 Mic + - Line In + + # CODEC Pins + - HSOL + - HSOR + - EARPIECE + - HFL + - HFR + - PREDRIVEL + - PREDRIVER + - CARKITL + - CARKITR + - MAINMIC + - SUBMIC + - HSMIC + - DIGIMIC0 + - DIGIMIC1 + - CARKITMIC + - AUXL + - AUXR + + # Headset Mic Bias + - Mic Bias 1 # Used for Main Mic or Digimic0 + - Mic Bias 2 # Used for Sub Mic or Digimic1 + +required: + - compatible + - ti,model + - ti,mcbsp + +additionalProperties: false + +examples: + - | + sound { + compatible =3D "ti,omap-twl4030"; + ti,model =3D "omap3beagle"; + ti,mcbsp =3D <&mcbsp2>; + }; --=20 2.39.5 From nobody Sat Oct 4 12:45:48 2025 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.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 444B279EA; Sat, 16 Aug 2025 02:18:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755310710; cv=none; b=FXWPcWEj962B8OzT0fHQooPMcOBPjkrFq1tVI07yn+VnNepvY11dROZ0TUtSqj9qMgtzc/1M942D99GMaxwKSvKFvq5LlbUXVRZ01O6e2LpHgrRoLVwaamd1dhYRghhZq+arWb6ozBponeZGu5spaaZvBhrd5xVW9DxUmeCbboU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755310710; c=relaxed/simple; bh=iG8hiwI6gZFIs3EG+bpt/RDjTe4KOFgc/1QMQJQO4eQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=FA30m+nDwT+QrvIeSXD8NBCZznizt4KNaxT8x6h8HMPON00OgacySLKShfV6y+6M7M02VuDjB3HyhDmtCHEOCVT+Xw+TXAKUIMUELuE0NEoJo3T890o5q6F1JM2vEnUVXzaYfI6BtUTEOfv4zVsBe90pXzBOMtmxo0wKtypjbJQ= 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=WP57p5Wo; arc=none smtp.client-ip=209.85.128.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="WP57p5Wo" Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-45a1b0cd668so12126855e9.3; Fri, 15 Aug 2025 19:18:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1755310706; x=1755915506; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ze4O4MOWswAI5XJ71bJqUM7LZAiKSco1sWC6EZAZ50I=; b=WP57p5Wocvgjk63BINKEkg07+nGFdS0PC8SI/z+zuuj/gmIh9u4CS8j9E23L5vr9Dj c+77bL8QotoLkQcK/7vWxaZtecbEJCmv4/IEVOMniI8UgZGlDN30d0WV6lHxLjTQiOgh bJwbinIZadKTjSavqt0MzvbRKqVNHtURb9siWYFvF/lL3KU11GUoT4n9KvKokxynpTwV 1cOzo0xPXHzmIxkK7EErUKQ8GxOKtlTKBII5ZfXfHZauTP1rX2Qd0Nyea/EkQXD1ZrzU GgAzNh5o5HOsdhjvT5bq9Wcz8cyBOP234kmokGaN4hN6a6/cRpv1BN73qsY5OivqTdho Ar2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1755310706; x=1755915506; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ze4O4MOWswAI5XJ71bJqUM7LZAiKSco1sWC6EZAZ50I=; b=IAJ/sMH+r7UxZ/keckVVtwbDrLnwXOm7NlMPfEMg32kSGRJ+jgHb03QGOLoPZkNGJ5 1zOFco4OnOz3GiOCoY57rQJ5KbV3Ww/D5baSuSlLW90PVFhwHeAqp+TJ1qicRUGpT3Ec fEBG6WdyAvAEjBkceNKjxO+OsH39dP1r6gS156cC9FqLijrsfntXYB1KFGKpT9W+JasC bFIeE9iDaKeIQ7CVs292OXgqIQA0uC6taMlHcGPwm47O8jPWUhXfqOKrA2F2HZWru+nK X9k7OECvbCS9bRZUY7QqYW45q2izeBm3PTazFTvP8ovC9Upy085iXEWDbUZ31FdM8Trh QjZQ== X-Forwarded-Encrypted: i=1; AJvYcCUFSNnTOwN3Xm9tFYUVTBpzqVSqNDt0hoYUzUEyal/GImnkSS8hgJoD9E52MbW6N42nBPI/T75Ugx0i5A==@vger.kernel.org, AJvYcCUK7ukhqV56byFB9xNQNDNTDy5v4kAxjgjUD+DS5KS3NdV68GxhHC4wb04jlknR4HdLZXppuMUW4wJ7@vger.kernel.org, AJvYcCUuputP+YJLSnhzmH3hJcilW3h+8XTS9Cl+HCdCFfapH8laE59MscEDDip8o+NFv3z8uFPQ2ZP5J1j6nA==@vger.kernel.org, AJvYcCV76CdAqpgGBPU0S0ZEvRTAvIMClug0Z81IlXbY0pm5UEcxjxsRVRftAuRlddDus95m9jkA6kxheW1qe6A=@vger.kernel.org, AJvYcCWAr7KYcWVw2VeHC/szsFCFnMyLOxIBCYRoDkqrkGwJrbKhQp+qFenQpVNRSEME8qkfXymcuxWTcIV/@vger.kernel.org, AJvYcCX0qve5FF2JsUEytXXtu0xvXpcjCMvY9Ee2HDumKGFEvjHKXYvMO0VKd+L7XcLXU1vBzE2hWyOlGwcqtz8=@vger.kernel.org, AJvYcCXGiCP2YOg7tmuUzjTVm7IfvJMH2TO1KuKsWBQNV1j+zEuUN7t43e0th6xUpKP7I5SQwuYlCGriGHeW@vger.kernel.org X-Gm-Message-State: AOJu0Yy2pv9eujNSSp8cUSRXdUHHiqW+4/aWO5XBqHEb/Nm2DY0vmD3p oMhnYEHiLxNKDQuQu3lb44BjfpdQbgIMp7hglQrUGiGPH9GMYgbQAxd1+q5xzRA= X-Gm-Gg: ASbGncsg6QGA63me4GOIvg43PqfaDE3Ei7kC7xn8dv2LIIO6GkAL9QPygaic+KLcWth d/E9uxWDzCzYM6RJDYgX1RfmccD/OXeM+TNg+VQFBd2QB4+cDV7HfdwBTY9hKVuzVwKyBlqQQIJ Y1hjp9Z4B26bQaEM83CdMmI7GN4a5I+X6v0oogAcneXOcE01js+AfhflbeMmDRHehYTXO9uDJ1S dlivXaYKDMCzqGEWSP0eAjEDJK7MwNRBlZ9P/M60Edc1SzM/VV2lxgJrjQjT9TmeG30V8xzSGJq vo9Hm69d1LPrEFE9yPz7mYBbWXHUAVxnx788oQ19x8k4ITfp9U4WuETzko2LqoRlTO8lmnVctwZ WhKEeFCA63ceR9DUsAsIqaNc4VnPqlo4jh8TVbkpwk+Zm/tw= X-Google-Smtp-Source: AGHT+IEi7+0siAUZLCApuhc6Rc+WC3G3k/Y4w2iMTGWKechJTFfbsY8rLB+Mi5U5QDjSPo0/vPNBow== X-Received: by 2002:a05:600c:198d:b0:459:e094:92cb with SMTP id 5b1f17b1804b1-45a218095eemr33920905e9.12.1755310706082; Fri, 15 Aug 2025 19:18:26 -0700 (PDT) Received: from localhost.localdomain ([2a0d:e487:212f:1af8:ee74:5774:2fc2:70a1]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-45a1fe2c019sm58712535e9.17.2025.08.15.19.18.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Aug 2025 19:18:24 -0700 (PDT) From: Jihed Chaibi To: linux-kernel@vger.kernel.org Cc: andreas@kemnade.info, peter.ujfalusi@gmail.com, dmitry.torokhov@gmail.com, robh@kernel.org, krzk+dt@kernel.org, lgirdwood@gmail.com, tiwai@suse.com, conor+dt@kernel.org, lee@kernel.org, ukleinek@kernel.org, broonie@kernel.org, gregkh@linuxfoundation.org, linus.walleij@linaro.org, brgl@bgdev.pl, aaro.koskinen@iki.fi, khilman@baylibre.com, rogerq@kernel.org, tony@atomide.com, linux-gpio@vger.kernel.org, linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-pwm@vger.kernel.org, linux-sound@vger.kernel.org, linux-usb@vger.kernel.org, linux-omap@vger.kernel.org, shuah@kernel.org, jihed.chaibi.dev@gmail.com Subject: [PATCH v3 5/6] usb: dt-bindings: ti,twlxxxx-usb: convert to DT schema Date: Sat, 16 Aug 2025 04:15:22 +0200 Message-Id: <20250816021523.167049-6-jihed.chaibi.dev@gmail.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250816021523.167049-1-jihed.chaibi.dev@gmail.com> References: <20250816021523.167049-1-jihed.chaibi.dev@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Convert the legacy TXT binding for the TWL4030/6030 USB module to the modern YAML DT schema format. This adds formal validation and improves documentation using a conditional schema. Signed-off-by: Jihed Chaibi --- Changes in v3: - No changes. Changes in v2: - Added '#phy-cells' property to support PHY framework integration. --- .../bindings/usb/ti,twlxxxx-usb.yaml | 125 ++++++++++++++++++ .../devicetree/bindings/usb/twlxxxx-usb.txt | 43 ------ 2 files changed, 125 insertions(+), 43 deletions(-) create mode 100644 Documentation/devicetree/bindings/usb/ti,twlxxxx-usb.ya= ml delete mode 100644 Documentation/devicetree/bindings/usb/twlxxxx-usb.txt diff --git a/Documentation/devicetree/bindings/usb/ti,twlxxxx-usb.yaml b/Do= cumentation/devicetree/bindings/usb/ti,twlxxxx-usb.yaml new file mode 100644 index 000000000..48ff5b732 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/ti,twlxxxx-usb.yaml @@ -0,0 +1,125 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/ti,twlxxxx-usb.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Texas Instruments TWL4030/6030 USB PHY and Comparator + +maintainers: + - Peter Ujfalusi + +description: | + Bindings for the USB PHY and comparator module found within the + TWL4030 and TWL6030 family of companion chips. + + TWL6030: USB COMPARATOR + TWL4030: USB COMPARATOR & PHY + + If a sibling node is compatible with "ti,twl4030-bci", the driver for + that node will query this device for USB power status. + +properties: + compatible: + enum: + - ti,twl4030-usb + - ti,twl6030-usb + + interrupts: + description: | + Interrupts for ID and VBUS events. + For "ti,twl6030-usb", two interrupts must be specified: + - The first is the OTG interrupt for ID events (host mode). + - The second is the USB interrupt for VBUS events (device mode). + For "ti,twl4030-usb", one or two interrupts can be specified: + - The first is the OTG interrupt for both ID and VBUS events. + - The second is optional. + minItems: 1 + maxItems: 2 + + usb-supply: + description: + Phandle to the VUSB regulator. For TWL6030, this should be the 'vusb' + regulator. For TWL6032 subclass, it should be the 'ldousb' regulator. + + usb1v5-supply: + description: Phandle to the VUSB1V5 regulator (for TWL4030). + + usb1v8-supply: + description: Phandle to the VUSB1V8 regulator (for TWL4030). + + usb3v1-supply: + description: Phandle to the USB3V1 regulator (for TWL4030). + + usb_mode: + description: | + The mode used by the PHY (TWL4030 ONLY) to connect to the controller: + 1: ULPI mode + 2: CEA2011_3PIN mode + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [1, 2] + + '#phy-cells': + const: 0 + +required: + - compatible + - interrupts + +additionalProperties: false + +if: + properties: + compatible: + contains: + const: ti,twl6030-usb +then: + required: + - usb-supply + properties: + interrupts: + minItems: 2 +else: + required: + - usb1v5-supply + - usb1v8-supply + - usb3v1-supply + - usb_mode + +examples: + - | + i2c { + #address-cells =3D <1>; + #size-cells =3D <0>; + + twl@48 { + reg =3D <0x48>; + + usb_phy: twl4030-usb { + compatible =3D "ti,twl4030-usb"; + interrupts =3D <10 4>; // 1 interrupt: OTG (ID & VBUS eve= nts) + interrupt-parent =3D <&gic>; + usb1v5-supply =3D <®_vusb1v5>; + usb1v8-supply =3D <®_vusb1v8>; + usb3v1-supply =3D <®_vusb3v1>; + usb_mode =3D <1>; + #phy-cells =3D <0>; + }; + }; + }; + - | + i2c { + #address-cells =3D <1>; + #size-cells =3D <0>; + + twl@48 { + reg =3D <0x48>; + + usb_comp: twl6030-usb { + compatible =3D "ti,twl6030-usb"; + interrupts =3D <4 4>, <10 4>; // 2 interrupts: OTG & USB + interrupt-parent =3D <&gic>; + usb-supply =3D <®_vusb>; + }; + }; + }; diff --git a/Documentation/devicetree/bindings/usb/twlxxxx-usb.txt b/Docume= ntation/devicetree/bindings/usb/twlxxxx-usb.txt deleted file mode 100644 index 17327a296..000000000 --- a/Documentation/devicetree/bindings/usb/twlxxxx-usb.txt +++ /dev/null @@ -1,43 +0,0 @@ -USB COMPARATOR OF TWL CHIPS - -TWL6030 USB COMPARATOR - - compatible : Should be "ti,twl6030-usb" - - interrupts : Two interrupt numbers to the cpu should be specified. First - interrupt number is the otg interrupt number that raises ID interrupts = when - the controller has to act as host and the second interrupt number is the - usb interrupt number that raises VBUS interrupts when the controller ha= s to - act as device - - usb-supply : phandle to the regulator device tree node. It should be vu= sb - if it is twl6030 or ldousb if it is twl6032 subclass. - -twl6030-usb { - compatible =3D "ti,twl6030-usb"; - interrupts =3D < 4 10 >; -}; - -Board specific device node entry -&twl6030-usb { - usb-supply =3D <&vusb>; -}; - -TWL4030 USB PHY AND COMPARATOR - - compatible : Should be "ti,twl4030-usb" - - interrupts : The interrupt numbers to the cpu should be specified. First - interrupt number is the otg interrupt number that raises ID interrupts - and VBUS interrupts. The second interrupt number is optional. - - -supply : phandle to the regulator device tree node. - should be vusb1v5, vusb1v8 and vusb3v1 - - usb_mode : The mode used by the phy to connect to the controller. "1" - specifies "ULPI" mode and "2" specifies "CEA2011_3PIN" mode. - -If a sibling node is compatible "ti,twl4030-bci", then it will find -this device and query it for USB power status. - -twl4030-usb { - compatible =3D "ti,twl4030-usb"; - interrupts =3D < 10 4 >; - usb1v5-supply =3D <&vusb1v5>; - usb1v8-supply =3D <&vusb1v8>; - usb3v1-supply =3D <&vusb3v1>; - usb_mode =3D <1>; -}; --=20 2.39.5 From nobody Sat Oct 4 12:45:48 2025 Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (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 CB8C71A2390; Sat, 16 Aug 2025 02:18:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755310711; cv=none; b=O0iXjeZVhRUa7mLC7e7iCg/7MYZLGg50dEoYn/9RJ5apWNqhbOmm6scJHmQ9WW+DaSeCXtPiT6SwPjrs1eDMBcMH2nRCiJAQhijEWgDEvL9AAkT+jRM2EkEH+iLU96JK0Ocx/MDMF9GrB8Hu5cmK4YVqwtwaT7x4HXZrXSjLdJw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755310711; c=relaxed/simple; bh=LTAk80ojjlxDjMNbAIhSaXgRHd6phArsoagHfBi65pY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=TpD79gRhRtMW2jHw0b4/30Zvy6IEIUQZ41AigyOnZzkerD8f+C9EvgZy2JBQA2YwCIi5jKftQvy0crNc/FWHmuCn2VuwevUYcB+XkSLWO+TpGx/9azi65NirS6n/MZKrQZg5Cnru6d1eEy3Uwbw5yKQ55vVBluksgFodqhTIL/c= 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=LT/nxOV4; arc=none smtp.client-ip=209.85.221.51 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="LT/nxOV4" Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-3b9e4147690so1507145f8f.2; Fri, 15 Aug 2025 19:18:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1755310708; x=1755915508; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7CndxzlsZCtg7d9Z//XgRlEI2JhvocYMg+RhFNFhIuE=; b=LT/nxOV4eqrHY8tjN/veWj53Z6t2b1fFhag1ly+nfO8YN0krthpEntyhQ0FgYswvcD Xn62QTupl48cIQcj49a0xfJYnLYC7BHzs4izHZ52zkTimlS/7My4eiqRHMHyJACHRE9Q J7Sisp6ElG0w1b/T9xZKr84j2zVKIEXReP7DLSpWsuQrzLJfWhcty/TXPKFszUTevPEx ZblMi+eO8x1j90fnsiqAShkRSsSxrymPcCeT+gcvwVnossRvBq8tapR6vnvTMWYNzeNZ tvGWsuO6iX5uIw0L8X0uW+nRU4hq68dymDUaNdCQ7rxf5HUgKmYRZ8IHpDFPhGyRlxDR N+LA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1755310708; x=1755915508; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7CndxzlsZCtg7d9Z//XgRlEI2JhvocYMg+RhFNFhIuE=; b=rR3aiCbXpEelVrC5kuuQ0/3slu8LtjVAPv9HR7MehOh2a7RbF6G/t2q3cLNIEfDSWy PI+q3fEX3ySO1lm4DV/SV4O/qGljCYWrXp5PRha2XoN33F2zIpyLw+Kd3Z+sSdmsK6t2 1QEAJHiBXAwGbgg1Qyv6TH/WDnC4e9b41setqSSp4t1RGJF0sCNGJMl31hZtmFmKF60C YKkTDxdwkZvbWgvHwJOXPgkUdrWgUCKvSqT7lhAIzG/GvC04LWwuxzW/qH0IvOeI/Bgg 7XyFOlpVvjtktF3mTsvoFMQGKrE+At/xM5Lsxd43Nz4xHRwSSt52pY1W9Scx71NUIbU6 fI2w== X-Forwarded-Encrypted: i=1; AJvYcCU15/FMRZTa1Gr5raVpGEsXCiIQxiDEnFThhgUPGf7jfoduxAZkvOUfUHTD4LYUM0VY/2ue4KzXXFPJ@vger.kernel.org, AJvYcCUfo2EaVSJoL7qRCJtK1ioG3vUHZPEZLyQjRiNeBdR8UCYCo/HoW9WqJGafT/68jkIqEOJ5eyiKKhZSQcE=@vger.kernel.org, AJvYcCUpsFXfR5S131nB+Ug0Qk1z+qmGwiob6/WYUHyZt3UylcQ0NJnFN8tL6A3hs5LRO2RoNNZreonAgte2xA==@vger.kernel.org, AJvYcCVr4w9GLKbym+BE0I6dAX52TCerZNIz0xoWZzJw28hKbs3VdmYScJ9BO/E8CYpitM5WWcq+opCnDqZ7Kdc=@vger.kernel.org, AJvYcCWityn1BQYWDa7B9Bu4+lnWCASdPgqGgb6YNY0bhl3dDtIoxf3IUIVG6k2M5BkhcqPIFIK0/nuW0/3GRg==@vger.kernel.org, AJvYcCWxZowLhTKugVOOsmrEB7bu/sbnGV9pTMEMRt+Flazn+8fh5HIOJXcAmJi8epuThN/dWAZGT6Ohn06f@vger.kernel.org, AJvYcCXIhZUWtNmmsSZLsWp5nKMDDwthNT5utfsdSjAdtzdiJhZcRbEQGPwjYK1RXRgDXky3iyQ8MHoTmZ78@vger.kernel.org X-Gm-Message-State: AOJu0YzjkvBW0mw5UKQQ987dizKA5tFhqy+X98cRvJpKqlBNQJU1140f ponMTQpnx5+XleB2ngLpzMlgrqCFxFx5HKh9jBpkFh92poYWBi9kms6KpbV9cps= X-Gm-Gg: ASbGncuqJ0rNijXd8uwFqQ30UpuvhsXQpqvrMMxMgkytxuew9wHjaJC2m/xbQIPtUj4 ssD7EilZ9Q5Tqsj3+WcjINAiRsH5nqT8UDB8dcN4yUPBmPqrfwhICXNDLLRSMP12Xf7+GklWLmb B/UZWVgkW0j+IAryz8hU20iUIGiBOJEHi9AqRgRWk7q8fqWD3cGvlvhwJQm1PqifxDUrxf7uto8 6Mv63ovMZPaeS828N2nmRyTJ7iQptw0Untw/C//sQlhJ4amg7Nn2BpGb+CD/GDH8yEbvlIo1H/0 jd/yB/zBkav5po/BFWOoGk7SFTVaVa2W7TGnnxkBFHFhWgzR3spMktcugdgefqE/Ytbzy0DFyOg kJvEvYG/BDXNDPG8ni9VCShochA/lri+0XNz1VlVp1MJReRQ= X-Google-Smtp-Source: AGHT+IEXy+zIhMtHlBqxHaP/l0gZKZqeddXpLu+bDishkzNCk/VPNPCwjMO4/biZa0rdMq8hY9j0Sw== X-Received: by 2002:a05:600c:5253:b0:455:f380:32e2 with SMTP id 5b1f17b1804b1-45a26784347mr7315375e9.18.1755310707825; Fri, 15 Aug 2025 19:18:27 -0700 (PDT) Received: from localhost.localdomain ([2a0d:e487:212f:1af8:ee74:5774:2fc2:70a1]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-45a1fe2c019sm58712535e9.17.2025.08.15.19.18.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Aug 2025 19:18:27 -0700 (PDT) From: Jihed Chaibi To: linux-kernel@vger.kernel.org Cc: andreas@kemnade.info, peter.ujfalusi@gmail.com, dmitry.torokhov@gmail.com, robh@kernel.org, krzk+dt@kernel.org, lgirdwood@gmail.com, tiwai@suse.com, conor+dt@kernel.org, lee@kernel.org, ukleinek@kernel.org, broonie@kernel.org, gregkh@linuxfoundation.org, linus.walleij@linaro.org, brgl@bgdev.pl, aaro.koskinen@iki.fi, khilman@baylibre.com, rogerq@kernel.org, tony@atomide.com, linux-gpio@vger.kernel.org, linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-pwm@vger.kernel.org, linux-sound@vger.kernel.org, linux-usb@vger.kernel.org, linux-omap@vger.kernel.org, shuah@kernel.org, jihed.chaibi.dev@gmail.com Subject: [PATCH v3 6/6] dt-bindings: gpio: ti,twl4030: Correct the schema $id path Date: Sat, 16 Aug 2025 04:15:23 +0200 Message-Id: <20250816021523.167049-7-jihed.chaibi.dev@gmail.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250816021523.167049-1-jihed.chaibi.dev@gmail.com> References: <20250816021523.167049-1-jihed.chaibi.dev@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The $id for a binding should match its file path. The ti,twl4030-gpio binding is located in the gpio/ subdirectory but was missing this from its $id. Correct the path to follow the standard convention. Signed-off-by: Jihed Chaibi Reviewed-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/gpio/ti,twl4030-gpio.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/gpio/ti,twl4030-gpio.yaml b/= Documentation/devicetree/bindings/gpio/ti,twl4030-gpio.yaml index 5e3e199fd..96d50d14c 100644 --- a/Documentation/devicetree/bindings/gpio/ti,twl4030-gpio.yaml +++ b/Documentation/devicetree/bindings/gpio/ti,twl4030-gpio.yaml @@ -1,7 +1,7 @@ # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 --- -$id: http://devicetree.org/schemas/ti,twl4030-gpio.yaml# +$id: http://devicetree.org/schemas/gpio/ti,twl4030-gpio.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# =20 title: TI TWL4030 GPIO controller --=20 2.39.5