Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp2654412iob; Fri, 6 May 2022 07:39:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyvLzNWjgS0GLqu+uQsAJfiQjuc67CEBsPa98HmMSvsK5wejWc6nAFW+bocLDHepGavprcX X-Received: by 2002:aa7:cd58:0:b0:427:b21f:5f79 with SMTP id v24-20020aa7cd58000000b00427b21f5f79mr3766232edw.172.1651847950232; Fri, 06 May 2022 07:39:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651847950; cv=none; d=google.com; s=arc-20160816; b=ZS4xpIBKWEyxO9g4RrKc98239TEmIbSytUQIMZWVrrTYOwSexwdq4CABv8N16E+vwz h5RpkCHKIJM45GIcF5MmvPN3Rg8d21MSiGg5zsqz593pxsVOpgBj6J4z6NnXVt82TkZ9 OIJutxpwG70oN7h/ULos/xUS163Yx+rIHvpDtsTPJo7so2z7XlZ+YlVLuBw53FHXTNum cfv1JBb8u3n5optZLSGGyHpOgGyclWJZqBzF8b11IpM9kW9EVmVM8BC+mutJSit1Kqp1 aStHy8dYqRVhbIPrUm+eYUYz07ok4MVOAdf6lQN3V5vf8g+co3eGKletDLQU2Vl065Is wN4g== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=J8+a9mlU+HAMJLGnLllvAGsgMLur27HqGuvGej0lFgg=; b=VJzNXGCHc36LNbgOqpA7TJEE2pD7oDe+93j6VlcQ2Smh6VWLJ7CuPg8ykjoQRJkETm Pc9K8/QUlgkgKAyFLk6RieSM/11OqBcc6J2TNZQkeQhJxc3fktfYVh+MSwA6ekToEkpD WjnwJifnO9Ou2ui6kesVaO+7+4XLnL630dJyIg0djITE5XNtqpzo0BTXAhEAr9RIbWDz 56QeRj8SYUKxWpfqyqZ2T7B0kuZy0FO0OL5EnsCyAcEW6a7ZLKUmQpXGXvTyQENg2VvD qulrhzUki53r+R24H5dVLchs6FtmZ9614hUB2nHrCC0ggbOy6U1ctFS71nlqglsGJ25D 0Tkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yOTOIoHg; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n12-20020a05640206cc00b0042861f463fesi864652edy.567.2022.05.06.07.38.45; Fri, 06 May 2022 07:39:10 -0700 (PDT) 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=@linuxfoundation.org header.s=korg header.b=yOTOIoHg; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234304AbiEDRWq (ORCPT + 99 others); Wed, 4 May 2022 13:22:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355812AbiEDREn (ORCPT ); Wed, 4 May 2022 13:04:43 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6959049910; Wed, 4 May 2022 09:53:24 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1F77A617A6; Wed, 4 May 2022 16:53:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 70B06C385A4; Wed, 4 May 2022 16:53:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1651683203; bh=kSA0y8q2B8BT5CNjVXoE461nAstdV7PrmKTozAHkcSs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yOTOIoHgIdYsVBcK7f3cFjB6sU9KZWncF8QdL9/JW6yMBsIAQQ+zQUI8tVOiutfGS j2xV0E+vCGm64iBWBBeEoCLVKwgJA8D9c3jldNSdsTG0u7hBC0qEyCbQ2DSyE5eH6p dMhGz7/C3JzxB/s3IvQNCnnK5xqsUa5KzDOjYpY0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Fabio Estevam , Tim Harvey , Max Krummenacher , Shawn Guo , Sasha Levin Subject: [PATCH 5.15 055/177] ARM: dts: imx6qdl-apalis: Fix sgtl5000 detection issue Date: Wed, 4 May 2022 18:44:08 +0200 Message-Id: <20220504153057.942692036@linuxfoundation.org> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220504153053.873100034@linuxfoundation.org> References: <20220504153053.873100034@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 From: Fabio Estevam [ Upstream commit fa51e1dc4b91375bc18349663a52395ad585bd3c ] On a custom carrier board with a i.MX6Q Apalis SoM, the sgtl5000 codec on the SoM is often not detected and the following error message is seen when the sgtl5000 driver tries to read the ID register: sgtl5000 1-000a: Error reading chip id -6 The reason for the error is that the MCLK clock is not provided early enough. Fix the problem by describing the MCLK pinctrl inside the codec node instead of placing it inside the audmux pinctrl group. With this change applied the sgtl5000 is always detected on every boot. Fixes: 693e3ffaae5a ("ARM: dts: imx6: Add support for Toradex Apalis iMX6Q/D SoM") Signed-off-by: Fabio Estevam Reviewed-by: Tim Harvey Acked-by: Max Krummenacher Signed-off-by: Shawn Guo Signed-off-by: Sasha Levin --- arch/arm/boot/dts/imx6qdl-apalis.dtsi | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/imx6qdl-apalis.dtsi b/arch/arm/boot/dts/imx6qdl-apalis.dtsi index 30fa349f9d05..a696873dc1ab 100644 --- a/arch/arm/boot/dts/imx6qdl-apalis.dtsi +++ b/arch/arm/boot/dts/imx6qdl-apalis.dtsi @@ -286,6 +286,8 @@ vgen6_reg: vgen6 { codec: sgtl5000@a { compatible = "fsl,sgtl5000"; reg = <0x0a>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_sgtl5000>; clocks = <&clks IMX6QDL_CLK_CKO>; VDDA-supply = <®_module_3v3_audio>; VDDIO-supply = <®_module_3v3>; @@ -516,8 +518,6 @@ MX6QDL_PAD_DISP0_DAT20__AUD4_TXC 0x130b0 MX6QDL_PAD_DISP0_DAT21__AUD4_TXD 0x130b0 MX6QDL_PAD_DISP0_DAT22__AUD4_TXFS 0x130b0 MX6QDL_PAD_DISP0_DAT23__AUD4_RXD 0x130b0 - /* SGTL5000 sys_mclk */ - MX6QDL_PAD_GPIO_5__CCM_CLKO1 0x130b0 >; }; @@ -810,6 +810,12 @@ MX6QDL_PAD_NANDF_CS1__GPIO6_IO14 0x000b0 >; }; + pinctrl_sgtl5000: sgtl5000grp { + fsl,pins = < + MX6QDL_PAD_GPIO_5__CCM_CLKO1 0x130b0 + >; + }; + pinctrl_spdif: spdifgrp { fsl,pins = < MX6QDL_PAD_GPIO_16__SPDIF_IN 0x1b0b0 -- 2.35.1