From mboxrd@z Thu Jan 1 00:00:00 1970 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 83550C67861 for ; Tue, 9 Apr 2024 09:57:04 +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=I2J0OgtsYT6qa+BcG7Qvb3vRSmtFFY0QXfVpHLcrC6I=; b=OLyayyUwu1T+Bn 5sGHYyvxeijxZ3wZ1c87QyWUSeW2Kio1v8rUriXU4ZSHmPUlX6vrg6VSJTAAmmae1v4OP4s6iX4oz 7Mqht4HrrVsvUYXfZYg6iReL7sbHKkP7/jXlYRVHDFyAcwtnOv+84rZwS5n3cTSW51LBpfdjdyU86 V0RYzo/92wUSPxDBABpN5fxqtsfi96TOeuw7jDaSIYXt4eX8oTC74riBo79EnJW4qLGGKiiAzExm7 DSmL3TvPhWE+h5PNKe2SGUH2cdHA0q1nWiFXqzWBQv3H2XC80Lo32sZEDDW6/tb/wmbOIJS3Oog5d VZlhTeGSn1O4DBE/VTYg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ru8Dh-00000001JBl-3D9H; Tue, 09 Apr 2024 09:56:49 +0000 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ru8De-00000001JAi-1cpD for linux-arm-kernel@lists.infradead.org; Tue, 09 Apr 2024 09:56:47 +0000 Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-1e41f984d34so15869835ad.1 for ; Tue, 09 Apr 2024 02:56:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712656603; x=1713261403; 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=hYDT1gagtsYDBQ7j1Wl4qvL1OaVYrsLw8iRUF0LZZa4=; b=JIDS6lpaiGXu56IdJN/hnx1wpHNJbVCnzjeaxtZLgUGiPmnlNceHrN75YSb1FZuzuU RP3FSnkRwmTbiIPaHrn12YnhgPg77DnBlwQElDIaGFS+gHmWWeDWDE2zeh/Nr7XlB/MT pnT3X+Ror4bQGZnmTR2ja91jsul97nAe4OwOeUlrsl4iy3K4sJXqomqTn1Rg21tfUwBS pnWfRwHwhBsPWJfPsHq44OcSygkHX17FJCEcIJzfW8PbUHftZFVry30irM2StkgiZySQ yj+snoFurJgAsitRuXVZH85qYA0A1X64HruOltc/gTB1HSxxJxVfN9kXZ886oU3e7SWo /fgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712656603; x=1713261403; 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=hYDT1gagtsYDBQ7j1Wl4qvL1OaVYrsLw8iRUF0LZZa4=; b=ES3PhoRGtb5mTksPpx3qf3eT76N0aNr1il3ZMxzSOjF4MtQ5FrKrzCslDmD3kLUxdH ZO6m0zLTJ6YdsbFNcS9F6KGs52shJ5RRHq9DVdmYcyI4gSeggDntiD7TKEo9OuxE3+TP G4tiXUHlqN23R3Rj+1mzqVpfpHrgBWUcDPS8bY8p3uN8t8gry6uwusrfe5/jhVBxK1ib n1x0/5G7wGh5qkAsRfQ7Y4yusjR5HGALAZwcW6iG3YKPRvywEoxXlqohuvTEsC0+d4Kl 1cOHI9NhrMBeHI7k51ilZOMJhsIrXXwNSXhrtVgy854aSP7nrjUFBDX/YrzaKjhaSYtv RyBA== X-Gm-Message-State: AOJu0Yyx/ozmK3hrNdrvX7EmFMeVKLVjrfcVVT0QyLVdEkC1Oa8/ujfW IVKeQIT3DQp5D77L6BmLPd63HZNGQDJymRmrQc2aHD/Vs6RSVzch X-Google-Smtp-Source: AGHT+IGbspmJ4y0DWy0bXoZNhmrveZTGkCJ0U/luzwHbiILv8Pozmxr4Mq8N7vYEE073vwEM59r/Tg== X-Received: by 2002:a17:902:d2d1:b0:1e3:f2d0:1a4d with SMTP id n17-20020a170902d2d100b001e3f2d01a4dmr7381037plc.45.1712656602759; Tue, 09 Apr 2024 02:56:42 -0700 (PDT) Received: from a28aa0606c51.. (60-250-192-107.hinet-ip.hinet.net. [60.250.192.107]) by smtp.gmail.com with ESMTPSA id o17-20020a170902d4d100b001e3f1596baasm5100445plg.298.2024.04.09.02.56.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 02:56:42 -0700 (PDT) From: Jacky Huang 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 v7 0/3] Add support for nuvoton ma35d1 pin control Date: Tue, 9 Apr 2024 09:56:34 +0000 Message-Id: <20240409095637.2135-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-20240409_025646_484780_1CB40E17 X-CRM114-Status: GOOD ( 16.33 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Jacky Huang 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. 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 | 163 ++ .../bindings/reset/nuvoton,ma35d1-reset.yaml | 3 +- drivers/pinctrl/nuvoton/Kconfig | 19 + drivers/pinctrl/nuvoton/Makefile | 2 + drivers/pinctrl/nuvoton/pinctrl-ma35.c | 1233 +++++++++++ drivers/pinctrl/nuvoton/pinctrl-ma35.h | 51 + drivers/pinctrl/nuvoton/pinctrl-ma35d1.c | 1797 +++++++++++++++++ 7 files changed, 3267 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 -- 2.34.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel