Re: [PATCH 08/13] clk: add ARM syscon ICST device tree bindings
On 10/23, Linus Walleij wrote: > On Thu, Oct 15, 2015 at 9:23 PM, Stephen Boyd wrote: > > On 10/15, Linus Walleij wrote: > > >> +Required properties: > >> +- lock-offset: the offset address into the system controller where the > >> + unlocking register is located > >> +- vco-offset: the offset address into the system controller where the > >> + ICST control register is located (even 32 bit address) > > > > Is there any reason why we don't use a reg property for this? > > Usually reg = <> is used with two (or more) tokens: > > reg = ; > > The exception being things like I2C addresses which > are just one token. > > Since in this case, there is a "mother" reg property in the > syscon-compatible node, which we are indexing into, > it is confusing to use the same name for subnodes. > > Also there is a bunch of precedents doing it like this > for sybdevices to system controllers, just > git grep offset Documentation/devicetree/bindings > will give you a bunch of them. > Ok. I'm no DT expert, but it seems odd to have subnodes without a reg property. -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 08/13] clk: add ARM syscon ICST device tree bindings
On Thu, Oct 15, 2015 at 9:23 PM, Stephen Boyd wrote: > On 10/15, Linus Walleij wrote: >> +Required properties: >> +- lock-offset: the offset address into the system controller where the >> + unlocking register is located >> +- vco-offset: the offset address into the system controller where the >> + ICST control register is located (even 32 bit address) > > Is there any reason why we don't use a reg property for this? Usually reg = <> is used with two (or more) tokens: reg = ; The exception being things like I2C addresses which are just one token. Since in this case, there is a "mother" reg property in the syscon-compatible node, which we are indexing into, it is confusing to use the same name for subnodes. Also there is a bunch of precedents doing it like this for sybdevices to system controllers, just git grep offset Documentation/devicetree/bindings will give you a bunch of them. (Fixing the spelling comments.) Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 08/13] clk: add ARM syscon ICST device tree bindings
On 10/15, Linus Walleij wrote: > diff --git a/Documentation/devicetree/bindings/clock/arm-syscon-icst.txt > b/Documentation/devicetree/bindings/clock/arm-syscon-icst.txt > new file mode 100644 > index ..19eb3aa765c7 > --- /dev/null > +++ b/Documentation/devicetree/bindings/clock/arm-syscon-icst.txt > @@ -0,0 +1,40 @@ > +ARM System Controller ICST clocks > + > +The ICS525 and ICS307 oscillators are produced by Integrated Devices > +Technology (IDT). ARM integrated these oscillators deeply into their > +reference designs by adding special control registers that manage such > +oscillators to their system controllers. > + > +The ARM system controller contains logic to serialized and initialize serialize ? > +an ICST clock request after a write to the 32 bit register at an offset > +into the system controller. Further, to even be able to alter one of Furthermore? > +these frequencies, the system controller must first be unlocked by > +writing a special token to another offset in the system controller. Sounds like a great design! > + > +The ICST oscillator must be provided inside a system controller node. > + > +Required properties: > +- lock-offset: the offset address into the system controller where the > + unlocking register is located > +- vco-offset: the offset address into the system controller where the > + ICST control register is located (even 32 bit address) Is there any reason why we don't use a reg property for this? > +- compatible: must be one of "arm,syscon-icst525" or "arm,syscon-icst307" > +- #clock-cells: must be <0> > +- clocks: parent clock, since the ICST needs a parent clock to derive its > + frequency from, this attribute is compulsory. > + > +Example: > + > +syscon: syscon@1000 { > + compatible = "syscon"; > + reg = <0x1000 0x1000>; > + > + oscclk0: osc0@0c { > + compatible = "arm,syscon-icst307"; > + #clock-cells = <0>; > + lock-offset = <0x20>; > + vco-offset = <0x0C>; lowercase the C? > + clocks = <&xtal24mhz>; > + }; > + (...) > +}; -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 08/13] clk: add ARM syscon ICST device tree bindings
This adds the device tree bindings for the ARM Syscon ICST oscillators, which is a register-level interface to the Integrated Device Technology (IDT) ICS525 and ICS307 serially programmable oscillators. Cc: devicetree@vger.kernel.org Cc: Michael Turquette Cc: Stephen Boyd Cc: linux-...@vger.kernel.org Signed-off-by: Linus Walleij --- I'm looking for an ACK from the CLK maintainers to take this through the ARM SoC tree once the series stabilize. --- .../devicetree/bindings/clock/arm-syscon-icst.txt | 40 ++ 1 file changed, 40 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/arm-syscon-icst.txt diff --git a/Documentation/devicetree/bindings/clock/arm-syscon-icst.txt b/Documentation/devicetree/bindings/clock/arm-syscon-icst.txt new file mode 100644 index ..19eb3aa765c7 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/arm-syscon-icst.txt @@ -0,0 +1,40 @@ +ARM System Controller ICST clocks + +The ICS525 and ICS307 oscillators are produced by Integrated Devices +Technology (IDT). ARM integrated these oscillators deeply into their +reference designs by adding special control registers that manage such +oscillators to their system controllers. + +The ARM system controller contains logic to serialized and initialize +an ICST clock request after a write to the 32 bit register at an offset +into the system controller. Further, to even be able to alter one of +these frequencies, the system controller must first be unlocked by +writing a special token to another offset in the system controller. + +The ICST oscillator must be provided inside a system controller node. + +Required properties: +- lock-offset: the offset address into the system controller where the + unlocking register is located +- vco-offset: the offset address into the system controller where the + ICST control register is located (even 32 bit address) +- compatible: must be one of "arm,syscon-icst525" or "arm,syscon-icst307" +- #clock-cells: must be <0> +- clocks: parent clock, since the ICST needs a parent clock to derive its + frequency from, this attribute is compulsory. + +Example: + +syscon: syscon@1000 { + compatible = "syscon"; + reg = <0x1000 0x1000>; + + oscclk0: osc0@0c { + compatible = "arm,syscon-icst307"; + #clock-cells = <0>; + lock-offset = <0x20>; + vco-offset = <0x0C>; + clocks = <&xtal24mhz>; + }; + (...) +}; -- 2.4.3 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html