From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=46.4.11.11 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796413150; b=IfoXIk3OpgS2VNkcddhpmrVHPzLs5f9xeTy66Xrc1sSnG5bWYTZWkPSwBM11B8kb8N9b AtPJWKdOveJDdEYte52EfONfTeOccsflDBn21wtrP5e6Kn6PlUzC4KCt7mvL3X5qaM055 WIu0VSFqM6mhKVx+bmyuPsx0cpzK4KPIWbZfOqaEGEKkTI1SVUSKQPf8recixho0b37vg b6pvnpD7mSB5iCLadz5hZ82ydcP9djOcNwcbf5E2GfQ4lMQA4yZM4buVU9OoGGd+9vq6t VwgFK82MCx5T7+0XwkfCgrBYEMqB8DAQ8cDXUtsrTCJIvyngs44p6fYUT1RGtjh0bVg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796413150; h=DMARC-Filter:Received:From:To:Cc:Subject:Date:Message-Id:X-Mailer: MIME-Version:Content-Transfer-Encoding; bh=xZGspy2+9Tw/KNCyctaqM8nU/aT2VW9y2QxJSMxZrDE=; b=aCnCo5RnGvFGYwuk5SnGKuD+1H8sb+gpvfN6sT/tg5ZY1zW+Xqsf5k7QraZOk/4WSe7V sIFPv6KHOXSlYC/q8miQLFdGcwYELzJsqAvdMyhC9tFPOan0KtM3vAYKTQCpUuJk7QUdS 7C/vSmF8x1u4+j4zBVbo0pVbhFSXKhXHNgqsq0yGkqWh/478ZPCqJOKliQQ2Gc0zpAkfY 3+rcUA8yF5FabFQXseCqjyn06DjG+jiExEozJyI/pZPMHPOO5Kl+J7ev//RX8rr06HR2N UcAcXIGrOV8y0QkEp7ECiTO+hqMnvDevcvOqz1UJcs6WkyL7Toh1rPQzMuMuoCkENwg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=phrozen.org; spf=pass smtp.mailfrom=phrozen.org; arc=none smtp.remote-ip=46.4.11.11 Received: from nbd.name (nbd.name [46.4.11.11]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 99707606A32D; Fri, 4 Dec 2026 19:39:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 99707606A32D Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=phrozen.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=phrozen.org 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-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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