From patchwork Tue Jul 16 00:45:25 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: 13733961 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 90C1AC3DA59 for ; Tue, 16 Jul 2024 00:46:10 +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=LnXr0eXuAv0hZrIz9mCHMK0FQq9j8VZolcsUM4NL5QA=; b=ZuF5QZxIWzbIwl4jpiCuM1Onk7 mj24ww4HHieYB2UOS+GESFOjCMVi+ufCzWi6kgWKKfisE8OET4h5yxqf0b5aLznvzTF3pXU0WcvS9 8vdjVRtJw4ZxQ7IAGmRuGHDMZiTUjn/asCzCfIzQ3c1poxZ/4BwmZBSHLmIAkWbroS/B+N5bULM55 plXHp5cuqIhCYP6nbblncO79/t/jwxdXyoz51Gcmt6R+6jeQCr6GSKMjfyg2/Pccwn8nfzzUQM38U EDqtCDqP1hkmZiy633cMlPhV5FX6+WduXejqGrzIZQX11/DqR51XQqpzWBENC6lLMOJr04ehVaWXh tgB81kHA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sTWKL-00000008r0D-0qLM; Tue, 16 Jul 2024 00:45:57 +0000 Received: from mail-oa1-x32.google.com ([2001:4860:4864:20::32]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sTWK1-00000008qtl-0RUD for linux-arm-kernel@lists.infradead.org; Tue, 16 Jul 2024 00:45:38 +0000 Received: by mail-oa1-x32.google.com with SMTP id 586e51a60fabf-25e3d8db819so2258093fac.0 for ; Mon, 15 Jul 2024 17:45:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721090735; x=1721695535; 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=LnXr0eXuAv0hZrIz9mCHMK0FQq9j8VZolcsUM4NL5QA=; b=af29B+ZmusSi7kBEWHo9eytQv+fB1Jbctx2E0Qjzj8cezoFmeMcyulBqnRP1q/XRJp hH4FuU/ALdq/6OJqAVAlvjXXSRpjkg1iCpzJnBo1TKKD8Rid/s6xsQ8lx/Xqb/2wMimr qTMCPaueiFl5/TizVeWjOv1ynmNCb3XoRar6inVXJVyJaVoLPYF9ogRW5jg4V2T930X6 0Gt+3VqBjCQM9W2+GDrv/iCpv4FH38xPKbv1iCms3uLw7ctX8Uun2NWFOFigHZK9JkZJ 9U+8Gxb++Q9ZBRu2qKHpPkfMMSuoloGw5sQ2oPSfknXk41abX5UUk7L81o0q28mho+1j jOCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721090735; x=1721695535; 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=LnXr0eXuAv0hZrIz9mCHMK0FQq9j8VZolcsUM4NL5QA=; b=VKKOHi5f2/pNqMf/xlHIbKw/E03rEfdFOFr/YWXMIbc5rYiyp1I/+vJpHUkNO9ebXK kCZ9Xo26p7RGiofzpv5FFXZCYdL3IcDvuUTFbf0gcQ9gVcdyQ1xYtpYRFTjT+9TOu/6K eoc6SvY1En9EU/gGG1aIDG8BPqbQkA8bQvPUf29/CNA7KJOlqTG0wv48LYJAHS95BHpX X5TnWfhN+2/epxRQOpY98MexsLKrjj/oddcb2u5TgUbLGED8UUyYTQurNVWFP4BOrKxH 7JJa8ZdUcGtPau9UZmgznHfpGkYJBAUGp7qghTG09y2wUYGM8H5HLKUa49AS418iY5q8 el1Q== X-Forwarded-Encrypted: i=1; AJvYcCWtXKFR7HMXHgic1xYMfFExxVmlpA7i+pHaiNTK4Ko5mtxy066NGW2c/bYEK8GAqr6FM1TBLqzoXAI+dt2QyDFTz6j1hqobc6z6+BsGNU8/DRzZLsA= X-Gm-Message-State: AOJu0Yx9IC90O89i6ZjyENmvg60UWerV2EtBd8zLApwMc7jOSHsLvAn6 i8WctM8krWlCT6MiHEWHERs6kLLkbZKb5asdgv3y6xE55PdMx6uy X-Google-Smtp-Source: AGHT+IHhID7gzwliNwSDimSOwWCZnoturptY/gWrbZpRJF5QjxmXeZcq2t1YrqRjdEUztNfviDcFRA== X-Received: by 2002:a05:6870:64ab:b0:25d:f1f6:8a2c with SMTP id 586e51a60fabf-260bdfbed6bmr400179fac.39.1721090735456; Mon, 15 Jul 2024 17:45:35 -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-70b7eca758fsm5000949b3a.162.2024.07.15.17.45.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jul 2024 17:45:34 -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 v5 0/2] Add support for Nuvoton MA35D1 SDHCI Date: Tue, 16 Jul 2024 08:45:25 +0800 Message-Id: <20240716004527.20378-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-20240715_174537_167765_AB4F2C49 X-CRM114-Status: GOOD ( 15.86 ) 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 v5: - Update to nuvoton,ma35d1-sdhci.yaml - Fixing the same orders as in the list of properties. - Update ma35d1 sdhci driver - Fixing the error path syntax to err = dev_err_probe(). 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 | 314 ++++++++++++++++++ 4 files changed, 414 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