From patchwork Wed Sep 28 08:45:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 2396 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 30FB63F235 for ; Wed, 28 Sep 2022 10:45:28 +0200 (CEST) Received: by mail-ej1-f71.google.com with SMTP id qw31-20020a1709066a1f00b00783d9fd7df2sf3247559ejc.17 for ; Wed, 28 Sep 2022 01:45:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1664354728; cv=pass; d=google.com; s=arc-20160816; b=q2JLg/HcXQUWehhELO6xek1YxXiOvqJayibIa54R9GdO5SpUQ/N3/33Ejvs3LG84i0 a2hPdJWXbg2YdmQ0V+t4jY0B2otyae5jg69TJwFiLtI5voBdhEJvB1Qe5e3Gwwd5Xf3j 3lCQ910iYL9Ny5JrlaHilDl0LaLnGeoZhP1/q37NbRaKes9Tu8vS8BSf5dQRfjZKdqbB SmEY+jE7+SYSxuS7JH04PKpHYTnq2exFA8TR2wJpgPjkPDbqaehvv7XdL66Dd+jFzegC 0uw9P8m2zFTDJ+NTVKuFtjv8ovbLIZaTx4M4NWeo0yfY8WnENAgaw6U67Cez2IjKnBoQ AkSQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=bYu/lFaINeHbPf4AicabBNnXlErSQAjKPVzPqNLIHdk=; b=QeevYqG4nFQIpC8slaWb/3MPKyxFM0s/QTBB1d4cNCMI2UiH96dgs7bD6lFJjGeBhu zEqVF/PI+vOf5ibijcj9wSG9wWR3K/owimvFpqGZKPxs7mhauzo7tZQ216rneJEa5hXJ xFh499PKWbwxyoOi8zj0/YbTOGWsmHSnEiza0vPvQ3ZZZ/nXiXsQuW1J+5ARqOGjZlRq vBvXrQjPk+g5ZBHcX6uudUHipKDlKWIio1cX60bqB/ZR4DjQWdCM4/SR2k2B/OHOYWoh T9EX5pdkQqetoVDfHU/QiUU3rqpQ6h/d4S7f2jrSt03gnr9CPkIqVdcsoL0XxR70VymN UODA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="BB5/lhMZ"; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date; bh=bYu/lFaINeHbPf4AicabBNnXlErSQAjKPVzPqNLIHdk=; b=Ctbans4hp3TQL0lyLRRtlvCTGcA4Qy/8doEyvPQg/yKGxJNH2KNEF0MGboY0OCYOpf 7bZnYsnvtfdH8+xC9DKEYABN9xEI7H/2mMzW0RYgB3rR7zG3nLncCFZnHJAFZpe12CqM jwhnyCMJdOO06H+1b+m5e4vIoy8mKQ4oo4Jfk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date; bh=bYu/lFaINeHbPf4AicabBNnXlErSQAjKPVzPqNLIHdk=; b=gYLrm3M5SJ8/LQzjP6kPJ1ABfvOmJsHUhLzyHabkIehj/ppsb3ImuSYg4x/TgRzqjM SguG6AccRyHy1MKrI0L+wnpLkiUYjQERDGEAjmCRNCGm/hd1wlroxMIDZaGnsx8b42LR S3Y0hrtGXfevHM2cHYOul7WNxYt03HRYcMHFRuDZHbbFLkInRl5M4ez584sFw8hogLAw xSimzDlggX97jIS2TLMTpwVjAJK6MqAVrLi3zxao/VZqnmTAbJaDcFdCSZbYc4n1ig8i 43xhc1W/c66CulskKOusHMAYzrRFWpkFNqGKqNu6HnRMAoFPfAouvp2wU613JkJ0ErJ1 JQBA== X-Gm-Message-State: ACrzQf0z+fDN18lGqLETCiO8ksIUBZFl/4fREvW2qTbwBJjzdi0934zv dfhqpW77wi27RfeOJMtyFFNYEbZE X-Google-Smtp-Source: AMsMyM6zT4bS8iY9U01jB0ceHP5mLFIWyw9vjyLKA0Sedmp7DlL7wXvkmCSYSHscIvHLBht+Ty9H6A== X-Received: by 2002:a17:906:4795:b0:787:434f:d761 with SMTP id cw21-20020a170906479500b00787434fd761mr5186458ejc.597.1664354727849; Wed, 28 Sep 2022 01:45:27 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:2690:b0:457:99eb:cba9 with SMTP id w16-20020a056402269000b0045799ebcba9ls1006558edd.0.-pod-prod-gmail; Wed, 28 Sep 2022 01:45:26 -0700 (PDT) X-Received: by 2002:a05:6402:2947:b0:451:32a:2222 with SMTP id ed7-20020a056402294700b00451032a2222mr31951885edb.376.1664354726705; Wed, 28 Sep 2022 01:45:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664354726; cv=none; d=google.com; s=arc-20160816; b=JdFxrfEq4IEr3ieDAouZuSKtOoLWE19uyOoOFgfenHUfAhjIn/b7Rkcsjv2VfoOPKD Iq/kRSgoYupgQ2hLrqMXCfQXHSGX2qPf2leNUt2tCf/NV8uERGbrh380vjo7fp7pXz9z uLFwwd9E2ky33v+mkK8Dos6BZ7zMHTVDHTe7wagprcY7/F32C5DjlPEluh808YEeNWQg flbOQi+y/Vsnnq/86NhIBavl9l8jzaEbknwYgJIwmX/snIIKr3FpOQ3HuICSRqLdaQ/B 0WoZVlSHH+FFc6C2hqmPgEEUqutRtUmIcaj/4QaXmDyncS4+3cgfvVVQxNzNjVE32mil TpnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=4Mtvf75aAuDyqMvX2drR2TOMmgNgBilytxd7R8mYfmk=; b=SfrCpKd2ub7fLRQbEsUslMNpXmko/wX+kL2r0gzV+EqjNi7jXUBIIF0MZ0TslLjCUd 3Txjl7mJFZwmig2dm5N2faZGn8l4LFLToYWbB2w0tLimBUvHrAEcP8rcJZw1kM/dzrAq AQg1p+AeUdynaQ6xDoAY4uJPL8M6VbzJWwEvuVLMDVNJIizcXfeJs0Usb/UCBbn/6gCs WcifuUTSKEBqXjOELbjMm1lEXrBijAMy268qzmlmNXJ0ijOjm7R1DXhU+viJvTtGTczu PhnhpgwDn4QZitoochE0i+RF1z7ImKeL9YrbdqXynXdpRIxOrpbT0GoLPqfFluwoy40d XE7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="BB5/lhMZ"; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id m11-20020a170906258b00b0077e2277f4b5sor1630141ejb.133.2022.09.28.01.45.26 for (Google Transport Security); Wed, 28 Sep 2022 01:45:26 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a17:906:974c:b0:784:d96c:b4fa with SMTP id o12-20020a170906974c00b00784d96cb4famr6269568ejy.391.1664354726515; Wed, 28 Sep 2022 01:45:26 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-95-232-92-192.retail.telecomitalia.it. [95.232.92.192]) by smtp.gmail.com with ESMTPSA id q1-20020a50cc81000000b00457618d3409sm2928883edi.68.2022.09.28.01.45.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Sep 2022 01:45:26 -0700 (PDT) From: Dario Binacchi To: u-boot@lists.denx.de Cc: Amarula patchwork , michael@amarulasolutions.com, Dario Binacchi , Lukasz Majewski , Sean Anderson , Stefano Babic Subject: [PATCH 3/7] clk: imx: clk-imx8mn add gpmi nand clocks Date: Wed, 28 Sep 2022 10:45:05 +0200 Message-Id: <20220928084509.2758974-4-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220928084509.2758974-1-dario.binacchi@amarulasolutions.com> References: <20220928084509.2758974-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="BB5/lhMZ"; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Michael Trimarchi Add gpmi nand clock. Those clock can be used in mxs nand driver to run nand to EDO mode 5, 4, ... Signed-off-by: Michael Trimarchi Signed-off-by: Dario Binacchi --- drivers/clk/imx/clk-imx8mn.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/clk/imx/clk-imx8mn.c b/drivers/clk/imx/clk-imx8mn.c index 15d7599cfb7d..35e0d935d390 100644 --- a/drivers/clk/imx/clk-imx8mn.c +++ b/drivers/clk/imx/clk-imx8mn.c @@ -15,6 +15,8 @@ #include "clk.h" +static u32 share_count_nand; + static const char *pll_ref_sels[] = { "clock-osc-24m", "dummy", "dummy", "dummy", }; static const char *dram_pll_bypass_sels[] = {"dram_pll", "dram_pll_ref_sel", }; static const char *arm_pll_bypass_sels[] = {"arm_pll", "arm_pll_ref_sel", }; @@ -90,6 +92,10 @@ static const char *imx8mn_usdhc3_sels[] = {"clock-osc-24m", "sys_pll1_400m", "sy static const char *imx8mn_qspi_sels[] = {"clock-osc-24m", "sys_pll1_400m", "sys_pll2_333m", "sys_pll2_500m", "audio_pll2_out", "sys_pll1_266m", "sys_pll3_out", "sys_pll1_100m", }; +static const char * const imx8mn_nand_sels[] = {"osc_24m", "sys_pll2_500m", "audio_pll1_out", + "sys_pll1_400m", "audio_pll2_out", "sys_pll3_out", + "sys_pll2_250m", "video_pll1_out", }; + static const char * const imx8mn_usb_core_sels[] = {"clock-osc-24m", "sys_pll1_100m", "sys_pll1_40m", "sys_pll2_100m", "sys_pll2_200m", "clk_ext2", "clk_ext3", "audio_pll2_out", }; @@ -268,6 +274,8 @@ static int imx8mn_clk_probe(struct udevice *dev) clk_dm(IMX8MN_CLK_USDHC3, imx8m_clk_composite("usdhc3", imx8mn_usdhc3_sels, base + 0xbc80)); + clk_dm(IMX8MN_CLK_NAND, + imx8m_clk_composite("nand", imx8mn_nand_sels, base + 0xab00)); clk_dm(IMX8MN_CLK_QSPI, imx8m_clk_composite("qspi", imx8mn_qspi_sels, base + 0xab80)); clk_dm(IMX8MN_CLK_USB_CORE_REF, @@ -299,6 +307,12 @@ static int imx8mn_clk_probe(struct udevice *dev) imx_clk_gate4("usdhc3_root_clk", "usdhc3", base + 0x45e0, 0)); clk_dm(IMX8MN_CLK_QSPI_ROOT, imx_clk_gate4("qspi_root_clk", "qspi", base + 0x42f0, 0)); + clk_dm(IMX8MN_CLK_NAND_ROOT, + imx_clk_gate2_shared2("nand_root_clk", "nand", base + 0x4300, 0, &share_count_nand)); + clk_dm(IMX8MN_CLK_NAND_USDHC_BUS_RAWNAND_CLK, + imx_clk_gate2_shared2("nand_usdhc_rawnand_clk", + "nand_usdhc_bus", base + 0x4300, 0, + &share_count_nand)); clk_dm(IMX8MN_CLK_USB1_CTRL_ROOT, imx_clk_gate4("usb1_ctrl_root_clk", "usb_bus", base + 0x44d0, 0));