From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=205.220.180.131 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796365356; b=dgxfoBOA86sDzKsNiaJWb1TSHWJ2HjXEIARNOViQTP/Z64pQayFDxOxjWe0LGMLFXQpc KVClQL9jJY5MP1sOr2Sq1kNr1X856J3RJQg9BK9fUy2GTQIZk7T9qZ9/2WMFZCXQlMRBJ ZctyNZx0cMxY6xXtx/kY8DOchkxDZPPrI0TWK3w46mE9Svw4MxuVrekK9DuPRHEYw/oAV FeO977uRNNAilqLZyT0+lJ0HxOi1bsQSRwtP6wO1ktKigHhVgQqlo5/PZJnICvQ+BBq3E 1nK7r9ijx+Rqo765boS7/gChdcnCPsQ73hzHOj6Siyw3pm3xxqPgGbtWl7zONzkgvBw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796365356; h=DMARC-Filter:Received:DKIM-Signature:Received:Received: DKIM-Signature:X-Google-DKIM-Signature:X-Forwarded-Encrypted: X-Gm-Message-State:X-Gm-Gg:X-Received:X-Received:Received:From:Date: Subject:MIME-Version:Content-Type:Content-Transfer-Encoding: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Authority-Analysis: X-Proofpoint-Spam-Info:X-Proofpoint-Spam-Details-Enc: X-Proofpoint-GUID:X-Proofpoint-ORIG-GUID:X-Proofpoint-Virus-Version: X-Proofpoint-Spam-Details; bh=rKdRc+1r0PCJm3nGXZGvRsl6OeGs3aANbPDVr4jqDQg=; b=w2DbR2kiOppz3kN6tAiDP7Lj5nJ75kjcULqDepc0GySvSpk4GSqP/OJf97+Vqocmp/yx KRd+GR2h2IkcJRCDgojjs7alvgbd6PPu1eotYEfiCK8Gd4QpYgv5BvJPD7PAlmHlumQK1 mqQwUl48dWc3V7JI/nf3o3gsok9aQYKboa+KoyP/6sV2nvhPAkhSXR6cI4B/Hrp728jSr Otr5IXbvI6x+oqnqfDZJDF54PfB8Na8EyC+trua6ZRYYl/6ugSueAKH2wagUQeLjc0o01 D2DCrqtatiydHY8ku68L72e9ARwrbBuCcG1wbqXcIK4+GojsCdzGT4dRXlqBv09HnuA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b="THj95O2/"; dkim=pass header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=dpDWNTG+; arc=none smtp.remote-ip=205.220.180.131 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D3DC8606A33E for ; Fri, 4 Dec 2026 06:22:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org D3DC8606A33E Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=THj95O2/; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=dpDWNTG+ Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6B45GVWx2075988 for ; Fri, 4 Dec 2026 06:22:34 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= rKdRc+1r0PCJm3nGXZGvRsl6OeGs3aANbPDVr4jqDQg=; b=THj95O2/wdfsXIGT zvGEl+aVFtvsxptxivFuudvAR2SdDFVfkA0d+AYpZKUUD0iUvhrvR1b1cBtcdLZU Tp/50as5wNnwW0CmrWSID2fdPTLlQS8bW89tMdoEM9T9VPyh3BiuzHpAo3txm9Nv T8K0hD4dPq9qUemfxQPgmdIsUzWl5E4bKJb8SQ4J/NOg9jA2AOwUBERFr7b6Ymkq cKo/ectFsWuQhaHQ6OGx09EmbC0sues9sNqQZCwqwMkgHEAoPS4LkgWNtR7aekOe bHO19PGtRykiDv5773HBH+3eIMACiCXEOLIp9BJ4KnxuzAnfCj3MwDJFeI+nZ6Ll KGgVTQ== Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4jbq7qg71m-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 04 Dec 2026 06:22:34 +0000 (GMT) Received: by mail-pf1-f200.google.com with SMTP id d2e1a72fcca58-8a59717b0c0so415370b3a.3 for ; Thu, 03 Dec 2026 22:22:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1796365354; x=1796970154; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=rKdRc+1r0PCJm3nGXZGvRsl6OeGs3aANbPDVr4jqDQg=; b=dpDWNTG+WRfH5iLTSw+m78OevCI+LvElHkJDwNPGOLMJgxwhMKLSe/B7ojAr7esPu5 +M+LHgClEX21oh4L3/Smcrq9j+RgWKuZM6P9XJq6FmCeiJp9M6U887RfOcID5WpyqDlu +SzQyp0q+1/fwfHWo/AXzyyAs3lQhlA+DZC7UrgcA5TyIPeDtPIxtoCkSu0iVvyQwd9F YbRGKGpW7SKFkd8JN8eCrOH9lRgjBnYaRZt5FvM8tB2M4Kfmi7QBeggsavVas9kav08g iXywUXhaFSbvDeuXGBCVfrS02Je1iC0u20DVOyKGk1ERn7e8KYoKBB3ALc/KYR+uL9U8 YIaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796365354; x=1796970154; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=rKdRc+1r0PCJm3nGXZGvRsl6OeGs3aANbPDVr4jqDQg=; b=GiK6mKrZ4n3K3d2KAF3zXlRd1+8EPQcDQSCy96LWKDmuP8KIjWBMDw7QtcfiXdyNb6 jHXN4ntux4A8KctdvJ5HLc8dRJdKJwX32ucnceeMsbHn8T/TJ9wKgIPz5ZLkK1TFpbO3 ksijYE4Fzz1FqLtbaki/040kgoeQ6Oo339n+xMecWTEyb7OCMdIc9XVuVVvLXG697o49 9s680kubeo2ge7BnpCxytSesLXLCrWYZvHLMJs0hBI7BnKleFSX9vnOVmqbZ/H3e23nL 7EOUd+Mnrr1760Uiy+eyJ5VyDCdGj3mNRpPOnWFSPfnHyoQILyZQPawRG/T5/cAcVKQR XhjA== X-Forwarded-Encrypted: i=1; AL+hErFVy+jwVT6r9yVeeG4bsC0id132gtVevnqyEg6yYUhFYpQtKNxzyAYhL9PWEVmpKPQOt2G4oI6+ty2bJkw=@vger.kernel.org X-Gm-Message-State: APuU4Z9wPQHZwPJSZJJkRTuLG8kRWzf5rP6cTVEa5H8f8oIBt9bVNUml QztepZXVPhjECVEfUmkOFfDwT5IhfoJWtL7EYUwSNr8Z0YqH06I9BX02Z5shopzk4Nq7O7lcYqX CVWMfzLH8vvRDLjbj/trTF0c+95h1F8P30GHDEwaUJPs+4DkTCB5nxlvbvBg74jIxeKQ= X-Gm-Gg: AZFdTZckEtLVQLcYU3ldhz62bW8bPTm35lmc1hVVEAdyI+2DejsIl5bgla5uXHxS3MQ IYeT6CMwD0ITBFuAM45Z4KjSzd95i5DBWwK8pNddNOmu/8jzjJvovSNcmyE50d2gG+rp3A5V9y5 btk12upwOKomp/uAZOqCaVUasaFda0qeYOJuFUnIgrPr8OUFnGeDaErOtiFTrO3P7x6qCr1VsCe 3eW4R9btmGCnSsAzzNst4MIqi2dElIGVNb81LMKeeVbrEOSovBKxnL+ovSTQbVWLVu4hOZWYm4J fICsqVdDKZxSobg7rv7iT6/XEj52IfDBU/YgR1++PsfY5UdIEOAM8HoITszpMUayoyxQ/lgnKEL bi5nm2g4BdCeSDCOrFAlNLD6vfwrRZr7PXCsKx0RnOJ/czgWDKEi8XeWYBuKz5FAoOyMhjjP9ht p2hXTYIxF/1hg705ZpZxvWbgoom6Pu/9dY X-Received: by 2002:a05:6a00:e15:b0:8a3:23c1:c0e3 with SMTP id d2e1a72fcca58-8de2f38d09dmr962088b3a.59.1796365353554; Thu, 03 Dec 2026 22:22:33 -0800 (PST) X-Received: by 2002:a05:6a00:e15:b0:8a3:23c1:c0e3 with SMTP id d2e1a72fcca58-8de2f38d09dmr962068b3a.59.1796365353090; Thu, 03 Dec 2026 22:22:33 -0800 (PST) Received: from alfred-sh01-lnx.ap.qualcomm.com (i-global052.qualcomm.com. [199.106.103.52]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8de1397d865sm806197b3a.56.2026.12.03.22.22.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Dec 2026 22:22:32 -0800 (PST) From: Hongmei Xu Date: Fri, 04 Dec 2026 14:22:25 +0800 Subject: [PATCH v5 1/5] dt-bindings: nvmem: layouts: add Qualcomm eFuse Ethernet MAC layout X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20261204-nvmem-byte-mask-for-split-macaddr-v5-1-13c12a99383f@oss.qualcomm.com> References: <20261204-nvmem-byte-mask-for-split-macaddr-v5-0-13c12a99383f@oss.qualcomm.com> In-Reply-To: <20261204-nvmem-byte-mask-for-split-macaddr-v5-0-13c12a99383f@oss.qualcomm.com> To: Srinivas Kandagatla , Rob Herring , Krzysztof Kozlowski , Conor Dooley , =?utf-8?q?Rafa=C5=82_Mi=C5=82ecki?= Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Hongmei Xu X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1796365347; l=4319; i=hongmei.xu@oss.qualcomm.com; s=20260917; h=from:subject:message-id; bh=TX/NJnCxNC5w9WFbIWMfwtQySG4Tq5scyXVd03S7K4A=; b=jJHaOacrHoxs/DWNvJMEX7e8MyiR9ERuSGnZ1aJrmTtw7c2OcVyF6yjbv9eRb/RMTpHjQEbfq sC5xCVw9QvxBOTuc4fXgPwekUOrOj+zJKlHeg/6gcuC49Uo6pFmBc+D X-Developer-Key: i=hongmei.xu@oss.qualcomm.com; a=ed25519; pk=8J3IzbyuOOHSwLvktng8AEQIdStEQDAGNCSOlkASmk4= X-Authority-Analysis: v=2.4 cv=Cpsq4X4D c=1 sm=1 tr=0 ts=6b125c2a cx=c_pps a=mDZGXZTwRPZaeRUbqKGCBw==:117 a=b9+bayejhc3NMeqCNyeLQQ==:17 a=IkcTkHD0fZMA:10 a=pUM-KoujPXoA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=gowsoOTTUOVcmtlkKump:22 a=gEfo2CItAAAA:8 a=EUspDBNiAAAA:8 a=MMB8tABw5GYY5NK98d4A:9 a=QEXdDO2ut3YA:10 a=zc0IvFSfCIW2DFIPzwfm:22 a=sptkURWiP4Gy88Gu7hUp:22 X-Proofpoint-Spam-Info: AW1haW4tMjYxMjA0MDAyNSBTYWx0ZWRfX7qsKKYQnv0Z/ 8Jq1n931jHSc+ah9ScNmMTsxQWHymonD2+y81jTYO0wQZ+kFEIJqjs8VnSfNrHXgGUVFv32SleF xUVCQoqEZL5lKKNH1g4m6OP8xa3CFAE= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMjA0MDAyNSBTYWx0ZWRfX7Z2CgM9HT9Lq S0+4dDajKCeFlWb+RQ1NVZfTF5qIBaFrIA3+m8qJ9B3WByIB6Kurvr5j9kI8YrWl3h60NTfYwzb IVKfploBdiczkB5RMA7Q7KwedmoLkZ2b31xssMVbAKwMy1ariUyU+9ZNeGA4yG0AOxuR75x7Rxm 3c6qX7FnHuwRDfbUBQh/6wXFVW+6VnJwrtavtKZChLlcWrNDmjxrs3z7KK3o+15HJLDxF6NsFiI mMEcK5oqv1BI9WOz6hAnDUEt6MuMSU15tTePfxUpaE/CE4AM055SY4zpxuQ0BeILrloL4HdmwN3 EGb7sBL/uPna3kua2oCQzRBa1btjB9LSz5A8pcQR+J2injExMdejkQvrzotxmLLih3Ju8OwjVX5 l+emKucF1ZzuJ9vnqUJiobdo4vdJunmZRHTn8zZvbg5BYuB09hmj9M4TsfCuNEkOeLRqfpftw7V ll7sesyin6w2HvwyR4g== X-Proofpoint-GUID: GaLypriTbWX75epB3J0ZLGX9c9Ntt4Mv X-Proofpoint-ORIG-GUID: GaLypriTbWX75epB3J0ZLGX9c9Ntt4Mv X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-12-04_01,2026-12-03_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 suspectscore=0 priorityscore=1501 spamscore=0 phishscore=0 malwarescore=0 adultscore=0 clxscore=1015 impostorscore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2612040025 Add a device tree binding for the Qualcomm eFuse Ethernet MAC address NVMEM layout driver. The layout handles cells whose bytes in the QFPROM may not be contiguous. Each cell node specifies the physical eFuse offset and size via reg. An optional byte-mask property selects which physical bytes contribute to the 6-byte output MAC address; selected bytes are compacted in ascending bit-index order. Without byte-mask the cell is read as a plain contiguous 6-byte block. Also add qcom,nord-qfprom to the QFPROM compatible list; this SoC uses the layout and its compatible is referenced in the binding example. Signed-off-by: Hongmei Xu --- .../bindings/nvmem/layouts/qcom,efuse-eth-mac.yaml | 87 ++++++++++++++++++++++ .../devicetree/bindings/nvmem/qcom,qfprom.yaml | 1 + 2 files changed, 88 insertions(+) diff --git a/Documentation/devicetree/bindings/nvmem/layouts/qcom,efuse-eth-mac.yaml b/Documentation/devicetree/bindings/nvmem/layouts/qcom,efuse-eth-mac.yaml new file mode 100644 index 000000000000..545aeb1741ce --- /dev/null +++ b/Documentation/devicetree/bindings/nvmem/layouts/qcom,efuse-eth-mac.yaml @@ -0,0 +1,87 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/nvmem/layouts/qcom,efuse-eth-mac.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Ethernet MAC address NVMEM layout + +maintainers: + - Hongmei Xu + +description: + Layout for reading Ethernet MAC addresses from Qualcomm eFuse (QFPROM). + Each cell node declares the physical eFuse offset via reg. An optional + byte-mask property selects which physical bytes contribute to the 6-byte + output MAC; selected bytes are compacted in ascending bit-index order and + unset positions are zero-filled. Without byte-mask the cell is read as a + plain contiguous 6-byte block. + +select: false + +properties: + compatible: + const: qcom,efuse-eth-mac + + "#address-cells": + const: 1 + + "#size-cells": + const: 1 + +patternProperties: + "^eth[0-9]+-mac@[0-9a-f]+$": + type: object + description: Ethernet MAC address cell + + properties: + reg: + maxItems: 1 + description: + Physical span within the NVMEM device as . The + driver uses byte-mask to determine the actual read length; + size is informational and conventionally set to the physical + span of the MAC bytes in the eFuse. + + byte-mask: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Bitmask where bit i means physical byte i in the eFuse span + contributes to the output MAC address. Valid bytes are compacted + in ascending bit-index order; output positions beyond + hweight(byte-mask) are zero-filled. The number of set bits must + not exceed ETH_ALEN (6). Absent when all 6 bytes are contiguous. + + required: + - reg + + additionalProperties: false + +required: + - compatible + +additionalProperties: false + +examples: + - | + efuse: efuse@360d4320 { + compatible = "qcom,nord-qfprom", "qcom,qfprom"; + reg = <0x0 0x360d4320 0x0 0x8>; + + nvmem-layout { + compatible = "qcom,efuse-eth-mac"; + #address-cells = <1>; + #size-cells = <1>; + + eth0_mac: eth0-mac@0 { + reg = <0x0 0x6>; + }; + + eth1_mac: eth1-mac@0 { + reg = <0x0 0x7>; + byte-mask = <0x5f>; + }; + }; + }; + +... diff --git a/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml b/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml index 566304ed4c78..d7f48d4ed1ba 100644 --- a/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml +++ b/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml @@ -42,6 +42,7 @@ properties: - qcom,msm8976-qfprom - qcom,msm8996-qfprom - qcom,msm8998-qfprom + - qcom,nord-qfprom - qcom,qcm2290-qfprom - qcom,qcs404-qfprom - qcom,qcs615-qfprom -- 2.34.1