From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 81FDB606A332 for ; Fri, 4 Dec 2026 19:39:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=R22kA1Sk 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-Unsubscribe-Post:List-Owner; bh=xZGspy2+9Tw/KNCyctaqM8nU/aT2VW9y2QxJSMxZrDE=; b=R22kA1Sknk6MG+d6DakLQHGcLi h1j2xFaMZafZT1ijLTUjEDAvOmpABJ/Gl/ip/H5b0SL6Vgv6E1fPumEZLrAewBOfsbUMFRbkv0BKz wlQjp3f9nsOEV8S12uVdhzAhk1Uq7ANU/WD8uOU8wuJECyo/pcrJ/aXHXBkTk8/2RsOKlMbAf96b9 v86gMdFvtlhr0lyFrpW4HBihr6hUJP6k4ITrN83iA2/IFUtdBFKyqAYlULrBuaWonB5OJlFIl2i9p qbvIX45IqAfiEwImk1d3z34R1vbKUciAW6XD5JphWVnTy5XzxeQnW16St3UPd1wcz1DRrs/5Ivchk FNaNiJdA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZZ8J-00000001JtI-2e3e; Fri, 04 Dec 2026 19:39:52 +0000 Received: from nbd.name ([46.4.11.11]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZZ7h-00000001Jkw-1koV for linux-mediatek@lists.infradead.org; Fri, 04 Dec 2026 19:39:36 +0000 Received: from [2a04:4540:1400:b6fc:7b90:6b35:724f:c910] (helo=bertha10..) by ds12 with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1xZZ7X-00Cjpq-3D; Fri, 04 Dec 2026 20:39:04 +0100 From: John Crispin To: Lorenzo Bianconi , Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Cc: Christian Marangi , devicetree@vger.kernel.org, lei.dong@airoha.com, Linqi.zhang@airoha.com, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-pwm@vger.kernel.org, mfd@lists.linux.dev, Rajeev.kumar@airoha.com, upstream@airoha.com, Weifeng.xu@airoha.com, zhengping.zhang@airoha.com Subject: [PATCH v2 0/3] pwm: airoha: add AN7589 support Date: Fri, 4 Dec 2026 20:38:54 +0100 Message-Id: <20261204193857.3801624-1-john@phrozen.org> X-Mailer: git-send-email 2.34.1 X-Archived-By: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261204_113914_559240_B4AD5688 X-CRM114-Status: GOOD ( 12.23 ) X-Spam-Score: -1.9 (-) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 The AN7589 PWM block is the EN7581 one with three differences: the flash set-id of a channel is 4 bits wide instead of 3, the channel enable moved into a register of its own with one bit per channel, and it has the 16 GPIO channels only. The PWM controller lives in the GPIO system controller next to the pin controller. It has no resources of its own, so following Conor's comment on the pinctrl binding [1] it gets no child node and the system controller node itself carries #pwm-cells. Patch 1 adds #pwm-cells to the system controller binding. Patch 2 adds a small MFD driver that registers the PWM controller as a cell, and patch 3 teaches the PWM driver the AN7589 layout and lets it probe as that cell. Based on next-20261201, which has the AN7589 pinctrl series and with it the GPIO system controller binding. [1] https://lore.kernel.org/r/20261117-illicitly-translate-2d16b1279df9@spud Changes in v2: - Patch 2: drop (Uwe). - Patch 3: describe the enable bits of both SoCs with a register, the bit of channel 0 and the distance between two channels, so the lookup has no condition (Uwe). - Patch 3: add EN7581_PWM_NUM_CHANNELS (Uwe). - Patch 3: say in the commit message why the PWM chip uses the node of its parent and what the id_table changes for the name match (Uwe). - Patch 1 is unchanged. - Link to v1: https://lore.kernel.org/r/20261201194434.3132187-1-john@phrozen.org John Crispin (3): dt-bindings: mfd: airoha: add #pwm-cells to AN7589 gpio-sysctl mfd: add Airoha GPIO system controller driver pwm: airoha: add support for AN7589 .../mfd/airoha,an7589-gpio-sysctl.yaml | 6 +- MAINTAINERS | 1 + drivers/mfd/Kconfig | 11 ++ drivers/mfd/Makefile | 1 + drivers/mfd/airoha-gpio-sysctl.c | 42 +++++++ drivers/pwm/pwm-airoha.c | 116 +++++++++++++++--- 6 files changed, 162 insertions(+), 15 deletions(-) create mode 100644 drivers/mfd/airoha-gpio-sysctl.c base-commit: d138596e9f822033490b2e577ec2ea64f2aa246c -- 2.34.1