Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp542818lqp; Wed, 12 Jun 2024 08:59:20 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVzVBTT0cPVbBTZLXfZ+25K14pGGvdF6+Ut9xMeW+rzLzN5sN1fH0PYek2WKbavG8q5InK/N7jatvLDE8SSMPgkJxOCpFO3l/ZHg02DtQ== X-Google-Smtp-Source: AGHT+IF/WGSjyoCjr7OxLYUYyQWdjit9HyVPzdwHRdjhZjZ1/GZh5eGfBPWqm5UTi4Q3wFxRzO6+ X-Received: by 2002:a05:6a00:1945:b0:704:16ec:4669 with SMTP id d2e1a72fcca58-705bcde84c8mr2347474b3a.6.1718207960255; Wed, 12 Jun 2024 08:59:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718207960; cv=pass; d=google.com; s=arc-20160816; b=A+FCtLmhy1uiFxl2yuNnPXfADC/BuGo4px8g99Nq1g2cDzv/oiAhzP/625OTDYU5QU nsjpotC3wfajCuLChCCSXs9eibtbVAN/nMaqO3Dw60t1PV9DzVnOP/cUiaU0DYnYvnm8 EEkDlHPsZWiFc637LrV5W8JqtaMndiGLWpTgUiu5pqXbj95vEm6iMYeh+0MQxuhUMstc 6S0uj+8X3u82Nob0m0F4RG8JfoXf4iUedfrFMoC6U67h/WeuXqwLCYqwgdzoMUdLZiGz SQvP8rrQzi6hd4ZRGBUFSrAPHy6jeRQtqorOsc4jfsffzDH3DL1LahfptcdYulnYkRsY WziA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=exR878LNZLdM2J+ExBa/TyLhATL/QjdBRj84SbkuFho=; fh=KP+vxQOMIjDjiGnY3egZRBhdKIs3xVNJjJRfMjXE/fE=; b=MF/7ojFJ6qK6O8D0bPAEGFiWz1iiwsdiOKFmb4JF/Bg91xZTatZV/J8HrDdtuTzAcF sgYnlWIrbg6SjCW4t2EvP3ezGkZdWXT62XWx8HDILDlTx+tjw4UTP4efa8m7L9rOTz8d 3UipH025L1VaNsZbkrJv9pbryM9KAMHn35UuoKHP4bhrF87hruT0195iEJC+qKw5xkyR 8H/12FBgdHZL9+MkQBoDv3igeL0/mbUILNjJ7ICUAoE4tGfNy8tBRiKO9mPegsTreu2r p0a+IMFt0seaFOzoxUqYejGOyjnEfl6rY6TDLsqdWsrEjxThvcfYBhHkaHBxCgQjBrdO +zLQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BX7YQziI; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-211816-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211816-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d2e1a72fcca58-705be5e7a78si1649033b3a.65.2024.06.12.08.59.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 08:59:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-211816-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BX7YQziI; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-211816-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211816-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 676642899F9 for ; Wed, 12 Jun 2024 15:48:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9EA17180A71; Wed, 12 Jun 2024 15:48:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="BX7YQziI" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C3DBFB65E; Wed, 12 Jun 2024 15:48:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718207331; cv=none; b=L08tyo0PjBXle/6acKVvk8milD9nNL6RzWfptDj21pk74KoaRyjGyuWnFZFAqgaYLhzeo04z9L0ISkvkFxSXtIQqv2zQlfooG/hpaMuHGnZ2aORWUWcNRezROqsks09GdOR+AHtDMKLm515oxJpKbfTBkdhHscNjhp+/rYjHa5M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718207331; c=relaxed/simple; bh=Zv5RO+ev5GfuXBQM8OVvJacsGQmGXoAme99ziwuiEck=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=p3h7mFzV9nCp47Yr3lJgvXOamm5+wcxap4XXzjuUmTfWwCUkNiTr6ohDNPoEKZkqjSvgzfKu4f67YvvIlOGT82RJVoMjL+adyCTgQGIt9wXf4ZRTb9fW7J7GazT59G/mDL+xOIxkVF1eE33cIZ7nfuAfQqFCPocNXYhWsiua3B0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BX7YQziI; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7E4F4C116B1; Wed, 12 Jun 2024 15:48:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718207331; bh=Zv5RO+ev5GfuXBQM8OVvJacsGQmGXoAme99ziwuiEck=; h=From:To:Cc:Subject:Date:From; b=BX7YQziIjwMZfXU0YaZomh/upatYQYZUGXQ/gieuDsa9lHHH6IXuLe5CWwi8zvEiO 4MVnoIG7zXqf/0d24cWmZHPf3kTevU7tUBOj26/3MnuklimKVGk5huSRgKYwztRmu/ GgkcV19g3+RW982sqldDpHHAyHvbiGqO4/GwXUcplKhwhc1jhFSXMOFwjOAeS/uY2g UURuFkVVoi6LncNTPzj390R3bL4rqB7DQ5N9JiXHB2HBpnNkuAw2AP6yUK23Mddplw L+GDRo7hirnaWDCQs9G5tvMOJL78qu04pnRH/U7EWVNQWmfqsfvDi7Kk7dRbB9Dxri UMWjj3YilADrw== From: Conor Dooley To: linux-mmc@vger.kernel.org Cc: conor@kernel.org, Conor Dooley , Ulf Hansson , cyril.jean@microchip.com, Mark Brown , linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-spi@vger.kernel.org Subject: [RFC v1 0/3] mmc-spi - support controllers incapable of getting as low as 400KHz Date: Wed, 12 Jun 2024 16:48:30 +0100 Message-ID: <20240612-brigade-shell-1f626e7e592f@spud> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1827; i=conor.dooley@microchip.com; h=from:subject:message-id; bh=jUBdCKFRhPbdoAZJHxpB1biK3nMfNT3Pp93RB7R03bE=; b=owGbwMvMwCFWscWwfUFT0iXG02pJDGmZh31+Pm/g6ohf0duw6nVeD9Per0uMtwtxV56d+SrMv b92nZBlRykLgxgHg6yYIkvi7b4WqfV/XHY497yFmcPKBDKEgYtTACbytpbhr8Bf9Si3ZXVFdZVd x49dWL3xPsN13mz1GY8DrmmEx8WwlTL8L+kS/R9c+YftQeCvP85rHr7O8L3xseH8jP878tVe9mf sZAMA X-Developer-Key: i=conor.dooley@microchip.com; a=openpgp; fpr=F9ECA03CF54F12CD01F1655722E2C55B37CF380C Content-Transfer-Encoding: 8bit From: Conor Dooley Yo, RFC for some stuff that I've got in-progress for a customer's board where they want to use mmc-spi-slot with a QSPI controller that is incapable of getting as low as 400KHz with the way clocks have been configured on the system. At the moment, if a controller cannot get that low, linux continuously reports that queuing a transfer fails. The first couple of transfers will complete on this system, until mmc_start_host() kicks in and clamps the frequency to the larger of host->f_min and 400 KHz. Doing something like patch 1 of this set would allow the mmc-spi-slot to function for some sd cards, an improvement on the current none. I don't have any sd cards on hand that don't support the 5 MHz minimum frequency that this controller is limited to, so I amn't sure at what point this will blow up if such a card was used. Is this sort of change something that would fly? Patches 2 & 3 are just here b/c without #3 the qspi driver for this platform doesn't support anything other than mem ops and #2 is required to set the minimum frequency for mmc_spi to pick up. Cheers, Conor. CC: Ulf Hansson CC: Conor Dooley CC: cyril.jean@microchip.com CC: Mark Brown CC: linux-mmc@vger.kernel.org CC: linux-kernel@vger.kernel.org CC: linux-riscv@lists.infradead.org CC: linux-spi@vger.kernel.org Conor Dooley (2): mmc: mmc_spi: allow for spi controllers incapable of getting as low as 400k spi: microchip-core-qspi: set min_speed_hz during probe Cyril Jean (1): spi: microchip-core-qspi: Add regular transfers drivers/mmc/host/mmc_spi.c | 5 +- drivers/spi/spi-microchip-core-qspi.c | 224 +++++++++++++++++++++++++- 2 files changed, 226 insertions(+), 3 deletions(-) -- 2.43.0