From patchwork Mon Jul 1 00:39:11 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: 13717455 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 65B6CC27C4F for ; Mon, 1 Jul 2024 00:40:09 +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=S3dntM8QcCQKAFsfsjnIQTFcpVozkZ1R9I8XEKBnf0Q=; b=iH8pyxSVvUukinBTML2eSrKMbE jcwMqclxluDmAV8DeN/6DqvfSgInv60PViGG0SzIwb1wzMPNWBhyxLrVQJLcujH/mpwtB5B/429lx KS3m/FWh4djiNJHfq/yRSNaeRGunx5KrCeG2isF6QjklxJ/CK1o2MtflYp2twzRvdEGg/YyfxIBoh ysP21cXXe95yIkayBt/mPZpRIfJKDTWl9owExb3UU8yUzkuoPqOgBluNNikn5mlU/rK3awCWwlJzN mRC4TXwCD/8RmFH9I7+/zHQfOHAaXA3WegZu3BJsq3A92wcFq5OCoRFul7I1nEGXlE6QZ0muXyGEP /n1jRoTQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sO55I-00000001KZ9-3RPc; Mon, 01 Jul 2024 00:39:56 +0000 Received: from mail-ot1-x336.google.com ([2607:f8b0:4864:20::336]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sO558-00000001KWR-2ii6 for linux-arm-kernel@lists.infradead.org; Mon, 01 Jul 2024 00:39:48 +0000 Received: by mail-ot1-x336.google.com with SMTP id 46e09a7af769-7020666ed0cso788207a34.3 for ; Sun, 30 Jun 2024 17:39:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719794384; x=1720399184; 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=S3dntM8QcCQKAFsfsjnIQTFcpVozkZ1R9I8XEKBnf0Q=; b=BkS2TGzRpZc21vK8/z4w7vjyzJonbkezqpTo12+xnh7KxTyIrAnJWZNkUpuIx5uQco DZmjSc/DKwJEEer2/32Wlo0Xr1PRy01LSGdv/X8xHmLqN0J2q2MgEY+aTCpM2IkKgUhe 1zD/P+w8OckNd6Ggy7kyBaO7YG6YblxVJK3xrCV3tG/ZKuRWTBYKFWIC8lzIK2dAnmXL MUZPoKaho/w8LcGzyVgafjx8kmUhEcpSCqH3nU/iuuZ14OaGolxE0Lq3WvOU7Sdr0jB7 7uOaVOpwdJZIWFbd9eySLsXF9W3CS2NyBBzmq3YcuWgP1ggkPhyHVYAMqbaWAh0ynnuX lNxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719794384; x=1720399184; 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=S3dntM8QcCQKAFsfsjnIQTFcpVozkZ1R9I8XEKBnf0Q=; b=XfIsDd4xQiC/bkn0fbHPIPxawHJmL+e2RoEsnviXldsGj/XT+kInYv1+hLlEjzkMB+ Y+oyoAZ3O2WgGaMpWij5zpaHViB+8/kBHuLYkZtW4FUcm8RUHGTM/eB3b9dMy5wPuWF0 auY50IjCrzpBppavRxQw6BF4cS83bhWB6sXN9eP8E0TG7jt1W+Cm2MotQoPf1t4QJk3M iRjcYq9MbdYKPxWJWRoxQ2kpbsdlOhPOkF5jfC7DL+i73PCtQ1XEtxSCuWROzG6EwOkS onIex0XCIcTHzonsSffKhjLR2xjRUg1Zh8CLEnk5DkTznwXNzFXhJdeXq37W97lWoK+o v2oQ== X-Forwarded-Encrypted: i=1; AJvYcCX+bAQwF6iWTTVt3DzFEi1S0TlxdkpTiveIBMekMRBTilRIOlb5aESs6BdGL+Zd6G7iQKljXYBkDoOpO/HjzS5JUjD+Ho862ViZy9zJ+yCi+DqPVh4= X-Gm-Message-State: AOJu0YzvG/e4R6Tfnp9vaac947nTHo0YcCPknR7SkWGApESeI9WaBrdi UT+1epq3M+LjlPb6sIqAzi3XouJqit4icWvGaCXhfVoS5/fNtRN1 X-Google-Smtp-Source: AGHT+IFyXgvceWGtOVGB1Z3t87Q/Y6iMoNOtb9HBnheZHY0WfpsGEL6Gf5mj/XgFOgoX9/PK+9BQIA== X-Received: by 2002:a05:6870:d290:b0:254:c842:46f0 with SMTP id 586e51a60fabf-25db3624640mr3987580fac.59.1719794383883; Sun, 30 Jun 2024 17:39:43 -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 d2e1a72fcca58-70801e53b47sm5232022b3a.37.2024.06.30.17.39.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Jun 2024 17:39:43 -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 v3 0/2] Add support for Nuvoton MA35D1 SDHCI Date: Mon, 1 Jul 2024 08:39:11 +0800 Message-Id: <20240701003913.729428-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-20240630_173946_708605_3DB511D8 X-CRM114-Status: GOOD ( 14.94 ) 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 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 | 88 ++++++ drivers/mmc/host/Kconfig | 12 + drivers/mmc/host/Makefile | 1 + drivers/mmc/host/sdhci-of-ma35d1.c | 297 ++++++++++++++++++ 4 files changed, 398 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