// SPDX-License-Identifier: GPL-2.0-only
//
// Copyright (C) 2020 BAIKAL ELECTRONICS, JSC
//
// Authors:
//   Ramil Zaripov <Ramil.Zaripov@baikalelectronics.ru>
//   Serge Semin <Sergey.Semin@baikalelectronics.ru>
//
// Baikal-T1 DW APB SPI and System Boot SPI driver
//

#include <linux/clk.h>
#include <linux/cpumask.h>
#include <linux/err.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/mux/consumer.h>
#include <linux/of.h>
#include <linux/of_platform.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/property.h>
#include <linux/slab.h>
#include <linux/spi/spi-mem.h>
#include <linux/spi/spi.h>

#include "spi-dw.h"

#define BT1_BOOT_DIRMAP		0
#define BT1_BOOT_REGS		1

struct dw_spi_bt1 {
	struct dw_spi		dws;
	struct clk		*clk;
	struct mux_control	*mux;

#ifdef CONFIG_SPI_DW_BT1_DIRMAP
	void __iomem		*map;
	resource_size_t		map_len;
#endif
};
#define to_dw_spi_bt1(_ctlr) \
	container_of(spi_controller_get_devdata(_ctlr), struct dw_spi_bt1, dws)

typedef int (*dw_spi_bt1_init_cb)(struct platform_device *pdev,
				    struct dw_spi_bt1 *dwsbt1);

#ifdef CONFIG_SPI_DW_BT1_DIRMAP

static int dw_spi_bt1_dirmap_create(struct spi_mem_dirmap_desc *desc)
{
	struct dw_spi_bt1 *dwsbt1 = to_dw_spi_bt1(desc->mem->spi->controller);

	if (!dwsbt1->map ||
	    !dwsbt1->dws.mem_ops.supports_op(desc->mem, &desc->info.op_tmpl))
		return -EOPNOTSUPP;

	/*
	 * Make sure the requested region doesn't go out of the physically
	 * mapped flash memory bounds and the operation is read-only.
	 */
	if (desc->info.offset + desc->info.length > dwsbt1->map_len ||
	    desc->info.op_tmpl.data.dir != SPI_MEM_DATA_IN)
		return -EOPNOTSUPP;

	return 0;
}

/*
 * Directly mapped SPI memory region is only accessible in the dword chunks.
 * That's why we have to create a dedicated read-method to copy data from there
 * to the passed buffer.
 */
static void dw_spi_bt1_dirmap_copy_from_map(void *to, void __iomem *from, size_t len)
{
	size_t shift, chunk;
	u32 data;

	/*
	 * We split the copying up into the next three stages: unaligned head,
	 * aligned body, unaligned tail.
	 */
	shift = (size_t)from & 0x3;
	if (shift) {
		chunk = min_t(size_t, 4 - shift, len);
		data = readl_relaxed(from - shift);
		memcpy(to, (char *)&data + shift, chunk);
		from += chunk;
		to += chunk;
		len -= chunk;
	}

	while (len >= 4) {
		data = readl_relaxed(from);
		memcpy(to, &data, 4);
		from += 4;
		to += 4;
		len -= 4;
	}

	if (len) {
		data = readl_relaxed(from);
		memcpy(to, &data, len);
	}
}

static ssize_t dw_spi_bt1_dirmap_read(struct spi_mem_dirmap_desc *desc,
				      u64 offs, size_t len, void *buf)
{
	struct dw_spi_bt1 *dwsbt1 = to_dw_spi_bt1(desc->mem->spi->controller);
	struct dw_spi *dws = &dwsbt1->dws;
	struct spi_mem *mem = desc->mem;
	struct dw_spi_cfg cfg;
	int ret;

	/*
	 * Make sure the requested operation length is valid. Truncate the
	 * length if it's greater than the length of the MMIO region.
	 */
	if (offs >= dwsbt1->map_len || !len)
		return 0;

	len = min_t(size_t, len, dwsbt1->map_len - offs);

	/* Collect the controller configuration required by the operation */
	cfg.tmode = DW_SPI_CTRLR0_TMOD_EPROMREAD;
	cfg.dfs = 8;
	cfg.ndf = 4;
	cfg.freq = mem->spi->max_speed_hz;

	/* Make sure the corresponding CS is de-asserted on transmission */
	dw_spi_set_cs(mem->spi, false);

	dw_spi_enable_chip(dws, 0);

	dw_spi_update_config(dws, mem->spi, &cfg);

	dw_spi_umask_intr(dws, DW_SPI_INT_RXFI);

	dw_spi_enable_chip(dws, 1);

	/*
	 * Enable the transparent mode of the System Boot Controller.
	 * The SPI core IO should have been locked before calling this method
	 * so noone would be touching the controller' registers during the
	 * dirmap operation.
	 */
	ret = mux_control_select(dwsbt1->mux, BT1_BOOT_DIRMAP);
	if (ret)
		return ret;

	dw_spi_bt1_dirmap_copy_from_map(buf, dwsbt1->map + offs, len);

	mux_control_deselect(dwsbt1->mux);

	dw_spi_set_cs(mem->spi, true);

	ret = dw_spi_check_status(dws, true);

	return ret ?: len;
}

#endif /* CONFIG_SPI_DW_BT1_DIRMAP */

static int dw_spi_bt1_std_init(struct platform_device *pdev,
			       struct dw_spi_bt1 *dwsbt1)
{
	struct dw_spi *dws = &dwsbt1->dws;

	dws->irq = platform_get_irq(pdev, 0);
	if (dws->irq < 0)
		return dws->irq;

	dws->num_cs = 4;

	/*
	 * Baikal-T1 Normal SPI Controllers don't always keep up with full SPI
	 * bus speed especially when it comes to the concurrent access to the
	 * APB bus resources. Thus we have no choice but to set a constraint on
	 * the SPI bus frequency for the memory operations which require to
	 * read/write data as fast as possible.
	 */
	dws->max_mem_freq = 20000000U;

	dw_spi_dma_setup_generic(dws);

	return 0;
}

static int dw_spi_bt1_sys_init(struct platform_device *pdev,
			       struct dw_spi_bt1 *dwsbt1)
{
	struct resource *mem __maybe_unused;
	struct dw_spi *dws = &dwsbt1->dws;

	/*
	 * Baikal-T1 System Boot Controller is equipped with a mux, which
	 * switches between the directly mapped SPI flash access mode and
	 * IO access to the DW APB SSI registers. Note the mux controller
	 * must be setup to preserve the registers being accessible by default
	 * (on idle-state).
	 */
	dwsbt1->mux = devm_mux_control_get(&pdev->dev, NULL);
	if (IS_ERR(dwsbt1->mux))
		return PTR_ERR(dwsbt1->mux);

	/*
	 * Directly mapped SPI flash memory is a 16MB MMIO region, which can be
	 * used to access a peripheral memory device just by reading/writing
	 * data from/to it. Note the system APB bus will stall during each IO
	 * from/to the dirmap region until the operation is finished. So don't
	 * use it concurrently with time-critical tasks (like the SPI memory
	 * operations implemented in the DW APB SSI driver).
	 */
#ifdef CONFIG_SPI_DW_BT1_DIRMAP
	mem = platform_get_resource(pdev, IORESOURCE_MEM, 1);
	if (mem) {
		dwsbt1->map = devm_ioremap_resource(&pdev->dev, mem);
		if (!IS_ERR(dwsbt1->map)) {
			dwsbt1->map_len = resource_size(mem);
			dws->mem_ops.dirmap_create = dw_spi_bt1_dirmap_create;
			dws->mem_ops.dirmap_read = dw_spi_bt1_dirmap_read;
		} else {
			dwsbt1->map = NULL;
		}
	}
#endif /* CONFIG_SPI_DW_BT1_DIRMAP */

	/*
	 * There is no IRQ, no DMA and just one CS available on the System Boot
	 * SPI controller.
	 */
	dws->irq = IRQ_NOTCONNECTED;
	dws->num_cs = 1;

	/*
	 * Baikal-T1 System Boot SPI Controller doesn't keep up with the full
	 * SPI bus speed due to relatively slow APB bus and races for it'
	 * resources from different CPUs. The situation is worsen by a small
	 * FIFOs depth (just 8 words). It works better in a single CPU mode
	 * though, but still tends to be not fast enough at low CPU
	 * frequencies.
	 */
	if (num_possible_cpus() > 1)
		dws->max_mem_freq = 10000000U;
	else
		dws->max_mem_freq = 20000000U;

	return 0;
}

static int dw_spi_bt1_probe(struct platform_device *pdev)
{
	dw_spi_bt1_init_cb init_func;
	struct dw_spi_bt1 *dwsbt1;
	struct resource *mem;
	struct dw_spi *dws;
	int ret;

	dwsbt1 = devm_kzalloc(&pdev->dev, sizeof(struct dw_spi_bt1), GFP_KERNEL);
	if (!dwsbt1)
		return -ENOMEM;

	dws = &dwsbt1->dws;

	dws->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &mem);
	if (IS_ERR(dws->regs))
		return PTR_ERR(dws->regs);

	dws->paddr = mem->start;

	dwsbt1->clk = devm_clk_get(&pdev->dev, NULL);
	if (IS_ERR(dwsbt1->clk))
		return PTR_ERR(dwsbt1->clk);

	ret = clk_prepare_enable(dwsbt1->clk);
	if (ret)
		return ret;

	dws->bus_num = pdev->id;
	dws->reg_io_width = 4;
	dws->max_freq = clk_get_rate(dwsbt1->clk);
	if (!dws->max_freq) {
		ret = -EINVAL;
		goto err_disable_clk;
	}

	init_func = device_get_match_data(&pdev->dev);
	ret = init_func(pdev, dwsbt1);
	if (ret)
		goto err_disable_clk;

	pm_runtime_enable(&pdev->dev);

	ret = dw_spi_add_host(&pdev->dev, dws);
	if (ret) {
		pm_runtime_disable(&pdev->dev);
		goto err_disable_clk;
	}

	platform_set_drvdata(pdev, dwsbt1);

	return 0;

err_disable_clk:
	clk_disable_unprepare(dwsbt1->clk);

	return ret;
}

static void dw_spi_bt1_remove(struct platform_device *pdev)
{
	struct dw_spi_bt1 *dwsbt1 = platform_get_drvdata(pdev);

	dw_spi_remove_host(&dwsbt1->dws);

	pm_runtime_disable(&pdev->dev);

	clk_disable_unprepare(dwsbt1->clk);
}

static const struct of_device_id dw_spi_bt1_of_match[] = {
	{ .compatible = "baikal,bt1-ssi", .data = dw_spi_bt1_std_init},
	{ .compatible = "baikal,bt1-sys-ssi", .data = dw_spi_bt1_sys_init},
	{ }
};
MODULE_DEVICE_TABLE(of, dw_spi_bt1_of_match);

static struct platform_driver dw_spi_bt1_driver = {
	.probe	= dw_spi_bt1_probe,
	.remove_new = dw_spi_bt1_remove,
	.driver	= {
		.name		= "bt1-sys-ssi",
		.of_match_table	= dw_spi_bt1_of_match,
	},
};
module_platform_driver(dw_spi_bt1_driver);

MODULE_AUTHOR("Serge Semin <Sergey.Semin@baikalelectronics.ru>");
MODULE_DESCRIPTION("Baikal-T1 System Boot SPI Controller driver");
MODULE_LICENSE("GPL v2");
MODULE_IMPORT_NS(SPI_DW_CORE);
