From patchwork Mon Feb 12 14:03:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13553303 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 D7FE9C4829B for ; Mon, 12 Feb 2024 14:03:58 +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: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:In-Reply-To:References: List-Owner; bh=JnvRdcVkRr9BoLESmql0Ep/oURufhGscgXoe+UKdYVA=; b=hoaJO/wOn0Tvm6 Sp4cE2Wg64fM8SLlBDLOtGuLQv+4UbOSw85WqOxAxCB1MUsni2ItiN6bH+FOJ4wWDnwp6FcUKSXRo Ag7Dw9aGQZXS4LDlkiLJoqyO6l3cbAV1bxQT88ZhtgjaYKxOXjAS6AEGBf5ZHKJ1p5VdJrUkwU9mI LBVADYrLVvAG8L220gDIi0pjXO4OzCmVaOVEkYZ7ELXh5HuY1x32sJmLNLuvlY/7gD9a7MqFf6cuN Ps37vq9nXCvBDdpu4LZtFBUVCFBRQRSMmwLFltHDeD58YiV7V7DivUaF2VkmAQtnIHqUfoVg2PNx6 xce6CUWhj3E8CK/js3bA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rZWuM-00000005gh1-26oo; Mon, 12 Feb 2024 14:03:42 +0000 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rZWuJ-00000005gev-1z3M for linux-arm-kernel@lists.infradead.org; Mon, 12 Feb 2024 14:03:41 +0000 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-4108cbd92b9so14163175e9.1 for ; Mon, 12 Feb 2024 06:03:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707746618; x=1708351418; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=3fwygQHFsBzQHW5VKr94J8/MYzLiHXjL2S+HWa6z3Po=; b=p7HUUD2awFVL3yAtsIRjakUQqYO6At+U/UGihXx5IY5pu3mrbM/NjMB1B9pWUqZrdH 0HL/ophTFNtY7DEfH/7O8PKOoVm+ihB04xRKwuPWsfU7TACR2HHBxHSuVqS7UfDY2u4m lu/jMSuP5aDG9Z5Duu3x4+LTW/iZEJWSvDVxr62Qn0KDqXrFgEF/8DIJi6GzZ07vPmWM IlhI8FLUpb5+RpSgsG8OwrXKiNzSxovJI0aC8SEzG6H1VsmqzHpo30/8N1fV8lJBVUtz fVDow0VjEiVppSf+QaEd9u5Yi4yFmjws1vckvhrtxNH+xDBd82Qhp2QzgMQobep1pHQ2 0ofw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707746618; x=1708351418; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=3fwygQHFsBzQHW5VKr94J8/MYzLiHXjL2S+HWa6z3Po=; b=AHPBzaGwdkWr3ioJ9zIzIH5E933hFVWlXgZJN8jEXiU7D26TLMKlTn6uu87wfgW03w OVt44jQeku6zK9ed/a6601qe9CDFReIT7La7Z+p/9DHALPnOrQ2glnPQSON/z+e8LeVH hf81hxfKp6lDgjP1OFbC5iyLJm+9Ba5eUKJJDRJfgR6jbDdhqOXDSI4d/NrJGdwVaAPY UjB7q04slrrTGQFCs9c6BvRJCcU8ion8D7Y0K/yGJVZbH7slu3E6FhDnBUEISuZ97CFO DTy5Cw17vjIHzMOJzeACj6B2GlflIyZIhlg9VL6IFgUYkMezup0EmGQrqCJlogCd+wN0 xA2w== X-Forwarded-Encrypted: i=1; AJvYcCVF4csI64F0kHizg0HFGb2ixQ3s/mpPzMT29vIAAO2Qr/PooNmglWmMEq0VSUpqe5/NqvpVbYAZcdNEhPO63RWpE/Tlz3rj3Ncw+9moRXPXVEqMtng= X-Gm-Message-State: AOJu0Yx8mr+Pna6FWYGXvwbFEfM5rc9Qm8h9Gbaw893/VgPv/ydeGCza md/LIZvvQGoEsxT6Btz6QWzUX00tLHCRTB957ewei0k8NjSQ+7iuEXflEPlI690= X-Google-Smtp-Source: AGHT+IGB51NH93DGoNoMXTzCRIC1N1Z1dJ2qlaKI/1UBHwPiKMc9bmlKd5PFSbsiKPCKfG5LGfp0Rw== X-Received: by 2002:a05:600c:470c:b0:411:6f3f:4950 with SMTP id v12-20020a05600c470c00b004116f3f4950mr661113wmo.32.1707746617687; Mon, 12 Feb 2024 06:03:37 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCVdE45X2RafVhK2EB+ykUZM9RvsPvrceDujHA//0jL+xxiP+4n1I1kYEwYqurMODq5CHI+cESHCgB6fBwCHf9Xe22zXIx2Qp7f/YjU3mw8LTOD+1vj7bezY4XjEO/3zcENm4GqTW3M5CvhgMXi2jzkXChD/FxCupB7nqxUz2UJrXQ894bvh8F2cTIt65lcSMSVyaCrkdNQHSBj0maQ8PTDCMQhiTq9z7/kEIBba3MjC3wq2yDG2cGt+iUjz3oYUZ41m5M2zPFExn19FZe1ndbXtsVXM0miaZC/FNF5xb74Pvce3Jx5iD2XfkIocvW09knSlasadcXCVOllRvE0g+sp95i61XerBAXzF5ujl16KXolDWSLmQIkPAuoYnUcur2Hd99mN6/F4KMfLmZUBYSFidrpIF/TuzVyhDsCgSUqS0xc/eTw+0Feg1mV0kWGx5zQf0KW0KcDfdwYogWTmSPBIXsB9t/lCNYk28KW54EHhxKJrkZDT77HYOskEsNcJPwo9mLRbeBizP1ItF0+EynUm+c7Vau4Z0qk7sXwd/MeJ8T69ADyktROfI0c6uoFQWETNzeeYhs9bF7BLRi1ZfttHOMOngSAvkfRCz/eVue91GbMmKMmk= Received: from ta2.c.googlers.com.com (105.168.195.35.bc.googleusercontent.com. [35.195.168.105]) by smtp.gmail.com with ESMTPSA id v9-20020a5d4b09000000b0033b843786e1sm2135356wrq.51.2024.02.12.06.03.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 06:03:35 -0800 (PST) From: Tudor Ambarus To: broonie@kernel.org, robh@kernel.org, andi.shyti@kernel.org, krzysztof.kozlowski@linaro.org, semen.protsenko@linaro.org, conor+dt@kernel.org Cc: alim.akhtar@samsung.com, linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, devicetree@vger.kernel.org, arnd@arndb.de, Tudor Ambarus Subject: [PATCH v2 00/12] spi: s3c64xx: remove OF alias ID dependency Date: Mon, 12 Feb 2024 14:03:19 +0000 Message-ID: <20240212140331.915498-1-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.687.g38aa6559b0-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240212_060339_712893_3F0BC77E X-CRM114-Status: GOOD ( 10.68 ) 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 The driver was wrong as it assumed that the alias values in devicetree have a particular meaning in identifying instances. This immediately breaks when there is a dtb file that does not use the same alias values, e.g. because it only needs some of the SPI ports. Tested gs101 SPI with spi-loopback-test, all went fine. I updated exynos850 as it uses the same USI.SPI_VERSION as gs101. Maybe Sam can test exynos850, if not, we can drop that patch (12/12). v2: - update bindings to consider the asymmetric case where the RX FIFO depth can differ from the TX FIFO depth - update commit message in patch 11/12 to describe the GS101 change (I was wrongly mentioning exynos 850). Tudor Ambarus (12): spi: dt-bindings: introduce FIFO depth properties spi: s3c64xx: define a magic value spi: s3c64xx: allow full FIFO masks spi: s3c64xx: determine the fifo depth only once spi: s3c64xx: retrieve the FIFO depth from the device tree spi: s3c64xx: allow FIFO depth to be determined from the compatible spi: s3c64xx: let the SPI core determine the bus number spi: s3c64xx: introduce s3c64xx_spi_set_port_id() spi: s3c64xx: get rid of the OF alias ID dependency spi: s3c64xx: deprecate fifo_lvl_mask, rx_lvl_offset and port_id spi: s3c64xx: switch gs101 to new port config data spi: s3c64xx: switch exynos850 to new port config data .../bindings/spi/spi-controller.yaml | 27 ++++ drivers/spi/spi-s3c64xx.c | 142 ++++++++++++++---- 2 files changed, 138 insertions(+), 31 deletions(-)