From patchwork Thu Jan 2 20:41:21 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: E Shattow X-Patchwork-Id: 13924933 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 D4878E77198 for ; Thu, 2 Jan 2025 20:45:58 +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:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/AfD3/LLK/LUQrnl+Av6U5hyJAJW76BVNNfqr9a1lw4=; b=KXZpqhU3MGK2wV anQ3143TvNM/EAYyrhnLgoibPvCxykdbHH7cictolAoQlS97eZ1TC0GNXOO0tA6LQ6CdTeEiHB0uc xs0s+yINjkB5s9PI3J6b1IuhCUfRauFWDlIk6fsCEA5Mf0MMzOiqV44bOy0Zjrg45tfz8xawttvO+ YSCA9HMwBVMLRkoFpJa9lHMw/+heXarfi0GG3WNU3GNcPtP88SQcuyRr9ia/EwLNyFzt6UwV2TlLv lNQ+7TopEVkqA5JT45OPnH1WTt5K3NFlSH6wpOV6oY2+kDP4QVCM8Te6qytSoVDruGymryojHzJvZ zb9sE1TVYqj3pLND4rJw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tTS4m-0000000BQFt-3jFZ; Thu, 02 Jan 2025 20:45:52 +0000 Received: from freeshell.de ([116.202.128.144]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tTS1G-0000000BPdi-2THM for linux-riscv@lists.infradead.org; Thu, 02 Jan 2025 20:42:15 +0000 Received: from hay.lan. (unknown [IPv6:2605:59c8:31de:bf00:6ecf:39ff:fe00:8375]) (Authenticated sender: e) by freeshell.de (Postfix) with ESMTPSA id EE03FB221E12; Thu, 2 Jan 2025 21:42:10 +0100 (CET) From: E Shattow To: Conor Dooley , Emil Renner Berthing , Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou Cc: linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, E Shattow Subject: [RFC PATCH v1 1/3] riscv: dts: starfive: jh7110: add timer node Date: Thu, 2 Jan 2025 12:41:21 -0800 Message-ID: <20250102204137.423081-2-e@freeshell.de> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20250102204137.423081-1-e@freeshell.de> References: <20250102204137.423081-1-e@freeshell.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250102_124214_771764_91025E7A X-CRM114-Status: UNSURE ( 6.79 ) 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 no idea if this does anything useful; not needed for boot Signed-off-by: E Shattow --- arch/riscv/boot/dts/starfive/jh7110.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/riscv/boot/dts/starfive/jh7110.dtsi b/arch/riscv/boot/dts/starfive/jh7110.dtsi index 0d8339357bad..0bc922b3ae8a 100644 --- a/arch/riscv/boot/dts/starfive/jh7110.dtsi +++ b/arch/riscv/boot/dts/starfive/jh7110.dtsi @@ -344,6 +344,15 @@ tdm_ext: tdm-ext-clock { #clock-cells = <0>; }; + timer { + compatible = "riscv, timer"; + interrupts-extended = <&cpu0_intc 5>, + <&cpu1_intc 5>, + <&cpu2_intc 5>, + <&cpu3_intc 5>, + <&cpu4_intc 5>; + }; + soc { compatible = "simple-bus"; interrupt-parent = <&plic>; From patchwork Thu Jan 2 20:41:22 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: E Shattow X-Patchwork-Id: 13924931 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 CF913E77188 for ; Thu, 2 Jan 2025 20:45:57 +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:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5eXuM0cCGQLjEoxJGnZGRXKJrvETiOHxXvp6DeaojZg=; b=mcC/8YNHA3t+nH 82CcaXn8SzD3eM3exwBF4KxM2a/MSJtx1VONAXhCtNDtHqQWthzE/j2exC19DRLwynV16g6nhUP2T v1f2btt10DgB+lDRmiAv5N5yD+DVe8maLBJEtBdyGsPAUxCtKL3IZda3PyMyg/g9LB+toiWP8sDin AgxZ9z2/dOXGfvovlxVB6fg+IvWyiQm7T84RC3G+WDHJ9Y/7VdkaoyzLEFmKD7xSlJKV/IXQ0Uc5o KR8INUn5J1hqbGf3n5Fct/ezap88EifSXiIXyOvNPt6DzZr0azqohFu9+eNF7x706MDyyIuDQMPgk cqh+r3k2fmiPZfODi4fQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tTS4n-0000000BQG2-2C1m; Thu, 02 Jan 2025 20:45:53 +0000 Received: from freeshell.de ([2a01:4f8:231:482b::2]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tTS1M-0000000BPeW-1xs0 for linux-riscv@lists.infradead.org; Thu, 02 Jan 2025 20:42:21 +0000 Received: from hay.lan. (unknown [IPv6:2605:59c8:31de:bf00:6ecf:39ff:fe00:8375]) (Authenticated sender: e) by freeshell.de (Postfix) with ESMTPSA id B1FF5B220C7F; Thu, 2 Jan 2025 21:42:16 +0100 (CET) From: E Shattow To: Emil Renner Berthing , Conor Dooley , Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou Cc: linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, E Shattow Subject: [RFC PATCH v1 2/3] riscv: dts: starfive: jh7110: add DRAM memory controller node Date: Thu, 2 Jan 2025 12:41:22 -0800 Message-ID: <20250102204137.423081-3-e@freeshell.de> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20250102204137.423081-1-e@freeshell.de> References: <20250102204137.423081-1-e@freeshell.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250102_124220_674000_1D6ED55B X-CRM114-Status: UNSURE ( 7.01 ) 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 add DRAM memory controller node (no driver), required for U-Boot to boot successfully. Signed-off-by: E Shattow --- arch/riscv/boot/dts/starfive/jh7110.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/riscv/boot/dts/starfive/jh7110.dtsi b/arch/riscv/boot/dts/starfive/jh7110.dtsi index 0bc922b3ae8a..6948974400c1 100644 --- a/arch/riscv/boot/dts/starfive/jh7110.dtsi +++ b/arch/riscv/boot/dts/starfive/jh7110.dtsi @@ -381,6 +381,19 @@ ccache: cache-controller@2010000 { cache-unified; }; + dmc: dmc@15700000 { + compatible = "starfive,jh7110-dmc"; + reg = <0x0 0x15700000 0x0 0x10000>, + <0x0 0x13000000 0x0 0x10000>; + resets = <&syscrg JH7110_SYSRST_DDR_AXI>, + <&syscrg JH7110_SYSRST_DDR_OSC>, + <&syscrg JH7110_SYSRST_DDR_APB>; + reset-names = "axi", "osc", "apb"; + clocks = <&syscrg JH7110_PLLCLK_PLL1_OUT>; + clock-names = "pll1_out"; + clock-frequency = <2133>; + }; + plic: interrupt-controller@c000000 { compatible = "starfive,jh7110-plic", "sifive,plic-1.0.0"; reg = <0x0 0xc000000 0x0 0x4000000>; From patchwork Thu Jan 2 20:41:23 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: E Shattow X-Patchwork-Id: 13924932 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 B02DDE77197 for ; Thu, 2 Jan 2025 20:45:58 +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:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=UlIQaEU/IbRaZbAFmvUMKn7N7qwE2QBCYVpd7jKVJF8=; b=AH/fAEuVdC21L7 E8RrfcSCrdMyfWbU8IjLCr/k4Y5GhxUX4gExAyAGdAgqx7rYEZQNOATv3JLGtNgYcTqI/Tda0S6do Nl5AdjEihvHupqgXrIavfWvlkfvKP946l/RsstpTVcielrRAhTxlBLCHuYnMHz7Re4Z31YFeozbP8 olkBpfV4tEevm4K594NBAz0EiR1bm5tQaIXCowOzHtvWXvc1Mx3Ne/Zbom7MUjx0YRMhmWweqYpWC cjt+XpnT0p4soEEyEWbeGpVpS5NiEwP1j1BKOoyRxvH0CQRFvA6qKjrueJXNOnc0lvPdrXuzoEvIT zNNFTHlSXYjWq8A2tKIw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tTS4o-0000000BQGx-14rY; Thu, 02 Jan 2025 20:45:54 +0000 Received: from freeshell.de ([2a01:4f8:231:482b::2]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tTS1S-0000000BPg8-12R2 for linux-riscv@lists.infradead.org; Thu, 02 Jan 2025 20:42:27 +0000 Received: from hay.lan. (unknown [IPv6:2605:59c8:31de:bf00:6ecf:39ff:fe00:8375]) (Authenticated sender: e) by freeshell.de (Postfix) with ESMTPSA id C58F8B220C7F; Thu, 2 Jan 2025 21:42:22 +0100 (CET) From: E Shattow To: Emil Renner Berthing , Conor Dooley , Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou Cc: linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, E Shattow Subject: [RFC PATCH v1 3/3] riscv: dts: starfive: jh7110: bootph-pre-ram hinting needed by boot loader Date: Thu, 2 Jan 2025 12:41:23 -0800 Message-ID: <20250102204137.423081-4-e@freeshell.de> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20250102204137.423081-1-e@freeshell.de> References: <20250102204137.423081-1-e@freeshell.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250102_124226_425540_C8034D02 X-CRM114-Status: UNSURE ( 6.61 ) 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 Add bootph-pre-ram hinting to jh7110.dtsi: - CPU interrupt controller(s) - timer - DRAM memory controller - oscillator - syscrg clock-controller - (optional) dma controller - (optional) aoncrg clock-controller With this the U-Boot SPL secondary program loader may drop such overrides when using dt-rebasing with JH7110 OF_UPSTREAM board targets. Signed-off-by: E Shattow --- arch/riscv/boot/dts/starfive/jh7110.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/riscv/boot/dts/starfive/jh7110.dtsi b/arch/riscv/boot/dts/starfive/jh7110.dtsi index 6948974400c1..4f19b88fe73f 100644 --- a/arch/riscv/boot/dts/starfive/jh7110.dtsi +++ b/arch/riscv/boot/dts/starfive/jh7110.dtsi @@ -37,6 +37,7 @@ cpu0_intc: interrupt-controller { compatible = "riscv,cpu-intc"; interrupt-controller; #interrupt-cells = <1>; + bootph-pre-ram; }; }; @@ -70,6 +71,7 @@ cpu1_intc: interrupt-controller { compatible = "riscv,cpu-intc"; interrupt-controller; #interrupt-cells = <1>; + bootph-pre-ram; }; }; @@ -103,6 +105,7 @@ cpu2_intc: interrupt-controller { compatible = "riscv,cpu-intc"; interrupt-controller; #interrupt-cells = <1>; + bootph-pre-ram; }; }; @@ -136,6 +139,7 @@ cpu3_intc: interrupt-controller { compatible = "riscv,cpu-intc"; interrupt-controller; #interrupt-cells = <1>; + bootph-pre-ram; }; }; @@ -169,6 +173,7 @@ cpu4_intc: interrupt-controller { compatible = "riscv,cpu-intc"; interrupt-controller; #interrupt-cells = <1>; + bootph-pre-ram; }; }; @@ -323,6 +328,7 @@ osc: oscillator { compatible = "fixed-clock"; clock-output-names = "osc"; #clock-cells = <0>; + bootph-pre-ram; }; rtc_osc: rtc-oscillator { @@ -368,6 +374,7 @@ clint: timer@2000000 { <&cpu2_intc 3>, <&cpu2_intc 7>, <&cpu3_intc 3>, <&cpu3_intc 7>, <&cpu4_intc 3>, <&cpu4_intc 7>; + bootph-pre-ram; }; ccache: cache-controller@2010000 { @@ -382,6 +389,7 @@ ccache: cache-controller@2010000 { }; dmc: dmc@15700000 { + bootph-pre-ram; compatible = "starfive,jh7110-dmc"; reg = <0x0 0x15700000 0x0 0x10000>, <0x0 0x13000000 0x0 0x10000>; @@ -916,6 +924,7 @@ syscrg: clock-controller@13020000 { "pll0_out", "pll1_out", "pll2_out"; #clock-cells = <1>; #reset-cells = <1>; + bootph-pre-ram; }; sys_syscon: syscon@13030000 { @@ -1098,6 +1107,7 @@ dma: dma-controller@16050000 { snps,block-size = <65536 65536 65536 65536>; snps,priority = <0 1 2 3>; snps,axi-max-burst-len = <16>; + bootph-pre-ram; }; aoncrg: clock-controller@17000000 { @@ -1115,6 +1125,7 @@ aoncrg: clock-controller@17000000 { "rtc_osc"; #clock-cells = <1>; #reset-cells = <1>; + bootph-pre-ram; }; aon_syscon: syscon@17010000 {