From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (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 5DEBD302773; Thu, 14 Aug 2025 13:22:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755177725; cv=none; b=m6RsQGn52jqdbVd3BCWwP4Owj3zmq86EOlxRld9RaFqtX8fz2wy7Nqg/MVKLN8GSzOzM01TF/5UU3VlblnsLB3YzhZiMcwKEwVIckxpdRn+Y7oiX4ClmkKMWlFOslL50bM8Zh5hAh5nPNCe5uIucWXY54ahFJVWQdTRO/ldqMpE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755177725; c=relaxed/simple; bh=jqnXnZp7RhpL1YMBGZScNoAkw+LmKGjT5H9FKCka2hw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ITqT8mwt/Jonk/HRFBtbHcGhbIpisiEy+RU+NnpkqbFCx8CztBJz3qyhLxhlDsz+cg6WK0zgKghYMbe9EFsWLfqvRLlT9dLE88RW1LdJ2QFTA/M3Eyqo87pxNCytdcikmJShJmTgIygj2wu0Gd9JyvTfiTUBDj+uowEwNkoQ5hA= 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=Wj0AGD4l; arc=none smtp.client-ip=209.85.128.53 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="Wj0AGD4l" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-45a1b0d231eso5124035e9.3; Thu, 14 Aug 2025 06:22:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1755177721; x=1755782521; 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=FMz0z0NTwoZNKGW97tiHCixZ/UdB6VOtCFJYznUWSlI=; b=Wj0AGD4lyKn45YgYVpTvrUK6/MrusNG8GvH+5BALBqtQEDFCWzfg1CX4f6fhH32q98 qeGAIWmtBrsynn1nT9NmGO0nRyJA9EOJVwEjmpxCLTZ27PIaCzzfS3NT3lCXuAPtNcwz 5Uohl5hojHTgrZO+XtGAqt6LlU5PdwI1EcF9asp40IiCbS8y/4mi/FYgfyDL75nuaCjM y23hJypIaWdYWP1nxMpYD1WrLFcCjJCF2YD2/E9rQ8cUC6gmn05JyBJxr+wrjyKZT7qM 3Aa4cqSv5MBrFbXuhqVAm9c3fXjhQRHwdyrBvHx/tkfImiguegw/zMUsf6oG+NUPf8rh hSoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1755177721; x=1755782521; 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=FMz0z0NTwoZNKGW97tiHCixZ/UdB6VOtCFJYznUWSlI=; b=Aib/3GClHXYHQK2fRALxvOmJ+0I9OE1hM8r41pcYQzHMrM+GfLaUPd4dMi/MR4ex1m Wr8EUFyZR+RUQaxyudxauaMGIBpISc5XXjq36xTsc5SAh9u6aYOsOXTRGOfiAkEqNdLh mmH+h325irF7l0/95G0mo0HfwZ6CLipfOODgUE7EpKCP4eTEKasnMLrbfUMsKqB0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kvR+YwUduKWHmoqWTtP +1QyeX6XZdjpt85jW10ruh8P6uQTW2A5GywS785MFFym/L0qcgO959cgwyd9vbTomwMhrw6r6ed jgDGKqY7hyd5LvbNQwrK+0758Hm1ehp+TEkmz8KWtLlvOVzPY6b6mmJkY/3c7D4sF0hceJ8F2Th srRpSDHOhEDP5p/TxQdllvink995c4QkZP X-Google-Smtp-Source: AGHT+IEhoPp/GvoE0/G8qvem1zpvto20Ky61lY0ZUidud4Xnsxob/d04gPyLQTwmNSdaWYCSyuFzQg== X-Received: by 2002:a05:600c:8b62:b0:456:1560:7c5f with SMTP id 5b1f17b1804b1-45a1ce34c75mr19212705e9.14.1755177721062; Thu, 14 Aug 2025 06:22:01 -0700 (PDT) Received: from localhost.localdomain (lmontsouris-658-1-96-160.w81-250.abo.wanadoo.fr. [81.250.250.160]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3b79c3b9386sm50998831f8f.18.2025.08.14.06.22.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Aug 2025 06:22:00 -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, linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-pwm@vger.kernel.org, linux-sound@vger.kernel.org, linux-usb@vger.kernel.org, shuah@kernel.org, jihed.chaibi.dev@gmail.com Subject: [PATCH v2 7/9] Documentation: omap-twl4030: convert to DT schema Date: Thu, 14 Aug 2025 15:21:27 +0200 Message-Id: <20250814132129.138943-8-jihed.chaibi.dev@gmail.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250814132129.138943-1-jihed.chaibi.dev@gmail.com> References: <20250814132129.138943-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: 8bit 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. 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. Acked-by: Mark Brown Signed-off-by: Jihed Chaibi --- .../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/Documentation/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 of 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 = "ti,omap-twl4030"; - ti,model = "omap3beagle"; - - ti,mcbsp = <&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 = "ti,omap-twl4030"; + ti,model = "omap3beagle"; + ti,mcbsp = <&mcbsp2>; + }; -- 2.39.5