Message ID | 20240508065141.565848-1-ychuang570808@gmail.com (mailing list archive) |
---|---|
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> 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 72F3DC04FFE for <linux-arm-kernel@archiver.kernel.org>; Wed, 8 May 2024 06:52:17 +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=VEaX2IxlFaOR0HNizC/TW0ufgeZUBz5kjwO108WPFlc=; b=OTlTbzpRB0nitS 3sp/2Pd+v4PtIWV3l2oulHNI4dDdzyrw1T+r1Hht/7GlJAgHFwT6pk2Zvyy5Bpr+0aIQBjeFqoWVR vYvDztvuxMm/8YmAC2fePuxVdvloTh9Xl1mV6ObAcQ6nAyAAf0oWQnpnak0y6VnUt/C6eixodu3VB GHqzOjQEhDaklXlYTT3IGfRXEsX8Act1NpKfos7NvVsqmJf7Lu897FGjB0i165NBtJ81hJgL4MalT s4KQKbNwrvnetFNUBqh7Oitl80FmehX5iMc/pK9mFhH4DdYhF1GE9/9C91YP0TzqOTp5DDwn/E6nq kqDANx/8I3LzlKY59zRQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4b9q-0000000EJ3X-0JNu; Wed, 08 May 2024 06:52:06 +0000 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4b9l-0000000EJ2F-2EwA for linux-arm-kernel@lists.infradead.org; Wed, 08 May 2024 06:52:04 +0000 Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-1ee7963db64so12013815ad.1 for <linux-arm-kernel@lists.infradead.org>; Tue, 07 May 2024 23:51:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715151118; x=1715755918; 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=WskmxvCHwHG3hfNPcbruZ83J/Bg2hUlZTocqPe8dPgI=; b=OPi7KbaV43S5tPEwETKFVThdl0UaHxDHpoIrvQERUa6K86xaOO0WJFBspczPRc/1oF Oczk2ipgf739j+033Nd6u6LRcsfUmTDbfwDUMvEe7AYe49GKprFJHJKGMvnxzsmHFNaP mX3dYdD1BgZM4nZKqAqlxvUdRNAmBkSnwtNGo4nq5vnDmqJeAEdcA2j/b4DTJJNnxGVy krLXJrfLfrXqzjpn+zUCdVeo1t/fZCVoiSSgQQ9tbo9xN1XUGWYwZBBPkdv4j87i6X/z W3pAvfYDikM9ZSc+oyXWscwpHetc8Pf6HojkcGpGpU8zSGQG6F/Y4SMIQG1hPFArsUXo CLwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715151118; x=1715755918; 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=WskmxvCHwHG3hfNPcbruZ83J/Bg2hUlZTocqPe8dPgI=; b=Dc2yVlvrP783s3L2vNhZoKMjHhLOR8OvWBPRBKOE5az4fnSIDs1uLok7G5kKg2FW/3 OnhTjzkjcXChRNyWo8ktIGjNZ6Nf/xCxLXrm8oXAOWqAHnVR2GMaaanlALrwSD22d0zo cCtyDioz4Hsf4BzVbK/R1k5dxQpwY8MZtMrxuJgSldDDOUd9wwfj3nQ43v/SAvLhlMWX 8ZOyhgdrT8qb2T/qG7LQsaubRDw5rJ9jmc+5JAYFvfjMSKIWymgzrOCskKtLCeIoreXw KL6oBFu0jkUajtD8pvuyh/ckc5wtFaZuJzkJ5IPDpwv6Vb9qI+yv+4BsJvDT5CNhkrFG PgJg== X-Gm-Message-State: AOJu0YzCIdwtgq1h8jH6nffVXTpSB4BDtUWBEPRUonsP9MLQ7WnGOefQ Eit2+9ulH0F7ru+e7ahwZ9PRZ5iRZxBj+I0fr7su0jweX7hKJ3N2 X-Google-Smtp-Source: AGHT+IFznNnqBEiRDo5hWVDYp3yJ8T9y+3Zi4TiiHVmFM4beO+uR4Wt/1JIWOn/pJK2F4BlV5ewuDg== X-Received: by 2002:a17:903:191:b0:1ea:b125:befa with SMTP id d9443c01a7336-1eeb078efddmr21188235ad.55.1715151117636; Tue, 07 May 2024 23:51:57 -0700 (PDT) Received: from a28aa0606c51.. (60-250-192-107.hinet-ip.hinet.net. [60.250.192.107]) by smtp.gmail.com with ESMTPSA id c12-20020a170902d48c00b001e434923462sm11136267plg.50.2024.05.07.23.51.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 23:51:57 -0700 (PDT) From: Jacky Huang <ychuang570808@gmail.com> To: linus.walleij@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, p.zabel@pengutronix.de, j.neuschaefer@gmx.net Cc: linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ychuang3@nuvoton.com, schung@nuvoton.com Subject: [PATCH v8 0/3] Add support for nuvoton ma35d1 pin control Date: Wed, 8 May 2024 06:51:38 +0000 Message-Id: <20240508065141.565848-1-ychuang570808@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-20240507_235201_608418_EDA2A932 X-CRM114-Status: GOOD ( 17.57 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
Add support for nuvoton ma35d1 pin control
|
expand
|
From: Jacky Huang <ychuang3@nuvoton.com> This patch series adds the pin control and GPIO driver for the nuvoton ma35d1 ARMv8 SoC. It includes DT binding documentation and the ma35d1 pin control driver. This pin control driver has been tested on the ma35d1 som board with Linux 6.9.0-rc7. v8: - Update pinctrl driver: - Utilize macros wherever possible for managing register bit fields. - Revise the usage of 'hwirq'. - Transition to fwnode-based operations instead of device_node as possible. - Refactor function ma35_pinctrl_parse_groups(). - Adopt new PM macros. - Implement other minor fixes. - Update dt-binding docuemnt: - Add property 'reg' to this pinctrl node. - Correct the patternProperties name from "pins-" to "-pins" and relocate it under "-grp". v7: - Replace the magic numbers appearing in the driver with defined constants, or provide comments to explain them. - Update the ma35_irq_irqtype() - irq_set_handler_locked(d, handle_edge_irq) and irq_set_handler_locked(d, handle_level_irq) - add case IRQ_TYPE_EDGE_BOTH - Use handle_bad_irq for girq->handler, instead of handle_level_irq v6: - Remove DTS from this patchset. The DTS will be submitted in another patchset. v5: - Update the pinctrl driver header file pinctrl-ma35.h - Include platform_device.h to fix compile issues. v4: - Update the pinctrl driver Kconfig - Add depends to CONFIG_PINCTRL_MA35D1 to prevent compilation errors. - Update the pinctrl driver - Utilize devm_kcalloc() instead of devm_kzalloc(). - Employ ARRAY_SIZE() instead of sizeof()/sizeof(). v3: - Update DTS and YAML files - Corrected the unit address of nodes gpioa ~ gpion. - Removed the invalid "pin-default" node. - Removed the phandle entry from "nuvoton,pins". - Update pinctrl driver - Fixed the Kconfig by using "depend on" instead of "if". - Removed unused #include of header files. - Utilized immutable irq_chip instead of dynamic irq_chip. - Replaced ma35_dt_free_map() with pinconf_generic_dt_free_map(). - Implemented other minor fixes as suggested by the reviewer. v2: - Update nuvoton,ma35d1-pinctrl.yaml - Update the 'nuvoton,pins' to follow the style of rockchip pinctrl approch. - Use power-source to indicate the pin voltage selection which follow the realtek pinctrl approch. - Instead of integer, use drive-strength-microamp to specify the real driving strength capability of IO pins. - Update ma35d1 pinctrl driver - Add I/O drive strength lookup table for translating device tree setting into control register. - Remove ma35d1-pinfunc.h which is unused after update definition of 'nuvoton,pins'. Jacky Huang (3): dt-bindings: reset: Add syscon to nuvoton ma35d1 system-management node dt-bindings: pinctrl: Document nuvoton ma35d1 pin control pinctrl: nuvoton: Add ma35d1 pinctrl and GPIO driver .../pinctrl/nuvoton,ma35d1-pinctrl.yaml | 178 ++ .../bindings/reset/nuvoton,ma35d1-reset.yaml | 3 +- drivers/pinctrl/nuvoton/Kconfig | 19 + drivers/pinctrl/nuvoton/Makefile | 2 + drivers/pinctrl/nuvoton/pinctrl-ma35.c | 1197 +++++++++++ drivers/pinctrl/nuvoton/pinctrl-ma35.h | 52 + drivers/pinctrl/nuvoton/pinctrl-ma35d1.c | 1799 +++++++++++++++++ 7 files changed, 3249 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/pinctrl/nuvoton,ma35d1-pinctrl.yaml create mode 100644 drivers/pinctrl/nuvoton/pinctrl-ma35.c create mode 100644 drivers/pinctrl/nuvoton/pinctrl-ma35.h create mode 100644 drivers/pinctrl/nuvoton/pinctrl-ma35d1.c