From patchwork Fri Jan 21 17:55:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Martin_Povi=C5=A1er?= X-Patchwork-Id: 533918 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 19F43C433FE for ; Fri, 21 Jan 2022 17:56:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1380962AbiAUR4B (ORCPT ); Fri, 21 Jan 2022 12:56:01 -0500 Received: from mail-4316.protonmail.ch ([185.70.43.16]:44017 "EHLO mail-4316.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235923AbiAUR4A (ORCPT ); Fri, 21 Jan 2022 12:56:00 -0500 Date: Fri, 21 Jan 2022 17:55:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail2; t=1642787758; bh=YiaBJwRSjrUx8z82Haj9JLHse4yRZm0fwjH36xmwLVc=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:From:To:Cc; b=qRVa2CU6EIJ44MlRFPrsw3W1s7Tb3OyUV1AlosRA75QCsv5i0Nkbq+os/RZYjZ6tK Khmqxb5AsesSJevCjioDR+1gc3dKDEud+weK7xlmpohxL/HMayhOpxb1BW0DbSpZJU /pmxTahPOFYBU162fcA7UQgjthc9WEyxiHiBSux32kvrqq3n0+vzLDQNDQMgF0v6QZ 1R0nnFSRfPU+h1YAahF6oOUfDNYi8ZXk0RyrRFTucQGtUNjZQinAxAzGZXfifsE/1r xO9Zdbd9Afu/bNAT2VmHKWB2duyJioaXFOcwruaDTvbjUrHjUqz2oDFydwYUwDJKMs l3NeYpG8bUfoA== To: mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org From: =?utf-8?q?Martin_Povi=C5=A1er?= Cc: marcan@marcan.st, sven@svenpeter.dev, alyssa@rosenzweig.io, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, kettenis@openbsd.org, =?utf-8?q?Martin_Povi?= =?utf-8?q?=C5=A1er?= , Rob Herring Reply-To: =?utf-8?q?Martin_Povi=C5=A1er?= Subject: [PATCH v3 1/3] dt-bindings: clock: Add Apple NCO Message-ID: <20220121175441.9944-2-povik+lin@protonmail.com> In-Reply-To: <20220121175441.9944-1-povik+lin@protonmail.com> References: <20220121175441.9944-1-povik+lin@protonmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The NCO block found on Apple SoCs is a programmable clock generator performing fractional division of a high frequency input clock. Reviewed-by: Mark Kettenis Reviewed-by: Rob Herring Signed-off-by: Martin Povišer --- .../devicetree/bindings/clock/apple,nco.yaml | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/apple,nco.yaml -- 2.33.0 diff --git a/Documentation/devicetree/bindings/clock/apple,nco.yaml b/Documentation/devicetree/bindings/clock/apple,nco.yaml new file mode 100644 index 000000000000..23ee3964fbde --- /dev/null +++ b/Documentation/devicetree/bindings/clock/apple,nco.yaml @@ -0,0 +1,62 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/apple,nco.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Apple SoCs' NCO block + +maintainers: + - Martin Povišer + +description: | + The NCO (Numerically Controlled Oscillator) block found on Apple SoCs + such as the t8103 (M1) is a programmable clock generator performing + fractional division of a high frequency input clock. + + It carries a number of independent channels and is typically used for + generation of audio bitclocks. + +properties: + compatible: + items: + - enum: + - apple,t6000-nco + - apple,t8103-nco + - const: apple,nco + + clocks: + description: + Specifies the reference clock from which the output clocks + are derived through fractional division. + maxItems: 1 + + '#clock-cells': + const: 1 + + reg: + maxItems: 1 + +required: + - compatible + - clocks + - '#clock-cells' + - reg + +additionalProperties: false + +examples: + - | + nco_clkref: clock-ref { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <900000000>; + clock-output-names = "nco-ref"; + }; + + nco: clock-controller@23b044000 { + compatible = "apple,t8103-nco", "apple,nco"; + reg = <0x3b044000 0x14000>; + #clock-cells = <1>; + clocks = <&nco_clkref>; + }; From patchwork Fri Jan 21 17:56:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Martin_Povi=C5=A1er?= X-Patchwork-Id: 533917 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 494FFC433EF for ; Fri, 21 Jan 2022 17:56:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351197AbiAUR4d (ORCPT ); Fri, 21 Jan 2022 12:56:33 -0500 Received: from mail-4322.protonmail.ch ([185.70.43.22]:52401 "EHLO mail-4322.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351809AbiAUR4c (ORCPT ); Fri, 21 Jan 2022 12:56:32 -0500 Date: Fri, 21 Jan 2022 17:56:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail2; t=1642787789; bh=L3GPP4BYomCCX59iwTHBksw8cVdhg6JC4KAsswidStE=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:From:To:Cc; b=sXUZbx3R8Fcg+QFzkN8yZlMX7rIwNBCBqVA2imLaVJcrN8sqpYCQye+32mCbRjr7B 30aIYRitdXeIfJ+yohARUU1HRRFqrYGSJF9Ef8t9XdIcWjl3E9Wvs7k7aHSfRcB/z9 3PLfSgvmtUTVCB9hB6yRfq2dEZyMKS+2rQN9628Mc9BvhShuHzRIk3LvbIC6sTG5Ih PEPvssEqwIO0ou5oJ42TMWlnfT+lXoBXeU2nLEUlL3WGkwJ0QXK+ardZn+T2fCa62r uPP8sc/574+v5l6CpIsMt3QkngvpKD3jaP+qlJdxGq3U35lz2axPqAxZOidkjpals6 vXb4Qi7n9+U/g== To: mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org From: =?utf-8?q?Martin_Povi=C5=A1er?= Cc: marcan@marcan.st, sven@svenpeter.dev, alyssa@rosenzweig.io, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, kettenis@openbsd.org, =?utf-8?q?Martin_Povi?= =?utf-8?q?=C5=A1er?= Reply-To: =?utf-8?q?Martin_Povi=C5=A1er?= Subject: [PATCH v3 3/3] MAINTAINERS: Add clk-apple-nco under ARM/APPLE MACHINE Message-ID: <20220121175441.9944-4-povik+lin@protonmail.com> In-Reply-To: <20220121175441.9944-1-povik+lin@protonmail.com> References: <20220121175441.9944-1-povik+lin@protonmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Acked-by: Sven Peter Acked-by: Hector Martin Signed-off-by: Martin Povišer --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) -- 2.33.0 diff --git a/MAINTAINERS b/MAINTAINERS index 086f37a4763f..d6323083b695 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1765,6 +1765,7 @@ C: irc://irc.oftc.net/asahi-dev T: git https://github.com/AsahiLinux/linux.git F: Documentation/devicetree/bindings/arm/apple.yaml F: Documentation/devicetree/bindings/arm/apple/* +F: Documentation/devicetree/bindings/clock/apple,nco.yaml F: Documentation/devicetree/bindings/i2c/apple,i2c.yaml F: Documentation/devicetree/bindings/interrupt-controller/apple,aic.yaml F: Documentation/devicetree/bindings/mailbox/apple,mailbox.yaml @@ -1776,6 +1777,7 @@ F: Documentation/devicetree/bindings/spi/apple,spi.yaml F: Documentation/devicetree/bindings/usb/apple,dwc3.yaml F: Documentation/devicetree/bindings/watchdog/apple,wdt.yaml F: arch/arm64/boot/dts/apple/ +F: drivers/clk/clk-apple-nco.c F: drivers/i2c/busses/i2c-pasemi-core.c F: drivers/i2c/busses/i2c-pasemi-platform.c F: drivers/irqchip/irq-apple-aic.c