From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) (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 7A28437F315 for ; Sat, 15 Aug 2026 08:34:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786782899; cv=none; b=rOcCgo39hjrodzWV4r8Xr6pJz3KXsFzZXYh51qjYge0sKpldl7ZWpbO+6ZT+5IlZ7hBFZGxwd9OH9fuXV2vjgaaLPINi5cuk8naKVi7BliatoRpQPk2nZ8M2NYREw5thKnI7STazH262VNDLD2x5UXR312//MEPD+cOCk9G7V8I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786782899; c=relaxed/simple; bh=m6g2XUJeHF1PIlSodfI1hjH2eJL9yELjoJ2ytDpo5Fw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=mYqJBqyq0bBd72SP2KY2DtmK/wvZVbdBbb24VWmrAghrZitv1RMvzctiXUAGNrtniPdY7AofQAsDP9nLnKK3B7NZc+cRTufotS8uFk/BO0njp/qA3L8qOWqJ+hl/9qQV6ldHLJxbhXr/ZQI4rhA+yqv6PFPAGHHXb34siqZ8myo= 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=GzijwEgB; arc=none smtp.client-ip=209.85.221.46 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="GzijwEgB" Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-472326ca506so1212328f8f.2 for ; Sat, 15 Aug 2026 01:34:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786782896; x=1787387696; 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:content-type; bh=pzGpX7JiK+m5ce9c9KT1xWR6DUie8OR3CMeaDAX9MSE=; b=GzijwEgBqjXYfr08cSHRQ/7ogHuHmoWkBtt8/DmhbCaMtX7Vgyo3s+Ap1q+z8LDDa+ Fho7m/sZoLMyfMmbdqezyCaaJBgnk3yFBdCq/bdPPaoCdb5ueyDG+0j09+CsaFzdO6uM L/q3/7XwdU0yzdLyrhV6nW+OnCv00eM3z4HkaOC6Hz3rMQ9g+ejWLdrqjiVEEDtLH3nu NAwIzWi4CVxpxT4KoEmikR2bIzZ/eYFF9wZXBkf20+XOxwotg0gn2hvS2yVay0Bfp67c 7n4tqXxHHYj+pSKV6jHP67Um//g/Silet3ZF5RgIck0BHkCoLCkIxB58ke+O7ZHoxucj LXLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786782896; x=1787387696; 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:content-type; bh=pzGpX7JiK+m5ce9c9KT1xWR6DUie8OR3CMeaDAX9MSE=; b=mYE6h+aw33QoT1pZ5s/I3uaTnA2aX3jPm4Iy7AL1T1qJTVh1be+p3H2WlMyoPQN2Yd kxk7KD+QJagi0ar6zNjs8jHJT1DpmyWrkjmabt6jejkwjZW4T3ycqr3t0nFCzAw/CYC5 I02mNVmBSniC2LUzCDIrnpV/PTHoW8n5FKc4PjPyDnuwyO4RTPPdihrHm9EsC42yRXm7 5g7/wZ+sNjGkxoVtdJKOIibmyV1MyylSdtB3dQ/M9KgcjiboUo9symHn+/9HCStSzz/F HndX6yl78RRw/AOoKEHyKIiJ/tQ3LG6r3hvptIy77nP40gaGeWWkNEIGPtbEMqO450/H ZPJg== X-Forwarded-Encrypted: i=1; AHgh+Rp2HpzAJfYioQBIVnl8R8Z02NJYBHuGtbs30+J/GYCt/0gTvHNI0fum1M57AJnhNLRo0FJM5CSjRKA/AtM=@vger.kernel.org X-Gm-Message-State: AOJu0Yyn7Pq1DrvRDmCznfys/2zTW1WXRMC3FmQZXIbziUIf33433+3I IvgbULS8bP1HNhEp3yg4InCGOMkMdL7esHdpRAWMZDWuAt2auCewE5bm X-Gm-Gg: AR+sD12ZH6SK/96zb3qud/SYmZJpxRT99wAJSBa7mD56ASPy4ikTfJEkUYV8TbAhRHG KxR2p8APfJd7w2BWVDmRDZdxMyuRbjmff+Eg0JttUGcoo3/zrTDvgVW+ZCwMukF58KnF3ZPB4XO AYZFDwPHXjnQRTGrssAk/2GhPPNrj4Zz60QSYeE+nxGpTHZWKS7JK+Qh3K5AK42NcWuVvMLQXru 1DwnzMyMJch7+2XuFqEPK4KgfOS/oHRkBvy6RiIqeWerCGV+9I4QvPlzi6GjnvsqSAgmZ9+4dJH vL0SFN8F1iFwX4qp0KnzwG4fCJ1SEaIdJEJJsImDfJT8aggj8kRr/GCg5tKEvja8+PEM+hFxuq6 Jt1XNDUN0Js2V8RtaY0UwLR/UERUolOdbxwGt1CCSmRLjr1DtLStdGOikABw2izbo1HbZRsvk0x uJK9LT35jWRuAbIn9SdlY0oZBh9pcrxIUetR9M5WS8qXeQvcoR7i6gYiKBFL7MFp6gBiYGAdI0q kJcwSXwf/91jNVmM9O8dSbPOQ2bRXE= X-Received: by 2002:a5d:5303:0:b0:47f:8802:c182 with SMTP id ffacd0b85a97d-481607a3329mr13321970f8f.29.1786782895668; Sat, 15 Aug 2026 01:34:55 -0700 (PDT) Received: from localhost.localdomain ([82.137.32.242]) by smtp.googlemail.com with ESMTPSA id ffacd0b85a97d-4815f2005b0sm16295848f8f.8.2026.08.15.01.34.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Aug 2026 01:34:55 -0700 (PDT) From: Eduard Bostina To: Conor Dooley , devicetree@vger.kernel.org, Eduard Bostina , Krzysztof Kozlowski , Lee Jones , linux-kernel@vger.kernel.org, mfd@lists.linux.dev, Rob Herring Cc: daniel.baluta@nxp.com, simona.toaca@nxp.com, goledhruva@gmail.com, m-chawdhry@ti.com Subject: [PATCH] dt-bindings: mfd: Convert TI TWL6040 to DT schema Date: Sat, 15 Aug 2026 08:34:51 +0000 Message-ID: <20260815083451.2147129-1-egbostina@gmail.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 Convert the Texas Instruments TWL6040 audio codecs family bindings to DT schema. During the conversion, the following updates were made: - Changed 'twl6040,audpwron-gpio' to 'ti,audpwron-gpio', which was misnamed in the old txt binding. - Made 'gpio-controller', '#gpio-cells', and 'ti,audpwron-gpio' optional because modern platforms do not require them. Signed-off-by: Eduard Bostina --- .../devicetree/bindings/mfd/ti,twl6040.yaml | 142 ++++++++++++++++++ .../devicetree/bindings/mfd/twl6040.txt | 67 --------- 2 files changed, 142 insertions(+), 67 deletions(-) create mode 100644 Documentation/devicetree/bindings/mfd/ti,twl6040.yaml delete mode 100644 Documentation/devicetree/bindings/mfd/twl6040.txt diff --git a/Documentation/devicetree/bindings/mfd/ti,twl6040.yaml b/Documentation/devicetree/bindings/mfd/ti,twl6040.yaml new file mode 100644 index 000000000000..a93835aa9153 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/ti,twl6040.yaml @@ -0,0 +1,142 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/ti,twl6040.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Texas Instruments TWL6040 family audio codec + +maintainers: + - Eduard Bostina + +description: + The TWL6040s are 8-channel high quality low-power audio codecs providing + audio, vibra and GPO functionality on OMAP4+ platforms. They are connected + to the host processor via i2c for commands, McPDM for audio data and + commands. + +properties: + compatible: + enum: + - ti,twl6040 + - ti,twl6041 + + reg: + const: 0x4b + + interrupts: + maxItems: 1 + + gpio-controller: true + + "#gpio-cells": + const: 1 + + "#clock-cells": + const: 0 + + ti,audpwron-gpio: + maxItems: 1 + description: Power on GPIO line for the twl6040 + + vio-supply: + description: Regulator for the twl6040 VIO supply + + v2v1-supply: + description: Regulator for the twl6040 V2V1 supply + + enable-active-high: + type: boolean + description: To power on the twl6040 during boot. + + clocks: + minItems: 1 + maxItems: 2 + + clock-names: + minItems: 1 + maxItems: 2 + items: + enum: + - clk32k + - mclk + + vddvibl-supply: + description: Regulator for the left vibra motor + + vddvibr-supply: + description: Regulator for the right vibra motor + + vibra: + type: object + additionalProperties: false + properties: + ti,vibldrv-res: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Resistance parameter for left driver + ti,vibrdrv-res: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Resistance parameter for right driver + ti,viblmotor-res: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Resistance parameter for left motor + ti,vibrmotor-res: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Resistance parameter for right motor + vddvibl_uV: + $ref: /schemas/types.yaml#/definitions/uint32 + description: vddvibl default voltage if it needs to be changed + vddvibr_uV: + $ref: /schemas/types.yaml#/definitions/uint32 + description: vddvibr default voltage if it needs to be changed + + required: + - ti,vibldrv-res + - ti,vibrdrv-res + - ti,viblmotor-res + - ti,vibrmotor-res + +required: + - compatible + - reg + - interrupts + - "#clock-cells" + - vio-supply + - v2v1-supply + +additionalProperties: false + +examples: + - | + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + audio-codec@4b { + compatible = "ti,twl6040"; + reg = <0x4b>; + interrupts = <0 119 IRQ_TYPE_LEVEL_HIGH>; + interrupt-parent = <&gic>; + gpio-controller; + #gpio-cells = <1>; + #clock-cells = <0>; + ti,audpwron-gpio = <&gpio4 31 0>; + + vio-supply = <&v1v8>; + v2v1-supply = <&v2v1>; + enable-active-high; + + /* regulators for vibra motor */ + vddvibl-supply = <&vbat>; + vddvibr-supply = <&vbat>; + + vibra { + ti,vibldrv-res = <8>; + ti,vibrdrv-res = <3>; + ti,viblmotor-res = <10>; + ti,vibrmotor-res = <10>; + }; + }; + }; diff --git a/Documentation/devicetree/bindings/mfd/twl6040.txt b/Documentation/devicetree/bindings/mfd/twl6040.txt deleted file mode 100644 index dfd8683ede0c..000000000000 --- a/Documentation/devicetree/bindings/mfd/twl6040.txt +++ /dev/null @@ -1,67 +0,0 @@ -Texas Instruments TWL6040 family - -The TWL6040s are 8-channel high quality low-power audio codecs providing audio, -vibra and GPO functionality on OMAP4+ platforms. -They are connected to the host processor via i2c for commands, McPDM for audio -data and commands. - -Required properties: -- compatible : "ti,twl6040" for twl6040, "ti,twl6041" for twl6041 -- reg: must be 0x4b for i2c address -- interrupts: twl6040 has one interrupt line connecteded to the main SoC -- gpio-controller: -- #gpio-cells = <1>: twl6040 provides GPO lines. -- #clock-cells = <0>; twl6040 is a provider of pdmclk which is used by McPDM -- twl6040,audpwron-gpio: Power on GPIO line for the twl6040 - -- vio-supply: Regulator for the twl6040 VIO supply -- v2v1-supply: Regulator for the twl6040 V2V1 supply - -Optional properties, nodes: -- enable-active-high: To power on the twl6040 during boot. -- clocks: phandle to the clk32k and/or to mclk clock provider -- clock-names: Must be "clk32k" for the 32K clock and "mclk" for the MCLK. - -Vibra functionality -Required properties: -- vddvibl-supply: Regulator for the left vibra motor -- vddvibr-supply: Regulator for the right vibra motor -- vibra { }: Configuration section for vibra parameters containing the following - properties: -- ti,vibldrv-res: Resistance parameter for left driver -- ti,vibrdrv-res: Resistance parameter for right driver -- ti,viblmotor-res: Resistance parameter for left motor -- ti,viblmotor-res: Resistance parameter for right motor - -Optional properties within vibra { } section: -- vddvibl_uV: If the vddvibl default voltage need to be changed -- vddvibr_uV: If the vddvibr default voltage need to be changed - -Example: -&i2c1 { - twl6040: twl@4b { - compatible = "ti,twl6040"; - - interrupts = <0 119 4>; - interrupt-parent = <&gic>; - twl6040,audpwron-gpio = <&gpio4 31 0>; - - vio-supply = <&v1v8>; - v2v1-supply = <&v2v1>; - enable-active-high; - - /* regulators for vibra motor */ - vddvibl-supply = <&vbat>; - vddvibr-supply = <&vbat>; - - vibra { - /* Vibra driver, motor resistance parameters */ - ti,vibldrv-res = <8>; - ti,vibrdrv-res = <3>; - ti,viblmotor-res = <10>; - ti,vibrmotor-res = <10>; - }; - }; -}; - -/include/ "twl6040.dtsi" -- 2.43.0