Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp4840266rwi; Mon, 17 Oct 2022 11:28:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM54N8YQeg7w7J1UNmXUBgSiUNR3ytf1seNNOODdkPseFMiFyV+MGCQmOTNZUOxZ7Wl/tB5V X-Received: by 2002:a63:5b5c:0:b0:440:8531:d3f6 with SMTP id l28-20020a635b5c000000b004408531d3f6mr12131276pgm.114.1666031300662; Mon, 17 Oct 2022 11:28:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666031300; cv=none; d=google.com; s=arc-20160816; b=QQWmjHrucrO6hoqmz7R8d3mtk4I+7FFDOC8PPAg8rLkkvJzN8cZgDMXct4YfaoiPZU jwT6LiKss7WHVZkQNfrUcipar79vj/rW+D3oHXmsbElKxLe/bWHwHaEfawI8AiZ8Z2Qu bz19IXtvTrpWPs4612lHRttRW3hNSVGhVY5zK/0VqrGp6QeBqyroBlkafW3vA1CR0Mmz lr06qhNEwxdzlFJINk9KARk+nM5VMZfWt/PgQKiMue3v3oNmxBDl8at5xtTcxQkOmDyW RWkjwPR3i5qPNgDhBjzhqZZ4VmhkD+Qh6BfWmysyTehqqIn7y+d5WUPhFI40TSrINGPh V4bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=QEOWtVNjYdH9YkaPM5vlZiYdAHpFwckF9QtAFSfsGqA=; b=T2xsImV+ZRERHiTvRjTOEwbOhYMNe+tEVZaRyinH9YGB0jCUpTs2fl7NE3MFDuP9/q yK3Bjc4wnDpjFQYseHDmqlVySFF5DXVRYSm4tk5t30tzK+x5FtKo+w7pFDvdLgCpPR7W KTOlLYbiwibtzmrGpILuHn1P6/0NF0ED0XT1ztQxclVXGeCxLduxxiKzbOR7F6xc0o4c NG02jUfgsi0QVeVB8tQjvIEDA9F5OU4b27LkLt6BP+xL+ZDPHllbtWlVrxTfVij1YA5D /TXqbr4euITRgztjQvAPk3MOv19kkvCtWZ6KomIeRk1tstf+0vcVAgbnDkSlMmPTs8we CtSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=pKRP1zgd; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o10-20020a056a0015ca00b00557a43656c6si12478713pfu.109.2022.10.17.11.28.08; Mon, 17 Oct 2022 11:28:20 -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=@gmail.com header.s=20210112 header.b=pKRP1zgd; 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 S230509AbiJQSIC (ORCPT + 99 others); Mon, 17 Oct 2022 14:08:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230464AbiJQSIA (ORCPT ); Mon, 17 Oct 2022 14:08:00 -0400 Received: from mail-io1-xd33.google.com (mail-io1-xd33.google.com [IPv6:2607:f8b0:4864:20::d33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BDD0F74B8C; Mon, 17 Oct 2022 11:07:59 -0700 (PDT) Received: by mail-io1-xd33.google.com with SMTP id h203so9785958iof.1; Mon, 17 Oct 2022 11:07:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=QEOWtVNjYdH9YkaPM5vlZiYdAHpFwckF9QtAFSfsGqA=; b=pKRP1zgd6Q4k0q1nFaZ4ByQLmGLR4yopgzx4PRvBUNcappOfoWqE4JZhudsG0GffKG vk2i4pydG1QSnz5rfF6kEAKjzYByjxFgEClxI6yu5E6GHDNa9k0sC+vqvaewVhWFSFuv 2ryvlMbrazWuTubDcOAMvD8gia7zy0a94rI8DE/8ycz1jRGQJ1peutbYG0Inm+WDJQnl AZKSDEsamQlwcjgkUbBWrJHqS6KvIaHJMF+gZSPGX4DJrfDzySSPuAjTXaLnS2Hq+YN5 mETENz3PpTRUVLEbo3ZR+drpeA/6u2mAeDDhKYuWuNt/yKsiPWnyMz3jxWJ3aMaZS1pw 8Rog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QEOWtVNjYdH9YkaPM5vlZiYdAHpFwckF9QtAFSfsGqA=; b=te0fAfPquR84XlIMquZkO4+CRpEmPmHdnhsMSDLd0I6b5GeHeizTzDOyFOfQ/FCF1D GCitoaz/9iR/9HXVHluEHb2MODS8PjOmBEL1eb+ZvonU+RLGCY4rZFU7n/NYLVZyeXDZ 05eW2E26dCrVVTu7SmE/AAjkFzBT1y0XHnM1g7JwL8do3YbRN4YBN6KNg6LTV2smN/jF t5TxWRfmbilOTiJRR4AvFRI2/itIu6/QXdUnCBBMWfYvQIdurIu80sGVowlFzURZXj2u YBTa/2GycUs7sEbtQFXHgcXamPlsGCZVD95IzHiAJh2csFYRgUQd8+rbHmHWN1zqkHyF cXtQ== X-Gm-Message-State: ACrzQf1b29Z7tXmnJwc2FD3ajfUSenyK0DdLKeFt3icPjY2nxx6YhRBj ahd+gk9AOm86ZtZ+SonSOjKKM3HuiC7Xp/JkFLE= X-Received: by 2002:a6b:6716:0:b0:6bc:113c:22a2 with SMTP id b22-20020a6b6716000000b006bc113c22a2mr4946988ioc.12.1666030079215; Mon, 17 Oct 2022 11:07:59 -0700 (PDT) MIME-Version: 1.0 References: <20221016150110.3020451-1-lis8215@gmail.com> <20221016150110.3020451-5-lis8215@gmail.com> <0S4WJR.4KB18PR21S9K1@crapouillou.net> In-Reply-To: From: Siarhei Volkau Date: Mon, 17 Oct 2022 21:07:47 +0300 Message-ID: Subject: Re: [PATCH v2 4/4] clk: Add Ingenic JZ4755 CGU driver To: Paul Cercueil Cc: Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Thomas Bogendoerfer , linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 =D0=BF=D0=BD, 17 =D0=BE=D0=BA=D1=82. 2022 =D0=B3. =D0=B2 20:24, Paul Cercue= il : > > > > Le lun., oct. 17 2022 at 20:10:56 +0300, Siarhei Volkau > a =C3=A9crit : > > =D0=BF=D0=BD, 17 =D0=BE=D0=BA=D1=82. 2022 =D0=B3. =D0=B2 12:24, Paul Ce= rcueil > > : > > > >> > + [JZ4755_CLK_AIC] =3D { > >> > + "aic", CGU_CLK_GATE, > >> > + .parents =3D { JZ4755_CLK_I2S, -1, -1, -1 }, > >> > >> Wrong parent here, should be JZ4755_CLK_EXT_HALF. > > > > I don't agree, see Figure 20-13 in the JZ4755 PM. > > 20-13 describes the I2S clock, no? See 20.4.9 Serial Audio Clocks and Sampling Frequencies. It stated that: "For internal CODEC ... CODEC needs a 12MHz clock from CPM called SYS_CLK ...", but SYS_CLK is described only in the I2S Controller section. I assume it is the same clock. > > AIC clock's parent is EXT/2 according to the diagram in 8.2.2. > It's a bit cryptic manual, who knows how it's done in the HW. I observed that codec runs on a desired sample rate only when PLL equals 432 or 216 MHz, but SYS_CLK is definitely configured to be 12MHz - from EXTCLK. On other PLL frequencies it is lower by 2-4% than expected. That isn't observed on JZ4725B. > >> Well it would be good to know... > > > > Indeed, I will try to figure it out. > > Cheers, > -Paul > >