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 88D78C4167B for ; Tue, 5 Dec 2023 04:17:50 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DD4F2870DE; Tue, 5 Dec 2023 05:17:48 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="tWn7QeLi"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 289B28715C; Tue, 5 Dec 2023 05:17:48 +0100 (CET) Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D7E81870D2 for ; Tue, 5 Dec 2023 05:17:44 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-kumar1@ti.com Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 3B54HgsH082937; Mon, 4 Dec 2023 22:17:42 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1701749862; bh=gauy0L3YQtc+aZkaL8Mq++JCnZOfqV7QLpfyNzXh/oU=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=tWn7QeLi2v0hy+vvHfHWLzItcSbdP6JcrW7FiyPfntqKJt4yV8FEiQwtoQbZsd2Yb X9mydy+lEBfXZB20sNqyDhS1w1Fx16rbVyUSG+7VC4TmRRa/MbcBh6oCbiylhbHXs0 35Ux4T7ew7WVw1gH+epsSI/p6qVrsdj2fOErUAHU= Received: from DLEE113.ent.ti.com (dlee113.ent.ti.com [157.170.170.24]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 3B54HgPm062405 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 4 Dec 2023 22:17:42 -0600 Received: from DLEE102.ent.ti.com (157.170.170.32) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Mon, 4 Dec 2023 22:17:42 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Mon, 4 Dec 2023 22:17:42 -0600 Received: from [172.24.20.156] (ileaxei01-snat.itg.ti.com [10.180.69.5]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 3B54HdlZ057509; Mon, 4 Dec 2023 22:17:40 -0600 Message-ID: Date: Tue, 5 Dec 2023 09:47:38 +0530 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/2] arm: mach-k3: j72xx: add new 'virtual' mux To: Reid Tonking , CC: , , , , , References: <20231201213320.1876892-1-reidt@ti.com> <20231201213320.1876892-2-reidt@ti.com> Content-Language: en-US From: "Kumar, Udit" In-Reply-To: <20231201213320.1876892-2-reidt@ti.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 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.8 at phobos.denx.de X-Virus-Status: Clean On 12/2/2023 3:03 AM, Reid Tonking wrote: > From: Bryan Brattlof > > In order for the Cortex-A72s to operate at different frequencies other > than the default 2GHz, add in a new 'virtual' mux (a mux that does not > physically exist in the clock tree) that can be selected. > > CC: Vishal Mahaveer > Signed-off-by: Bryan Brattlof > Signed-off-by: Apurva Nandan > Signed-off-by: Reid Tonking > --- > arch/arm/mach-k3/j7200/clk-data.c | 13 +++++++++++-- > 1 file changed, 11 insertions(+), 2 deletions(-) > > diff --git a/arch/arm/mach-k3/j7200/clk-data.c b/arch/arm/mach-k3/j7200/clk-data.c > index 9b45786a2d4..126627fff47 100644 > --- a/arch/arm/mach-k3/j7200/clk-data.c > +++ b/arch/arm/mach-k3/j7200/clk-data.c > @@ -141,6 +141,11 @@ static const char * const k3_pll_ctrl_wrap_main_0_sysclkout_clk_parents[] = { > "hsdiv4_16fft_main_0_hsdivout0_clk", > }; > > +static const char * const main_pll8_sel_extwave_out0_parents[] = { > + "pllfracf_ssmod_16fft_main_8_foutvcop_clk", > + "hsdiv0_16fft_main_8_hsdivout0_clk", > +}; > + > static const char * const mcu_obsclk_outmux_out0_parents[] = { > "mcu_obsclk_div_out0", > "gluelogic_hfosc0_clkout", > @@ -396,6 +401,7 @@ static const struct clk_data clk_list[] = { > CLK_DIV("hsdiv4_16fft_main_3_hsdivout2_clk", "pllfracf_ssmod_16fft_main_3_foutvcop_clk", 0x683088, 0, 7, 0, 0), > CLK_MUX_PLLCTRL("k3_pll_ctrl_wrap_main_0_sysclkout_clk", k3_pll_ctrl_wrap_main_0_sysclkout_clk_parents, 2, 0x410000, 0), > CLK_DIV("k3_pll_ctrl_wrap_main_0_chip_div1_clk_clk", "k3_pll_ctrl_wrap_main_0_sysclkout_clk", 0x410118, 0, 5, 0, 0), > + CLK_MUX("main_pll8_sel_extwave_out0", main_pll8_sel_extwave_out0_parents, 2, 0x688040, 0, 1, 0), > CLK_DIV("mcu_obsclk_div_out0", "wkup_obsclk_mux_out0", 0x43008000, 8, 4, 0, 0), > CLK_MUX("mcu_obsclk_outmux_out0", mcu_obsclk_outmux_out0_parents, 2, 0x43008000, 24, 1, 0), > CLK_PLL("pllfracf_ssmod_16fft_main_4_foutvcop_clk", "main_pll4_xref_sel_out0", 0x684000, 0), > @@ -545,11 +551,14 @@ static const struct dev_clk soc_dev_clk_data[] = { > DEV_CLK(288, 14, "board_0_hfosc1_clk_out"), > DEV_CLK(288, 15, "k3_pll_ctrl_wrap_main_0_chip_div1_clk_clk"), > DEV_CLK(288, 17, "k3_pll_ctrl_wrap_main_0_chip_div1_clk_clk"), > + DEV_CLK(323, 0, "main_pll8_sel_extwave_out0"), > + DEV_CLK(323, 1, "pllfracf_ssmod_16fft_main_8_foutvcop_clk"), > + DEV_CLK(323, 2, "hsdiv0_16fft_main_8_hsdivout0_clk"), > }; > > const struct ti_k3_clk_platdata j7200_clk_platdata = { > .clk_list = clk_list, > - .clk_list_cnt = 109, > + .clk_list_cnt = 110, > .soc_dev_clk_data = soc_dev_clk_data, > - .soc_dev_clk_data_cnt = 129, > + .soc_dev_clk_data_cnt = 132, Can we think of using ARRAY_SIZE for these number clk_list_cnt and soc_dev_clk_data_cnt > };