From nobody Mon Feb 9 11:34:05 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 726D215E5C3; Wed, 10 Apr 2024 13:19:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712755156; cv=none; b=hrqLoWwLuNbGAw5vOkBfac+fTRoMDEMK4GvdubyZ0/HjSwG+On4CHZ/zj8crQ34I9BOtDQAoK1vsvG+WxYeekkHShha4+r08pymmPyCgDJHvekCDw+quHtudCrFkug+acqmNq4M3NOt7llEocfuOBdosq+WdGmq1H45OmeHxvGA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712755156; c=relaxed/simple; bh=5O4fmy2vjH3L0s3zrjGmErdy2p3sZ4emy2NNtUuD/Vs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JektFyQfyUoRp43d86yKrS9jcH4CQK5sZf/QzyPa4tZfFPu8PFHk2etcaZxu9Z3eDs+088sCUUDet/gdmb1vh/GmlSFOtEYOxuFVwTEcwXZeu+lJI/43H7AK+yqJuPtjKqJy4B3v9GIeZpSLscBRC+lD5oI1xy2b8zs8oeAxgVY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E6B14C433C7; Wed, 10 Apr 2024 13:19:13 +0000 (UTC) From: Huacai Chen To: Huacai Chen Cc: loongarch@lists.linux.dev, Xuefeng Li , Guo Ren , Xuerui Wang , Jiaxun Yang , linux-kernel@vger.kernel.org, loongson-kernel@lists.loongnix.cn, Huacai Chen Subject: [PATCH 1/4] LoongArch: Update dts for Loongson-2K1000 to support ISA/LPC Date: Wed, 10 Apr 2024 21:18:01 +0800 Message-ID: <20240410131804.2165848-2-chenhuacai@loongson.cn> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240410131804.2165848-1-chenhuacai@loongson.cn> References: <20240410131804.2165848-1-chenhuacai@loongson.cn> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Some Loongson-2K1000 platforms have ISA/LPC devices such as Super-IO, define an ISA node in the dts file to avoid access error. Signed-off-by: Huacai Chen --- arch/loongarch/boot/dts/loongson-2k1000.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/loongarch/boot/dts/loongson-2k1000.dtsi b/arch/loongarch/= boot/dts/loongson-2k1000.dtsi index 49a70f8c3cab..b6aeb1f70e2a 100644 --- a/arch/loongarch/boot/dts/loongson-2k1000.dtsi +++ b/arch/loongarch/boot/dts/loongson-2k1000.dtsi @@ -100,6 +100,13 @@ bus@10000000 { #size-cells =3D <2>; dma-coherent; =20 + isa@18000000 { + compatible =3D "isa"; + #size-cells =3D <1>; + #address-cells =3D <2>; + ranges =3D <1 0x0 0x0 0x18000000 0x4000>; + }; + liointc0: interrupt-controller@1fe01400 { compatible =3D "loongson,liointc-2.0"; reg =3D <0x0 0x1fe01400 0x0 0x40>, --=20 2.43.0 From nobody Mon Feb 9 11:34:05 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 97AC915E801; Wed, 10 Apr 2024 13:20:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712755201; cv=none; b=STynnCeTKrc2r0GHMxqVYHCTVKqawsF5y9Oq0JM84TPJlueM9nH6NPCV9YGSflLMB8/KQk7NbarEHOlSAd2hIB/EKQJda0ES1Caci7EwOy3x7NIimZuTQN/xDgeGDf4DaLK8ipiXz+X/nzCzDxvPaSjtq1axZaFmQtzQTVajTDE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712755201; c=relaxed/simple; bh=Y2xFVKVJYXpxExcTVw1OG0qaRy+eheyCTegub5oKido=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BH4HxZFGGpZMPM/DTIdOXFVwl1prWz9xFC2lPkQoBz7hZgL4G3b5QATW1JIBEOocDgIw9fs75JYt72DGvzI+39n1NENNY2uu+AOHGon3bQ+eoFzNnsCtLspfbic54Jfr+buC2oGkAVx6bRmYLVYaDWgI2qTIYuLOFyRMVCwK0oI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0EA4EC433F1; Wed, 10 Apr 2024 13:19:58 +0000 (UTC) From: Huacai Chen To: Huacai Chen Cc: loongarch@lists.linux.dev, Xuefeng Li , Guo Ren , Xuerui Wang , Jiaxun Yang , linux-kernel@vger.kernel.org, loongson-kernel@lists.loongnix.cn, Huacai Chen Subject: [PATCH 2/4] LoongArch: Update dts for Loongson-2K2000 to support ISA/LPC Date: Wed, 10 Apr 2024 21:18:02 +0800 Message-ID: <20240410131804.2165848-3-chenhuacai@loongson.cn> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240410131804.2165848-1-chenhuacai@loongson.cn> References: <20240410131804.2165848-1-chenhuacai@loongson.cn> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Some Loongson-2K2000 platforms have ISA/LPC devices such as Super-IO, define an ISA node in the dts file to avoid access error. Also adjust the PCI io resource range to avoid confliction. Signed-off-by: Huacai Chen --- arch/loongarch/boot/dts/loongson-2k2000.dtsi | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/loongarch/boot/dts/loongson-2k2000.dtsi b/arch/loongarch/= boot/dts/loongson-2k2000.dtsi index a231949b5f55..dcee9f3783fd 100644 --- a/arch/loongarch/boot/dts/loongson-2k2000.dtsi +++ b/arch/loongarch/boot/dts/loongson-2k2000.dtsi @@ -51,6 +51,13 @@ bus@10000000 { #address-cells =3D <2>; #size-cells =3D <2>; =20 + isa@18400000 { + compatible =3D "isa"; + #size-cells =3D <1>; + #address-cells =3D <2>; + ranges =3D <1 0x0 0x0 0x18400000 0x4000>; + }; + pmc: power-management@100d0000 { compatible =3D "loongson,ls2k2000-pmc", "loongson,ls2k0500-pmc", "sysco= n"; reg =3D <0x0 0x100d0000 0x0 0x58>; @@ -141,7 +148,7 @@ pcie@1a000000 { #size-cells =3D <2>; device_type =3D "pci"; bus-range =3D <0x0 0xff>; - ranges =3D <0x01000000 0x0 0x00008000 0x0 0x18400000 0x0 0x00008000>, + ranges =3D <0x01000000 0x0 0x00008000 0x0 0x18408000 0x0 0x00008000>, <0x02000000 0x0 0x60000000 0x0 0x60000000 0x0 0x20000000>; =20 gmac0: ethernet@3,0 { --=20 2.43.0 From nobody Mon Feb 9 11:34:05 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A5FA6158A0E; Wed, 10 Apr 2024 13:20:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712755231; cv=none; b=slzXO5fOXOss3BJHRoDtNLJ32BG7Ws56ehgMWHmEukI+AMjfPuSlzcKUKNH7Im74CXC1dXGbSFmmLBXIifqPCvHLsDAZQcTzl74/CHdWqzxB6dqpWQ7PhJetexUqef2t4A9K8GH0f7vLx/vGgFX9rMcAIY4MqSirA6dj20BXBZg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712755231; c=relaxed/simple; bh=frXcCQMlx8RE8Bbo8U+apyurjJdqHMgkpVKzPCvQcCg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZEYVVI9j64iotDLPyAmnBJ61X0nWuNkvlBpBosXxho6eO5KTayGy0Lp15ZIKBP5PsN0AGOC6AOs+UgiUtUhDDtPpJHqTxc4O2s8NhmXxv76DAasqwIhYsku/tB+mL0OvwDHvxikchy/UrJDoD0KGLuIdolLf7/GBCuerKF9c4eE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6961AC433F1; Wed, 10 Apr 2024 13:20:28 +0000 (UTC) From: Huacai Chen To: Huacai Chen Cc: loongarch@lists.linux.dev, Xuefeng Li , Guo Ren , Xuerui Wang , Jiaxun Yang , linux-kernel@vger.kernel.org, loongson-kernel@lists.loongnix.cn, Huacai Chen Subject: [PATCH 3/4] LoongArch: Update dts for Loongson-2K2000 to support PCI-MSI Date: Wed, 10 Apr 2024 21:18:03 +0800 Message-ID: <20240410131804.2165848-4-chenhuacai@loongson.cn> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240410131804.2165848-1-chenhuacai@loongson.cn> References: <20240410131804.2165848-1-chenhuacai@loongson.cn> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Current dts file for Loongson-2K2000 misses the interrupt-controller & interrupt-cells descriptions in the msi-controller node, and misses the msi-parent link in the pci root node. Add them to support PCI-MSI. Signed-off-by: Huacai Chen --- arch/loongarch/boot/dts/loongson-2k2000.dtsi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/loongarch/boot/dts/loongson-2k2000.dtsi b/arch/loongarch/= boot/dts/loongson-2k2000.dtsi index dcee9f3783fd..481c6c869a8b 100644 --- a/arch/loongarch/boot/dts/loongson-2k2000.dtsi +++ b/arch/loongarch/boot/dts/loongson-2k2000.dtsi @@ -116,6 +116,8 @@ pic: interrupt-controller@10000000 { msi: msi-controller@1fe01140 { compatible =3D "loongson,pch-msi-1.0"; reg =3D <0x0 0x1fe01140 0x0 0x8>; + interrupt-controller; + #interrupt-cells =3D <1>; msi-controller; loongson,msi-base-vec =3D <64>; loongson,msi-num-vecs =3D <192>; @@ -147,6 +149,7 @@ pcie@1a000000 { #address-cells =3D <3>; #size-cells =3D <2>; device_type =3D "pci"; + msi-parent =3D <&msi>; bus-range =3D <0x0 0xff>; ranges =3D <0x01000000 0x0 0x00008000 0x0 0x18408000 0x0 0x00008000>, <0x02000000 0x0 0x60000000 0x0 0x60000000 0x0 0x20000000>; --=20 2.43.0 From nobody Mon Feb 9 11:34:05 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 398DF15ECC9; Wed, 10 Apr 2024 13:20:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712755255; cv=none; b=VpuAZCN5+TPSuTbvXE4Qm2CJiq2kJEkYbJrOvkV7xjGTYmM6iJ9hqSpFCxcDoswKDHyCK6+STeGMAId73NViGOcoKBdkz/DIVGwSqM/2L3rtPYyxxIFDTxPKWEwqNkfU5+WC3qgP+IFwW6Wx049taXjv7YOn1TO24/WOOWq27iM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712755255; c=relaxed/simple; bh=XdUx7RDx6vXYIKWpZxhjafmpFso0gKwfxPR5Ji+BkUA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=IYFWvZVcwW4oyq/3nTOnMkzozORQtYYswVA2i0UFVnTW/icYKtN1sV4+km4hxB5dYlLVjH762wEZOwMOoYVsRtAaXb83k76DJPfdMOAc4Hw70S++c5rqnFpQYkbD0c3FbMRZkhQ/nR7hjfNwmItl/3Ef2McOnXpFntL+N/SAkl0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 96C9FC433F1; Wed, 10 Apr 2024 13:20:52 +0000 (UTC) From: Huacai Chen To: Huacai Chen Cc: loongarch@lists.linux.dev, Xuefeng Li , Guo Ren , Xuerui Wang , Jiaxun Yang , linux-kernel@vger.kernel.org, loongson-kernel@lists.loongnix.cn, Huacai Chen Subject: [PATCH 4/4] LoongArch: Update dts for Loongson-2K2000 to support GMAC/GNET Date: Wed, 10 Apr 2024 21:18:04 +0800 Message-ID: <20240410131804.2165848-5-chenhuacai@loongson.cn> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240410131804.2165848-1-chenhuacai@loongson.cn> References: <20240410131804.2165848-1-chenhuacai@loongson.cn> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Current dts file for Loongson-2K2000's GMAC/GNET is incomplete, both irq and phy descriptions are missing. Add them to make GMAC/GNET work. Signed-off-by: Huacai Chen --- .../boot/dts/loongson-2k2000-ref.dts | 33 +++++++++++++++++++ arch/loongarch/boot/dts/loongson-2k2000.dtsi | 12 +++++-- 2 files changed, 42 insertions(+), 3 deletions(-) diff --git a/arch/loongarch/boot/dts/loongson-2k2000-ref.dts b/arch/loongar= ch/boot/dts/loongson-2k2000-ref.dts index dca91caf895e..74b99bd234cc 100644 --- a/arch/loongarch/boot/dts/loongson-2k2000-ref.dts +++ b/arch/loongarch/boot/dts/loongson-2k2000-ref.dts @@ -61,12 +61,45 @@ &xhci1 { =20 &gmac0 { status =3D "okay"; + + phy-mode =3D "gmii"; + phy-handle =3D <&phy0>; + mdio { + compatible =3D "snps,dwmac-mdio"; + #address-cells =3D <1>; + #size-cells =3D <0>; + phy0: ethernet-phy@0 { + reg =3D <2>; + }; + }; }; =20 &gmac1 { status =3D "okay"; + + phy-mode =3D "gmii"; + phy-handle =3D <&phy1>; + mdio { + compatible =3D "snps,dwmac-mdio"; + #address-cells =3D <1>; + #size-cells =3D <0>; + phy1: ethernet-phy@1 { + reg =3D <2>; + }; + }; }; =20 &gmac2 { status =3D "okay"; + + phy-mode =3D "rgmii"; + phy-handle =3D <&phy2>; + mdio { + compatible =3D "snps,dwmac-mdio"; + #address-cells =3D <1>; + #size-cells =3D <0>; + phy2: ethernet-phy@2 { + reg =3D <0>; + }; + }; }; diff --git a/arch/loongarch/boot/dts/loongson-2k2000.dtsi b/arch/loongarch/= boot/dts/loongson-2k2000.dtsi index 481c6c869a8b..9eab2d02cbe8 100644 --- a/arch/loongarch/boot/dts/loongson-2k2000.dtsi +++ b/arch/loongarch/boot/dts/loongson-2k2000.dtsi @@ -156,21 +156,27 @@ pcie@1a000000 { =20 gmac0: ethernet@3,0 { reg =3D <0x1800 0x0 0x0 0x0 0x0>; - interrupts =3D <12 IRQ_TYPE_LEVEL_HIGH>; + interrupts =3D <12 IRQ_TYPE_LEVEL_HIGH>, + <13 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names =3D "macirq", "eth_lpi"; interrupt-parent =3D <&pic>; status =3D "disabled"; }; =20 gmac1: ethernet@3,1 { reg =3D <0x1900 0x0 0x0 0x0 0x0>; - interrupts =3D <14 IRQ_TYPE_LEVEL_HIGH>; + interrupts =3D <14 IRQ_TYPE_LEVEL_HIGH>, + <15 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names =3D "macirq", "eth_lpi"; interrupt-parent =3D <&pic>; status =3D "disabled"; }; =20 gmac2: ethernet@3,2 { reg =3D <0x1a00 0x0 0x0 0x0 0x0>; - interrupts =3D <17 IRQ_TYPE_LEVEL_HIGH>; + interrupts =3D <17 IRQ_TYPE_LEVEL_HIGH>, + <18 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names =3D "macirq", "eth_lpi"; interrupt-parent =3D <&pic>; status =3D "disabled"; }; --=20 2.43.0