From nobody Mon Nov 25 12:35:57 2024 Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) (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 DCC5B5684; Mon, 28 Oct 2024 01:13:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730078022; cv=none; b=FeB5lZ0GuMRm2ftSEPGfWlcXaCXXd85qgjkbGr8oeazexElZIECHFcdVyD+rn72a397Jl8Fra852eOM1kFuvF7zJ4S2Gq0SvJd6XWyrvCdJSlPP0XbHHAl/+onx7T24GBio73Tgbimzyt5M2XLupeG0lapNAVcGPQqRsYZZd3tI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730078022; c=relaxed/simple; bh=dXDziNV+kWqxHWT1Ki9ppIjBIDV3UFXWbSgHi9ecYNA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=YvODMlKoA0s40qG0lc5JOvxYyRyjUlAfI8IVVhzpKPPVEykVrHAv6/w0oUDnIIJXLB4m3myp59Is7UtUSH2oIoD3eduT2GQYOBfUveOkck5Zh7Z4BoSsCLXresYxTBZnwPDJfszvILXKsfAqt86V9yumSmH48+EDei2Jw1IwJ00= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=m0lkx+Nf; arc=none smtp.client-ip=209.85.215.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="m0lkx+Nf" Received: by mail-pg1-f173.google.com with SMTP id 41be03b00d2f7-7ea7e250c54so2772216a12.0; Sun, 27 Oct 2024 18:13:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730078019; x=1730682819; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=+3tCahJOmROdPw2eESwWsnhfLTfFzOuQiLcj0eIRRxE=; b=m0lkx+Nfo2FDpu8imhsmtftcsNxxKsCDGsNtlRRYy3nGXjZVnEfT+6aDnhXI/EElsf 7ajQj2UIZD4x0EU3ro8gOj2fZ74Uua8PjyKZW1GaNhB7NXZ5wkoPmSg7/wHNy7wxs8PQ KZMdSHvxyS9SgnxGZeRVbe/lw98l0rIwdDxfWKLSjH8fUzsIaCHZuz5+BruLVK4SqrVY QhqpUzKCK9OKe0WQLVofPLqSxUV8nNld54b/XUL7RrGSyRjP8PUMrZb3qQL5Aqd7dGIk jblkUaSPWQDN7IVbfQpsKU4IjirQUEnofj+1KF0Iqk9VhkEi/Fk3UnLMiLIHESxH5H0k dWkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730078019; x=1730682819; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=+3tCahJOmROdPw2eESwWsnhfLTfFzOuQiLcj0eIRRxE=; b=eiL0oMDYMhFCcCn6tmbV06nwob3VMQ5vDQH7XyoujPE0+26x7aCYD9nOjXiaioLX+s 4jm/DaJp1iUdyqQWtTj/vTsKbOgZdYnNi9bB4xxS+kjMmUpNHaxvxlyHT6NQ9+yMv6vv kRmvdHcxNrFbNTP7HgQNlSGk8nJ3l3qCdjYD0Ws2Qpjr729CV4e6B8xT8g7hg7F1aQ+K sVkB4s2dQiw/xfVntItgfaKRkSGCzPYNS6KXkDgqgvi7ei7quqxDLHaI68MS4HPw/4cC WTN9ObiHPZQqeFfSPFGJNqKmeuTJc+oUdR4k+IccB5nmFQVeKvGF2KXnvBc8+JM4eM3Q Durg== X-Forwarded-Encrypted: i=1; AJvYcCUY+Lpts40rLEMAFAWh7MtGVYDhV3gCwh8E6JdilBkbQRuGpYcm3sj2fSUoE2ebvHWvj7popMxfOiMM304C@vger.kernel.org, AJvYcCWwmtdvsYLPkWTaukCabJZFQGuAf7Qtg1OpWfxQbP0PnwTfHxkQROX0VJVdHHkQ8DtkDgl2JfWAGFU7@vger.kernel.org, AJvYcCXWVgbTXjUC3Gcw0beSVBeiQmQVmMMgh0pph/4tU2exGuuUBQmeLWxM56DuhGVwm/oQn2GFRmUK@vger.kernel.org X-Gm-Message-State: AOJu0YyxrbceXwvF3i70D8pM/iZj4BtyQVUBkKKBMQ2cfasPZ9BtQ3MZ S+00fk6PGlAKUgZTcWWXfFqPRDP5M8KuJPgAECQ2DjGJx60VCTFy X-Google-Smtp-Source: AGHT+IEn22qT3aAgfP2GIkF4DIPGzct889HLqTlXcqnHoA/L+gK2jDOatquPmlzkbeGD1c41qaA4Wg== X-Received: by 2002:a05:6a20:c997:b0:1d9:4639:396b with SMTP id adf61e73a8af0-1d9a83c186bmr9642710637.11.1730078019112; Sun, 27 Oct 2024 18:13:39 -0700 (PDT) Received: from localhost ([2001:da8:7001:11::cb]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72058052be4sm4744556b3a.142.2024.10.27.18.13.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Oct 2024 18:13:38 -0700 (PDT) From: Inochi Amaoto To: Chen Wang , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Inochi Amaoto , Paul Walmsley , Palmer Dabbelt , Albert Ou , Richard Cochran , Jisheng Zhang , Thomas Bonnefille Cc: Liu Gui , Yixun Lan , Longbin Li , Inochi Amaoto , devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH] riscv: dts: sophgo: Add ethernet configuration for cv18xx Date: Mon, 28 Oct 2024 09:13:12 +0800 Message-ID: <20241028011312.274938-1-inochiama@gmail.com> X-Mailer: git-send-email 2.47.0 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" Add DT configuration for ethernet controller for cv18xx SoC. Signed-off-by: Inochi Amaoto --- .../boot/dts/sophgo/cv1812h-huashan-pi.dts | 4 ++ arch/riscv/boot/dts/sophgo/cv18xx.dtsi | 49 +++++++++++++++++++ 2 files changed, 53 insertions(+) diff --git a/arch/riscv/boot/dts/sophgo/cv1812h-huashan-pi.dts b/arch/riscv= /boot/dts/sophgo/cv1812h-huashan-pi.dts index 26b57e15adc1..a0acae675a82 100644 --- a/arch/riscv/boot/dts/sophgo/cv1812h-huashan-pi.dts +++ b/arch/riscv/boot/dts/sophgo/cv1812h-huashan-pi.dts @@ -55,6 +55,10 @@ &emmc { non-removable; }; =20 +&gmac0 { + status =3D "okay"; +}; + &sdhci0 { status =3D "okay"; bus-width =3D <4>; diff --git a/arch/riscv/boot/dts/sophgo/cv18xx.dtsi b/arch/riscv/boot/dts/s= ophgo/cv18xx.dtsi index c18822ec849f..50933e5b4c75 100644 --- a/arch/riscv/boot/dts/sophgo/cv18xx.dtsi +++ b/arch/riscv/boot/dts/sophgo/cv18xx.dtsi @@ -210,6 +210,55 @@ i2c4: i2c@4040000 { status =3D "disabled"; }; =20 + gmac0: ethernet@4070000 { + compatible =3D "snps,dwmac-3.70a"; + reg =3D <0x04070000 0x10000>; + clocks =3D <&clk CLK_AXI4_ETH0>, <&clk CLK_ETH0_500M>; + clock-names =3D "stmmaceth", "ptp_ref"; + interrupts =3D <31 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names =3D "macirq"; + phy-handle =3D <&phy0>; + phy-mode =3D "rmii"; + rx-fifo-depth =3D <8192>; + tx-fifo-depth =3D <8192>; + snps,multicast-filter-bins =3D <0>; + snps,perfect-filter-entries =3D <1>; + snps,aal; + snps,txpbl =3D <8>; + snps,rxpbl =3D <8>; + snps,mtl-rx-config =3D <&gmac0_mtl_rx_setup>; + snps,mtl-tx-config =3D <&gmac0_mtl_tx_setup>; + snps,axi-config =3D <&gmac0_stmmac_axi_setup>; + status =3D "disabled"; + + mdio { + compatible =3D "snps,dwmac-mdio"; + #address-cells =3D <1>; + #size-cells =3D <0>; + + phy0: phy@0 { + compatible =3D "ethernet-phy-ieee802.3-c22"; + reg =3D <0>; + }; + }; + + gmac0_mtl_rx_setup: rx-queues-config { + snps,rx-queues-to-use =3D <1>; + queue0 {}; + }; + + gmac0_mtl_tx_setup: tx-queues-config { + snps,tx-queues-to-use =3D <1>; + queue0 {}; + }; + + gmac0_stmmac_axi_setup: stmmac-axi-config { + snps,blen =3D <16 8 4 0 0 0 0>; + snps,rd_osr_lmt =3D <2>; + snps,wr_osr_lmt =3D <1>; + }; + }; + uart0: serial@4140000 { compatible =3D "snps,dw-apb-uart"; reg =3D <0x04140000 0x100>; --=20 2.47.0