From patchwork Thu Jul 11 16:56:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Drew Fustini X-Patchwork-Id: 13730904 Received: from mail-ot1-f51.google.com (mail-ot1-f51.google.com [209.85.210.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B1F7D16EB58 for ; Thu, 11 Jul 2024 16:56:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720716998; cv=none; b=fRirpKVhVJwngCMpl3WHUg55YbcABloQAwcwUxpM/gaynnIflwZEFeRruP/WPSmJH2TmhAvCa7inlQuhtJqfKFrgcdGMsvxStn1YhiNZhJQnZ7qmX14iZaHGKTbQzO/DPTuLLwN0a7+NyIvwPdr/FvmqQeg6Z4HNj34LiavkTUg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720716998; c=relaxed/simple; bh=SbrKbjP9HrE9knhFbrY+EYErtsxWNVunfI1xMyBiezU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=F+V7/ZGBFWB0nBhfgHEm3zqWEkeX09e2wsF2zLAeLqBK1IlI2MIwFlBOOM7y8dRITwGUlHRnHzF16ZytQzcKxKabCqtEqNUcQ+TmbO6RUM8wNI1zMxlHspUHsp/gldEu/G2G2nDEYZMq2G5Rhd7eDY7jvvoz2zhUFWaWS5HkM/0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=tenstorrent.com; spf=pass smtp.mailfrom=tenstorrent.com; dkim=pass (2048-bit key) header.d=tenstorrent.com header.i=@tenstorrent.com header.b=ckve2K7m; arc=none smtp.client-ip=209.85.210.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=tenstorrent.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tenstorrent.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tenstorrent.com header.i=@tenstorrent.com header.b="ckve2K7m" Received: by mail-ot1-f51.google.com with SMTP id 46e09a7af769-704473c0698so542019a34.3 for ; Thu, 11 Jul 2024 09:56:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tenstorrent.com; s=google; t=1720716996; x=1721321796; darn=vger.kernel.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=xP2OaE3Tmwgvn0E4Ola04pPSwphXRoqY7WXxjCPr0EA=; b=ckve2K7mbwTK/Xvtywlung2L53JWOvVr3J3Gja9FiV+KEs/N39rlC/lqY6qMyg70lx nsPR4Tqs2CBVh10KE+ylJG1OkMsHYnD3cwtvZkCB0pQx6SpdIFuAzfI5qH2dp22ikPBt 5W2QZryKu3kWdn2aDPHTSdFQgcfCvjHA8D/pmXyM5r1DorunYuRh59B9nQRHipWSlggM 5XtTmfLzAbTAbqgLK8XCeSIA1Rc1Z62koWMm3qsBBclN+6U352wQdawBywmMjtnloqeS /3uPE3vosgka6EUIAHp1SXd8fBBUdGyABGygYqrlNNSC+m71spw1k39rK8Qg4R3vDnAx aZhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720716996; x=1721321796; 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=xP2OaE3Tmwgvn0E4Ola04pPSwphXRoqY7WXxjCPr0EA=; b=hnPX00kcQmKDeM7zN4MRjEDtSUWGQmxZLoV1/m84cF+MsPgywjfPm+YTP31sXz0XFE SrY8Ct2Rqvf2Vi2dLu8GLd/NkWypvGVqY2MJpM/7nyECrGHfSmOQctMl6+0Qc28dglh5 9IZJJfW32NtgHWZpundvcDB01GJzXxDaQ0GLr3cPfIjH5X56xiEUdd4oakRgT+dMgQdE lyQ1lt3tGdWgfOesWLgcM1mv/f+u2ekjDaHpUyIG7q5WQvqpvl/gOxJnQeWxBYdY7KqV sYUAj7uqsolFb0uFY7Ih/0hfXxvVszY454ivdmLI20U3sL8oXY1in5qWy4V1G9k91NMh 7IXw== X-Forwarded-Encrypted: i=1; AJvYcCUkUVaxJZxoroJYCitwdcakYf3aWy3tVajZLsyPnAvTZkhcfGrfjogJ+pNXNO0giydT7QQFNOfjyewDBifEtocuwk+P5NoD+12B X-Gm-Message-State: AOJu0Yz+9IlWb8NTFI7iIdyUn14PoaoxI0oFqz7XTGXkIl91YaYOgDRM zzsOZeuq2aYPL6sbTg1SFgSthQBXV3jKCgtoUhilgtz1z+HPpqqa/riFf9+wr9M= X-Google-Smtp-Source: AGHT+IFpjkCHBHOqJ28iyDK9YRSjs6qFqsZuEPtegvqPUiJkgrWahk2gMval4RPQxaSagii6iKO6gQ== X-Received: by 2002:a05:6359:b93:b0:1a4:1351:9c9c with SMTP id e5c5f4694b2df-1aade1271camr695279455d.29.1720716995711; Thu, 11 Jul 2024 09:56:35 -0700 (PDT) Received: from [127.0.1.1] ([2601:1c2:1802:170:5ee9:fea0:d9de:cee8]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-787089bc5f6sm1360038a12.92.2024.07.11.09.56.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jul 2024 09:56:35 -0700 (PDT) From: Drew Fustini Date: Thu, 11 Jul 2024 09:56:24 -0700 Subject: [PATCH v3 6/7] riscv: dts: thead: update TH1520 dma and timer nodes to use clock controller Precedence: bulk X-Mailing-List: linux-clk@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240711-th1520-clk-v3-6-6ff17bb318fb@tenstorrent.com> References: <20240711-th1520-clk-v3-0-6ff17bb318fb@tenstorrent.com> In-Reply-To: <20240711-th1520-clk-v3-0-6ff17bb318fb@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=1720716985; l=4931; i=dfustini@tenstorrent.com; s=20230430; h=from:subject:message-id; bh=SbrKbjP9HrE9knhFbrY+EYErtsxWNVunfI1xMyBiezU=; b=WDiLeijUC5umVxfBGXR8J6mW5IaQwccj+b6cXnR4L6231y11sre+HIcgSdKtTfvk8kgao1XQ9 y/Bzm08N9tfCpF+3+z6JAXh8vLKuANz2ymtNrfobAeO5J0C9YkBDhd1 X-Developer-Key: i=dfustini@tenstorrent.com; a=ed25519; pk=p3GKE9XFmjhwAayAHG4U108yag7V8xQVd4zJLdW0g7g= Change the dma-controller and timer nodes to use the APB clock provided by the AP_SUBSYS clock controller. Remove apb_clk reference from BeagleV Ahead and LPI4a dts. Link: https://git.beagleboard.org/beaglev-ahead/beaglev-ahead/-/tree/main/docs 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, 9 insertions(+), 23 deletions(-) diff --git a/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts b/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts index 55f1ed0cb433..1180e41c7b07 100644 --- a/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts +++ b/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts @@ -44,10 +44,6 @@ &osc_32k { clock-frequency = <32768>; }; -&apb_clk { - clock-frequency = <62500000>; -}; - &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 762eceb415f8..78977bdbbe3d 100644 --- a/arch/riscv/boot/dts/thead/th1520-lichee-module-4a.dtsi +++ b/arch/riscv/boot/dts/thead/th1520-lichee-module-4a.dtsi @@ -25,10 +25,6 @@ &osc_32k { clock-frequency = <32768>; }; -&apb_clk { - clock-frequency = <62500000>; -}; - &dmac0 { status = "okay"; }; diff --git a/arch/riscv/boot/dts/thead/th1520.dtsi b/arch/riscv/boot/dts/thead/th1520.dtsi index ce3a0847aa9c..d05002ad7c96 100644 --- a/arch/riscv/boot/dts/thead/th1520.dtsi +++ b/arch/riscv/boot/dts/thead/th1520.dtsi @@ -135,12 +135,6 @@ osc_32k: 32k-oscillator { #clock-cells = <0>; }; - apb_clk: apb-clk-clock { - compatible = "fixed-clock"; - clock-output-names = "apb_clk"; - #clock-cells = <0>; - }; - soc { compatible = "simple-bus"; interrupt-parent = <&plic>; @@ -325,7 +319,7 @@ dmac0: dma-controller@ffefc00000 { compatible = "snps,axi-dma-1.01a"; reg = <0xff 0xefc00000 0x0 0x1000>; interrupts = <27 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&apb_clk>, <&apb_clk>; + clocks = <&clk CLK_PERI_APB_PCLK>, <&clk CLK_PERI_APB_PCLK>; clock-names = "core-clk", "cfgr-clk"; #dma-cells = <1>; dma-channels = <4>; @@ -340,7 +334,7 @@ dmac0: dma-controller@ffefc00000 { timer0: timer@ffefc32000 { compatible = "snps,dw-apb-timer"; reg = <0xff 0xefc32000 0x0 0x14>; - clocks = <&apb_clk>; + clocks = <&clk CLK_PERI_APB_PCLK>; clock-names = "timer"; interrupts = <16 IRQ_TYPE_LEVEL_HIGH>; status = "disabled"; @@ -349,7 +343,7 @@ timer0: timer@ffefc32000 { timer1: timer@ffefc32014 { compatible = "snps,dw-apb-timer"; reg = <0xff 0xefc32014 0x0 0x14>; - clocks = <&apb_clk>; + clocks = <&clk CLK_PERI_APB_PCLK>; clock-names = "timer"; interrupts = <17 IRQ_TYPE_LEVEL_HIGH>; status = "disabled"; @@ -358,7 +352,7 @@ timer1: timer@ffefc32014 { timer2: timer@ffefc32028 { compatible = "snps,dw-apb-timer"; reg = <0xff 0xefc32028 0x0 0x14>; - clocks = <&apb_clk>; + clocks = <&clk CLK_PERI_APB_PCLK>; clock-names = "timer"; interrupts = <18 IRQ_TYPE_LEVEL_HIGH>; status = "disabled"; @@ -367,7 +361,7 @@ timer2: timer@ffefc32028 { timer3: timer@ffefc3203c { compatible = "snps,dw-apb-timer"; reg = <0xff 0xefc3203c 0x0 0x14>; - clocks = <&apb_clk>; + clocks = <&clk CLK_PERI_APB_PCLK>; clock-names = "timer"; interrupts = <19 IRQ_TYPE_LEVEL_HIGH>; status = "disabled"; @@ -398,7 +392,7 @@ uart5: serial@fff7f0c000 { timer4: timer@ffffc33000 { compatible = "snps,dw-apb-timer"; reg = <0xff 0xffc33000 0x0 0x14>; - clocks = <&apb_clk>; + clocks = <&clk CLK_PERI_APB_PCLK>; clock-names = "timer"; interrupts = <20 IRQ_TYPE_LEVEL_HIGH>; status = "disabled"; @@ -407,7 +401,7 @@ timer4: timer@ffffc33000 { timer5: timer@ffffc33014 { compatible = "snps,dw-apb-timer"; reg = <0xff 0xffc33014 0x0 0x14>; - clocks = <&apb_clk>; + clocks = <&clk CLK_PERI_APB_PCLK>; clock-names = "timer"; interrupts = <21 IRQ_TYPE_LEVEL_HIGH>; status = "disabled"; @@ -416,7 +410,7 @@ timer5: timer@ffffc33014 { timer6: timer@ffffc33028 { compatible = "snps,dw-apb-timer"; reg = <0xff 0xffc33028 0x0 0x14>; - clocks = <&apb_clk>; + clocks = <&clk CLK_PERI_APB_PCLK>; clock-names = "timer"; interrupts = <22 IRQ_TYPE_LEVEL_HIGH>; status = "disabled"; @@ -425,7 +419,7 @@ timer6: timer@ffffc33028 { timer7: timer@ffffc3303c { compatible = "snps,dw-apb-timer"; reg = <0xff 0xffc3303c 0x0 0x14>; - clocks = <&apb_clk>; + clocks = <&clk CLK_PERI_APB_PCLK>; clock-names = "timer"; interrupts = <23 IRQ_TYPE_LEVEL_HIGH>; status = "disabled";