From patchwork Wed Dec 2 14:06:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 11946187 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, UNWANTED_LANGUAGE_BODY,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9CDB6C64E7C for ; Wed, 2 Dec 2020 14:08:17 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1A2FB21741 for ; Wed, 2 Dec 2020 14:08:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1A2FB21741 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=wbBrctDJUweQUyXh+F5L2gzp2rteBhMo8nAvRIBgASM=; b=ThsWCzmWi4UDlFjpHZXXd1zEt 8BFigbB2FQI3XOYiMOEKlE261SA8X5EVEJU1QyKh5Ej+iEsCf9rxOcqBjkI8uihgpwxA06zZbynda 4nY9JCH97fTuacN82f4RynX+lEdnm2gNSchyE5jDxGWBeP7uMGVcOBMd/WVk3uiRTieqOMUq1t08X 5RGG3E9cUGHHSDSQKx1vjq0S7FWHdGdDLlqRAnPS5Vnr3kA+DVr7nvsCyHBLsixcRHrUqynRSgsP7 P2eogqfSaM8a6PsQdCnbQRoSlIeD5PfGDmje5xFPjJvlPWxhZTATTMjD+mDX2yowX8CLFtW7w0Vqk wNODJHmGA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kkSmC-0007GZ-LX; Wed, 02 Dec 2020 14:06:36 +0000 Received: from mail-ej1-x644.google.com ([2a00:1450:4864:20::644]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kkSlz-0007Bz-6J for linux-arm-kernel@lists.infradead.org; Wed, 02 Dec 2020 14:06:24 +0000 Received: by mail-ej1-x644.google.com with SMTP id g20so4543210ejb.1 for ; Wed, 02 Dec 2020 06:06:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9fw0c1vN25O3p+wsWwRXMndS7i0G5WWG/KRE/RpibJE=; b=oNoI9O7sqt8AxEf9aQbniuMZTVMVkzdQm+4ld7zxACwP86n5QOf26HwsHZcHLvbuLo LpH/fGNUEPsS+G9TokdZAZpLjcF6JkoYnbouzZaOJimlj0kUzoFGq80FpvhRDmaMGAS6 eHD9zMKJnPn5UD1kY1LcU2V0EX2ZR24norGXsQfmH3M2wIlFfdbMOEstVvxkywKjYcvy Ozdu4yMHq4M3NYKURK38HH43AUZaF89xREF+goKFw+V9jKquv0t49xhDoEf/C9gwCrLa UMAXHgW6/ARlbmoidLjFWG5ov1B+E8zZCJWMO/+LlwQ70eXweuYIDXm/Faw36ReFFsKG tphQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=9fw0c1vN25O3p+wsWwRXMndS7i0G5WWG/KRE/RpibJE=; b=MjVyU8Tga1pWDaM7nOVa019DYKLAZ/OVJtoDQTbZMoGvfT1kuMGZ7Ix472K9+QUD8e ZZfQ2etqN5N84+OL5to+dfr1lecZe8RARV5Js+4Gib/BhJ/ZU+z6NbmxIRfQgHgJEBqy M8RHgFV0MPtHrFcNySvW2sa8FOMTvjMksBDPvbgaiI5lEctjgeXCxvNsNDEB/fmKnAGE jOj1RQRCtc6HpcOgMJxpnaNWyStVk2VKjEicv8XAg76QVft8ioF6LLokmY9zIvEC5v4j 77kYzqTp5GvMFYGSaHrFNeN1f592LFL0y1OCYOQHaOZ35sAkjCYxA95Eoc72njtHuD/F l1Wg== X-Gm-Message-State: AOAM532NHrwzbT/Ow9Nu2X7Uuvr+PYjr7W7aM0sz50JyrvqRIbrovENE mXFeEiCDXmr6hND73RY1l78C2g== X-Google-Smtp-Source: ABdhPJxLGUWNldyoyyGpA5ToxlYngiIh2OO2SeZyt9xreCYBTUSa60Dqz5S0QUfA7HKWxgSqgS1Jyw== X-Received: by 2002:a17:906:ee2:: with SMTP id x2mr2542193eji.326.1606917981519; Wed, 02 Dec 2020 06:06:21 -0800 (PST) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id x16sm313775ejo.104.2020.12.02.06.06.20 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 02 Dec 2020 06:06:20 -0800 (PST) From: Michal Simek To: linux-kernel@vger.kernel.org, monstr@monstr.eu, michal.simek@xilinx.com, git@xilinx.com Subject: [PATCH 03/12] arm64: dts: zynqmp: Enable si5341 driver for zcu102/106/111 Date: Wed, 2 Dec 2020 15:06:02 +0100 Message-Id: <679a09c15babcc6c209e5e6466a9fa76d1e2c271.1606917949.git.michal.simek@xilinx.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201202_090623_336006_5FC47C88 X-CRM114-Status: GOOD ( 15.22 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Anurag Kumar Vulisha , Rajan Vaja , Venkatesh Yadav Abbarapu , Krzysztof Kozlowski , Rob Herring , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Enable si5341 driver is the main chip for providing preprogrammed clocks for the whole platform. # cat /sys/kernel/debug/clk/clk_summary ... refhdmi 1 1 0 114285000 0 0 50000 xtal_0 0 0 0 114285000 0 0 50000 pll_0 0 0 0 40731174000000 0 0 50000 clk1_0 0 0 0 27000000 0 0 50000 clk0_0 0 0 0 27000000 0 0 50000 ref48M 1 2 0 48000000 0 0 50000 si5341 0 4 0 14000000 0 0 50000 clock-generator.N4 0 0 0 0 0 0 50000 clock-generator.N3 0 1 0 733260000 0 0 50000 clock-generator.9 0 1 0 33330000 0 0 50000 clock-generator.N2 0 1 0 104000000 0 0 50000 clock-generator.2 0 1 0 26000000 0 0 50000 clock-generator.N1 0 2 0 594000000 0 0 50000 clock-generator.7 0 1 0 74250000 0 0 50000 clock-generator.0 0 1 0 27000000 0 0 50000 clock-generator.N0 0 4 0 1000000000 0 0 50000 clock-generator.8 0 0 0 0 0 0 50000 clock-generator.6 0 1 0 125000000 0 0 50000 clock-generator.5 0 1 0 100000000 0 0 50000 clock-generator.4 0 1 0 100000000 0 0 50000 clock-generator.3 0 1 0 125000000 0 0 50000 clock-generator.1 0 0 0 0 0 0 50000 ... Signed-off-by: Michal Simek --- .../boot/dts/xilinx/zynqmp-zcu102-revA.dts | 56 ++++++++++++++++++- .../boot/dts/xilinx/zynqmp-zcu106-revA.dts | 45 +++++++++++++++ .../boot/dts/xilinx/zynqmp-zcu111-revA.dts | 46 ++++++++++++++- 3 files changed, 145 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/xilinx/zynqmp-zcu102-revA.dts b/arch/arm64/boot/dts/xilinx/zynqmp-zcu102-revA.dts index 5ff7ab665374..68c2ad30d62d 100644 --- a/arch/arm64/boot/dts/xilinx/zynqmp-zcu102-revA.dts +++ b/arch/arm64/boot/dts/xilinx/zynqmp-zcu102-revA.dts @@ -133,6 +133,13 @@ ina226-u75 { io-channels = <&u75 0>, <&u75 1>, <&u75 2>, <&u75 3>; }; + /* 48MHz reference crystal */ + ref48: ref48M { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <48000000>; + }; + refhdmi: refhdmi { compatible = "fixed-clock"; #clock-cells = <0>; @@ -489,9 +496,56 @@ i2c@1 { #size-cells = <0>; reg = <1>; si5341: clock-generator@36 { /* SI5341 - u69 */ + compatible = "silabs,si5341"; reg = <0x36>; - }; + #clock-cells = <2>; + #address-cells = <1>; + #size-cells = <0>; + clocks = <&ref48>; + clock-names = "xtal"; + clock-output-names = "si5341"; + si5341_0: out@0 { + /* refclk0 for PS-GT, used for DP */ + reg = <0>; + always-on; + }; + si5341_2: out@2 { + /* refclk2 for PS-GT, used for USB3 */ + reg = <2>; + always-on; + }; + si5341_3: out@3 { + /* refclk3 for PS-GT, used for SATA */ + reg = <3>; + always-on; + }; + si5341_4: out@4 { + /* refclk4 for PS-GT, used for PCIE slot */ + reg = <4>; + always-on; + }; + si5341_5: out@5 { + /* refclk5 for PS-GT, used for PCIE */ + reg = <5>; + always-on; + }; + si5341_6: out@6 { + /* refclk6 PL CLK125 */ + reg = <6>; + always-on; + }; + si5341_7: out@7 { + /* refclk7 PL CLK74 */ + reg = <7>; + always-on; + }; + si5341_9: out@9 { + /* refclk9 used for PS_REF_CLK 33.3 MHz */ + reg = <9>; + always-on; + }; + }; }; i2c@2 { #address-cells = <1>; diff --git a/arch/arm64/boot/dts/xilinx/zynqmp-zcu106-revA.dts b/arch/arm64/boot/dts/xilinx/zynqmp-zcu106-revA.dts index 7910ac125101..a29ff20090ce 100644 --- a/arch/arm64/boot/dts/xilinx/zynqmp-zcu106-revA.dts +++ b/arch/arm64/boot/dts/xilinx/zynqmp-zcu106-revA.dts @@ -133,6 +133,13 @@ ina226-u75 { io-channels = <&u75 0>, <&u75 1>, <&u75 2>, <&u75 3>; }; + /* 48MHz reference crystal */ + ref48: ref48M { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <48000000>; + }; + refhdmi: refhdmi { compatible = "fixed-clock"; #clock-cells = <0>; @@ -488,7 +495,45 @@ i2c@1 { #size-cells = <0>; reg = <1>; si5341: clock-generator@36 { /* SI5341 - u69 */ + compatible = "silabs,si5341"; reg = <0x36>; + #clock-cells = <2>; + #address-cells = <1>; + #size-cells = <0>; + clocks = <&ref48>; + clock-names = "xtal"; + clock-output-names = "si5341"; + + si5341_0: out@0 { + /* refclk0 for PS-GT, used for DP */ + reg = <0>; + always-on; + }; + si5341_2: out@2 { + /* refclk2 for PS-GT, used for USB3 */ + reg = <2>; + always-on; + }; + si5341_3: out@3 { + /* refclk3 for PS-GT, used for SATA */ + reg = <3>; + always-on; + }; + si5341_6: out@6 { + /* refclk6 PL CLK125 */ + reg = <6>; + always-on; + }; + si5341_7: out@7 { + /* refclk7 PL CLK74 */ + reg = <7>; + always-on; + }; + si5341_9: out@9 { + /* refclk9 used for PS_REF_CLK 33.3 MHz */ + reg = <9>; + always-on; + }; }; }; diff --git a/arch/arm64/boot/dts/xilinx/zynqmp-zcu111-revA.dts b/arch/arm64/boot/dts/xilinx/zynqmp-zcu111-revA.dts index d9a8fdbbcae8..92b3cee62d11 100644 --- a/arch/arm64/boot/dts/xilinx/zynqmp-zcu111-revA.dts +++ b/arch/arm64/boot/dts/xilinx/zynqmp-zcu111-revA.dts @@ -116,6 +116,13 @@ ina226-u79 { compatible = "iio-hwmon"; io-channels = <&u79 0>, <&u79 1>, <&u79 2>, <&u79 3>; }; + + /* 48MHz reference crystal */ + ref48: ref48M { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <48000000>; + }; }; &dcc { @@ -374,9 +381,46 @@ i2c@1 { #size-cells = <0>; reg = <1>; si5341: clock-generator@36 { /* SI5341 - u46 */ + compatible = "silabs,si5341"; reg = <0x36>; + #clock-cells = <2>; + #address-cells = <1>; + #size-cells = <0>; + clocks = <&ref48>; + clock-names = "xtal"; + clock-output-names = "si5341"; + + si5341_0: out@0 { + /* refclk0 for PS-GT, used for DP */ + reg = <0>; + always-on; + }; + si5341_2: out@2 { + /* refclk2 for PS-GT, used for USB3 */ + reg = <2>; + always-on; + }; + si5341_3: out@3 { + /* refclk3 for PS-GT, used for SATA */ + reg = <3>; + always-on; + }; + si5341_5: out@5 { + /* refclk5 PL CLK100 */ + reg = <5>; + always-on; + }; + si5341_6: out@6 { + /* refclk6 PL CLK125 */ + reg = <6>; + always-on; + }; + si5341_9: out@9 { + /* refclk9 used for PS_REF_CLK 33.3 MHz */ + reg = <9>; + always-on; + }; }; - }; i2c@2 { #address-cells = <1>;