Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2656000rda; Wed, 25 Oct 2023 08:44:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEfqXDZcK2BwH5Vr40ekSx3w7p7aM2T6YhxSTDhUYZVbPNzK4LXLb1lg7wS2BxAjhfUFtDX X-Received: by 2002:a5b:98e:0:b0:d9c:efc5:1391 with SMTP id c14-20020a5b098e000000b00d9cefc51391mr15007972ybq.60.1698248676064; Wed, 25 Oct 2023 08:44:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698248676; cv=none; d=google.com; s=arc-20160816; b=p4ndVS9iJqq8omqtoSR7JTmfEwgv2xUJoka8TFEi2bo3BczN0Tkyfq7rgg9G3lYQDy a+hX7mNO+WAPN7FDMSmKtu9yeYHUUD6AbEXOqtnVGTlvCgIO8tmLg5cxnbBKHaTo8A1E uuIRPYPFw6X0zFHmh0M6BRDh7WpQTOtqIEn+khOHH6e5QnKxyRbkmBRNJ/7TVnqT5RpT MxcwcekNDwM+9AJRcXX6uYkawJcmqKx1OSEAmt4TOUtn76uhmc1S+443kOmv1T4VaqkM aVudJB1rN+HphCzbnyM7KZUKAZuwFEXHhaX9Gq65tTKkuHbBo0r4d7tMISYRkVIaSPUW ueOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=b2vWuXgckxJUpT+tP14WafiD3Xak5aDPElXrXyECxbM=; fh=1Ovs9Cd/8y6BfBONVLNPMzJP6ZoO+YlmGkpIs2i6sH0=; b=fRHhDX1q3jtQM7ev06Q9aybqw3b82jedgH+bG2jUbv/BZbSxwOVc90EowOt6Cp73Xn J+uAmIYm6FYJqz1Ye8BAukb5GFA1QgCyKJjGesxExrzRLnwX/HNgMfVNrAC+5LsVmT30 j7NC0P/bzl9G2Pj37c0LrpiHK6OErSRRlzsP8RDoAlQqcNUCs+r0+pAT8z6YN1QQtSVM VLtLpaMK+2w9CUDkdTDKmRuNm6ux7km+eQJ+WSvIjqkIFanIYSCyWXG4/19IK1NY0Fcc n+sxwf6Hte4oEXCdtGA5GETZmJhPXxBMeI47G2JJuSDlfbEjG5FedxeKov9il+Qs0kdO pcMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="S/arV84f"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id x15-20020a056902102f00b00da042925538si5422178ybt.40.2023.10.25.08.44.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 08:44:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="S/arV84f"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 9BDF8814971C; Wed, 25 Oct 2023 08:44:11 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234367AbjJYPoB (ORCPT + 99 others); Wed, 25 Oct 2023 11:44:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232469AbjJYPoA (ORCPT ); Wed, 25 Oct 2023 11:44:00 -0400 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2722412F; Wed, 25 Oct 2023 08:43:57 -0700 (PDT) Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 39PFhf27097708; Wed, 25 Oct 2023 10:43:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1698248621; bh=b2vWuXgckxJUpT+tP14WafiD3Xak5aDPElXrXyECxbM=; h=From:To:CC:Subject:Date; b=S/arV84f3tRL76/ANqUb4PQyGmFqBFHxlk5jZ0ShBapqeLcmgfUpECTWIpgrpFMUO p2exa1Xxp1fxDv/G2Os1Ah30eDl3zIsRrnZu2UPZMtlps8QDRI3r5UgePBI9Tcn5HY oTsOZ0rbK9uyZHSJfo2Q+S46WsvcO1/rvUh9/5k8= Received: from DFLE106.ent.ti.com (dfle106.ent.ti.com [10.64.6.27]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 39PFhfOF019144 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 25 Oct 2023 10:43:41 -0500 Received: from DFLE113.ent.ti.com (10.64.6.34) by DFLE106.ent.ti.com (10.64.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 25 Oct 2023 10:43:41 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Wed, 25 Oct 2023 10:43:41 -0500 Received: from lelv0327.itg.ti.com (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 39PFhenW006861; Wed, 25 Oct 2023 10:43:40 -0500 From: Andrew Davis To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Nishanth Menon , Vignesh Raghavendra , Tero Kristo CC: , , , Andrew Davis Subject: [PATCH RFC] arm64: dts: ti: k3-j721e: Use nvmem to model the efuses Date: Wed, 25 Oct 2023 10:43:39 -0500 Message-ID: <20231025154339.1270246-1-afd@ti.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 25 Oct 2023 08:44:11 -0700 (PDT) The nvmem subsystem is used to model efuse areas. Currently our efuse areas are described using raw syscon nodes and offsets into that. The use case for this efuse area is to store the SoC Ethernet MAC address. This is already such a commonly supported use case that both the nvmem and networking subsystem have built-in support for it. Use that here to get the following: 1. More standard, complete, and accurate description of this hardware efuse area. 2. Remove the need for this custom 'ti,syscon-efuse' property (which I'm surprised was accepted into the binding in the first place..) 3. Allow the parent node to not have to be a syscon which fixes a DT check warning. RFC for now as we don't have a simple generic compatible for memory mapped nvmem areas. For now we use the 'uniphier-efuse' compatible as it is essentially just a generic mmio nvmem area, which means any generic area is technically "compatible". If this all is acceptable I'll split this patch into three and do the same for all the other K3 devices still using this odd 'ti,syscon-efuse' pattern for v1. Signed-off-by: Andrew Davis --- .../boot/dts/ti/k3-j721e-mcu-wakeup.dtsi | 24 ++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi index 05d6ef127ba78..8f488d43d49df 100644 --- a/arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi +++ b/arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi @@ -34,13 +34,30 @@ k3_reset: reset-controller { }; }; - mcu_conf: syscon@40f00000 { - compatible = "syscon", "simple-mfd"; + mcu_conf: bus@40f00000 { + compatible = "simple-bus"; reg = <0x0 0x40f00000 0x0 0x20000>; #address-cells = <1>; #size-cells = <1>; ranges = <0x0 0x0 0x40f00000 0x20000>; + efuse@200 { + compatible = "socionext,uniphier-efuse"; + #address-cells = <1>; + #size-cells = <1>; + reg = <0x200 0x40>; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + mac_address: mac@0 { + reg = <0x0 0x6>; + }; + }; + }; + phy_gmii_sel: phy@4040 { compatible = "ti,am654-phy-gmii-sel"; reg = <0x4040 0x4>; @@ -533,7 +550,8 @@ cpsw_port1: port@1 { reg = <1>; ti,mac-only; label = "port1"; - ti,syscon-efuse = <&mcu_conf 0x200>; + nvmem-cells = <&mac_address>; + nvmem-cell-names = "mac-address"; phys = <&phy_gmii_sel 1>; }; }; -- 2.39.2