162306a36Sopenharmony_ci# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
262306a36Sopenharmony_ci%YAML 1.2
362306a36Sopenharmony_ci---
462306a36Sopenharmony_ci$id: http://devicetree.org/schemas/clock/renesas,5p35023.yaml#
562306a36Sopenharmony_ci$schema: http://devicetree.org/meta-schemas/core.yaml#
662306a36Sopenharmony_ci
762306a36Sopenharmony_cititle: Renesas 5p35023 VersaClock 3 programmable I2C clock generator
862306a36Sopenharmony_ci
962306a36Sopenharmony_cimaintainers:
1062306a36Sopenharmony_ci  - Biju Das <biju.das.jz@bp.renesas.com>
1162306a36Sopenharmony_ci
1262306a36Sopenharmony_cidescription: |
1362306a36Sopenharmony_ci  The 5P35023 is a VersaClock programmable clock generator and
1462306a36Sopenharmony_ci  is designed for low-power, consumer, and high-performance PCI
1562306a36Sopenharmony_ci  express applications. The 5P35023 device is a three PLL
1662306a36Sopenharmony_ci  architecture design, and each PLL is individually programmable
1762306a36Sopenharmony_ci  and allowing for up to 6 unique frequency outputs.
1862306a36Sopenharmony_ci
1962306a36Sopenharmony_ci  An internal OTP memory allows the user to store the configuration
2062306a36Sopenharmony_ci  in the device. After power up, the user can change the device register
2162306a36Sopenharmony_ci  settings through the I2C interface when I2C mode is selected.
2262306a36Sopenharmony_ci
2362306a36Sopenharmony_ci  The driver can read a full register map from the DT, and will use that
2462306a36Sopenharmony_ci  register map to initialize the attached part (via I2C) when the system
2562306a36Sopenharmony_ci  boots. Any configuration not supported by the common clock framework
2662306a36Sopenharmony_ci  must be done via the full register map, including optimized settings.
2762306a36Sopenharmony_ci
2862306a36Sopenharmony_ci  Link to datasheet:
2962306a36Sopenharmony_ci  https://www.renesas.com/us/en/products/clocks-timing/clock-generation/programmable-clocks/5p35023-versaclock-3s-programmable-clock-generator
3062306a36Sopenharmony_ci
3162306a36Sopenharmony_ciproperties:
3262306a36Sopenharmony_ci  compatible:
3362306a36Sopenharmony_ci    enum:
3462306a36Sopenharmony_ci      - renesas,5p35023
3562306a36Sopenharmony_ci
3662306a36Sopenharmony_ci  reg:
3762306a36Sopenharmony_ci    maxItems: 1
3862306a36Sopenharmony_ci
3962306a36Sopenharmony_ci  '#clock-cells':
4062306a36Sopenharmony_ci    description:
4162306a36Sopenharmony_ci      The index in the assigned-clocks is mapped to the output clock as below
4262306a36Sopenharmony_ci      0 - REF, 1 - SE1, 2 - SE2, 3 - SE3, 4 - DIFF1, 5 - DIFF2.
4362306a36Sopenharmony_ci    const: 1
4462306a36Sopenharmony_ci
4562306a36Sopenharmony_ci  clocks:
4662306a36Sopenharmony_ci    maxItems: 1
4762306a36Sopenharmony_ci
4862306a36Sopenharmony_ci  renesas,settings:
4962306a36Sopenharmony_ci    description: Optional, complete register map of the device.
5062306a36Sopenharmony_ci      Optimized settings for the device must be provided in full
5162306a36Sopenharmony_ci      and are written during initialization.
5262306a36Sopenharmony_ci    $ref: /schemas/types.yaml#/definitions/uint8-array
5362306a36Sopenharmony_ci    maxItems: 37
5462306a36Sopenharmony_ci
5562306a36Sopenharmony_cirequired:
5662306a36Sopenharmony_ci  - compatible
5762306a36Sopenharmony_ci  - reg
5862306a36Sopenharmony_ci  - '#clock-cells'
5962306a36Sopenharmony_ci  - clocks
6062306a36Sopenharmony_ci
6162306a36Sopenharmony_ciadditionalProperties: false
6262306a36Sopenharmony_ci
6362306a36Sopenharmony_ciexamples:
6462306a36Sopenharmony_ci  - |
6562306a36Sopenharmony_ci    i2c {
6662306a36Sopenharmony_ci        #address-cells = <1>;
6762306a36Sopenharmony_ci        #size-cells = <0>;
6862306a36Sopenharmony_ci
6962306a36Sopenharmony_ci        versa3: clock-generator@68 {
7062306a36Sopenharmony_ci            compatible = "renesas,5p35023";
7162306a36Sopenharmony_ci            reg = <0x68>;
7262306a36Sopenharmony_ci            #clock-cells = <1>;
7362306a36Sopenharmony_ci
7462306a36Sopenharmony_ci            clocks = <&x1>;
7562306a36Sopenharmony_ci
7662306a36Sopenharmony_ci            renesas,settings = [
7762306a36Sopenharmony_ci                80 00 11 19 4c 02 23 7f 83 19 08 a9 5f 25 24 bf
7862306a36Sopenharmony_ci                00 14 7a e1 00 00 00 00 01 55 59 bb 3f 30 90 b6
7962306a36Sopenharmony_ci                80 b0 45 c4 95
8062306a36Sopenharmony_ci            ];
8162306a36Sopenharmony_ci
8262306a36Sopenharmony_ci            assigned-clocks = <&versa3 0>, <&versa3 1>,
8362306a36Sopenharmony_ci                              <&versa3 2>, <&versa3 3>,
8462306a36Sopenharmony_ci                              <&versa3 4>, <&versa3 5>;
8562306a36Sopenharmony_ci            assigned-clock-rates = <24000000>, <11289600>,
8662306a36Sopenharmony_ci                                   <11289600>, <12000000>,
8762306a36Sopenharmony_ci                                   <25000000>, <12288000>;
8862306a36Sopenharmony_ci        };
8962306a36Sopenharmony_ci    };
90