From patchwork Tue Feb 21 18:32:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Svyatoslav Ryhel X-Patchwork-Id: 60210 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp161773wrd; Tue, 21 Feb 2023 10:33:26 -0800 (PST) X-Google-Smtp-Source: AK7set8+i/8myMIeOx3mTDfq4R6bkj9kWxaIADkC5fLrhe29sfJX6rOofdkTtbSS0q7lvxCDuClp X-Received: by 2002:aa7:cf87:0:b0:4ab:cb8c:932b with SMTP id z7-20020aa7cf87000000b004abcb8c932bmr5250559edx.40.1677004406605; Tue, 21 Feb 2023 10:33:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677004406; cv=none; d=google.com; s=arc-20160816; b=qwcnBJM2G3mC4u8ERAl/1Kr3XBEx3x3QJN8VE0iXsqXjKGyiyOcAqvZWdvox4CLOCs EKtCDGpjbiET9SSxPDonaUpQYHxG601ZUrrgX9ts5UPYE+fPNtu09t+LVGTzBHUYx4c2 6RtKf3BMgR0qTCucmLBaZhrxuTAYv832WGQQezjhAsZJzXo6AboL7cfXVyFyxKgNHDFM Ob8oESAw1MVtDPddBsqWbYm03u99fJZuYUzHlZpW8N4F5VjeNOB92v2eTOYSVGrCb1oG z3nQQK5B6YAxjak6jCDlu4hA7NOeGmUYbv9QRDfcC1/ajXjlbP4vBlPLiqb+gMp9XZyC V6ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=wVgROdQULqVTm5cZsK90w6/mn8hCbHN5YbVIzDSMgeI=; b=FYFrkEm1ugPAoUBQAUE4ooWjCsq7DBIvjq/Xm1FNquPiP/a8KJPjaVCVOhjvLDlfkZ +xr5t1PqNwV85jZ//+JOkN1lV7gWaeNRoPfGpypwdvFIbml0T0c9IlvCwx2jE4zQ/43X EHKkno0ZYhbbSRXXvz7amhkb08u9j4UjcH9ZyyDEUrgmri8WasJqtz90ugBug0kKraaI CbFgOnz2za6ZDG9TeJWQnSd2X98j6UzLnLM9C2s9efYvdSp0FhvUJ44gTwlCwzANq3MS ARk6pMJpF55H9VPUQj+uwAMCehE1hzZ2urvzj/E1zR6oWpZNijjC8zrxjF1UlLqp5RCG HodA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=XthLSfsJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u2-20020a05640207c200b004ad71e0d946si6155630edy.488.2023.02.21.10.33.03; Tue, 21 Feb 2023 10:33:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=XthLSfsJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230074AbjBUScc (ORCPT + 99 others); Tue, 21 Feb 2023 13:32:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229767AbjBUSc2 (ORCPT ); Tue, 21 Feb 2023 13:32:28 -0500 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 902D32F7A3; Tue, 21 Feb 2023 10:32:25 -0800 (PST) Received: by mail-ed1-x535.google.com with SMTP id cq23so20729285edb.1; Tue, 21 Feb 2023 10:32:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=wVgROdQULqVTm5cZsK90w6/mn8hCbHN5YbVIzDSMgeI=; b=XthLSfsJ3sDWeedA3vMFgH+nYyTWffN3ykvdKMIgZCII5Lp0jEbv1STD7zYnHiAXsu HbvRZ0JONBH3SVuVB+D0CU+OjLkg8WrvZOXAe8YXc7Xs3p4civ1HOb80g6Tv3mnRfP95 9sDvNh3FXGQz+/yu7FB5/GsOZLhL+JO0XCqNK3uF8VLDnB+TJ8TX/6mn2YAqLu0HIxIX vr7d7tzQV75/NlCycYQmnXfYXZPj+dE/8KeQcg69mWpegtRdxTHv4Pr/act1AhAqOqY7 cgGIryvz4WE5E7Q5hzUSNbz7aYTdhQBOuwDn4qbY+NnweeqjJBM0oFLTCbhT/5SFR52S VNBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=wVgROdQULqVTm5cZsK90w6/mn8hCbHN5YbVIzDSMgeI=; b=8JxMBFfRsLKZ3IhFyDWYQ7u0Hg10P7KJvUAXQddzBxYwWRVkXCMSpED3Vpg2hpvbGF oB7OJOQdySaRtXl3VDtgLbD6tOMKzCkfIbffdle3Xfoq26Q6ulegSPXmQayihHQQuqTd Nky5bfUJbIBJovA+X5sDxQUmZp4ZTkq0rmA2u63rsUQh2XqM4hJpC5uY/6/1x4l40NJx WFIY3JHEFs1SbsKcT/w5dMW8yQQ1Mg/G78COGKzZN4+wNSXr2MemhKCq0ZLv/A4Hnj7W d8SZsHAP9INfG7HqDB2crCKs0i9VQ2wtAjPidwD3MHspc1cqsHu08Xk0eC/GkkSekyV+ rLDA== X-Gm-Message-State: AO0yUKUrgop5uOjVZNJkXv5xZv9G+sZnYbA7uFtJdWPabrSdxrIDNjUP PqXZ2CK73VZepmS+xUZIVnM= X-Received: by 2002:a05:6402:406:b0:4ac:b8eb:e398 with SMTP id q6-20020a056402040600b004acb8ebe398mr4582455edv.6.1677004343982; Tue, 21 Feb 2023 10:32:23 -0800 (PST) Received: from xeon.. ([188.163.112.76]) by smtp.gmail.com with ESMTPSA id i3-20020a50c3c3000000b004af5aa16fcasm169102edf.66.2023.02.21.10.32.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Feb 2023 10:32:23 -0800 (PST) From: Svyatoslav Ryhel To: Rob Herring , Krzysztof Kozlowski , Liam Girdwood , Mark Brown , Thierry Reding , Jonathan Hunter , Greg Kroah-Hartman , Jaroslav Kysela , Takashi Iwai , Svyatoslav Ryhel , Maxim Schwalm , Dmitry Osipenko Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, linux-tegra@vger.kernel.org, linux-staging@lists.linux.dev Subject: [PATCH v1 01/10] dt-bindings: sound: nvidia,tegra-audio-common: add new property Date: Tue, 21 Feb 2023 20:32:02 +0200 Message-Id: <20230221183211.21964-2-clamor95@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230221183211.21964-1-clamor95@gmail.com> References: <20230221183211.21964-1-clamor95@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758466572823392004?= X-GMAIL-MSGID: =?utf-8?q?1758466572823392004?= Add nvidia,coupled-mic-hp-det property to use Mic detect GPIO only if HP GPIO is in active state. Signed-off-by: Svyatoslav Ryhel Acked-by: Rob Herring --- .../devicetree/bindings/sound/nvidia,tegra-audio-common.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-common.yaml b/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-common.yaml index 82801b4f46dd..7c1e9895ce85 100644 --- a/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-common.yaml +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-common.yaml @@ -80,4 +80,8 @@ properties: type: boolean description: The Mic Jack represents state of the headset microphone pin + nvidia,coupled-mic-hp-det: + type: boolean + description: The Mic detect GPIO is viable only if HP detect GPIO is active + additionalProperties: true From patchwork Tue Feb 21 18:32:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Svyatoslav Ryhel X-Patchwork-Id: 60211 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp161843wrd; Tue, 21 Feb 2023 10:33:33 -0800 (PST) X-Google-Smtp-Source: AK7set8R1p5r9bBe65fW9jKZoVWuVOyaLTarNRBt8xOoA3lPjgAgxGS1X4Ti/nfoIXuE6Nb7bE2r X-Received: by 2002:a17:906:3a46:b0:8af:54d2:2088 with SMTP id a6-20020a1709063a4600b008af54d22088mr13895790ejf.37.1677004413014; Tue, 21 Feb 2023 10:33:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677004412; cv=none; d=google.com; s=arc-20160816; b=pYLmWSV5FOmuHbHIix7C90TOoQ0f5bsAHsTsxirzN8HlVjcwRoz3eD92bAQjHlTvt8 HmFTJZh3sO/VzOQBVTriQyJ2sQRYKdR2mamuMZQxpxzjhAcLITQhEgtK69WEFRGDajsN XTHzPkHMJkIZQPUZpxinwyGStgr/RL1ZoVvX2c3bYCxNAnrHa+wIAxwcMurskCwE0mbP xHqDJ4mUOn6wq/WCN+S2+i2iUrFKdnhe/zBjirEy/l296nln13u8Vsvk3czR2nn7JXYi gk5pOnuGVHkd0U8UwCQzDhT5IoV3Cw++vrBrBqrrofrBUAFLIH1A65UGkGflhPynKDmM jhCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=IAXecBgeRkHu8ZmrGSEh+xC8pZ8csJk/gLQuqMv+ZEI=; b=CmXmbqYJ4O8D5gIFVcpE57LcoaOh3n39yO6H/4HHCQOEIYIxomYZyGDZ4TKJWF8D8d 5fLar0o7ddhKtuFUiKV4xEWqXTMkw3ClDaGeeVoAJcIu8vUovpGHBVeLSUWLS6K3/mPo 91+Zd4Pn1WrR3+4MgvhwfBY2gtXiYGOvUyztu7r+mmNcg12WrCMnIkoEjpuni7ewKDw8 ERfMAXNQDJE0g+0EaVpnLudnyaGTOBGhtpBGeURiPZQFitVpRGH8ewn9yn6lTZ7WJnhG RFNlLK43YDy2HksborjiuIJJXQDUEGH1BivWxX2x5Wdf1p7uokMPNOAmjxL2of1RGLZT Hl5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=n5P5sUEH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fi22-20020a1709073ad600b008dbed6ec6c2si4091384ejc.578.2023.02.21.10.33.07; Tue, 21 Feb 2023 10:33:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=n5P5sUEH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230078AbjBUScf (ORCPT + 99 others); Tue, 21 Feb 2023 13:32:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229436AbjBUSc3 (ORCPT ); Tue, 21 Feb 2023 13:32:29 -0500 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0B12301B7; Tue, 21 Feb 2023 10:32:26 -0800 (PST) Received: by mail-ed1-x52b.google.com with SMTP id ee7so5924244edb.2; Tue, 21 Feb 2023 10:32:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=IAXecBgeRkHu8ZmrGSEh+xC8pZ8csJk/gLQuqMv+ZEI=; b=n5P5sUEHLppfy1KRySapcmLr3VmalIXip2527iBV1pCY+xwS8ywbsnb6vBwPteurfH Ou9heSahzhfGJVOnzPjla6C+JQo2VGd0yOCOpw4k/pjtCPDEpRrjpZLdpNF66Pi1DKH9 WLP3xJQVbHYcEVJ7Wy9+73EuPBfWRbCokMg00ejhFAjQXjTyfePQrZKDmFkJzrRKuLnx e3M1VTGBwW93NFqHDNrX3XzJJqgBFJMitGzKukSDLzjuw8aKsmEHHiVsL6l5ARdcTx7Z NB5lKQ8K6GmD8sZRwzyMJ4RNTwnljCCDwYAzGsGxScbfzvJvZWnorpAYlZQpX1l6rhMw Ad/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=IAXecBgeRkHu8ZmrGSEh+xC8pZ8csJk/gLQuqMv+ZEI=; b=eEMkHVnlP+9/FwLPwFDhGRd+8cARCgDM/uj+nvUEO1gBsjYg4J2ArRluwsBwWT+tGC 9M9QxZDrOXbkJ7vPytF1jx1nZIWkQ66J+spAyCW/SkvRFpKtMQU+xNksOexZvh7naf+I voF2GL14rDxoNUwKZl9hG53kavJWXlDJPmgKIiAKX2uOoAlvAoN6BPMY7KCoDi1CWFpv 0YJXkSh3dJMQmU8rsYMwlf8oPBAAOPRT4hh1ETU7uoIue4fAWFZ2o104bJdew1wcEhb5 2vqRw/uctoMe8PIScF91Duvfayow2dPbqv3VRxMkRbfvFRbtUE+kTVtmXMk9mhv0tuyh sV6g== X-Gm-Message-State: AO0yUKVDV/km3+m3obeKLZnuszjmbeZDaeFcWSeZ8soyN0E2DPUA5EGs tOAwLbpjftDZV1nFV2LdUZQ= X-Received: by 2002:aa7:ca56:0:b0:4ae:e5ab:46d7 with SMTP id j22-20020aa7ca56000000b004aee5ab46d7mr3752692edt.8.1677004345190; Tue, 21 Feb 2023 10:32:25 -0800 (PST) Received: from xeon.. ([188.163.112.76]) by smtp.gmail.com with ESMTPSA id i3-20020a50c3c3000000b004af5aa16fcasm169102edf.66.2023.02.21.10.32.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Feb 2023 10:32:24 -0800 (PST) From: Svyatoslav Ryhel To: Rob Herring , Krzysztof Kozlowski , Liam Girdwood , Mark Brown , Thierry Reding , Jonathan Hunter , Greg Kroah-Hartman , Jaroslav Kysela , Takashi Iwai , Svyatoslav Ryhel , Maxim Schwalm , Dmitry Osipenko Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, linux-tegra@vger.kernel.org, linux-staging@lists.linux.dev Subject: [PATCH v1 02/10] sound: soc: jack: allow multiple interrupt per gpio Date: Tue, 21 Feb 2023 20:32:03 +0200 Message-Id: <20230221183211.21964-3-clamor95@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230221183211.21964-1-clamor95@gmail.com> References: <20230221183211.21964-1-clamor95@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758466579431713782?= X-GMAIL-MSGID: =?utf-8?q?1758466579431713782?= This feature is required for coupled hp-mic quirk used by some Nvidia Tegra 3 based devices work properly. Signed-off-by: Svyatoslav Ryhel --- sound/soc/soc-jack.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c index fcece5ca38c6..f951acb2ce36 100644 --- a/sound/soc/soc-jack.c +++ b/sound/soc/soc-jack.c @@ -367,6 +367,7 @@ int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count, ret = request_any_context_irq(gpiod_to_irq(gpios[i].desc), gpio_handler, + IRQF_SHARED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, gpios[i].name, From patchwork Tue Feb 21 18:32:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Svyatoslav Ryhel X-Patchwork-Id: 60212 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp161845wrd; Tue, 21 Feb 2023 10:33:33 -0800 (PST) X-Google-Smtp-Source: AK7set9KBJ0hA64Z1rR0N+oEAp9dAxCoIDdYj4ve/sIOZPRlb8Hq4i2H9yE/qH/QaVQfFZP9C/F5 X-Received: by 2002:aa7:cfd7:0:b0:4a2:223d:4514 with SMTP id r23-20020aa7cfd7000000b004a2223d4514mr6189403edy.8.1677004413167; Tue, 21 Feb 2023 10:33:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677004413; cv=none; d=google.com; s=arc-20160816; b=Yb2O6uG+jIqBEGF6Q4EAsyJGTBBwFzSM+bjYN+T8NoFJQfUDUSpziBZyJ7kFQV+s7a lflYSgmjYmyMPgm7MA+H4L+0fcynFSn/pZe2QtGuouzj0Z7Og/Ya4Km7b3gZ+wn+Oa90 jeD04UkunjOipudacJ5pjqnC0Cs1U3yCCXMDVhtu69HxK2s7x0ojdlwxY2HMvxHwR+/X iFglFQY30Mgq4Noq17YpzIHm0Z5RSa50byw/ckhXh7dGtwOOFZDNq4/H3/uQJkCtavDL TaAqJYiJdVgdfwDvCOnQWILeSccD59mEkiQwK61naWC2uMQ0otfCbqOsjXu8phsC/ELe EYQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=NH8T3uIDsMsshselwDvDLZiGP6dvAgAvE+M69z4Yx3w=; b=ce1AL81GJzIrgNOsrehKIQEbUiVdWCp5uG5U7EGmk+1Y+d5Wjnmh+2oynKsCHUB3Fh 9++PMKiqWURjpV0fBvsqu74IOzII5OBUMrO+bgeUnIjeDZTHZqyWPA62KtvpH0GN2MJO t8Rs0kfmB1DzDsk2OP/tKWB/XFbtxX3dXwcNQXq4LWMQFreVPdi/wACEvtXYoESF3lSN Wj6l8uAxJQc+Qw/tmEUgdo1UX3s+U/YdPJ2+mO16iEVSlGgCnyRavX5aPSm/nRsC0NUo Vxpvpf/CWiuKh2icb9lPukYDnlwGBBSIWkQP2CP2hDUluVQtDK4OEKe7UdHJnDNLXzVk IenA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="H/CTM8eq"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n4-20020aa7c444000000b004ada4edd8fcsi15873973edr.63.2023.02.21.10.33.10; Tue, 21 Feb 2023 10:33:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="H/CTM8eq"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230265AbjBUSci (ORCPT + 99 others); Tue, 21 Feb 2023 13:32:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229767AbjBUScd (ORCPT ); Tue, 21 Feb 2023 13:32:33 -0500 Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E8ED30289; Tue, 21 Feb 2023 10:32:28 -0800 (PST) Received: by mail-ed1-x530.google.com with SMTP id cq23so20729753edb.1; Tue, 21 Feb 2023 10:32:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=NH8T3uIDsMsshselwDvDLZiGP6dvAgAvE+M69z4Yx3w=; b=H/CTM8eqll4oT5mdFcfpaEYryD5fvk1h+y1Tbx39YEVekGOVolmb/0uTeQLtxZE1fl nDKd8uCmSKwbzkevYopP8oOoFWbX2MXvWsA+tthPw6mCF7xFgwJQ6ewYSQWOnIpFuEp0 usH3bVyQ8WsYbQNcJKdo4W66lYT+ccTnrksgYnsj25QXX8kAA6kb7EjfloCTaMMZbNj4 qEDw4FB3oxyV9Tde9ie1Giv02lSDCDtlfinG12y6McC7sJDtCpXccNxQH57lziAcFRC8 Pi1gP8ynmxlLGKRC1nrgyosthPKS7dQQve9gmYtWzxYIsSWDWD41OQDvf9v+PnrIDjL0 4yYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=NH8T3uIDsMsshselwDvDLZiGP6dvAgAvE+M69z4Yx3w=; b=EHx8vFrGbWsID4deej76ZP77U8d2yryibh7fMmOPRRzRDMCTzSTFyFFPM5Cwu1sbSS V0hat0JFwhdDNAHbJGWZSJhNkSJDS61OARaOWg3lXsAv50YCsuFgcjRulAtAEZv3fBRP aMOgDnSEyxMWUH05vuSllPWY+zO8o4NLBf3yQSl5aMgpSTaU/bErk2KYNYZIQnxPrHzs v+UF+HZQMRrHuSyOKoCqR/hqS433OKrB1I3ikXayNc3s5YeBE7QNQdP9VGMWiZAfAcIY WdUNe19Ug+cwLuXPmmo4rloYvb6R+bsh1R2OCw+EonMaI4f9L0+9pu87SthALW7BZHkH 75pw== X-Gm-Message-State: AO0yUKXqSioXf+B5V4zsCMlzjN367KOfxJCUVBNUfpkzeTM/XkBenSyY TwEruqIatpjHAQkLS8pIs4QuH0apitgdpw== X-Received: by 2002:aa7:c055:0:b0:4ac:bbd8:d04a with SMTP id k21-20020aa7c055000000b004acbbd8d04amr6237682edo.5.1677004346521; Tue, 21 Feb 2023 10:32:26 -0800 (PST) Received: from xeon.. ([188.163.112.76]) by smtp.gmail.com with ESMTPSA id i3-20020a50c3c3000000b004af5aa16fcasm169102edf.66.2023.02.21.10.32.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Feb 2023 10:32:26 -0800 (PST) From: Svyatoslav Ryhel To: Rob Herring , Krzysztof Kozlowski , Liam Girdwood , Mark Brown , Thierry Reding , Jonathan Hunter , Greg Kroah-Hartman , Jaroslav Kysela , Takashi Iwai , Svyatoslav Ryhel , Maxim Schwalm , Dmitry Osipenko Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, linux-tegra@vger.kernel.org, linux-staging@lists.linux.dev Subject: [PATCH v1 03/10] dt-bindings: sound: nvidia,tegra-audio: add RT5631 CODEC Date: Tue, 21 Feb 2023 20:32:04 +0200 Message-Id: <20230221183211.21964-4-clamor95@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230221183211.21964-1-clamor95@gmail.com> References: <20230221183211.21964-1-clamor95@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758466579442022896?= X-GMAIL-MSGID: =?utf-8?q?1758466579442022896?= From: David Heidelberg Add dt-binding for RT5631 CODEC. Signed-off-by: David Heidelberg --- .../sound/nvidia,tegra-audio-rt5631.yaml | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-rt5631.yaml diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-rt5631.yaml b/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-rt5631.yaml new file mode 100644 index 000000000000..b347f34c47f2 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-rt5631.yaml @@ -0,0 +1,88 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/nvidia,tegra-audio-rt5631.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NVIDIA Tegra audio complex with RT5631 CODEC + +maintainers: + - Jon Hunter + - Thierry Reding + +allOf: + - $ref: nvidia,tegra-audio-common.yaml# + +properties: + compatible: + items: + - pattern: '^[a-z0-9]+,tegra-audio-rt5631(-[a-z0-9]+)+$' + - const: nvidia,tegra-audio-rt5631 + + nvidia,audio-routing: + $ref: /schemas/types.yaml#/definitions/non-unique-string-array + 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. Valid names for sources and + sinks are the pins (documented in the binding document), + and the jacks on the board. + minItems: 2 + items: + enum: + # Board Connectors + - "Int Spk" + - "Headphone Jack" + - "Mic Jack" + - "Int Mic" + + # CODEC Pins + - MIC1 + - MIC2 + - AXIL + - AXIR + - MONOIN_RXN + - MONOIN_RXP + - DMIC + - MIC Bias1 + - MIC Bias2 + - MONO_IN + - AUXO1 + - AUXO2 + - SPOL + - SPOR + - HPOL + - HPOR + - MONO + +required: + - nvidia,i2s-controller + +unevaluatedProperties: false + +examples: + - | + #include + #include + sound { + compatible = "asus,tegra-audio-rt5631-tf700t", + "nvidia,tegra-audio-rt5631"; + nvidia,model = "Asus Transformer Infinity TF700T RT5631"; + + nvidia,audio-routing = + "Headphone Jack", "HPOL", + "Headphone Jack", "HPOR", + "Int Spk", "SPOL", + "Int Spk", "SPOR", + "MIC1", "MIC Bias1", + "MIC Bias1", "Mic Jack", + "DMIC", "Int Mic"; + + nvidia,i2s-controller = <&tegra_i2s1>; + nvidia,audio-codec = <&rt5631>; + + clocks = <&tegra_car TEGRA30_CLK_PLL_A>, + <&tegra_car TEGRA30_CLK_PLL_A_OUT0>, + <&tegra_pmc TEGRA_PMC_CLK_OUT_1>; + clock-names = "pll_a", "pll_a_out0", "mclk"; + }; From patchwork Tue Feb 21 18:32:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Svyatoslav Ryhel X-Patchwork-Id: 60213 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp162082wrd; Tue, 21 Feb 2023 10:34:07 -0800 (PST) X-Google-Smtp-Source: AK7set8B65YWLr8hUbXI1CilmfTHqU24hMAwILNHRvhL20kPOkAnoS1u390UZpYvLerPk4rGq6Dm X-Received: by 2002:aa7:da4f:0:b0:4ad:5950:3f49 with SMTP id w15-20020aa7da4f000000b004ad59503f49mr5433841eds.7.1677004446910; Tue, 21 Feb 2023 10:34:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677004446; cv=none; d=google.com; s=arc-20160816; b=tXG5pRYVzgW1oAD43hCSY7Fj40EePRKSHYVBQJr+kmLJ5Y03ScOiozt/HQRsnF36Qo 4GiNBUBUNOyepcGvQI8LmaUuJ4/LsthYTeXhLbpGpXbGGjMVeEgxpHKszyeLy2ozH3qX aZnaECLzjhY5ytplPjUH7g8GQNzifHOWsPvEpvXbellERu4xptyAmQRQ7l57UsyxVk3z Z1zTELiX5xnytvKfYwbxxFjkToPzii8akylYbPGFLC8i/tk+i7snI+l0siJ7dn1Yd/tS 17q8q5jrha7d3NhNL6lLXhLNMPzHuRwG//0eT1SeEfTqNS82RpPL2RLsllL/y9zd9Oo/ 0Gwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=2lCpP86gR9PkFUN8BPLcadI1otAfEY6NobKYiSJ0+e8=; b=XdNilYJSYKy9xADcVu6LlU402CD4bkOvlfhdF/vbMIDD5ntKhlB+/bxZrIRFiGcLvm sAR9MJV7zSQvJyCycu4t7lka2t3L6l9+ANER+AgfUYUft9Pe949hkFRrlOfuJ+TB2Hzl 8/FWUgB5eYBQlR9mjgS79Bhh7NfZ94fzmJUk5HWbrH2SsumEtd8dQeypwOcwXTKIUOrN 0EPC5JXP6c8kyuFutJLcWbzSexJPBDZ1YOUuMaWPXLbNfNF8g0+oQf6lB3Q4o+hzQnwm 41FU/bh6XwyKm2LwZtH8j6lY83dyfyzgj2HX8g6YYvyZLC4hOxOtomJZl6TuVnP2z0X5 t0MQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=mpAJ+X9K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u17-20020a05640207d100b004ad041aa896si4069763edy.185.2023.02.21.10.33.43; Tue, 21 Feb 2023 10:34:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=mpAJ+X9K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230263AbjBUSco (ORCPT + 99 others); Tue, 21 Feb 2023 13:32:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230148AbjBUScf (ORCPT ); Tue, 21 Feb 2023 13:32:35 -0500 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25A1D301A0; Tue, 21 Feb 2023 10:32:29 -0800 (PST) Received: by mail-ed1-x52d.google.com with SMTP id ee7so5924703edb.2; Tue, 21 Feb 2023 10:32:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=2lCpP86gR9PkFUN8BPLcadI1otAfEY6NobKYiSJ0+e8=; b=mpAJ+X9KuU94JQa7v1MFLP7LPRRK2SWC5sC8arMYBw1H8c9DYwRZJUTnE+em+9mntW QLJRTRcAFul/3ZNUZfRtwC2ERxv2X+tQcNLFm6v9ssXcl6cOXy4P7s7R1UcpkXQlcChU N9tMOZZ+R4zCuaQCE0pbdyKCICRPgNdaBvEI40fyr7VnwUHXwjuRQ+Vrrgo1+4L0Yx5i XK6yV13Rhgtqq4aOPOrJaAmmx+ZXZ98VUqhk8pAKOp7fjcBbpuF8lNmsPOYsUJRpbb7n 5krWw/CFLj1k9JAUbFwUlr8lH4Y8f3Jt5bedLtnXzZeZGqMya7aKlWIFc3EG9ciKHTEk 6A4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=2lCpP86gR9PkFUN8BPLcadI1otAfEY6NobKYiSJ0+e8=; b=SgdId51rrUFm6AW+8wFvnq6zgpvEmG6sNW0aofJCgXAp/kWzSybxnquC9RdQw0P2pl ZhKnUeaE/07gctFrxT7Lv+UNQ+Uu9YXApVU9ZNIzbmYtXczfpirAzF4WRvvUTCVb3x5/ iukT6ls9nsKVL+cOaCzkLnrAsO/HaXIWbziDqBs247E6Vj05TAgMOxZlaUoj/3CRj/8J pxsCu54L+VCeVNOxXUoMq5/5Xn8vduYbqYkHifQaBWEIJYQS3qGm7svSf94D/e1qvZf7 ii1oR2UwePNntrl1Gk8ghlGcfT/d/Y++57jlCi59WkWwTHox1OmcjYHOGTJ3J+4Gfeit 5OBQ== X-Gm-Message-State: AO0yUKUW9GLXfp3EFrGPAkBgm8gu3/0enw6yk0exJS3+JAMc1aBJdsDm a5pH6x3o0pyuvdh+zn/AC8A= X-Received: by 2002:aa7:d38f:0:b0:4ac:d2cd:81c7 with SMTP id x15-20020aa7d38f000000b004acd2cd81c7mr5883673edq.5.1677004347748; Tue, 21 Feb 2023 10:32:27 -0800 (PST) Received: from xeon.. ([188.163.112.76]) by smtp.gmail.com with ESMTPSA id i3-20020a50c3c3000000b004af5aa16fcasm169102edf.66.2023.02.21.10.32.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Feb 2023 10:32:27 -0800 (PST) From: Svyatoslav Ryhel To: Rob Herring , Krzysztof Kozlowski , Liam Girdwood , Mark Brown , Thierry Reding , Jonathan Hunter , Greg Kroah-Hartman , Jaroslav Kysela , Takashi Iwai , Svyatoslav Ryhel , Maxim Schwalm , Dmitry Osipenko Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, linux-tegra@vger.kernel.org, linux-staging@lists.linux.dev Subject: [PATCH v1 04/10] ASoC: tegra: Support RT5631 by machine driver Date: Tue, 21 Feb 2023 20:32:05 +0200 Message-Id: <20230221183211.21964-5-clamor95@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230221183211.21964-1-clamor95@gmail.com> References: <20230221183211.21964-1-clamor95@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758466614925402954?= X-GMAIL-MSGID: =?utf-8?q?1758466614925402954?= Add Realtek ALC5631/RT5631 codec support to the Tegra ASoC machine driver. The RT5631 codec is found on devices like ASUS Transformer TF201, TF700T and other Tegra-based Android tablets. Signed-off-by: Svyatoslav Ryhel Signed-off-by: Ion Agorria --- sound/soc/tegra/Kconfig | 9 ++++ sound/soc/tegra/tegra_asoc_machine.c | 74 ++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+) diff --git a/sound/soc/tegra/Kconfig b/sound/soc/tegra/Kconfig index b6712a3d1fa1..ff905e5dcd86 100644 --- a/sound/soc/tegra/Kconfig +++ b/sound/soc/tegra/Kconfig @@ -189,6 +189,15 @@ config SND_SOC_TEGRA_AUDIO_GRAPH_CARD config SND_SOC_TEGRA_MACHINE_DRV tristate +config SND_SOC_TEGRA_RT5631 + tristate "SoC Audio support for Tegra boards using an RT5631 codec" + depends on SND_SOC_TEGRA && I2C && GPIOLIB + select SND_SOC_TEGRA_MACHINE_DRV + select SND_SOC_RT5631 + help + Say Y or M here if you want to add support for SoC audio on Tegra + boards using the RT5631 codec, such as Transformer. + config SND_SOC_TEGRA_RT5640 tristate "SoC Audio support for Tegra boards using an RT5640 codec" depends on I2C && GPIOLIB diff --git a/sound/soc/tegra/tegra_asoc_machine.c b/sound/soc/tegra/tegra_asoc_machine.c index 78faa8bcae27..607800ec07a6 100644 --- a/sound/soc/tegra/tegra_asoc_machine.c +++ b/sound/soc/tegra/tegra_asoc_machine.c @@ -51,6 +51,17 @@ static struct snd_soc_jack_gpio tegra_machine_headset_jack_gpio = { }; /* Mic Jack */ +static int headset_check(void *data) +{ + struct tegra_machine *machine = (struct tegra_machine *)data; + + /* Detect mic insertion only if 3.5 jack is in */ + if (gpiod_get_value_cansleep(machine->gpiod_hp_det) && + gpiod_get_value_cansleep(machine->gpiod_mic_det)) + return SND_JACK_MICROPHONE; + + return 0; +} static struct snd_soc_jack tegra_machine_mic_jack; @@ -183,8 +194,15 @@ int tegra_asoc_machine_init(struct snd_soc_pcm_runtime *rtd) return err; } + tegra_machine_mic_jack_gpio.data = machine; tegra_machine_mic_jack_gpio.desc = machine->gpiod_mic_det; + if (of_property_read_bool(card->dev->of_node, + "nvidia,coupled-mic-hp-det")) { + tegra_machine_mic_jack_gpio.desc = machine->gpiod_hp_det; + tegra_machine_mic_jack_gpio.jack_status_check = headset_check; + }; + err = snd_soc_jack_add_gpios(&tegra_machine_mic_jack, 1, &tegra_machine_mic_jack_gpio); if (err) @@ -238,6 +256,27 @@ static unsigned int tegra_machine_mclk_rate_12mhz(unsigned int srate) return mclk; } +static unsigned int tegra_machine_mclk_rate_6mhz(unsigned int srate) +{ + unsigned int mclk; + + switch (srate) { + case 64000: + case 88200: + case 96000: + mclk = 128 * srate; + break; + default: + mclk = 256 * srate; + break; + } + /* FIXME: Codec only requires >= 3MHz if OSR==0 */ + while (mclk < 6000000) + mclk *= 2; + + return mclk; +} + static int tegra_machine_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { @@ -865,6 +904,40 @@ static const struct tegra_asoc_data tegra_rt5632_data = { .add_headset_jack = true, }; +/* RT5631 machine */ + +SND_SOC_DAILINK_DEFS(rt5631_hifi, + DAILINK_COMP_ARRAY(COMP_EMPTY()), + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "rt5631-hifi")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +static struct snd_soc_dai_link tegra_rt5631_dai = { + .name = "RT5631", + .stream_name = "RT5631 PCM", + .init = tegra_asoc_machine_init, + .dai_fmt = SND_SOC_DAIFMT_I2S | + SND_SOC_DAIFMT_NB_NF | + SND_SOC_DAIFMT_CBS_CFS, + SND_SOC_DAILINK_REG(rt5631_hifi), +}; + +static struct snd_soc_card snd_soc_tegra_rt5631 = { + .components = "codec:rt5631", + .dai_link = &tegra_rt5631_dai, + .num_links = 1, + .fully_routed = true, +}; + +static const struct tegra_asoc_data tegra_rt5631_data = { + .mclk_rate = tegra_machine_mclk_rate_6mhz, + .card = &snd_soc_tegra_rt5631, + .add_common_dapm_widgets = true, + .add_common_controls = true, + .add_common_snd_ops = true, + .add_mic_jack = true, + .add_hp_jack = true, +}; + static const struct of_device_id tegra_machine_of_match[] = { { .compatible = "nvidia,tegra-audio-trimslice", .data = &tegra_trimslice_data }, { .compatible = "nvidia,tegra-audio-max98090", .data = &tegra_max98090_data }, @@ -874,6 +947,7 @@ static const struct of_device_id tegra_machine_of_match[] = { { .compatible = "nvidia,tegra-audio-rt5677", .data = &tegra_rt5677_data }, { .compatible = "nvidia,tegra-audio-rt5640", .data = &tegra_rt5640_data }, { .compatible = "nvidia,tegra-audio-alc5632", .data = &tegra_rt5632_data }, + { .compatible = "nvidia,tegra-audio-rt5631", .data = &tegra_rt5631_data }, {}, }; MODULE_DEVICE_TABLE(of, tegra_machine_of_match); From patchwork Tue Feb 21 18:32:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Svyatoslav Ryhel X-Patchwork-Id: 60214 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp162148wrd; Tue, 21 Feb 2023 10:34:18 -0800 (PST) X-Google-Smtp-Source: AK7set9HzWL0XFoKP/SrNC6z7q36J/nVsFVW4h5ljV+l+6K2T3fJLsnOOJQuHKhG3IQNhaIjRQVT X-Received: by 2002:aa7:cd4c:0:b0:4ae:e5ab:81ec with SMTP id v12-20020aa7cd4c000000b004aee5ab81ecmr4210004edw.13.1677004457899; Tue, 21 Feb 2023 10:34:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677004457; cv=none; d=google.com; s=arc-20160816; b=f9LCCzpWYq6FCc3jechQelu47qw2/kfwpZ4mDP6Auu9vL8CAjuniU3JTSl9TWpNLfk mI9LZs+7+sBhA5BorvNKDYtGbvCP62Vv/0kNQg/KNhIF244TMxxT7vyyKoFM/06okhX4 fTMxhW+riF50oYHPc9nWxsLNG9U5gVNK1UQ76FzMpLv2DVt4Z7txvf14IxAt4Is9VoO/ v/OI8M7lZyEnASMMEmiQdFV5S6KkTQZXKO6eaTymuiItcnb0yq0EKS8I3M7Mdow7KbV1 TzHaodvyp8Vm1qUnPA5LL5cAiHddJZF5A/hoWOeK8HSgkvhJTh8Z1eNRb1629JT9Fj89 20hQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=7mbS3PQtaiGcPdHVmHK5KHmqLpEohCcTweQJ5EgXuiY=; b=Q2aQ/BastmsMD6WVpoMc9z7INDkAuC2ky6tLSr7SnVmls95Ks8gtQ5Z9yB9BjIZZeD ib4dN85Mh3zvvqY5QIDMOoIlcuDTOIibRvDsuDUxtmQREsFWI632INwgfAaGPgzPtcKQ NZXnRTglsj4elVdDMtV/l41IlQlWyU6lPSPpr39eRpPlV+NAJUBGyw2ucwrxbAHe/8Y0 nOCDq6tDlNsdMlvaHd4cz4STcUxB6hLvM6275qzi2iupl0mcEporSsXVE1TaJrrGCsjk MKQgz4h2tD9TzZANV7/Ihijg1UqPCznXFpu2avYMpXI3qaKkMJFlqfhm9vBKnE7XCO+3 898A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Ku08TnoY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v9-20020aa7cd49000000b004acb59c4c25si7263049edw.542.2023.02.21.10.33.53; Tue, 21 Feb 2023 10:34:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Ku08TnoY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230433AbjBUScq (ORCPT + 99 others); Tue, 21 Feb 2023 13:32:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230232AbjBUSch (ORCPT ); Tue, 21 Feb 2023 13:32:37 -0500 Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 720412E0F7; Tue, 21 Feb 2023 10:32:30 -0800 (PST) Received: by mail-ed1-x52e.google.com with SMTP id h16so21178562edz.10; Tue, 21 Feb 2023 10:32:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=7mbS3PQtaiGcPdHVmHK5KHmqLpEohCcTweQJ5EgXuiY=; b=Ku08TnoYik5za8z9qvRzVXLT6c1xZUixmrWodB6t+suqVat/3n0Jrtzr2IhboiCRAY 5FMHqXM69Wqmuv37UIZs9hnkJDlSU5NXr8q/eTdNH6ijCZ14qZDxT5F0MjOKYzrCqedA ZgN/y+y2CWqj8Dvo0DImcvd1Cwzz2/uU9y22Coi3WqQPRw72Hc07WlrlD6Xu4ESJznPF 53etHxCFf0ql6+sX4Dc8LbjYpRLpFA3qEdH6Ca5ytApvCVqCXWjN7OTBrGS9d3jahpq7 EoMseFH8UTUkyIFmVLW1cA8Ae76cpFEXGNlY7Yo4U14vWM1R1Pke0ywsLllqLCT5uNSF B/AQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=7mbS3PQtaiGcPdHVmHK5KHmqLpEohCcTweQJ5EgXuiY=; b=hlOEI/cMl/MhnhXNiXrXelh95TOOrUYwijZ2e7BYmdaBztsa1I/xLJu0jiCkRh+8mk xNz5tRd+0YB5uYczlp6DkqM8L9eGgv1+niOnXWc6nnoN09Hg1DzOUkg0IkHzuDRwa1xA yoZy4UDeHPQC394GuGfCWx3hKpnIjljXOTVMFifJlRklFcfgTXg4k1SBv48aoxsmoQzJ evI2gkPxSuCwiRUgJUQU0HMlmJ7NCs7ES9YzFb/HNu9ak7BbEMgLe2A5MW1+w8SjTze3 GgzOs8suGx7WxkEIXl/pMRiqj+UAcDzPrxr39Bjwm1aprzhV6+pWGRmnM4r7K6eLu7Mu dtBw== X-Gm-Message-State: AO0yUKXSr1hGC7uqHZvAnR8SF0EmFciyLyXawrNrGeHTixIDSJdm0Tu3 6Hio5ImlTXZo327ukdOeX5HEI4aNeOGUSg== X-Received: by 2002:a50:ee01:0:b0:4ae:eb0f:892e with SMTP id g1-20020a50ee01000000b004aeeb0f892emr5579895eds.20.1677004348983; Tue, 21 Feb 2023 10:32:28 -0800 (PST) Received: from xeon.. ([188.163.112.76]) by smtp.gmail.com with ESMTPSA id i3-20020a50c3c3000000b004af5aa16fcasm169102edf.66.2023.02.21.10.32.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Feb 2023 10:32:28 -0800 (PST) From: Svyatoslav Ryhel To: Rob Herring , Krzysztof Kozlowski , Liam Girdwood , Mark Brown , Thierry Reding , Jonathan Hunter , Greg Kroah-Hartman , Jaroslav Kysela , Takashi Iwai , Svyatoslav Ryhel , Maxim Schwalm , Dmitry Osipenko Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, linux-tegra@vger.kernel.org, linux-staging@lists.linux.dev Subject: [PATCH v1 05/10] dt-bindings: sound: nvidia,tegra-audio: add MAX9808x CODEC Date: Tue, 21 Feb 2023 20:32:06 +0200 Message-Id: <20230221183211.21964-6-clamor95@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230221183211.21964-1-clamor95@gmail.com> References: <20230221183211.21964-1-clamor95@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758466626320153300?= X-GMAIL-MSGID: =?utf-8?q?1758466626320153300?= Add dt-binding for MAX9808x CODEC. Signed-off-by: Svyatoslav Ryhel Reviewed-by: Rob Herring --- .../sound/nvidia,tegra-audio-max9808x.yaml | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-max9808x.yaml diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-max9808x.yaml b/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-max9808x.yaml new file mode 100644 index 000000000000..256ca4ad081e --- /dev/null +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-max9808x.yaml @@ -0,0 +1,93 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/nvidia,tegra-audio-max9808x.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NVIDIA Tegra audio complex with MAX9808x CODEC + +maintainers: + - Jon Hunter + - Thierry Reding + +allOf: + - $ref: nvidia,tegra-audio-common.yaml# + +properties: + compatible: + oneOf: + - items: + - pattern: '^[a-z0-9]+,tegra-audio-max98088(-[a-z0-9]+)+$' + - const: nvidia,tegra-audio-max98088 + - items: + - pattern: '^[a-z0-9]+,tegra-audio-max98089(-[a-z0-9]+)+$' + - const: nvidia,tegra-audio-max98089 + + nvidia,audio-routing: + $ref: /schemas/types.yaml#/definitions/non-unique-string-array + 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. Valid names for sources and + sinks are the pins (documented in the binding document), + and the jacks on the board. + minItems: 2 + items: + enum: + # Board Connectors + - "Int Spk" + - "Headphone Jack" + - "Earpiece" + - "Headset Mic" + - "Internal Mic 1" + - "Internal Mic 2" + + # CODEC Pins + - HPL + - HPR + - SPKL + - SPKR + - RECL + - RECR + - INA1 + - INA2 + - INB1 + - INB2 + - MIC1 + - MIC2 + - MICBIAS + +required: + - nvidia,i2s-controller + +unevaluatedProperties: false + +examples: + - | + #include + #include + sound { + compatible = "lge,tegra-audio-max98089-p895", + "nvidia,tegra-audio-max98089"; + nvidia,model = "LG Optimus Vu MAX98089"; + + nvidia,audio-routing = + "Headphone Jack", "HPL", + "Headphone Jack", "HPR", + "Int Spk", "SPKL", + "Int Spk", "SPKR", + "Earpiece", "RECL", + "Earpiece", "RECR", + "INA1", "Headset Mic", + "MIC1", "MICBIAS", + "MICBIAS", "Internal Mic 1", + "MIC2", "Internal Mic 2"; + + nvidia,i2s-controller = <&tegra_i2s0>; + nvidia,audio-codec = <&codec>; + + clocks = <&tegra_car TEGRA30_CLK_PLL_A>, + <&tegra_car TEGRA30_CLK_PLL_A_OUT0>, + <&tegra_pmc TEGRA_PMC_CLK_OUT_1>; + clock-names = "pll_a", "pll_a_out0", "mclk"; + }; From patchwork Tue Feb 21 18:32:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Svyatoslav Ryhel X-Patchwork-Id: 60215 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp162741wrd; Tue, 21 Feb 2023 10:35:42 -0800 (PST) X-Google-Smtp-Source: AK7set8usB6Qyd2PUE0cIg/fXnaeq9VXh8GMFNybH0H7KOzUk64umDAt6/VBf14vFoh8+KMUiMA5 X-Received: by 2002:a17:90a:19ce:b0:233:d10f:5236 with SMTP id 14-20020a17090a19ce00b00233d10f5236mr6255416pjj.28.1677004542012; Tue, 21 Feb 2023 10:35:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677004541; cv=none; d=google.com; s=arc-20160816; b=Gl8d7p3I436eGt4hHOE+kki1gE8C/23G8i6oNp8IEoobxxgA0u25N7Kchf8TX4Q9+U BV1mYhMrIY/Uy0gqUI/Xfw3sy9NwXWd0pJ7naxhn2WkKv42O/QAmH4k7MllPafrVNYmN n6TS7htXoVZi+7CR4Yz3RQ9sjfAIc4sQ9Zko11vOLPkhC09mFKJozAjb73e1zOIXg8jI F8raOMH4heCCVC/OwheGSqWp1pPri+JeNrjFiA7xxAznhvRuENN9lQ3X9siRQscScnKp H/hKHCZz1bsWgru7PBkPbGGtWptdm24+ZdNGOqGhY33O4uBv/uY4eLn6J6xVjOBUMgKS CgPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=L9otEBsT6k51szcPeR0kTauQC7TYJHg3vZcCUlJI+pc=; b=LqNWdohtj8f+7R7OFCHxAhZ29Q04nzkoEsS9fnw6CZJWyaJorH3WbFEToDsQ8K71gl Ivtl3D8Vuu3b86gL19ccF1ciHFUe4Zcsqx+KJRu3OH8hfXxaFuc2Jhzw9nrrKZDrkPGW yiN76hnI/WYyv/mui2ukPWtNnpSTPEPBOsXnSK0BSr9RMoAj+imeey86CHqPGNvEBH/o AVUI5iaXVDra0NB1x8BthY9w+2XVzwHk1vulLl3/EhrqcXAs88CPNB+ganEol1X1HDBc B57+SyNo9qtEyjD9mtKi7o6S3ZgOTxB6CeOEffWIt/Nosd6KC01OzWRNxsaP6Y4H7oGo EFiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=P2rP1loD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fs11-20020a17090af28b00b0022c4ddf8413si8370757pjb.8.2023.02.21.10.35.29; Tue, 21 Feb 2023 10:35:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=P2rP1loD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230499AbjBUScu (ORCPT + 99 others); Tue, 21 Feb 2023 13:32:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230327AbjBUScn (ORCPT ); Tue, 21 Feb 2023 13:32:43 -0500 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14A2D303C9; Tue, 21 Feb 2023 10:32:32 -0800 (PST) Received: by mail-ed1-x532.google.com with SMTP id eg37so17184565edb.12; Tue, 21 Feb 2023 10:32:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=L9otEBsT6k51szcPeR0kTauQC7TYJHg3vZcCUlJI+pc=; b=P2rP1loDB9zDzKlPh8AUJXtkTwSG1jgp86DgcAWNlj14I1aKsyb/hY0cEu1mK/Em6v 2VbL/pm9rgAIQGZXIqeZ3VRz3/sRqwnBOLwwjX6tj+LYaVa31idu512iPJmBe75R5Wy0 SHMkE1qGCiJBrg2Gf02BCmoBRxVgHAlWM1zJlC9JnTXYn3+P4Ampb59c7Zzw/5cdbBag sJ4RJNxoRZC1or0mkhU6Ufi0LxIV6RMY7a/dQtOaww8wdtsMTPuVABcsplPD6FOlKXZa /9gYkT7e7/zI/eXBoS6cOqF3OfzoOGvRFtUgI6rucRtMP366vsS7/8HpZkIzrMF96XuD o77Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=L9otEBsT6k51szcPeR0kTauQC7TYJHg3vZcCUlJI+pc=; b=0AfFP6dEVC6U7vvIGI4gBEhFxxKll9Rz7gMqcUjCQrOIyagHdBbuYnMqYpJ7xnWrXH sZqD/WRar+vGD68dEl2ov0gdlN7d0kncfiVOyc4Cz8WJdksrCtRrUR99IKWcFsILayZU tYiOMogcYzEYu/ng1CXyIaMZSIUIUZvxaNYP5cLTzRSh4nH3Dd0VjEAOWR5Ruoh3zc0x aCcPQyqREW8w8UoU7KqgFQMrHak7zLR6RwWN7XohECtgJQShJDQcjPgpwF5X/RyBEKLT 4icFxNZREVTU8hcmfEpdei3bvjJnSuxO83suLSbHLije55Qt6LH/9mA5R4C/hG2t2TVu nDaQ== X-Gm-Message-State: AO0yUKUQLqo9EUevruStdC+DTZXJ/rrqA/PuPqpdD+8BOllECQAo4iyt Wv8HCNcpJ3KoSSUwMpXJ5+E= X-Received: by 2002:a05:6402:164c:b0:4ad:7c30:25a3 with SMTP id s12-20020a056402164c00b004ad7c3025a3mr6436926edx.1.1677004350203; Tue, 21 Feb 2023 10:32:30 -0800 (PST) Received: from xeon.. ([188.163.112.76]) by smtp.gmail.com with ESMTPSA id i3-20020a50c3c3000000b004af5aa16fcasm169102edf.66.2023.02.21.10.32.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Feb 2023 10:32:29 -0800 (PST) From: Svyatoslav Ryhel To: Rob Herring , Krzysztof Kozlowski , Liam Girdwood , Mark Brown , Thierry Reding , Jonathan Hunter , Greg Kroah-Hartman , Jaroslav Kysela , Takashi Iwai , Svyatoslav Ryhel , Maxim Schwalm , Dmitry Osipenko Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, linux-tegra@vger.kernel.org, linux-staging@lists.linux.dev Subject: [PATCH v1 06/10] ASoC: tegra: Support MAX9808x by machine driver Date: Tue, 21 Feb 2023 20:32:07 +0200 Message-Id: <20230221183211.21964-7-clamor95@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230221183211.21964-1-clamor95@gmail.com> References: <20230221183211.21964-1-clamor95@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758466714998800628?= X-GMAIL-MSGID: =?utf-8?q?1758466714998800628?= Add Maxim MAX9808x codec support to the Tegra ASoC machine driver. This codec is found on LG T30 devices like Optimus 4X HD and Optimus Vu. Signed-off-by: Svyatoslav Ryhel --- sound/soc/tegra/Kconfig | 9 ++++++ sound/soc/tegra/tegra_asoc_machine.c | 46 +++++++++++++++++++++++++--- 2 files changed, 51 insertions(+), 4 deletions(-) diff --git a/sound/soc/tegra/Kconfig b/sound/soc/tegra/Kconfig index ff905e5dcd86..950f490b8d54 100644 --- a/sound/soc/tegra/Kconfig +++ b/sound/soc/tegra/Kconfig @@ -263,6 +263,15 @@ config SND_SOC_TEGRA_MAX98090 Say Y or M here if you want to add support for SoC audio on Tegra boards using the MAX98090 codec, such as Venice2. +config SND_SOC_TEGRA_MAX98088 + tristate "SoC Audio support for Tegra boards using a MAX9808x codec" + depends on I2C && GPIOLIB + select SND_SOC_TEGRA_MACHINE_DRV + select SND_SOC_MAX98088 + help + Say Y or M here if you want to add support for SoC audio on Tegra + boards using the MAX98088 codec, such as LG X3. + config SND_SOC_TEGRA_RT5677 tristate "SoC Audio support for Tegra boards using a RT5677 codec" depends on I2C && GPIOLIB diff --git a/sound/soc/tegra/tegra_asoc_machine.c b/sound/soc/tegra/tegra_asoc_machine.c index 607800ec07a6..fa0627ea20d7 100644 --- a/sound/soc/tegra/tegra_asoc_machine.c +++ b/sound/soc/tegra/tegra_asoc_machine.c @@ -86,11 +86,11 @@ static int tegra_machine_event(struct snd_soc_dapm_widget *w, gpiod_set_value_cansleep(machine->gpiod_spkr_en, SND_SOC_DAPM_EVENT_ON(event)); - if (!strcmp(w->name, "Mic Jack")) + if (!strcmp(w->name, "Mic Jack") || !strcmp(w->name, "Headset Mic")) gpiod_set_value_cansleep(machine->gpiod_ext_mic_en, SND_SOC_DAPM_EVENT_ON(event)); - if (!strcmp(w->name, "Int Mic")) + if (!strcmp(w->name, "Int Mic") || !strcmp(w->name, "Internal Mic 2")) gpiod_set_value_cansleep(machine->gpiod_int_mic_en, SND_SOC_DAPM_EVENT_ON(event)); @@ -108,11 +108,12 @@ static const struct snd_soc_dapm_widget tegra_machine_dapm_widgets[] = { SND_SOC_DAPM_HP("Headphones", NULL), SND_SOC_DAPM_SPK("Speakers", tegra_machine_event), SND_SOC_DAPM_SPK("Int Spk", tegra_machine_event), + SND_SOC_DAPM_SPK("Earpiece", NULL), SND_SOC_DAPM_MIC("Int Mic", tegra_machine_event), SND_SOC_DAPM_MIC("Mic Jack", tegra_machine_event), SND_SOC_DAPM_MIC("Internal Mic 1", NULL), - SND_SOC_DAPM_MIC("Internal Mic 2", NULL), - SND_SOC_DAPM_MIC("Headset Mic", NULL), + SND_SOC_DAPM_MIC("Internal Mic 2", tegra_machine_event), + SND_SOC_DAPM_MIC("Headset Mic", tegra_machine_event), SND_SOC_DAPM_MIC("Digital Mic", NULL), SND_SOC_DAPM_MIC("Mic", NULL), SND_SOC_DAPM_LINE("Line In Jack", NULL), @@ -123,6 +124,7 @@ static const struct snd_soc_dapm_widget tegra_machine_dapm_widgets[] = { static const struct snd_kcontrol_new tegra_machine_controls[] = { SOC_DAPM_PIN_SWITCH("Speakers"), SOC_DAPM_PIN_SWITCH("Int Spk"), + SOC_DAPM_PIN_SWITCH("Earpiece"), SOC_DAPM_PIN_SWITCH("Int Mic"), SOC_DAPM_PIN_SWITCH("Headset Mic"), SOC_DAPM_PIN_SWITCH("Internal Mic 1"), @@ -713,6 +715,40 @@ static const struct tegra_asoc_data tegra_max98090_data = { .add_hp_jack = true, }; +/* MAX98088 machine */ + +SND_SOC_DAILINK_DEFS(max98088_hifi, + DAILINK_COMP_ARRAY(COMP_EMPTY()), + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "HiFi")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +static struct snd_soc_dai_link tegra_max98088_dai = { + .name = "MAX98088", + .stream_name = "MAX98088 PCM", + .init = tegra_asoc_machine_init, + .dai_fmt = SND_SOC_DAIFMT_I2S | + SND_SOC_DAIFMT_NB_NF | + SND_SOC_DAIFMT_CBS_CFS, + SND_SOC_DAILINK_REG(max98088_hifi), +}; + +static struct snd_soc_card snd_soc_tegra_max98088 = { + .components = "codec:max98088", + .dai_link = &tegra_max98088_dai, + .num_links = 1, + .fully_routed = true, +}; + +static const struct tegra_asoc_data tegra_max98088_data = { + .mclk_rate = tegra_machine_mclk_rate_12mhz, + .card = &snd_soc_tegra_max98088, + .add_common_dapm_widgets = true, + .add_common_controls = true, + .add_common_snd_ops = true, + .add_mic_jack = true, + .add_hp_jack = true, +}; + /* SGTL5000 machine */ SND_SOC_DAILINK_DEFS(sgtl5000_hifi, @@ -941,6 +977,8 @@ static const struct tegra_asoc_data tegra_rt5631_data = { static const struct of_device_id tegra_machine_of_match[] = { { .compatible = "nvidia,tegra-audio-trimslice", .data = &tegra_trimslice_data }, { .compatible = "nvidia,tegra-audio-max98090", .data = &tegra_max98090_data }, + { .compatible = "nvidia,tegra-audio-max98088", .data = &tegra_max98088_data }, + { .compatible = "nvidia,tegra-audio-max98089", .data = &tegra_max98088_data }, { .compatible = "nvidia,tegra-audio-sgtl5000", .data = &tegra_sgtl5000_data }, { .compatible = "nvidia,tegra-audio-wm9712", .data = &tegra_wm9712_data }, { .compatible = "nvidia,tegra-audio-wm8753", .data = &tegra_wm8753_data }, From patchwork Tue Feb 21 18:32:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Svyatoslav Ryhel X-Patchwork-Id: 60216 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp162842wrd; Tue, 21 Feb 2023 10:36:02 -0800 (PST) X-Google-Smtp-Source: AK7set9d6ei3m8RN0A/TBYPUbGRZgfZfXyazA3dOZaO111XT7ZV4YTLZLtStfAPL5OlDgnTylc7S X-Received: by 2002:a17:903:228d:b0:19b:33c0:4097 with SMTP id b13-20020a170903228d00b0019b33c04097mr5542864plh.27.1677004562354; Tue, 21 Feb 2023 10:36:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677004562; cv=none; d=google.com; s=arc-20160816; b=W3+c2t57qdr4zS7UullpMLpytA4wVv6YZI+GKnOG4Kc69mjan9af9vDekJOZBuUSjy LA6050uhYxmHHjsTIqXoOqWFqd1PCgEAkr7AI4ltqKvwj/gqcv4oAjTjK3lrtdDpLVR0 YIfYaDGMQxz1K0bxxEp3suHjbAgOJ2G6o+VQ+cWwwUKAULAmxbGDK1VtEhrLBm309OLN sFi8wmiz46BeXQefS5bprLSNmSzdY9J+wKiY+ouCZDTCrJeRbc8kS8T82JBqa88nGx2G EAw4/5GFxIf5v57jSPwQFxK/8DnnN3v2HZjf/iktS4ENqs/SE4Q+UE7t6So+fkS9qFke OFhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=E6kk1KEQ/IVeQbAn9G08dCn7f0VBqM2RVSZE4nU8tG8=; b=Sj9PG+Cu+n4VEHU12eTjOPzCvjLUr/5XP1i+cpfnIeFeO5ihrxNU0l/uBs4v8I+mNb n7UcM7xAGv8xgyqwaL529EqismFAjBuIi/2YGPUS4x5T4D1cmW9+coEGz8f7Nay29LRI 4MnN8FJFrw/72XshMJWo4qVZv3YG4SE62BNv5n4+oIGJpdQP/XRTm0NNzzj1h/AQr42C jhioUda9TYzn+SsmUNETZTHkxdJS6hkp2YBdaRmzq9rJml3P+gluhwSjtEndNRqQJIDr qvZSYLgPg+xgssCgBRCT932kMaBDfkgW5PLZhXSG9rRz1P6NV39fCpd3CFfLH7GH5eLl p+TQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ZLcktQw2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f15-20020a170902684f00b0019ac13b77fdsi5604488pln.95.2023.02.21.10.35.50; Tue, 21 Feb 2023 10:36:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ZLcktQw2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231130AbjBUScy (ORCPT + 99 others); Tue, 21 Feb 2023 13:32:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230223AbjBUScn (ORCPT ); Tue, 21 Feb 2023 13:32:43 -0500 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFCF3301B7; Tue, 21 Feb 2023 10:32:31 -0800 (PST) Received: by mail-ed1-x535.google.com with SMTP id cq23so20730692edb.1; Tue, 21 Feb 2023 10:32:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=E6kk1KEQ/IVeQbAn9G08dCn7f0VBqM2RVSZE4nU8tG8=; b=ZLcktQw2yWXCWMLb+r8k3efgMJdd79CTAIDnmVywqDznjLEw7xRrl+1MN5bg3O9APj rxgt1EBGlzVHpz2UKl91tl9NqLvKa8ZN8onCQC0xPgxACvaPaRT2dG0OisdIPFfDegwe HPlqUrtQXwINZYZXwaWsVr64ce43UOrB/JyyrJ7isp/56MEvMArY/wOmTfbYiGGxvwll QcAwvI9570rgvn8J76VKSf3V9m1ttMHrCwH69JeLOdrePrwvoZYHsJNMl/fyKmV89mpn RLwy5dmrX5ezd85Uey7M786lydd2/IFPLkNgI3HbIyNm5dIStee4ktUKPnj2XKqoqH+W XE8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=E6kk1KEQ/IVeQbAn9G08dCn7f0VBqM2RVSZE4nU8tG8=; b=QYBhpZ16737WdglylLm9DsZpQAm89ry8iGuEXOKslJRJldSAYfeMnrCKhJ/duN1Smh 3/MFpkofj6kwbsxM6Wc/1EaPfwaailH1xtOMrvTm4AOtSI8dyCmtd0CWEDIg1bCYob6S EwX7kGb3WEZu1wlLIaKjVJqpjjLt4E8krM2tfAHxE1JdfavD29JP8Oc5QtyMfCcZ9FRY sw5/jMHdbJCSftToKI7ekKpnFNZx+V7pzMNTQdlbsDNiUW9w34e/qIEhpvM3mKgalOvE N3LDegaQwnQbfIcA/au4Wxdox+XNrlkRQ7qmlupABbAXG58S+ozMNjeq56kVQCMCyc2u yzSA== X-Gm-Message-State: AO0yUKVCDSmri56FkIQDOIsjHpbuGc/7FL0KwiBNQWseGZN5VR95uUyY vcJXJS3U5FmTegIE2I6eBVs= X-Received: by 2002:aa7:c908:0:b0:4af:502b:4437 with SMTP id b8-20020aa7c908000000b004af502b4437mr4090015edt.34.1677004351477; Tue, 21 Feb 2023 10:32:31 -0800 (PST) Received: from xeon.. ([188.163.112.76]) by smtp.gmail.com with ESMTPSA id i3-20020a50c3c3000000b004af5aa16fcasm169102edf.66.2023.02.21.10.32.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Feb 2023 10:32:31 -0800 (PST) From: Svyatoslav Ryhel To: Rob Herring , Krzysztof Kozlowski , Liam Girdwood , Mark Brown , Thierry Reding , Jonathan Hunter , Greg Kroah-Hartman , Jaroslav Kysela , Takashi Iwai , Svyatoslav Ryhel , Maxim Schwalm , Dmitry Osipenko Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, linux-tegra@vger.kernel.org, linux-staging@lists.linux.dev Subject: [PATCH v1 07/10] ARM: tegra: transformers: update bindings of sound graph Date: Tue, 21 Feb 2023 20:32:08 +0200 Message-Id: <20230221183211.21964-8-clamor95@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230221183211.21964-1-clamor95@gmail.com> References: <20230221183211.21964-1-clamor95@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758466735644305970?= X-GMAIL-MSGID: =?utf-8?q?1758466735644305970?= - fix headset detection in common device tree; - diverge control and detect elements for mic; - use GPIO mic detection on wm8903 devices; Signed-off-by: Svyatoslav Ryhel --- arch/arm/boot/dts/tegra20-asus-tf101.dts | 8 +++++--- arch/arm/boot/dts/tegra30-asus-tf201.dts | 17 +++++++++++++++++ arch/arm/boot/dts/tegra30-asus-tf300t.dts | 5 ++--- arch/arm/boot/dts/tegra30-asus-tf300tg.dts | 17 +++++++++++++++++ arch/arm/boot/dts/tegra30-asus-tf700t.dts | 17 +++++++++++++++++ .../dts/tegra30-asus-transformer-common.dtsi | 9 +++++---- arch/arm/boot/dts/tegra30-pegatron-chagall.dts | 2 +- 7 files changed, 64 insertions(+), 11 deletions(-) diff --git a/arch/arm/boot/dts/tegra20-asus-tf101.dts b/arch/arm/boot/dts/tegra20-asus-tf101.dts index c39ddb462ad0..8d0613567e82 100644 --- a/arch/arm/boot/dts/tegra20-asus-tf101.dts +++ b/arch/arm/boot/dts/tegra20-asus-tf101.dts @@ -1179,15 +1179,17 @@ sound { "Int Spk", "RON", "Int Spk", "LOP", "Int Spk", "LON", - "Mic Jack", "MICBIAS", - "IN1L", "Mic Jack"; + "IN1L", "Headset Mic", + "IN2L", "Headset Mic", + "DMICDAT", "Int Mic"; nvidia,i2s-controller = <&tegra_i2s1>; nvidia,audio-codec = <&wm8903>; nvidia,spkr-en-gpios = <&wm8903 2 GPIO_ACTIVE_HIGH>; nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(W, 2) GPIO_ACTIVE_LOW>; - nvidia,headset; + nvidia,mic-det-gpios = <&gpio TEGRA_GPIO(X, 1) GPIO_ACTIVE_HIGH>; + nvidia,coupled-mic-hp-det; clocks = <&tegra_car TEGRA20_CLK_PLL_A>, <&tegra_car TEGRA20_CLK_PLL_A_OUT0>, diff --git a/arch/arm/boot/dts/tegra30-asus-tf201.dts b/arch/arm/boot/dts/tegra30-asus-tf201.dts index 315c6dc068c5..47865deeb88a 100644 --- a/arch/arm/boot/dts/tegra30-asus-tf201.dts +++ b/arch/arm/boot/dts/tegra30-asus-tf201.dts @@ -605,6 +605,23 @@ haptic-feedback { enable-gpios = <&gpio TEGRA_GPIO(H, 7) GPIO_ACTIVE_HIGH>; vcc-supply = <&vdd_3v3_sys>; }; + + sound { + compatible = "asus,tegra-audio-rt5631-tf201", + "nvidia,tegra-audio-rt5631"; + nvidia,model = "Asus Transformer Prime TF201 RT5631"; + + nvidia,audio-routing = + "Headphone Jack", "HPOL", + "Headphone Jack", "HPOR", + "Int Spk", "SPOL", + "Int Spk", "SPOR", + "MIC1", "MIC Bias1", + "MIC Bias1", "Headset Mic", + "DMIC", "Int Mic"; + + nvidia,audio-codec = <&rt5631>; + }; }; &emc_icc_dvfs_opp_table { diff --git a/arch/arm/boot/dts/tegra30-asus-tf300t.dts b/arch/arm/boot/dts/tegra30-asus-tf300t.dts index f47434871a5c..78f78cca337a 100644 --- a/arch/arm/boot/dts/tegra30-asus-tf300t.dts +++ b/arch/arm/boot/dts/tegra30-asus-tf300t.dts @@ -1011,13 +1011,12 @@ sound { "Int Spk", "RON", "Int Spk", "LOP", "Int Spk", "LON", - "IN1L", "Mic Jack", - "IN2L", "Mic Jack", + "IN1L", "Headset Mic", + "IN2L", "Headset Mic", "DMICDAT", "Int Mic"; nvidia,audio-codec = <&wm8903>; nvidia,spkr-en-gpios = <&wm8903 2 GPIO_ACTIVE_HIGH>; - nvidia,headset; }; }; diff --git a/arch/arm/boot/dts/tegra30-asus-tf300tg.dts b/arch/arm/boot/dts/tegra30-asus-tf300tg.dts index 96345f821c3d..82c51e177a70 100644 --- a/arch/arm/boot/dts/tegra30-asus-tf300tg.dts +++ b/arch/arm/boot/dts/tegra30-asus-tf300tg.dts @@ -1072,6 +1072,23 @@ timing-667000000 { display-panel { compatible = "innolux,g101ice-l01"; }; + + sound { + compatible = "asus,tegra-audio-rt5631-tf300tg", + "nvidia,tegra-audio-rt5631"; + nvidia,model = "Asus Transformer Pad TF300TG RT5631"; + + nvidia,audio-routing = + "Headphone Jack", "HPOL", + "Headphone Jack", "HPOR", + "Int Spk", "SPOL", + "Int Spk", "SPOR", + "MIC1", "MIC Bias1", + "MIC Bias1", "Headset Mic", + "DMIC", "Int Mic"; + + nvidia,audio-codec = <&rt5631>; + }; }; &emc_icc_dvfs_opp_table { diff --git a/arch/arm/boot/dts/tegra30-asus-tf700t.dts b/arch/arm/boot/dts/tegra30-asus-tf700t.dts index 1a331dec3cfe..766225ebdeab 100644 --- a/arch/arm/boot/dts/tegra30-asus-tf700t.dts +++ b/arch/arm/boot/dts/tegra30-asus-tf700t.dts @@ -812,6 +812,23 @@ vdd_1v2_mipi: regulator-mipi { enable-active-high; vin-supply = <&vdd_3v3_sys>; }; + + sound { + compatible = "asus,tegra-audio-rt5631-tf700t", + "nvidia,tegra-audio-rt5631"; + nvidia,model = "Asus Transformer Infinity TF700T RT5631"; + + nvidia,audio-routing = + "Headphone Jack", "HPOL", + "Headphone Jack", "HPOR", + "Int Spk", "SPOL", + "Int Spk", "SPOR", + "MIC1", "MIC Bias1", + "MIC Bias1", "Headset Mic", + "DMIC", "Int Mic"; + + nvidia,audio-codec = <&rt5631>; + }; }; &emc_icc_dvfs_opp_table { diff --git a/arch/arm/boot/dts/tegra30-asus-transformer-common.dtsi b/arch/arm/boot/dts/tegra30-asus-transformer-common.dtsi index 08ea9cb32d0e..42dae0f4759e 100644 --- a/arch/arm/boot/dts/tegra30-asus-transformer-common.dtsi +++ b/arch/arm/boot/dts/tegra30-asus-transformer-common.dtsi @@ -550,7 +550,7 @@ spi1_mosi_px4 { nvidia,enable-input = ; }; - spi2_cs1_n_pw2 { + hp_detect { nvidia,pins = "spi2_cs1_n_pw2"; nvidia,function = "spi2"; nvidia,pull = ; @@ -558,10 +558,10 @@ spi2_cs1_n_pw2 { nvidia,enable-input = ; }; - spi2_sck_px2 { + mic_detect { nvidia,pins = "spi2_sck_px2"; nvidia,function = "spi2"; - nvidia,pull = ; + nvidia,pull = ; nvidia,tristate = ; nvidia,enable-input = ; }; @@ -1674,7 +1674,8 @@ sound { nvidia,i2s-controller = <&tegra_i2s1>; nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(W, 2) GPIO_ACTIVE_LOW>; - nvidia,hp-mute-gpios = <&gpio TEGRA_GPIO(X, 2) GPIO_ACTIVE_LOW>; + nvidia,mic-det-gpios = <&gpio TEGRA_GPIO(X, 2) GPIO_ACTIVE_LOW>; + nvidia,coupled-mic-hp-det; clocks = <&tegra_car TEGRA30_CLK_PLL_A>, <&tegra_car TEGRA30_CLK_PLL_A_OUT0>, diff --git a/arch/arm/boot/dts/tegra30-pegatron-chagall.dts b/arch/arm/boot/dts/tegra30-pegatron-chagall.dts index d9408a90653a..6e24b095713b 100644 --- a/arch/arm/boot/dts/tegra30-pegatron-chagall.dts +++ b/arch/arm/boot/dts/tegra30-pegatron-chagall.dts @@ -2731,7 +2731,7 @@ sound { "Int Spk", "RON", "Int Spk", "LOP", "Int Spk", "LON", - "IN1R", "Mic Jack", + "IN1R", "Headset Mic", "DMICDAT", "Int Mic"; nvidia,i2s-controller = <&tegra_i2s1>; From patchwork Tue Feb 21 18:32:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Svyatoslav Ryhel X-Patchwork-Id: 60217 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp162873wrd; Tue, 21 Feb 2023 10:36:06 -0800 (PST) X-Google-Smtp-Source: AK7set+B4VwAKxIrO9WoqYJWVm+8k4vamQqD9sNaOEZrq+lmLkuhZG9PgCgp1HSWqxC51fWakYYe X-Received: by 2002:a62:5105:0:b0:5b6:c62e:7d4f with SMTP id f5-20020a625105000000b005b6c62e7d4fmr5368981pfb.8.1677004566341; Tue, 21 Feb 2023 10:36:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677004566; cv=none; d=google.com; s=arc-20160816; b=qqrl7mOA6527JUG6LHkaY1K/9w8VDyetzkFU1XriKgyCHQUx70Ec+G3o6YS0qK09Bh oJvKjBXM4wLdc9iuSs1XkmBOfDlNnyoFj5PibuUxTj2A1reDjzDZYRK4QHsN6/ZxQiw2 3KgVbmLLD2u/DnY5VYDLEZnytBI8Ir3CoYIzn0A/1OaW/CGN2lCiSYhNVOilGstLOgBL Idmkbn31pAfOb7LtGy4+VPxhKO8IZjMtnHEYSwQf1qnDVJMNvmZ/pA6FJSAJDDTnHfzD Zq1gQmXwvCGzMSRWUHm4u1Iwz+Ea5d4b6CisUTVo+olzBEHuDcQC5FvX3TGhkyLr21V6 8gFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=L7LUck7NKntyvJrTtA9Mcdll1GuNCKTVdIZE+EmCgf0=; b=WW5+N1zm6G4kzmICAJYFSF9nWOS98mQoIL3TfqbAADSrgs8tRZ3y5XBV2I8tk7lOrH jnfmJXoetdbun205fnF0XFe/Gg0yazfwaQNRTRMqouXBoJSQMG7FpYvBKoe/JwGGj6c2 keuIrDI7d1e3Cx/uXGPDnZ7OrVbg61Db+zZBusX8rh1CMR1Ig2Okd/T3WPCgarORw4el zO4UFJHWjL8IAf4eXODhOmUy9J4fgSEGV0+b1ET3Pv3ImHjwGqpxR946WKRct1jCQ/xu 31QSw2ylfoBNxBAclQ2S3/1UB4R5RhK7QN2o2aKG1X0W2fakZTB5963yH6S6NCDcKy/w 6PiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=aY7iZeMy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n17-20020a056a00213100b005a71564af37si16887984pfj.362.2023.02.21.10.35.53; Tue, 21 Feb 2023 10:36:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=aY7iZeMy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230308AbjBUSdD (ORCPT + 99 others); Tue, 21 Feb 2023 13:33:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230411AbjBUSco (ORCPT ); Tue, 21 Feb 2023 13:32:44 -0500 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61E5330289; Tue, 21 Feb 2023 10:32:34 -0800 (PST) Received: by mail-ed1-x52c.google.com with SMTP id ck15so22233163edb.0; Tue, 21 Feb 2023 10:32:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=L7LUck7NKntyvJrTtA9Mcdll1GuNCKTVdIZE+EmCgf0=; b=aY7iZeMyl0Yy8TJGNzIOWQT4yV4aIZcrA3QtuCr/sgIo+n/gxDCoTdT9Spqa1B+tu8 /dJfWEwQ8nRKNBY8rRsKdfrHGSQzyCwfP6ZSshom4XAj+TMDHalSV1W9TTZQHMcGdGCe eWc0zIx+9X6n+te+u0x5OogQyDQcuHXiOWhLH1qR0H8+5rk+1J5lwTSslKQed70+2oUv LtxzXfOGmlkPMkzy5mR8E4tYbnF3VlfYWTUPidZu7xM8P5wSWX6ODOQ9S0z8/zB9dw8Q npin8zoTuVWLndrSehCYNM0jkKFHaKlOHfDeQghz1wksvpNKfl3AYwwzGfrXxUt70g8h 5rlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=L7LUck7NKntyvJrTtA9Mcdll1GuNCKTVdIZE+EmCgf0=; b=gZJ7hwRrkX++V2rlItPrpRCzTlU4bLz5byTV337+7g35jbMD4N8pZZbNKlgAEc16ra cEWDZxdg7OBdl0rLVOwzWaPjGasc5dw2hkxKlBNMVd+dr/juEgXxmoGSV4IJOrUqEXdt S/8gGyMTMyks0koSpimzdkr8GxBQQJ3kokUlASpgtjdwUfHwsudhayNllOwrPrei8Oe3 CpwXTK5p02fa4Fgq6djFb+94GUlEYLG88FNfbz3aCp6maRPfidCxEW7OnqTAIY6pWRAv QsxpIWI7NsUbmNNFwaFblepeiYMLaBFR9rql52/IQRUraay20Jnv7clM3CRr6fIblnQm zz8w== X-Gm-Message-State: AO0yUKU7CKTsv4FdrMRvW91KwZl7UIem/wqRekZOQCxrD1nUaMv3VOtN CSELy99MGxMRsFK00sp8KOY= X-Received: by 2002:a05:6402:31fb:b0:4ac:d2bc:32f9 with SMTP id dy27-20020a05640231fb00b004acd2bc32f9mr5753304edb.4.1677004352701; Tue, 21 Feb 2023 10:32:32 -0800 (PST) Received: from xeon.. ([188.163.112.76]) by smtp.gmail.com with ESMTPSA id i3-20020a50c3c3000000b004af5aa16fcasm169102edf.66.2023.02.21.10.32.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Feb 2023 10:32:32 -0800 (PST) From: Svyatoslav Ryhel To: Rob Herring , Krzysztof Kozlowski , Liam Girdwood , Mark Brown , Thierry Reding , Jonathan Hunter , Greg Kroah-Hartman , Jaroslav Kysela , Takashi Iwai , Svyatoslav Ryhel , Maxim Schwalm , Dmitry Osipenko Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, linux-tegra@vger.kernel.org, linux-staging@lists.linux.dev Subject: [PATCH v1 08/10] dt-bindings: dsp: add Fortemedia FM34 DSP Date: Tue, 21 Feb 2023 20:32:09 +0200 Message-Id: <20230221183211.21964-9-clamor95@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230221183211.21964-1-clamor95@gmail.com> References: <20230221183211.21964-1-clamor95@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758466739935065386?= X-GMAIL-MSGID: =?utf-8?q?1758466739935065386?= Add dt-binding for Fortemedia FM34NE DSP. Signed-off-by: Svyatoslav Ryhel --- .../bindings/dsp/fortemedia,dsp.yaml | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 Documentation/devicetree/bindings/dsp/fortemedia,dsp.yaml diff --git a/Documentation/devicetree/bindings/dsp/fortemedia,dsp.yaml b/Documentation/devicetree/bindings/dsp/fortemedia,dsp.yaml new file mode 100644 index 000000000000..78f30969d9bf --- /dev/null +++ b/Documentation/devicetree/bindings/dsp/fortemedia,dsp.yaml @@ -0,0 +1,95 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/dsp/fortemedia,dsp.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Fortemedia DSP core + +maintainers: + - Svyatoslav Ryhel + +description: | + Asus Transformer T20/T30 tablet family contains a DSP core + used for advanced noise cancellation. + +properties: + compatible: + items: + - enum: + - asus,tf101-dsp + - asus,tf201-dsp + - asus,tf300t-dsp + - asus,tf700t-dsp + - pegatron,chagall-dsp + + - const: fortemedia,fm34 + + reg: + maxItems: 1 + + bypass-gpios: + maxItems: 1 + + reset-gpios: + maxItems: 1 + + vdd-supply: true + + clocks: + maxItems: 1 + + clock-names: + items: + - const: mclk + + assigned-clocks: + maxItems: 1 + + assigned-clock-parents: + maxItems: 1 + + assigned-clock-rates: + maxItems: 1 + +required: + - compatible + - reg + - vdd-supply + +additionalProperties: false + +examples: + - | + #include + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + dsp@60 { + compatible = "asus,tf201-dsp", "fortemedia,fm34"; + reg = <0x60>; + + bypass-gpios = <&gpio 222 0>; + reset-gpios = <&gpio 115 1>; + + vdd-supply = <&vdd_1v8_dsp>; + + clocks = <&tegra_pmc TEGRA_PMC_CLK_OUT_1>; + clock-names = "mclk"; + + assigned-clocks = <&tegra_pmc TEGRA_PMC_CLK_OUT_1>; + assigned-clock-parents = <&tegra_car TEGRA30_CLK_EXTERN1>; + }; + }; + + vdd_1v8_dsp: regulator-dsp { + compatible = "regulator-fixed"; + regulator-name = "vdd_1v8_dsp"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + gpio = <&gpio 165 0>; + enable-active-high; + }; From patchwork Tue Feb 21 18:32:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Svyatoslav Ryhel X-Patchwork-Id: 60219 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp162925wrd; Tue, 21 Feb 2023 10:36:13 -0800 (PST) X-Google-Smtp-Source: AK7set8tyB8bo6YDcE5QlAj6Ykk9+FUOk0UNCHMW9i71SSEHGzDk+btadVtbxzl7d94Z/tKpE99a X-Received: by 2002:a05:6a20:8e22:b0:be:25af:bdf9 with SMTP id y34-20020a056a208e2200b000be25afbdf9mr6012905pzj.51.1677004572898; Tue, 21 Feb 2023 10:36:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677004572; cv=none; d=google.com; s=arc-20160816; b=vdDH712MJtrW9wSM72Et5ik5PeGSNUapK5xPHzTof8FlfflViAnEjFm+lT2Q6jz8dT qvjsVQI4dx10erjQyTjl9UpanX6GEb1RAVucBGiLk448OK0rsI5ljzyvfD4OCf4GjPsc mMCmUSFm72YWcm0YctC1YwQKu30jkffP3EdacqDO5d6Xg0iYKhVzQ6KD9pMtrohjAiNa FOdrfX+zXS4n9514jyBOZnoDGe0kVoxZaQnBDkn2imggRpcFlIdA4RMMD9hjqmG7dN2o +x+aAz2Km2y8bnCPRO6PsRCcIlODAVzEnV3DGxZT4pQUopFdT+MIb9YN79FtqYLq0pC4 j1Zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=lr6o3HJDSw6aDnC9TV6hrUc8xvBzLkl4A2fi5a+pbwo=; b=0zteD4K1ZSUc26DYWSJgXh44t7nTgMTRamkSkA9Nk5rBwz/nT01PjnDO2Qbwr4uwyN j9Afc26/oeBAhdkzoLlPYl5oDzB0lR//zTsRhCx8SN+ADaeoLppTUsZ/GqJm368sCLSR OzlixQuETQFPPGy+DfamjBopdrrnEcSPkyU+hBsJLTG2cgz2Wbjr5x/CnEOe+085/E9N bAySidVZNR9fob6Bfes6iDsiE0l4+1zSxRi+p5JUGU6h3CAtGpk3Nro2fMNUhBqLCCF/ UmTKh/i3NGUI5MDBteDRtbDkVNGkUYnP6kXb71bWL3XRTpaEkQrAeTPYpWfeACh2VfUv RdtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=k+5io2UD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z11-20020a6552cb000000b004fb974192fbsi18462426pgp.17.2023.02.21.10.36.00; Tue, 21 Feb 2023 10:36:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=k+5io2UD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231218AbjBUSdI (ORCPT + 99 others); Tue, 21 Feb 2023 13:33:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230370AbjBUSc5 (ORCPT ); Tue, 21 Feb 2023 13:32:57 -0500 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F14883029F; Tue, 21 Feb 2023 10:32:35 -0800 (PST) Received: by mail-ed1-x532.google.com with SMTP id da10so22224038edb.3; Tue, 21 Feb 2023 10:32:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=lr6o3HJDSw6aDnC9TV6hrUc8xvBzLkl4A2fi5a+pbwo=; b=k+5io2UDTxYSJPBToDlTnuAKRH0OPtKtrt1EliLpf8gTAoGS8FNjTFQ2o4Gs42TVGg MbvPqP67Dbvm/2JkIPBJSoR23WkNL2gbawR0GMmGaQ/DC2zJe+jKF3WR1CgGrx7605Pg 4Rhfgqpcbs/PoNhKnv9gMT7cKKxsrDcuDOhW7vereAgLnaKZQcGUIV9MkW7avPaja7Gv eEE3zJougGUgae9rAlAX+zDKSkaFgpHhISvMK2BcEwRvbfFJJ2Yf69tCdmDD2NgSLIDD Pfffk+j1IoCe0cBIJH4wMyf1f2ZxCKECBd5/3tEXTNI2COvJP6TbXriITGLkKRMstCCN 6Nrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=lr6o3HJDSw6aDnC9TV6hrUc8xvBzLkl4A2fi5a+pbwo=; b=JPVv2ytVV1Hs8RfrTlrYN1BxTHAc49qcND86ddwhzxWQ20xI6zVwQdcEcPCWVxBQmi JkF1u4wOcNvtAGkE8LTNBRW9aJ83Sai9I+zrFKhg7gV9ygq+FS+1h4K9hcpxWZLlrWzr vCNJpzcHDH4x1U6EiPX4lXGZiHC8n/OwaTgqjaFkDsCqf0x6L4qKOs4RxG9wAF74cB0L tk0EaEM8UcDdXIE64CQozWRL2OronVxru8N4XFE69JOaAuVfnhLrWbiNSHZl1vKyydpi UGIe98ebIiQ2PVJxIsdJi01tmJ7pE25dij1jBNsP7+cmF/kejFDSzPt7Ci2BaAuGU9GQ vkHw== X-Gm-Message-State: AO0yUKXHaRoHJyPwL4JCRnAaYOn2ofCoQxtxHxIB4TypvWnyJe9VZcck //r3J+6N5dlEY/eRNvfx6YNPdsZI1dCtuQ== X-Received: by 2002:a05:6402:1503:b0:4ad:7bd3:bb43 with SMTP id f3-20020a056402150300b004ad7bd3bb43mr5574721edw.21.1677004354130; Tue, 21 Feb 2023 10:32:34 -0800 (PST) Received: from xeon.. ([188.163.112.76]) by smtp.gmail.com with ESMTPSA id i3-20020a50c3c3000000b004af5aa16fcasm169102edf.66.2023.02.21.10.32.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Feb 2023 10:32:33 -0800 (PST) From: Svyatoslav Ryhel To: Rob Herring , Krzysztof Kozlowski , Liam Girdwood , Mark Brown , Thierry Reding , Jonathan Hunter , Greg Kroah-Hartman , Jaroslav Kysela , Takashi Iwai , Svyatoslav Ryhel , Maxim Schwalm , Dmitry Osipenko Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, linux-tegra@vger.kernel.org, linux-staging@lists.linux.dev Subject: [PATCH v1 09/10] staging: dsp: add support for Fortemedia FM34NE DSP Date: Tue, 21 Feb 2023 20:32:10 +0200 Message-Id: <20230221183211.21964-10-clamor95@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230221183211.21964-1-clamor95@gmail.com> References: <20230221183211.21964-1-clamor95@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758466746927703794?= X-GMAIL-MSGID: =?utf-8?q?1758466746927703794?= FM34NE is digital sound processing chip used for active noise suppression mainly on ASUS Transformers. Signed-off-by: Svyatoslav Ryhel --- drivers/staging/Kconfig | 2 + drivers/staging/Makefile | 1 + drivers/staging/dsp/Kconfig | 7 + drivers/staging/dsp/Makefile | 2 + drivers/staging/dsp/dsp-fm34ne.c | 364 +++++++++++++ drivers/staging/dsp/dsp-fm34ne.h | 845 +++++++++++++++++++++++++++++++ 6 files changed, 1221 insertions(+) create mode 100644 drivers/staging/dsp/Kconfig create mode 100644 drivers/staging/dsp/Makefile create mode 100644 drivers/staging/dsp/dsp-fm34ne.c create mode 100644 drivers/staging/dsp/dsp-fm34ne.h diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig index 5cfabd5376cc..cd22b7f36b08 100644 --- a/drivers/staging/Kconfig +++ b/drivers/staging/Kconfig @@ -80,4 +80,6 @@ source "drivers/staging/qlge/Kconfig" source "drivers/staging/vme_user/Kconfig" +source "drivers/staging/dsp/Kconfig" + endif # STAGING diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile index f8c3aa9c2418..a7250a0b5fca 100644 --- a/drivers/staging/Makefile +++ b/drivers/staging/Makefile @@ -2,6 +2,7 @@ # Makefile for staging directory obj-y += media/ +obj-y += dsp/ obj-$(CONFIG_PRISM2_USB) += wlan-ng/ obj-$(CONFIG_FB_OLPC_DCON) += olpc_dcon/ obj-$(CONFIG_RTL8192U) += rtl8192u/ diff --git a/drivers/staging/dsp/Kconfig b/drivers/staging/dsp/Kconfig new file mode 100644 index 000000000000..d295ea063ad5 --- /dev/null +++ b/drivers/staging/dsp/Kconfig @@ -0,0 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0 +config DSP_FM34NE + tristate "DSP FM34NE driver" + depends on I2C && GPIOLIB + help + Say Y or M here if you want to add support for Fortemedia FM34NE + DSP mainly used on ASUS T20/T30 Transformers. diff --git a/drivers/staging/dsp/Makefile b/drivers/staging/dsp/Makefile new file mode 100644 index 000000000000..e60ba3c88e08 --- /dev/null +++ b/drivers/staging/dsp/Makefile @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: GPL-2.0 +obj-$(CONFIG_DSP_FM34NE) += dsp-fm34ne.o diff --git a/drivers/staging/dsp/dsp-fm34ne.c b/drivers/staging/dsp/dsp-fm34ne.c new file mode 100644 index 000000000000..93a464a7bb4b --- /dev/null +++ b/drivers/staging/dsp/dsp-fm34ne.c @@ -0,0 +1,364 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Fortemedia FM34NE DSP driver + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "dsp-fm34ne.h" + +#define FM34NE_I2C_CHECK 0xC0 +#define FM34NE_MAX_RETRY 5 + +enum state { + FM34NE_BYPASS, + FM34NE_NS_ENABLE, + FM34NE_NS_DISABLE, + FM34NE_MAX, +}; + +struct fm34ne_dsp_data { + struct i2c_client *client; + + struct gpio_desc *bypass_gpio; + struct gpio_desc *reset_gpio; + + struct clk *dap_mclk; + struct regulator *vdd_supply; + + const struct fm34ne_dsp_devdata *data; +}; + +static int fm34ne_dsp_write_config(struct i2c_client *client, + const u8 *config, size_t size) +{ + int ret, i; + + for (i = 0; i < FM34NE_MAX_RETRY; i++) { + ret = i2c_master_send(client, config, size); + if (ret > 0) + return 0; + + usleep_range(5000, 6000); + } + + return ret; +} + +static int fm34ne_dsp_set_config(struct fm34ne_dsp_data *fm34, int state) +{ + struct device *dev = &fm34->client->dev; + + const u8 *enable_ns_parameter = fm34->data->enable_noise_suppression; + int enable_ns_length = fm34->data->enable_ns_length; + + const u8 *disable_ns_parameter = fm34->data->disable_noise_suppression; + int disable_ns_length = fm34->data->disable_ns_length; + + int ret; + + gpiod_set_value_cansleep(fm34->bypass_gpio, 1); + msleep(20); + + switch (state) { + case FM34NE_NS_ENABLE: + ret = fm34ne_dsp_write_config(fm34->client, enable_parameter, + sizeof(enable_parameter)); + if (ret < 0) { + dev_err(dev, "failed to set DSP enable with %d\n", ret); + goto exit; + } + + ret = fm34ne_dsp_write_config(fm34->client, enable_ns_parameter, + enable_ns_length); + if (ret < 0) { + dev_err(dev, "failed to enable DSP noise suppression with %d\n", ret); + goto exit; + } + + dev_info(dev, "noise suppression enable DSP parameter written\n"); + break; + + case FM34NE_NS_DISABLE: + ret = fm34ne_dsp_write_config(fm34->client, enable_parameter, + sizeof(enable_parameter)); + if (ret < 0) { + dev_err(dev, "failed to set DSP enable with %d\n", ret); + goto exit; + } + + ret = fm34ne_dsp_write_config(fm34->client, disable_ns_parameter, + disable_ns_length); + if (ret < 0) { + dev_err(dev, "failed to disable DSP noise suppression with %d\n", ret); + goto exit; + } + + dev_info(dev, "noise suppression disable DSP parameter written\n"); + break; + + case FM34NE_BYPASS: + default: + ret = fm34ne_dsp_write_config(fm34->client, bypass_parameter, + sizeof(bypass_parameter)); + if (ret < 0) { + dev_err(dev, "failed to set DSP bypass with %d\n", ret); + goto exit; + } + + dev_info(dev, "bypass DSP parameter written\n"); + break; + } + +exit: + gpiod_set_value_cansleep(fm34->bypass_gpio, 0); + + return ret; +} + +static int fm34ne_dsp_set_hw(struct fm34ne_dsp_data *fm34) +{ + struct device *dev = &fm34->client->dev; + int ret; + + ret = clk_prepare_enable(fm34->dap_mclk); + if (ret) { + dev_err(dev, "failed to enable the DSP MCLK: %d\n", ret); + return ret; + } + + ret = regulator_enable(fm34->vdd_supply); + if (ret < 0) { + dev_err(dev, "failed to enable vdd power supply\n"); + return ret; + } + + return 0; +} + +static void fm34ne_dsp_reset(struct fm34ne_dsp_data *fm34) +{ + gpiod_set_value_cansleep(fm34->reset_gpio, 1); + msleep(20); + + gpiod_set_value_cansleep(fm34->reset_gpio, 0); + msleep(100); +} + +static int fm34ne_dsp_init_chip(struct fm34ne_dsp_data *fm34) +{ + const u8 *input_parameter = fm34->data->input_parameter; + int input_parameter_length = fm34->data->input_parameter_length; + int ret; + + ret = fm34ne_dsp_set_hw(fm34); + if (ret) + return ret; + + fm34ne_dsp_reset(fm34); + + gpiod_set_value_cansleep(fm34->bypass_gpio, 1); + msleep(20); + + ret = i2c_smbus_write_byte(fm34->client, FM34NE_I2C_CHECK); + if (ret < 0) { + dev_info(&fm34->client->dev, "initial write failed\n"); + msleep(50); + + fm34ne_dsp_reset(fm34); + gpiod_set_value_cansleep(fm34->bypass_gpio, 0); + + return ret; + } + + ret = fm34ne_dsp_write_config(fm34->client, input_parameter, + input_parameter_length); + if (ret < 0) + return -EINVAL; + + msleep(100); + gpiod_set_value_cansleep(fm34->bypass_gpio, 0); + + dev_info(&fm34->client->dev, "%s detected\n", fm34->data->model); + + /* Constantly set DSP to bypass mode for now */ + ret = fm34ne_dsp_set_config(fm34, FM34NE_BYPASS); + if (ret) + return ret; + + return 0; +} + +static int fm34ne_dsp_probe(struct i2c_client *client, + const struct i2c_device_id *id) +{ + struct device *dev = &client->dev; + struct fm34ne_dsp_data *fm34; + int ret; + + fm34 = devm_kzalloc(dev, sizeof(*fm34), GFP_KERNEL); + if (!fm34) + return -ENOMEM; + + i2c_set_clientdata(client, fm34); + fm34->client = client; + + fm34->dap_mclk = devm_clk_get_optional(dev, "mclk"); + if (IS_ERR(fm34->dap_mclk)) + return dev_err_probe(dev, PTR_ERR(fm34->dap_mclk), + "can't retrieve DSP MCLK\n"); + + fm34->vdd_supply = devm_regulator_get(dev, "vdd"); + if (IS_ERR(fm34->vdd_supply)) + return dev_err_probe(dev, PTR_ERR(fm34->vdd_supply), + "failed to get vdd regulator\n"); + + fm34->reset_gpio = devm_gpiod_get_optional(dev, "reset", + GPIOD_OUT_LOW); + if (IS_ERR(fm34->reset_gpio)) + return dev_err_probe(dev, PTR_ERR(fm34->reset_gpio), + "failed to get reset GPIO\n"); + + /* + * Bypass gpio is used to set audio into bypass mode + * in relation to dsp to be able to program it. Once + * programming is done, bypass gpio has to be set to + * low to return dsp into audio processing. + */ + fm34->bypass_gpio = devm_gpiod_get_optional(dev, "bypass", + GPIOD_OUT_LOW); + if (IS_ERR(fm34->bypass_gpio)) + return dev_err_probe(dev, PTR_ERR(fm34->bypass_gpio), + "failed to get bypass GPIO\n"); + + fm34->data = of_device_get_match_data(dev); + if (!fm34->data) + return -ENODEV; + + ret = fm34ne_dsp_init_chip(fm34); + if (ret) + return dev_err_probe(dev, ret, + "failed to init DSP chip\n"); + + return 0; +} + +static int fm34ne_dsp_suspend(struct device *dev) +{ + struct i2c_client *client = to_i2c_client(dev); + struct fm34ne_dsp_data *fm34 = i2c_get_clientdata(client); + + gpiod_set_value_cansleep(fm34->bypass_gpio, 0); + + regulator_disable(fm34->vdd_supply); + + clk_disable_unprepare(fm34->dap_mclk); + + return 0; +} + +static int fm34ne_dsp_resume(struct device *dev) +{ + struct i2c_client *client = to_i2c_client(dev); + struct fm34ne_dsp_data *fm34 = i2c_get_clientdata(client); + int ret; + + ret = fm34ne_dsp_init_chip(fm34); + if (ret) + dev_err(&client->dev, "failed to re-init DSP chip with %d\n", ret); + + return 0; +} + +static DEFINE_SIMPLE_DEV_PM_OPS(fm34ne_dsp_pm_ops, + fm34ne_dsp_suspend, fm34ne_dsp_resume); + +static const struct fm34ne_dsp_devdata tf101_dsp_data = { + .model = "ASUS Eee Pad Trnasformer TF101", + .input_parameter = TF101_input_parameter, + .input_parameter_length = sizeof(TF101_input_parameter), + .enable_noise_suppression = TF101_enable_NS, + .enable_ns_length = sizeof(TF101_enable_NS), + .disable_noise_suppression = TF101_disable_NS, + .disable_ns_length = sizeof(TF101_disable_NS), +}; + +static const struct fm34ne_dsp_devdata tf201_dsp_data = { + .model = "ASUS Transformer Prime TF201", + .input_parameter = TF201_input_parameter, + .input_parameter_length = sizeof(TF201_input_parameter), + .enable_noise_suppression = TF201_enable_NS, + .enable_ns_length = sizeof(TF201_enable_NS), + .disable_noise_suppression = TF201_disable_NS, + .disable_ns_length = sizeof(TF201_disable_NS), +}; + +static const struct fm34ne_dsp_devdata tf300t_dsp_data = { + .model = "ASUS Transformer PAD TF300T", + .input_parameter = TF300T_input_parameter, + .input_parameter_length = sizeof(TF300T_input_parameter), + .enable_noise_suppression = TF201_enable_NS, + .enable_ns_length = sizeof(TF201_enable_NS), + .disable_noise_suppression = TF201_disable_NS, + .disable_ns_length = sizeof(TF201_disable_NS), +}; + +static const struct fm34ne_dsp_devdata tf700t_dsp_data = { + .model = "ASUS Transformer Infinity TF700T", + .input_parameter = TF700T_input_parameter, + .input_parameter_length = sizeof(TF700T_input_parameter), + .enable_noise_suppression = TF700T_enable_NS, + .enable_ns_length = sizeof(TF700T_enable_NS), + .disable_noise_suppression = TF700T_disable_NS, + .disable_ns_length = sizeof(TF700T_disable_NS), +}; + +static const struct fm34ne_dsp_devdata chagall_dsp_data = { + .model = "Pegatron Chagall", + .input_parameter = TF300T_input_parameter, + .input_parameter_length = sizeof(TF300T_input_parameter), + .enable_noise_suppression = TF201_enable_NS, + .enable_ns_length = sizeof(TF201_enable_NS), + .disable_noise_suppression = TF201_disable_NS, + .disable_ns_length = sizeof(TF201_disable_NS), +}; + +static const struct of_device_id fm34ne_dsp_match[] = { + { .compatible = "asus,tf101-dsp", .data = &tf101_dsp_data }, + { .compatible = "asus,tf201-dsp", .data = &tf201_dsp_data }, + { .compatible = "asus,tf300t-dsp", .data = &tf300t_dsp_data }, + { .compatible = "asus,tf700t-dsp", .data = &tf700t_dsp_data }, + { .compatible = "pegatron,chagall-dsp", .data = &chagall_dsp_data }, + { } +}; +MODULE_DEVICE_TABLE(of, fm34ne_dsp_match); + +static const struct i2c_device_id fm34ne_dsp_id[] = { + { "dsp_fm34ne", 0 }, + { } +}; +MODULE_DEVICE_TABLE(i2c, fm34ne_dsp_id); + +static struct i2c_driver fm34ne_dsp_driver = { + .driver = { + .name = "fm34ne-dsp", + .pm = pm_sleep_ptr(&fm34ne_dsp_pm_ops), + .of_match_table = fm34ne_dsp_match, + }, + .probe = fm34ne_dsp_probe, + .id_table = fm34ne_dsp_id, +}; +module_i2c_driver(fm34ne_dsp_driver); + +MODULE_AUTHOR("Svyatoslav Ryhel "); +MODULE_DESCRIPTION("Fortemedia FM34NE DSP driver"); +MODULE_LICENSE("GPL"); diff --git a/drivers/staging/dsp/dsp-fm34ne.h b/drivers/staging/dsp/dsp-fm34ne.h new file mode 100644 index 000000000000..428ac33dd310 --- /dev/null +++ b/drivers/staging/dsp/dsp-fm34ne.h @@ -0,0 +1,845 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#ifndef __DSP_FM34NE_H__ +#define __DSP_FM34NE_H__ + +struct fm34ne_dsp_devdata { + const char *model; + + const u8 *input_parameter; + int input_parameter_length; + + const u8 *enable_noise_suppression; + int enable_ns_length; + + const u8 *disable_noise_suppression; + int disable_ns_length; +}; + +/* Common section */ +static const u8 bypass_parameter[] = { + 0xC0, + 0xFC, 0xF3, 0x3B, 0x23, 0x00, 0x00, 0x04 +}; + +static const u8 enable_parameter[] = { + 0xC0, + 0xFC, 0xF3, 0x3B, 0x23, 0x00, 0x00, 0x00 +}; + +/* TF201 section */ +static const u8 TF201_input_parameter[] = { + 0xC0, + 0xFC, 0xF3, 0x68, 0x64, 0x04, + 0xFC, 0xF3, 0x0D, 0x10, 0x00, 0x90, 0x00, 0x1A, + 0xFC, 0xF3, 0x0D, 0x10, 0x01, 0x82, 0x30, 0x50, + 0xFC, 0xF3, 0x0D, 0x10, 0x02, 0x27, 0x90, 0x9F, + 0xFC, 0xF3, 0x0D, 0x10, 0x03, 0x19, 0x00, 0xA0, + 0xFC, 0xF3, 0x0D, 0x10, 0x04, 0x1C, 0x5A, 0xAF, + 0xFC, 0xF3, 0x0D, 0x10, 0x05, 0x90, 0x00, 0x1A, + 0xFC, 0xF3, 0x0D, 0x10, 0x06, 0x80, 0x00, 0x0A, + 0xFC, 0xF3, 0x0D, 0x10, 0x07, 0x1C, 0x5A, 0xAF, + 0xFC, 0xF3, 0x0D, 0x10, 0x08, 0x90, 0x00, 0x0A, + 0xFC, 0xF3, 0x0D, 0x10, 0x09, 0x19, 0x01, 0x1F, + 0xFC, 0xF3, 0x0D, 0x10, 0x0A, 0x27, 0x90, 0x5F, + 0xFC, 0xF3, 0x0D, 0x10, 0x0B, 0x19, 0x01, 0x10, + 0xFC, 0xF3, 0x0D, 0x10, 0x0C, 0x1C, 0x58, 0xEF, + 0xFC, 0xF3, 0x0D, 0x10, 0x0D, 0x90, 0x00, 0x1A, + 0xFC, 0xF3, 0x0D, 0x10, 0x0E, 0x80, 0x00, 0x0A, + 0xFC, 0xF3, 0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F3, 0x3B, 0x23, 0x04, 0x23, 0x10, + 0xFC, 0xF3, 0x3B, 0x23, 0x2F, 0x01, 0x10, + 0xFC, 0xF3, 0x3B, 0x23, 0x39, 0x00, 0x06, + 0xFC, 0xF3, 0x3B, 0x23, 0xCF, 0x01, 0x00, + 0xFC, 0xF3, 0x3B, 0x23, 0xD0, 0x06, 0x20, + 0xFC, 0xF3, 0x3B, 0x23, 0xD5, 0x3C, 0x00, + 0xFC, 0xF3, 0x3B, 0x23, 0x6E, 0x20, 0x00, + 0xFC, 0xF3, 0x3B, 0x23, 0x33, 0x02, 0x00, + 0xFC, 0xF3, 0x3B, 0x23, 0xB3, 0x00, 0x0A, + 0xFC, 0xF3, 0x3B, 0x23, 0xB4, 0x00, 0x00, + 0xFC, 0xF3, 0x3B, 0x23, 0x70, 0x40, 0x00, + 0xFC, 0xF3, 0x3B, 0x3F, 0xD2, 0x00, 0x32, + 0xFC, 0xF3, 0x3B, 0x22, 0xFB, 0x00, 0x00 +}; + +static const u8 TF201_enable_NS[] = { + 0xC0, + 0xFC, 0xF3, 0x3B, 0x23, 0x03, 0x00, 0x01, + 0xFC, 0xF3, 0x3B, 0x23, 0x04, 0x23, 0x01 +}; + +static const u8 TF201_disable_NS[] = { + 0xC0, + 0xFC, 0xF3, 0x3B, 0x23, 0x03, 0x00, 0x00, + 0xFC, 0xF3, 0x3B, 0x23, 0x04, 0x00, 0x10 +}; + +/* TF700T section */ +static const u8 TF700T_input_parameter[] = { + 0xC0, + 0xFC, 0xF3, 0x68, 0x64, 0x04, + 0xFC, 0xF3, 0x0D, 0x10, 0x00, 0x90, 0x00, 0x1A, + 0xFC, 0xF3, 0x0D, 0x10, 0x01, 0x82, 0x30, 0x50, + 0xFC, 0xF3, 0x0D, 0x10, 0x02, 0x27, 0x90, 0x9F, + 0xFC, 0xF3, 0x0D, 0x10, 0x03, 0x19, 0x00, 0xA0, + 0xFC, 0xF3, 0x0D, 0x10, 0x04, 0x1C, 0x5A, 0xAF, + 0x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0x23, 0x01, 0x00, 0x02, + 0xFC, 0xF3, 0x3B, 0x23, 0x07, 0xF0, 0xF0, + 0xFC, 0xF3, 0x3B, 0x23, 0x09, 0x08, 0x00, + 0xFC, 0xF3, 0x3B, 0x23, 0x0D, 0x01, 0x00, + 0xFC, 0xF3, 0x3B, 0x23, 0x0C, 0x0E, 0x20, + 0xFC, 0xF3, 0x3B, 0x22, 0xF2, 0x00, 0x44, + 0xFC, 0xF3, 0x3B, 0x22, 0xF6, 0x00, 0x00, + 0xFC, 0xF3, 0x3B, 0x22, 0xC6, 0x00, 0x06, + 0xFC, 0xF3, 0x3B, 0x22, 0xC7, 0x00, 0x08, + 0xFC, 0xF3, 0x3B, 0x22, 0xD2, 0x8A, 0x94, + 0xFC, 0xF3, 0x3B, 0x23, 0x03, 0x00, 0x01, + 0xFC, 0xF3, 0x3B, 0x23, 0x00, 0x00, 0x04, + 0xFC, 0xF3, 0x3B, 0x23, 0x04, 0x23, 0x10, + 0xFC, 0xF3, 0x3B, 0x23, 0x2F, 0x01, 0x10, + 0xFC, 0xF3, 0x3B, 0x23, 0x39, 0x00, 0x06, + 0xFC, 0xF3, 0x3B, 0x23, 0xCF, 0x01, 0x00, + 0xFC, 0xF3, 0x3B, 0x23, 0xD0, 0x06, 0x20, + 0xFC, 0xF3, 0x3B, 0x23, 0xD5, 0x3C, 0x00, + 0xFC, 0xF3, 0x3B, 0x23, 0x6E, 0x20, 0x00, + 0xFC, 0xF3, 0x3B, 0x23, 0x33, 0x02, 0x00, + 0xFC, 0xF3, 0x3B, 0x23, 0xB3, 0x00, 0x0A, + 0xFC, 0xF3, 0x3B, 0x23, 0xB4, 0x00, 0x02, + 0xFC, 0xF3, 0x3B, 0x23, 0x70, 0x40, 0x00, + 0xFC, 0xF3, 0x3B, 0x23, 0x91, 0x40, 0x00, + 0xFC, 0xF3, 0x3B, 0x23, 0x92, 0x40, 0x00, + 0xFC, 0xF3, 0x3B, 0x23, 0x93, 0x40, 0x00, + 0xFC, 0xF3, 0x3B, 0x23, 0x94, 0x40, 0x00, + 0xFC, 0xF3, 0x3B, 0x23, 0x95, 0x40, 0x00, + 0xFC, 0xF3, 0x3B, 0x3F, 0xD2, 0x00, 0x32, + 0xFC, 0xF3, 0x3B, 0x22, 0xFB, 0x00, 0x00 +}; + +static const u8 TF700T_enable_NS[] = { + 0xC0, + 0xFC, 0xF3, 0x3B, 0x23, 0x03, 0x00, 0x01, + 0xFC, 0xF3, 0x3B, 0x23, 0x04, 0x23, 0x01, + 0xFC, 0xF3, 0x3B, 0x23, 0x0C, 0x08, 0x00 +}; + +static const u8 TF700T_disable_NS[] = { + 0xC0, + 0xFC, 0xF3, 0x3B, 0x23, 0x03, 0x00, 0x00, + 0xFC, 0xF3, 0x3B, 0x23, 0x04, 0x00, 0x10, + 0xFC, 0xF3, 0x3B, 0x23, 0x0C, 0x15, 0x00, + 0xFC, 0xF3, 0x3B, 0x23, 0x6E, 0x7F, 0xFF, + 0xFC, 0xF3, 0x3B, 0x23, 0xCF, 0x02, 0x00, + 0xFC, 0xF3, 0x3B, 0x23, 0xD0, 0x02, 0x00, + 0xFC, 0xF3, 0x3B, 0x23, 0xD5, 0x10, 0x00, + 0xFC, 0xF3, 0x3B, 0x23, 0x00, 0x00, 0x00, + 0xFC, 0xF3, 0x3B, 0x22, 0xFB, 0x00, 0x00, + 0xFC, 0xF3, 0x3B, 0x23, 0x84, 0x00, 0x03 +}; + +/* TF300T section */ +static const u8 TF300T_input_parameter[] = { + 0xC0, + 0xFC, 0xF3, 0x68, 0x64, 0x04, + 0xFC, 0xF3, 0x0D, 0x10, 0x00, 0x90, 0x00, 0x1A, + 0xFC, 0xF3, 0x0D, 0x10, 0x01, 0x82, 0x30, 0x50, + 0xFC, 0xF3, 0x0D, 0x10, 0x02, 0x27, 0x90, 0x9F, + 0xFC, 0xF3, 0x0D, 0x10, 0x03, 0x19, 0x00, 0xA0, + 0xFC, 0xF3, 0x0D, 0x10, 0x04, 0x1C, 0x5A, 0xAF, + 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, 0x23, 0x01, 0x00, 0x02, + 0xFC, 0xF3, 0x3B, 0x23, 0x07, 0xF0, 0xF0, + 0xFC, 0xF3, 0x3B, 0x23, 0x09, 0x08, 0x00, + 0xFC, 0xF3, 0x3B, 0x23, 0x0D, 0x01, 0x00, + 0xFC, 0xF3, 0x3B, 0x23, 0x0C, 0x0E, 0x20, + 0xFC, 0xF3, 0x3B, 0x22, 0xF2, 0x00, 0x44, + 0xFC, 0xF3, 0x3B, 0x22, 0xF6, 0x00, 0x00, + 0xFC, 0xF3, 0x3B, 0x22, 0xC6, 0x00, 0x06, + 0xFC, 0xF3, 0x3B, 0x22, 0xC7, 0x00, 0x08, + 0xFC, 0xF3, 0x3B, 0x22, 0xD2, 0x8A, 0x94, + 0xFC, 0xF3, 0x3B, 0x23, 0x03, 0x00, 0x01, + 0xFC, 0xF3, 0x3B, 0x23, 0x00, 0x00, 0x04, + 0xFC, 0xF3, 0x3B, 0x23, 0x04, 0x23, 0x10, + 0xFC, 0xF3, 0x3B, 0x23, 0x2F, 0x01, 0x10, + 0xFC, 0xF3, 0x3B, 0x23, 0x39, 0x00, 0x06, + 0xFC, 0xF3, 0x3B, 0x23, 0xCF, 0x01, 0x00, + 0xFC, 0xF3, 0x3B, 0x23, 0xD0, 0x06, 0x20, + 0xFC, 0xF3, 0x3B, 0x23, 0xD5, 0x3C, 0x00, + 0xFC, 0xF3, 0x3B, 0x23, 0x6E, 0x20, 0x00, + 0xFC, 0xF3, 0x3B, 0x23, 0x33, 0x02, 0x00, + 0xFC, 0xF3, 0x3B, 0x23, 0xB3, 0x00, 0x0A, + 0xFC, 0xF3, 0x3B, 0x23, 0xB4, 0x00, 0x00, + 0xFC, 0xF3, 0x3B, 0x23, 0x70, 0x40, 0x00, + 0xFC, 0xF3, 0x3B, 0x3F, 0xD2, 0x00, 0x32, + 0xFC, 0xF3, 0x3B, 0x22, 0xFB, 0x00, 0x00 +}; + +/* TF101 section */ +static const u8 TF101_input_parameter[] = { + 0xC0, + 0xFC, 0xF3, 0x68, 0x64, 0x04, + 0xFC, 0xF3, 0x0D, 0x10, 0x00, 0x90, 0x00, 0x1A, + 0xFC, 0xF3, 0x0D, 0x10, 0x01, 0x82, 0x30, 0x50, + 0xFC, 0xF3, 0x0D, 0x10, 0x02, 0x27, 0x90, 0x9F, + 0xFC, 0xF3, 0x0D, 0x10, 0x03, 0x19, 0x00, 0xA0, + 0xFC, 0xF3, 0x0D, 0x10, 0x04, 0x1C, 0x5A, 0xAF, + 0xFC, 0xF3, 0x0D, 0x10, 0x05, 0x90, 0x00, 0x1A, + 0xFC, 0xF3, 0x0D, 0x10, 0x06, 0x80, 0x00, 0x0A, + 0xFC, 0xF3, 0x0D, 0x10, 0x07, 0x1C, 0x5A, 0xAF, + 0xFC, 0xF3, 0x0D, 0x10, 0x08, 0x90, 0x00, 0x0A, + 0xFC, 0xF3, 0x0D, 0x10, 0x09, 0x19, 0x01, 0x1F, + 0xFC, 0xF3, 0x0D, 0x10, 0x0A, 0x27, 0x90, 0x5F, + 0xFC, 0xF3, 0x0D, 0x10, 0x0B, 0x19, 0x01, 0x10, + 0xFC, 0xF3, 0x0D, 0x10, 0x0C, 0x1C, 0x58, 0xEF, + 0xFC, 0xF3, 0x0D, 0x10, 0x0D, 0x90, 0x00, 0x1A, + 0xFC, 0xF3, 0x0D, 0x10, 0x0E, 0x80, 0x00, 0x0A, + 0xFC, 0xF3, 0x0D, 0x10, 0x0F, 0x1C, 0x58, 0xEF, + 0xFC, 0xF3, 0x0D, 0x10, 0x10, 0x90, 0x00, 0x0A, + 0xFC, 0xF3, 0x0D, 0x10, 0x11, 0x82, 0x2D, 0x20, + 0xFC, 0xF3, 0x0D, 0x10, 0x12, 0x27, 0x98, 0x5F, + 0xFC, 0xF3, 0x0D, 0x10, 0x13, 0x19, 0x01, 0x80, + 0xFC, 0xF3, 0x0D, 0x10, 0x14, 0x80, 0x50, 0x5A, + 0xFC, 0xF3, 0x0D, 0x10, 0x15, 0x90, 0x50, 0x3A, +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3, 0x3B, 0x23, 0xD0, 0x06, 0x20, + 0xFC, 0xF3, 0x3B, 0x23, 0xD5, 0x3C, 0x00, + 0xFC, 0xF3, 0x3B, 0x23, 0x6E, 0x20, 0x00, + 0xFC, 0xF3, 0x3B, 0x23, 0x33, 0x02, 0x00, + 0xFC, 0xF3, 0x3B, 0x23, 0xB3, 0x00, 0x0A, + 0xFC, 0xF3, 0x3B, 0x23, 0xB4, 0x00, 0x00, + 0xFC, 0xF3, 0x3B, 0x23, 0x70, 0x40, 0x00, + 0xFC, 0xF3, 0x3B, 0x3F, 0xD2, 0x00, 0x32, + 0xFC, 0xF3, 0x3B, 0x22, 0xFB, 0x00, 0x00 +}; + +static const u8 TF101_enable_NS[] = { + 0xC0, + 0xFC, 0xF3, 0x3B, 0x23, 0x03, 0x00, 0x01, + 0xFC, 0xF3, 0x3B, 0x23, 0x04, 0x23, 0x10 +}; + +static const u8 TF101_disable_NS[] = { + 0xC0, + 0xFC, 0xF3, 0x3B, 0x23, 0x03, 0x00, 0x00, + 0xFC, 0xF3, 0x3B, 0x23, 0x04, 0x00, 0x10 +}; + +#endif From patchwork Tue Feb 21 18:32:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Svyatoslav Ryhel X-Patchwork-Id: 60218 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp162909wrd; Tue, 21 Feb 2023 10:36:12 -0800 (PST) X-Google-Smtp-Source: AK7set/hhYDXG3RanZfXEalMJ1MhZ3oVR1PmZR/m1ezI75PT05m5IhT6Knd0gFPX/AzpX7MJoGdb X-Received: by 2002:a17:902:ebcf:b0:19b:98ce:48e6 with SMTP id p15-20020a170902ebcf00b0019b98ce48e6mr3721865plg.6.1677004571813; Tue, 21 Feb 2023 10:36:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677004571; cv=none; d=google.com; s=arc-20160816; b=zrhcEydjCdyeTT80WpatadA8RpSXOPou8ckzIvMBV5MwdeoISAd5+dkReVeuyRi7/M zXvRr/PxzvZ4QQF0mquYdL/FPfrZ0sS3WI7xStSU/qQh4AvfUXT5VUDJr1Si/Xbw6rlt visBpH2mcgFAjS8kruUZNGb/rPRrIBwSl7a7yHzHYZx6tK4VzNdHM0CYk55QprueKS1W ne4veh52bbIllGXhpvCr8324l4Lc2jeormtjwZ+wDME2E0Aayy7Tx961rPpm+xlzCtGP rKBdUjVhPluDuQNBets+7NOyGQU9Byq/Li2cONcToeiNm/K092IPbXpUxARUbschJaWQ wEyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=pQSmh32OKE33I5420mu9+Fe2dybwDMzPyqZp98Es5A0=; b=SGgST+9CVSK44rt8fCJqPed3igq/1z4QC4WEHPg0sz0om6xAEyCz8rrySEtIm5Coow P3zsdx5Ez7TUJ2Xwrny/9ei/Fd7lvoNUPgY8N2y3VUBQq2XPhTPZvUvDt7V2OUraKW7J PEhelKHQ6f0t5PXYPxQkw8LKXZCT/Q8mKqflAPI0KKEM0hQloTRc8sm7uKLMvovYKZaj MHwsaUaqY+wQtJ0t7xgrL69uzXQBufir4PLUtS0+s0cPxfWilRBUtKPh1mRX5tEs++pS TgupBj5KTS5PrI2ACxOrpfmIZsZC4xYHRLsAdSENI4CHhCrYUlpMhMwsMT/IFgNhTb9x X1ZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=NWW0looc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s7-20020a170902ea0700b0019ac13b77efsi6038783plg.158.2023.02.21.10.35.59; Tue, 21 Feb 2023 10:36:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=NWW0looc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231153AbjBUSdG (ORCPT + 99 others); Tue, 21 Feb 2023 13:33:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230223AbjBUSc4 (ORCPT ); Tue, 21 Feb 2023 13:32:56 -0500 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4BF94303D0; Tue, 21 Feb 2023 10:32:36 -0800 (PST) Received: by mail-ed1-x532.google.com with SMTP id ck15so22233637edb.0; Tue, 21 Feb 2023 10:32:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=pQSmh32OKE33I5420mu9+Fe2dybwDMzPyqZp98Es5A0=; b=NWW0loock5oBID3QFLzVq8K9EpVNYl+ZYmsU652aRgHtxBKeNfj8DPn7GmSYs/ttfZ sewS3t7yAWMaLsrLFpM20K9bzEbiga0bMCN6Q1YEmbwN0DCnD4VYXFRhq0Bf22glKT3j 9ehzd27SMlkUawFEBbW1dlxeCo9EH52YqwvgwEjhMURX18dliuMncwqZStFByf6z9OA7 6aUSJy1Kfwi2nwHPIG21i5UQo4g2uyHqY012/k1DuJVB57C2RAMteAafi9GTxvY8YmgD cMuLN9PWNsYrvyaNfhFkaE/89jEpoSXltkVWUB0ugYGreMFxCMpS62PuwvebAs3GujFe +8Cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=pQSmh32OKE33I5420mu9+Fe2dybwDMzPyqZp98Es5A0=; b=aJmSe1d2OlSDkbPq+f5hQwHC/yoBPktAcQ/6fHZ/DI5C1VrkAdiLq71KoXm1l29qQ6 +QcXi/zzfGaLoJRXk1tLNPrgGVc0fst59nXnPH2cTgsXEgsSZzLl1c8OAuZWWYxo/fhV 9lNc785E2P9L680jSsUSkIAjMq8INChahj/YshI84DlBHcRzhisfKQkHjqqYHLoyOoZf T2GceXGLeXHPI92WDS5KP9w4QQUPd/kcZQSEieOSIFqJdmiKTavK23CWyeaAXhFqgqXq AhGg7M6Oh1nYXN7e7wjeZ4s7mUZJZYnVld40Ey2eSpM0Z6MyPhgziEOO1TW4e+TAFPZq Z9Mg== X-Gm-Message-State: AO0yUKUh4G72iS9wQHzHyX5Ms1QzFJ0Vdu9XRAJb4npvVDLmMd+XiCPt p4s8xFdYN8hOXWXcvBuOLQc= X-Received: by 2002:a05:6402:516e:b0:474:a583:2e1a with SMTP id d14-20020a056402516e00b00474a5832e1amr5711519ede.12.1677004355491; Tue, 21 Feb 2023 10:32:35 -0800 (PST) Received: from xeon.. ([188.163.112.76]) by smtp.gmail.com with ESMTPSA id i3-20020a50c3c3000000b004af5aa16fcasm169102edf.66.2023.02.21.10.32.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Feb 2023 10:32:35 -0800 (PST) From: Svyatoslav Ryhel To: Rob Herring , Krzysztof Kozlowski , Liam Girdwood , Mark Brown , Thierry Reding , Jonathan Hunter , Greg Kroah-Hartman , Jaroslav Kysela , Takashi Iwai , Svyatoslav Ryhel , Maxim Schwalm , Dmitry Osipenko Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, linux-tegra@vger.kernel.org, linux-staging@lists.linux.dev Subject: [PATCH v1 10/10] ARM: tegra: transformers: bind FM34NE DSP on supported devices Date: Tue, 21 Feb 2023 20:32:11 +0200 Message-Id: <20230221183211.21964-11-clamor95@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230221183211.21964-1-clamor95@gmail.com> References: <20230221183211.21964-1-clamor95@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758466746247852011?= X-GMAIL-MSGID: =?utf-8?q?1758466746247852011?= FM34NE is mandatory for correct sound work on ASUS Transformers. Signed-off-by: Svyatoslav Ryhel --- arch/arm/boot/dts/tegra20-asus-tf101.dts | 14 +++++++++ arch/arm/boot/dts/tegra30-asus-tf201.dts | 29 +++++++++++++++++++ arch/arm/boot/dts/tegra30-asus-tf300t.dts | 29 +++++++++++++++++++ arch/arm/boot/dts/tegra30-asus-tf300tg.dts | 19 ++++++++++++ arch/arm/boot/dts/tegra30-asus-tf700t.dts | 19 ++++++++++++ .../arm/boot/dts/tegra30-pegatron-chagall.dts | 27 +++++++++++++++++ 6 files changed, 137 insertions(+) diff --git a/arch/arm/boot/dts/tegra20-asus-tf101.dts b/arch/arm/boot/dts/tegra20-asus-tf101.dts index 8d0613567e82..8a51a4c53014 100644 --- a/arch/arm/boot/dts/tegra20-asus-tf101.dts +++ b/arch/arm/boot/dts/tegra20-asus-tf101.dts @@ -493,6 +493,20 @@ i2c@7000c000 { status = "okay"; clock-frequency = <400000>; + /* Fortemedia FM34NE voice processor */ + dsp@60 { + compatible = "asus,tf101-dsp", "fortemedia,fm34"; + reg = <0x60>; + + bypass-gpios = <&gpio TEGRA_GPIO(H, 3) GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpio TEGRA_GPIO(H, 2) GPIO_ACTIVE_LOW>; + + vdd-supply = <&vdd_1v8_sys>; + + clocks = <&tegra_car TEGRA20_CLK_CDEV1>; + clock-names = "mclk"; + }; + /* Aichi AMI306 digital compass */ magnetometer@e { compatible = "asahi-kasei,ak8974"; diff --git a/arch/arm/boot/dts/tegra30-asus-tf201.dts b/arch/arm/boot/dts/tegra30-asus-tf201.dts index 47865deeb88a..e214fc23609e 100644 --- a/arch/arm/boot/dts/tegra30-asus-tf201.dts +++ b/arch/arm/boot/dts/tegra30-asus-tf201.dts @@ -60,6 +60,25 @@ bluetooth { }; }; + i2c@7000c000 { + /* Fortemedia FM34NE voice processor */ + dsp@60 { + compatible = "asus,tf201-dsp", "fortemedia,fm34"; + reg = <0x60>; + + bypass-gpios = <&gpio TEGRA_GPIO(BB, 6) GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpio TEGRA_GPIO(O, 3) GPIO_ACTIVE_LOW>; + + vdd-supply = <&vdd_1v8_dsp>; + + clocks = <&tegra_pmc TEGRA_PMC_CLK_OUT_1>; + clock-names = "mclk"; + + assigned-clocks = <&tegra_pmc TEGRA_PMC_CLK_OUT_1>; + assigned-clock-parents = <&tegra_car TEGRA30_CLK_EXTERN1>; + }; + }; + i2c@7000c400 { /* Atmel MXT768E touchscreen */ touchscreen@4d { @@ -606,6 +625,16 @@ haptic-feedback { vcc-supply = <&vdd_3v3_sys>; }; + vdd_1v8_dsp: regulator-dsp { + compatible = "regulator-fixed"; + regulator-name = "vdd_1v8_dsp"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + gpio = <&gpio TEGRA_GPIO(U, 5) GPIO_ACTIVE_HIGH>; + enable-active-high; + vin-supply = <&vdd_1v8_vio>; + }; + sound { compatible = "asus,tegra-audio-rt5631-tf201", "nvidia,tegra-audio-rt5631"; diff --git a/arch/arm/boot/dts/tegra30-asus-tf300t.dts b/arch/arm/boot/dts/tegra30-asus-tf300t.dts index 78f78cca337a..2dcf0e1f6ca2 100644 --- a/arch/arm/boot/dts/tegra30-asus-tf300t.dts +++ b/arch/arm/boot/dts/tegra30-asus-tf300t.dts @@ -68,6 +68,25 @@ bluetooth { }; }; + i2c@7000c000 { + /* Fortemedia FM34NE voice processor */ + dsp@60 { + compatible = "asus,tf300t-dsp", "fortemedia,fm34"; + reg = <0x60>; + + bypass-gpios = <&gpio TEGRA_GPIO(BB, 6) GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpio TEGRA_GPIO(O, 3) GPIO_ACTIVE_LOW>; + + vdd-supply = <&vdd_1v8_dsp>; + + clocks = <&tegra_pmc TEGRA_PMC_CLK_OUT_1>; + clock-names = "mclk"; + + assigned-clocks = <&tegra_pmc TEGRA_PMC_CLK_OUT_1>; + assigned-clock-parents = <&tegra_car TEGRA30_CLK_EXTERN1>; + }; + }; + i2c@7000c400 { /* Elantech EKTH1036 touchscreen */ touchscreen@10 { @@ -999,6 +1018,16 @@ display-panel { compatible = "innolux,g101ice-l01"; }; + vdd_1v8_dsp: regulator-dsp { + compatible = "regulator-fixed"; + regulator-name = "vdd_1v8_dsp"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + gpio = <&gpio TEGRA_GPIO(P, 3) GPIO_ACTIVE_HIGH>; + enable-active-high; + vin-supply = <&vdd_1v8_vio>; + }; + sound { compatible = "asus,tegra-audio-wm8903-tf300t", "nvidia,tegra-audio-wm8903"; diff --git a/arch/arm/boot/dts/tegra30-asus-tf300tg.dts b/arch/arm/boot/dts/tegra30-asus-tf300tg.dts index 82c51e177a70..7f23021611a4 100644 --- a/arch/arm/boot/dts/tegra30-asus-tf300tg.dts +++ b/arch/arm/boot/dts/tegra30-asus-tf300tg.dts @@ -164,6 +164,25 @@ bluetooth { }; }; + i2c@7000c000 { + /* Fortemedia FM34NE voice processor */ + dsp@60 { + compatible = "asus,tf300t-dsp", "fortemedia,fm34"; + reg = <0x60>; + + bypass-gpios = <&gpio TEGRA_GPIO(BB, 6) GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpio TEGRA_GPIO(O, 3) GPIO_ACTIVE_LOW>; + + vdd-supply = <&vdd_1v8_vio>; + + clocks = <&tegra_pmc TEGRA_PMC_CLK_OUT_1>; + clock-names = "mclk"; + + assigned-clocks = <&tegra_pmc TEGRA_PMC_CLK_OUT_1>; + assigned-clock-parents = <&tegra_car TEGRA30_CLK_EXTERN1>; + }; + }; + i2c@7000c400 { /* Elantech EKTH1036 touchscreen */ touchscreen@10 { diff --git a/arch/arm/boot/dts/tegra30-asus-tf700t.dts b/arch/arm/boot/dts/tegra30-asus-tf700t.dts index 766225ebdeab..bbb33119780e 100644 --- a/arch/arm/boot/dts/tegra30-asus-tf700t.dts +++ b/arch/arm/boot/dts/tegra30-asus-tf700t.dts @@ -85,6 +85,25 @@ bluetooth { }; }; + i2c@7000c000 { + /* Fortemedia FM34NE voice processor */ + dsp@60 { + compatible = "asus,tf700t-dsp", "fortemedia,fm34"; + reg = <0x60>; + + bypass-gpios = <&gpio TEGRA_GPIO(BB, 6) GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpio TEGRA_GPIO(O, 3) GPIO_ACTIVE_LOW>; + + vdd-supply = <&vdd_1v8_vio>; + + clocks = <&tegra_pmc TEGRA_PMC_CLK_OUT_1>; + clock-names = "mclk"; + + assigned-clocks = <&tegra_pmc TEGRA_PMC_CLK_OUT_1>; + assigned-clock-parents = <&tegra_car TEGRA30_CLK_EXTERN1>; + }; + }; + i2c@7000c400 { /* Elantech ELAN-3024-7053 or 5184N FPC-1 REV: 2/3 touchscreen */ touchscreen@10 { diff --git a/arch/arm/boot/dts/tegra30-pegatron-chagall.dts b/arch/arm/boot/dts/tegra30-pegatron-chagall.dts index 6e24b095713b..007ba3f3e95e 100644 --- a/arch/arm/boot/dts/tegra30-pegatron-chagall.dts +++ b/arch/arm/boot/dts/tegra30-pegatron-chagall.dts @@ -1145,6 +1145,23 @@ lcd_ddc: i2c@7000c000 { status = "okay"; clock-frequency = <400000>; + /* Fortemedia FM34NE voice processor */ + dsp@60 { + compatible = "pegatron,chagall-dsp", "fortemedia,fm34"; + reg = <0x60>; + + bypass-gpios = <&gpio TEGRA_GPIO(N, 3) GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpio TEGRA_GPIO(N, 0) GPIO_ACTIVE_LOW>; + + vdd-supply = <&vdd_1v8_dsp>; + + clocks = <&tegra_pmc TEGRA_PMC_CLK_OUT_1>; + clock-names = "mclk"; + + assigned-clocks = <&tegra_pmc TEGRA_PMC_CLK_OUT_1>; + assigned-clock-parents = <&tegra_car TEGRA30_CLK_EXTERN1>; + }; + /* Wolfson Microelectronics WM8903 audio codec */ wm8903: audio-codec@1a { compatible = "wlf,wm8903"; @@ -1500,6 +1517,16 @@ vdd_vbus_usb3: regulator-usb3 { vin-supply = <&vdd_5v0_sys>; }; + vdd_1v8_dsp: regulator-dsp { + compatible = "regulator-fixed"; + regulator-name = "vdd_1v8_dsp"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + gpio = <&gpio TEGRA_GPIO(N, 1) GPIO_ACTIVE_HIGH>; + enable-active-high; + vin-supply = <&vdd_1v8_vio>; + }; + pmc@7000e400 { status = "okay"; nvidia,invert-interrupt;