pwm: sirf: add dt-binding document
Subsystems (2)
PATCH v4 2/4 pwm: sirf: add dt-binding document
From: Barry Song <[email protected]>
this patch adds dt-binding document for pwm-sirf. here the controller clock can't generate PWM signals, so we need seperate clock as signal source.
--- Documentation/devicetree/bindings/pwm/pwm-sirf.txt | 23 ++++++++++++++++++++ 1 files changed, 23 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/pwm/pwm-sirf.txt
Documentation/devicetree/bindings/pwm/pwm-sirf.txt new file +23 -0
@@ -0,0 +1,23 @@ +SiRF prima2 & atlas6 PWM drivers + +Required properties: +- compatible: "sirf,prima2-pwm" +- reg: physical base address and length of the controller's registers +- #pwm-cells: should be 2. The first cell specifies the per-chip index of the + PWM to use and the second cell is the period in nanoseconds. +- clocks: from common clock binding: the 1st clock is for PWM controller the + other clocks are the sources to generate PWM signals +- clock-names : The first one is the name of the clock for PWM, others are names + of clock sources to generate PWM signal, e.g.sigsrc0 ~sigsrc4. For prima2 and + atlas6, sigsrc0 is OSC with 26MHz, sigsrc3 is RTC with 32KHz, others are PLLs. + Generally, PWM module uses the OSC as clock source to generate PWM signals. + + +Example: +pwm: pwm at b0130000 { + compatible = "sirf,prima2-pwm"; + #pwm-cells = <2>; + reg = <0xb0130000 0x10000>; + clocks = <&clks 21>, <&clks 1>; + clock-names = "pwmc", "sigsrc0""; +};
Signature · 1 line
1.7.5.4
PATCH v4 2/4 pwm: sirf: add dt-binding document
Quoted 4 lines · Barry Song
From: Barry Song <[email protected]>
this patch adds dt-binding document for pwm-sirf. here the controller clock can't generate PWM signals, so we need seperate clock as signal source.
Please capitalize properly. Also since the binding document should be OS agnostic, it shouldn't be using the name of the driver in the Linux kernel.
Documentation/devicetree/bindings/pwm/pwm-sirf.txt line 7
Quoted 13 lines
Documentation/devicetree/bindings/pwm/pwm-sirf.txt new file +7
-0@@ -0,0 +1,23 @@ +SiRF prima2 & atlas6 PWM drivers + +Required properties: +- compatible: "sirf,prima2-pwm" +- reg: physical base address and length of the controller's registers +- #pwm-cells: should be 2. The first cell specifies the per-chip index of the + PWM to use and the second cell is the period in nanoseconds.
The canonical way to describe this property is:
- #pwm-cells: Should be 2. See pwm.txt in this directory for a description of the cells format.
Documentation/devicetree/bindings/pwm/pwm-sirf.txt line 13
Quoted 6 lines
Documentation/devicetree/bindings/pwm/pwm-sirf.txt new file +6
-0+- clocks: from common clock binding: the 1st clock is for PWM controller the + other clocks are the sources to generate PWM signals +- clock-names : The first one is the name of the clock for PWM, others are names + of clock sources to generate PWM signal, e.g.sigsrc0 ~sigsrc4. For prima2 and + atlas6, sigsrc0 is OSC with 26MHz, sigsrc3 is RTC with 32KHz, others are PLLs. + Generally, PWM module uses the OSC as clock source to generate PWM signals.
I think a more common way to write this is:
- clocks: Must contain an entry for each entry in clock-names. See ../clocks/clock-bindings.txt for details.
- clock-names: Must include the following entries:
- pwmc: PWM controller clock
- sigsrc0: source clock for ???
- ...
- sigsrc4: source clock for ???
And perhaps given the requirements on prima2 and atlas6 (are those SoC generations or boards?) specify what each clock should be set to.
If prima2 and atlas6 are boards, then the binding shouldn't mention them at all.
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140318/1732fcb9/attachment.sig>
PATCH v4 2/4 pwm: sirf: add dt-binding document
2014-03-19 5:13 GMT+08:00 Thierry Reding <[email protected]>:
Quoted 46 lines · Barry Song
Quoted 4 lines
From: Barry Song <[email protected]>
this patch adds dt-binding document for pwm-sirf. here the controller clock can't generate PWM signals, so we need seperate clock as signal source.
Please capitalize properly. Also since the binding document should be OS agnostic, it shouldn't be using the name of the driver in the Linux kernel.
Documentation/devicetree/bindings/pwm/pwm-sirf.txt line 7
Quoted 13 lines
Documentation/devicetree/bindings/pwm/pwm-sirf.txt new file +7
-0@@ -0,0 +1,23 @@ +SiRF prima2 & atlas6 PWM drivers + +Required properties: +- compatible: "sirf,prima2-pwm" +- reg: physical base address and length of the controller's registers +- #pwm-cells: should be 2. The first cell specifies the per-chip index of the + PWM to use and the second cell is the period in nanoseconds.The canonical way to describe this property is:
- #pwm-cells: Should be 2. See pwm.txt in this directory for a description of the cells format.
Documentation/devicetree/bindings/pwm/pwm-sirf.txt line 13
Quoted 6 lines
Documentation/devicetree/bindings/pwm/pwm-sirf.txt new file +6
-0+- clocks: from common clock binding: the 1st clock is for PWM controller the + other clocks are the sources to generate PWM signals +- clock-names : The first one is the name of the clock for PWM, others are names + of clock sources to generate PWM signal, e.g.sigsrc0 ~sigsrc4. For prima2 and + atlas6, sigsrc0 is OSC with 26MHz, sigsrc3 is RTC with 32KHz, others are PLLs. + Generally, PWM module uses the OSC as clock source to generate PWM signals.I think a more common way to write this is:
- clocks: Must contain an entry for each entry in clock-names. See
../clocks/clock-bindings.txtfor details.
- clock-names: Must include the following entries:
- pwmc: PWM controller clock
- sigsrc0: source clock for ???
- ...
- sigsrc4: source clock for ???
Quoted 5 lines
And perhaps given the requirements on prima2 and atlas6 (are those SoC generations or boards?) specify what each clock should be set to.
If prima2 and atlas6 are boards, then the binding shouldn't mention them at all.
prima2 and atlas6 are SoCs not boards.
Quoted 2 lines
Thierry
-barry