mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/5] clk: imx7: add IMX7D_OCOTP_CLK
@ 2020-07-15  5:56 Rouven Czerwinski
  2020-07-15  5:56 ` [PATCH 2/5] nvmem: ocotp: retrieve set_timing from structure Rouven Czerwinski
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Rouven Czerwinski @ 2020-07-15  5:56 UTC (permalink / raw)
  To: barebox; +Cc: Rouven Czerwinski

Otherwise barebox is not able to resolve the clock from the device tree
node.

Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
---
 drivers/clk/imx/clk-imx7.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/clk/imx/clk-imx7.c b/drivers/clk/imx/clk-imx7.c
index 1f15d7ef11..b6c7c2c3a8 100644
--- a/drivers/clk/imx/clk-imx7.c
+++ b/drivers/clk/imx/clk-imx7.c
@@ -722,10 +722,12 @@ static int imx7_ccm_probe(struct device_d *dev)
 	clks[IMX7D_OCRAM_S_CLK] = imx_clk_gate4("ocram_s_clk", "ahb_post_div", base + 0x4120, 0);
 	clks[IMX7D_NAND_USDHC_BUS_ROOT_CLK] = imx_clk_gate4("nand_usdhc_root_clk", "nand_usdhc_post_div", base + 0x4130, 0);
 	clks[IMX7D_AHB_CHANNEL_ROOT_CLK] = imx_clk_gate4("ahb_root_clk", "ahb_post_div", base + 0x4200, 0);
+	clks[IMX7D_IPG_ROOT_CLK] = imx_clk_divider_flags("ipg_root_clk", "ahb_root_clk", base + 0x9080, 0, 2, CLK_IS_CRITICAL | CLK_OPS_PARENT_ENABLE | CLK_SET_RATE_PARENT);
 	clks[IMX7D_DRAM_ROOT_CLK] = imx_clk_gate4("dram_root_clk", "dram_post_div", base + 0x4130, 0);
 	clks[IMX7D_DRAM_PHYM_ROOT_CLK] = imx_clk_gate4("dram_phym_root_clk", "dram_phym_cg", base + 0x4130, 0);
 	clks[IMX7D_DRAM_PHYM_ALT_ROOT_CLK] = imx_clk_gate4("dram_phym_alt_root_clk", "dram_phym_alt_post_div", base + 0x4130, 0);
 	clks[IMX7D_DRAM_ALT_ROOT_CLK] = imx_clk_gate4("dram_alt_root_clk", "dram_alt_post_div", base + 0x4130, 0);
+	clks[IMX7D_OCOTP_CLK] = imx_clk_gate4("ocotp_clk", "ipg_root_clk", base + 0x4230, 0);
 	clks[IMX7D_USB_HSIC_ROOT_CLK] = imx_clk_gate4("usb_hsic_root_clk", "usb_hsic_post_div", base + 0x4420, 0);
 	clks[IMX7D_SDMA_CORE_CLK] = imx_clk_gate4("sdma_root_clk", "ahb_root_clk", base + 0x4480, 0);
 	clks[IMX7D_PCIE_CTRL_ROOT_CLK] = imx_clk_gate4("pcie_ctrl_root_clk", "pcie_ctrl_post_div", base + 0x4600, 0);
-- 
2.27.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 2/5] nvmem: ocotp: retrieve set_timing from structure
  2020-07-15  5:56 [PATCH 1/5] clk: imx7: add IMX7D_OCOTP_CLK Rouven Czerwinski
@ 2020-07-15  5:56 ` Rouven Czerwinski
  2020-07-15  5:56 ` [PATCH 3/5] nvmem: ocotp: add new timing function for i.MX7 Rouven Czerwinski
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Rouven Czerwinski @ 2020-07-15  5:56 UTC (permalink / raw)
  To: barebox; +Cc: Rouven Czerwinski

i.MX7S/D use a different timing setup, prepare for a new different
timing function.

Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
---
 drivers/nvmem/ocotp.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/nvmem/ocotp.c b/drivers/nvmem/ocotp.c
index 34e33dee82..3f475e5b1f 100644
--- a/drivers/nvmem/ocotp.c
+++ b/drivers/nvmem/ocotp.c
@@ -86,11 +86,14 @@ enum imx_ocotp_format_mac_direction {
 	OCOTP_MAC_TO_HW,
 };
 
+struct ocotp_priv;
+
 struct imx_ocotp_data {
 	int num_regs;
 	u32 (*addr_to_offset)(u32 addr);
 	void (*format_mac)(u8 *dst, const u8 *src,
 			   enum imx_ocotp_format_mac_direction dir);
+	int (*set_timing)(struct ocotp_priv *priv);
 	u8  mac_offsets[MAX_MAC_OFFSETS];
 	u8  mac_offsets_num;
 };
@@ -183,7 +186,7 @@ static int imx6_ocotp_prepare(struct ocotp_priv *priv)
 {
 	int ret;
 
-	ret = imx6_ocotp_set_timing(priv);
+	ret = priv->data->set_timing(priv);
 	if (ret)
 		return ret;
 
@@ -694,6 +697,7 @@ static struct imx_ocotp_data imx6q_ocotp_data = {
 	.mac_offsets_num = 1,
 	.mac_offsets = { MAC_OFFSET_0 },
 	.format_mac = imx_ocotp_format_mac,
+	.set_timing = imx6_ocotp_set_timing,
 };
 
 static struct imx_ocotp_data imx6sl_ocotp_data = {
@@ -702,6 +706,7 @@ static struct imx_ocotp_data imx6sl_ocotp_data = {
 	.mac_offsets_num = 1,
 	.mac_offsets = { MAC_OFFSET_0 },
 	.format_mac = imx_ocotp_format_mac,
+	.set_timing = imx6_ocotp_set_timing,
 };
 
 static struct imx_ocotp_data imx6ul_ocotp_data = {
@@ -710,6 +715,7 @@ static struct imx_ocotp_data imx6ul_ocotp_data = {
 	.mac_offsets_num = 2,
 	.mac_offsets = { MAC_OFFSET_0, IMX6UL_MAC_OFFSET_1 },
 	.format_mac = imx_ocotp_format_mac,
+	.set_timing = imx6_ocotp_set_timing,
 };
 
 static struct imx_ocotp_data imx6ull_ocotp_data = {
@@ -718,6 +724,7 @@ static struct imx_ocotp_data imx6ull_ocotp_data = {
 	.mac_offsets_num = 2,
 	.mac_offsets = { MAC_OFFSET_0, IMX6UL_MAC_OFFSET_1 },
 	.format_mac = imx_ocotp_format_mac,
+	.set_timing = imx6_ocotp_set_timing,
 };
 
 static struct imx_ocotp_data vf610_ocotp_data = {
@@ -726,6 +733,7 @@ static struct imx_ocotp_data vf610_ocotp_data = {
 	.mac_offsets_num = 2,
 	.mac_offsets = { MAC_OFFSET_0, MAC_OFFSET_1 },
 	.format_mac = vf610_ocotp_format_mac,
+	.set_timing = imx6_ocotp_set_timing,
 };
 
 static struct imx_ocotp_data imx8mq_ocotp_data = {
@@ -734,6 +742,7 @@ static struct imx_ocotp_data imx8mq_ocotp_data = {
 	.mac_offsets_num = 1,
 	.mac_offsets = { 0x90 },
 	.format_mac = imx_ocotp_format_mac,
+	.set_timing = imx6_ocotp_set_timing,
 };
 
 static __maybe_unused struct of_device_id imx_ocotp_dt_ids[] = {
-- 
2.27.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 3/5] nvmem: ocotp: add new timing function for i.MX7
  2020-07-15  5:56 [PATCH 1/5] clk: imx7: add IMX7D_OCOTP_CLK Rouven Czerwinski
  2020-07-15  5:56 ` [PATCH 2/5] nvmem: ocotp: retrieve set_timing from structure Rouven Czerwinski
@ 2020-07-15  5:56 ` Rouven Czerwinski
  2020-07-15  5:56 ` [PATCH 4/5] nvmem: ocotp: read/write i.MX7 support Rouven Czerwinski
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Rouven Czerwinski @ 2020-07-15  5:56 UTC (permalink / raw)
  To: barebox; +Cc: Rouven Czerwinski

Ported from the linux kernel.

Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
---
 drivers/nvmem/ocotp.c | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/drivers/nvmem/ocotp.c b/drivers/nvmem/ocotp.c
index 3f475e5b1f..1b842ec0ed 100644
--- a/drivers/nvmem/ocotp.c
+++ b/drivers/nvmem/ocotp.c
@@ -48,6 +48,9 @@
 #define OCOTP_READ_CTRL			0x30
 #define OCOTP_READ_FUSE_DATA		0x40
 
+#define DEF_FSOURCE			1001	/* > 1000 ns */
+#define DEF_STROBE_PROG			10000	/* IPG clocks */
+
 /* OCOTP Registers bits and masks */
 #define OCOTP_CTRL_WR_UNLOCK		16
 #define OCOTP_CTRL_WR_UNLOCK_KEY	0x3E77
@@ -171,6 +174,27 @@ static int imx6_ocotp_set_timing(struct ocotp_priv *priv)
 	return 0;
 }
 
+static int imx7_ocotp_set_timing(struct ocotp_priv *priv)
+{
+	unsigned long clk_rate;
+	u64 fsource, strobe_prog;
+	u32 timing;
+
+	clk_rate = clk_get_rate(priv->clk);
+
+	fsource = DIV_ROUND_UP_ULL((u64)clk_rate * DEF_FSOURCE,
+				   NSEC_PER_SEC) + 1;
+	strobe_prog = DIV_ROUND_CLOSEST_ULL((u64)clk_rate * DEF_STROBE_PROG,
+					    NSEC_PER_SEC) + 1;
+
+	timing = strobe_prog & 0x00000FFF;
+	timing |= (fsource << 12) & 0x000FF000;
+
+	writel(timing, priv->base + OCOTP_TIMING);
+
+	return 0;
+}
+
 static int imx6_ocotp_wait_busy(struct ocotp_priv *priv, u32 flags)
 {
 	uint64_t start = get_time_ns();
-- 
2.27.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 4/5] nvmem: ocotp: read/write i.MX7 support
  2020-07-15  5:56 [PATCH 1/5] clk: imx7: add IMX7D_OCOTP_CLK Rouven Czerwinski
  2020-07-15  5:56 ` [PATCH 2/5] nvmem: ocotp: retrieve set_timing from structure Rouven Czerwinski
  2020-07-15  5:56 ` [PATCH 3/5] nvmem: ocotp: add new timing function for i.MX7 Rouven Czerwinski
@ 2020-07-15  5:56 ` Rouven Czerwinski
  2020-07-15  5:56 ` [PATCH 5/5] nvmem: enable OCOTP for i.MX7 Rouven Czerwinski
  2020-08-10 19:54 ` [PATCH 1/5] clk: imx7: add IMX7D_OCOTP_CLK Sascha Hauer
  4 siblings, 0 replies; 6+ messages in thread
From: Rouven Czerwinski @ 2020-07-15  5:56 UTC (permalink / raw)
  To: barebox; +Cc: Rouven Czerwinski

Implement read and write support for the banked access on i.MX7.

Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
---
 drivers/nvmem/ocotp.c | 147 ++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 141 insertions(+), 6 deletions(-)

diff --git a/drivers/nvmem/ocotp.c b/drivers/nvmem/ocotp.c
index 1b842ec0ed..7081eb5479 100644
--- a/drivers/nvmem/ocotp.c
+++ b/drivers/nvmem/ocotp.c
@@ -48,6 +48,16 @@
 #define OCOTP_READ_CTRL			0x30
 #define OCOTP_READ_FUSE_DATA		0x40
 
+#define MX7_OCOTP_DATA0 		0x20
+#define MX7_OCOTP_DATA1 		0x30
+#define MX7_OCOTP_DATA2 		0x40
+#define MX7_OCOTP_DATA3 		0x50
+#define MX7_OCOTP_READ_CTRL 		0x60
+#define MX7_OCOTP_READ_FUSE_DATA0 	0x70
+#define MX7_OCOTP_READ_FUSE_DATA1	0x80
+#define MX7_OCOTP_READ_FUSE_DATA2	0x90
+#define MX7_OCOTP_READ_FUSE_DATA3	0xA0
+
 #define DEF_FSOURCE			1001	/* > 1000 ns */
 #define DEF_STROBE_PROG			10000	/* IPG clocks */
 
@@ -97,6 +107,8 @@ struct imx_ocotp_data {
 	void (*format_mac)(u8 *dst, const u8 *src,
 			   enum imx_ocotp_format_mac_direction dir);
 	int (*set_timing)(struct ocotp_priv *priv);
+	int (*fuse_read)(struct ocotp_priv *priv, u32 addr, u32 *pdata);
+	int (*fuse_blow)(struct ocotp_priv *priv, u32 addr, u32 value);
 	u8  mac_offsets[MAX_MAC_OFFSETS];
 	u8  mac_offsets_num;
 };
@@ -221,7 +233,7 @@ static int imx6_ocotp_prepare(struct ocotp_priv *priv)
 	return 0;
 }
 
-static int fuse_read_addr(struct ocotp_priv *priv, u32 addr, u32 *pdata)
+static int imx6_fuse_read_addr(struct ocotp_priv *priv, u32 addr, u32 *pdata)
 {
 	u32 ctrl_reg;
 	int ret;
@@ -247,6 +259,50 @@ static int fuse_read_addr(struct ocotp_priv *priv, u32 addr, u32 *pdata)
 	return 0;
 }
 
+static int imx7_fuse_read_addr(struct ocotp_priv *priv, u32 index, u32 *pdata)
+{
+	u32 ctrl_reg;
+	u32 bank_addr;
+	u16 word;
+	int ret;
+
+	word = index & 0x3;
+	bank_addr = index >> 2;
+
+	writel(OCOTP_CTRL_ERROR, priv->base + OCOTP_CTRL_CLR);
+
+	ctrl_reg = readl(priv->base + OCOTP_CTRL);
+	ctrl_reg &= ~OCOTP_CTRL_ADDR_MASK;
+	ctrl_reg &= ~OCOTP_CTRL_WR_UNLOCK_MASK;
+	ctrl_reg |= BF(bank_addr, OCOTP_CTRL_ADDR);
+	writel(ctrl_reg, priv->base + OCOTP_CTRL);
+
+	writel(OCOTP_READ_CTRL_READ_FUSE, priv->base + MX7_OCOTP_READ_CTRL);
+	ret = imx6_ocotp_wait_busy(priv, 0);
+	if (ret)
+		return ret;
+
+	if (readl(priv->base + OCOTP_CTRL) & OCOTP_CTRL_ERROR)
+		*pdata = 0xbadabada;
+	else
+		switch (word) {
+			case 0:
+				*pdata = readl(priv->base + MX7_OCOTP_READ_FUSE_DATA0);
+				break;
+			case 1:
+				*pdata = readl(priv->base + MX7_OCOTP_READ_FUSE_DATA1);
+				break;
+			case 2:
+				*pdata = readl(priv->base + MX7_OCOTP_READ_FUSE_DATA2);
+				break;
+			case 3:
+				*pdata = readl(priv->base + MX7_OCOTP_READ_FUSE_DATA2);
+				break;
+		}
+
+	return 0;
+}
+
 static int imx6_ocotp_read_one_u32(struct ocotp_priv *priv, u32 index, u32 *pdata)
 {
 	int ret;
@@ -258,7 +314,7 @@ static int imx6_ocotp_read_one_u32(struct ocotp_priv *priv, u32 index, u32 *pdat
 		return ret;
 	}
 
-	ret = fuse_read_addr(priv, index, pdata);
+	ret = priv->data->fuse_read(priv, index, pdata);
 	if (ret) {
 		dev_err(&priv->dev, "failed to read fuse 0x%08x\n", index);
 		return ret;
@@ -287,19 +343,27 @@ static int imx_ocotp_reg_read(void *ctx, unsigned int reg, unsigned int *val)
 	return 0;
 }
 
-static int fuse_blow_addr(struct ocotp_priv *priv, u32 addr, u32 value)
+static void imx_ocotp_clear_unlock(struct ocotp_priv *priv, u32 index)
 {
 	u32 ctrl_reg;
-	int ret;
 
 	writel(OCOTP_CTRL_ERROR, priv->base + OCOTP_CTRL_CLR);
 
 	/* Control register */
 	ctrl_reg = readl(priv->base + OCOTP_CTRL);
 	ctrl_reg &= ~OCOTP_CTRL_ADDR_MASK;
-	ctrl_reg |= BF(addr, OCOTP_CTRL_ADDR);
+	ctrl_reg |= BF(index, OCOTP_CTRL_ADDR);
 	ctrl_reg |= BF(OCOTP_CTRL_WR_UNLOCK_KEY, OCOTP_CTRL_WR_UNLOCK);
 	writel(ctrl_reg, priv->base + OCOTP_CTRL);
+}
+
+static int imx6_fuse_blow_addr(struct ocotp_priv *priv, u32 index, u32 value)
+{
+	int ret;
+
+	imx_ocotp_clear_unlock(priv, index);
+
+	writel(OCOTP_CTRL_ERROR, priv->base + OCOTP_CTRL_CLR);
 
 	writel(value, priv->base + OCOTP_DATA);
 	ret = imx6_ocotp_wait_busy(priv, 0);
@@ -311,6 +375,53 @@ static int fuse_blow_addr(struct ocotp_priv *priv, u32 addr, u32 value)
 	return 0;
 }
 
+static int imx7_fuse_blow_addr(struct ocotp_priv *priv, u32 index, u32 value)
+{
+	int ret;
+	int word;
+	int bank_addr;
+
+	bank_addr = index >> 2;
+	word = index & 0x3;
+
+	imx_ocotp_clear_unlock(priv, bank_addr);
+
+	switch(word) {
+		case 0:
+			writel(0, priv->base + MX7_OCOTP_DATA1);
+			writel(0, priv->base + MX7_OCOTP_DATA2);
+			writel(0, priv->base + MX7_OCOTP_DATA3);
+			writel(value, priv->base + MX7_OCOTP_DATA0);
+			break;
+		case 1:
+			writel(value, priv->base + MX7_OCOTP_DATA1);
+			writel(0, priv->base + MX7_OCOTP_DATA2);
+			writel(0, priv->base + MX7_OCOTP_DATA3);
+			writel(0, priv->base + MX7_OCOTP_DATA0);
+			break;
+		case 2:
+			writel(value, priv->base + MX7_OCOTP_DATA2);
+			writel(0, priv->base + MX7_OCOTP_DATA3);
+			writel(0, priv->base + MX7_OCOTP_DATA1);
+			writel(0, priv->base + MX7_OCOTP_DATA0);
+			break;
+		case 3:
+			writel(value, priv->base + MX7_OCOTP_DATA3);
+			writel(0, priv->base + MX7_OCOTP_DATA1);
+			writel(0, priv->base + MX7_OCOTP_DATA2);
+			writel(0, priv->base + MX7_OCOTP_DATA0);
+			break;
+	}
+
+	ret = imx6_ocotp_wait_busy(priv, 0);
+	if (ret)
+		return ret;
+
+	/* Write postamble */
+	udelay(2000);
+	return 0;
+}
+
 static int imx6_ocotp_reload_shadow(struct ocotp_priv *priv)
 {
 	dev_info(&priv->dev, "reloading shadow registers...\n");
@@ -331,7 +442,7 @@ static int imx6_ocotp_blow_one_u32(struct ocotp_priv *priv, u32 index, u32 data,
 		return ret;
 	}
 
-	ret = fuse_blow_addr(priv, index, data);
+	ret = priv->data->fuse_blow(priv, index, data);
 	if (ret) {
 		dev_err(&priv->dev, "fuse blow failed\n");
 		return ret;
@@ -731,6 +842,8 @@ static struct imx_ocotp_data imx6sl_ocotp_data = {
 	.mac_offsets = { MAC_OFFSET_0 },
 	.format_mac = imx_ocotp_format_mac,
 	.set_timing = imx6_ocotp_set_timing,
+	.fuse_blow = imx6_fuse_blow_addr,
+	.fuse_read = imx6_fuse_read_addr,
 };
 
 static struct imx_ocotp_data imx6ul_ocotp_data = {
@@ -740,6 +853,8 @@ static struct imx_ocotp_data imx6ul_ocotp_data = {
 	.mac_offsets = { MAC_OFFSET_0, IMX6UL_MAC_OFFSET_1 },
 	.format_mac = imx_ocotp_format_mac,
 	.set_timing = imx6_ocotp_set_timing,
+	.fuse_blow = imx6_fuse_blow_addr,
+	.fuse_read = imx6_fuse_read_addr,
 };
 
 static struct imx_ocotp_data imx6ull_ocotp_data = {
@@ -749,6 +864,8 @@ static struct imx_ocotp_data imx6ull_ocotp_data = {
 	.mac_offsets = { MAC_OFFSET_0, IMX6UL_MAC_OFFSET_1 },
 	.format_mac = imx_ocotp_format_mac,
 	.set_timing = imx6_ocotp_set_timing,
+	.fuse_blow = imx6_fuse_blow_addr,
+	.fuse_read = imx6_fuse_read_addr,
 };
 
 static struct imx_ocotp_data vf610_ocotp_data = {
@@ -758,6 +875,8 @@ static struct imx_ocotp_data vf610_ocotp_data = {
 	.mac_offsets = { MAC_OFFSET_0, MAC_OFFSET_1 },
 	.format_mac = vf610_ocotp_format_mac,
 	.set_timing = imx6_ocotp_set_timing,
+	.fuse_blow = imx6_fuse_blow_addr,
+	.fuse_read = imx6_fuse_read_addr,
 };
 
 static struct imx_ocotp_data imx8mq_ocotp_data = {
@@ -767,6 +886,19 @@ static struct imx_ocotp_data imx8mq_ocotp_data = {
 	.mac_offsets = { 0x90 },
 	.format_mac = imx_ocotp_format_mac,
 	.set_timing = imx6_ocotp_set_timing,
+	.fuse_blow = imx6_fuse_blow_addr,
+	.fuse_read = imx6_fuse_read_addr,
+};
+
+static struct imx_ocotp_data imx7d_ocotp_data = {
+	.num_regs = 2048,
+	.addr_to_offset = imx6sl_addr_to_offset,
+	.mac_offsets_num = 1,
+	.mac_offsets = { MAC_OFFSET_0, IMX6UL_MAC_OFFSET_1 },
+	.format_mac = imx_ocotp_format_mac,
+	.set_timing = imx7_ocotp_set_timing,
+	.fuse_blow = imx7_fuse_blow_addr,
+	.fuse_read = imx7_fuse_read_addr,
 };
 
 static __maybe_unused struct of_device_id imx_ocotp_dt_ids[] = {
@@ -785,6 +917,9 @@ static __maybe_unused struct of_device_id imx_ocotp_dt_ids[] = {
 	}, {
 		.compatible = "fsl,imx6ull-ocotp",
 		.data = &imx6ull_ocotp_data,
+	}, {
+		.compatible = "fsl,imx7d-ocotp",
+		.data = &imx7d_ocotp_data,
 	}, {
 		.compatible = "fsl,imx8mq-ocotp",
 		.data = &imx8mq_ocotp_data,
-- 
2.27.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 5/5] nvmem: enable OCOTP for i.MX7
  2020-07-15  5:56 [PATCH 1/5] clk: imx7: add IMX7D_OCOTP_CLK Rouven Czerwinski
                   ` (2 preceding siblings ...)
  2020-07-15  5:56 ` [PATCH 4/5] nvmem: ocotp: read/write i.MX7 support Rouven Czerwinski
@ 2020-07-15  5:56 ` Rouven Czerwinski
  2020-08-10 19:54 ` [PATCH 1/5] clk: imx7: add IMX7D_OCOTP_CLK Sascha Hauer
  4 siblings, 0 replies; 6+ messages in thread
From: Rouven Czerwinski @ 2020-07-15  5:56 UTC (permalink / raw)
  To: barebox; +Cc: Rouven Czerwinski

Since we now have proper timing, read and write support, enable the
OCOTP driver for i.MX7

Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
---
 drivers/nvmem/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvmem/Kconfig b/drivers/nvmem/Kconfig
index 968342b281..f0fb9122c6 100644
--- a/drivers/nvmem/Kconfig
+++ b/drivers/nvmem/Kconfig
@@ -18,7 +18,7 @@ config NVMEM_SNVS_LPGPR
 
 config IMX_OCOTP
 	tristate "i.MX6 On Chip OTP controller"
-	depends on ARCH_IMX6 || ARCH_VF610 || ARCH_IMX8MQ
+	depends on ARCH_IMX6 || ARCH_VF610 || ARCH_IMX8MQ || ARCH_IMX7
 	depends on OFDEVICE
 	help
 	  This adds support for the i.MX6 On-Chip OTP controller. Currently the
-- 
2.27.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/5] clk: imx7: add IMX7D_OCOTP_CLK
  2020-07-15  5:56 [PATCH 1/5] clk: imx7: add IMX7D_OCOTP_CLK Rouven Czerwinski
                   ` (3 preceding siblings ...)
  2020-07-15  5:56 ` [PATCH 5/5] nvmem: enable OCOTP for i.MX7 Rouven Czerwinski
@ 2020-08-10 19:54 ` Sascha Hauer
  4 siblings, 0 replies; 6+ messages in thread
From: Sascha Hauer @ 2020-08-10 19:54 UTC (permalink / raw)
  To: Rouven Czerwinski; +Cc: barebox

Hi Rouven,

On Wed, Jul 15, 2020 at 07:56:04AM +0200, Rouven Czerwinski wrote:
> Otherwise barebox is not able to resolve the clock from the device tree
> node.
> 
> Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
> ---
>  drivers/clk/imx/clk-imx7.c | 2 ++
>  1 file changed, 2 insertions(+)

Applied, thanks.

The series applied with some fuzz, please check if the result is
correct.

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-08-10 19:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-15  5:56 [PATCH 1/5] clk: imx7: add IMX7D_OCOTP_CLK Rouven Czerwinski
2020-07-15  5:56 ` [PATCH 2/5] nvmem: ocotp: retrieve set_timing from structure Rouven Czerwinski
2020-07-15  5:56 ` [PATCH 3/5] nvmem: ocotp: add new timing function for i.MX7 Rouven Czerwinski
2020-07-15  5:56 ` [PATCH 4/5] nvmem: ocotp: read/write i.MX7 support Rouven Czerwinski
2020-07-15  5:56 ` [PATCH 5/5] nvmem: enable OCOTP for i.MX7 Rouven Czerwinski
2020-08-10 19:54 ` [PATCH 1/5] clk: imx7: add IMX7D_OCOTP_CLK Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox