From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 822BBC43334 for ; Fri, 24 Jun 2022 10:30:44 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 938BD84328; Fri, 24 Jun 2022 12:30:42 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="dRXodY06"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1FCF084390; Fri, 24 Jun 2022 12:30:41 +0200 (CEST) Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id BEDB7842FD for ; Fri, 24 Jun 2022 12:30:38 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=festevam@gmail.com Received: by mail-pg1-x530.google.com with SMTP id r66so2032448pgr.2 for ; Fri, 24 Jun 2022 03:30:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bGlHOzkCTZbL5A4KBL50YS7vvvTVbY0AfX6j3Nxb5BU=; b=dRXodY06mS0wbqqU+UwEpuUOmYcZTHT20aUC9orZMIC9RuCU5uLAJWUD8HYbe9M0Zp 4iZt4MXTeg3kjiIxeAaLoYzNNd+8XDSAlTpIETMmMNIVdf/b//ImTt31LYv6886bVnOT rNlVd3Kbh/Ys3u5txvd2Sm3ev0nBfbWNPs2JscSlKZojwxIrFtOqPla8OcCZOVW0ZqtA loak5//6zYlGhJtpywBwextxd1F6Q2XaADTz3B7FP+XRwINnjxSntq7gLUI0psLpEA2I fxT6xJVEHvBuGyzGbDR9kG0o31Nps07oNiXpQkbQvxzFuhBCh4JmIHpmYL2VCHH0RCC9 2FpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bGlHOzkCTZbL5A4KBL50YS7vvvTVbY0AfX6j3Nxb5BU=; b=n9OeJBThru0ah8YLYex0DmDn2Fzov/f7IZMkRvjKEa/sN+O07N8yCRsmy7SsREdX4Z tYvdedugz+YJlGu1ACQkPcWiKSLFP2UUia5d9m75Qbb37UjvyIbY7D8qSkvsPq/7thRX r6MHk2lT2HOHkIYL4rb1WyeFBfg952QMQFPkNAcY95ZN6danpHYlhd+FdTE11939vyoD 57wDdHFJTdDSJ19r5/Xzu4Yh4HvNrEPavl7GHIN00ZyrUIASGw0HHRkVJFF/m2AQw9ZH HD1aOHxUV4WiuhktYoss38F/d/R4EIy2OAhP773rQ4qI2w31+J6qTSstDY1MK7bTU45n QMOg== X-Gm-Message-State: AJIora9RPijE4Is/DPURZdfQmuNSK1eF1GCqxqhmD6fqqrW7CIy9pOTW E78lmA1AZpb02JRV+Sfg57B7UG+5+YTD4tkPt9k= X-Google-Smtp-Source: AGRyM1vgPCl0YBmgAgsMInbnY/i+6OvT38NZDjUKRWfxPvUXiDk+M3OwNvdmmEMEei/6eqlja9VyaymqreFXgcX4ALw= X-Received: by 2002:a63:385c:0:b0:40c:bd3a:1506 with SMTP id h28-20020a63385c000000b0040cbd3a1506mr11359003pgn.366.1656066637059; Fri, 24 Jun 2022 03:30:37 -0700 (PDT) MIME-Version: 1.0 References: <20220624095219.430622-1-francesco.dolcini@toradex.com> In-Reply-To: <20220624095219.430622-1-francesco.dolcini@toradex.com> From: Fabio Estevam Date: Fri, 24 Jun 2022 07:30:25 -0300 Message-ID: Subject: Re: [PATCH] toradex: apalis/colibri_imx6: Fix CLKO1/CLKO2 output To: Francesco Dolcini Cc: Marcel Ziswiler , U-Boot-Denx Content-Type: text/plain; charset="UTF-8" X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean On Fri, Jun 24, 2022 at 6:52 AM Francesco Dolcini wrote: > > Set CLK01 and CLK02 to 24MHz and enable it in CCM_CCOSR register. > > This clock is used by both the audio codec (CLKO1) and by the CSI camera > (CLKO2) and is expected to be 24MHz. > > Despite the wrong 16.5MHz there was no real issue because of the wrong > frequency since Linux reconfigures the clocks afterward, however this > was triggering an issue with noise coming from the SGTL5000 audio codec. > > The problem is that the SGTL5000 does not have a reset pin and after it > is configured if the input MCLK clock is disabled it produces a constant > noise on its output, this was happening on software reboot. > > Forcing the clock to be enabled in U-Boot prevent the problem by making > sure that the clock is always available, without this change as soon as > Linux was changing the clock tree (setting clk_out_sel=1 without setting > clko2_en=1) the noise would start till the actual clock was enabled > (clko2_en=1) during the SGTL5000 driver probe. > > Signed-off-by: Francesco Dolcini Reviewed-by: Fabio Estevam