From patchwork Thu Jul 4 06:26:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shan-Chun Hung X-Patchwork-Id: 13723303 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 339D7C30653 for ; Thu, 4 Jul 2024 06:38:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=Q9wcD4PWr8YAogAElKHlzCUbgCE7uJ7/yxnZjstIV5o=; b=jMV9IcFi5wxntKytiMOFkacrgE TCk2NDx5WA2BmuVSlh2IcwabUHyrv8gC9ip6LmhcKUMO8S1K4FwivavtR/WII75RBTHxwv8qjzxMY F/DE00Zy/e/h9QyoLYr+MxWGPDnkglA4e7kMljduFlUWtxvMyRUiVTyrrDlWrQScKctMqZtXttc+a 6mtjmsGOmLDzphqTG/Z6b16Lqtt1VK8TPkNSCdo3JY2/fIajmLjVRr/BRnc+hhL0NRg3sffK5Svp7 OIyZeTlVYn3MAUDjQHLEKWyZvEr8+k72E20ydEyJQ6p8gHXwtRddxl0hl3yn/P2JIl9IBUOWRQyUc begi825A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sPG6G-0000000CM0N-0QAe; Thu, 04 Jul 2024 06:37:48 +0000 Received: from mail-pj1-x1034.google.com ([2607:f8b0:4864:20::1034]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sPG62-0000000CLvC-2hFH for linux-arm-kernel@lists.infradead.org; Thu, 04 Jul 2024 06:37:36 +0000 Received: by mail-pj1-x1034.google.com with SMTP id 98e67ed59e1d1-2c965efab0fso238383a91.3 for ; Wed, 03 Jul 2024 23:37:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720075053; x=1720679853; 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=Q9wcD4PWr8YAogAElKHlzCUbgCE7uJ7/yxnZjstIV5o=; b=TABCysxFr2g6kq4FBEHKQ7a6w7HxHPlcpXx9JmVngwGFX3EupbAnhiiydpbiNBbbDC lS5R3HSjm4M3bjFbRhxMAlLv5+SkgLg5ItC59yGkrVkQA3eHMMvKFYbS6Qi1Vr30x5G7 BKuie0NlWb5kA7eTeCuFQ92vYBIPvNwgR7xUYEImadXMbcARKEqTK65EMWqvpd8lWuaC pTypJkpIkuQHWvKHNEt9RxBV37UUd8feEEc2qegE8r6Iz+KVRC7YSp/ePuNcoELW1y79 Ba1+jaEEIvtStPUdUsNblZOOE+8sb/kx5XzLE2zdgPxRHsSWO72wZxCGDYgF6Erp9nP1 V1xA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720075053; x=1720679853; 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=Q9wcD4PWr8YAogAElKHlzCUbgCE7uJ7/yxnZjstIV5o=; b=C1hIj+paPhl67BW6LkK5Lj7hTNdwoXrtvv9tdrV1elvjGCzyuESscY/t8StKL75CHc dmHDvnmL+dY+c7YxE+PhZc9KreDH6e2Mqq4FC4qZQ2hd6wd1boQAD3IQ3Y7BSYt3rjE8 jXM6e0i17uKe5ipSDnzDqkiFIedXbDw88yJ+FXopjyqcidiuZYF766//TGEMmFjyXWZl cyVWRI4zOjNOsp16y4lkNq/g5GLXA/G5pRarCSe0KvFTXbAU63In+2iuUpgj7E4G7DvO ZDPpebInN1uvndEldQgUg1SOVU8vikgQarS8L1LI65sYH1lR1OZ1ntDHhT3x4ot4EjY1 EYaw== X-Forwarded-Encrypted: i=1; AJvYcCUN7rBmWhgudSwHhs0khnIzrzBGh0wmtUHpOnYQISTGN7zsrhAm/LsceTGlmSj6w9J03O1IhQC5UWKeN4cvwRjPUOTSTKehs2gdvjBKuaFt/We4quE= X-Gm-Message-State: AOJu0YzQiMwsBb7rkf8O98rCYOqWncz89BLJm5THXdDeO/GyRsHiTArh X/23JEeWqgeyoj6FaoBkI5p+283B5DIEniCXZKMxfOn4t2N+mXPM X-Google-Smtp-Source: AGHT+IEXpW7QC6BZPKVS4Pkn43o+XVWNg9bvWBSKIs78gLrv3gqo0RR3sbFIBeXVBHfqY2DiBvHZwQ== X-Received: by 2002:a17:90b:618:b0:2c9:83f3:128c with SMTP id 98e67ed59e1d1-2c99c86be82mr550963a91.31.1720075053011; Wed, 03 Jul 2024 23:37:33 -0700 (PDT) Received: from localhost.localdomain (60-250-192-107.hinet-ip.hinet.net. [60.250.192.107]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2c99aa6fd28sm666835a91.36.2024.07.03.23.37.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jul 2024 23:37:32 -0700 (PDT) From: Shan-Chun Hung To: ulf.hansson@linaro.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, adrian.hunter@intel.com, p.zabel@pengutronix.de, pbrobinson@gmail.com, serghox@gmail.com, mcgrof@kernel.org, prabhakar.mahadev-lad.rj@bp.renesas.com, forbidden405@outlook.com, tmaimon77@gmail.com, andy.shevchenko@gmail.com, linux-arm-kernel@lists.infradead.org, linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: ychuang3@nuvoton.com, schung@nuvoton.com, Shan-Chun Hung Subject: [PATCH v4 0/2] Add support for Nuvoton MA35D1 SDHCI Date: Thu, 4 Jul 2024 14:26:21 +0800 Message-Id: <20240704062623.1480062-1-shanchun1218@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240703_233734_703638_676B6D01 X-CRM114-Status: GOOD ( 15.30 ) 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 This patch adds the SDHCI driver and DT binding documentation for the Nuvoton MA35D1 platform. This MA35D1 SDHCI driver has been tested on the MA35D1 SOM board with Linux 6.10 v4: - Update to nuvoton,ma35d1-sdhci.yaml - Fixing overlooked issues. v3: - Update ma35d1 sdhci driver - Fixing "Alignment" and "spaces preferred around". - Fixing style for multi-line comments. - Fixing double call to sdhci_pltfm_free(). v2: - Update to nuvoton,ma35d1-sdhci.yaml - Remove some redundant descriptions. - Replace 'minitem' with 'maxitem' in the clock settings. - Make corrections to nuvoton,sys description. - Add sdhci-common.yaml. - Remove '|' except where necessary to be preserved. - Keeping one example is sufficient. - Add regulators in the example. - Update ma35d1 sdhci driver - Refer to 'include what you use' to modify included header files. - Replace the number 8 with sizeof(u8), and similarly for others. - Use "dev" instead of "&pdev->dev". - Use the min() macro to improve the code. - Use dev_err_probe() instead of dev_err(). - Implement an error reset check mechanism. - Add devm_add_action_or_reset() to help with sdhci_pltfm_free(). - Use devm_reset_control_get_exclusive() instead of devm_reset_control_get(). Shan-Chun Hung (2): dt-bindings: mmc: nuvoton,ma35d1-sdhci: Document MA35D1 SDHCI controller mmc: sdhci-of-ma35d1: Add Nuvoton MA35D1 SDHCI driver .../bindings/mmc/nuvoton,ma35d1-sdhci.yaml | 87 +++++ drivers/mmc/host/Kconfig | 12 + drivers/mmc/host/Makefile | 1 + drivers/mmc/host/sdhci-of-ma35d1.c | 297 ++++++++++++++++++ 4 files changed, 397 insertions(+) create mode 100644 Documentation/devicetree/bindings/mmc/nuvoton,ma35d1-sdhci.yaml create mode 100644 drivers/mmc/host/sdhci-of-ma35d1.c --- 2.25.1