Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1033808pxj; Thu, 17 Jun 2021 20:46:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyeMiwibItbQb6nmmdrXkUOLlqLOMfSGMRCAxGAdJcmopLCMs5yJWlYAulNw3ytuyAsdNlY X-Received: by 2002:a05:6402:50ce:: with SMTP id h14mr2107571edb.219.1623987989510; Thu, 17 Jun 2021 20:46:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623987989; cv=none; d=google.com; s=arc-20160816; b=m0gLeiUbmZT2snlrFYQ2XuMJOarc6LFda1270dcteoZy7HF9fYfXLve4KwU53snBE1 MIPfI1FN21V8t2brZLAbWfSfgDzbpC2esvwUalzxdfSJ1d6XaTNXQMGysJ7DPjencQqj 8RnN354+ubDGfkrjINCs5p7ShMQB5v2m9cMziXNVgj0McODZWJ7nfmyd1+bbz51P/GP/ KuuXqMT9mKSRAuXnYP6tLj7X++qTTVbf9dJkbqwEgjFOdXZs/nCSmeOBhAfRs7elVRgL xQI2yMrB0dVAHkOlfL6qg/GFDJJRJt3vqTTy8dWYWUpYydw7RKskt3/nCEv0Z2uQboeC QrGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=SLtqeAbexfKX8SW/23v6lteUnp+Bh11gSlFdelZ5fLw=; b=D5tly1zjiMYdHh2kUR+rqnRyggFPYko0W2Ox6SBNSOd7DNg0nCG7gWQA0wG4pBWj2T zM5Ksc+UIPsb7CPsjqhgmIwHceSegJqos1/bUWKhF4oFzWM+BXRWpXgGd3uhxnuxv8j3 wI0v7MepbjVbpE3CFzm7KPFWKR7REg/Ns8xcQhWgyodaeOjs3KiW9oWshpUPbWEgSE4s UYjRHLxMKA3rrlJKO0tvmK5dINkr2m1DY5gr6HMmC+Q/Arkds4BjW2QuM3R3m1EXKA/+ iB6fM+npqZQysR/t0nnKR/R9GNh6sK2wTAy3+oFdUWYec/zd0nuXLEwHym0MswV1lk4O VaKA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b23si7798103edv.199.2021.06.17.20.46.07; Thu, 17 Jun 2021 20:46:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231919AbhFRC4L (ORCPT + 99 others); Thu, 17 Jun 2021 22:56:11 -0400 Received: from mail.loongson.cn ([114.242.206.163]:39818 "EHLO loongson.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231565AbhFRC4J (ORCPT ); Thu, 17 Jun 2021 22:56:09 -0400 Received: from localhost.localdomain (unknown [113.200.148.30]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9Dxv0CzCsxgVnITAA--.632S3; Fri, 18 Jun 2021 10:53:43 +0800 (CST) From: Qing Zhang To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , Maxime Coquelin , "David S . Miller" , Jakub Kicinski , Thomas Bogendoerfer , Rob Herring Cc: Huacai Chen , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH 2/4] MIPS: Loongson64: Add GMAC support for Loongson-2K1000 Date: Fri, 18 Jun 2021 10:53:35 +0800 Message-Id: <20210618025337.5705-2-zhangqing@loongson.cn> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20210618025337.5705-1-zhangqing@loongson.cn> References: <20210618025337.5705-1-zhangqing@loongson.cn> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: AQAAf9Dxv0CzCsxgVnITAA--.632S3 X-Coremail-Antispam: 1UD129KBjvJXoW7try7WF4DAry5GF1DAF18Zrb_yoW8AryfpF 17Aayqkr4rWryIkws8JFWDAF43Aa9YkFna93ZxGr4Ut34vq3Wjvr43tF1fKr13XrW8X34F qrWvgry8KF17Jw7anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUPqb7Iv0xC_Zr1lb4IE77IF4wAFF20E14v26rWj6s0DM7CY07I2 0VC2zVCF04k26cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28IrcIa0xkI8VA2jI 8067AKxVWUGwA2048vs2IY020Ec7CjxVAFwI0_Gr0_Xr1l8cAvFVAK0II2c7xJM28CjxkF 64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVW7JVWDJwA2z4x0Y4vE2Ix0cI8IcV CY1x0267AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVAFwI0_Cr1j6rxdM28EF7xvwVC2z280 aVCY1x0267AKxVW0oVCq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzV Aqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWUAVWUtwAv7VC2z280aVAFwI0_Gr0_Cr1lOx8S 6xCaFVCjc4AY6r1j6r4UM4x0Y48IcxkI7VAKI48JM4IIrI8v6xkF7I0E8cxan2IY04v7Mx kIecxEwVAFwVW8JwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s02 6c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_Jw 0_GFylIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvE c7CjxVAFwI0_Gr0_Cr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14 v26r1j6r4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x 07j3ManUUUUU= X-CM-SenderInfo: x2kd0wptlqwqxorr0wxvrqhubq/ Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The GMAC module is now supported, enable it. Signed-off-by: Qing Zhang --- .../boot/dts/loongson/loongson64-2k1000.dtsi | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/arch/mips/boot/dts/loongson/loongson64-2k1000.dtsi b/arch/mips/boot/dts/loongson/loongson64-2k1000.dtsi index 569e814def83..5747f171de29 100644 --- a/arch/mips/boot/dts/loongson/loongson64-2k1000.dtsi +++ b/arch/mips/boot/dts/loongson/loongson64-2k1000.dtsi @@ -114,6 +114,52 @@ pci@1a000000 { ranges = <0x01000000 0x0 0x00000000 0x0 0x18000000 0x0 0x00010000>, <0x02000000 0x0 0x40000000 0x0 0x40000000 0x0 0x40000000>; + gmac@3,0 { + compatible = "pci0014,7a03.0", + "pci0014,7a03", + "pciclass0c0320", + "pciclass0c03", + "loongson, pci-gmac"; + + reg = <0x1800 0x0 0x0 0x0 0x0>; + interrupts = <12 IRQ_TYPE_LEVEL_LOW>, + <13 IRQ_TYPE_LEVEL_LOW>; + interrupt-names = "macirq", "eth_lpi"; + interrupt-parent = <&liointc0>; + phy-mode = "rgmii"; + mdio { + #address-cells = <1>; + #size-cells = <0>; + compatible = "snps,dwmac-mdio"; + phy0: ethernet-phy@0 { + reg = <0>; + }; + }; + }; + + gmac@3,1 { + compatible = "pci0014,7a03.0", + "pci0014,7a03", + "pciclass0c0320", + "pciclass0c03", + "loongson, pci-gmac"; + + reg = <0x1900 0x0 0x0 0x0 0x0>; + interrupts = <14 IRQ_TYPE_LEVEL_LOW>, + <15 IRQ_TYPE_LEVEL_LOW>; + interrupt-names = "macirq", "eth_lpi"; + interrupt-parent = <&liointc0>; + phy-mode = "rgmii"; + mdio { + #address-cells = <1>; + #size-cells = <0>; + compatible = "snps,dwmac-mdio"; + phy1: ethernet-phy@1 { + reg = <0>; + }; + }; + }; + ehci@4,1 { compatible = "pci0014,7a14.0", "pci0014,7a14", -- 2.31.0