From patchwork Tue Feb 20 13:10:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Garg X-Patchwork-Id: 774263 Delivered-To: patch@linaro.org Received: by 2002:a5d:4943:0:b0:33b:4db1:f5b3 with SMTP id r3csp1653638wrs; Tue, 20 Feb 2024 05:42:34 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVgSIohXJpAdT8zlZ1wWh+UbUur/wQX2c3meGhZBLffh/krMjPnSOcs8aekpLd1WG2Evbl5m2SVOFdROahfse8y X-Google-Smtp-Source: AGHT+IGuBAUNRQYYp56xARL+GzAWRUDamBTTwIUhtPMJuVUrUzFIZMt1S+B+knlnr1BjUsNgRnDi X-Received: by 2002:aa7:d44c:0:b0:561:9968:a1dd with SMTP id q12-20020aa7d44c000000b005619968a1ddmr11656357edr.3.1708436554355; Tue, 20 Feb 2024 05:42:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708436554; cv=none; d=google.com; s=arc-20160816; b=Ujv1+MoieO3qvYTHhIHTaQG7fPEOD7sIGbIZcHJPnP+Gvk2vwtq6XqskfMJ5WzITRL +R5ulRgqBR2pEHkzY52fqiAayYq69Wi6imN78okoPvTGsCJ326+sC/10vuZ+M+p6em68 ofPHhGDnEb0k9PHlXGT7+7TmFSbiEKbyBV2gHxs9ULAzzjTb7JcbwFxMjBVK0Z1I9vVz fiUo/qWRN596wSayi7ohYXHCNPAcDpCraIyzOBoFYH/HQjCO5b3nPnyMccY9Gk43qy/w HR1+y/utX5dAoCaQme7MecE084MXFT8PQ0HqZnD5PZ3fZHAXuEpJ8QhgUVWCH/kjQDdn arZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=p2fliZdbKRAS/8qB6Q+Mr+XBR/1QnLa1MnnWR1xjOsU=; fh=8ZwVZswYkVHroomZr124LWDiFOgUogqHznd+CDswlR0=; b=saeR7x2UdpY1SUD0OO6g/gu8E06wPTodbzG9b9uBCYa8x3ENJwUigDV74meQvyv4jF no2oOWew78leHxyry5UeSLcc6AIq+lhO5sHTkF5tPxvchYngS9JcR38FIzLDhjvIv3zO kN9zEaVlK0tH8vt23pfCeOwrYEtJSr2ownErzm+N8laP5qIf6JwFVkYNsvpgocXgUWKa 7flhTJ3FFXssZRG+W/2vidnStOjPGbHJ15yq+bmhlS4iWN62czskuNzndZfzbTblUhUz bLs9WvOwxhGFhGBI+fUCEk6rPn5533Vpz7WCIF0HgcF3yryC49l3zbmMr0IFdDP87ZEy mD4A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zBZXPaBx; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id q22-20020a056402033600b00563f918b3b7si3441901edw.129.2024.02.20.05.42.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 05:42:34 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zBZXPaBx; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B47A887DC9; Tue, 20 Feb 2024 14:42:33 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org 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=linaro.org header.i=@linaro.org header.b="zBZXPaBx"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 49E8C87D91; Tue, 20 Feb 2024 14:42:32 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-qv1-xf35.google.com (mail-qv1-xf35.google.com [IPv6:2607:f8b0:4864:20::f35]) (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 ABCF487D5D for ; Tue, 20 Feb 2024 14:42:27 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sumit.garg@linaro.org Received: by mail-qv1-xf35.google.com with SMTP id 6a1803df08f44-68f87e24be8so10411386d6.2 for ; Tue, 20 Feb 2024 05:42:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708436546; x=1709041346; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=p2fliZdbKRAS/8qB6Q+Mr+XBR/1QnLa1MnnWR1xjOsU=; b=zBZXPaBxOFF7fS89yOgwujaBEOx8/soQr3JBaLF7WO9DarTCtls6UD1ESCqsXljlGj 3vjxHyKSXQqHfPskOY4bi6MJ7n1ynDllGNvgNdRAKBD466dDNaVXbmp/PKpKXKZIyTA1 4pE28BzqzMlE3G38bD6V17TQoxz24I4RCfoYTInf+UwlIL/f8rusnBdx1aVp9FlBzAAT JcDS/73QNXWakGcbDlPi8/YYRC3GTft0mw7bF2FL+6j/1lbmxgHaHfNK7FycDDwBh7yk 4NRluebYINyjCMhkc6DvFfm8KYPDYRvQsi/zDBJbFgvP3SEfo7Ce030kNOtow+Zo85j8 e61g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708436546; x=1709041346; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=p2fliZdbKRAS/8qB6Q+Mr+XBR/1QnLa1MnnWR1xjOsU=; b=tM6xSxIfTt3dAyMMPWw8hIujfLtZnvr3ewm89Rw1TfPbFxwIgquv+6GGPdUoONCU1J SiU+wyRaN7FZ9maHkgSsSvI953CZ8vyu57zleMTBTAhcWlkEvN5CIZ5m/42inTcNJdrl Z88yq0yPF76ruR065NGkAnphJxzNa/UTLkKct9xjbKFMIoyngNEOhnnfJ+Io0T0hKx6p 5Q0beoKaKR/oqz8HX7fSFZeO24YbA9vYrJkIAhUzZN+BI7LJmOACJ1A3yhy6qRL8OwZF zz50W3hNZ7cprZ+ykbk1IquXJqadjyUk/XTz4Bhi92/ZAxa+m8SRfSp1An3oq+e7FmIV rAPQ== X-Gm-Message-State: AOJu0YwrwPAv1flDIv8X7kcPqg8hjXwvggEGRiGe+2eLTSJfXFJGgC88 RuxWb4SFFIoIipU9o6myCXdg6oGfih7E+m5AzIAjsYWRNvIQKOWblAAgrXVvRuoxySIeT02Njw7 i X-Received: by 2002:a05:6a21:1519:b0:1a0:828a:50d8 with SMTP id nq25-20020a056a21151900b001a0828a50d8mr13499651pzb.22.1708434677503; Tue, 20 Feb 2024 05:11:17 -0800 (PST) Received: from sumit-X1.. ([223.178.209.148]) by smtp.gmail.com with ESMTPSA id y12-20020aa79e0c000000b006e3e72a4f87sm5195902pfq.0.2024.02.20.05.11.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 05:11:17 -0800 (PST) From: Sumit Garg To: u-boot@lists.denx.de Cc: marcel.ziswiler@toradex.com, trini@konsulko.com, lukma@denx.de, seanga2@gmail.com, jh80.chung@samsung.com, festevam@denx.de, andrejs.cainikovs@toradex.com, sjg@chromium.org, peng.fan@nxp.com, aford173@gmail.com, marex@denx.de, ilias.apalodimas@linaro.org, sahaj.sarup@linaro.org, fathi.boudra@linaro.org, remi.duraffort@linaro.org, daniel.thompson@linaro.org, Sumit Garg Subject: [PATCH 1/7] clk: imx8mp: Add support for PCIe clocks Date: Tue, 20 Feb 2024 18:40:50 +0530 Message-Id: <20240220131056.2962331-2-sumit.garg@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240220131056.2962331-1-sumit.garg@linaro.org> References: <20240220131056.2962331-1-sumit.garg@linaro.org> MIME-Version: 1.0 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 Pre-requisite to enable PCIe support on iMX8MP SoC. Signed-off-by: Sumit Garg --- drivers/clk/imx/clk-imx8mp.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/clk/imx/clk-imx8mp.c b/drivers/clk/imx/clk-imx8mp.c index a21a3ce34bb..7dfc829df2c 100644 --- a/drivers/clk/imx/clk-imx8mp.c +++ b/drivers/clk/imx/clk-imx8mp.c @@ -62,6 +62,10 @@ static const char *imx8mp_dram_apb_sels[] = {"clock-osc-24m", "sys_pll2_200m", " "sys_pll1_160m", "sys_pll1_800m", "sys_pll3_out", "sys_pll2_250m", "audio_pll2_out", }; +static const char * const imx8mp_pcie_aux_sels[] = {"clock-osc-24m", "sys_pll2_200m", "sys_pll2_50m", + "sys_pll3_out", "sys_pll2_100m", "sys_pll1_80m", + "sys_pll1_160m", "sys_pll1_200m", }; + static const char *imx8mp_i2c5_sels[] = {"clock-osc-24m", "sys_pll1_160m", "sys_pll2_50m", "sys_pll3_out", "audio_pll1_out", "video_pll1_out", "audio_pll2_out", "sys_pll1_133m", }; @@ -272,6 +276,7 @@ static int imx8mp_clk_probe(struct udevice *dev) clk_dm(IMX8MP_CLK_DRAM_ALT, imx8m_clk_composite("dram_alt", imx8mp_dram_alt_sels, base + 0xa000)); clk_dm(IMX8MP_CLK_DRAM_APB, imx8m_clk_composite_critical("dram_apb", imx8mp_dram_apb_sels, base + 0xa080)); + clk_dm(IMX8MP_CLK_PCIE_AUX, imx8m_clk_composite("pcie_aux", imx8mp_pcie_aux_sels, base + 0xa400)); clk_dm(IMX8MP_CLK_I2C5, imx8m_clk_composite("i2c5", imx8mp_i2c5_sels, base + 0xa480)); clk_dm(IMX8MP_CLK_I2C6, imx8m_clk_composite("i2c6", imx8mp_i2c6_sels, base + 0xa500)); clk_dm(IMX8MP_CLK_ENET_QOS, imx8m_clk_composite("enet_qos", imx8mp_enet_qos_sels, base + 0xa880)); @@ -322,6 +327,7 @@ static int imx8mp_clk_probe(struct udevice *dev) clk_dm(IMX8MP_CLK_I2C2_ROOT, imx_clk_gate4("i2c2_root_clk", "i2c2", base + 0x4180, 0)); clk_dm(IMX8MP_CLK_I2C3_ROOT, imx_clk_gate4("i2c3_root_clk", "i2c3", base + 0x4190, 0)); clk_dm(IMX8MP_CLK_I2C4_ROOT, imx_clk_gate4("i2c4_root_clk", "i2c4", base + 0x41a0, 0)); + clk_dm(IMX8MP_CLK_PCIE_ROOT, imx_clk_gate4("pcie_root_clk", "pcie_aux", base + 0x4250, 0)); clk_dm(IMX8MP_CLK_PWM1_ROOT, imx_clk_gate4("pwm1_root_clk", "pwm1", base + 0x4280, 0)); clk_dm(IMX8MP_CLK_PWM2_ROOT, imx_clk_gate4("pwm2_root_clk", "pwm2", base + 0x4290, 0)); clk_dm(IMX8MP_CLK_PWM3_ROOT, imx_clk_gate4("pwm3_root_clk", "pwm3", base + 0x42a0, 0));