From patchwork Tue Jan 4 18:43:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 1575349 X-Patchwork-Delegate: eugen.hristev@microchip.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=microchip.com header.i=@microchip.com header.a=rsa-sha256 header.s=mchp header.b=vFxQSXCk; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JT1kK03Jqz9t0Z for ; Wed, 5 Jan 2022 05:44:40 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5AFE48302A; Tue, 4 Jan 2022 19:44:25 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=quarantine dis=none) header.from=microchip.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=microchip.com header.i=@microchip.com header.b="vFxQSXCk"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9FE7682F89; Tue, 4 Jan 2022 19:44:22 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id CE9DE82F91 for ; Tue, 4 Jan 2022 19:44:16 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=microchip.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=Eugen.Hristev@microchip.com DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1641321858; x=1672857858; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=P+Su0vvKWh85KurNBIXM70naBiz/F3jOirO6IHcGjh0=; b=vFxQSXCkQn+fiyrIwknsAsfcVaU7I9I9A2vIvAcWJ6+ofyHwhRlsileo qElHcpboAvE6bKFI6TFlgGjVDFK4UM6PSBo+IVf34Y0SQiXK3BwRAlE4W 3fVFdIfD8tLy8N8Svd4wH8bwR4dL1YQye4Zv4RuvKUKE+eVoQ3hDVG8Xr trWdwPi5J7mACUmr9YlKlGbEZnSXUCFd3E1skOViIYXI064eJ8ZqB8Eat YmqXfCQn4GIeKPlGcHv9KUM22B9lUGNMdUWhQ+7/zkjLu9Tw9z4Iha1yC mz6Cl1NPeahm1ezy5VtDG9+yROpjYJk0YEPFlzJoVgmSsaoHJ9OHWWySv w==; IronPort-SDR: c0Is5Uz6Ba/rWeq26Fh+DqwDiOrtDrx9zASQy/nISoSnIm6UAiXYoqGEFZDn3VXG9vtU+ddh06 K4Ys/O4/Io4NAALVOfjzmj2bots+QOaML4U+IoHnVHMiUVEPMXOx+7ziM4xam7H+SLC+k6joek r0e80fxcRyvlturOIz4s4keKktLzUdu3VUm8Qy9RCVXCaVkOvVx/+Uy1LUEoznzktQAweqIE5Z lJKDxthIzQsOhdK0LL4jHRdlTxi6LxPfB1uqaif7hxWCNMNIImyuGftWg90ZtVlJa02ahRc3vz bavbZvhFgo0uaAABQMggLTpD X-IronPort-AV: E=Sophos;i="5.88,261,1635231600"; d="scan'208";a="148540938" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 04 Jan 2022 11:44:10 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.87.72) by chn-vm-ex02.mchp-main.com (10.10.87.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Tue, 4 Jan 2022 11:44:08 -0700 Received: from ROB-ULT-M18282.microchip.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Tue, 4 Jan 2022 11:44:05 -0700 From: Eugen Hristev To: , CC: Eugen Hristev Subject: [PATCH 1/4] i2c: at91: add compatible with microchip,sama7g5-i2c Date: Tue, 4 Jan 2022 20:43:56 +0200 Message-ID: <20220104184359.315440-1-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Add compatible and data platform struct for sama7g5 SoC. Signed-off-by: Eugen Hristev --- drivers/i2c/at91_i2c.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/i2c/at91_i2c.c b/drivers/i2c/at91_i2c.c index 6b4c0e4804..400a3786ca 100644 --- a/drivers/i2c/at91_i2c.c +++ b/drivers/i2c/at91_i2c.c @@ -305,6 +305,11 @@ static const struct at91_i2c_pdata sama5d2_config = { .clk_offset = 3, }; +static const struct at91_i2c_pdata sama7g5_config = { + .clk_max_div = 7, + .clk_offset = 3, +}; + static const struct udevice_id at91_i2c_ids[] = { { .compatible = "atmel,at91rm9200-i2c", .data = (long)&at91rm9200_config }, { .compatible = "atmel,at91sam9260-i2c", .data = (long)&at91sam9260_config }, @@ -314,6 +319,7 @@ static const struct udevice_id at91_i2c_ids[] = { { .compatible = "atmel,at91sam9x5-i2c", .data = (long)&at91sam9x5_config }, { .compatible = "atmel,sama5d4-i2c", .data = (long)&sama5d4_config }, { .compatible = "atmel,sama5d2-i2c", .data = (long)&sama5d2_config }, +{ .compatible = "microchip,sama7g5-i2c", .data = (long)&sama7g5_config }, { } }; From patchwork Tue Jan 4 18:43:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 1575348 X-Patchwork-Delegate: eugen.hristev@microchip.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=microchip.com header.i=@microchip.com header.a=rsa-sha256 header.s=mchp header.b=gOYc/ZH8; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JT1kH62YTz9ssD for ; Wed, 5 Jan 2022 05:44:37 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9A91D81C08; Tue, 4 Jan 2022 19:44:22 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=quarantine dis=none) header.from=microchip.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=microchip.com header.i=@microchip.com header.b="gOYc/ZH8"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 545E581277; Tue, 4 Jan 2022 19:44:20 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 8191081428 for ; Tue, 4 Jan 2022 19:44:15 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=microchip.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=Eugen.Hristev@microchip.com DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1641321855; x=1672857855; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=KaOaZNacELOu+ItB8yvtgaze9UOjF/cjEfuOI8FYF24=; b=gOYc/ZH8PNFVTkBAQJ6f69ZLNwmfPVWUTT1Ul7A4gI4EWy9Ru0HBe3TR klQgEKoqkrDWZ0w3PV4gPm/gWTUAu4g5e0MpWEPvHEmwrPO+b4t61WcNW 5WHrjreQ6x/B49Rkt0/7hiMPPzOQZf2D0S8ICqJQmMfnw2GZmON+HNR8y J+K50vANGbEQfhefSnynblDFLL6GvyeRoNsKID71YmCG+lvFr9JTvmG3l 6K4M+VG5MNCCTkTHqGoOsNPtaCxaxJdaj8eqkY9Q0HWJRRsqi3RzZQno2 r6L7OF81kgEPrTRFa7D3zzYn3ma39Kc4OHoDeprBgxBPjWeSeto7Cqbsl Q==; IronPort-SDR: ORog8jl/8/f9MiABa5IBCXkjZSMqLaca8w0Oyd0Zi3aZ+HLc/A6TNABZb2n26qwLYPSHzolFvT O7FLYJG1SrpL19MToyTiWouiobarKJ/BZMTbeFmUlJtGKrtQBic718Fo4vriS/bFNtgL6FO/GN VONOGcIYCvNjsoCn8LfKDQgfEU/AgD0QPLVZ7G2YhKagmKg9yi+ag9qCxwH5qf8TNnZyfzRqCk 6JXdNz+XAoCwg5d9dTNcd9gs3lm42aMIunNDz4+H3sBRQy1X0VpvEXKKlrwPNPsf1ehH4ECTwl WxrZ6YJjYeVfbQtI5y4C5uyH X-IronPort-AV: E=Sophos;i="5.88,261,1635231600"; d="scan'208";a="149108017" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 04 Jan 2022 11:44:13 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.87.72) by chn-vm-ex02.mchp-main.com (10.10.87.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Tue, 4 Jan 2022 11:44:12 -0700 Received: from ROB-ULT-M18282.microchip.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Tue, 4 Jan 2022 11:44:09 -0700 From: Eugen Hristev To: , CC: Eugen Hristev Subject: [PATCH 2/4] ARM: dts: at91: sama7g5: add flx8 and required nodes Date: Tue, 4 Jan 2022 20:43:57 +0200 Message-ID: <20220104184359.315440-2-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220104184359.315440-1-eugen.hristev@microchip.com> References: <20220104184359.315440-1-eugen.hristev@microchip.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Add Flexcom8 node with required referenced nodes as phandles. Since Flexcom8 is present in Linux, take the node exactly as-is from Linux. Some nodes are referenced in Linux as phandles, the dma and the gic. Add them as well to the file, even if they are unused by Uboot. This is a step towards having the U-boot DT equivalent with the DT in Linux. Signed-off-by: Eugen Hristev --- arch/arm/dts/sama7g5.dtsi | 50 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/arch/arm/dts/sama7g5.dtsi b/arch/arm/dts/sama7g5.dtsi index 4a3c675d34..2505a2f83d 100644 --- a/arch/arm/dts/sama7g5.dtsi +++ b/arch/arm/dts/sama7g5.dtsi @@ -10,11 +10,15 @@ */ #include "skeleton.dtsi" +#include +#include #include +#include / { model = "Microchip SAMA7G5 family SoC"; compatible = "microchip,sama7g5"; + interrupt-parent = <&gic>; clocks { slow_rc_osc: slow_rc_osc { @@ -191,6 +195,52 @@ clock-names = "pclk", "hclk"; status = "disabled"; }; + + dma0: dma-controller@e2808000 { + compatible = "microchip,sama7g5-dma"; + reg = <0xe2808000 0x1000>; + interrupts = ; + #dma-cells = <1>; + clocks = <&pmc PMC_TYPE_PERIPHERAL 22>; + clock-names = "dma_clk"; + status = "disabled"; + }; + + flx8: flexcom@e2818000 { + compatible = "atmel,sama5d2-flexcom"; + reg = <0xe2818000 0x200>; + clocks = <&pmc PMC_TYPE_PERIPHERAL 46>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0xe2818000 0x800>; + status = "disabled"; + + i2c8: i2c@600 { + compatible = "microchip,sama7g5-i2c", "microchip,sam9x60-i2c"; + reg = <0x600 0x200>; + interrupts = ; + #address-cells = <1>; + #size-cells = <0>; + clocks = <&pmc PMC_TYPE_PERIPHERAL 46>; + atmel,fifo-size = <32>; + dmas = <&dma0 AT91_XDMAC_DT_PERID(21)>, + <&dma0 AT91_XDMAC_DT_PERID(22)>; + dma-names = "rx", "tx"; + atmel,use-dma-rx; + atmel,use-dma-tx; + status = "disabled"; + }; + }; + + gic: interrupt-controller@e8c11000 { + compatible = "arm,cortex-a7-gic"; + #interrupt-cells = <3>; + #address-cells = <0>; + interrupt-controller; + interrupt-parent; + reg = <0xe8c11000 0x1000>, + <0xe8c12000 0x2000>; + }; }; }; }; From patchwork Tue Jan 4 18:43:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 1575350 X-Patchwork-Delegate: eugen.hristev@microchip.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=microchip.com header.i=@microchip.com header.a=rsa-sha256 header.s=mchp header.b=RjgU0QLW; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JT1kT31y7z9ssD for ; Wed, 5 Jan 2022 05:44:49 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E4DE98307D; Tue, 4 Jan 2022 19:44:27 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=quarantine dis=none) header.from=microchip.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=microchip.com header.i=@microchip.com header.b="RjgU0QLW"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C883D81428; Tue, 4 Jan 2022 19:44:22 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id AB10483025 for ; Tue, 4 Jan 2022 19:44:17 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=microchip.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=Eugen.Hristev@microchip.com DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1641321859; x=1672857859; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=fBHD2A1zcvRAtT6MtxdePaBUxoYHxgR1ObFAdGZjV7M=; b=RjgU0QLWexvXw9jvIm7XIcOPlXvjNcJoHxqEY99/a2DDvYECUPyihdW+ 4LmrQpS7Lc2ug8CymJa9MWJWiQ3vMMu478M7HRIigbMN1/Ap97CRg0uFM g+Fb2Wv+Y6kcqOEhoeIqJvdOj/b7vyO12ZTpBWyUzBntg5MieMtQfwGqH xl3xQzy4+AhqOoJAj6J0VPyPJERYE2wJXIMVuD3DpTqCVLLSLTE8lRSjC sq0v/EikIoUd3LQb0CMBX03F2HzEGNfAgmLELXZMIUJSnKmHE4/KVSUjd 9em8Pz51t8iAKhXpYLCBbilOL+qM+POd0l6oR+5nSdmDDmhIjuUP3UhDr Q==; IronPort-SDR: 65jX5+uVjXFdiKyscHyU9xjOsanX+Y/ESoi+qI52kAPrwRrydtnBAmH14qKxsoszSA50PfFWT3 I+UBWMwJ0cDRkUFZEIuEeJgr7S0cDf3abnbb7Xre4vuThwcYo1eY+ieyjz4NZ/DR8usulhaAUy qmnESbwYwTet9+DPW2qaKkrl5vQcW5FDjnMs/Xd3PLIiIYrDzrMB4RnILO4ULkQO5Ta4ARFVGR RdczLUG9kVs41qBlU7JyzcoDSgZUaS4j8oNbsHMYm+9tuSPgfkp1bI0LpAYn16Yc1/9DTfOx4K TroBZ3o+t76OX/BqJEYDbm6C X-IronPort-AV: E=Sophos;i="5.88,261,1635231600"; d="scan'208";a="148540953" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 04 Jan 2022 11:44:17 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.87.72) by chn-vm-ex02.mchp-main.com (10.10.87.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Tue, 4 Jan 2022 11:44:16 -0700 Received: from ROB-ULT-M18282.microchip.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Tue, 4 Jan 2022 11:44:13 -0700 From: Eugen Hristev To: , CC: Eugen Hristev Subject: [PATCH 3/4] ARM: dts: at91: sama7g5ek: move eeproms to flexcom8 Date: Tue, 4 Jan 2022 20:43:58 +0200 Message-ID: <20220104184359.315440-3-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220104184359.315440-1-eugen.hristev@microchip.com> References: <20220104184359.315440-1-eugen.hristev@microchip.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean The rev4 of the board sama7g5ek has the eeproms on flexcom8 instead of flexcom1. Initialize flexcom8 with required pincontrol and move the eeproms accordingly. Signed-off-by: Eugen Hristev --- arch/arm/dts/sama7g5ek.dts | 39 +++++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/arch/arm/dts/sama7g5ek.dts b/arch/arm/dts/sama7g5ek.dts index 16192ca0b1..6adb044258 100644 --- a/arch/arm/dts/sama7g5ek.dts +++ b/arch/arm/dts/sama7g5ek.dts @@ -20,6 +20,7 @@ aliases { serial0 = &uart0; i2c0 = &i2c1; + i2c1 = &i2c8; }; chosen { @@ -92,17 +93,31 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_flx1_default>; status = "okay"; +}; - eeprom@52 { - compatible = "microchip,24aa02e48"; - reg = <0x52>; - pagesize = <16>; - }; +&flx8 { + atmel,flexcom-mode = ; + status = "okay"; + + i2c8: i2c@600 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c8_default>; + i2c-analog-filter; + i2c-digital-filter; + i2c-digital-filter-width-ns = <35>; + status = "okay"; - eeprom@53 { - compatible = "microchip,24aa02e48"; - reg = <0x53>; - pagesize = <16>; + eeprom@52 { + compatible = "microchip,24aa02e48"; + reg = <0x52>; + pagesize = <16>; + }; + + eeprom@53 { + compatible = "microchip,24aa02e48"; + reg = <0x53>; + pagesize = <16>; + }; }; }; @@ -145,6 +160,12 @@ bias-pull-up; }; + pinctrl_i2c8_default: i2c8_default { + pinmux = , + ; + bias-disable; + }; + pinctrl_qspi: qspi { pinmux = , , From patchwork Tue Jan 4 18:43:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 1575351 X-Patchwork-Delegate: eugen.hristev@microchip.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=microchip.com header.i=@microchip.com header.a=rsa-sha256 header.s=mchp header.b=Ufe4Iivh; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JT1kf2lFtz9ssD for ; Wed, 5 Jan 2022 05:44:58 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 09F1E83095; Tue, 4 Jan 2022 19:44:31 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=quarantine dis=none) header.from=microchip.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=microchip.com header.i=@microchip.com header.b="Ufe4Iivh"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1EBDF8304F; Tue, 4 Jan 2022 19:44:28 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3D62982F89 for ; Tue, 4 Jan 2022 19:44:24 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=microchip.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=Eugen.Hristev@microchip.com DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1641321864; x=1672857864; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=N5IFWm0dKX3jOM6E7r2ivH2Z3YR0PyoJz+Yc1aN7kxM=; b=Ufe4IivhP9/FkOWNmScglg+IxU15k3iuCRq++egnaIM8cNq8JitpkRx+ lORnXbzEIlo1168tCRuRRRg/WAkqw1TMTnzQ6Pnnwg/wVkpRxYoRhmulG zspLbeKe8zGIuAc7CBRIUXhOHJ2Ctd84tiCI0ugOc9M8zViPcszHQ1asT YmJQ16/WWUfFfnBwal2PAmUSGcOeasUk3R+AlcsFKgT4wtUqebQTHyvmF j/63rAkRXBer2r1wo53I1lN8k73/ay+v3/rig3fGabnolXstqzaunHEfo mGBR2pU1wGe36AAHqMZNOWhbzcK13a1X4jad/sB71FVbI5RtGRw10Jz0P g==; IronPort-SDR: UkFyTOgm0WuV3PbG3GhHYymaBa6gjYhTfQXn/cbq2dLraCGaC6vTaVigcEMuwzLARRRE1vqElW LToMmvi3Y6YcBEfluQ9q+eupbBRMmGiw74/TSLT1hpaR7olpEoRbm87faKmV5aQKp2S9iW2gKk QH6XTd1NV8e0ydAKZTGn7U38A1qwaRivi1BFLT9QwNCoLEvMN2/9f7Kkg2nTUTTp3BaHq25zhV pkMTiiPFieC0j5YDROlUA/mn5jfKCNjxBBPgkFy15ZT9LbLPvD/CjRP8ObRPQYlxfRqqASQGh+ Ai9hXHfFX4HX/rSvJUjOURAl X-IronPort-AV: E=Sophos;i="5.88,261,1635231600"; d="scan'208";a="144315889" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 04 Jan 2022 11:44:22 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Tue, 4 Jan 2022 11:44:21 -0700 Received: from ROB-ULT-M18282.microchip.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Tue, 4 Jan 2022 11:44:17 -0700 From: Eugen Hristev To: , CC: Eugen Hristev Subject: [PATCH 4/4] configs: at91: sama7g5ek: enable CONFIG_PHANDLE_CHECK_SEQ Date: Tue, 4 Jan 2022 20:43:59 +0200 Message-ID: <20220104184359.315440-4-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220104184359.315440-1-eugen.hristev@microchip.com> References: <20220104184359.315440-1-eugen.hristev@microchip.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean CONFIG_PHANDLE_CHECK_SEQ will allow different sequence number for nodes that have the same name, but they are different. In sama7g5ek case, there are multiple 'i2c@600' nodes which are child nodes of different parent 'flexcom' nodes. These are different i2c busses even if the node is the same, and have to be differentiated. Without this config, the sequence number 0 is reused for two i2c busses, and this is something that we have to avoid: Looking for 'i2c' at 4704, name i2c@600 - serial0, /ahb/apb/serial@e1824200 - i2c0, /ahb/apb/flexcom@e181c000/i2c@600 Found seq 0 i2c_post_bind: i2c@600, seq=0 Looking for 'i2c' at 6236, name i2c@600 - serial0, /ahb/apb/serial@e1824200 - i2c0, /ahb/apb/flexcom@e181c000/i2c@600 Found seq 0 i2c_post_bind: i2c@600, seq=0 After this patch: Looking for 'i2c' at 4704, name i2c@600 - serial0, /ahb/apb/serial@e1824200 - i2c0, /ahb/apb/flexcom@e181c000/i2c@600 - i2c1, /ahb/apb/flexcom@e2818000/i2c@600 Found seq 1 Before the patch: => i2c bus Bus 0: i2c@600 Bus 0: i2c@600 (active 0) 52: eeprom@52, offset len 1, flags 0 53: eeprom@53, offset len 1, flags 0 => After the patch: => i2c bus Bus 0: i2c@600 Bus 1: i2c@600 (active 1) 52: eeprom@52, offset len 1, flags 0 53: eeprom@53, offset len 1, flags 0 Signed-off-by: Eugen Hristev --- configs/sama7g5ek_mmc1_defconfig | 1 + configs/sama7g5ek_mmc_defconfig | 1 + 2 files changed, 2 insertions(+) diff --git a/configs/sama7g5ek_mmc1_defconfig b/configs/sama7g5ek_mmc1_defconfig index e297489900..15a5c54e75 100644 --- a/configs/sama7g5ek_mmc1_defconfig +++ b/configs/sama7g5ek_mmc1_defconfig @@ -72,3 +72,4 @@ CONFIG_TIMER=y CONFIG_MCHP_PIT64B_TIMER=y CONFIG_OF_LIBFDT_OVERLAY=y # CONFIG_EFI_LOADER_HII is not set +CONFIG_PHANDLE_CHECK_SEQ=y diff --git a/configs/sama7g5ek_mmc_defconfig b/configs/sama7g5ek_mmc_defconfig index 4f68a46456..7abd5c8a38 100644 --- a/configs/sama7g5ek_mmc_defconfig +++ b/configs/sama7g5ek_mmc_defconfig @@ -72,3 +72,4 @@ CONFIG_TIMER=y CONFIG_MCHP_PIT64B_TIMER=y CONFIG_OF_LIBFDT_OVERLAY=y # CONFIG_EFI_LOADER_HII is not set +CONFIG_PHANDLE_CHECK_SEQ=y