From patchwork Thu Jan 25 01:35:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Protsenko X-Patchwork-Id: 13529795 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 128E7C46CD2 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=6Xwklvknngo6+rDsWEa+lgFRBlHqdfTq1e2DEzQKhc0=; b=I/OlPRGpvXEH0d /DTWQLt8YF09pW9NNNGmwhln4Dv99PEIvJSlvF3Diofvi41M+FBCodHG6z5hEGgibAyHNfMNxr2a7 FK3/iDbD57FUMMPoU4gSLYVu5MridUO8LVJ2bS89Dm6Aze5g55uEgQnXHYMBSIYGPtNzegXA0bfwL Ghz/IytMs9FnqgT145LoxH8nc52BAZZW3qoWQ6Qt1PtMr2Ujy6jRpRi1D67gZ3Mm7ICWkQaTrKqfi wfXCuWdJak1eQDaCX4/5f3quzKKxm//ok4e5UZjwdjWK68e+k8Mv6Hie9a/BmngSgqqIZfRjvU9Wc u1EILUUkKm3q8Ml60f7g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rSoer-005oz2-0N; Thu, 25 Jan 2024 01:35:57 +0000 Received: from mail-oa1-x2a.google.com ([2001:4860:4864:20::2a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rSoeg-005ovV-0U for linux-arm-kernel@lists.infradead.org; Thu, 25 Jan 2024 01:35:47 +0000 Received: by mail-oa1-x2a.google.com with SMTP id 586e51a60fabf-20536d5c5c7so3622334fac.2 for ; Wed, 24 Jan 2024 17:35:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706146545; x=1706751345; 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=mrTPIRFEFJl4D6usMUg96I/YEqaZ4s0DmE7WQLKQltI=; b=CkAkxsMeDRmohIn+UCF4VF0Y4M1r+zwf7TrlEE38d7N5CyiJeU2H6tjoKNdVN053Nh K9MKA5F/soaiUPMQ+Tr6nEYcpAXUwqQcWVt1imcZI8LGcbf/ddyRoELu1O1Hf5/nf3x/ fz4iBItaeG9xQAKy/t1onNfqRUFPwoEWNgfEx1QzmQ5tZr4DdLGWHBHIsZR3WzuhxlIB Bmjh05++y7igqaMf8VsaSHIsZjywkubBj60hu5WDBR8IbdktM7QMqromaVcpVN1vjgnM L6jyS9fr0werSTiCD/BYjgtUQDdXZwxZReQWvTNfY7lwRs2Pz/wrAunOr3qisO/BwtqQ kZ/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706146545; x=1706751345; 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=mrTPIRFEFJl4D6usMUg96I/YEqaZ4s0DmE7WQLKQltI=; b=GUzJMQZ9QPU0iYbPmIplhJTjgMzy44nAUj9tADB1cYGOciniG2xb/TeCoqNlUG9FYT iRLeQtUECXm04SMZ9ff3MHpUJivK0nNmCxnsuUVM59IbIllKDvwfwIOguSyNzu/e5Bjj aPRlvqRo2Awu47ZDil6HOhp1QSGPNkR7J9Kt1FbAw6advq6PU8GRNKERaxOffRdSLU6w jFxErh70lqnnBoHqKMZaLyiI8vU1yFf6keTiq1+CGpS0W6hz4W9ZD9+OkpeImY4vLa5L sD9sKR8qXn2ApqPgsH9e5W4dBf7J9Ujo2G4dTygu9RFv+9JFXxgPsHWRWK9h0IX/IqkI 9nDA== X-Gm-Message-State: AOJu0YzJDFz9JV1nbCFm8n+zowU7AXmEwhqQWmEX8+N+0LEkoMvlt0x8 HAuKrWl+21gzlfHxwhsjh8vWay2mdpFMn0BbGZq8wUr5Lc3UDz6CvLpQG8wV2Og= X-Google-Smtp-Source: AGHT+IF3NwE0mZ28Ss+0PVwv8nCKU3mV6Ff3m1ZDji1UuD5XHmoV+07SSc21F/vfqXbluZjjyIrAbA== X-Received: by 2002:a05:6870:817:b0:210:d5a5:7d37 with SMTP id fw23-20020a056870081700b00210d5a57d37mr190367oab.22.1706146545100; Wed, 24 Jan 2024 17:35:45 -0800 (PST) Received: from localhost ([136.62.192.75]) by smtp.gmail.com with ESMTPSA id xa13-20020a0568707f0d00b00210d8274204sm2999081oab.23.2024.01.24.17.35.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 17:35:44 -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 1/2] spi: dt-bindings: samsung: Add Exynos850 SPI Date: Wed, 24 Jan 2024 19:35:42 -0600 Message-Id: <20240125013543.31067-2-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_173546_187183_92731A49 X-CRM114-Status: GOOD ( 10.90 ) 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 Document samsung,exynos850-spi compatible which will be used on Exynos850 SoC. Exynos850 doesn't have ioclk, so only two clocks are needed (bus clock and functional SPI clock). Signed-off-by: Sam Protsenko Reviewed-by: Krzysztof Kozlowski Reviewed-by: Tudor Ambarus --- Changes in v2: - Collected R-b tags - Changed bindings patch title to "spi: dt-bindings: ..." Documentation/devicetree/bindings/spi/samsung,spi.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/spi/samsung,spi.yaml b/Documentation/devicetree/bindings/spi/samsung,spi.yaml index 79da99ca0e53..f71099852653 100644 --- a/Documentation/devicetree/bindings/spi/samsung,spi.yaml +++ b/Documentation/devicetree/bindings/spi/samsung,spi.yaml @@ -22,6 +22,7 @@ properties: - samsung,s5pv210-spi # for S5PV210 and S5PC110 - samsung,exynos4210-spi - samsung,exynos5433-spi + - samsung,exynos850-spi - samsung,exynosautov9-spi - tesla,fsd-spi - const: samsung,exynos7-spi 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, },