Message ID | 20220313232926.1004842-1-linus.walleij@linaro.org |
---|---|
State | New |
Headers | show |
Series | [1/2] dt-bindings: clock: u8500: Add clkout clock bindings | expand |
Quoting Linus Walleij (2022-03-13 16:29:25) > This adds device tree bindings for the externally routed clocks > CLKOUT1 and CLKOUT2 clocks found in the DB8500. > > Cc: Ulf Hansson <ulf.hansson@linaro.org> > Cc: devicetree@vger.kernel.org > Signed-off-by: Linus Walleij <linus.walleij@linaro.org> > --- > .../bindings/clock/stericsson,u8500-clks.yaml | 16 ++++++++++++++++ > include/dt-bindings/clock/ste-db8500-clkout.h | 17 +++++++++++++++++ > 2 files changed, 33 insertions(+) > create mode 100644 include/dt-bindings/clock/ste-db8500-clkout.h > > diff --git a/Documentation/devicetree/bindings/clock/stericsson,u8500-clks.yaml b/Documentation/devicetree/bindings/clock/stericsson,u8500-clks.yaml > index 9bc95a308477..afd049be948a 100644 > --- a/Documentation/devicetree/bindings/clock/stericsson,u8500-clks.yaml > +++ b/Documentation/devicetree/bindings/clock/stericsson,u8500-clks.yaml > @@ -109,6 +109,22 @@ properties: > > additionalProperties: false > > + clkout-clock: > + description: A subnode with three clock cells for externally routed clocks, > + output clocks. These are two PRCMU-internal clocks that can be divided and > + muxed out on the pads of the DB8500 SoC. The first cell indicates which > + output clock we are using, possible values are 0 (CLKOUT1) and 1 (CLKOUT2). > + The second cell indicates which clock we want to use as source, possible > + values are 0 thru 7, see the defines for the different source clocks. > + The third cell is a divider, legal values are 1 thru 63. I suspect the description would be shorter if the properties of this node were described in the binding. > + type: object > + > + properties: > + '#clock-cells': > + const: 3 > + > + additionalProperties: false > + Can you update the example? > required: > - compatible > - reg
diff --git a/Documentation/devicetree/bindings/clock/stericsson,u8500-clks.yaml b/Documentation/devicetree/bindings/clock/stericsson,u8500-clks.yaml index 9bc95a308477..afd049be948a 100644 --- a/Documentation/devicetree/bindings/clock/stericsson,u8500-clks.yaml +++ b/Documentation/devicetree/bindings/clock/stericsson,u8500-clks.yaml @@ -109,6 +109,22 @@ properties: additionalProperties: false + clkout-clock: + description: A subnode with three clock cells for externally routed clocks, + output clocks. These are two PRCMU-internal clocks that can be divided and + muxed out on the pads of the DB8500 SoC. The first cell indicates which + output clock we are using, possible values are 0 (CLKOUT1) and 1 (CLKOUT2). + The second cell indicates which clock we want to use as source, possible + values are 0 thru 7, see the defines for the different source clocks. + The third cell is a divider, legal values are 1 thru 63. + type: object + + properties: + '#clock-cells': + const: 3 + + additionalProperties: false + required: - compatible - reg diff --git a/include/dt-bindings/clock/ste-db8500-clkout.h b/include/dt-bindings/clock/ste-db8500-clkout.h new file mode 100644 index 000000000000..ca07cb2bd1bc --- /dev/null +++ b/include/dt-bindings/clock/ste-db8500-clkout.h @@ -0,0 +1,17 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __STE_CLK_DB8500_CLKOUT_H__ +#define __STE_CLK_DB8500_CLKOUT_H__ + +#define DB8500_CLKOUT_1 0 +#define DB8500_CLKOUT_2 1 + +#define DB8500_CLKOUT_SRC_CLK38M 0 +#define DB8500_CLKOUT_SRC_ACLK 1 +#define DB8500_CLKOUT_SRC_SYSCLK 2 +#define DB8500_CLKOUT_SRC_LCDCLK 3 +#define DB8500_CLKOUT_SRC_SDMMCCLK 4 +#define DB8500_CLKOUT_SRC_TVCLK 5 +#define DB8500_CLKOUT_SRC_TIMCLK 6 +#define DB8500_CLKOUT_SRC_CLK009 7 + +#endif
This adds device tree bindings for the externally routed clocks CLKOUT1 and CLKOUT2 clocks found in the DB8500. Cc: Ulf Hansson <ulf.hansson@linaro.org> Cc: devicetree@vger.kernel.org Signed-off-by: Linus Walleij <linus.walleij@linaro.org> --- .../bindings/clock/stericsson,u8500-clks.yaml | 16 ++++++++++++++++ include/dt-bindings/clock/ste-db8500-clkout.h | 17 +++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 include/dt-bindings/clock/ste-db8500-clkout.h