From nobody Tue Nov 26 08:59:38 2024 Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.53]) (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 60DA919DF53; Sun, 20 Oct 2024 19:40:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729453261; cv=none; b=PJRMFi9S3qHOz7akUqrKArqxJMsO1/xZQtqH2i6aJ5ExO2zoAiii4foyBAOMsqCV8UroU1lHw3i5JPD71kBOA5NxVZn4xWnTsrOt5hx5+DSBN+ZQGZc8Zp9LgjRzBTeU/BjI4a0J73XsXxvp/ffO9UNlFMOYN4zkk5VlqSUJWxY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729453261; c=relaxed/simple; bh=4T4tsGiTu+7Yp74UkjgnnEqk77vW7pHzaOm0tx4xbNo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Nh41aYOFfC7jn9FBR4+fs/UBAg5Tw9ZGFnNsWU0wuo+/Jcm8iqvvFp/YamdzR2YLdsMsdQXhI4Xi8HtkXMKk7xonSL/8TB32HJmHj27h76Mn9z4+xp9qvilo519B+Mpnvg3uNjXDpe3KY282Ez476LbwwBL1OAWyeEXOoCEbcKI= 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=d/C3bGgr; arc=none smtp.client-ip=209.85.208.53 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="d/C3bGgr" Received: by mail-ed1-f53.google.com with SMTP id 4fb4d7f45d1cf-5c94c0bf354so565806a12.1; Sun, 20 Oct 2024 12:40:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729453258; x=1730058058; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=PoMQoTVDf0EJ7kPt2JC+Fe2z9tRYP9H50/zuHO5yLsU=; b=d/C3bGgrJ75WVNWwWrysc8yaJk2jk4hRMj1eBaFTHaZotD24MLjpLmUj4w9vNtG1H6 tdI4iiPlz8SaDzW/mf0zRWMHejPps9I5xlVGyRuZQeoDXMSd/05r43UtGwPzb5m8N604 XAnufUzLblqpqflgJNHt6MbxloO142o44KSSsls9gOTxHQiLyrFvYkQs2PaJJxmBft8Q smyvKxaJiK9vog+k27bhYiMdf/xckEXpx9WMxGCt1U5Vown9eFbVvyppjRyd351j57I9 Bqslmrs0NtBnmHQdQFFJICH22+kR17n+NicJ/VmluV9kNq/3HO14t8QchCQqFAI5vX98 ODUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729453258; x=1730058058; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PoMQoTVDf0EJ7kPt2JC+Fe2z9tRYP9H50/zuHO5yLsU=; b=KLl8+fSYViP9C2vhPAcuio9wdob1cS2TA5IC/DJ64QgTXfMHR+7ph7korSxH4ezuyy wFpuDYueomRH/KnaHCjjgJnKvVZkGsaW5P+u8YVfoyoaZbnQzApbHVdbxLDULBWuqpvp a0jDn6yqn5q+Bm6bY74TWwHsdMloDZQGWR6FzSXCHfXhMQiqTRBOn9ImuniotgE3cgHD uEkO9N0Uel2OU9Rm4OYjG9zpi/kUM2pijA1+qjhyqmHKCtDa73raTLHuCfsYt9YQOTU/ Rk4EWyudRe+T4sJhWQHfCVKhU2MBMz3bEysh6mK40bynHiqjA1WSIC6ZkB5SmtFbaT2I WA0g== X-Forwarded-Encrypted: i=1; AJvYcCU5SNy1P5cJQo9zaSKboYpgp7WUZTyRGPg2cMQGn452Ld4LCFkKh+Yngs4kgZtn6cJpyMrkDBVTX5YnYVVV@vger.kernel.org, AJvYcCVBalGepxjSY3V7ZtBJJ476XyRpFvGXmvZco0kVQZx1BMhNxOSzFxeqtEimJ0KS2I+zsFhMimPAX0b0@vger.kernel.org X-Gm-Message-State: AOJu0YxkGssjYv852i0RVK/n1nQZjUOWLT6y6JAUNWiYw+ZuQHS4Pfiv y76LKkaTOpM7ELkS3ZdeZWXsRGffQwuXV2PQkMqIrjgSDAUjm0/z X-Google-Smtp-Source: AGHT+IEBTRY13v0XBcACXcKCX1tPnEF+SFzDCQDyyS5oWNP61q6zQ2zyZ9NXzqb9/StiQ5Rs87g4ig== X-Received: by 2002:a17:907:940c:b0:a9a:1a17:e1cc with SMTP id a640c23a62f3a-a9a695d8adamr354288066b.0.1729453257490; Sun, 20 Oct 2024 12:40:57 -0700 (PDT) Received: from e8ff02ae9b18.v.cablecom.net (84-72-156-211.dclient.hispeed.ch. [84.72.156.211]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9a91578129sm120576966b.186.2024.10.20.12.40.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Oct 2024 12:40:56 -0700 (PDT) From: Lothar Rubusch To: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, dinguyen@kernel.org, marex@denx.de, s.trumtrar@pengutronix.de Cc: l.rubusch@gmail.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCHv2 19/23] ARM: dts: socfpga: add Mercury AA1 combinations Date: Sun, 20 Oct 2024 19:40:24 +0000 Message-Id: <20241020194028.2272371-20-l.rubusch@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241020194028.2272371-1-l.rubusch@gmail.com> References: <20241020194028.2272371-1-l.rubusch@gmail.com> 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" Introduce support for Enclustra's Mercury+ AA1 SoM, based on Intel Arria10. This is a flexible approach to allow for combining SoM with carrier board .dtsi and boot-mode .dtsi in a device-tree file. Signed-off-by: Andreas Buerkler Signed-off-by: Lothar Rubusch --- .../socfpga/socfpga_arria10_mercury_aa1.dtsi | 141 +++++++++++++++--- 1 file changed, 120 insertions(+), 21 deletions(-) diff --git a/arch/arm/boot/dts/intel/socfpga/socfpga_arria10_mercury_aa1.dt= si b/arch/arm/boot/dts/intel/socfpga/socfpga_arria10_mercury_aa1.dtsi index 41f865c8c..cdd693cf9 100644 --- a/arch/arm/boot/dts/intel/socfpga/socfpga_arria10_mercury_aa1.dtsi +++ b/arch/arm/boot/dts/intel/socfpga/socfpga_arria10_mercury_aa1.dtsi @@ -7,12 +7,14 @@ =20 / { =20 - model =3D "Enclustra Mercury AA1"; - compatible =3D "enclustra,mercury-aa1", "altr,socfpga-arria10", "altr,soc= fpga"; + model =3D "Enclustra Mercury+ AA1"; + compatible =3D "enclustra,mercury-aa1", + "altr,socfpga-arria10", "altr,socfpga"; =20 aliases { ethernet0 =3D &gmac0; serial1 =3D &uart1; + spi0 =3D &qspi; }; =20 memory@0 { @@ -24,52 +26,102 @@ memory@0 { chosen { stdout-path =3D "serial1:115200n8"; }; + + /* Adjusted the i2c labels to use generic base-board dtsi files for + * Enclustra Arria10 and Cyclone5 SoMs. + * + * The set of i2c0 and i2c1 labels defined in socfpga_cyclone5.dtsi and in + * socfpga_arria10.dtsi do not allow for using the same base-board .dtsi + * fragments. Thus define generic labels here to match the correct i2c + * bus in a generic base-board .dtsi file. + */ + soc { + i2c_encl: i2c@ffc02300 { + }; + i2c_encl_fpga: i2c@ffc02200 { + }; + }; +}; + +&i2c_encl { + status =3D "okay"; + i2c-sda-hold-time-ns =3D <300>; + clock-frequency =3D <100000>; + + atsha204a: atsha204a@64 { + compatible =3D "atmel,atsha204a"; + reg =3D <0x64>; + }; + + isl12022: isl12022@6f { + compatible =3D "isil,isl12022"; + reg =3D <0x6f>; + }; +}; + +&i2c_encl_fpga { + i2c-sda-hold-time-ns =3D <300>; + status =3D "disabled"; }; =20 &gmac0 { + status =3D "okay"; phy-mode =3D "rgmii"; phy-addr =3D <0xffffffff>; /* probe for phy addr */ - max-frame-size =3D <3800>; - phy-handle =3D <&phy3>; =20 + /delete-property/ mac-address; + mdio { #address-cells =3D <1>; #size-cells =3D <0>; compatible =3D "snps,dwmac-mdio"; phy3: ethernet-phy@3 { - txd0-skew-ps =3D <0>; /* -420ps */ - txd1-skew-ps =3D <0>; /* -420ps */ - txd2-skew-ps =3D <0>; /* -420ps */ - txd3-skew-ps =3D <0>; /* -420ps */ + reg =3D <3>; + + /* Add 2ns RX clock delay (1.2ns + 0.78ns)*/ + rxc-skew-ps =3D <1680>; /* 780ps */ rxd0-skew-ps =3D <420>; /* 0ps */ rxd1-skew-ps =3D <420>; /* 0ps */ rxd2-skew-ps =3D <420>; /* 0ps */ rxd3-skew-ps =3D <420>; /* 0ps */ - txen-skew-ps =3D <0>; /* -420ps */ - txc-skew-ps =3D <1860>; /* 960ps */ rxdv-skew-ps =3D <420>; /* 0ps */ - rxc-skew-ps =3D <1680>; /* 780ps */ - reg =3D <3>; + + /* Add 1.38ns TX clock delay (0.96ns + 0.42ns)*/ + txc-skew-ps =3D <1860>; /* 960ps */ + txd0-skew-ps =3D <0>; /* -420ps */ + txd1-skew-ps =3D <0>; /* -420ps */ + txd2-skew-ps =3D <0>; /* -420ps */ + txd3-skew-ps =3D <0>; /* -420ps */ + txen-skew-ps =3D <0>; /* -420ps */ }; }; }; =20 -&i2c1 { - atsha204a: crypto@64 { - compatible =3D "atmel,atsha204a"; - reg =3D <0x64>; - }; +&gpio0 { + status =3D "okay"; +}; =20 - isl12022: isl12022@6f { - compatible =3D "isil,isl12022"; - reg =3D <0x6f>; - }; +&gpio1 { + status =3D "okay"; +}; + +&gpio2 { + status =3D "okay"; +}; + +&uart0 { + status =3D "disabled"; +}; + +&uart1 { + status =3D "okay"; }; =20 /* Following mappings are taken from arria10 socdk dts */ &mmc { + status =3D "okay"; cap-sd-highspeed; broken-cd; bus-width =3D <4>; @@ -79,3 +131,50 @@ &mmc { &osc1 { clock-frequency =3D <33330000>; }; + +&eccmgr { + sdmmca-ecc@ff8c2c00 { + compatible =3D "altr,socfpga-sdmmc-ecc"; + reg =3D <0xff8c2c00 0x400>; + altr,ecc-parent =3D <&mmc>; + interrupts =3D <15 IRQ_TYPE_LEVEL_HIGH>, + <47 IRQ_TYPE_LEVEL_HIGH>, + <16 IRQ_TYPE_LEVEL_HIGH>, + <48 IRQ_TYPE_LEVEL_HIGH>; + }; +}; + +&qspi { + status =3D "okay"; + flash0: s25fl512s@0 { + u-boot,dm-pre-reloc; + #address-cells =3D <1>; + #size-cells =3D <1>; + compatible =3D "spansion,s25fl512s", "jedec,spi-nor"; + reg =3D <0>; + + spi-rx-bus-width =3D <4>; + spi-tx-bus-width =3D <4>; + spi-max-frequency =3D <10000000>; + + cdns,read-delay =3D <4>; + cdns,tshsl-ns =3D <50>; + cdns,tsd2d-ns =3D <50>; + cdns,tchsh-ns =3D <4>; + cdns,tslch-ns =3D <4>; + + partition@raw { + label =3D "Flash Raw"; + reg =3D <0x0 0x4000000>; + }; + }; +}; + +&watchdog1 { + status =3D "disabled"; +}; + +&usb0 { + status =3D "okay"; + dr_mode =3D "host"; +}; --=20 2.25.1