From patchwork Wed Feb 7 09:41:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dharma Balasubiramani X-Patchwork-Id: 13548264 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 18A03C4828F for ; Wed, 7 Feb 2024 09:42:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=hJEUJRzmeObTda/jJPdrmSrntNQW16uqCIeJp/3K98I=; b=JajW9SpWzFptNy THCIILKafXsljCtMYh4wkJ+sQ/0lLqNNHTk6HOA6e3zwoo8M8vVFeu3M/Jxe1lzCwwb+U4LuD5f6r ro7lYXudzQCt3XgHT2/qDp5zcacOBFqHYdPjiTTSTqmTsLyXU9BxBz/gTmBluTp1J3d2iVVkL+7Bd R8BQpuzVG0AIxcH38F20/uFIAxaSPRG26aiO3q4qKzpIyVDw3bnB2HI+2rSBkS4T7cAnfWFTeepMH rZvCxe2zGrIBktxdaHX/kUcleb5CbYrlpwAoE1GCvY0h3yqcpfX1e2dYabBMbmQz5/nGJX9njAQhe DZyA0sYUqpVdpOqJAXDA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rXeS6-0000000AEIf-3COS; Wed, 07 Feb 2024 09:42:46 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rXeS3-0000000AEID-40dA for linux-arm-kernel@lists.infradead.org; Wed, 07 Feb 2024 09:42:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1707298963; x=1738834963; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=eaPjoMfznAH4IZPj/39ikg5X854USdvackzLWMpCGwI=; b=D5j8jWfcX5gbsSsaGENiOHfbLUojzKGUBhmNKY7jtJCmpkIg2IEaihXt g8GfvSuSfBjCWMaSPA7++jdxxpUvkHPlmxDpW7eC3OHakMAvwvFPF+b/v gmNhKGnMtiE+hNmhb5s5BMd3NDVrWvsdmVWz8D3RuNfb0PsQfWApZhBSn 6onbo4/mtm0Pkk7r5opVQb3UJeP1GqDXACkSlqExNgDyRFsfqEGY3oXcv /VL0+vcDszSugqIbiwGtAP6rRYzXJhFm9BlgnnnVx9XjTEJOwuapoxaEN iq2UYGHZk4tdH7vgY0vMUNcvcSlcx/LPQZtMKKeie3MsQHevSqXG8yUwU Q==; X-CSE-ConnectionGUID: fRBUDne2SeOxScIZjr2Gpg== X-CSE-MsgGUID: gMnZzN7ETgKrlsrBwpz63Q== X-IronPort-AV: E=Sophos;i="6.05,250,1701154800"; d="scan'208";a="15884586" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa3.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 07 Feb 2024 02:42:43 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Wed, 7 Feb 2024 02:41:55 -0700 Received: from che-lt-i70843lx.microchip.com (10.10.85.11) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2507.35 via Frontend Transport; Wed, 7 Feb 2024 02:41:49 -0700 From: Dharma Balasubiramani To: , , , , , , , , , , , , , CC: Subject: [PATCH] ASoC: dt-bindings: atmel,asoc-wm8904: Convert to json-schema Date: Wed, 7 Feb 2024 15:11:44 +0530 Message-ID: <20240207094144.195397-1-dharma.b@microchip.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240207_014244_208700_C8885659 X-CRM114-Status: GOOD ( 14.36 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Convert atmel,asoc-wm8904 devicetree binding to json-schema. Signed-off-by: Dharma Balasubiramani Reviewed-by: Krzysztof Kozlowski --- .../bindings/sound/atmel,asoc-wm8904.yaml | 84 +++++++++++++++++++ .../bindings/sound/atmel-wm8904.txt | 55 ------------ 2 files changed, 84 insertions(+), 55 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/atmel,asoc-wm8904.yaml delete mode 100644 Documentation/devicetree/bindings/sound/atmel-wm8904.txt diff --git a/Documentation/devicetree/bindings/sound/atmel,asoc-wm8904.yaml b/Documentation/devicetree/bindings/sound/atmel,asoc-wm8904.yaml new file mode 100644 index 000000000000..89a67f8e33b6 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/atmel,asoc-wm8904.yaml @@ -0,0 +1,84 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/atmel,asoc-wm8904.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Atmel wm8904 audio codec complex + +maintainers: + - Dharma Balasubiramani + +description: + The ASoC audio complex configuration for Atmel with WM8904 audio codec. + +properties: + compatible: + const: atmel,asoc-wm8904 + + atmel,model: + $ref: /schemas/types.yaml#/definitions/string + description: The user-visible name of this sound complex. + + atmel,ssc-controller: + $ref: /schemas/types.yaml#/definitions/phandle + description: The phandle of the SSC controller. + + atmel,audio-codec: + $ref: /schemas/types.yaml#/definitions/phandle + description: The phandle of the WM8731 audio codec. + + atmel,audio-routing: + description: + A list of the 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. + $ref: /schemas/types.yaml#/definitions/non-unique-string-array + items: + enum: + # Board Connectors + - Headphone Jack + - Line In Jack + - Mic + # WM8904 CODEC Pins + - IN1L + - IN1R + - IN2L + - IN2R + - IN3L + - IN3R + - HPOUTL + - HPOUTR + - LINEOUTL + - LINEOUTR + - MICBIAS + +required: + - compatible + - atmel,model + - atmel,audio-routing + - atmel,ssc-controller + - atmel,audio-codec + +additionalProperties: false + +examples: + - | + sound { + compatible = "atmel,asoc-wm8904"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_pck0_as_mck>; + + atmel,model = "wm8904 @ AT91SAM9N12EK"; + + atmel,audio-routing = + "Headphone Jack", "HPOUTL", + "Headphone Jack", "HPOUTR", + "IN2L", "Line In Jack", + "IN2R", "Line In Jack", + "Mic", "MICBIAS", + "IN1L", "Mic"; + + atmel,ssc-controller = <&ssc0>; + atmel,audio-codec = <&wm8904>; + }; diff --git a/Documentation/devicetree/bindings/sound/atmel-wm8904.txt b/Documentation/devicetree/bindings/sound/atmel-wm8904.txt deleted file mode 100644 index 8bbe50c884b6..000000000000 --- a/Documentation/devicetree/bindings/sound/atmel-wm8904.txt +++ /dev/null @@ -1,55 +0,0 @@ -Atmel ASoC driver with wm8904 audio codec complex - -Required properties: - - compatible: "atmel,asoc-wm8904" - - atmel,model: The user-visible name of this sound complex. - - atmel,audio-routing: A list of the 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. Valid names for sources and - sinks are the WM8904's pins, and the jacks on the board: - - WM8904 pins: - - * IN1L - * IN1R - * IN2L - * IN2R - * IN3L - * IN3R - * HPOUTL - * HPOUTR - * LINEOUTL - * LINEOUTR - * MICBIAS - - Board connectors: - - * Headphone Jack - * Line In Jack - * Mic - - - atmel,ssc-controller: The phandle of the SSC controller - - atmel,audio-codec: The phandle of the WM8904 audio codec - -Optional properties: - - pinctrl-names, pinctrl-0: Please refer to pinctrl-bindings.txt - -Example: -sound { - compatible = "atmel,asoc-wm8904"; - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_pck0_as_mck>; - - atmel,model = "wm8904 @ AT91SAM9N12EK"; - - atmel,audio-routing = - "Headphone Jack", "HPOUTL", - "Headphone Jack", "HPOUTR", - "IN2L", "Line In Jack", - "IN2R", "Line In Jack", - "Mic", "MICBIAS", - "IN1L", "Mic"; - - atmel,ssc-controller = <&ssc0>; - atmel,audio-codec = <&wm8904>; -};