Commit ff7ddcf0 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull clk updates from Stephen Boyd:
 "This batch of clk driver updates contains almost no new SoC support.
  Instead there's a treewide patch series from Maxime that makes
  clk_ops::determine_rate mandatory for muxes.

  Beyond that core framework change we have the usual pile of clk driver
  updates such as migrating i2c drivers to use .probe() again or
  YAMLfication of clk DT bindings so we can validate DTBs.

  Overall the SoCs that got the most updates this time around in terms
  of diffstat are the Amlogic and Mediatek drivers because they added
  new SoC support or fixed up various drivers to have proper data.

  In general things look kinda quiet. I suspect the core framework
  change may still shake out some problems after the merge window,
  mostly because not everyone tests linux-next where that series has
  been for some number of weeks. I saw that there's at least one pending
  fix for Tegra that needs to be wrapped up into a proper patch. I'll
  try to catch those bits before the window closes so that -rc1 is
  bootable. More details below.

  Core:
   - Make clk_ops::determine_rate mandatory for muxes

  New Drivers:
   - Add amlogic a1 SoC family PLL and peripheral clock controller support

  Updates:
   - Handle allocation failures from kasprintf() and friends
   - Migrate platform clk drivers to .remove_new()
   - Migrate i2c clk drivers to .probe() instead of .probe_new()
   - Remove CLK_SET_PARENT from all Mediatek MSDC core clocks
   - Add infra_ao reset support for Mediatek MT8188 SoCs
   - Align driver_data to i2c_device_id tables in some i2c clk drivers
   - Use device_get_match_data() in vc5 clk driver
   - New Kconfig symbol name (SOC_MICROCHIP_POLARFIRE) for Microchip
     FPGA clock drivers
   - Use of_property_read_bool() to read "microchip,pic32mzda-sosc"
     boolean DT property in clk-pic32mzda
   - Convert AT91 clock dt-bindings to YAML
   - Remove CLK_SET_RATE_PARENT flag from LDB clocks on i.MX6SX
   - Keep i.MX UART clocks enabled during kernel boot if earlycon is set
   - Drop imx_unregister_clocks() as there are no users anymore
   - Switch to _safe iterator on imx_clk_scu_unregister() to avoid use
     after free
   - Add determine_rate op to the imx8m composite clock
   - Use device managed API for iomap and kzalloc for i.MXRT1050,
     i.MX8MN, i.MX8MP and i.MX93 clock controller drivers
   - Add missing interrupt DT property for the i.MX8M clock controller
   - Re-add support for Exynos4212 clock controller because we are
     re-introducing the SoC in the mainline
   - Add CONFIG_OF dependency to Samsung clk Kconfig symbols to solve
     some objtool warnings
   - Preselect PLL MIPI as TCON0 parent for Allwinner A64 SoC
   - Convert the Renesas clock drivers to readl_poll_timeout_atomic()
   - Add PWM clock on Renesas R-Car V3U
   - Fix PLL5 on Renesas RZ/G2L and RZ/V2L"

* tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (149 commits)
  clk: fix typo in clk_hw_register_fixed_rate_parent_data() macro
  clk: Fix memory leak in devm_clk_notifier_register()
  clk: mvebu: Iterate over possible CPUs instead of DT CPU nodes
  clk: mvebu: Use of_get_cpu_hwid() to read CPU ID
  MAINTAINERS: Add Marvell mvebu clock drivers
  clk: clocking-wizard: check return value of devm_kasprintf()
  clk: ti: clkctrl: check return value of kasprintf()
  clk: keystone: sci-clk: check return value of kasprintf()
  clk: si5341: free unused memory on probe failure
  clk: si5341: check return value of {devm_}kasprintf()
  clk: si5341: return error if one synth clock registration fails
  clk: cdce925: check return value of kasprintf()
  clk: vc5: check memory returned by kasprintf()
  clk: mediatek: clk-mt8173-apmixedsys: Fix iomap not released issue
  clk: mediatek: clk-mt8173-apmixedsys: Fix return value for of_iomap() error
  clk: mediatek: clk-mtk: Grab iomem pointer for divider clocks
  clk: keystone: syscon-clk: Add support for audio refclk
  dt-bindings: clock: Add binding documentation for TI Audio REFCLK
  dt-bindings: clock: ehrpwm: Remove unneeded syscon compatible
  clk: keystone: syscon-clk: Allow the clock node to not be of type syscon
  ...
parents acd1d46b b9a40506
Loading
Loading
Loading
Loading
+73 −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,a1-peripherals-clkc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Amlogic A1 Peripherals Clock Control Unit

maintainers:
  - Neil Armstrong <neil.armstrong@linaro.org>
  - Jerome Brunet <jbrunet@baylibre.com>
  - Jian Hu <jian.hu@jian.hu.com>
  - Dmitry Rokosov <ddrokosov@sberdevices.ru>

properties:
  compatible:
    const: amlogic,a1-peripherals-clkc

  '#clock-cells':
    const: 1

  reg:
    maxItems: 1

  clocks:
    items:
      - description: input fixed pll div2
      - description: input fixed pll div3
      - description: input fixed pll div5
      - description: input fixed pll div7
      - description: input hifi pll
      - description: input oscillator (usually at 24MHz)

  clock-names:
    items:
      - const: fclk_div2
      - const: fclk_div3
      - const: fclk_div5
      - const: fclk_div7
      - const: hifi_pll
      - const: xtal

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

additionalProperties: false

examples:
  - |
    #include <dt-bindings/clock/amlogic,a1-pll-clkc.h>
    apb {
        #address-cells = <2>;
        #size-cells = <2>;

        clock-controller@800 {
            compatible = "amlogic,a1-peripherals-clkc";
            reg = <0 0x800 0 0x104>;
            #clock-cells = <1>;
            clocks = <&clkc_pll CLKID_FCLK_DIV2>,
                     <&clkc_pll CLKID_FCLK_DIV3>,
                     <&clkc_pll CLKID_FCLK_DIV5>,
                     <&clkc_pll CLKID_FCLK_DIV7>,
                     <&clkc_pll CLKID_HIFI_PLL>,
                     <&xtal>;
            clock-names = "fclk_div2", "fclk_div3",
                          "fclk_div5", "fclk_div7",
                          "hifi_pll", "xtal";
        };
    };
+59 −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,a1-pll-clkc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Amlogic A1 PLL Clock Control Unit

maintainers:
  - Neil Armstrong <neil.armstrong@linaro.org>
  - Jerome Brunet <jbrunet@baylibre.com>
  - Jian Hu <jian.hu@jian.hu.com>
  - Dmitry Rokosov <ddrokosov@sberdevices.ru>

properties:
  compatible:
    const: amlogic,a1-pll-clkc

  '#clock-cells':
    const: 1

  reg:
    maxItems: 1

  clocks:
    items:
      - description: input fixpll_in
      - description: input hifipll_in

  clock-names:
    items:
      - const: fixpll_in
      - const: hifipll_in

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

additionalProperties: false

examples:
  - |
    #include <dt-bindings/clock/amlogic,a1-peripherals-clkc.h>
    apb {
        #address-cells = <2>;
        #size-cells = <2>;

        clock-controller@7c80 {
            compatible = "amlogic,a1-pll-clkc";
            reg = <0 0x7c80 0 0x18c>;
            #clock-cells = <1>;
            clocks = <&clkc_periphs CLKID_FIXPLL_IN>,
                     <&clkc_periphs CLKID_HIFIPLL_IN>;
            clock-names = "fixpll_in", "hifipll_in";
        };
    };
+0 −58
Original line number Diff line number Diff line
Device Tree Clock bindings for arch-at91

This binding uses the common clock binding[1].

[1] Documentation/devicetree/bindings/clock/clock-bindings.txt

Slow Clock controller:

Required properties:
- compatible : shall be one of the following:
	"atmel,at91sam9x5-sckc",
	"atmel,sama5d3-sckc",
	"atmel,sama5d4-sckc" or
	"microchip,sam9x60-sckc":
		at91 SCKC (Slow Clock Controller)
- #clock-cells : shall be 1 for "microchip,sam9x60-sckc" otherwise shall be 0.
- clocks : shall be the input parent clock phandle for the clock.

Optional properties:
- atmel,osc-bypass : boolean property. Set this when a clock signal is directly
  provided on XIN.

For example:
	sckc@fffffe50 {
		compatible = "atmel,at91sam9x5-sckc";
		reg = <0xfffffe50 0x4>;
		clocks = <&slow_xtal>;
		#clock-cells = <0>;
	};

Power Management Controller (PMC):

Required properties:
- compatible : shall be "atmel,<chip>-pmc", "syscon" or
	"microchip,sam9x60-pmc"
	<chip> can be: at91rm9200, at91sam9260, at91sam9261,
	at91sam9263, at91sam9g45, at91sam9n12, at91sam9rl, at91sam9g15,
	at91sam9g25, at91sam9g35, at91sam9x25, at91sam9x35, at91sam9x5,
	sama5d2, sama5d3 or sama5d4.
- #clock-cells : from common clock binding; shall be set to 2. The first entry
  is the type of the clock (core, system, peripheral or generated) and the
  second entry its index as provided by the datasheet
- clocks : Must contain an entry for each entry in clock-names.
- clock-names: Must include the following entries: "slow_clk", "main_xtal"

Optional properties:
- atmel,osc-bypass : boolean property. Set this when a clock signal is directly
  provided on XIN.

For example:
	pmc: pmc@f0018000 {
		compatible = "atmel,sama5d4-pmc", "syscon";
		reg = <0xf0018000 0x120>;
		interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
		#clock-cells = <2>;
		clocks = <&clk32k>, <&main_xtal>;
		clock-names = "slow_clk", "main_xtal";
	};
+154 −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/atmel,at91rm9200-pmc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Atmel Power Management Controller (PMC)

maintainers:
  - Claudiu Beznea <claudiu.beznea@microchip.com>

description:
  The power management controller optimizes power consumption by controlling all
  system and user peripheral clocks. The PMC enables/disables the clock inputs
  to many of the peripherals and to the processor.

properties:
  compatible:
    oneOf:
      - items:
          - const: atmel,at91sam9g20-pmc
          - const: atmel,at91sam9260-pmc
          - const: syscon
      - items:
          - enum:
              - atmel,at91sam9g15-pmc
              - atmel,at91sam9g25-pmc
              - atmel,at91sam9g35-pmc
              - atmel,at91sam9x25-pmc
              - atmel,at91sam9x35-pmc
          - const: atmel,at91sam9x5-pmc
          - const: syscon
      - items:
          - enum:
              - atmel,at91rm9200-pmc
              - atmel,at91sam9260-pmc
              - atmel,at91sam9g45-pmc
              - atmel,at91sam9n12-pmc
              - atmel,at91sam9rl-pmc
              - atmel,at91sam9x5-pmc
              - atmel,sama5d2-pmc
              - atmel,sama5d3-pmc
              - atmel,sama5d4-pmc
              - microchip,sam9x60-pmc
              - microchip,sama7g5-pmc
          - const: syscon

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  "#clock-cells":
    description: |
      - 1st cell is the clock type, one of PMC_TYPE_CORE, PMC_TYPE_SYSTEM,
        PMC_TYPE_PERIPHERAL, PMC_TYPE_GCK, PMC_TYPE_PROGRAMMABLE (as defined
        in <dt-bindings/clock/at91.h>)
      - 2nd cell is the clock identifier as defined in <dt-bindings/clock/at91.h
        (for core clocks) or as defined in datasheet (for system, peripheral,
        gck and programmable clocks).
    const: 2

  clocks:
    minItems: 2
    maxItems: 3

  clock-names:
    minItems: 2
    maxItems: 3

  atmel,osc-bypass:
    description: set when a clock signal is directly provided on XIN
    type: boolean

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

allOf:
  - if:
      properties:
        compatible:
          contains:
            enum:
              - microchip,sam9x60-pmc
              - microchip,sama7g5-pmc
    then:
      properties:
        clocks:
          minItems: 3
          maxItems: 3
        clock-names:
          items:
            - const: td_slck
            - const: md_slck
            - const: main_xtal

  - if:
      properties:
        compatible:
          contains:
            enum:
              - atmel,at91rm9200-pmc
              - atmel,at91sam9260-pmc
              - atmel,at91sam9g20-pmc
    then:
      properties:
        clocks:
          minItems: 2
          maxItems: 2
        clock-names:
          items:
            - const: slow_xtal
            - const: main_xtal

  - if:
      properties:
        compatible:
          contains:
            enum:
              - atmel,sama5d2-pmc
              - atmel,sama5d3-pmc
              - atmel,sama5d4-pmc
    then:
      properties:
        clocks:
          minItems: 2
          maxItems: 2
        clock-names:
          items:
            - const: slow_clk
            - const: main_xtal

additionalProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>

    pmc: clock-controller@f0018000 {
        compatible = "atmel,sama5d4-pmc", "syscon";
        reg = <0xf0018000 0x120>;
        interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
        #clock-cells = <2>;
        clocks = <&clk32k>, <&main_xtal>;
        clock-names = "slow_clk", "main_xtal";
    };

...
+70 −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/atmel,at91sam9x5-sckc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Atmel Slow Clock Controller (SCKC)

maintainers:
  - Claudiu Beznea <claudiu.beznea@microchip.com>

properties:
  compatible:
    oneOf:
      - enum:
          - atmel,at91sam9x5-sckc
          - atmel,sama5d3-sckc
          - atmel,sama5d4-sckc
          - microchip,sam9x60-sckc
      - items:
          - const: microchip,sama7g5-sckc
          - const: microchip,sam9x60-sckc

  reg:
    maxItems: 1

  clocks:
    maxItems: 1

  "#clock-cells":
    enum: [0, 1]

  atmel,osc-bypass:
    type: boolean
    description: set when a clock signal is directly provided on XIN

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

allOf:
  - if:
      properties:
        compatible:
          contains:
            enum:
              - microchip,sam9x60-sckc
    then:
      properties:
        "#clock-cells":
          const: 1
    else:
      properties:
        "#clock-cells":
          const: 0

additionalProperties: false

examples:
  - |
    clk32k: clock-controller@fffffe50 {
        compatible = "microchip,sam9x60-sckc";
        reg = <0xfffffe50 0x4>;
        clocks = <&slow_xtal>;
        #clock-cells = <1>;
    };

...
Loading