Received: by 2002:ab2:69cc:0:b0:1fd:c486:4f03 with SMTP id n12csp335186lqp; Tue, 11 Jun 2024 06:12:21 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUxVPA7cHEo1Qh/Q8d3vntyf68trJr31aEseCYCR/lnlnG5Bet0KKQQ6ofq3YyGH8CKUWDiiDtJYKNQ46UQ6zN14Nnv5T1aTQQ0//2WrQ== X-Google-Smtp-Source: AGHT+IHb04WJNcyKw/Gq0i7wJY4O1LJyJxv6C3XbrG4LKfxIysXnQVpZwu2p9p0NX/QeEaw+dEcr X-Received: by 2002:a05:6a20:9190:b0:1b6:a7c5:4fbe with SMTP id adf61e73a8af0-1b6a7c5585amr5039202637.14.1718111541550; Tue, 11 Jun 2024 06:12:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718111541; cv=pass; d=google.com; s=arc-20160816; b=NgkHyy0/lVm9QyrT46VUT8AT938wWw7BxEsjoWW+1BO4c1+9C6YVpmW++J6nG+VtaF n159a7Nw+SKuma0Dpk8Cwtv3wccJp8dUH+q7ZxJQAMPwAB2zE6KrTGOrGs2Jlk1zm1Hi Gv1GBwcnDgx4Qnahi4ZQxe/7OQj/YaQfVtxv0Gk0vIw0z4Ss2HSaoAlzvb7CwtLWEr1N iiqnt3+NJntxfxWROAuCKzj9SpPRTvTlpKm9ZJhOhYECkXZAQqcK4WJktnohHSjjRW/U 1pgf6n3C5r720LvPafaqXbLHCQkohH3r8PbKcYXZt98Upl6YNQGKKQrbkHUu6MeIryY+ mEpw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=06IHQ3+5Gp7z/eeC2xO0ARIS7dpxQSpyDxJCJAplXMM=; fh=no5Q1/Z/Y6GQyZt9Hfk+na5bXhvbdtT2fuDvEbqXrn8=; b=ZeV7ln5O4hZEqOFX36q8Bt8EBWWK7Uf5ODa26yinnqL9wJFTtURbZdKSHv3muxPEk1 n74AL9bjD4bMIZZgpnROria/9eMoThGsG1YHgLZJuHzjGbBtvkJ0KTzc1iPHkS/4M1SP FY285uH82nzEgFYX31FzzVGe4twoX+YfBH6HAuxt/opbfxdxtr5l29smJoc57iW6NoTy T4ft9XIJ5HHS3PBow4tBdLogYmfiPB6S4/ff0ms9QGwkZ9FCQiAso6t5GSk7CBMYMGqW VD/bw6z7ThDebGhPOfPm9QajEPSLUsTi+/DBCi3Lx/z6Tdan/THiCtydnFcVdKekx/kF 4boA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=fail header.i=@phytec.de header.s=a4 header.b=autcCY38; arc=pass (i=1 spf=pass spfdomain=phytec.de dkim=pass dkdomain=phytec.de); spf=pass (google.com: domain of linux-kernel+bounces-209911-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-209911-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6de261c9923si9270061a12.297.2024.06.11.06.12.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 06:12:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-209911-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=fail header.i=@phytec.de header.s=a4 header.b=autcCY38; arc=pass (i=1 spf=pass spfdomain=phytec.de dkim=pass dkdomain=phytec.de); spf=pass (google.com: domain of linux-kernel+bounces-209911-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-209911-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 271D2286214 for ; Tue, 11 Jun 2024 13:12:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5C5B417C7CD; Tue, 11 Jun 2024 13:12:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=phytec.de header.i=@phytec.de header.b="autcCY38" Received: from mickerik.phytec.de (mickerik.phytec.de [91.26.50.163]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 46480178CCF for ; Tue, 11 Jun 2024 13:12:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.26.50.163 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718111534; cv=none; b=L16pSTEPheVsc4PW+rPxFdmgenMNicMmI5Jegk2PywbinEBPc7rD4Os7Pw3pf6TxtV4gpHC3My805rkNv9+1r0B1IYhPXULUHjh1ojzCvLejE0+cTSbZflQ/kKxmxYVBjD9fVGQeJHVz+jPQcyQ55ySprecVpbTDgU2C1OSaOfE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718111534; c=relaxed/simple; bh=1uyVeCNwdm3i9R+X7AEUciEH3LQi9dhrZKghSZoyxC8=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=WxP18pS3mT3Z3mPm595u2yCyHENLD3rZF2HWsMkQW7nwiseUOQd44v594tlBRBuHGbzLdjiu/jexKVB89c5jI4g9dsgzTrd91j7U7kzy3h6ETd0LWLhFBBhhvMS6peDLTeXKmkPaIU/8ircgvIvxGdoFnMoB0haKGPBZIkrf268= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=phytec.de; spf=pass smtp.mailfrom=phytec.de; dkim=pass (1024-bit key) header.d=phytec.de header.i=@phytec.de header.b=autcCY38; arc=none smtp.client-ip=91.26.50.163 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=phytec.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=phytec.de DKIM-Signature: v=1; a=rsa-sha256; d=phytec.de; s=a4; c=relaxed/simple; q=dns/txt; i=@phytec.de; t=1718111528; x=1720703528; h=From:Sender:Reply-To:Subject:Date:Message-ID:To:CC:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=1uyVeCNwdm3i9R+X7AEUciEH3LQi9dhrZKghSZoyxC8=; b=autcCY38H97S1LBqDZ3xhC8kq/YUV7TFGJqjn9+PQd+a5Z9uDyO7c7vE2dHrALku fK2VyTcMNyLMxtpEP+Cfz+wqaOM6+wtjzchbJZ6woOkrI05lXapMNL20bZD9gw/a f1isyGFKfxwR35GfDaKhet5Pl74qdWPaet6I+nVjwDo=; X-AuditID: ac14000a-03e52700000021bc-0f-66684d283699 Received: from berlix.phytec.de (Unknown_Domain [172.25.0.12]) (using TLS with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mickerik.phytec.de (PHYTEC Mail Gateway) with SMTP id CD.94.08636.82D48666; Tue, 11 Jun 2024 15:12:08 +0200 (CEST) Received: from [10.0.0.19] (172.25.0.11) by Berlix.phytec.de (172.25.0.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.6; Tue, 11 Jun 2024 15:12:03 +0200 Message-ID: <4e7dd467-20be-43ce-936d-200ede6d511b@phytec.de> Date: Tue, 11 Jun 2024 15:11:59 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 0/4] Add overlays to disable optional hardware in k3-am6xx-phycore-som boards To: Vignesh Raghavendra , Nathan Morrisson , , , , , CC: , , , , Wadim Egorov References: <20240528225137.3629698-1-nmorrisson@phytec.com> <4ac40139-eda0-4f6a-8bbe-99110605f91e@ti.com> <33084cb0-95f4-414d-b094-bf704376fd02@phytec.de> Content-Language: en-US From: Daniel Schultz In-Reply-To: <33084cb0-95f4-414d-b094-bf704376fd02@phytec.de> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: Florix.phytec.de (172.25.0.13) To Berlix.phytec.de (172.25.0.12) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprEIsWRmVeSWpSXmKPExsWyRpKBR1fDNyPNYMcHA4s1e88xWcw/co7V Yvnn2ewWL2fdY7PY9Pgaq8XlXXPYLN78OMtk8aFxM5vF/z072C2636lb/D/7gd2B22PTqk42 j81L6j36u1tYPf5cfMfqcfzGdiaPz5vkAtiiuGxSUnMyy1KL9O0SuDKenfnLXnBcvmL38vgG xvuSXYycHBICJhLru18xdjFycQgJLGGS6J8/B8q5xShxdt8tVpAqXgEbiQ3vbrCB2CwCqhJ9 /1ezQcQFJU7OfMICYosKyEvcvzWDvYuRg0NYIE3icp8RyBwRgZ2MEpNuvGAFcZgFVjNKPJiy jB1iw3xGiVkTrjOBdDMLiEvcejIfzGYT0JK4s2UuM8gkTgFbiQ+TEyFKLCQWvznIDmHLSzRv nc0MYgsJKEjM3jaZEeIdeYlp514zQ9ihEkc2rWaawCg8C8mts5Bsm4Vk7CwkYxcwsqxiFMrN TM5OLcrM1ivIqCxJTdZLSd3ECIo3EQauHYx9czwOMTJxMB5ilOBgVhLhPROTnibEm5JYWZVa lB9fVJqTWnyIUZqDRUmcd3VHcKqQQHpiSWp2ampBahFMlomDU6qBsWfzr/meR3sqt030bLaY YPRi+47whjMPKvYnq4hfWL5/84dVP8Nk8gvfPtl7t/narfuV72LfuJevemCy4+85DrdNbzZK GUR5sNjbMOtp9E59svLhq7mXlnezfS52LHDV4YxVfDMta33M8lu32g3uebgdXZ/dV7V7l329 oeet1zO2vdkn1LVmd5ASS3FGoqEWc1FxIgA2f7xBpQIAAA== Hi Vignesh, On 10.06.24 10:07, Wadim Egorov wrote: > Add: Daniel Schultz > > Am 03.06.24 um 19:41 schrieb Vignesh Raghavendra: >> Hi Nathan, >> >> On 29/05/24 04:21, Nathan Morrisson wrote: >>> Add three overlays to disable the eth phy, rtc, and spi nor. These >>> overlays will be used to disable device tree nodes for components >>> that are optionally not populated. >>> >>> v2: >>>    - Add build time tests in makefile >>> >>> Nathan Morrisson (4): >>>    arm64: dts: ti: k3-am64-phycore-som: Add serial_flash label >> >> >>>    arm64: dts: ti: k3-am6xx-phycore-som: Add overlay to disable eth phy >>>    arm64: dts: ti: k3-am6xx-phycore-som: Add overlay to disable rtc >>>    arm64: dts: ti: k3-am6xx-phycore-som: Add overlay to disabl spi nor >>> >>>   arch/arm64/boot/dts/ti/Makefile               | 17 +++++++++++++++++ >>>   .../boot/dts/ti/k3-am64-phycore-som.dtsi      |  2 +- >>>   .../ti/k3-am6xx-phycore-disable-eth-phy.dtso  | 19 >>> +++++++++++++++++++ >>>   .../dts/ti/k3-am6xx-phycore-disable-rtc.dtso  | 15 +++++++++++++++ >>>   .../ti/k3-am6xx-phycore-disable-spi-nor.dtso  | 15 +++++++++++++++ >>>   5 files changed, 67 insertions(+), 1 deletion(-) >> >>>   create mode 100644 >>> arch/arm64/boot/dts/ti/k3-am6xx-phycore-disable-eth-phy.dtso >>>   create mode 100644 >>> arch/arm64/boot/dts/ti/k3-am6xx-phycore-disable-rtc.dtso >>>   create mode 100644 >>> arch/arm64/boot/dts/ti/k3-am6xx-phycore-disable-spi-nor.dtso >>> >> >> I am not sure if this a common practice to have overlays to disable >> missing components (at least I dont see such dtso in kernel). I would >> like to see an what DT maintainers feel as such dtsos can explode in >> numbers. >> >> Is this something that U-Boot can detect and fix up for the Linux DT? >> >> Unpopulated SPI flash and RTC should ideally not be an issue as drivers >> would gracefully fail albeit with some sort of error msg. >> Not so sure about Eth PHYs though. >> >> Also, Are these dtso's mutually exclusive? ie can SoM have SPI flash but >> not RTC, have RTC and SPI Flash but no ETH PHY? Let me explain a little bit why we would like to have those overlays upstream. Our SOMs come with a so-called "option tree" to produce one product with different components. For example, our standard part name for the phyCORE-AM62x is PCM-071-5432DE11I.A0 and the option tree is located between PCM-071 and A0. In this particular tree, the fourth character defines the DDR size with 2GB. If we have a customer with less memory requirements, we can simply produce the 1GB variant (PCM-071-5431...) and lower the cost. Luckily, we can read the TI SOC part number in u-boot and disable non-existing components like CPU cores, GPUs, etc. in the Linux device-tree. However, we still need to handle all modifiable parts on our SOMs. For the phyCORE-AM62x, this would be the DDR size, SPI-NOR size and flash type (Q/OSPI), and whether the RTC and Ethernet PHY are populated. The DDR size can be handled completely in SPL, but for everything else we need to modify our Linux device-tree. The easiest and cleanest way to do that is by applying overlays, which are located next to the device-tree. I'm not a fan of letting drivers fail to probe. Customers with extensive product verifications most likely need to disable those manually, which is against the idea of buying a fully-functional SOM. Alternatively, we need to hard-code fixups in our U-Boot which means some U-Boot/Linux combinations might not boot anymore or we maintain them in a Phytec repository and never archive fully upstream status for our products. Regarding the number of overlays. We use those three plus an additional one, which we need to upstream too, for the AM62x, AM62Ax, and AM64x. The upcoming AM62P and AM67 require one additional overlay for an optional, second EEPROM. In total we need 5 overlays for 5 AM6 products. Best Regards, Daniel