From nobody Mon Nov 25 14:57:35 2024 Received: from mail-ej1-f46.google.com (mail-ej1-f46.google.com [209.85.218.46]) (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 4BFA218C34C; Sun, 27 Oct 2024 14:37:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730039844; cv=none; b=IxFkmsHrILl18uri/FPRasLtAZARiygn3yIKyrVZv+9Kce6re+sl+SAUITHvaYeYUH8bqKTaSLHrB/wQevaTkezzh8XvnOrMSwYHOV7MOJio8ILk6apj4M7T8zZTqkvoyw2U+o7Jqpa3nhdBp1sEIPr1jhJA2SpB0m5bsdFBH/g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730039844; c=relaxed/simple; bh=4T4tsGiTu+7Yp74UkjgnnEqk77vW7pHzaOm0tx4xbNo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=AhoRQQt3XJB3KwOlCz8VmRXV6JN0BoTWSDbsKymhQTVbJI3UpIsWb1VYm1IUMAo/0vsK/Q2rh9Rkq/aSBKSyCCuM4eoZ4vXKFFPhzfGYVjev1XY7K1m2sC3jTYMyBB4L6fWvBFmkh7UOEzgSAiF8TMkYg0F+E7dnukumiwGbjZg= 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=QYj0gGIt; arc=none smtp.client-ip=209.85.218.46 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="QYj0gGIt" Received: by mail-ej1-f46.google.com with SMTP id a640c23a62f3a-a9a017a382bso55227266b.3; Sun, 27 Oct 2024 07:37:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730039841; x=1730644641; 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=QYj0gGItALyHAOQ0gKv7Cn5kNsY4QuSJj6Q/ALGRMFpSCZ+r8Y+9HKEcSbyDE5PxLo nxUdq2OMwjkHWCSOIvdTL3gY4VL8uFeJaOTT8t0H67qlKVp0COPDtCTUtiKg5tzYWFqK 0z7GWxVu/UODse3kLFZ7DIz2KilFIY4LWJac8IB25ywniQgoww81CZ/Wb/eC7rarGd9V y6Et8yA8PAZ4ocWKHGuWXA+PNBJ/JAS3pOpAwW2Ni1jTEa84Z53s0M3RoTz2dieTxVDH o1n4Swk8HGg2GZnb21+qqHTg5rTvNApCBEak3JRTNUORqDsLWAUBny8v/5mRj7GYHjRk jXdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730039841; x=1730644641; 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=Hsr5phwA6H37fNT6uSh/6RI+KNqf6wcKQLZFYQKGr+guHrtdcll7JkYNM/zrx21a+3 MTSTJ4QfyQqRc9/fBOb8HidgDaRZeugQM6klBHobAgfen0DPKrj5RuN6Nwl3l9eXYAUJ Zojq0D3/v0B1J1T9N5f776JhRhB1xrud434Q4/ilPx3wECJ/EgRKb6jXTvPob6tlYY71 btLtj9vDkMcZt3GoCD+BAJI8H80mqtOl8SQnLe8n/klZmOGTki/0q0U1SYFn4/Ne9AIf 4uYHuA1HdiT8zOrCgUlQoA+vaHO1NBP/Nz7QUQ2odJsC27A4wreyET/ZowDP2qFrXXu4 u4kQ== X-Forwarded-Encrypted: i=1; AJvYcCUORuiUk7q3J7AJcI8C6TQRKV7cU8gwUEdPophEpcYsIurCthxcHN/s67Wvy6CQZ9H2BTqk83RqIDEL@vger.kernel.org, AJvYcCVDRf9rLX6Weiww/mwF+ApGZsW3nkr3h11KU00E02St5YPl8zy9ltUu9ZfHqhzIOLaP/SPm9lzD/Z9dsByV@vger.kernel.org X-Gm-Message-State: AOJu0YxkIoNzGg2DpjZl2QnlawPDKa6hATDjFiSwc5rGC4jdxrWK5Ob8 w6ZwB5u4NiN5AQ9kwnaHp2pvzBHx5GDA+BfHJaCpP58FVrf2Uxwx X-Google-Smtp-Source: AGHT+IFQb9UQBKk924s83vklBK5+wQH/yK2bRrf9dj/vuuaSnbzyL2zeJ/f0D2iQ15e7PiGFOXqrxA== X-Received: by 2002:a17:907:7f0e:b0:a9a:147d:fec2 with SMTP id a640c23a62f3a-a9de5f04397mr170842266b.6.1730039840441; Sun, 27 Oct 2024 07:37:20 -0700 (PDT) Received: from 6c1d2e1f4cf4.v.cablecom.net (84-72-156-211.dclient.hispeed.ch. [84.72.156.211]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9b331b0d44sm281127966b.187.2024.10.27.07.37.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Oct 2024 07:37:20 -0700 (PDT) From: Lothar Rubusch To: robh@kernel.org, krzk+dt@kernel.org, a.fatoum@pengutronix.de Cc: conor+dt@kernel.org, dinguyen@kernel.org, marex@denx.de, s.trumtrar@pengutronix.de, l.rubusch@gmail.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCHv3 18/22] ARM: dts: socfpga: add Mercury AA1 combinations Date: Sun, 27 Oct 2024 14:36:50 +0000 Message-Id: <20241027143654.28474-19-l.rubusch@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241027143654.28474-1-l.rubusch@gmail.com> References: <20241027143654.28474-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