From patchwork Sun Jun 16 01:54:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Drew Fustini X-Patchwork-Id: 13699411 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 71B34C2BA15 for ; Sun, 16 Jun 2024 01:55:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=VKtK3rHyh1wx7g5SuddsR41YY/KlR2iSxEHl91N5R4M=; b=Xc7TVqqKBKaaVU QnS7gXGes9XB0mN3Xg9TC9SRvxJkJ5EM0chYLuwpKQ+jK1sCBtfGY6aV2PfbDSu4XEKt4xk+Ew2rI ctKSy0r3UIHf0G/S5eP3EQk0vxNv+3kp34X83d3uThARKEgHO4c6thJKprJ90ScIr4g8H2UmWyyw2 haQLe7s1h1wc83y1PLx3MBjwl8+ITuTnoReyLRDL0ZBsf58UQQ+bb9nNzRyXjF7qfoOCGyAJw4fy0 Esd6d7x6fZm2LhmRetsLTQu3gRtZVULsDeXDvdZLz4NV0k3L1K2od6dkybmT2DKYIH02YAI2TSckc GETLjDbd0GFxJB5sxBQg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sIf7K-00000006SaB-3hEj; Sun, 16 Jun 2024 01:55:38 +0000 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sIf78-00000006SW0-3ewr for linux-riscv@lists.infradead.org; Sun, 16 Jun 2024 01:55:35 +0000 Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-705cffc5bcfso2781035b3a.3 for ; Sat, 15 Jun 2024 18:55:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tenstorrent.com; s=google; t=1718502924; x=1719107724; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=tDYKB1w0bo2FQ2U8u3ozHVKFF/ufxd2dL8jVGoWI+BA=; b=P6dvCBC6nfXkRzSiOY2M6feJWR/HAlEwqcZ51EcGYVxyiEA2E7nXBErR6SCQJUrLcO CkRsvrqy71/DL6JR9xj5KBsFHk23KAQSX/x6bUZpVUk0Jy5LV3QIx7033d7nuQDFGQOO WATMvJQZ0g2tshUt9QVLLPjnO83L1jl7a+ERmYHWRF3M3raidQSRYw0eJk9Fxihz/IlW C07vB3ig/FwzhmVcxl03MSrdAqwqmbUxN6hJuIZHzyinKJ42Z2tiMlfw4x9Nh3vG+y39 Dy5FpLZB/MyGk+2LoP6xg89qbuNa4z4bJaPERGLtEKnZhZ54GBz4kk9hbgAXwi24ZP4r iGyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718502924; x=1719107724; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tDYKB1w0bo2FQ2U8u3ozHVKFF/ufxd2dL8jVGoWI+BA=; b=ZSvqu9pHFKpWIgUXGmeQigZiouAMIc6S7hznK1rsG0kIZ/GYGzZ5xOSrDBsx+Hw+1S kX5mdFfXGUX+s6B+SLUug8UoBR9rRyEHA1iWl0a7gq1AuHRuwSNn6t9deprGNbbVwZxl HeWA7pudtSI2Eh67dxeOZPZ4KT+d/xblfhBUKqQP/ABt1uGFGNnh9Jp7kqz4f6gfRq4Z cDRqqoiF3e9wPRDkdpJ2eg+ZdNBeJSiCDUmQNOCSqs/aLd5+0/Is0YZIU0Csu/rTBCHZ 5b3Elsq6IYuKiAORUzEZP+vOWNT6wTH9qd1Wve+9OmL1SNkZ3zq142W7EwyCqf2XpRUV QOdg== X-Gm-Message-State: AOJu0YzOg0gANVtWnidj3+oIdrQbNJwZiqx/b10IThnH15fo4YHCtKQ9 OX7g1NMB2KB7yT7FYxLVlH0UgVD/j908HGyc3wvQ8mlaayw1PYhz0UiepCNHigM= X-Google-Smtp-Source: AGHT+IG18IlaXbcvZxFz/RZ+ICHg8UHvP2Gwe9eELoWt80m/e4sEKPOrOsJQoQKIkdZ5LiR9EkLBzw== X-Received: by 2002:a05:6a20:729d:b0:1ad:6c36:ee82 with SMTP id adf61e73a8af0-1bae7d85496mr8941088637.13.1718502924144; Sat, 15 Jun 2024 18:55:24 -0700 (PDT) Received: from [127.0.1.1] ([2601:1c2:1802:170:1cea:28dd:2ee0:e8e5]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2c4a769aedbsm8751201a91.43.2024.06.15.18.55.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Jun 2024 18:55:23 -0700 (PDT) From: Drew Fustini Date: Sat, 15 Jun 2024 18:54:33 -0700 Subject: [PATCH 4/6] riscv: dts: thead: change TH1520 uart nodes to use clock controller MIME-Version: 1.0 Message-Id: <20240615-th1520-clk-v1-4-3ba4978c4d6b@tenstorrent.com> References: <20240615-th1520-clk-v1-0-3ba4978c4d6b@tenstorrent.com> In-Reply-To: <20240615-th1520-clk-v1-0-3ba4978c4d6b@tenstorrent.com> To: Jisheng Zhang , Guo Ren , Fu Wei , Yangtao Li , Thomas Bonnefille , Emil Renner Berthing , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Paul Walmsley , Palmer Dabbelt , Albert Ou Cc: linux-riscv@lists.infradead.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Drew Fustini X-Mailer: b4 0.12.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240615_185526_956214_739227DA X-CRM114-Status: UNSURE ( 9.08 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Change the clock property in TH1520 uart nodes to a clock provided by AP_SUBSYS clock controller. Signed-off-by: Drew Fustini --- arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts | 4 ---- .../boot/dts/thead/th1520-lichee-module-4a.dtsi | 4 ---- arch/riscv/boot/dts/thead/th1520.dtsi | 24 +++++++++++----------- 3 files changed, 12 insertions(+), 20 deletions(-) diff --git a/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts b/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts index d9b4de9e4757..164afd18b56c 100644 --- a/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts +++ b/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts @@ -52,10 +52,6 @@ &sdhci_clk { clock-frequency = <198000000>; }; -&uart_sclk { - clock-frequency = <100000000>; -}; - &dmac0 { status = "okay"; }; diff --git a/arch/riscv/boot/dts/thead/th1520-lichee-module-4a.dtsi b/arch/riscv/boot/dts/thead/th1520-lichee-module-4a.dtsi index 1365d3a512a3..1b7ede570994 100644 --- a/arch/riscv/boot/dts/thead/th1520-lichee-module-4a.dtsi +++ b/arch/riscv/boot/dts/thead/th1520-lichee-module-4a.dtsi @@ -33,10 +33,6 @@ &sdhci_clk { clock-frequency = <198000000>; }; -&uart_sclk { - clock-frequency = <100000000>; -}; - &dmac0 { status = "okay"; }; diff --git a/arch/riscv/boot/dts/thead/th1520.dtsi b/arch/riscv/boot/dts/thead/th1520.dtsi index 10a38ed55658..66df04ceb3e4 100644 --- a/arch/riscv/boot/dts/thead/th1520.dtsi +++ b/arch/riscv/boot/dts/thead/th1520.dtsi @@ -141,12 +141,6 @@ apb_clk: apb-clk-clock { #clock-cells = <0>; }; - uart_sclk: uart-sclk-clock { - compatible = "fixed-clock"; - clock-output-names = "uart_sclk"; - #clock-cells = <0>; - }; - sdhci_clk: sdhci-clock { compatible = "fixed-clock"; clock-frequency = <198000000>; @@ -195,7 +189,8 @@ uart0: serial@ffe7014000 { compatible = "snps,dw-apb-uart"; reg = <0xff 0xe7014000 0x0 0x100>; interrupts = <36 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&uart_sclk>; + clocks = <&clk CLK_UART_SCLK>, <&clk CLK_UART0_PCLK>; + clock-names = "baudclk", "apb_pclk"; reg-shift = <2>; reg-io-width = <4>; status = "disabled"; @@ -232,7 +227,8 @@ uart1: serial@ffe7f00000 { compatible = "snps,dw-apb-uart"; reg = <0xff 0xe7f00000 0x0 0x100>; interrupts = <37 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&uart_sclk>; + clocks = <&clk CLK_UART_SCLK>, <&clk CLK_UART1_PCLK>; + clock-names = "baudclk", "apb_pclk"; reg-shift = <2>; reg-io-width = <4>; status = "disabled"; @@ -242,7 +238,8 @@ uart3: serial@ffe7f04000 { compatible = "snps,dw-apb-uart"; reg = <0xff 0xe7f04000 0x0 0x100>; interrupts = <39 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&uart_sclk>; + clocks = <&clk CLK_UART_SCLK>, <&clk CLK_UART3_PCLK>; + clock-names = "baudclk", "apb_pclk"; reg-shift = <2>; reg-io-width = <4>; status = "disabled"; @@ -324,7 +321,8 @@ uart2: serial@ffec010000 { compatible = "snps,dw-apb-uart"; reg = <0xff 0xec010000 0x0 0x4000>; interrupts = <38 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&uart_sclk>; + clocks = <&clk CLK_UART_SCLK>, <&clk CLK_UART2_PCLK>; + clock-names = "baudclk", "apb_pclk"; reg-shift = <2>; reg-io-width = <4>; status = "disabled"; @@ -386,7 +384,8 @@ uart4: serial@fff7f08000 { compatible = "snps,dw-apb-uart"; reg = <0xff 0xf7f08000 0x0 0x4000>; interrupts = <40 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&uart_sclk>; + clocks = <&clk CLK_UART_SCLK>, <&clk CLK_UART4_PCLK>; + clock-names = "baudclk", "apb_pclk"; reg-shift = <2>; reg-io-width = <4>; status = "disabled"; @@ -396,7 +395,8 @@ uart5: serial@fff7f0c000 { compatible = "snps,dw-apb-uart"; reg = <0xff 0xf7f0c000 0x0 0x4000>; interrupts = <41 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&uart_sclk>; + clocks = <&clk CLK_UART_SCLK>, <&clk CLK_UART5_PCLK>; + clock-names = "baudclk", "apb_pclk"; reg-shift = <2>; reg-io-width = <4>; status = "disabled";