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 55360C433F5 for ; Fri, 11 Mar 2022 19:19:21 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D164883AF8; Fri, 11 Mar 2022 20:19:18 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1647026359; bh=OeHJ+xUuUY0vCJXqRSZVIHf6QeT8TuXSul530cJp6c8=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=uvgWWEQk5X6gN1C2jchWCgJklcKboqZr4v9i6ippPh/ZnyKrN+p/qo2uKDuNueErI 8BQhIoI3RQ9p+OhOeNxYME6OqufrQyUhw235qx7gaQYTUDPPxCvqemheRFDujoC2L5 hlcCz1o+wuabmIBA8ZdF+fYUAkaZPFvH1xCNRKi4cTgTt/DEGj7BxV3teWSgTbiGD+ di4j8Mh6m0lMoj8FWMvdfHrP46j4qvutytc7GzaepdljgjrG0/iv2ZOka0eQVN8KE2 jFSwz1YMC7y8LPIc26xanMUUoBAeUelVEjywrMlv/xKps5MnnFHYX8HKPpNyKOyhUv nKZFdxoQ+81DQ== Received: from [127.0.0.1] (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id C674A83108; Fri, 11 Mar 2022 20:19:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1647026355; bh=OeHJ+xUuUY0vCJXqRSZVIHf6QeT8TuXSul530cJp6c8=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=zLTcNgKJk7SOXxmY9mWpYDenAU22cCDhc5JMW/a7OVIeF3e3/gVTX58FbNJxX+uj+ IWtfvF9H5ZJSe7/iXsVeR/M+JFZTFmcGEAvNbq2XhFBHmYDZN3brYT2S7Qx4aRcC22 Esb2f2NYGuQ2AQq+Gn82L76EXPE54UGiCzmeu45jp0zfDELBEiU4CkhAmRXRgqL9LS I0dod0MNNEYbjSGAUJyufZ8Pbv1vd8TxCIeMjDuaav2GmGvxjp94S6y1lE9tPgtZda HQBOPijWjY6/WDRYeTuPqnRe8YhnlqxzUnHs7LciqtS2vUei/YGYm3Rc4UDb0vkJ+O 6AujD66KoO8Kw== Message-ID: <26c0b552-b13c-d48c-04f3-b47c9f72c9b5@denx.de> Date: Fri, 11 Mar 2022 20:19:14 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH v2 2/2] clk: imx8mq: Add a clock driver for the imx8mq Content-Language: en-US To: Angus Ainslie Cc: Angus Ainslie , u-boot@lists.denx.de, lukma@denx.de, seanga2@gmail.com, sbabic@denx.de, festevam@gmail.com, kernel@puri.sm, uboot-imx@nxp.com References: <20220311163536.1330032-1-angus@akkea.ca> <20220311163536.1330032-3-angus@akkea.ca> <14af7ab4-59a7-1af6-2f53-446eefcb87b5@denx.de> <86e82fc6-4a10-3d7c-19bf-e171815ef0e6@puri.sm> From: Marek Vasut In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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.5 at phobos.denx.de X-Virus-Status: Clean On 3/11/22 19:41, Angus Ainslie wrote: > On 2022-03-11 10:05, Marek Vasut wrote: >> On 3/11/22 18:02, Angus Ainslie wrote: >>> On 2022-03-11 08:57, Marek Vasut wrote: >>>> On 3/11/22 17:35, Angus Ainslie wrote: >>>>> All of the PLLs and clocks are initialized so the subsystems below are >>>>> functional and tested. >>>>> >>>>> 1) USB host and peripheral >>>>> 2) ECSPI >>>>> 3) UART >>>>> 4) I2C all busses >>>>> 5) USDHC for eMMC support >>>>> 6) USB storage >>>>> 7) GPIO >>>>> 8) DRAM >>>>> >>>>> The PLL rate tables are from the kernel >>>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=43cdaa1567ad3931fbde438853947d45238cc040 >>>>> >>>> >>>> That patch is three years old. >>>> That patch is for MX8M Mini clock, not for MX8M(Q). >>>> >>>> You can use the abbreviated commit ID instead: >>>> 43cdaa1567ad3 ("clk: imx8mm: Move 1443X/1416X PLL clock structure to >>>> common place") >>>> But that seems to be the wrong commit. >>> >>> That's the commit where the imx8m PLL frequency table is moved to a >>> common file for use by all of the imx8m variants. The imx8mq linux >>> driver does not even use the frequency tables so there is not a >>> specific commit for it. >> >> Isn't large part of this driver coming from these tables ? >> >> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/drivers/clk/imx/clk-imx8mq.c >> > > When I said tables I was referring to the PLL frequency tables. Ahh, hmmm, I see that we now have three copies of those PLL tables in each MX8M{M,N,P} driver and Linux instead has this in common code. Can you deduplicate the PLL tables before we add fourth copy ? > The driver is modelled after the u-boot imx8mm u-boot driver with > register and mux updates from the imx8mq reference manual. Very little > comes from the imx8mq kernel driver. Mainly I just verified mux naming > and register offsets against that driver. Would it make sense to pick the Linux kernel tables instead then, instead of hand-writing them from scratch ? That seems error prone. > That reminds me that I need to send a kernel patch for the monitor muxes. [...]