From: Faiz Abbas <faiz_abbas@ti.com> To: <linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>, <linux-mmc@vger.kernel.org>, <adrian.hunter@intel.com>, <will@kernel.org>, <catalin.marinas@arm.com>, <robh+dt@kernel.org>, <ulf.hansson@linaro.org> Cc: <faiz_abbas@ti.com> Subject: [PATCH 6/7] mmc: sdhci_am654: Add support for clkbuf_sel property Date: Fri, 19 Jun 2020 18:28:00 +0530 [thread overview] Message-ID: <20200619125801.9530-7-faiz_abbas@ti.com> (raw) In-Reply-To: <20200619125801.9530-1-faiz_abbas@ti.com> Add support for writing new clkbuf_sel property for the J721e 4 bit IP. Signed-off-by: Faiz Abbas <faiz_abbas@ti.com> Signed-off-by: Sekhar Nori <nsekhar@ti.com> --- drivers/mmc/host/sdhci_am654.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/mmc/host/sdhci_am654.c b/drivers/mmc/host/sdhci_am654.c index f7535ee3a232..f9d24af12396 100644 --- a/drivers/mmc/host/sdhci_am654.c +++ b/drivers/mmc/host/sdhci_am654.c @@ -47,6 +47,8 @@ #define SEL100_MASK BIT(SEL100_SHIFT) #define FREQSEL_SHIFT 8 #define FREQSEL_MASK GENMASK(10, 8) +#define CLKBUFSEL_SHIFT 0 +#define CLKBUFSEL_MASK GENMASK(2, 0) #define DLL_TRIM_ICP_SHIFT 4 #define DLL_TRIM_ICP_MASK GENMASK(7, 4) #define DR_TY_SHIFT 20 @@ -86,6 +88,7 @@ struct sdhci_am654_data { struct regmap *base; bool legacy_otapdly; int otap_del_sel[11]; + int clkbuf_sel; int trm_icp; int drv_strength; bool dll_on; @@ -238,6 +241,9 @@ static void sdhci_am654_set_clock(struct sdhci_host *host, unsigned int clock) regmap_update_bits(sdhci_am654->base, PHY_CTRL5, SELDLYTXCLK_MASK, 1 << SELDLYTXCLK_SHIFT); } + + regmap_update_bits(sdhci_am654->base, PHY_CTRL5, CLKBUFSEL_MASK, + sdhci_am654->clkbuf_sel); } static void sdhci_j721e_4bit_set_clock(struct sdhci_host *host, @@ -260,6 +266,9 @@ static void sdhci_j721e_4bit_set_clock(struct sdhci_host *host, (otap_del_sel << OTAPDLYSEL_SHIFT); regmap_update_bits(sdhci_am654->base, PHY_CTRL4, mask, val); + regmap_update_bits(sdhci_am654->base, PHY_CTRL5, CLKBUFSEL_MASK, + sdhci_am654->clkbuf_sel); + sdhci_set_clock(host, clock); } @@ -582,6 +591,8 @@ static int sdhci_am654_get_of_property(struct platform_device *pdev, } device_property_read_u32(dev, "ti,strobe-sel", &sdhci_am654->strb_sel); + device_property_read_u32(dev, "ti,clkbuf-sel", + &sdhci_am654->clkbuf_sel); sdhci_get_of_property(pdev); -- 2.17.1
WARNING: multiple messages have this Message-ID (diff)
From: Faiz Abbas <faiz_abbas@ti.com> To: <linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>, <linux-mmc@vger.kernel.org>, <adrian.hunter@intel.com>, <will@kernel.org>, <catalin.marinas@arm.com>, <robh+dt@kernel.org>, <ulf.hansson@linaro.org> Cc: faiz_abbas@ti.com Subject: [PATCH 6/7] mmc: sdhci_am654: Add support for clkbuf_sel property Date: Fri, 19 Jun 2020 18:28:00 +0530 [thread overview] Message-ID: <20200619125801.9530-7-faiz_abbas@ti.com> (raw) In-Reply-To: <20200619125801.9530-1-faiz_abbas@ti.com> Add support for writing new clkbuf_sel property for the J721e 4 bit IP. Signed-off-by: Faiz Abbas <faiz_abbas@ti.com> Signed-off-by: Sekhar Nori <nsekhar@ti.com> --- drivers/mmc/host/sdhci_am654.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/mmc/host/sdhci_am654.c b/drivers/mmc/host/sdhci_am654.c index f7535ee3a232..f9d24af12396 100644 --- a/drivers/mmc/host/sdhci_am654.c +++ b/drivers/mmc/host/sdhci_am654.c @@ -47,6 +47,8 @@ #define SEL100_MASK BIT(SEL100_SHIFT) #define FREQSEL_SHIFT 8 #define FREQSEL_MASK GENMASK(10, 8) +#define CLKBUFSEL_SHIFT 0 +#define CLKBUFSEL_MASK GENMASK(2, 0) #define DLL_TRIM_ICP_SHIFT 4 #define DLL_TRIM_ICP_MASK GENMASK(7, 4) #define DR_TY_SHIFT 20 @@ -86,6 +88,7 @@ struct sdhci_am654_data { struct regmap *base; bool legacy_otapdly; int otap_del_sel[11]; + int clkbuf_sel; int trm_icp; int drv_strength; bool dll_on; @@ -238,6 +241,9 @@ static void sdhci_am654_set_clock(struct sdhci_host *host, unsigned int clock) regmap_update_bits(sdhci_am654->base, PHY_CTRL5, SELDLYTXCLK_MASK, 1 << SELDLYTXCLK_SHIFT); } + + regmap_update_bits(sdhci_am654->base, PHY_CTRL5, CLKBUFSEL_MASK, + sdhci_am654->clkbuf_sel); } static void sdhci_j721e_4bit_set_clock(struct sdhci_host *host, @@ -260,6 +266,9 @@ static void sdhci_j721e_4bit_set_clock(struct sdhci_host *host, (otap_del_sel << OTAPDLYSEL_SHIFT); regmap_update_bits(sdhci_am654->base, PHY_CTRL4, mask, val); + regmap_update_bits(sdhci_am654->base, PHY_CTRL5, CLKBUFSEL_MASK, + sdhci_am654->clkbuf_sel); + sdhci_set_clock(host, clock); } @@ -582,6 +591,8 @@ static int sdhci_am654_get_of_property(struct platform_device *pdev, } device_property_read_u32(dev, "ti,strobe-sel", &sdhci_am654->strb_sel); + device_property_read_u32(dev, "ti,clkbuf-sel", + &sdhci_am654->clkbuf_sel); sdhci_get_of_property(pdev); -- 2.17.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-06-19 12:59 UTC|newest] Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-06-19 12:57 [PATCH 0/7] Add support for SD card in AM654x-evm Faiz Abbas 2020-06-19 12:57 ` Faiz Abbas 2020-06-19 12:57 ` [PATCH 1/7] dt-bindings: mmc: sdhci-am654: Add ti,clkbuf-sel binding Faiz Abbas 2020-06-19 12:57 ` Faiz Abbas 2020-06-19 12:57 ` [PATCH 2/7] mmc: sdhci_am654: Add flag for PHY calibration Faiz Abbas 2020-06-19 12:57 ` Faiz Abbas 2020-06-19 12:57 ` [PATCH 3/7] mmc: sdhci_am654: Add Support for SR2.0 Faiz Abbas 2020-06-19 12:57 ` Faiz Abbas 2020-06-19 12:57 ` [PATCH 4/7] mmc: sdhci_am654: Fix conditions for enabling dll Faiz Abbas 2020-06-19 12:57 ` Faiz Abbas 2020-06-19 12:57 ` [PATCH 5/7] mmc: sdhci_am654: Update delay chain configuration Faiz Abbas 2020-06-19 12:57 ` Faiz Abbas 2020-06-19 12:58 ` Faiz Abbas [this message] 2020-06-19 12:58 ` [PATCH 6/7] mmc: sdhci_am654: Add support for clkbuf_sel property Faiz Abbas 2020-06-19 12:58 ` [PATCH 7/7] arm64: defconfig: Enable AM654x SDHCI controller Faiz Abbas 2020-06-19 12:58 ` Faiz Abbas 2020-07-16 12:19 ` Faiz Abbas 2020-07-16 12:19 ` Faiz Abbas 2020-07-16 13:25 ` Sekhar Nori 2020-07-16 13:25 ` Sekhar Nori 2020-07-16 18:28 ` Arnd Bergmann 2020-07-16 18:28 ` Arnd Bergmann 2020-07-17 8:38 ` Faiz Abbas 2020-07-17 8:38 ` Faiz Abbas 2020-07-17 11:20 ` Tero Kristo 2020-07-17 11:20 ` Tero Kristo 2020-07-17 13:09 ` Arnd Bergmann 2020-07-17 13:09 ` Arnd Bergmann 2020-07-17 13:36 ` Faiz Abbas 2020-07-17 13:36 ` Faiz Abbas 2020-07-17 13:43 ` Tero Kristo 2020-07-17 13:43 ` Tero Kristo 2020-07-03 7:27 ` [PATCH 0/7] Add support for SD card in AM654x-evm Faiz Abbas 2020-07-03 7:27 ` Faiz Abbas 2020-07-06 14:48 ` Ulf Hansson 2020-07-06 14:48 ` Ulf Hansson
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200619125801.9530-7-faiz_abbas@ti.com \ --to=faiz_abbas@ti.com \ --cc=adrian.hunter@intel.com \ --cc=catalin.marinas@arm.com \ --cc=devicetree@vger.kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mmc@vger.kernel.org \ --cc=robh+dt@kernel.org \ --cc=ulf.hansson@linaro.org \ --cc=will@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.