From patchwork Thu Jan 25 01:35:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Protsenko X-Patchwork-Id: 13529793 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D3E58C47422 for ; Thu, 25 Jan 2024 01:36:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=SDPC5t+ee1vo13w7HDJHKczjM+hNol6HFCS/HfH7fdQ=; b=HA7Vc4B/BMBzDR /dd2967LVJ2iAZpT8pshgoIH8ecxPUGKpqnhJjymIHNi5qR0SKl+xVrnRMXocQPhPbxBwpwlaYo7O BnM8hUfCK6r8e0Q2Vxowy1nJuTqCXAcfgk3MpY09I2w+spmcMicPfkGvdgVSYnecaeMEns+7yyQ8K BZwFqWpgvnpxWAtbfw0tdBl7ipnFPuaE2fcf5zMeGKiZo/E7/4y5nyT/6SpZhinkYvmcU2jgbGyzz PFNd/16v5VTFD0C1I+tvLz5FTblkqkXPPU6atY6Wx95LDNcCQ1jdk+Y60ThWUil6E4SkuGiERoOI+ HmlxBN6bK1gsu3as4wkQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rSoer-005ozO-2o; Thu, 25 Jan 2024 01:35:57 +0000 Received: from mail-ot1-x333.google.com ([2607:f8b0:4864:20::333]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rSoeg-005ovs-3D for linux-arm-kernel@lists.infradead.org; Thu, 25 Jan 2024 01:35:48 +0000 Received: by mail-ot1-x333.google.com with SMTP id 46e09a7af769-6dddcf525f0so138961a34.0 for ; Wed, 24 Jan 2024 17:35:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706146546; x=1706751346; darn=lists.infradead.org; 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=mjuRSpcIWXYqOZvjAWqHzFzzwLvT3n28RLPhePkG0iw=; b=ek80HBv3kpWoiXUlv7UAoLo1v7dSw6BSPYogOu0VJ8//5HpLMmhaqZixUhZQk55VlO yQnHN/iF9M54UK/ksHRPibzuRc0A0MD9EHtRISaDblFf+CnLwXcvJoibNBCJhcDbBMtI 1AiEZCpTuUHavW2+2aF66cSETrKRoPZR7Ln/trrOAPTS/StUv/gULo/C1ove7Yy5LuPf 7hcVzR5/aMtA4o84KGxGe8DoPiZAyTNhc03JvL1b0V+D5d0qvTGYzwFO+Ik71lhnDLhO +W2zQOXoeH4NFxgXz1bIhUmoHoF/f4xHUAq4DT6fF8hnv6hqvq+jYO6S46+7Fe7JgLec 2W0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706146546; x=1706751346; 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=mjuRSpcIWXYqOZvjAWqHzFzzwLvT3n28RLPhePkG0iw=; b=kGxkuSb2G09DMsgOluphYwfupsux3aLNybapfq4s9ab6c3N40iKJAaACsvWYRRIEC0 deNTktOLYid1npocjDD21iMquPHVvEyr9oTbYfD/wCgSrFbQByQWNMZBXLrsXJMO914J I6xfTQxmytiJ/rNdmDrFPdZtWCwNmswQPTieqmcpjZfRUlTHHOr2xyqxU77OMx6t0TM8 VbY+VRzllt1GsTMY/ZKpMF5VpuPJiUwxSPXQ+5LG9z1zAHJf/tnPMMb1xAOVnyF9pOWc TXFSthBxF0C+eL/z8FK2ZHmbLTKWix5h6L/yjLmuONV7Z7TZNTJqyjjxCvmc9sYEI0Ji 9+7g== X-Gm-Message-State: AOJu0YwRrV8SZOoocZd+ZCzdEScKzEgk2QrdyIS5Ol2XiR1L6UvOyJSr BhIxULeJfVYXbFyDeWSA4b2jep2Dj8HyWUAWttWEfLw23cYRQhfzVunXXmV0WQM= X-Google-Smtp-Source: AGHT+IF1NjOAcZlzFenDqy/+nk1Kq9lvw6v6ZRFazJxCZbfcK9ZwgvkBymMMDhSaM/QVllJw7mJRjQ== X-Received: by 2002:a05:6808:309c:b0:3bd:cd84:d119 with SMTP id bl28-20020a056808309c00b003bdcd84d119mr231759oib.5.1706146545915; Wed, 24 Jan 2024 17:35:45 -0800 (PST) Received: from localhost ([136.62.192.75]) by smtp.gmail.com with ESMTPSA id k10-20020a056808068a00b003bda3125e3csm2446127oig.48.2024.01.24.17.35.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 17:35:45 -0800 (PST) From: Sam Protsenko To: Krzysztof Kozlowski , Rob Herring , Conor Dooley Cc: Tudor Ambarus , Alim Akhtar , Sylwester Nawrocki , Tomasz Figa , Chanwoo Choi , linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 2/2] spi: s3c64xx: Add Exynos850 support Date: Wed, 24 Jan 2024 19:35:43 -0600 Message-Id: <20240125013543.31067-3-semen.protsenko@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240125013543.31067-1-semen.protsenko@linaro.org> References: <20240125013543.31067-1-semen.protsenko@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240124_173547_073856_EA5C5B62 X-CRM114-Status: GOOD ( 12.74 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add SPI port configuration for Exynos850 SoC. It has 3 USI blocks which can be configured in SPI mode: * spi_0: BLK_PERI_SPI_0 (0x13940000) * spi_1: BLK_ALIVE_USI_CMGP00 (0x11d00000) * spi_2: BLK_ALIVE_USI_CMGP01 (0x11d20000) SPI FIFO depth is 64 bytes for all those SPI blocks, so the .fifo_lvl_mask value is set to 0x7f. All blocks have DIV_4 as the default internal clock divider, and an internal loopback mode to run a loopback test. Signed-off-by: Sam Protsenko Reviewed-by: Tudor Ambarus --- Changes in v2: - Collected R-b tags drivers/spi/spi-s3c64xx.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 432ec60d3568..7f7eb8f742e4 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -1460,6 +1460,17 @@ static const struct s3c64xx_spi_port_config exynos5433_spi_port_config = { .quirks = S3C64XX_SPI_QUIRK_CS_AUTO, }; +static const struct s3c64xx_spi_port_config exynos850_spi_port_config = { + .fifo_lvl_mask = { 0x7f, 0x7f, 0x7f }, + .rx_lvl_offset = 15, + .tx_st_done = 25, + .clk_div = 4, + .high_speed = true, + .clk_from_cmu = true, + .has_loopback = true, + .quirks = S3C64XX_SPI_QUIRK_CS_AUTO, +}; + static const struct s3c64xx_spi_port_config exynosautov9_spi_port_config = { .fifo_lvl_mask = { 0x1ff, 0x1ff, 0x7f, 0x7f, 0x7f, 0x7f, 0x1ff, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f}, @@ -1514,6 +1525,9 @@ static const struct of_device_id s3c64xx_spi_dt_match[] = { { .compatible = "samsung,exynos5433-spi", .data = (void *)&exynos5433_spi_port_config, }, + { .compatible = "samsung,exynos850-spi", + .data = (void *)&exynos850_spi_port_config, + }, { .compatible = "samsung,exynosautov9-spi", .data = (void *)&exynosautov9_spi_port_config, },