From nobody Tue Nov 26 02:09:01 2024 Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) (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 0A6E8195985; Sat, 16 Nov 2024 13:10:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731762639; cv=none; b=BSg0MXfTkdlyV6NDjgvrjmxRrgCj6+8DR90T+VRvY+9uHHvhrBGIuMtANsJzc4uPX3cuCDTCNS3IuuIGtCyde03CJ7oqaBSAfFtKOTJEk8MgSkrJlqtP8EDWj8RlDJS9XtJglH1fTc5+3BgPzuKz+XWEK/3kzyRovTgzLpp47H0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731762639; c=relaxed/simple; bh=VSX6Tupea+lveH5OF2V660luvXroshLKhKowGY60eC0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=EPPNy6ONifcC4+36iJ2FFnegmomLcqH78pCg2sxtP20g/7dTSYvG1PBwnwGrjz2ceYKGbjDDqK+j7UtOhjg7sF6ANjARRYteehb6ggqjpCWEY8xSK6Zu6k1gMccdgoI6cZdI4uWQelLkeDd0W3erG+B9Et73yt6uQUlBe6MRUVQ= 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=PXHo6KTW; arc=none smtp.client-ip=209.85.221.41 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="PXHo6KTW" Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-37d5045987dso258805f8f.1; Sat, 16 Nov 2024 05:10:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731762636; x=1732367436; 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=gB3ulxCecmsW7fjuWD1ocrPoiUFrXT+TWPSU1MrEKrA=; b=PXHo6KTWkBn3fYBQ8azJKCHmdgsdMD+BtWDMostP2Hlx05RGBFiKQN4nFRs5OYZbTW Wo8ScPcjUP4URdqmWB/CgOF00YjjIWd6KZotOVwR9OU3GxmrT4W5XKd95LOaZ5aEcx6V HyummuQ2gHtGZPtaYx2rTq+bxIbYxF6WtChVDx1QF2NEu3DoFtXbaAMavTXtdehCB3JR pb7AssmhTM3K7eJn7F5ek/PuqyUOihceh46Ut3mIEUsgewCcvvPAwBPD8Cxc4+TdahlG wzGIlNn1rfC43Re/y+jfayQZ0vwIBLgYBcMhCQkHVREnp6GqxnIeqQI7PITY2GkXudJ7 r4zA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731762636; x=1732367436; 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=gB3ulxCecmsW7fjuWD1ocrPoiUFrXT+TWPSU1MrEKrA=; b=LB/EtIJW8vEkzbx86YF5Nx+IyDMtWjs8YUF0/7UcgSPw25qQQ3h1GYuMpnOZl/hVF4 7KYKt7M88pUgAhOShUZlPS1s+rqx2nn3Q5dl8VZDeeLxQEto5/yOtdiK0fYYVDLQzkRF Cb+TOJYqKpr2HVQEfLR0knCuOwp71ALrLRQuHsl+Yb55a/vHi1guXyvklv8delFPxhhq vdlfjX3+MAYbybgN20b2vgnuPv2N3/kXRpCOAKCk7Q4K9RGemi+d8te/3OctxQiKehS8 6ZLCRI74uMG115g1XIOKzwY68GgaUcQ14jV1C2VZpEpeuNetkRMDqvQ06WVSmC47bYUG SxnQ== X-Forwarded-Encrypted: i=1; AJvYcCU8TXLIaE7AOFgf4GkmvAD3s3hTielgj3Bn8H+E38M/iX+JDfVq3BWHR2/jejCbFMVlSCBnn53exbGy@vger.kernel.org, AJvYcCXwYuBy0WkeG4E4p000g4yIjFdqiZHMvFKeHkgJ7I+YcSYKl1ibu8uEG1SQ6ATija/6pXNVtWxvdMGWpmRd@vger.kernel.org X-Gm-Message-State: AOJu0YyDxUr4yHZ3ijEOkGMaoBEa/aWmWi1oI4wo69n9V1S6fBX7Enw7 PxVu+N+1V2DQP6Ar2evJBnXTfSFFMRtUR33nri8eDeYH5OvaqIkF X-Google-Smtp-Source: AGHT+IEj0WfYDhjcOKOoyiKe++NDFUW6QqxTyrv7WCpZdG/AbHV6ZXBJ8Nm61tf5WL0/2POhCgssIg== X-Received: by 2002:a05:600c:4710:b0:42c:ba6c:d9a7 with SMTP id 5b1f17b1804b1-432df7878bcmr22275335e9.4.1731762636000; Sat, 16 Nov 2024 05:10:36 -0800 (PST) Received: from 5dfbf0f66296.v.cablecom.net (84-72-156-211.dclient.hispeed.ch. [84.72.156.211]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-432da28ba80sm92424375e9.29.2024.11.16.05.10.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Nov 2024 05:10:35 -0800 (PST) From: Lothar Rubusch To: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, dinguyen@kernel.org Cc: marex@denx.de, s.trumtrar@pengutronix.de, l.rubusch@gmail.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 07/11] ARM: dts: socfpga: add Mercury AA1 combinations Date: Sat, 16 Nov 2024 13:10:21 +0000 Message-Id: <20241116131025.114542-8-l.rubusch@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241116131025.114542-1-l.rubusch@gmail.com> References: <20241116131025.114542-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..41351d58f 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: crypto@64 { + compatible =3D "atmel,atsha204a"; + reg =3D <0x64>; + }; + + isl12022: rtc@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: flash@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.39.2