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;