From mboxrd@z Thu Jan 1 00:00:00 1970 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 91927C46CD2 for ; Wed, 24 Jan 2024 06:50: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:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=coB/w5meDjCrGgz3j7SPNU4kiMmJ6nLfZg0lYe31n/U=; b=YfJFgtQdEdrvRx rju9VMNleWAZ9FEoTWA8kUIRMD8cH8nwOgwEajug4hb8PuoIjFBjgp9dYnHmcO9NQhIgJalu8HW3b QYMGTqi/PALVIS0QAD8+sA7oJsHhmy9784m9xf6Rpb+n2diAhF95La7F2UkZO5v5UBAMK5Svxrrzo ki+Emf/QiBu4kRKQFZnKiVHYgmITbG/MikrcMEL8W4JLVIFP3a2OqiJuJeuGVcO3Oe1frzzEbJOP6 +7BFAgqZA/aQglGZoqfIEREtyutpVhFKNbvnU72hUQOVCDd2pin4VgaRbkk0TWcKbHlRzVCL/DLH2 ABzQSw2wq4GXEvDyXR1g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rSX52-001mDv-1Z; Wed, 24 Jan 2024 06:49:48 +0000 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rSX4y-001mDH-1P for linux-arm-kernel@lists.infradead.org; Wed, 24 Jan 2024 06:49:47 +0000 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-40e8d3b29f2so60862705e9.1 for ; Tue, 23 Jan 2024 22:49:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706078982; x=1706683782; darn=lists.infradead.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=+5dC6oObRCfj9XMiE47OTM/dpbI8m3Cq3OPFmsenlcE=; b=ShbKhz7obfmcdLCnvMbe4ibvhFfBL54ASzb5dTRaMVlP/AcwMQi5/qXsCV4gFoEANn b8rSNxYQsPL8b91/1ps5AUxkNzWnooXuri0QaZWDZGQmPPus7guFpuwjAGQnXayl0iOW ilrOGVqcSdH49zV4aCBoA/OkuxitVgzyxvVB9t1MhQJGhs7Ud6M8d78Hpf7wTb5l9N2s 2lcaUd9+f0sLCQGyMvHGydYxAOvwkZ7ayTdklFDB7TwzLmleWbGh1NHVOzfwhVRfcJxV k1EVyvm0bqUnK25YNq3iTharnHRKwNzIFzQoQ96nECpZgheIh/0LuCLmqgaAayzQlxLI /d9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706078982; x=1706683782; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=+5dC6oObRCfj9XMiE47OTM/dpbI8m3Cq3OPFmsenlcE=; b=XWX81oXJD/wL5xvc0T60pcJqqMX0F7or1Cvlp+rkMFB9u/hUsr0YG22FrFwl/MNAwx /2n0ONtzJgipD/LKuzPrdQjO5UbV1vDMJXqQsF6SywiEqib47ogwAm3FMHVjcDwTJ/4Q YNml580kepB2/GY5KIi5oo8XKzMSEiepJt9sm+6GrzhsPEtGtPaFCb+jvBpdKwHnaEJ1 b00WrlkTdSJSI4NISjzH9QWDogn5THLpeMZfECAAqKbo+F3+W1Sa/WjcWIBAHuURizuM 0wzUVqpGfXH6afxjChp4qy8Bqm8naHhn38ZVle4hPsW8IcX/tG8FhOWw8vQw5zRE6Jbc 3sXQ== X-Gm-Message-State: AOJu0YyYbOwuxOlnEN17GC/PUD8aXR/ID++CYtZ0Hc6y+gQOUdmamhjD 2LOerUn0mpDJqNQ+t4N2pW/4V4KqkfUSn1yXuFoKfC7X13sko/OgU5K1om96xpQ= X-Google-Smtp-Source: AGHT+IHNOznaWmaenlaG6fZZlWedy3D7fCmkfQzXiVINibSDkgDN0MBf8opIdRA8Lg+U9/J2NB1cvg== X-Received: by 2002:a05:600c:2152:b0:40d:6af2:f965 with SMTP id v18-20020a05600c215200b0040d6af2f965mr548979wml.106.1706078982058; Tue, 23 Jan 2024 22:49:42 -0800 (PST) Received: from [192.168.2.107] ([79.115.63.202]) by smtp.gmail.com with ESMTPSA id jg1-20020a05600ca00100b0040d4e1393dcsm47998178wmb.20.2024.01.23.22.49.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 23 Jan 2024 22:49:41 -0800 (PST) Message-ID: <9c9e71ff-42ab-4753-80cf-09b34a97b28c@linaro.org> Date: Wed, 24 Jan 2024 06:49:39 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 5/7] spi: s3c64xx: Add Exynos850 support Content-Language: en-US To: Sam Protsenko , Krzysztof Kozlowski , Andi Shyti , Mark Brown , Rob Herring , Conor Dooley Cc: 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, linux-clk@vger.kernel.org References: <20240120012948.8836-1-semen.protsenko@linaro.org> <20240120012948.8836-6-semen.protsenko@linaro.org> From: Tudor Ambarus In-Reply-To: <20240120012948.8836-6-semen.protsenko@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240123_224944_482188_1FAFD1AF X-CRM114-Status: GOOD ( 18.99 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 1/20/24 01:29, Sam Protsenko wrote: > 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 > --- > 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 0e48ffd499b9..f7d623ad6ac3 100644 > --- a/drivers/spi/spi-s3c64xx.c > +++ b/drivers/spi/spi-s3c64xx.c > @@ -1461,6 +1461,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 }, I'll come with a follow up patch on top of this. Having the dt alias used as an index in the fifo_lvl_mask to determine the FIFO depth is wrong. Not only because of the dependency on the alias, but also because the fifo_lvl_mask value does not reflect the FIFO level reg field. Playing with what we have now is ok by me, I find the patch good. > + .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}, > @@ -1515,6 +1526,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, > }, _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel