From patchwork Tue May 7 04:55:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Drew Fustini X-Patchwork-Id: 13656256 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 9DDD9C25B75 for ; Tue, 7 May 2024 04:57:52 +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=wbcQidmn1WeKSKERSYxuH4rnhYuO3z3obgpeSQQulCg=; b=YJvqwHYTMQwciP NV62OBC03oBhzeaMXzcaqT6RyaGg8hOZQAZtZH2wKJUN34MqiD8FrGh4YeoXQNGQ0y4rk8dIfG9CT 5tD9kPtfMq4+fDocVOtVYb27t8luT0l7jFa2W52VpoYRKj+oP2JH5KR7BUac4wJ/PpZauc8ga3Q9l EOWiJtCNCYjITwmB4ac11aWWpf0Ahii1Jto5260aSSe0eSqV0clLHFWwev7DeOGl2NjH+APBxZKHs qKm3F1SmkuEdG1vABVhlSbxGA8s+DCbVqNIbkcxdHMWvN5jJNlhXy29l402Gd/Lpwm9wvZ8rYPQej i8wUDA2rqYZeQfv8qVyg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4Ctc-00000009d5v-49En; Tue, 07 May 2024 04:57:44 +0000 Received: from mail-yw1-x1135.google.com ([2607:f8b0:4864:20::1135]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4CtV-00000009czi-2p2v for linux-riscv@lists.infradead.org; Tue, 07 May 2024 04:57:39 +0000 Received: by mail-yw1-x1135.google.com with SMTP id 00721157ae682-61bed738438so29219187b3.2 for ; Mon, 06 May 2024 21:57:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tenstorrent.com; s=google; t=1715057856; x=1715662656; 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=lV76EE0lGVh0xzAlFnhOqZDL/IraInUMutR8RQKZJGs=; b=MpwT24hYSInyPE7OTS5uIzkJRFZbX/+3a1NFI9B4kvZttueaAnEX9Ho2KVXOqgfzuV Wxsw/8hWl/lvj3KQdmCDf6m8TmJDRqyF+B5PmqAzKG084W0bTujiBosvEkgJyBr2hXFt sd1yw25Y5G1rj1/0ygy0Uh1ALDodFtcSZ/eKGdLeSnfjbUKoe9K10hdWohG2Z6TYRWhr s4l4Oo2jY6FnmoAvkH86smMgft+iqNVA701aaQ70AKBoZgg14pxia5VSSvuJvk3Fg9Gz 3IG9OtNOVwjZtpdlDNbXcObdcDIcsrScY1nqXR04sclDb9eYI9ku+o1ufU6nDzRURLGt eN9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715057856; x=1715662656; 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=lV76EE0lGVh0xzAlFnhOqZDL/IraInUMutR8RQKZJGs=; b=QDhsg2okzfRqn6Rl5QT3l3FeC6m3PGlef5QTWtFcqxP322A//Qt0MSASrHzMkUj8jQ riyvGM3AnafKgf3VVEWzDRJxG7hMBvQUvCujE8yHy/VP1R/ARS8FIaQxj9Zp7vxrurMZ 28ikMKK1cvjIsYgl61pmK+MAV5hlP+M2Fr/wjHRiIgwi/YcGie+GLKnFrOjUAJhBUbq2 3jmdGKH5UCEq5kY/wJsKDATnS3J5WMyO3Q6sUI5genyJPCUij2Gn4s8CNBUahpUmRe/e RpIalLIfrMGD5Rnf46eiAZOqAIkEr2yMty44EDlS6bRNwJOgkV5EPhM19ttQLZn2gUAi RBlA== X-Gm-Message-State: AOJu0YyYqQvR9GaQ94MwKyZV1DYd8wxnTsux7KjNchhVGET3kHdM+E5M XCNmDMhP7wvl1n8Rv2kQP5BWaOaawfSukRrok4x/lDGJx7c/6PWBNazCrejJ5A4= X-Google-Smtp-Source: AGHT+IHn3CGUiKT0eCJa4EZLbe1UYY3849cLrpLUve0RTVfZ9uR7rnnwR8WOzgqSjFGllwczviF4tg== X-Received: by 2002:a0d:d883:0:b0:61e:124c:e73b with SMTP id a125-20020a0dd883000000b0061e124ce73bmr11735126ywe.28.1715057855467; Mon, 06 May 2024 21:57:35 -0700 (PDT) Received: from [127.0.1.1] ([2601:1c2:1802:170:6870:7119:e255:c3a0]) by smtp.gmail.com with ESMTPSA id o14-20020a637e4e000000b005f80aced5f3sm8987249pgn.0.2024.05.06.21.57.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 21:57:35 -0700 (PDT) From: Drew Fustini Date: Mon, 06 May 2024 21:55:18 -0700 Subject: [PATCH RFC v3 5/7] riscv: dts: thead: change TH1520 uart nodes to use clock controller MIME-Version: 1.0 Message-Id: <20240506-th1520-clk-v3-5-085a18a23a7f@tenstorrent.com> References: <20240506-th1520-clk-v3-0-085a18a23a7f@tenstorrent.com> In-Reply-To: <20240506-th1520-clk-v3-0-085a18a23a7f@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.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1715057849; l=4110; i=dfustini@tenstorrent.com; s=20230430; h=from:subject:message-id; bh=52sEPjDrM2eROoC2nwe3EiBnyP8Dcq8Rt5meeISouww=; b=HmEeRhWb790IkFfO3C5BC2jB3AYXLPWOY7mhRD44oal2XW7/ZwuGHe1i92UCCZqb4bhapFIyY XN1gFmAudK9C5BUsbr5GFCWbE0xZbA90aO1ILnVV4OMXti18mT5HORG X-Developer-Key: i=dfustini@tenstorrent.com; a=ed25519; pk=p3GKE9XFmjhwAayAHG4U108yag7V8xQVd4zJLdW0g7g= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240506_215737_854333_9581D2DE X-CRM114-Status: UNSURE ( 9.11 ) 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 e193f8d9ab8a..963c786f3c53 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>; @@ -196,7 +190,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"; @@ -233,7 +228,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"; @@ -243,7 +239,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"; @@ -325,7 +322,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"; @@ -387,7 +385,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"; @@ -397,7 +396,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";