mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Thomas Bonnefille" <thomas.bonnefille@bootlin.com>
To: "Hiago De Franco" <hfranco@baylibre.com>,
	"Thomas Bonnefille" <thomas.bonnefille@bootlin.com>
Cc: "Uwe Kleine-König" <ukleinek@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Chen Wang" <unicorn_wang@outlook.com>,
	"Inochi Amaoto" <inochiama@gmail.com>,
	"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
	"Miquèl Raynal" <miquel.raynal@bootlin.com>,
	linux-pwm@vger.kernel.org, devicetree@vger.kernel.org,
	sophgo@lists.linux.dev, linux-kernel@vger.kernel.org,
	"Jingbao Qiu" <qiujingbao.dlmu@gmail.com>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski@linaro.org>
Subject: Re: [PATCH v8 0/2] riscv: pwm: sophgo: add pwm support for CV1800
Date: Tue, 27 Oct 2026 18:52:48 +0100	[thread overview]
Message-ID: <DMFT97DWMREU.2S2E4MOTT54I7@bootlin.com> (raw)
In-Reply-To: <auCsaQt0kda01tZ4@hiagonb>

[-- Attachment #1: Type: text/plain, Size: 4719 bytes --]

Hello !

> On Fri, May 09, 2025 at 11:45:42AM +0200, Thomas Bonnefille wrote:
>> The Sophgo CV1800 chip provides a set of four independent
>> PWM channel outputs.
>> This series adds PWM controller support for Sophgo cv1800.
>> 
>> Signed-off-by: Jingbao Qiu <qiujingbao.dlmu@gmail.com>
>> [Thomas since v8]
>> Signed-off-by: Thomas Bonnefille <thomas.bonnefille@bootlin.com>
>
> I see this series is abandoned. I worked on a patch to enable PWM for
> cv1800b reusing pwm-sophgo-sg2042.c driver [1], as Uwe asked.
>
> Is it ok if I take over this patch?
>
> If yes, I will wait v7.4-rc1 and send the new series.

Yes of course go ahead, I already worked on something like this but never
had the time to send it :
https://github.com/Taumille/linux/commits/b4/pwm_sophgo/

Best regards,
Thomas

> [1] https://github.com/hiagofranco/linux/tree/v7.3-milkv-duo-pwm
>
>> ---
>> Changes in v8:
>> - Rewrote supported frequency
>> - Hardcoded HLPERIOD_BASE and PERIDO_BASE
>> - Change usage of update_bits to set/clear bits when needed
>> - Rewrote construct of enablement of PWM
>> - Fixed OE activation
>> - Fixed hw state modification in case where pwm value cannot be reached
>> - Renamed variables
>> - Errors out for new cases
>> - Reworded some comments
>> 
>> v7: https://lore.kernel.org/linux-pwm/20240501083242.773305-1-qiujingbao.dlmu@gmail.com/
>> 
>> Changes in v7:
>> - add detailed Limitations
>> - using BIT(n) instead BIT(0) << n
>> - use 0 instead of disable macro
>> - modify OE judgment criteria
>> - add devm_regmap_init_mmio error message
>> - delete unused variable
>> 
>> v6: https://lore.kernel.org/all/20240406063413.3334639-1-qiujingbao.dlmu@gmail.com/
>> 
>> Changes in v6:
>> - delete the OE function because we plan to use the counter subsystem
>>   instead of capture, so there is no need to reuse this code.
>> - fix set polarity reverse error.
>> 
>> v5: https://lore.kernel.org/all/20240314100131.323540-1-qiujingbao.dlmu@gmail.com/
>> 
>> Changes in v5:
>> - drop filename
>> - fix macro
>> - optimize cv1800_pwm_set_polarity()
>> - optimize cv1800_pwm_set_oe()
>> - add comment for cv1800_pwm_set_oe()
>> - use ticks replace tem
>> - fix duty_cycle larger than period_val
>> - use devm_clk_rate_exclusive_get() replace
>>   clk_rate_exclusive_get()
>> - map linux polarity to register polarity 
>> 
>> v4: https://lore.kernel.org/all/20240304085933.1246964-1-qiujingbao.dlmu@gmail.com/
>> 
>> datasheet Link: https://github.com/milkv-duo/duo-files/blob/main/duo/datasheet/CV1800B-CV1801B-Preliminary-Datasheet-full-en.pdf
>> page 614
>> 
>> Changes in v4:
>> - use macro instead of npwm number
>> - add support for polarity feature
>> - add support for Output-Enable/OE feature
>> 
>> v3: https://lore.kernel.org/all/20240223082014.109385-1-qiujingbao.dlmu@gmail.com/
>> 
>> Changes in v3:
>> - use 0x08 instead of macro
>> - split if statements based on conditions
>> - in order to round up, first calculate the
>>   number of high-level cycles, then subtract
>>   it from the PERIOD to obtain the number of HLPERIOD
>> - use new pwmchip_alloc() API instead of old style
>> 
>> v2: https://lore.kernel.org/all/20240212121729.1086718-1-qiujingbao.dlmu@gmail.com/
>> 
>> Changes in v2:
>> - drop full stop from subject
>> - re-order maintainers and description
>> - pass checkpatch.pl --strict
>> - fix naming errors
>> - add "Limitations" section
>> - use a driver specific prefix for all defines
>> - using bool instead u32 in cv1800_pwm_enable
>> - check and set state->polarity
>> - use mul_u64_u64_div_u64
>> - use clk_rate_exclusive_get(), balance with clk_rate_exclusive_put()
>> - using macro definitions instead of shift operations
>> - remove shift operation on 0
>> - use priv replace cv_pwm
>> - hardcode npwm
>> - set atomic to true
>> - remove MODULE_ALIAS
>> 
>> v1: https://lore.kernel.org/all/20240207055856.672184-1-qiujingbao.dlmu@gmail.com/
>> 
>> ---
>> Jingbao Qiu (2):
>>       dt-bindings: pwm: sophgo: add pwm for Sophgo CV1800 series SoC
>>       pwm: sophgo: add pwm support for Sophgo CV1800 SoC
>> 
>>  .../devicetree/bindings/pwm/sophgo,cv1800-pwm.yaml |  45 ++++
>>  drivers/pwm/Kconfig                                |  10 +
>>  drivers/pwm/Makefile                               |   1 +
>>  drivers/pwm/pwm-cv1800.c                           | 294 +++++++++++++++++++++
>>  4 files changed, 350 insertions(+)
>> ---
>> base-commit: 0af2f6be1b4281385b618cb86ad946eded089ac8
>> change-id: 20250407-pwm_sophgo-5032b3858c27
>> 
>> Best regards,
>> -- 
>> Thomas Bonnefille <thomas.bonnefille@bootlin.com>
>> 
>
> Best regards,



[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

      reply	other threads:[~2026-10-27 17:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-09  9:45 Thomas Bonnefille
2025-05-09  9:45 ` [PATCH v8 1/2] dt-bindings: pwm: sophgo: add pwm for Sophgo CV1800 series SoC Thomas Bonnefille
2025-05-09 16:13   ` Rob Herring
2025-05-09  9:45 ` [PATCH v8 2/2] pwm: sophgo: add pwm support for Sophgo CV1800 SoC Thomas Bonnefille
2025-05-09 12:14 ` [PATCH v8 0/2] riscv: pwm: sophgo: add pwm support for CV1800 Inochi Amaoto
2025-05-26 16:31   ` Uwe Kleine-König
2025-05-26 22:43     ` Inochi Amaoto
2025-06-16 13:05       ` Uwe Kleine-König
2026-10-27 13:57 ` Hiago De Franco
2026-10-27 17:52   ` Thomas Bonnefille [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DMFT97DWMREU.2S2E4MOTT54I7@bootlin.com \
    --to=thomas.bonnefille@bootlin.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=hfranco@baylibre.com \
    --cc=inochiama@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=qiujingbao.dlmu@gmail.com \
    --cc=robh@kernel.org \
    --cc=sophgo@lists.linux.dev \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=ukleinek@kernel.org \
    --cc=unicorn_wang@outlook.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®