From patchwork Thu Jan 25 01:35:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Protsenko X-Patchwork-Id: 13529794 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 74424C47422 for ; Thu, 25 Jan 2024 01:36:25 +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=S/mQ833aOV8s/z niRWkzXKWAn1gGlADg7N+Pudpify4e+fGGP7X5rwfGz0M5PdW66t0f+OD5cZPM5fw3u3Uc8BvZD9S a0QIwDh+xG9e3xDcLdw/BHfCwB6OzblZQGlpmHBJylZakb59ul7G9EG45Illhkp2SGjGHgBrdrezs DrPETANG3bMFqRd1G6FNuNSnOrOaGwe6Htr2yd35ovHYFphV2Op6BhZYGndEWazrvUXXzXdhlDCtR vEwr/K3lavCw6UzWINR4EJF1KS4qX7g5K46v5xA3cTqhV9TOhtnQO/uE2X9kRq+nD4+x3Ltp9FQ2Z y42waziU5oj5xGGFAeBA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rSoep-005oyC-1J; Thu, 25 Jan 2024 01:35:55 +0000 Received: from mail-oo1-xc33.google.com ([2607:f8b0:4864:20::c33]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rSoea-005ou6-18 for linux-arm-kernel@lists.infradead.org; Thu, 25 Jan 2024 01:35:42 +0000 Received: by mail-oo1-xc33.google.com with SMTP id 006d021491bc7-5993047a708so3184494eaf.3 for ; Wed, 24 Jan 2024 17:35:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706146539; x=1706751339; 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=qk1WYzP6XH0Cn8Bzm58B0F7Vwiws/moLk25/cz5y91PjJkiAF7Dkeycnr+6DU/AjOw DtM46kNpglEzjGBxi8LOnGgYKsl+EVQ19wLLSiWJl+lPk133PghV95U2YpsuFYbvP4P3 F+jmjAg6yev1Pmt/ApEWOIl0ZRVK3I7agwopfmZ0FecrH66tfSDbQ3NsxQPtr1nuvFkl r7tYUrcC8OBtW7GdjG0IZHZ+ls+a4RWZaGMAVT3vWyL20zJxl0+xlq/AGNZGj0l4tXz8 ox4r7YMcIUvbAM54aTzg7D4L4nswZq590yA3Iylo7cwDpwLlfy3f8OIp+bucFm4S2Ldf 4BHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706146539; x=1706751339; 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=QTttN4ZtLFMQKJ5c0LgFRWnELM42k5QZmBTI94E0KVqigFgEiVg69vWtgUDE9d8pin j9y+HNKpF6Lr6KySLH8RVFybdg6A8M+LshfUT4yZG9yv412tmNhKf8PIjSnLSB2xM84t lV9lfkTuJjwn6AqwcUlyE+IV5vEnZ/dJRlVYJVTfK7zlJm/V5kMBr4JjrLiL+l+HQ67b GgER5G+7kHb4M7WNv52vnKTpImRDpCLsgLZixLis8UXfH8U7/AfeyzoFU7d9N1RQsby+ m3Tq5Y+IrNKqybiysMX1LUNBqd/bnVzn2hM3lp5c63VtfNhqLn9xoEJRGhGYIXtggMnK xExw== X-Gm-Message-State: AOJu0Yxl2zlY6J1gHm7IRnI+9AMgr5BFiZda4vaxFCojp/kAjeovNR80 H1O32M/u+xpVTgBV9mZl0V3fYsKplVO0Qsuuax9NS7Ruc9saejhoY6l3FCugeV8= X-Google-Smtp-Source: AGHT+IFunPKogENZFotEKH1JF2UT4MeAeYVGiWXJdEp5H18lXtn5KFzRJ5z23tLujkzDKPtbFWtY4w== X-Received: by 2002:a05:6820:16b:b0:591:dc1e:d8c8 with SMTP id k11-20020a056820016b00b00591dc1ed8c8mr301082ood.15.1706146539238; Wed, 24 Jan 2024 17:35:39 -0800 (PST) Received: from localhost ([136.62.192.75]) by smtp.gmail.com with ESMTPSA id t18-20020a4adbd2000000b00599dee152aesm159392oou.0.2024.01.24.17.35.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 17:35:38 -0800 (PST) From: Sam Protsenko To: Krzysztof Kozlowski , Andi Shyti , Mark Brown , Rob Herring , Conor Dooley Cc: Tudor Ambarus , Alim Akhtar , Sylwester Nawrocki , Tomasz Figa , Chanwoo Choi , linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@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:36 -0600 Message-Id: <20240125013536.30887-3-semen.protsenko@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240125013536.30887-1-semen.protsenko@linaro.org> References: <20240125013536.30887-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_173540_388436_E6910717 X-CRM114-Status: GOOD ( 13.24 ) 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, },