From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A7D243DC87A for ; Wed, 3 Jun 2026 15:24:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780500283; cv=none; b=CJuoo2/wCDsJbGxKaUj5dLtis7iC69PYo3s8gCI5SLqZjGZP6j/TcUtjD+J3+5S2gqzyxc6At2NRVRExOSRwrtPWCV3HaOmXVb9dSHTvFIIHfqnQqZJK5ZygPp171K9o1Ox17HIgykHw2CmlBvfFq5ArFn2uMxWrfsUWHnBNzKE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780500283; c=relaxed/simple; bh=pwnLdAL7wp0rmLebUr1pKIcbrTLNSQRBMwWuio2DBUA=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=OelS5tOaTmF7TiQ9AR7MLTLPoe//RPYAC7VFZAWiObDWAUoEL7c9JznCyPW55/QtR79AhP/Y8jItX5S+E6jleAhQnCw+qtUfFAv1tHmOWVqY6RbPb5Gq4ithK7FqDwIoPhmT8zxiSjr4wRmRJw6qjZp3u7jZraPxjBy055SoQMQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=AdLnftGE; arc=none smtp.client-ip=209.85.221.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="AdLnftGE" Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-45ef616daf6so5408945f8f.3 for ; Wed, 03 Jun 2026 08:24:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1780500280; x=1781105080; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=d1fMCVLbIKr90LXf3SjcImREe67/kY5zx03n0vnfB2Y=; b=AdLnftGEO1xCzY4HC3+jrsk73p/0uUDVJ7NTNiBA1Vp9+V503W7EyKWIjN25xrlzfz /Xz7BPqtQgAPjknPDQLfLB+Yt/qNajs2D6Wcfc4GwhhCWfjNy9+93tPnmzI+UMBVT0ri bAcvBfD+8bRKQzR4jZilG47d1fGWMUhWGkU3ev6OSZoPMq+q46M8qi+NRQxb3vukRyBe /rBfwIfK03INgM0imkJmuruS+S9CnWsxcGc9nSuN7sk4NBmZYyJOrrPHBc1A0JXBSxy7 P9DTCwnhEXgflY7seyovCS5+qRn0OTl5eFg01Rs/2CKME8gO9Z9JTWWhbSe2Z/d4gIEw BFbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780500280; x=1781105080; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=d1fMCVLbIKr90LXf3SjcImREe67/kY5zx03n0vnfB2Y=; b=PuubOKdxi+yVftibeb7v7C7ydx8Wp8N4fQWcQzDjo1cO97BFIiNimkUMUMRiwP9hig 0cVoQ70FYs8VsbIfv7zI6PjmFrysJCrYeCgWAXlwoVxZdfncAcUxJzpeeoR9SFEp2KPs RlpSV8td257380AQOeVI124AGEP3/QnAPPRaLyvOa+/t9UVNBpR3cXBbZql/DfBp2wm7 /cwsRNxmHZWZBaXC8IrRm2d4sexttqlaAvhnG5j9K6kMkj28zEeCy8eZh5Zya9/3zgqC b0CUDffGQ4aZGLimAPjij02qq4JDTJwcYfVoRkhLvAqtHp4KZr+4d8Y7jHMLUNyyhIoS sMLQ== X-Forwarded-Encrypted: i=1; AFNElJ/2JIeNDEQ2Yfjfr8vniWz1EvoKynwF7M72+RV3jSwkuHL/2FnWZ5xfRvqbu3diaf5KYwfz/zzUARRRtZ8=@vger.kernel.org X-Gm-Message-State: AOJu0YzivUpRDgirdtvxOLbK5tWmj3p4r5dPuDl4l/keOLhAGPgl89Or ZevSNIziTWyn/XFHxSSCpJXsX/I/HxYe1qAJBloXEvkqCDwKh9lNvU2YYs50Tq/fNqM= X-Gm-Gg: Acq92OHUve0egfxpB/fMovugTQ6fYO1FMwQEEbKeYGyk1bnVoQx30AWx+kmOvMMOFQ3 WyRj1mU7ndBK4Q7WeSdlMg+PbhdehoUizT54YSF+OL8GNqdiu0m+bXCdt16Ueq0sg3YfdiEAhFN acyboac0m+ZBKEoCoBJFHJ6YnIgfUjIOGbzzdzL5+o299btlJrjaBveyZjFZySm1dYt6rYV5J3l 15zz01rDmwkDeg0kSAL9hSUxufUN+xe2pDw+uo/78WtEnm+QCaxSCrf+yZYAaPG3FsLNyaPjTpY YtqZymNhqm4jiBL20PQVxYS4+gY90ufDSsREzxAaFo5ZCIeDDI+QocIzJ5cNixXbb/DHidKXmJC vG/SUK3RXVFxpGLeAhwVKi4zOIg9hHPMMWog2FtjX+GyH44ufczDz9UXvc/e0FHJtaONeSVSVug /YVp3zSZ3l+r5pEcjqhPssEJxtPYOCBVy/2YDNtaKXJDc= X-Received: by 2002:a5d:5710:0:b0:453:e3a1:6580 with SMTP id ffacd0b85a97d-46021844ce7mr4341301f8f.25.1780500280187; Wed, 03 Jun 2026 08:24:40 -0700 (PDT) Received: from localhost ([82.192.120.99]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4601f3444fesm9185525f8f.20.2026.06.03.08.24.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jun 2026 08:24:39 -0700 (PDT) From: Andrea della Porta To: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , linux-pwm@vger.kernel.org, Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , Broadcom internal kernel review list , Andrea della Porta , devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Naushir Patuck , Stanimir Varbanov , mbrugger@suse.com Subject: [PATCH v4 0/3] Add RP1 PWM controller support Date: Wed, 3 Jun 2026 17:27:43 +0200 Message-ID: X-Mailer: git-send-email 2.51.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This patchset adds support for the PWM controller found on the Raspberry Pi RP1 southbridge. This is necessary to operate the cooling fan connected to one of the PWM channels. The tachometer pin for the fan speed is managed by the firmware running on the RP1's M-core. It uses the PHASE2 register to report the RPM, which is then exported by this driver via syscon registers. A subsequent patch will add a new device and driver to read the RPM and export this value via hwmon. Subsequent patches will also add the CPU thermal zone, which acts as a consumer of the PWM device. Best regards, Andrea CHANGES in V4: - s/rp1_pwm/rp1_pwm1/ in the DTS, so adding rp1_pwm0 in the future will be unambiguous - the driver can now be compiled as module. Since it cannot be unloaded (due to syscon registration), substitute builtin_platform_driver for module_platform_driver. - preserved the polarity bit when setting up the channel on rp1_pwm_request() - rp1_pwm_round_waveform_tohw(): capped duty_ticks to be no more than period_ticks, and adjusted offset_ticks accordingly (best effort) - the syscon registration is moved at the end of the probe function, to avoid leaking if the probing bail out prematurely - fixed the erroneous casting about pwm_chip/rp1_pwm struct in suspend/resume functions. Naushir Patuck (2): dt-bindings: pwm: Add Raspberry Pi RP1 PWM controller pwm: rp1: Add RP1 PWM controller driver Stanimir Varbanov (1): arm64: dts: broadcom: rpi-5: Add RP1 PWM node .../bindings/pwm/raspberrypi,rp1-pwm.yaml | 54 +++ .../boot/dts/broadcom/bcm2712-rpi-5-b.dts | 12 + arch/arm64/boot/dts/broadcom/rp1-common.dtsi | 9 + drivers/pwm/Kconfig | 9 + drivers/pwm/Makefile | 1 + drivers/pwm/pwm-rp1.c | 422 ++++++++++++++++++ 6 files changed, 507 insertions(+) create mode 100644 Documentation/devicetree/bindings/pwm/raspberrypi,rp1-pwm.yaml create mode 100644 drivers/pwm/pwm-rp1.c -- 2.35.3