Received: by 2002:ab2:3b09:0:b0:1ed:14ea:9113 with SMTP id b9csp219629lqc; Thu, 29 Feb 2024 15:36:37 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVvrHOlFUVzKfxpSE03a4hNsEKgKUyEV7v7nWG/Sm6D8aYRzhjGg/aurYfzUNebc71WsDQ8eJStw+IHX60x8vtirpTnvOMKNjw7zpKIZQ== X-Google-Smtp-Source: AGHT+IFKkdMnUPBg/hmyuAE/AbIECM8f23Mc4A97QSCA8vtzMK2niJFWODcQwmDdzXvThMrN6L+K X-Received: by 2002:a17:902:ec8e:b0:1db:ab9c:d33d with SMTP id x14-20020a170902ec8e00b001dbab9cd33dmr59996plg.9.1709249796771; Thu, 29 Feb 2024 15:36:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709249796; cv=pass; d=google.com; s=arc-20160816; b=o10JClAGO4zeT/ywWDXWsrzZ+JaLAr9J2dLLp7cjCHeop6wHMiI+a5k++N4rX93LWX +JJDLM5uCQztR/QA/cjSjjmrpg7HkBVGwWdoFGXKCE/QpkS9JWBdVCtqhnmwW5ytcmnB CO1nJTUFeV+fEB12gLq+CXkYUiEGkHKj4mwR1iwFyrT9oUBnmzspj/PW1aFt/wUK4EjI C27vlUBdYidHcVhbZi80oTlbFW1DBRb1wDT13ixuvfv/HHaDgZ/yhK8niDqwsUAWtTUs hv0zrjskq1TO5YM3fKdTTn/ftY2GBxlt63gWmeBqyFoyHLeleXqi9FylkDYoEOt/xlZD e5ng== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=+28orNpMGgXroEpuUoZhdTb8QFxzIWPQpfl/txukD6k=; fh=0r9OMz4uVaXc+x/itVz/JBUFqADxpPCeIYupu6RvS8k=; b=EJ2rg7TV36bq/y15agCYeLiTDdBHtWn6hPd0IW/OjkJAzEhBoha2F8AZHad/lCfIf6 fIzAfJnG8DD6COXtz19fbWLAKEnkVGQ9p6/fq59GBGvgdaSoz71FcEltLm4h+K0CqLey HtC/J5RxXj8zxwfWjClm021WLrhl+IxwMEqkQYUjLFiGn6+B/x4UCBcD7qnFSEKPsG5C kcdiLXSEbYooG0A+0t9EV7XcKExHxD9qbJ5qMllWVnlEgE0D8Cx1tPITOO9476h72iRD P3zh/aayiv+ZKfCV7AYog00CmkGsdI6BTYbUIqmtas5vsEdfF3ZewyGmtYTuvmEkTpIm Tw6g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=AdLGrhwI; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-87700-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87700-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id l18-20020a170903245200b001db4f0f3698si2295273pls.458.2024.02.29.15.36.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 15:36:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-87700-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=AdLGrhwI; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-87700-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87700-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 1D3EE2864D6 for ; Thu, 29 Feb 2024 23:36:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C7D3D7A15D; Thu, 29 Feb 2024 23:36:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="AdLGrhwI" Received: from mail-il1-f170.google.com (mail-il1-f170.google.com [209.85.166.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D2E6C74BE0; Thu, 29 Feb 2024 23:36:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709249768; cv=none; b=VNfwWPATCcmofgBJGfZqtx4LyzhWOuESvdIG/wlXcz7QN3KPHXq+aeioWMeq1IoPI9ykmkltbkydz1Z54b27w5j7459r6+SDxaD2F0eEuZFUoirxSLPzm81bVCwhO+2vbO6Xc4zM3Pik52JM9jXn+0owP1m0kBBL9TltifEDB2o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709249768; c=relaxed/simple; bh=q4q7erHPk4dn/Nf8pXKLzbX4utEAaL/mtldvKHHBoS8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=QRiKVya6IOgX8jgYU52dMZB/4pUGChfAUAkIbGavALFNrPBvhpNKiu8mRtPsNJZWh99hScICPAhBP3e97eGjQux9g64nOLNUN308B4f6gtgVP3EoB1zOs6IDBcFrmDlmxshjIVeDBtLv3f40MdX5PKdKF25l0TkquXHJ+l4xtDM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=AdLGrhwI; arc=none smtp.client-ip=209.85.166.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-il1-f170.google.com with SMTP id e9e14a558f8ab-3651b948db6so6013195ab.0; Thu, 29 Feb 2024 15:36:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709249765; x=1709854565; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=+28orNpMGgXroEpuUoZhdTb8QFxzIWPQpfl/txukD6k=; b=AdLGrhwIxHQ54otLwzG+YS877fft+He9Gds3o4Epfnug5a9sB++yDtbB+hlwBHnnFs PcjimqGxPI+gJYghY/XW9aln+wmRIqdj91tuG7ZzIx0rFIbeiYoO7bB2at4LUtkWkLlP GuAIeKCHUgqdqsmyW72TjP0OrWwLhaSfLoK1JYLlcdMz/4ianGBJ/0bAOALPI7fvmoNR 3DoGW8+483oCNRUPwqWMDM1NTXPgx7ljODtIJ5on91zUMQVyiahPrwW7hwH04j1UXsDj Z9n3D1+bg/M0yW14efL3qt7dOZxPZ8quwFj+WBuMFpCY0U4aGWhXhafC6HHimo7Ln+Mt RVOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709249765; x=1709854565; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=+28orNpMGgXroEpuUoZhdTb8QFxzIWPQpfl/txukD6k=; b=hO/qB99dAfYftscN2lrpu94v6x8+EK2sJh52/4L96telXGHIT/CT79WilTHjkubH0c fQxiENuyMtWB5kUb7UMDihrwkBHRX+XMf84pHy40DlNvnaAvJ9KNoHK3h+xPmm9RIFmm yXmwMuhzhgLrA+iJxJO+xMcCQzHUBbESe1210FBJcxvt2QIli8K1550HBx6c6K9Fdwkx C3mrHbSqKIgyJpAxmRhZjjSM5cc0Qcp04isD1vKrubNhX/CCYgoW0IMo92Sdb3DDV7XL XLexBe8vyQJFajZbgmtvsgbVlysPJXTbblYasXroU63r4JanQPI47XXixdBfMYz+2QTg 2KKA== X-Forwarded-Encrypted: i=1; AJvYcCVnOEx+JjWi7Y/Etm+UdISj9ZVtcpGbCqJhVniFiTxg6Zr5UDoNc92tzttd7rUDexWQTZ93ecS11LVNFbXKAn9+ahizK+e5Mul/IjKuVbwoRPtSemTm+IJasERyia9zFXcwIB9yhiGXpA== X-Gm-Message-State: AOJu0YwJlxeOmF4UB1wg/SBOnezfHV/1uTC37OJ1PTc9KLx3ic1yozR6 2HisNZWNIplHBEabS+KGy2LRlfV9X1rOpaHhTqOP3tdiybohmb0ks4b8qUNC5yaGpg== X-Received: by 2002:a05:6e02:1d83:b0:365:b9c8:4436 with SMTP id h3-20020a056e021d8300b00365b9c84436mr183974ila.10.1709249764757; Thu, 29 Feb 2024 15:36:04 -0800 (PST) Received: from aford-System-Version.lan ([2601:447:d002:5be:c0ab:242c:2712:ad44]) by smtp.gmail.com with ESMTPSA id j5-20020a056e020ee500b0036576880ffcsm584260ilk.85.2024.02.29.15.36.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 15:36:04 -0800 (PST) From: Adam Ford To: linux-arm-kernel@lists.infradead.org Cc: aford@beaconembedded.com, Adam Ford , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , devicetree@vger.kernel.org, imx@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] arm64: dts: imx8mp-beacon-kit: Move sai3 to Audio_PLL1 Date: Thu, 29 Feb 2024 17:35:54 -0600 Message-ID: <20240229233556.116944-1-aford173@gmail.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The Beacon board has an LVDS display that cannot get a proper clock rate from Video_PLL if the DSI is operational due to the way the clock divides the pixel clocks from video_pll. To make the LVDS work, the LVDS needs to use an alternative clock. Because the clock rated needed for the LDB driving the LVDS display isn't divisible by the clock rate needed by SAI3, move SAI3 to use Audio_PLL1, and reconfigure the CODEC to use a 12MHz fixed clock. Because these clocks are no longer in sync with each other, the sound generated as the wrong pitch, so reconfigure the SAI3 to be the master since the CODEC can internally compensate when fed a fixed clock reference, even if it is not an even multiple of the desired rate. This now leaves AUDIO_PLL2 completely free for the LDB without compromising the audio sound from the codec. Signed-off-by: Adam Ford diff --git a/arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts b/arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts index a08057410bde..1f827ef38e36 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts +++ b/arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts @@ -211,20 +211,20 @@ sound-wm8962 { simple-audio-card,cpu { sound-dai = <&sai3>; + frame-master; + bitclock-master; }; simple-audio-card,codec { sound-dai = <&wm8962>; clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO1>; - frame-master; - bitclock-master; }; }; }; &audio_blk_ctrl { - assigned-clocks = <&clk IMX8MP_AUDIO_PLL1>, <&clk IMX8MP_AUDIO_PLL2>; - assigned-clock-rates = <393216000>, <135475200>; + assigned-clocks = <&clk IMX8MP_AUDIO_PLL1>; + assigned-clock-rates = <393216000>; }; &ecspi2 { @@ -370,8 +370,8 @@ wm8962: audio-codec@1a { pinctrl-0 = <&pinctrl_wm8962>; clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO1>; assigned-clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO1>; - assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL2_OUT>; - assigned-clock-rates = <22576000>; + assigned-clock-parents = <&clk IMX8MP_CLK_24M>; + assigned-clock-rates = <12000000>; DCVDD-supply = <®_audio>; DBVDD-supply = <®_audio>; AVDD-supply = <®_audio>; @@ -499,10 +499,9 @@ &pcie_phy { &sai3 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_sai3>; - assigned-clocks = <&clk IMX8MP_CLK_SAI3>, - <&clk IMX8MP_AUDIO_PLL2> ; - assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL2_OUT>; - assigned-clock-rates = <12288000>, <361267200>; + assigned-clocks = <&clk IMX8MP_CLK_SAI3>; + assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL1_OUT>; + assigned-clock-rates = <12288000>; fsl,sai-mclk-direction-output; status = "okay"; }; -- 2.43.0