Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/clock/ingenic,cgu.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006 
0007 title: Ingenic SoCs CGU devicetree bindings
0008 
0009 description: |
0010   The CGU in an Ingenic SoC provides all the clocks generated on-chip. It
0011   typically includes a variety of PLLs, multiplexers, dividers & gates in order
0012   to provide many different clock signals derived from only 2 external source
0013   clocks.
0014 
0015 maintainers:
0016   - Paul Cercueil <paul@crapouillou.net>
0017 
0018 select:
0019   properties:
0020     compatible:
0021       contains:
0022         enum:
0023           - ingenic,jz4740-cgu
0024           - ingenic,jz4725b-cgu
0025           - ingenic,jz4760-cgu
0026           - ingenic,jz4760b-cgu
0027           - ingenic,jz4770-cgu
0028           - ingenic,jz4780-cgu
0029           - ingenic,x1000-cgu
0030           - ingenic,x1830-cgu
0031   required:
0032     - compatible
0033 
0034 properties:
0035   $nodename:
0036     pattern: "^clock-controller@[0-9a-f]+$"
0037 
0038   "#address-cells":
0039     const: 1
0040 
0041   "#size-cells":
0042     const: 1
0043 
0044   "#clock-cells":
0045     const: 1
0046 
0047   ranges: true
0048 
0049   compatible:
0050     items:
0051       - enum:
0052           - ingenic,jz4740-cgu
0053           - ingenic,jz4725b-cgu
0054           - ingenic,jz4760-cgu
0055           - ingenic,jz4760b-cgu
0056           - ingenic,jz4770-cgu
0057           - ingenic,jz4780-cgu
0058           - ingenic,x1000-cgu
0059           - ingenic,x1830-cgu
0060       - const: simple-mfd
0061     minItems: 1
0062 
0063   reg:
0064     maxItems: 1
0065 
0066   clocks:
0067     items:
0068       - description: External oscillator clock
0069       - description: Internal 32 kHz RTC clock
0070 
0071   clock-names:
0072     items:
0073       - const: ext
0074       - enum:
0075           - rtc
0076           - osc32k # Different name, same clock
0077 
0078   assigned-clocks:
0079     minItems: 1
0080     maxItems: 64
0081 
0082   assigned-clock-parents:
0083     minItems: 1
0084     maxItems: 64
0085 
0086   assigned-clock-rates:
0087     minItems: 1
0088     maxItems: 64
0089 
0090 required:
0091   - "#clock-cells"
0092   - compatible
0093   - reg
0094   - clocks
0095   - clock-names
0096 
0097 patternProperties:
0098   "^usb-phy@[a-f0-9]+$":
0099     allOf: [ $ref: "../phy/ingenic,phy-usb.yaml#" ]
0100   "^mac-phy-ctrl@[a-f0-9]+$":
0101     allOf: [ $ref: "../net/ingenic,mac.yaml#" ]
0102 
0103 additionalProperties: false
0104 
0105 examples:
0106   - |
0107     #include <dt-bindings/clock/ingenic,jz4770-cgu.h>
0108     cgu: clock-controller@10000000 {
0109       compatible = "ingenic,jz4770-cgu", "simple-mfd";
0110       reg = <0x10000000 0x100>;
0111       #address-cells = <1>;
0112       #size-cells = <1>;
0113       ranges = <0x0 0x10000000 0x100>;
0114 
0115       clocks = <&ext>, <&osc32k>;
0116       clock-names = "ext", "osc32k";
0117 
0118       #clock-cells = <1>;
0119 
0120       otg_phy: usb-phy@3c {
0121         compatible = "ingenic,jz4770-phy";
0122         reg = <0x3c 0x10>;
0123 
0124         clocks = <&cgu JZ4770_CLK_OTG_PHY>;
0125 
0126         vcc-supply = <&ldo5>;
0127 
0128         #phy-cells = <0>;
0129       };
0130     };