Commit 9f3a2ba6 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull clk updates from Stephen Boyd:
 "The core framework gained a clk provider helper, a clk consumer
  helper, and some unit tests for the assigned clk rates feature in
  DeviceTree. On the vendor driver side, we gained a whole pile of SoC
  driver support detailed below. The majority in the diffstat is
  Qualcomm, but there's also quite a few Samsung and Mediatek clk driver
  additions in here as well. The top vendors is quite common, but the
  sheer amount of new drivers is uncommon, so I'm anticipating a larger
  number of fixes for clk drivers this cycle.

  Core:
   - devm_clk_bulk_get_all_enabled() to return number of clks acquired
   - devm_clk_hw_register_gate_parent_hw() helper to modernize drivers
   - KUnit tests for clk-assigned-rates{,-u64}

  New Drivers:
   - Marvell PXA1908 SoC clks
   - Mobileye EyeQ5, EyeQ6L and EyeQ6H clk driver
   - TWL6030 clk driver
   - Nuvoton Arbel BMC NPCM8XX SoC clks
   - MediaTek MT6735 SoC clks
   - MediaTek MT7620, MT7628 and MT7688 MMC clks
   - Add a driver for gated fixed rate clocks
   - Global clock controllers for Qualcomm QCS8300 and IPQ5424 SoCs
   - Camera, display and video clock controllers for Qualcomm SA8775P
     SoCs
   - Global, display, GPU, TCSR, and RPMh clock controllers for Qualcomm
     SAR2130P
   - Global, camera, display, GPU, and video clock controllers for
     Qualcomm SM8475 SoCs
   - RTC power domain and Battery Backup Function (VBATTB) clock support
     for the Renesas RZ/G3S SoC
   - Qualcomm IPQ9574 alpha PLLs
   - Support for i.MX91 CCM in the i.MX93 driver
   - Microchip LAN969X SoC clks
   - Cortex-A55 core clocks and Interrupt Control Unit (ICU) clock and
     reset on Renesas RZ/V2H(P)
   - Samsung ExynosAutov920 clk drivers for PERIC1, MISC, HSI0 and HSI1
   - Samsung Exynos8895 clk drivers for FSYS0/1, PERIC0/1, PERIS and TOP

  Updates:
   - Convert more clk bindings to YAML
   - Various clk driver cleanups: NULL checks, add const, etc.
   - Remove END/NUM #defines that count number of clks in various
     binding headers
   - Continue moving reset drivers to drivers/reset via auxiliary bus"

* tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (162 commits)
  clk: clk-loongson2: Fix potential buffer overflow in flexible-array member access
  clk: Fix invalid execution of clk_set_rate
  clk: clk-loongson2: Fix memory corruption bug in struct loongson2_clk_provider
  clk: lan966x: make it selectable for ARCH_LAN969X
  clk: eyeq: add EyeQ6H west fixed factor clocks
  clk: eyeq: add EyeQ6H central fixed factor clocks
  clk: eyeq: add EyeQ5 fixed factor clocks
  clk: eyeq: add fixed factor clocks infrastructure
  clk: eyeq: require clock index with phandle in all cases
  clk: fixed-factor: add clk_hw_register_fixed_factor_index() function
  dt-bindings: clock: eyeq: add more Mobileye EyeQ5/EyeQ6H clocks
  dt-bindings: soc: mobileye: set `#clock-cells = <1>` for all compatibles
  clk: clk-axi-clkgen: make sure to enable the AXI bus clock
  dt-bindings: clock: axi-clkgen: include AXI clk
  clk: mmp: Add Marvell PXA1908 MPMU driver
  clk: mmp: Add Marvell PXA1908 APMU driver
  clk: mmp: Add Marvell PXA1908 APBCP driver
  clk: mmp: Add Marvell PXA1908 APBC driver
  dt-bindings: clock: Add Marvell PXA1908 clock bindings
  clk: mmp: Switch to use struct u32_fract instead of custom one
  ...
parents 2fb7eb3d 21a5352d
Loading
Loading
Loading
Loading
+0 −52
Original line number Diff line number Diff line
* Actions Semi Owl Clock Management Unit (CMU)

The Actions Semi Owl Clock Management Unit generates and supplies clock
to various controllers within the SoC. The clock binding described here is
applicable to S900, S700 and S500 SoC's.

Required Properties:

- compatible: should be one of the following,
	"actions,s900-cmu"
	"actions,s700-cmu"
	"actions,s500-cmu"
- reg: physical base address of the controller and length of memory mapped
  region.
- clocks: Reference to the parent clocks ("hosc", "losc")
- #clock-cells: should be 1.
- #reset-cells: should be 1.

Each clock is assigned an identifier, and client nodes can use this identifier
to specify the clock which they consume.

All available clocks are defined as preprocessor macros in corresponding
dt-bindings/clock/actions,s900-cmu.h or actions,s700-cmu.h or
actions,s500-cmu.h header and can be used in device tree sources.

External clocks:

The hosc clock used as input for the plls is generated outside the SoC. It is
expected that it is defined using standard clock bindings as "hosc".

Actions Semi S900 CMU also requires one more clock:
 - "losc" - internal low frequency oscillator

Example: Clock Management Unit node:

        cmu: clock-controller@e0160000 {
                compatible = "actions,s900-cmu";
                reg = <0x0 0xe0160000 0x0 0x1000>;
                clocks = <&hosc>, <&losc>;
                #clock-cells = <1>;
                #reset-cells = <1>;
        };

Example: UART controller node that consumes clock generated by the clock
management unit:

        uart: serial@e012a000 {
                compatible = "actions,s900-uart", "actions,owl-uart";
                reg = <0x0 0xe012a000 0x0 0x2000>;
                interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&cmu CLK_UART5>;
        };
+60 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/clock/actions,owl-cmu.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Actions Semi Owl Clock Management Unit (CMU)

maintainers:
  - Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

description: |
  The Actions Semi Owl Clock Management Unit generates and supplies clock
  to various controllers within the SoC.

  See also:
    include/dt-bindings/clock/actions,s500-cmu.h
    include/dt-bindings/clock/actions,s700-cmu.h
    include/dt-bindings/clock/actions,s900-cmu.h

properties:
  compatible:
    enum:
      - actions,s500-cmu
      - actions,s700-cmu
      - actions,s900-cmu

  reg:
    maxItems: 1

  clocks:
    items:
      - description: Host oscillator source
      - description: Internal low frequency oscillator source

  "#clock-cells":
    const: 1

  "#reset-cells":
    const: 1

required:
  - compatible
  - reg
  - clocks
  - "#clock-cells"
  - "#reset-cells"

additionalProperties: false

examples:
  - |
    clock-controller@e0160000 {
        compatible = "actions,s900-cmu";
        reg = <0xe0160000 0x1000>;
        clocks = <&hosc>, <&losc>;
        #clock-cells = <1>;
        #reset-cells = <1>;
    };
...
+18 −4
Original line number Diff line number Diff line
@@ -26,9 +26,21 @@ properties:
    description:
      Specifies the reference clock(s) from which the output frequency is
      derived. This must either reference one clock if only the first clock
      input is connected or two if both clock inputs are connected.
    minItems: 1
    maxItems: 2
      input is connected or two if both clock inputs are connected. The last
      clock is the AXI bus clock that needs to be enabled so we can access the
      core registers.
    minItems: 2
    maxItems: 3

  clock-names:
    oneOf:
      - items:
          - const: clkin1
          - const: s_axi_aclk
      - items:
          - const: clkin1
          - const: clkin2
          - const: s_axi_aclk

  '#clock-cells':
    const: 0
@@ -40,6 +52,7 @@ required:
  - compatible
  - reg
  - clocks
  - clock-names
  - '#clock-cells'

additionalProperties: false
@@ -50,5 +63,6 @@ examples:
      compatible = "adi,axi-clkgen-2.00.a";
      #clock-cells = <0>;
      reg = <0xff000000 0x1000>;
      clocks = <&osc 1>;
      clocks = <&osc 1>, <&clkc 15>;
      clock-names = "clkin1", "s_axi_aclk";
    };
+8 −15
Original line number Diff line number Diff line
@@ -34,8 +34,10 @@ properties:
          - airoha,en7581-scu

  reg:
    minItems: 2
    maxItems: 4
    items:
      - description: scu base address
      - description: misc scu base address
    minItems: 1

  "#clock-cells":
    description:
@@ -60,9 +62,7 @@ allOf:
    then:
      properties:
        reg:
          items:
            - description: scu base address
            - description: misc scu base address
          minItems: 2

        '#reset-cells': false

@@ -73,11 +73,7 @@ allOf:
    then:
      properties:
        reg:
          items:
            - description: scu base address
            - description: misc scu base address
            - description: reset base address
            - description: pb scu base address
          maxItems: 1

additionalProperties: false

@@ -96,12 +92,9 @@ examples:
      #address-cells = <2>;
      #size-cells = <2>;

      scuclk: clock-controller@1fa20000 {
      scuclk: clock-controller@1fb00000 {
        compatible = "airoha,en7581-scu";
        reg = <0x0 0x1fa20000 0x0 0x400>,
              <0x0 0x1fb00000 0x0 0x90>,
              <0x0 0x1fb00830 0x0 0x8>,
              <0x0 0x1fbe3400 0x0 0xfc>;
        reg = <0x0 0x1fb00000 0x0 0x970>;
              #clock-cells = <1>;
              #reset-cells = <1>;
      };
+45 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/clock/amlogic,meson8-clkc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Amlogic Meson8, Meson8b and Meson8m2 Clock and Reset Controller

maintainers:
  - Neil Armstrong <neil.armstrong@linaro.org>

properties:
  compatible:
    oneOf:
      - enum:
          - amlogic,meson8-clkc
          - amlogic,meson8b-clkc
      - items:
          - const: amlogic,meson8m2-clkc
          - const: amlogic,meson8-clkc

  clocks:
    minItems: 2
    maxItems: 3

  clock-names:
    minItems: 2
    items:
      - const: xtal
      - const: ddr_pll
      - const: clk_32k

  '#clock-cells':
    const: 1

  '#reset-cells':
    const: 1

required:
  - compatible
  - clocks
  - clock-names
  - '#reset-cells'

additionalProperties: false
Loading