Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1895737rwr; Sat, 6 May 2023 00:37:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ63CO+iyYgWFM+xD9eu7jGAuYBVX9tnAz5+/7ATDXjZbgz+RnowWSaQlrLBsFMwdAHe3Fzy X-Received: by 2002:a17:902:ec91:b0:1ab:515:27c3 with SMTP id x17-20020a170902ec9100b001ab051527c3mr4687125plg.47.1683358662230; Sat, 06 May 2023 00:37:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683358662; cv=none; d=google.com; s=arc-20160816; b=wvKo7WINTd1rJq9Rd+8anwMuf32FRc2hHVKZVgdf/PIdQgEUwbvmWhcOLEwZ3ZxW9S PhMq0L+z4sqVcZh1shsVnUw3E5sJxSGqN/cG9Hl7NXFOPgqz2k+AfROQyYZmSKfk0vQU AH/nXBlWn3YWdX9Q6Q1uxdbJHCKpdBGzyRXf5VrnbMWhRSmXEfKzug1V17EQXIAkDQ+U j2mMvbonGH72ox3UNAoe+xq2B8rar0cxH+/RjHvYzaEh77STaJOetJ5i4oErKs13ZtJO iWIhvpDBFMsDEWYMbNzMEpwXJOEaKnOcxKOgd0XGgbft6VwEv7xg6Z8BimXfQo4St8Fd JS0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Cc4szePKx1X47wb+R4eZfAu1BbHj1cJ7EQ+8XaS2XQU=; b=Myd55VsoIxlltwtdmfg7bSbhvIE20kl+AxwJ4EmZ2h0d2nzG0lvQZJr7GDUYqzgZ9U QO/5Z7WeKjiFak84i3Y5tEgsTIu82UG70yxyJh+I1K8+gRB4Vhjzye57pyUlz7ck9xrQ Oihn3O0GtMJ367qYgbdPErVPzoA6aACt2URWAHAl3h/YoJNzIaTNbXQ/prBiXn2JT8g4 MTaE0nYHNKfQmIVZ4UJ75yiplQlEEY7gzszjoYY6TBJBaSc1hRjRfQrb8gBLmqJVYaBf x1BtTDeWS9R+xkq7NDGJnnIINuE0ySxE+UNvi3BlxaDA0yQQhoLQ/cmdbAXQtMAc/ctA XMVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=jJmA383H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j8-20020a17090aeb0800b0024c1ddfa1bfsi8026036pjz.92.2023.05.06.00.37.29; Sat, 06 May 2023 00:37:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=jJmA383H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231891AbjEFHd1 (ORCPT + 99 others); Sat, 6 May 2023 03:33:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231444AbjEFHc4 (ORCPT ); Sat, 6 May 2023 03:32:56 -0400 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42B4411B6D; Sat, 6 May 2023 00:32:36 -0700 (PDT) Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-3078c092056so20674f8f.1; Sat, 06 May 2023 00:32:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683358353; x=1685950353; 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=Cc4szePKx1X47wb+R4eZfAu1BbHj1cJ7EQ+8XaS2XQU=; b=jJmA383HE6SadUuzWkr0Aexf3fnIPKp3FGbn6NUtx4kukFoljCKelXY7NBQZ4fslrm rVjI1LL+w02bLpKBuGx7Vvw+i+qUBZi84kFu8sLwmcj8RynSLycyEgBUMZh425IDu21M k1aEe8bCQ+I9UNOMCxD9K9T/Jo9xb8HtFwp/51yjDt4scSY180My623vn9qtvOtbXVyT V+T/ZXVr1ND9qmgXdO7m20L2Iz7k0ju0YxdBVdsSAPO6O4elXWy/8zRU0Jdj3F/6bKCH PXSUr7XUUftdYfOpcHE36/KbgMwU7X8R2soYMRhXBTjtqpDJEoT5NPOuEAXfah9R28xl JTHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683358353; x=1685950353; 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=Cc4szePKx1X47wb+R4eZfAu1BbHj1cJ7EQ+8XaS2XQU=; b=RlqjqfCbao6LcEn93dYOaIC/9X9oGwZ0DKh+YH0Rn+bQvCThbnnQaZ3lg93K3KetCx 7Zf1jJLn3MkEVBtap2AS7NRKdzopY7OJwm4yAuQo1c0cyZfaqA4oC2QLp/Ox06RXE3oq RSlMcao19U0zcw6b/Esj+k+9HEC+mDc1Kn5Q3Kd15R8xOhZZubd7EuHEDd31cRjTKO5P Qqwf80nakRoiyX2cvVZgZLRLLvfMOCqMmqoJIhJTWvGbj0Ijec/4Te90BH7bH/hX+9Ye qAwQ7F61hni+mawJvHz3LZ+4x1jsp6qve1jfHlZek33ZJksaMNmZ3yLD67FOvx3vJyvL 6Cmw== X-Gm-Message-State: AC+VfDx9aLqp+i9oRnmr8FVhoTRNs9+5L1QmE35QcX2CVDhKeUD2/LX+ YHJXuKMw9xnkzoWCDCYS9fU= X-Received: by 2002:adf:e6cd:0:b0:307:886f:fac1 with SMTP id y13-20020adfe6cd000000b00307886ffac1mr692505wrm.35.1683358353148; Sat, 06 May 2023 00:32:33 -0700 (PDT) Received: from localhost.localdomain ([176.221.215.212]) by smtp.gmail.com with ESMTPSA id q14-20020a7bce8e000000b003f182a10106sm10071944wmj.8.2023.05.06.00.32.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 May 2023 00:32:32 -0700 (PDT) From: Maksim Kiselev To: Andre Przywara Cc: Icenowy Zheng , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Paul Walmsley , Palmer Dabbelt , Albert Ou , Cristian Ciocaltea , Greg Kroah-Hartman , Maksim Kiselev , Maxime Ripard , linux-spi@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: [PATCH v2 4/6] spi: sun6i: add support for R329 SPI controllers Date: Sat, 6 May 2023 10:30:12 +0300 Message-Id: <20230506073018.1411583-5-bigunclemax@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230506073018.1411583-1-bigunclemax@gmail.com> References: <20230506073018.1411583-1-bigunclemax@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Icenowy Zheng R329 has two SPI controllers. One of it is quite similar to previous ones, but with internal clock divider removed; the other added MIPI DBI Type-C offload based on the first one. Add basical support for these controllers. As we're not going to support the DBI functionality now, just implement the two kinds of controllers as the same. Signed-off-by: Icenowy Zheng --- drivers/spi/spi-sun6i.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/spi/spi-sun6i.c b/drivers/spi/spi-sun6i.c index 82523011a3a5..fe287a45df9b 100644 --- a/drivers/spi/spi-sun6i.c +++ b/drivers/spi/spi-sun6i.c @@ -715,9 +715,21 @@ static const struct sun6i_spi_cfg sun8i_h3_spi_cfg = { .has_clk_ctl = true, }; +static const struct sun6i_spi_cfg sun50i_r329_spi_cfg = { + .fifo_depth = SUN8I_FIFO_DEPTH, +}; + static const struct of_device_id sun6i_spi_match[] = { { .compatible = "allwinner,sun6i-a31-spi", .data = &sun6i_a31_spi_cfg }, { .compatible = "allwinner,sun8i-h3-spi", .data = &sun8i_h3_spi_cfg }, + { + .compatible = "allwinner,sun50i-r329-spi", + .data = &sun50i_r329_spi_cfg + }, + { + .compatible = "allwinner,sun50i-r329-spi-dbi", + .data = &sun50i_r329_spi_cfg + }, {} }; MODULE_DEVICE_TABLE(of, sun6i_spi_match); -- 2.39.2