From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=52.101.95.136 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796156499; b=jpOhRNqlbiMSbMdos+IgGH19Gn9J2i82eksjlB4yoMoDqKQSgUx7RdtICm2JkHo62wjY YRDOHdp0qJMdxnl5vRAAGS7nJpY1yXhgWb1LwQtyCMyy7PATi73uo0x2mZSrsCsDjcvDO /tG/LKuSHC6ThZASjtvmEQYOhv2yiLy7WVCE9sXf0FypBC40HKED2dG4BcH+/EEh+7Ukw dRRyn0Kv2JznuOKQB9LycDbyzvUviumnFOMVfCfU+a8BC0AJj4BTffvy+S8smVfpVbYOa t1s60ca/chpWIaJut8wMoqlCKXx0u8r4L6sbPKzJVxmxwQzb6/eHM0Zr1tMcdRc78YQ== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796156499; h=DMARC-Filter:DKIM-Signature:Received:Received: Content-Transfer-Encoding:Content-Type:Date:Message-Id:Cc:Subject: From:To:X-Mailer:References:In-Reply-To:X-ClientProxiedBy: MIME-Version:X-MS-PublicTrafficType:X-MS-TrafficTypeDiagnostic: X-MS-Office365-Filtering-Correlation-Id:X-MS-Exchange-SenderADCheck: X-MS-Exchange-AntiSpam-Relay:X-Microsoft-Antispam: X-Microsoft-Antispam-Message-Info:X-Forefront-Antispam-Report: X-MS-Exchange-AntiSpam-MessageData-ChunkCount: X-MS-Exchange-AntiSpam-MessageData-0:X-OriginatorOrg: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-AuthSource:X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-OriginalArrivalTime: X-MS-Exchange-CrossTenant-FromEntityHeader: X-MS-Exchange-CrossTenant-Id:X-MS-Exchange-CrossTenant-MailboxType: X-MS-Exchange-CrossTenant-UserPrincipalName: X-MS-Exchange-Transport-CrossTenantHeadersStamped; bh=0pW1OikpK4nz7Dvg4r3KeRjYRB06EBCwX6yiy15ftnA=; b=svcT//eEhXRQD+KAJPGjuPaSc0+WapFxZ1oXSY//GmSD/3vmsfqkHz4QOnjMLQT169N4 OGLwmWs0841MdcUgvsxZgXtqFOx5jDx0zPSLfeehx2k+coqaKpDI5oFvpENwWc6AIfaTM Ul+LbYBRbCrwNjXjYQ5V6/pVZta5uosa2XiFHne8xWE16zVHzDhiL9F0g5mQjOyfxYQrU bVLHb2zloKxujQ/Pt/kxE5mCHJ9CkoXIDEPuJVdibsbKpO28MvUA2NXoDBunXQVwAvIl5 2olyvNfrUW2wC1phF2qJ5bdR+WfVvmZoyxz2T9RPlkepe4q2s0QVgnJdx6AwawfEVVw== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass header.from=garyguo.net; spf=pass smtp.mailfrom=garyguo.net; dkim=pass header.d=garyguo.net header.i=@garyguo.net header.a=rsa-sha256 header.s=selector1 header.b=qrRlGd6l; arc=pass header.oldest-pass=0 smtp.remote-ip=52.101.95.136 Received: from LO2P265CU024.outbound.protection.outlook.com (mail-uksouthazon11021136.outbound.protection.outlook.com [52.101.95.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (secp384r1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0777C606A31A; Tue, 1 Dec 2026 20:21:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 0777C606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=garyguo.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=garyguo.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=garyguo.net header.i=@garyguo.net header.a=rsa-sha256 header.s=selector1 header.b=qrRlGd6l ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=qCczX5tjG9i/vuulVzP6jM4QQXEsv4VohIwRMC/ioqBa7ppshUay0nUEUGe8YXa4dgD+pvGpoCWW9W9gXid43f+a5h2yYMsXvJRjBL+52eKZgchxE4PRrMvLd4et8jnmAvmL69HZEo09ivmkWroc1GFfeRUKqyXXNTqRHmJhCm7NPvfWR0g/QsgKCELFyqp4dWOtibVxP2Du12xv9Wo8qy4rBdGwoQ4Mg/8ZU/Lrv1kqyah4UsohMZ9kOF/Gp0CYUfZBjsCI1cZudfY4qdRFYbBwjwMhSDVQttRffBCJlbF9CASJGnPz4izKV5uGy7hJcepUwrnfLcsmddsXtv5MqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0pW1OikpK4nz7Dvg4r3KeRjYRB06EBCwX6yiy15ftnA=; b=l9Ej4eOR1L9Lzxr/PGRkm03o6MzOyRvoXaqsy+NtAO+g2fwpxJ1m9k8TkroSi8xtkkRwPi7G/n/0+G/JqxFpwGsuilxBA6V4sCe0fRXjuoN2rtssl1cNxwZLy3sm1NMQtoAfSsPmB/Tn9Ser8WQ2js3dCIBjipCpTH7jZ9SxttTi4iG/Gtx39QpeLmjsO5AU75U1xfq7CFP8XM5MxtUPpOGuAUdKM11imMF8RcoebVUctL1JQUpYA2HrhSm+CJMHce9fZ9VZO1oQBxjmWk23/SpDC9ulsrqjJ5W/NHwVdT8I1Cu6JP33vlfbdqnBb8plvxsgXS6URcND/s6xLCc8rA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=garyguo.net; dmarc=pass action=none header.from=garyguo.net; dkim=pass header.d=garyguo.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=garyguo.net; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0pW1OikpK4nz7Dvg4r3KeRjYRB06EBCwX6yiy15ftnA=; b=qrRlGd6lpGN1wTUN5MZIoz6Grqybvxu1Qba7Zs4F/Z3fZ1vaap64fmfUbgHAhmMJbl9/UX5HrIwNu+qxAHpQDEewgNAS/rCHUN6ZW98noVK04Kqpq7TgXjC1f7xiqgN7ofi+8K89OQwwV5IOTmdQZsIKw5CohiirS+lrnUT2dUM= Authentication-Results: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=garyguo.net; Received: from CWLP265MB6051.GBRP265.PROD.OUTLOOK.COM (2603:10a6:400:1cb::9) by LO0P265MB684263.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a00::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.688.10; Tue, 1 Dec 2026 20:21:35 +0000 Received: from CWLP265MB6051.GBRP265.PROD.OUTLOOK.COM ([fe80::55f6:f98b:7fad:c6e3]) by CWLP265MB6051.GBRP265.PROD.OUTLOOK.COM ([fe80::55f6:f98b:7fad:c6e3%2]) with mapi id 15.21.0662.012; Tue, 1 Dec 2026 20:21:35 +0000 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 01 Dec 2026 20:21:34 +0000 Message-Id: Cc: , , , , , Subject: Re: [PATCH v14 0/3] Add RP1 PWM controller support From: "Gary Guo" To: "Andrea della Porta" , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , , , , , , , , , , , , X-Mailer: aerc 0.22.0 References: <20261125162453.23573-1-andrea.porta@suse.com> In-Reply-To: <20261125162453.23573-1-andrea.porta@suse.com> X-ClientProxiedBy: LO4P265CA0082.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2bd::15) To CWLP265MB6051.GBRP265.PROD.OUTLOOK.COM (2603:10a6:400:1cb::9) X-Mailing-List: linux-pwm@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CWLP265MB6051:EE_|LO0P265MB684263:EE_ X-MS-Office365-Filtering-Correlation-Id: 3d78fbb3-e6c0-4c84-85cc-08df4fe8b253 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|23010399003|1800799024|376014|7416014|5023799004|261009223027099003|22082099003|18002099003|3023799007|921020|56012099006|10067099003|261102130727099003|261021121427099003|261021123027099003|261102123227099003|261028144727099003|261022105027099003|261026121527099003|261022075727099003|261026140227099003; X-Microsoft-Antispam-Message-Info: TBf9CXDuok+T5N0MpbcZHR0+r4ABuX8fp2G0QanLVXjywqUZEAgtkSFTUB5Hba3LlNhXlWxA4KPNm/L2uBjk+NAkqqo096pAVl5XRKgE0HBumATZOWyX6vgLRCLnY6mpziDoV3l45S8yR4QR428keYIzetpeXFW4QW/Sk+w4XMQvlqcUTrxgg8fC2M14b9Q088Xs5qEt1CWVkBH/kvxcvqXNemoAuaMULpVaV3CdEvqJnn8Wmr338KEoPQ6V1J46PGQA7061pTBLPI6HrOiBvaX5xUBcTizVTKQxX447GnMZqL/ohtAnCyBXRHnKk5tuLYzes+Dl8YNgw7iOh9vXZX9aeSUsANRwBwS50OX94TOfoj/eQM8xDUuHcoVIKlANEif1EKMYQgf0UCIxlfJ23pw5EUAYZGNpsEgH11S8bris8BDTuJb8ul9/Q83tIn65LiuHk6WmAkwPbykGA2uYaiVHmxdW5+BUVmnpTh5avw9cSPr69sQVXJXBSAdVWe7Q9bWPNNw5UI/7dQZsRLXhy3T9wP8GKx/8TWiqUKNzjisyQoiQisEQym8Zceppwcy/JltMS84JgMmtuOKrF86H4n1z/JsRrL1bjOzN1kC3V8rMLaQJqUWILV4UA+DFkwos13aIHatF1gO0nvysh54F49nIbil7sahUP3YHn5PB5DQ= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CWLP265MB6051.GBRP265.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230040)(366016)(23010399003)(1800799024)(376014)(7416014)(5023799004)(261009223027099003)(22082099003)(18002099003)(3023799007)(921020)(56012099006)(10067099003)(261102130727099003)(261021121427099003)(261021123027099003)(261102123227099003)(261028144727099003)(261022105027099003)(261026121527099003)(261022075727099003)(261026140227099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?NmlDaTR6eFo3d1pGZ0ZoWUNnZ2ZmRkVad2tocERlbW84L1RpVWwyNTQyeHdE?= =?utf-8?B?RUVtM1crNHlaWFk5T0d5UVlrM2dxTEVLS21CZ0xiU3dEUDN2VEw1aHFsZE9W?= =?utf-8?B?SlJwTk92UnZ5TjVreXJpZWQ0d04vRlJLdTNVUUtpTERrMTQ4RG9HR2dvVFpR?= =?utf-8?B?dDBxRU8ybnQxUThrQ1dFZjNCZkFlTEJIdjg0djV6TGZ2Vk1FYjBjcVdETDdy?= =?utf-8?B?cDFVckJUQm1tQkFmY21PS3JYZzBVMENVK210U1kySVg2eEhFa3c3RzhNUzBj?= =?utf-8?B?OU40RFVrTjN2ZytxYnE1SklJaFRvK0NKVU5mTFNFaVd4WTNZbFE5b2xvSHFv?= =?utf-8?B?dzV2UFgzd3U5M3FTTWFka3NXZ2kvajBmZE5WSDR3cmhpOVdiK0JCYzJGM1Ry?= =?utf-8?B?S1RVVlNEby9aRXJ3TzNqcjI0YkpMOEVhYmRWODEwUzJtRjRna3c2U1FuOExJ?= =?utf-8?B?cnpPVy9STjRmaElLSGVyNWcvRHBnKzZhNEhwM1BYSlY3RjV0Tzc2NDRGYjdu?= =?utf-8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-Exchange-CrossTenant-Network-Message-Id: 3d78fbb3-e6c0-4c84-85cc-08df4fe8b253 X-MS-Exchange-CrossTenant-AuthSource: CWLP265MB6051.GBRP265.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Dec 2026 20:21:35.4035 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bbc898ad-b10f-4e10-8552-d9377b823d45 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: zPIIjwnYVm47ak3xFOBW92gLaBgb/Vgx4uKZxEr1EqlkpvBsttpBqGZzmCFkOx+kRA8tPMoaUiy/hTXhIh37tQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: LO0P265MB684263 On Wed Nov 25, 2026 at 4:24 PM GMT, Andrea della Porta wrote: > Hi, > > This patchset adds support for the PWM controller found in the > Raspberry Pi RP1 southbridge, used on the Raspberry Pi 5 to drive the > cooling fan. > > Since v13, the driver also registers a "fan" auxiliary device > (pwm_rp1.fan.). On the Raspberry Pi 5 the RP1 firmware measures the > fan tachometer pulses and writes the RPM value in the phase register of > PWM channel 2; the companion hwmon driver, sent as a separate series to > the hwmon list, binds to that auxiliary device and reads the value > through rp1_pwm_read_tachometer(), exported in the 'RP1_PWM' symbol > namespace. This is the approach agreed in [1], and it removes the need > for any dedicated DT node or binding for the fan. > > The DTS node for the controller is already in v7.4-rc1 [2]. The DT bindin= g > has been applied by Rob [3] for consistency to v7.4 and is part of v7.4-r= c2: as > a consequence, patch 1 is included only to make this series apply 'logica= lly' > on top of v7.4-rc1 and can be dropped when rebasing. > > Changes in v14: > - rp1_pwm_round_waveform_fromhw(): fixed a u32 overflow in the duty_offse= t > computation when the period register holds U32_MAX, and return a zeroed > duty_length/duty_offset when the inverted output is constantly low, > instead of a duty_offset equal to the period, which is rejected by > pwm_wf_valid() (reported by Sashiko AI review [4]). > > Changes in v13: > - dropped the DTS patch, already merged. > - add patch 3, registering the auxiliary device for the fan tachometer > and exporting the accessor used by the hwmon auxiliary driver. The > exported function was originally part of the fan patchset. Since it > is really part of the pwm driver to be taken by Uwe, I moved it in > this patchset. > - Kconfig: pwm module now depends on AUXILIARY_BUS. > - added a macro to define the phase channel number from which to read > the fan speed. > - removed the 'Tested-by' tag from Gary (see V12) since the patchset > has been significally changed and need to be tested again. > - the controller private data is passed to the auxiliary device as > platform data, so the exported accessor no longer depends on how the > parent platform device stores its driver data. > - dropped the unused 'pwm' argument from rp1_pwm_apply_config(). > - added a MAINTAINERS entry for the driver, its DT binding and header. > > [1] - https://lore.kernel.org/all/ae9a4df9-b1f2-4f00-ab86-d9cf8d9bc387@ro= eck-us.net/ > [2] - https://lore.kernel.org/all/7c437a10-985b-402c-b3ac-cfa97c53d014@br= oadcom.com/ > [3] - https://lore.kernel.org/all/20261102192302.GA882027-robh@kernel.org= / > [4] - https://lore.kernel.org/all/sashiko-outbox-231741@kernel.org/ > > Thanks, > Andrea > > This version has been prepared with the help of an AI coding assistant > (Claude Opus 5.5). > > Andrea della Porta (1): > pwm: rp1: Register auxiliary device for the fan tachometer > > Naushir Patuck (2): > dt-bindings: pwm: Add Raspberry Pi RP1 PWM controller > pwm: rp1: Add RP1 PWM controller driver Reviewed-by: Gary Guo Tested-by: Gary Guo Best, Gary > > .../bindings/pwm/raspberrypi,rp1-pwm.yaml | 66 +++ > MAINTAINERS | 8 + > drivers/pwm/Kconfig | 12 + > drivers/pwm/Makefile | 1 + > drivers/pwm/pwm-rp1.c | 477 ++++++++++++++++++ > include/soc/bcm2835/raspberrypi-pwm-rp1.h | 12 + > 6 files changed, 576 insertions(+) > create mode 100644 Documentation/devicetree/bindings/pwm/raspberrypi,rp1= -pwm.yaml > create mode 100644 drivers/pwm/pwm-rp1.c > create mode 100644 include/soc/bcm2835/raspberrypi-pwm-rp1.h > > > base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4