[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <47025bea.10ca.19b02a06c69.Coremail.dongxuyang@eswincomputing.com>
Date: Tue, 9 Dec 2025 18:20:26 +0800 (GMT+08:00)
From: "Xuyang Dong" <dongxuyang@...incomputing.com>
To: "Krzysztof Kozlowski" <krzk@...nel.org>, ben.dooks@...ethink.co.uk
Cc: ukleinek@...nel.org, robh@...nel.org, krzk+dt@...nel.org,
conor+dt@...nel.org, p.zabel@...gutronix.de,
linux-pwm@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, ningyu@...incomputing.com,
linmin@...incomputing.com, xuxiang@...incomputing.com,
wangguosheng@...incomputing.com, pinkesh.vaghela@...fochips.com
Subject: Re: Re: [PATCH 1/2] dt-bindings: pwm: eswin: Add EIC7700 pwm
controller
> > diff --git a/Documentation/devicetree/bindings/pwm/eswin,eic7700-pwm.yaml b/Documentation/devicetree/bindings/pwm/eswin,eic7700-pwm.yaml
> > new file mode 100644
> > index 000000000000..8b7dc7d4dffe
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/pwm/eswin,eic7700-pwm.yaml
> > @@ -0,0 +1,73 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/pwm/eswin,eic7700-pwm.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: ESWIN EIC7700 PWM controller
> > +
> > +maintainers:
> > + - Xiang Xu <xuxiang@...incomputing.com>
> > + - Guosheng Wang <wangguosheng@...incomputing.com>
> > + - Xuyang Dong <dongxuyang@...incomputing.com>
> > +
> > +description: |
>
> Do not need '|' unless you need to preserve formatting.
>
> > + The EIC7700 PWM used the DesignWare APB timers module. The PWM driver
> > + supports a duty cycle range from 0% to 100%, with explicit support for
>
> Driver is irrelevant here. Describe hardware.
>
> > + both 0% and 100% duty cycles.
> > +
> > +allOf:
> > + - $ref: pwm.yaml#
> > +
> > +properties:
> > + compatible:
> > + const: eswin,eic7700-pwm
> > +
> > + reg:
> > + maxItems: 1
> > +
> > + clocks:
> > + maxItems: 1
> > +
> > + resets:
> > + maxItems: 1
> > +
> > + "#pwm-cells":
> > + const: 3
> > +
> > + pinctrl-0: true
> > + pinctrl-1: true
> > +
> > + pinctrl-names:
> > + minItems: 1
> > + items:
> > + - const: default
> > + - const: sleep
> > +
> > + snps,pwm-full-range-enable:
>
> 1. Wrong vendor prefix, thats eswin, not snps.
> 2. Why is this a hardware property? I really do not see that. You
> described the desired Linux feature or behavior, not the actual
> hardware. The bindings are about the latter, so instead you need to
> rephrase the property and its description to match actual hardware
> capabilities/features/configuration etc.
>
Hi Krzysztof and Ben,
There is a patch [1] submmitted by Ben Dook a few years ago. The
intention of this patch is to make DWC pwm controller can be used as
platform driver. This is what we are currently working on.
It seems that it would be more reasonable to continue improving this
patch and make the DWC PWM driver universal, rather than creating a
separate ESWIN PWM driver.
The DWC pwm 2.13a version supports "Pulse Width Modulation with 0% and
100% Duty Cycle" by programming TIMER_0N100PWM_EN bit field. We also
want to support this new hardware feature. So, adding a new property,
like snps,timer-0n100pwm-en, in pwm/snps,dw-apb-timers-pwm2.yaml
would be better?
Krzysztof and Ben, do you think the above approach is reasonable and acceptable?
[1] https://lore.kernel.org/lkml/20230907161242.67190-7-ben.dooks@codethink.co.uk/
Regards,
Xuyang Dong
Powered by blists - more mailing lists