Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2234462lqt; Mon, 22 Apr 2024 05:38:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWQKtFAZQlQDpag/DpZ/+iqIBA0TjJVoA5T7R1R4R+qL26rP8WqfGlbXQzf5TgiKv0AYhU2m9DXvsYRO6jPdOdc376TlS3T44Z7UimdNg== X-Google-Smtp-Source: AGHT+IFUrMQYv9bdnqksWoW1EuJFInZsYVoMajdDEaC3ZvibP5x26ewr1L/uLeeUVgrVtG5wEuBE X-Received: by 2002:a05:6808:6096:b0:3c8:2bea:f1bc with SMTP id de22-20020a056808609600b003c82beaf1bcmr4321263oib.1.1713789533551; Mon, 22 Apr 2024 05:38:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713789533; cv=pass; d=google.com; s=arc-20160816; b=fGYRpB5+cdbEa8UtJ3AcbAP1ACirSul2zXvi2tJDqi/Vhj9fFk/WdfPz8EX8VgEKou HZ58+1Nr7fyrYLzX9JDkgLxmt18lYFZePM1gRxn/OTFsn0DZjNdAwSb58/7xwbKBl4yn ttOTn+sBW3pfY9GtmHIhlvX/TOHF+421KUXARZmUEhTA3fDWbwUFIG4AG3AnhdD5tM4x ratE+/53lnz1bVAMAB96ShsvyedEVeNLwn/Yu7bTal0+RXdiUwTSWnvxZt6JOs2pGdtM M8dFsgi2uaoY1BZg7t2yzkRJKJwrjuaUPYymeHBY6AUgUq3GgqpcqcoBcn35UoJSuDic pqPw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=vbuaZWGTBIowVRErwzSunyvXAmc6nmwLHaqK1i/4KhE=; fh=uWfCfACszdXspQXCXy1CLCmZpoepGgDOLwi7bQob3IY=; b=lSC3o1n3+b4KG8+HWmhJ7r88rM8uYSqZwXT9lbOPFciRvPlMN9jsUU3mkAIoN9eVn0 ltok933w6F3CPvdo8YHd1m/VcuG5uM6FeI4HY1xvJnrZpbZoEv9hbqw5rPu/rXiHQwsf jeJ1TGZikVZK3JuxtGwqXbGKMhqi2A2JR/4XIoRbpI/EC1bw3xP8deidLD3ZDDeClR9X Sv4v0hro4Tz7e3B+JYTSnfXZeRbM5W1RRUyAL4L5HPdoi80VfTtfpF8s/AK9kOUlweEN 2MAmxwut+oBXhi9pEXAOYxKK5bGPbwVukfy/Uz5A4xK68Xq1JGl0XbaKd141Lq6Y5c9y ICfw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=OrOhPnVg; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-153341-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153341-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id e12-20020ac85dcc000000b00439a18491e7si3031581qtx.67.2024.04.22.05.38.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 05:38:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-153341-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=OrOhPnVg; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-153341-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153341-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 381B31C209E0 for ; Mon, 22 Apr 2024 12:38:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 325AD147C89; Mon, 22 Apr 2024 12:38:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OrOhPnVg" Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) (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 CC2B43D3B3; Mon, 22 Apr 2024 12:38:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713789524; cv=none; b=XDR6ejUJ80i0wvl9wvZ15o6zVMotlw3kE7lCL5vQd0v3XenjbH+lodZKu19Kysf9UvywIqQbe6l76CAGCtiElrcX8WZnikYmvJugPV2uh3ev0wZxTxMdMIVZWu5JoYx3PHqFafWC5Uu2Qc7kNGwdi0LXFR/rhY6TbKgYuKcLXxk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713789524; c=relaxed/simple; bh=pxRWRkI6R4pqlO69Ln9+iTq4dBMcUUKju/X9sDhmjyg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=oyimlKRBIKBhDrAsg3V8i12gsMAMiZCE4Y4nZ8zhaBfrN83mADEEMn4ygLtDSEZoby+fKAL6OYmVR3e9IvNHGkL4vR8sX9rGF7VLIW5iJBMJuYQLqCHw1EHea3BvzSzn8xsAemmpUhPdHJSMCbr8a+KilW7kkaIdcGSyqWniaxM= 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=OrOhPnVg; arc=none smtp.client-ip=209.85.214.175 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 Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-1e9bcff8a8cso5062515ad.3; Mon, 22 Apr 2024 05:38:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713789522; x=1714394322; 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; bh=vbuaZWGTBIowVRErwzSunyvXAmc6nmwLHaqK1i/4KhE=; b=OrOhPnVgwLkVvqyflfcABWQZHz7EDpJ3pbz2Lbnrx9Lsb8x8LdrJVKnHWZL38+7i8v oJwHlVgE/o2sRXfLtPxrE0dWqL+y7K2cGL7kXlzsM+XIkF28dcIrViLnVI8KrJI6tO1B OM3Mk3HcggEQk5TSvu3UgIYXruiP9Uj2vxPiGHpm3Yx++my11umW1PQVhSBoO+Rzhsbr kMsXdMesCFF+IMs9X1idAvkXs+98YlV6DgrRCWuGadkeLFqNkMZIuGtbMvr+AFORNZ3N qDODcCldLKhdDO5UyqNjU+UnRNiAUyvqzzxxTiRJ69pcg1IT+spfmRrrk1HBwE2aP0zO hMpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713789522; x=1714394322; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=vbuaZWGTBIowVRErwzSunyvXAmc6nmwLHaqK1i/4KhE=; b=RQO6j69IcWTb2UqEBxYOKYO01dI28OOiYHaNEUplGc8bK4/6lJLDYGyqEBPvo8H50x J0Wz6aosxlaZsNXH1WabbKMH07JEu1q/N+6OTSNxx35EeWSSbI2NnlTXu0ouP9FRudCU 2B0QSZYwNXa6I3lw9V3uM3WyzAZv3BUS/5oQsGwXpHeLpiMuGbLV8EG6bvY7OZH8Fj8c LHeKNgXSoOfDzB0Qc6jD3IgL4T6GaKopM7K16mbINoaW/mTpOV9aJAMKx8C8joFcTgWU rxchPn6+cEvg4ZJEV5uey1FTKthwWazVDY9viblnn9uQWgKrBa6MtrhUB4ZusdgJt4TS 0G8Q== X-Forwarded-Encrypted: i=1; AJvYcCWUx2BJ7Wry10zrsJ73SU3AAjmL9J0KKiHha/FvTxh8nN1RrgRXlq6b9/iOnJIOa5VM22k4TFjHPPYMl0VNZsu8IAqIgV/NZViM1qfHZwCCebqr/cuMETPCiH/3k0KTb7B7UhfuvOVcz9ptbNgM9pmkhA88xqdeu6/1GD/cVbsE0WXm0T7XVlHoWpzFyUbQ5QXPh5AFwhsA/V0nunCb4dSDpo0= X-Gm-Message-State: AOJu0Ywd8D+rY5/JrmBkUEERUy9OyU5WaUUEcqDDA10sxhv5Z+TRpyDx /yYyETcYRFbb+yixsC9k4AH8C/W7WB7NKuVmV11hILt/uWrCn8fI9U/LuQkhEjw= X-Received: by 2002:a17:903:124c:b0:1e1:a54:1fe8 with SMTP id u12-20020a170903124c00b001e10a541fe8mr10807848plh.53.1713789521962; Mon, 22 Apr 2024 05:38:41 -0700 (PDT) Received: from localhost (ec2-3-111-32-5.ap-south-1.compute.amazonaws.com. [3.111.32.5]) by smtp.gmail.com with UTF8SMTPSA id x18-20020a170902b41200b001e446fe6843sm7988915plr.79.2024.04.22.05.38.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Apr 2024 05:38:41 -0700 (PDT) From: Mohammad Shehar Yaar Tausif To: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Thierry Reding , Jonathan Hunter Cc: Mohammad Shehar Yaar Tausif , Thierry Reding , linux-sound@vger.kernel.org, devicetree@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] ASoC: dt-bindings: tegra20-ac97: convert to dt schema Date: Mon, 22 Apr 2024 18:08:28 +0530 Message-ID: <20240422123830.472109-1-sheharyaar48@gmail.com> X-Mailer: git-send-email 2.44.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 NVIDIA Tegra20 AC97 binding to DT schema. Change -gpio to -gpios in both schema and nvidia/tegra20-colibri.dtsi Signed-off-by: Mohammad Shehar Yaar Tausif --- Changes v1->v2: - change -gpio to -gpios in both schema and dtsi - tested against dts - add header files and defines --- .../bindings/sound/nvidia,tegra20-ac97.txt | 36 -------- .../bindings/sound/nvidia,tegra20-ac97.yaml | 86 +++++++++++++++++++ arch/arm/boot/dts/nvidia/tegra20-colibri.dtsi | 4 +- 3 files changed, 88 insertions(+), 38 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra20-ac97.txt create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra20-ac97.yaml diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra20-ac97.txt b/Documentation/devicetree/bindings/sound/nvidia,tegra20-ac97.txt deleted file mode 100644 index eaf00102d92c..000000000000 --- a/Documentation/devicetree/bindings/sound/nvidia,tegra20-ac97.txt +++ /dev/null @@ -1,36 +0,0 @@ -NVIDIA Tegra 20 AC97 controller - -Required properties: -- compatible : "nvidia,tegra20-ac97" -- reg : Should contain AC97 controller registers location and length -- interrupts : Should contain AC97 interrupt -- resets : Must contain an entry for each entry in reset-names. - See ../reset/reset.txt for details. -- reset-names : Must include the following entries: - - ac97 -- dmas : Must contain an entry for each entry in clock-names. - See ../dma/dma.txt for details. -- dma-names : Must include the following entries: - - rx - - tx -- clocks : Must contain one entry, for the module clock. - See ../clocks/clock-bindings.txt for details. -- nvidia,codec-reset-gpio : The Tegra GPIO controller's phandle and the number - of the GPIO used to reset the external AC97 codec -- nvidia,codec-sync-gpio : The Tegra GPIO controller's phandle and the number - of the GPIO corresponding with the AC97 DAP _FS line - -Example: - -ac97@70002000 { - compatible = "nvidia,tegra20-ac97"; - reg = <0x70002000 0x200>; - interrupts = <0 81 0x04>; - nvidia,codec-reset-gpio = <&gpio 170 0>; - nvidia,codec-sync-gpio = <&gpio 120 0>; - clocks = <&tegra_car 3>; - resets = <&tegra_car 3>; - reset-names = "ac97"; - dmas = <&apbdma 12>, <&apbdma 12>; - dma-names = "rx", "tx"; -}; diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra20-ac97.yaml b/Documentation/devicetree/bindings/sound/nvidia,tegra20-ac97.yaml new file mode 100644 index 000000000000..9a68578f6fc3 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra20-ac97.yaml @@ -0,0 +1,86 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/nvidia,tegra20-ac97.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NVIDIA Tegra20 AC97 controller + +maintainers: + - Thierry Reding + - Jon Hunter + +properties: + compatible: + const: nvidia,tegra20-ac97 + + reg: + maxItems: 1 + + resets: + maxItems: 1 + + reset-names: + const: ac97 + + interrupts: + maxItems: 1 + + clocks: + maxItems: 1 + + dmas: + maxItems: 2 + + dma-names: + items: + - const: rx + - const: tx + + nvidia,codec-reset-gpios: + description: + The Tegra GPIO controller's phandle and the number + of the GPIO used to reset the external AC97 codec + maxItems: 1 + + nvidia,codec-sync-gpios: + description: + The Tegra GPIO controller's phandle and the number + of the GPIO corresponding with the AC97 DAP _FS line + maxItems: 1 + +required: + - compatible + - reg + - resets + - reset-names + - interrupts + - clocks + - dmas + - dma-names + - nvidia,codec-reset-gpios + - nvidia,codec-sync-gpios + +additionalProperties: false + +examples: + - | + #include + #include + #include + #include + #include + + ac97@70002000 { + compatible = "nvidia,tegra20-ac97"; + reg = <0x70002000 0x200>; + resets = <&tegra_car 3>; + reset-names = "ac97"; + interrupts = ; + clocks = <&tegra_car 3>; + dmas = <&apbdma 12>, <&apbdma 12>; + dma-names = "rx", "tx"; + nvidia,codec-reset-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_HIGH>; + nvidia,codec-sync-gpios = <&gpio TEGRA_GPIO(P, 0) GPIO_ACTIVE_HIGH>; + }; +... diff --git a/arch/arm/boot/dts/nvidia/tegra20-colibri.dtsi b/arch/arm/boot/dts/nvidia/tegra20-colibri.dtsi index 8c1d5c9fa483..2ff7be8f1382 100644 --- a/arch/arm/boot/dts/nvidia/tegra20-colibri.dtsi +++ b/arch/arm/boot/dts/nvidia/tegra20-colibri.dtsi @@ -445,9 +445,9 @@ lvp0 { tegra_ac97: ac97@70002000 { status = "okay"; - nvidia,codec-reset-gpio = + nvidia,codec-reset-gpios = <&gpio TEGRA_GPIO(V, 0) GPIO_ACTIVE_LOW>; - nvidia,codec-sync-gpio = + nvidia,codec-sync-gpios = <&gpio TEGRA_GPIO(P, 0) GPIO_ACTIVE_HIGH>; }; -- 2.44.0