Commit f37f6ba2 authored by Stephen Boyd's avatar Stephen Boyd
Browse files

Merge tag 'spacemit-clk-for-6.16-1' of https://github.com/spacemit-com/linux into clk-spacemit

Pull SpacemiT clk driver updates from Yixun Lan:

 - Add clock driver for SpacemiT K1 SoC
 - Add TWSI8 clock, workaround the read quirk

* tag 'spacemit-clk-for-6.16-1' of https://github.com/spacemit-com/linux:
  clk: spacemit: k1: Add TWSI8 bus and function clocks
  clk: spacemit: Add clock support for SpacemiT K1 SoC
  dt-bindings: clock: spacemit: Add spacemit,k1-pll
  dt-bindings: soc: spacemit: Add spacemit,k1-syscon
parents 0af2f6be 49625c6e
Loading
Loading
Loading
Loading
+50 −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/spacemit,k1-pll.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: SpacemiT K1 PLL

maintainers:
  - Haylen Chu <heylenay@4d2.org>

properties:
  compatible:
    const: spacemit,k1-pll

  reg:
    maxItems: 1

  clocks:
    description: External 24MHz oscillator

  spacemit,mpmu:
    $ref: /schemas/types.yaml#/definitions/phandle
    description:
      Phandle to the "Main PMU (MPMU)" syscon. It is used to check PLL
      lock status.

  "#clock-cells":
    const: 1
    description:
      See <dt-bindings/clock/spacemit,k1-syscon.h> for valid indices.

required:
  - compatible
  - reg
  - clocks
  - spacemit,mpmu
  - "#clock-cells"

additionalProperties: false

examples:
  - |
    clock-controller@d4090000 {
        compatible = "spacemit,k1-pll";
        reg = <0xd4090000 0x1000>;
        clocks = <&vctcxo_24m>;
        spacemit,mpmu = <&sysctl_mpmu>;
        #clock-cells = <1>;
    };
+80 −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/soc/spacemit/spacemit,k1-syscon.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: SpacemiT K1 SoC System Controller

maintainers:
  - Haylen Chu <heylenay@4d2.org>

description:
  System controllers found on SpacemiT K1 SoC, which are capable of
  clock, reset and power-management functions.

properties:
  compatible:
    enum:
      - spacemit,k1-syscon-apbc
      - spacemit,k1-syscon-apmu
      - spacemit,k1-syscon-mpmu

  reg:
    maxItems: 1

  clocks:
    maxItems: 4

  clock-names:
    items:
      - const: osc
      - const: vctcxo_1m
      - const: vctcxo_3m
      - const: vctcxo_24m

  "#clock-cells":
    const: 1
    description:
      See <dt-bindings/clock/spacemit,k1-syscon.h> for valid indices.

  "#power-domain-cells":
    const: 1

  "#reset-cells":
    const: 1

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

allOf:
  - if:
      properties:
        compatible:
          contains:
            const: spacemit,k1-syscon-apbc
    then:
      properties:
        "#power-domain-cells": false
    else:
      required:
        - "#power-domain-cells"

additionalProperties: false

examples:
  - |
    system-controller@d4050000 {
        compatible = "spacemit,k1-syscon-mpmu";
        reg = <0xd4050000 0x209c>;
        clocks = <&osc>, <&vctcxo_1m>, <&vctcxo_3m>, <&vctcxo_24m>;
        clock-names = "osc", "vctcxo_1m", "vctcxo_3m", "vctcxo_24m";
        #clock-cells = <1>;
        #power-domain-cells = <1>;
        #reset-cells = <1>;
    };
+1 −0
Original line number Diff line number Diff line
@@ -517,6 +517,7 @@ source "drivers/clk/samsung/Kconfig"
source "drivers/clk/sifive/Kconfig"
source "drivers/clk/socfpga/Kconfig"
source "drivers/clk/sophgo/Kconfig"
source "drivers/clk/spacemit/Kconfig"
source "drivers/clk/sprd/Kconfig"
source "drivers/clk/starfive/Kconfig"
source "drivers/clk/sunxi/Kconfig"
+1 −0
Original line number Diff line number Diff line
@@ -145,6 +145,7 @@ obj-$(CONFIG_COMMON_CLK_SAMSUNG) += samsung/
obj-$(CONFIG_CLK_SIFIVE)		+= sifive/
obj-y					+= socfpga/
obj-y					+= sophgo/
obj-y					+= spacemit/
obj-$(CONFIG_PLAT_SPEAR)		+= spear/
obj-y					+= sprd/
obj-$(CONFIG_ARCH_STI)			+= st/
+18 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0-only

config SPACEMIT_CCU
	tristate "Clock support for SpacemiT SoCs"
	depends on ARCH_SPACEMIT || COMPILE_TEST
	select MFD_SYSCON
	help
	  Say Y to enable clock controller unit support for SpacemiT SoCs.

if SPACEMIT_CCU

config SPACEMIT_K1_CCU
	tristate "Support for SpacemiT K1 SoC"
	depends on ARCH_SPACEMIT || COMPILE_TEST
	help
	  Support for clock controller unit in SpacemiT K1 SoC.

endif
Loading