From nobody Mon Nov 25 03:33:11 2024 Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) (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 5DA3B1EBA08 for ; Wed, 30 Oct 2024 14:03:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.66 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730297023; cv=none; b=PHH4JSmPDTRBZidnr4jc9MhZOJwrvqftGBm25YOZez2qo9WLLK+42GmRAYeDfSJbeG4Sx9Hpe5NDpv0sWXxfdIX8LarCUdjT4R+cVVJ9cSG3QPj9HYJxMWU7lbtBMWif774xg8sqcGRYoALvtvYXmVM8eXyfcHjLRK3fy+1OELk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730297023; c=relaxed/simple; bh=nbMY5/x+dbMsqaNrYH3cAttll2rbKjnf7PUSqcK3ZrU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=GjR/p/0hPxs5l858EU5dC8efHU4C7cmNLuZ4VKaEKAyjK8rrjcW40Cc6vTW0EUmdQUcTj9gqs7o1n9pri4jVKTtrTCqJQEQ8LMmPnJnyMeGyNsgKTJfpgfcUNw6OQnE5WXh76qT0cQJfDv7xGeUCmlLo3QSnZU+hMlnbzC6fIx4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=kNeic6np; arc=none smtp.client-ip=209.85.128.66 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="kNeic6np" Received: by mail-wm1-f66.google.com with SMTP id 5b1f17b1804b1-431616c23b5so6375235e9.0 for ; Wed, 30 Oct 2024 07:03:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730297020; x=1730901820; 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=r6f04onKhg2BcvYZRQva/GJx3NTh2UIMiNUM08tNq4c=; b=kNeic6npKQC7lwOQtL7Fd5uHw2GmzLBpcjGVWNer66SyT/OHFb+cbyrOjuNnC49VL1 hb8YURXMjkeNr0ahvjFCN8Hvgm+rRYxEZ37BxscGNnqzZwwoMLEBF1qMOup2HyONStFG Ad0Pnap9/aq5Ve1i9/Yt47l2qGA3jgHd3l5u16baijyyGavwoexsVnRE1Rlx/8hCZ0YJ zw6m60oFtYukgegfeTe2GqtW4CgHUsaRMaQyBeOrO9917Kx4pHd3Ys6QOzTmxLOUwCrt ifyw2Bx936Fg+bKQmQ5PmM5Pyiclh5rAAYX05Sb0/r3didBlc21B3hJ8pSLO5BcFOxOu 8c/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730297020; x=1730901820; 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=r6f04onKhg2BcvYZRQva/GJx3NTh2UIMiNUM08tNq4c=; b=q9odzzKJ+QvC2dRn7EAyGmroYVHH3YnYRkgX/+bgzsAlQfA/0xxv1086VL8kit6G+t lFqjP10qIuueESJqHZHtW8mV9LhOseDMoOlyhPfH6DHDEPFuSnLkCdGT9VWMBl6YdyxO +qPfklufqwcJ7fm6WmlqwuuEQS4p5z2tm1QsNDVqKQnjnQhoFSz25s7Oog0mPoxZILrv VImrVAC5hk4rxQWU/SD4Ae4STOYbQn7QDXXqxfM+w3Q7AgfErMIEGm55rmdfaNRq095n Wd6Xeb3s7kh38gFSUundGwl5WCyo5KCb2WgBBE6zhUmHlvn3w05p9xM2FVns9ocqSNMO 2X4g== X-Gm-Message-State: AOJu0YzBeDdEKBXe5jwuL02Bqo95UXfyGhUt6iwHCOu48gbquS0gp+k7 C2SIVBMBDhkg4VKjeGbf5cpHllbkmWt6CbpEYgtTatrBNmyYvTiM7NJ5sj1lNDU= X-Google-Smtp-Source: AGHT+IH9qQ26UfUIVOkVpNtE48/3/x0A7AdAGuPJooQT4HVlIwHqt5RS6ZcAcYmQsOuXx+U2vBwb3A== X-Received: by 2002:a05:600c:1c96:b0:431:55af:a220 with SMTP id 5b1f17b1804b1-431b5729f16mr50868555e9.12.1730297019571; Wed, 30 Oct 2024 07:03:39 -0700 (PDT) Received: from localhost.localdomain ([5.133.47.210]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-431bd97d84bsm22498405e9.30.2024.10.30.07.03.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Oct 2024 07:03:39 -0700 (PDT) From: srinivas.kandagatla@linaro.org To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, Geert Uytterhoeven , Arnd Bergmann , Rob Herring , Srinivas Kandagatla Subject: [PATCH 1/7] dt-bindings: fuse: Move renesas,rcar-{efuse,otp} to nvmem Date: Wed, 30 Oct 2024 14:03:09 +0000 Message-Id: <20241030140315.40562-2-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241030140315.40562-1-srinivas.kandagatla@linaro.org> References: <20241030140315.40562-1-srinivas.kandagatla@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=5497; i=srinivas.kandagatla@linaro.org; h=from:subject; bh=W45eHvGZ5R9J5tq5JLMjXz3ZBZio+iQpx3uwUWg4vIk=; b=owEBbQGS/pANAwAKAXqh/VnHNFU3AcsmYgBnIjyirm5Xro7ybZq195NOGZiGjYRahiKQkORXb H1l2LH4R3WJATMEAAEKAB0WIQQi509axvzi9vce3Y16of1ZxzRVNwUCZyI8ogAKCRB6of1ZxzRV N0ifB/954qv0hzcaihwaoX3J0je1jfqFkwLGbBMZwsMWz/51kTHNk0J0gTgqJmswPNM+taPQWfQ tYfaO0176kb3MIXFGytAdhKcFelOmkavkLoyk0G5LZ9PLjb0LdE22dTM8wLUtIMbCzrwgrGn9QD tkw1Lc1IFUg8KpmFJcEW4Yy8GAldLErZ4Gw8aO37CsG1rjkCaLWsBWl3cc8MQf1KFkTz6IBHEtm 8cNObXc4A9tVZanMsGUKlLUeF01kYnFmsZ6qPukv47pITn3U4hD2HyDx2bpUOgVVIlfYJmxzGYs fbumbWq44sNQ+TpR0Jf01QXUpENHtv4oG8im2d3qZ4B3Y3VT X-Developer-Key: i=srinivas.kandagatla@linaro.org; a=openpgp; fpr=ED6472765AB36EC43B3EF97AD77E3FC0562560D6 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Geert Uytterhoeven The R-Car E-FUSE blocks can be modelled better using the nvmem framework. Replace the R-Car V3U example by an R-Car S4-8 ES1.2 example, to show the definition of nvmem cells. While at it, drop unneeded labels from the examples, and fix indentation. Add an entry to the MAINTAINERS file. Reported-by: Arnd Bergmann Signed-off-by: Geert Uytterhoeven Reviewed-by: Rob Herring (Arm) Signed-off-by: Srinivas Kandagatla --- .../{fuse =3D> nvmem}/renesas,rcar-efuse.yaml | 35 +++++++++++++------ .../{fuse =3D> nvmem}/renesas,rcar-otp.yaml | 17 +++++---- MAINTAINERS | 1 + 3 files changed, 36 insertions(+), 17 deletions(-) rename Documentation/devicetree/bindings/{fuse =3D> nvmem}/renesas,rcar-ef= use.yaml (54%) rename Documentation/devicetree/bindings/{fuse =3D> nvmem}/renesas,rcar-ot= p.yaml (60%) diff --git a/Documentation/devicetree/bindings/fuse/renesas,rcar-efuse.yaml= b/Documentation/devicetree/bindings/nvmem/renesas,rcar-efuse.yaml similarity index 54% rename from Documentation/devicetree/bindings/fuse/renesas,rcar-efuse.yaml rename to Documentation/devicetree/bindings/nvmem/renesas,rcar-efuse.yaml index d7e289244e72..ce7d65afa460 100644 --- a/Documentation/devicetree/bindings/fuse/renesas,rcar-efuse.yaml +++ b/Documentation/devicetree/bindings/nvmem/renesas,rcar-efuse.yaml @@ -1,7 +1,7 @@ # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 --- -$id: http://devicetree.org/schemas/fuse/renesas,rcar-efuse.yaml# +$id: http://devicetree.org/schemas/nvmem/renesas,rcar-efuse.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# =20 title: R-Car E-FUSE connected to PFC @@ -13,6 +13,9 @@ description: The E-FUSE is a type of non-volatile memory, which is accessible through= the Pin Function Controller (PFC) on some R-Car Gen4 SoCs. =20 +allOf: + - $ref: nvmem.yaml# + properties: compatible: enum: @@ -39,17 +42,27 @@ required: - power-domains - resets =20 -additionalProperties: false +unevaluatedProperties: false =20 examples: - | - #include - #include - - fuse: fuse@e6078800 { - compatible =3D "renesas,r8a779a0-efuse"; - reg =3D <0xe6078800 0x100>; - clocks =3D <&cpg CPG_MOD 916>; - power-domains =3D <&sysc R8A779A0_PD_ALWAYS_ON>; - resets =3D <&cpg 916>; + #include + #include + + fuse@e6078800 { + compatible =3D "renesas,r8a779f0-efuse"; + reg =3D <0xe6078800 0x200>; + clocks =3D <&cpg CPG_MOD 915>; + power-domains =3D <&sysc R8A779F0_PD_ALWAYS_ON>; + resets =3D <&cpg 915>; + + nvmem-layout { + compatible =3D "fixed-layout"; + #address-cells =3D <1>; + #size-cells =3D <1>; + + calib@144 { + reg =3D <0x144 0x08>; + }; + }; }; diff --git a/Documentation/devicetree/bindings/fuse/renesas,rcar-otp.yaml b= /Documentation/devicetree/bindings/nvmem/renesas,rcar-otp.yaml similarity index 60% rename from Documentation/devicetree/bindings/fuse/renesas,rcar-otp.yaml rename to Documentation/devicetree/bindings/nvmem/renesas,rcar-otp.yaml index d74872ae9ff3..3313c03ea68d 100644 --- a/Documentation/devicetree/bindings/fuse/renesas,rcar-otp.yaml +++ b/Documentation/devicetree/bindings/nvmem/renesas,rcar-otp.yaml @@ -1,7 +1,7 @@ # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 --- -$id: http://devicetree.org/schemas/fuse/renesas,rcar-otp.yaml# +$id: http://devicetree.org/schemas/nvmem/renesas,rcar-otp.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# =20 title: R-Car E-FUSE connected to OTP_MEM @@ -13,6 +13,9 @@ description: The E-FUSE is a type of non-volatile memory, which is accessible through= the One-Time Programmable Memory (OTP_MEM) module on some R-Car Gen4 SoCs. =20 +allOf: + - $ref: nvmem.yaml# + properties: compatible: enum: @@ -22,17 +25,19 @@ properties: reg: items: - description: OTP_MEM_0 - - description: OTP_MEM_1 + - description: OTP_MEM_1. + The addresses of cells defined under the optional nvmem-layout + subnode are relative to this register bank. =20 required: - compatible - reg =20 -additionalProperties: false +unevaluatedProperties: false =20 examples: - | - otp: otp@e61be000 { - compatible =3D "renesas,r8a779g0-otp"; - reg =3D <0xe61be000 0x1000>, <0xe61bf000 0x1000>; + otp@e61be000 { + compatible =3D "renesas,r8a779g0-otp"; + reg =3D <0xe61be000 0x1000>, <0xe61bf000 0x1000>; }; diff --git a/MAINTAINERS b/MAINTAINERS index c27f3190737f..269529b370a0 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2916,6 +2916,7 @@ Q: http://patchwork.kernel.org/project/linux-renesas-= soc/list/ C: irc://irc.libera.chat/renesas-soc T: git git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel.g= it next F: Documentation/devicetree/bindings/hwinfo/renesas,prr.yaml +F: Documentation/devicetree/bindings/nvmem/renesas,* F: Documentation/devicetree/bindings/soc/renesas/ F: arch/arm/boot/dts/renesas/ F: arch/arm/configs/shmobile_defconfig --=20 2.25.1 From nobody Mon Nov 25 03:33:11 2024 Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) (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 572151EB9FD for ; Wed, 30 Oct 2024 14:03:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730297026; cv=none; b=tnV3tmlqd6zGZK8C8P7z4x5HEGNpXvzotfK5+rGRmwAs4hpT+09m6ptak3GJqDlWaDhNfK1ypdnmEMzg3fTz0wdkmwGvFls8vW5EYTjGMr6ilMSF1CiK5M1qy3FANB45f7Yr6fy7bSrrVP5l3EJx1OhNLKMAIJtZTOG1yhD/1vs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730297026; c=relaxed/simple; bh=U3wPU5DgJFbZ11jCb2oEje7Ha/+dy8PlwFR/zPfd2C0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=BFlZofd8vR3zzy3Sfvb7g4SOZBwfpisPvM0m2rcH1AUtlyodqNPc8qg5IYpES90rB4dN2XPmrnxPhJ8o8xv5dg3V1yWJ8NPd6vBBdbyloHnj5PUlEt+iI7bIGhI9EJIJijqIgwW/XEat29Kt0Jk1DkpKaMqNpNAqdNNukaOR/SI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=Kw2MusW5; arc=none smtp.client-ip=209.85.167.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Kw2MusW5" Received: by mail-lf1-f53.google.com with SMTP id 2adb3069b0e04-539ebb5a20aso6890206e87.2 for ; Wed, 30 Oct 2024 07:03:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730297021; x=1730901821; 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=JeTM1UP/JKN2HvD4YD1Y7DH9pKIiJFnkrzVdoRLqoXo=; b=Kw2MusW5hnCWZh1aQaD8Am/dtwlEzD9Y1bgKprvSTXoEaTC/bbTl3KbRsbZjHrqt5h TMwZxpaTXzAfqj7/+SLf1Rh/XzWA+mUSaZNLzWNC5TMHz6qdNk/YK+T2Inf+ggJXNRg5 wS05G77cuzKjDhLmIwnOXvitSR0yMOIoleK1ujD5GSum90SBoaMZoXCVHV9OUj+A3rx5 sWW0wUlom2ArhL14pFIrn3TtxuZ9r/1jeUBYeNuZqj/5y5A72DhhzVghFWCAKv7DI5iE 3r+KXKLASxA2jF2vNfG2rNS4WV08EDs6+mu3sfjLvfWlHhlC/2MyHSFx6Bn58bzzOK89 +pyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730297021; x=1730901821; 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=JeTM1UP/JKN2HvD4YD1Y7DH9pKIiJFnkrzVdoRLqoXo=; b=MomFh9oGkLX1zf/x7wMFw/FnpJSq8KOxtDkqG4uiXDRIrzxr1yo9GiX1suOJgXuSeG fHCrfjKRuBnfPwTPNNpObpVONkYn4Xz0UtVyqluxe2dfMvz0XUMd095xeJFRcARr9Pne pcRAO23uS5BuOznCYZEiFGHAdO0l/QY0eXlg9gb8yOfbwd9Jvhu+TIRCVoHQ6OE/Xqt/ U0P1ZEYwmN1rDDe3tq6DD4/pbFw37ziVMlmVkgjHv72Fin7m6dgQDW9OvJ90s/9SRCri +RrxKdZJDBtTsmI0gbxcvDuorJLNtepqsdKnIuyT95KtmJkJCuuJPRQHE5fAvsxrSvOR sz5Q== X-Gm-Message-State: AOJu0Yyj29iRNp7oK7m8ag75t1BBKOMy/nO2Vx0W/pVSTjq3S+nehNfD YJarcHMbouFO7q8Yr74pXOnc9TuTcxo1/B5VYvCEi8snnPWOh6SRo6emHD8CMEm/Ow18QTq3nQ3 Y2Ic= X-Google-Smtp-Source: AGHT+IHCP4WNCOkojPwqzIJEdVW3Gvv3Rxap+mHqa5KAPADEGBlNzFelwP9o3OpBa2lBJVhkw/P3Lg== X-Received: by 2002:a05:6512:1384:b0:536:a4e1:5fa2 with SMTP id 2adb3069b0e04-53b348de8c1mr7883715e87.26.1730297021114; Wed, 30 Oct 2024 07:03:41 -0700 (PDT) Received: from localhost.localdomain ([5.133.47.210]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-431bd97d84bsm22498405e9.30.2024.10.30.07.03.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Oct 2024 07:03:40 -0700 (PDT) From: srinivas.kandagatla@linaro.org To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, Geert Uytterhoeven , Yoshihiro Shimoda , Arnd Bergmann , Srinivas Kandagatla Subject: [PATCH 2/7] nvmem: Add R-Car E-FUSE driver Date: Wed, 30 Oct 2024 14:03:10 +0000 Message-Id: <20241030140315.40562-3-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241030140315.40562-1-srinivas.kandagatla@linaro.org> References: <20241030140315.40562-1-srinivas.kandagatla@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=6626; i=srinivas.kandagatla@linaro.org; h=from:subject; bh=AF2xFGTuUEoPWLs+M9669JQEm8bKosMbLQXhR1Izw7I=; b=owEBbQGS/pANAwAKAXqh/VnHNFU3AcsmYgBnIjyijrTNWJq91sHx/jELXJbVClnH7i00nriDf Sr6ECZ8FLmJATMEAAEKAB0WIQQi509axvzi9vce3Y16of1ZxzRVNwUCZyI8ogAKCRB6of1ZxzRV N/XlB/0ZacMJ6b7b3ue4tGQ/bQxXclzGoWScZP3mLUyrgWI9mFTI2oav3XarxdiZyWgt64hfAmn u7VUqHM6yfUhSh3JnnaDkqcVbUrMC/U8GnwmFGVfPueU/6zQDObAsdGToPHFTS61eC4JmXgKO4F UMyhoQjS2JkLsZ/y8cSumVyFdfsBlFfwy663GfLzpEfV2W6tUqRQZbrFl93JLNxCGsXRi7AYdCj 9ekdVb06BK4YFEUU1FWJhK6sE0txkHLoRaXhfftdE7YtUWwZI4J5LQeAcKJi5CoCFre11zP4/ES DrFoC6vOeucRyXk54G+WgZCiCO/5bMB3tpJDXsaG2XOudKS8 X-Developer-Key: i=srinivas.kandagatla@linaro.org; a=openpgp; fpr=ED6472765AB36EC43B3EF97AD77E3FC0562560D6 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Geert Uytterhoeven R-Car Gen4 SoCs contain fuses indicating hardware support or hardware (e.g. tuning) parameters. Add a driver to access the state of the fuses. This supports two types of hardware fuse providers: 1. E-FUSE non-volatile memory accessible through the Pin Function Controller on R-Car V3U and S4-8, 2. E-FUSE non-volatile memory accessible through OTP_MEM on R-Car V4H and V4M. The state of the cells can be read using the NVMEM framework, either from kernel space (e.g. by the Renesas UFSHCD driver), or from userspace. Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Acked-by: Arnd Bergmann Signed-off-by: Srinivas Kandagatla --- MAINTAINERS | 1 + drivers/nvmem/Kconfig | 11 +++ drivers/nvmem/Makefile | 2 + drivers/nvmem/rcar-efuse.c | 142 +++++++++++++++++++++++++++++++++++++ 4 files changed, 156 insertions(+) create mode 100644 drivers/nvmem/rcar-efuse.c diff --git a/MAINTAINERS b/MAINTAINERS index 269529b370a0..b3b605a52d3d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2924,6 +2924,7 @@ F: arch/arm/include/debug/renesas-scif.S F: arch/arm/mach-shmobile/ F: arch/arm64/boot/dts/renesas/ F: arch/riscv/boot/dts/renesas/ +F: drivers/nvmem/rcar-efuse.c F: drivers/pmdomain/renesas/ F: drivers/soc/renesas/ F: include/linux/soc/renesas/ diff --git a/drivers/nvmem/Kconfig b/drivers/nvmem/Kconfig index d2c384f58028..8671b7c974b9 100644 --- a/drivers/nvmem/Kconfig +++ b/drivers/nvmem/Kconfig @@ -246,6 +246,17 @@ config NVMEM_RAVE_SP_EEPROM help Say y here to enable Rave SP EEPROM support. =20 +config NVMEM_RCAR_EFUSE + tristate "Renesas R-Car Gen4 E-FUSE support" + depends on (ARCH_RENESAS && ARM64) || COMPILE_TEST + depends on NVMEM + help + Enable support for reading the fuses in the E-FUSE or OTP + non-volatile memory block on Renesas R-Car Gen4 SoCs. + + This driver can also be built as a module. If so, the module + will be called nvmem-rcar-efuse. + config NVMEM_RMEM tristate "Reserved Memory Based Driver Support" depends on HAS_IOMEM diff --git a/drivers/nvmem/Makefile b/drivers/nvmem/Makefile index cdd01fbf1313..5b77bbb6488b 100644 --- a/drivers/nvmem/Makefile +++ b/drivers/nvmem/Makefile @@ -52,6 +52,8 @@ obj-$(CONFIG_NVMEM_QCOM_SEC_QFPROM) +=3D nvmem_sec_qfprom= .o nvmem_sec_qfprom-y :=3D sec-qfprom.o obj-$(CONFIG_NVMEM_RAVE_SP_EEPROM) +=3D nvmem-rave-sp-eeprom.o nvmem-rave-sp-eeprom-y :=3D rave-sp-eeprom.o +obj-$(CONFIG_NVMEM_RCAR_EFUSE) +=3D nvmem-rcar-efuse.o +nvmem-rcar-efuse-y :=3D rcar-efuse.o obj-$(CONFIG_NVMEM_RMEM) +=3D nvmem-rmem.o nvmem-rmem-y :=3D rmem.o obj-$(CONFIG_NVMEM_ROCKCHIP_EFUSE) +=3D nvmem_rockchip_efuse.o diff --git a/drivers/nvmem/rcar-efuse.c b/drivers/nvmem/rcar-efuse.c new file mode 100644 index 000000000000..f24bdb9cb5a7 --- /dev/null +++ b/drivers/nvmem/rcar-efuse.c @@ -0,0 +1,142 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Renesas R-Car E-FUSE/OTP Driver + * + * Copyright (C) 2024 Glider bv + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +struct rcar_fuse { + struct nvmem_keepout keepouts[2]; + struct nvmem_device *nvmem; + struct device *dev; + void __iomem *base; +}; + +struct rcar_fuse_data { + unsigned int bank; /* 0: PFC + E-FUSE, 1: OPT_MEM + E-FUSE */ + unsigned int start; /* inclusive */ + unsigned int end; /* exclusive */ +}; + +static int rcar_fuse_reg_read(void *priv, unsigned int offset, void *val, + size_t bytes) +{ + struct rcar_fuse *fuse =3D priv; + int ret; + + ret =3D pm_runtime_resume_and_get(fuse->dev); + if (ret < 0) + return ret; + + __ioread32_copy(val, fuse->base + offset, bytes / 4); + + pm_runtime_put(fuse->dev); + + return 0; +} + +static int rcar_fuse_probe(struct platform_device *pdev) +{ + struct device *dev =3D &pdev->dev; + const struct rcar_fuse_data *data =3D device_get_match_data(dev); + struct nvmem_config config =3D { + .dev =3D dev, + .name =3D "rcar-fuse", + .id =3D NVMEM_DEVID_NONE, + .owner =3D THIS_MODULE, + .type =3D NVMEM_TYPE_OTP, + .read_only =3D true, + .root_only =3D true, + .reg_read =3D rcar_fuse_reg_read, + .word_size =3D 4, + .stride =3D 4, + }; + struct rcar_fuse *fuse; + struct resource *res; + int ret; + + ret =3D devm_pm_runtime_enable(dev); + if (ret < 0) + return ret; + + fuse =3D devm_kzalloc(dev, sizeof(*fuse), GFP_KERNEL); + if (!fuse) + return -ENOMEM; + + fuse->base =3D devm_platform_get_and_ioremap_resource(pdev, data->bank, + &res); + if (IS_ERR(fuse->base)) + return PTR_ERR(fuse->base); + + fuse->dev =3D dev; + fuse->keepouts[0].start =3D 0; + fuse->keepouts[0].end =3D data->start; + fuse->keepouts[1].start =3D data->end; + fuse->keepouts[1].end =3D resource_size(res); + + config.keepout =3D fuse->keepouts; + config.nkeepout =3D ARRAY_SIZE(fuse->keepouts); + config.size =3D resource_size(res); + config.priv =3D fuse; + + fuse->nvmem =3D devm_nvmem_register(dev, &config); + if (IS_ERR(fuse->nvmem)) + return dev_err_probe(dev, PTR_ERR(fuse->nvmem), + "Failed to register NVMEM device\n"); + + return 0; +} + +static const struct rcar_fuse_data rcar_fuse_v3u =3D { + .bank =3D 0, + .start =3D 0x0c0, + .end =3D 0x0e8, +}; + +static const struct rcar_fuse_data rcar_fuse_s4 =3D { + .bank =3D 0, + .start =3D 0x0c0, + .end =3D 0x14c, +}; + +static const struct rcar_fuse_data rcar_fuse_v4h =3D { + .bank =3D 1, + .start =3D 0x100, + .end =3D 0x1a0, +}; + +static const struct rcar_fuse_data rcar_fuse_v4m =3D { + .bank =3D 1, + .start =3D 0x100, + .end =3D 0x110, +}; + +static const struct of_device_id rcar_fuse_match[] =3D { + { .compatible =3D "renesas,r8a779a0-efuse", .data =3D &rcar_fuse_v3u }, + { .compatible =3D "renesas,r8a779f0-efuse", .data =3D &rcar_fuse_s4 }, + { .compatible =3D "renesas,r8a779g0-otp", .data =3D &rcar_fuse_v4h }, + { .compatible =3D "renesas,r8a779h0-otp", .data =3D &rcar_fuse_v4m }, + { /* sentinel */ } +}; + +static struct platform_driver rcar_fuse_driver =3D { + .probe =3D rcar_fuse_probe, + .driver =3D { + .name =3D "rcar_fuse", + .of_match_table =3D rcar_fuse_match, + }, +}; +module_platform_driver(rcar_fuse_driver); + +MODULE_DESCRIPTION("Renesas R-Car E-FUSE/OTP driver"); +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Geert Uytterhoeven"); --=20 2.25.1 From nobody Mon Nov 25 03:33:11 2024 Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (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 330A71F12E3 for ; Wed, 30 Oct 2024 14:03:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730297030; cv=none; b=mrW8C3FaIiukdJrdxeRms/HPC7eEFVT+uuemZTEIueobvv1J7DVdxZR1taIV3j0iFHG1AaEJIKmC2d6DjaOjKzIBuCyJIp/TnfZcXs8fv5rj0/UnDo0uLzBIKUmgDIkH9JvN29M6ZIL5V5P6s9pm7Vgrmsc+jRZt7NRGz9hr91s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730297030; c=relaxed/simple; bh=C3bJtR9diuH18eqjUdi29zhAIcp6Q7ygjs2tfTSsxQ4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=XPEKs5A0uMUWjqD3k41QigMl8Zrdp8jcmEp/uwMP98HiQCXBxiclwBkHx7G9/1N/TEwUk6HA5U57DV7tr3MKlQP7dKAc31N6aLvX0WVbIlQ0Z+a2s1A8F0Qeck1f/D7dDQxUXgvmH5idfTz5WvQqf/JkQu37il+PkVaq7GNoAbc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=kvj10dmj; arc=none smtp.client-ip=209.85.128.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="kvj10dmj" Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-43152b79d25so59810675e9.1 for ; Wed, 30 Oct 2024 07:03:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730297024; x=1730901824; 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=VwkL4mAYguam83Ok+cEyq0v5u5ofOSAY9dEpeOn5NeU=; b=kvj10dmjqFujLi1siCGWu32/pUYQVFM1xgHndInJafd3O+2kBJqiqF6TEausmr0P6q rd9tMw2t4vfekC5ZyYwpV01VzVKKqo8lQdccdcrzB4YAu2yPS8xGJK7NnSQCnEwcSouU 8eYDd3RtcbVLL94XIEAEt7STwBSBCGqPI53McHGmPImqKZqt6WZUO8ay3pXfu/KuFLeh kWp1YOZvuQg17Sro2LYiZe5/lbZ/7zwka5yDY+L66gIQ6L7CIp9tVp/nH3x610Nxt5SS Dq7BgfWAs+RaF4edau3fqA15oKduLZRIK1jL3FvWvjmKlE9wecj4t7htPVM2/SI1M42S +nig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730297024; x=1730901824; 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=VwkL4mAYguam83Ok+cEyq0v5u5ofOSAY9dEpeOn5NeU=; b=mia4LZ5vJGbYgM2+jgZM2gSq4/REUuvcVRWWaXpyPBW3CD6po5rmAODYRX7QFBeqJV 8fgMH9VYtv7alCDphWzS9CwPg0NFVsJT3lzKjHKf6WztnS4C721AbMt2yr/u0ahemi78 6MrESrTl+w5g8RxEPinBFNgHQLHdSA24rH/uU0IizJU7S1tOy1NWl2YhNLrrZlfg7wDw ZqK4CxbTyPNfAWgcdUcRDzVE1tSf4RnnLpJmrtY4JRq/7w4gnRUcVvysJStufvMt49+r 3R/36rm+raSEw1LIYNiT3ss6iNfsbF7qDcainUGfCxvVklicIIBbUCjO63xsxgTZENKA 4OFQ== X-Gm-Message-State: AOJu0YwJJ8erN+FmCVboPDME7uoQH5regFS7dMhVlH/LwplFZV3L5FAU Kw9X0Bo0D8+IJXVQXa0YAiQruIAzNYHT3pV965gI/sBMkt+mWjz9lu2dcS1vTco= X-Google-Smtp-Source: AGHT+IFGXLal5RubxgMhHGt84dgKDEvdKETdj+wQV7sZc04VZh0qKDyp8KyRxrlNBXllpbMt9cf8fg== X-Received: by 2002:a05:600c:5246:b0:431:5c17:d575 with SMTP id 5b1f17b1804b1-4319aca3f6cmr120565185e9.11.1730297022033; Wed, 30 Oct 2024 07:03:42 -0700 (PDT) Received: from localhost.localdomain ([5.133.47.210]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-431bd97d84bsm22498405e9.30.2024.10.30.07.03.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Oct 2024 07:03:41 -0700 (PDT) From: srinivas.kandagatla@linaro.org To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, Shen Lichuan , Vladimir Zapolskiy , Srinivas Kandagatla Subject: [PATCH 3/7] nvmem: Correct some typos in comments Date: Wed, 30 Oct 2024 14:03:11 +0000 Message-Id: <20241030140315.40562-4-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241030140315.40562-1-srinivas.kandagatla@linaro.org> References: <20241030140315.40562-1-srinivas.kandagatla@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3542; i=srinivas.kandagatla@linaro.org; h=from:subject; bh=V2VAzTEQvF1b5tjKZgsl4sYJ7yMYEqPhrpKXVYkqDuE=; b=owEBbQGS/pANAwAKAXqh/VnHNFU3AcsmYgBnIjyiIU1R7xWSSoEm3o2LJ2BQmXZ1OM05nmyMw 18r8MFXPFaJATMEAAEKAB0WIQQi509axvzi9vce3Y16of1ZxzRVNwUCZyI8ogAKCRB6of1ZxzRV N+QRCAC1R5fLS4vyRtBUT3Wn1oUoznnsAQVd6C6xGGw2+MCZwlN+RRHomgBAw8Sbp/MB4CUmR+u AoZrmnvSdIVo/vXWGO+O/z3BkxD071Lk5hZIsshesEHlmCBJl/S4najJXnFp+dbP6FVMc7ZFzIC kFQjjd6J2R5QKDQ2chzNdoss9yjzc3ifPJ5t460k+v+GpwhxpzLGzs3eZY0LNaSlyXhAuIjE63w exDlO2xGI5R2TzuHeF+ju5/Gp1honnetiym57OhZ24Utc5H4OEAE7kgFT0yOV1SJ1OY03O5Hek9 DcmZ8hE+U44DL8UTlBUxFNOjiIX9XzD91CFT/598SWidWq3q X-Developer-Key: i=srinivas.kandagatla@linaro.org; a=openpgp; fpr=ED6472765AB36EC43B3EF97AD77E3FC0562560D6 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Shen Lichuan Fixed some confusing typos that were currently identified with codespell, the details are as follows: -in the code comments: drivers/nvmem/brcm_nvram.c:25: underlaying =3D=3D> underlying drivers/nvmem/core.c:1250: alredy =3D=3D> already drivers/nvmem/core.c:1268: alredy =3D=3D> already drivers/nvmem/lpc18xx_otp.c:24: reseverd =3D=3D> reserved drivers/nvmem/microchip-otpc.c:159: devide =3D=3D> divide Signed-off-by: Shen Lichuan Acked-by: Vladimir Zapolskiy Signed-off-by: Srinivas Kandagatla --- drivers/nvmem/brcm_nvram.c | 2 +- drivers/nvmem/core.c | 4 ++-- drivers/nvmem/lpc18xx_otp.c | 2 +- drivers/nvmem/microchip-otpc.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/nvmem/brcm_nvram.c b/drivers/nvmem/brcm_nvram.c index 3d8c87835f4d..b810df727b44 100644 --- a/drivers/nvmem/brcm_nvram.c +++ b/drivers/nvmem/brcm_nvram.c @@ -22,7 +22,7 @@ * * @dev: NVMEM device pointer * @nvmem_size: Size of the whole space available for NVRAM - * @data: NVRAM data copy stored to avoid poking underlaying flash contro= ller + * @data: NVRAM data copy stored to avoid poking underlying flash control= ler * @data_len: NVRAM data size * @padding_byte: Padding value used to fill remaining space * @cells: Array of discovered NVMEM cells diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c index 33ffa2aa4c11..66eec1960801 100644 --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c @@ -1247,7 +1247,7 @@ static void devm_nvmem_device_release(struct device *= dev, void *res) } =20 /** - * devm_nvmem_device_put() - put alredy got nvmem device + * devm_nvmem_device_put() - put already got nvmem device * * @dev: Device that uses the nvmem device. * @nvmem: pointer to nvmem device allocated by devm_nvmem_cell_get(), @@ -1265,7 +1265,7 @@ void devm_nvmem_device_put(struct device *dev, struct= nvmem_device *nvmem) EXPORT_SYMBOL_GPL(devm_nvmem_device_put); =20 /** - * nvmem_device_put() - put alredy got nvmem device + * nvmem_device_put() - put already got nvmem device * * @nvmem: pointer to nvmem device that needs to be released. */ diff --git a/drivers/nvmem/lpc18xx_otp.c b/drivers/nvmem/lpc18xx_otp.c index adc9948e7b2e..c41a0c58bec7 100644 --- a/drivers/nvmem/lpc18xx_otp.c +++ b/drivers/nvmem/lpc18xx_otp.c @@ -21,7 +21,7 @@ * LPC18xx OTP memory contains 4 banks with 4 32-bit words. Bank 0 starts * at offset 0 from the base. * - * Bank 0 contains the part ID for Flashless devices and is reseverd for + * Bank 0 contains the part ID for Flashless devices and is reserved for * devices with Flash. * Bank 1/2 is generale purpose or AES key storage for secure devices. * Bank 3 contains control data, USB ID and generale purpose words. diff --git a/drivers/nvmem/microchip-otpc.c b/drivers/nvmem/microchip-otpc.c index 7cf81738a3e0..df979e8549fd 100644 --- a/drivers/nvmem/microchip-otpc.c +++ b/drivers/nvmem/microchip-otpc.c @@ -156,7 +156,7 @@ static int mchp_otpc_read(void *priv, unsigned int off,= void *val, /* * We reach this point with off being multiple of stride =3D 4 to * be able to cross the subsystem. Inside the driver we use continuous - * unsigned integer numbers for packet id, thus devide off by 4 + * unsigned integer numbers for packet id, thus divide off by 4 * before passing it to mchp_otpc_id_to_packet(). */ packet =3D mchp_otpc_id_to_packet(otpc, off / 4); --=20 2.25.1 From nobody Mon Nov 25 03:33:11 2024 Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) (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 9298D1F12FD for ; Wed, 30 Oct 2024 14:03:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.67 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730297028; cv=none; b=c+XruWYA4jMwkFnf6S/DZnr6AFLXw5gJmdQbzibhxNEL/6G9LaRmAeB6V+niYMpLn5LbAAPP8mUVQi81zHBkL6wCw5xCW0uginQrpBlFaj2LjddOMYrRcV20zId+cGMVpTv7FZ1UcgwDOFCkE3e6oRmLce3WQ0rqc6kYfqMRAgg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730297028; c=relaxed/simple; bh=mGb4txoYNAVTq3anfEUNTwnBrJqhJeocwzZo3lYhi6g=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=uyNk7HWem4NtT0Kt8MH/IIuWK7EidwmxBygpx3DJb81lloOodGQImDoBBh2s1PYvOe8uaNdHXcB7B6BlHI4B9058XnUzarurCDqjFYAmOLBKB8WLd0LoGcprhtINrriIuD8ctWC1pzcZSNw6ReLOyD/eR4HVoGQAwXnLOxnR6So= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=WXtzpITX; arc=none smtp.client-ip=209.85.128.67 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="WXtzpITX" Received: by mail-wm1-f67.google.com with SMTP id 5b1f17b1804b1-43161c0068bso61712205e9.1 for ; Wed, 30 Oct 2024 07:03:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730297024; x=1730901824; 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=FCo3/H2quhkzzLeJ4h4H59C55POvIjPaxrq0l4ufUw4=; b=WXtzpITXXK72r/3mCBzaHZomY613NwHTboe2b7plnX946Jr0bFhAa1DA4cSZ9MSyj1 Dz5vLypJcLDzxBCrqkyD8Q6NKigY3lRy8M/DdTxAEtluO1btLll9hPAFgghTkDgdJ8Q0 dH5xrtACi84RTdg6Vzn6V8HdgD7KPCOWwhnkaewsqNLBP+KzQ5qtGYpi1N/S7CuFf5gH RbPSHJubQE94T16Z8+bGu64mc1bgTh+dw+qYfzAnE4ijg4KxtGeVrT5E8EhOAI/zXsjp 7BYaq9lJsPqkplo5vTaGr42pp8rjED1+FW2br9BJlBl7U2EnY0aVLaKpTmDZ8onm+RYc 6jFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730297024; x=1730901824; 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=FCo3/H2quhkzzLeJ4h4H59C55POvIjPaxrq0l4ufUw4=; b=GW44LwW2D3M01Q3c0IU6rmucyNNvd7QxTKbdPT1sSDlAd52KH91+f9bppu5imtDva7 8n2+H/GKU3NZZj8abgh/aPiq3pCCo0cWJJzgv5vPL16hPq8c8zfh58lmUXlkGM+9hpXz zHzKPbC4trSFq2LSywSAvIh2CudlU+rQMo8NN+WViyXJPV+YY6DvrlcexnxtmzQ8DTMr nOLqo/vFrAzYFn9nbEHkNnN8hTBJmVt7tsXptkU0z8gsiJOY4A21Iy0qxDhziXC0jDEB n3bkeSTiYKLL1zqFDUoI2c4JlFQ5nXGzbIuapyAUwbqbQEF/KfUfOZ13Su/SKzZ7fB6r XVGA== X-Gm-Message-State: AOJu0YxDi8424z1d6jklMRUv+QqhkSv9RYQoyjfk+RzI12qBr1FR0K86 J79JFjqctXNlyoVjll4XpF9pxk1qR1vTn2k28uDYd3bbueo0hrOgGkNoIhUjweqfdzW7kffMpTT EJ/TgIA== X-Google-Smtp-Source: AGHT+IE1Q7y9d1nQvwUd6O0N0qI4Z8R1fDbggTbFXMZG0uswurIPUSMZVdBjrsnS+k2UNh7y6Kp+/Q== X-Received: by 2002:a05:600c:1c12:b0:431:5533:8f0b with SMTP id 5b1f17b1804b1-4319ad3643fmr138225705e9.32.1730297022756; Wed, 30 Oct 2024 07:03:42 -0700 (PDT) Received: from localhost.localdomain ([5.133.47.210]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-431bd97d84bsm22498405e9.30.2024.10.30.07.03.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Oct 2024 07:03:42 -0700 (PDT) From: srinivas.kandagatla@linaro.org To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, Shen Lichuan , Srinivas Kandagatla Subject: [PATCH 4/7] nvmem: imx-iim: Convert comma to semicolon Date: Wed, 30 Oct 2024 14:03:12 +0000 Message-Id: <20241030140315.40562-5-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241030140315.40562-1-srinivas.kandagatla@linaro.org> References: <20241030140315.40562-1-srinivas.kandagatla@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1028; i=srinivas.kandagatla@linaro.org; h=from:subject; bh=XDKe4Ev5s5kz6hyZ+86A6i10SRypi2CUITlbr9o3DGE=; b=owEBbQGS/pANAwAKAXqh/VnHNFU3AcsmYgBnIjyiXYnQvK1UAlNa81v8DG5T04TYbI1Wz8wJT XjI9htqjxCJATMEAAEKAB0WIQQi509axvzi9vce3Y16of1ZxzRVNwUCZyI8ogAKCRB6of1ZxzRV N24oB/4o40Xoa14jpVRUdOG6rnL5RA/o/zE86Cs7dtg+STYGMef/p3QpAF/qwMTazzvGhfHWvzu Ek7wVm8Jxg5kLKGlgKTfIDgWc9eDHAa69CK9sgcLv5VVc5qfVRYUkizvGPymNmcSM9yphhEyLUc FZh5RfabZ+9d6WFGFm3CJBynBb+S8is+LtZUdQtkbIBvzJcnGGNcT3905hylXdBO1fJqp88gbV7 s9o1BSVxi7LTMndU1ExbFtf8J48g1s6NRMdt9JaXOo2nomCz64B14JzWDYDr3Y55mcxN7eivkTX sx6WC9OPdaLeR84GcFmkj89c8g+eXW639Nse0HeOCMYupH6n X-Developer-Key: i=srinivas.kandagatla@linaro.org; a=openpgp; fpr=ED6472765AB36EC43B3EF97AD77E3FC0562560D6 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Shen Lichuan To ensure code clarity and prevent potential errors, it's advisable to employ the ';' as a statement separator, except when ',' are intentionally used for specific purposes. Signed-off-by: Shen Lichuan Signed-off-by: Srinivas Kandagatla --- drivers/nvmem/imx-iim.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/nvmem/imx-iim.c b/drivers/nvmem/imx-iim.c index f13bbd164086..8cfbe55a56cb 100644 --- a/drivers/nvmem/imx-iim.c +++ b/drivers/nvmem/imx-iim.c @@ -115,11 +115,11 @@ static int imx_iim_probe(struct platform_device *pdev) if (IS_ERR(iim->clk)) return PTR_ERR(iim->clk); =20 - cfg.name =3D "imx-iim", - cfg.read_only =3D true, - cfg.word_size =3D 1, - cfg.stride =3D 1, - cfg.reg_read =3D imx_iim_read, + cfg.name =3D "imx-iim"; + cfg.read_only =3D true; + cfg.word_size =3D 1; + cfg.stride =3D 1; + cfg.reg_read =3D imx_iim_read; cfg.dev =3D dev; cfg.size =3D drvdata->nregs; cfg.priv =3D iim; --=20 2.25.1 From nobody Mon Nov 25 03:33:11 2024 Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) (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 943141F1300 for ; Wed, 30 Oct 2024 14:03:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.65 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730297028; cv=none; b=pxF1f9/9LBURjcTVlWLIABPmVv+S/rfyYYB5rVNq6yP6527xSocbqPLi+bXDOkT1TIW81iTggiG3ZkyWEqnMeY6GF7MDOADOWbHyOrfqTq4MII5SL1p/XCaXJ0vhnBSE0NoexOWbw38FQdEowzpORAu+zZDWm0ODgpry7y/veV0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730297028; c=relaxed/simple; bh=ocdTOE3wlQsq2uYR9y0dqZ1+sVHl9iIxkMD/9zTFQw8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=km/Ji/aZOSz/cKzLx5MVskzRHwAlBE+olJGalUrEBC9OddfAMZGSGw4C9Zg8YcXuD213aJwF3y1GtOETviX/YuoDC5V7eSjao/ZRqH5KzR2H4CfZ1JLg58vMbHohqkmLBHo51+T1/yqcx6047LAsrP18tMUYv2yrheipH9nnVuo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=aOecp5kU; arc=none smtp.client-ip=209.85.128.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="aOecp5kU" Received: by mail-wm1-f65.google.com with SMTP id 5b1f17b1804b1-4315c1c7392so64605655e9.1 for ; Wed, 30 Oct 2024 07:03:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730297024; x=1730901824; 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=NFHZHHHtQhHXy0LneA3qrzAuy0eD2+BwnEwT9SmlTxg=; b=aOecp5kUo2nD0CBD0tqBBdk0f9TB/nj/Lr+3Oq606wr0pKKqaRbmTV1d3Dva5/9sjw sblqqmQRvCgFkOK76l6tpzHV0thtotVhIYDIQ10UKLeiJp6QzAkGD3gkhBp2GFGCaerL lsGeThXaJcyFgkIgJJKE95NX5j3RevwCf/TP1w6O96XbFpfsAlu86ai3kNiyCABVBRDu yM6e8CfdHrPbTTajqDnbYge9c8v0LgJcXJaFV0zm4saUnrvY0fwIMfZLRlf0HX6MS2th 4otiOv3bly4tVlIZ5mc2wEMV3GRxZWb08EDGcfOfegQJSLLWpQDe6yv0h4mIW+nO6v1N 7tMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730297024; x=1730901824; 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=NFHZHHHtQhHXy0LneA3qrzAuy0eD2+BwnEwT9SmlTxg=; b=kEXKPwnCyACE5G2YZCAa3FG5l3AtQegH2aEuTkP2GEGbtyFiHKpXYfQPf0q12CcAH2 ajyhnJxYPWxDgaEYoShCx1Jct6wQM0HdhQzxmekEer9iB0/C6Lkz7bs5okJp1/qx8yxd CMOe/+N73b3cUGW0uXTzvMvy4qGwvnFKLdJ5D14xPySElsH18J0P0Bb6ODKsFYdtJT3M WT22zxA/TD1S1XQtij9pohQjm4QvRA0HZqxMfqXJMZxTGPTQBC6+fsX1xKaZKIRdXtT5 CJxF6m7LaQXpwE7LvpS7ultKVB+Gls98jKclQCPFCYlJnjJd96xARXmif+EWNRkiJl9y Mgzw== X-Gm-Message-State: AOJu0Yy7D6OD2XhP+/QGJXOxpxWtwENYW/7yR+8pF0//RjSo+wTbwvXn 7mMin0YfemMu+HOPoSo0vX/W8xMOEPo0I0ZKqNfVnAHG9RyeOE2YJtZ/o+5ag5Q= X-Google-Smtp-Source: AGHT+IFmTpDzexI9JYrPSkm4E4ubBW/+6IhiKSPCfQNoLzak5x6FjyKaHELymMtd+iI9G6FNBccLIg== X-Received: by 2002:a05:600c:458f:b0:42b:a7c7:5667 with SMTP id 5b1f17b1804b1-4319ad02659mr135597485e9.25.1730297023610; Wed, 30 Oct 2024 07:03:43 -0700 (PDT) Received: from localhost.localdomain ([5.133.47.210]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-431bd97d84bsm22498405e9.30.2024.10.30.07.03.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Oct 2024 07:03:43 -0700 (PDT) From: srinivas.kandagatla@linaro.org To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, Frank Li , Rob Herring , Srinivas Kandagatla Subject: [PATCH 5/7] dt-bindings: nvmem: convert zii,rave-sp-eeprom.txt to yaml format Date: Wed, 30 Oct 2024 14:03:13 +0000 Message-Id: <20241030140315.40562-6-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241030140315.40562-1-srinivas.kandagatla@linaro.org> References: <20241030140315.40562-1-srinivas.kandagatla@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3845; i=srinivas.kandagatla@linaro.org; h=from:subject; bh=CwYB+KzG2bo6Lm3g4RKbfuZiQwVH2hOe39CUmPQruSw=; b=owEBbQGS/pANAwAKAXqh/VnHNFU3AcsmYgBnIjyiakzuob7AA/3vsADSA07PuTH47JeshFPW5 v2Bab+s1jSJATMEAAEKAB0WIQQi509axvzi9vce3Y16of1ZxzRVNwUCZyI8ogAKCRB6of1ZxzRV NzzEB/9nFfgxwIVb8EO8/E2AEHNANtnF1KXj4V5QBvgC9Nf2vI0QihSOcvo544MfomPgYYiujn1 Eoa1QWXbR9Y3anlkpTc+JCABik40c6W00eQB9xQkzFTldmnwUYlApff/IfCKrPYHlwJcb1IscLv 5IlvGDh5T1BUVqiTwcN3iXGrPuoS6CiLBjq6sCEQ5+r+isma2OGnWhxZLidOzs5lKMbWabNhcjv K39WOCA7owVEi4FEWEudN81Vo/GDoPielmWLq1W/Mh7i3jOM9rkc1bW9k9sy8gfKqXSqDyRYMCg 8YJi2lY4K9V5Zro4pRgzEHSy/bkmp7dAc8NCwPPJI/dtV0sN X-Developer-Key: i=srinivas.kandagatla@linaro.org; a=openpgp; fpr=ED6472765AB36EC43B3EF97AD77E3FC0562560D6 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Frank Li Convert device tree binding doc zii,rave-sp-eeprom.txt to yaml format. Additional changes: - Add ref to nvme.yaml. - Add reg property. - Remove mfd at example. Signed-off-by: Frank Li Reviewed-by: Rob Herring (Arm) Signed-off-by: Srinivas Kandagatla --- .../bindings/nvmem/zii,rave-sp-eeprom.txt | 40 -------------- .../bindings/nvmem/zii,rave-sp-eeprom.yaml | 54 +++++++++++++++++++ 2 files changed, 54 insertions(+), 40 deletions(-) delete mode 100644 Documentation/devicetree/bindings/nvmem/zii,rave-sp-eep= rom.txt create mode 100644 Documentation/devicetree/bindings/nvmem/zii,rave-sp-eep= rom.yaml diff --git a/Documentation/devicetree/bindings/nvmem/zii,rave-sp-eeprom.txt= b/Documentation/devicetree/bindings/nvmem/zii,rave-sp-eeprom.txt deleted file mode 100644 index 0df79d9e07ec..000000000000 --- a/Documentation/devicetree/bindings/nvmem/zii,rave-sp-eeprom.txt +++ /dev/null @@ -1,40 +0,0 @@ -Zodiac Inflight Innovations RAVE EEPROM Bindings - -RAVE SP EEPROM device is a "MFD cell" device exposing physical EEPROM -attached to RAVE Supervisory Processor. It is expected that its Device -Tree node is specified as a child of the node corresponding to the -parent RAVE SP device (as documented in -Documentation/devicetree/bindings/mfd/zii,rave-sp.txt) - -Required properties: - -- compatible: Should be "zii,rave-sp-eeprom" - -Optional properties: - -- zii,eeprom-name: Unique EEPROM identifier describing its function in the - system. Will be used as created NVMEM deivce's name. - -Data cells: - -Data cells are child nodes of eerpom node, bindings for which are -documented in Documentation/devicetree/bindings/nvmem/nvmem.txt - -Example: - - rave-sp { - compatible =3D "zii,rave-sp-rdu1"; - current-speed =3D <38400>; - - eeprom@a4 { - compatible =3D "zii,rave-sp-eeprom"; - reg =3D <0xa4 0x4000>; - #address-cells =3D <1>; - #size-cells =3D <1>; - zii,eeprom-name =3D "main-eeprom"; - - wdt_timeout: wdt-timeout@81 { - reg =3D <0x81 2>; - }; - }; - } diff --git a/Documentation/devicetree/bindings/nvmem/zii,rave-sp-eeprom.yam= l b/Documentation/devicetree/bindings/nvmem/zii,rave-sp-eeprom.yaml new file mode 100644 index 000000000000..d073c51c2b9a --- /dev/null +++ b/Documentation/devicetree/bindings/nvmem/zii,rave-sp-eeprom.yaml @@ -0,0 +1,54 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/nvmem/zii,rave-sp-eeprom.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Zodiac Inflight Innovations RAVE EEPROM + +maintainers: + - Frank Li + +description: + RAVE SP EEPROM device is a "MFD cell" device exposing physical EEPROM + attached to RAVE Supervisory Processor. It is expected that its Device + Tree node is specified as a child of the node corresponding to the + parent RAVE SP device (as documented in + Documentation/devicetree/bindings/mfd/zii,rave-sp.yaml) + +properties: + compatible: + const: zii,rave-sp-eeprom + + reg: + maxItems: 1 + + zii,eeprom-name: + $ref: /schemas/types.yaml#/definitions/string + description: + Unique EEPROM identifier describing its function in the + system. Will be used as created NVMEM deivce's name. + +required: + - compatible + +allOf: + - $ref: nvmem.yaml# + - $ref: nvmem-deprecated-cells.yaml# + +unevaluatedProperties: false + +examples: + - | + eeprom@a4 { + compatible =3D "zii,rave-sp-eeprom"; + reg =3D <0xa4 0x4000>; + #address-cells =3D <1>; + #size-cells =3D <1>; + zii,eeprom-name =3D "main-eeprom"; + + wdt-timeout@81 { + reg =3D <0x81 2>; + }; + }; + --=20 2.25.1 From nobody Mon Nov 25 03:33:11 2024 Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) (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 9889E1F4738 for ; Wed, 30 Oct 2024 14:03:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.65 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730297032; cv=none; b=FI7ncj9Cdh7VL/lxvYei03pqpvUPo1zXeykMxsopLK3g2SIQlBga9xrpwEFxnCJyTsGIZiLbkV3+wqZJwm0E7idqJsUGWaW8lvjsvrb9hKLP3IeUXvHxSLBmSBdnLva0c7ULW83LqZ8gRDHA1cqpvDwCoLHMBm73K19LtwkNIVQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730297032; c=relaxed/simple; bh=e2E13pHQX63EUWQaRZE09Iv7l9L/cyQDSZMiSUwHdVk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Ik/UG8lbtfkyQ26M3niScwEIYVj0UVyn9beuVQZB9OXygsJA2Xp1ijxCzT29nJUdg4Jy44G/Jd/v8PZrO1gqV1MzYv10TrTV2i6hecV3FRYW3FBvHaw0IyZoHBc6k9KwopOuYE1zsO1/MOApXmaP2nN25JN6c++Qyo7kezEnqpU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=dCIvzqw8; arc=none smtp.client-ip=209.85.128.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="dCIvzqw8" Received: by mail-wm1-f65.google.com with SMTP id 5b1f17b1804b1-4316a44d1bbso59708095e9.3 for ; Wed, 30 Oct 2024 07:03:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730297028; x=1730901828; 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=qiTJVHAqjZaJtccWmKiHCP3BUpxrmRUWi6lzwFxakxg=; b=dCIvzqw8G5WRwS0DMXWkKEjuWUclJBWdMBH5uvIq0wfq5lUNcFEugKtzsxSdjfNfUs 6ljr2bYi2JqdXjPvbForkADZBir2fnVQib0v6vp5eThdWN+AA7WjIpvLoWjKPTx+9LCk Ee8r7VIj9Anxgiq7oD0s63XWqi+HkEyWSU4HEwG4HieugYt+4BrCeQgeZ7MUc1SOXwza 6AuJC7OR7rBlt0Ts1+2+ATkPW0nBnKlph08AaWT8Dsf0bjh6nuc1bGWyD+ItwKnebldT 4Z1zlrRsJEIhJ9H0iRXvZnWRL4fJVtM3QeTXn4UiGKJzClMuo9iPIGBZYApa1U6QW4uB IEnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730297028; x=1730901828; 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=qiTJVHAqjZaJtccWmKiHCP3BUpxrmRUWi6lzwFxakxg=; b=FY0LHAGXmQsBot2RJj5bYQHCez6NaCG/du1lRzpO3/e8tQmoJL0CZEW5Hv7KeueuS3 b1lSpeDPiquzh749xBEgU7ZpGAo9A6WwQDpD18J17yhwmX3yNrrNeuRlOCWZiRLsiyiq 3YoJX56ucgvX8HRomG2M5LJnmVJBCIEOSMLTZ6Urgqm5MTdi8c9JORYnLL5hglGCd1hM o8YX9cbhIRdIAbItNlS+kBEQUGv9nOrlbCuyRuEcE6GZV/+Mi17evhVbybo/Zi93OyCn jpPed+b8sntd0Yf8DyZRCRhPTPxlXbld9LL3Jb5SMeyoUN0cjm8kQP11+WQMfTRGmDXT Y5Kg== X-Gm-Message-State: AOJu0Yw+cRMf1BGU9vgCkKJzKzV1i+UoKVh4UXo7ep7Anns/Fug6hPM0 nnryZrMQQ+O3hqqrQKEa89qWWzMoOQqaA5r0AwG1cie7tLgX6VS3xnRicM8NQvo= X-Google-Smtp-Source: AGHT+IE70lFCkuwxLy04y773kByi4EBxg1kHLlX5gBf9whXrkfN+wFvoxLtR775geiDFYHnuGFTFdA== X-Received: by 2002:a05:600c:3ca3:b0:42c:bb96:340e with SMTP id 5b1f17b1804b1-4319ad317e5mr128437635e9.31.1730297025534; Wed, 30 Oct 2024 07:03:45 -0700 (PDT) Received: from localhost.localdomain ([5.133.47.210]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-431bd97d84bsm22498405e9.30.2024.10.30.07.03.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Oct 2024 07:03:44 -0700 (PDT) From: srinivas.kandagatla@linaro.org To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, Stanislav Jakubek , Conor Dooley , Srinivas Kandagatla Subject: [PATCH 6/7] dt-bindings: nvmem: sprd,sc2731-efuse: convert to YAML Date: Wed, 30 Oct 2024 14:03:14 +0000 Message-Id: <20241030140315.40562-7-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241030140315.40562-1-srinivas.kandagatla@linaro.org> References: <20241030140315.40562-1-srinivas.kandagatla@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3871; i=srinivas.kandagatla@linaro.org; h=from:subject; bh=UvOwIk+yZD27MovsiuLwpzcGLO9cpJAU/boRvjPd25k=; b=owEBbQGS/pANAwAKAXqh/VnHNFU3AcsmYgBnIjyic8resIB1q08zxH6OOB8ePA7EYXkJ8RrwZ Dil7lPzFoqJATMEAAEKAB0WIQQi509axvzi9vce3Y16of1ZxzRVNwUCZyI8ogAKCRB6of1ZxzRV N79kCACXbUGbuXEPQlqJl8muHrj3E+hShumWxMEQ4hIxIX10u8h5Hpy9JYXQqFBmbMltvqoz0B0 SNS+wvwHMcnMcEVEuKAlbs7GoY3sMzt0oupj34U3T4gVlf7I07ebM5tkPQtSzV5ycYAAkN9t57M NpJIwwUSPAgfKDwDVHq6otgrFaJn8Gh4L/5SJHd3GxBQYoPSLnHfkrIUcQq5a+YlZRFe1gVloqJ l4cBFsCueS86b/4Og5RTp9+0+wbVSwE5edSg0FH5AQcO3d7UEGKXA1HHwG8brxyvohpkHzBlR16 2BLn75Gnyv801YSPAV3HuX2X+bSOaMXKLd8nJJ8kMx66nbsj X-Developer-Key: i=srinivas.kandagatla@linaro.org; a=openpgp; fpr=ED6472765AB36EC43B3EF97AD77E3FC0562560D6 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Stanislav Jakubek Convert the Spreadtrum SC27XX eFuse bindings to DT schema. Rename the file after the only in-tree user, SC2731. Reviewed-by: Conor Dooley Signed-off-by: Stanislav Jakubek Signed-off-by: Srinivas Kandagatla --- .../bindings/nvmem/sc27xx-efuse.txt | 52 -------------- .../bindings/nvmem/sprd,sc2731-efuse.yaml | 68 +++++++++++++++++++ 2 files changed, 68 insertions(+), 52 deletions(-) delete mode 100644 Documentation/devicetree/bindings/nvmem/sc27xx-efuse.txt create mode 100644 Documentation/devicetree/bindings/nvmem/sprd,sc2731-efu= se.yaml diff --git a/Documentation/devicetree/bindings/nvmem/sc27xx-efuse.txt b/Doc= umentation/devicetree/bindings/nvmem/sc27xx-efuse.txt deleted file mode 100644 index 586c08286aa9..000000000000 --- a/Documentation/devicetree/bindings/nvmem/sc27xx-efuse.txt +++ /dev/null @@ -1,52 +0,0 @@ -=3D Spreadtrum SC27XX PMIC eFuse device tree bindings =3D - -Required properties: -- compatible: Should be one of the following. - "sprd,sc2720-efuse" - "sprd,sc2721-efuse" - "sprd,sc2723-efuse" - "sprd,sc2730-efuse" - "sprd,sc2731-efuse" -- reg: Specify the address offset of efuse controller. -- hwlocks: Reference to a phandle of a hwlock provider node. - -=3D Data cells =3D -Are child nodes of eFuse, bindings of which as described in -bindings/nvmem/nvmem.txt - -Example: - - sc2731_pmic: pmic@0 { - compatible =3D "sprd,sc2731"; - reg =3D <0>; - spi-max-frequency =3D <26000000>; - interrupts =3D ; - interrupt-controller; - #interrupt-cells =3D <2>; - #address-cells =3D <1>; - #size-cells =3D <0>; - - efuse@380 { - compatible =3D "sprd,sc2731-efuse"; - reg =3D <0x380>; - #address-cells =3D <1>; - #size-cells =3D <1>; - hwlocks =3D <&hwlock 12>; - - /* Data cells */ - thermal_calib: calib@10 { - reg =3D <0x10 0x2>; - }; - }; - }; - -=3D Data consumers =3D -Are device nodes which consume nvmem data cells. - -Example: - - thermal { - ... - nvmem-cells =3D <&thermal_calib>; - nvmem-cell-names =3D "calibration"; - }; diff --git a/Documentation/devicetree/bindings/nvmem/sprd,sc2731-efuse.yaml= b/Documentation/devicetree/bindings/nvmem/sprd,sc2731-efuse.yaml new file mode 100644 index 000000000000..dc25fe3d1841 --- /dev/null +++ b/Documentation/devicetree/bindings/nvmem/sprd,sc2731-efuse.yaml @@ -0,0 +1,68 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/nvmem/sprd,sc2731-efuse.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Spreadtrum SC27XX PMIC eFuse + +maintainers: + - Orson Zhai + - Baolin Wang + - Chunyan Zhang + +properties: + compatible: + enum: + - sprd,sc2720-efuse + - sprd,sc2721-efuse + - sprd,sc2723-efuse + - sprd,sc2730-efuse + - sprd,sc2731-efuse + + reg: + maxItems: 1 + + hwlocks: + maxItems: 1 + +required: + - compatible + - reg + - hwlocks + +allOf: + - $ref: nvmem.yaml# + - $ref: nvmem-deprecated-cells.yaml# + +unevaluatedProperties: false + +examples: + - | + pmic { + #address-cells =3D <1>; + #size-cells =3D <0>; + + efuse@380 { + compatible =3D "sprd,sc2731-efuse"; + reg =3D <0x380>; + hwlocks =3D <&hwlock 12>; + #address-cells =3D <1>; + #size-cells =3D <1>; + + /* Data cells */ + fgu_calib: calib@6 { + reg =3D <0x6 0x2>; + bits =3D <0 9>; + }; + + adc_big_scale: calib@24 { + reg =3D <0x24 0x2>; + }; + + adc_small_scale: calib@26 { + reg =3D <0x26 0x2>; + }; + }; + }; +... --=20 2.25.1 From nobody Mon Nov 25 03:33:11 2024 Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) (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 5B1DA1F4716 for ; Wed, 30 Oct 2024 14:03:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.67 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730297030; cv=none; b=RY46iKY7NrvWFpnWLp+bBBBdRWnY4IckySjKDyicsbz+qegMiTB9/cwVbq1oRPq3qW/dCVyEbDoI1544frmbZwT4+pTYESVpPOmhA3myQp6UrvP67znioRhCnWcoHE/GIPHP87p6g7TAtJWjb+pxQJ6VEJ1P+sz00RetBTomFYk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730297030; c=relaxed/simple; bh=z2Vunh82dN0BEK3w9+OuIC14wEEgMgwChFgUaC+KfbQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ayKeUfRNnm3CEi+k/6taFpD8NQ61+IAX0SUFyPoBfmBXRL6RY/t5cF8NJDuk+vKRzrRA/inG7Wd0JbwqN70xqV8MqJ+iQx2PKO+2ccQTesy6YGUKR/6Z1mW6bYJ4yJxmq9GGlx+d0O8AQQmnTTwcZaAN+6CeIBEtd9LhR8hjoqc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=N1x+D+Tf; arc=none smtp.client-ip=209.85.128.67 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="N1x+D+Tf" Received: by mail-wm1-f67.google.com with SMTP id 5b1f17b1804b1-43155abaf0bso64711035e9.0 for ; Wed, 30 Oct 2024 07:03:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730297027; x=1730901827; 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=9x6XrtDY+bedYEtd8B1W/i10aHkfc3IYmTqx+xv1FhU=; b=N1x+D+TfnKjLVmlBIRR3Lq7tgLcX2vLlybXlCmJSnLQ24aLblYJhAXAU/14Aay6h5a 4DiIm3GnGCFS1jkOxXFQ0Q339H3BdzZ7srgKaFgt57q8SD3TSXxxB+qVTiotHUSV6k+z J3jXkbcamEImyFxHNmSlPd4GOfe2zsTiXe/Ypjmv6sT0AfP2iRsVQWAngntFe/EQnR7I 7NTzMsqEB/1rOva9R92HJii/I0/Za5Uc7BydEj5McNi5lZoN8vWMzb4DhQDDZWSAPwet kmB08n+Gux5mEeGiPTFijedyDMIwsHJAsSjiuvuY/hY0T2uyVbbHhOZgFKxjlGpQ9h28 gFyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730297027; x=1730901827; 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=9x6XrtDY+bedYEtd8B1W/i10aHkfc3IYmTqx+xv1FhU=; b=QmASdPYBT9NEqsP6ySU5qKKrahX1ZGiuLoRcfcAVhgIuRwa1PAUoHt0OSrzxwGOGHY K9LvR+iyoyhG29KNdtmccNTSzDz9QgfMzhq4I8Adi3hUnjDF1227L9ZGBIq7ept41Otj iFwl7xOBZwCBSK//eKt32iMTxygz1Dske/UIkT5md0apwAOsTmd3EB1QBHBnGRgYD0Pc Nsg6j+MnfwMzjqeB4G9ORY/oEPDCnwPx6oM+RFI1z/F9x0Fk9L+nSOsES9HN+ku6bgVr nT8lJqNbdONuTyhIPH6Ppzu/PFT7FLm76FgTjBjLr0gtcfHEPNSkGmrimdiQMPr3VsJj x10Q== X-Gm-Message-State: AOJu0Yxf2RaMSM+5JpH/MEkjHk4fkJ5DMKDQJoHVAONw2JPWgMOmj1x5 tWVq+3ZK+pkNlGKxcCdczCEW1gcsIXlSAKVZATZDWKXNVfjy/RqLebMj8mTcwAU= X-Google-Smtp-Source: AGHT+IFq2lvgnwGMf0Thn5jd9DH4xOblA4X2hZ289Zxtbd7kAUXY4rkBRNLlrJ86dF8Z3UXSUPI8/g== X-Received: by 2002:a05:600c:1d1d:b0:431:5f8c:ccbd with SMTP id 5b1f17b1804b1-4319ac6e802mr120521395e9.4.1730297026345; Wed, 30 Oct 2024 07:03:46 -0700 (PDT) Received: from localhost.localdomain ([5.133.47.210]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-431bd97d84bsm22498405e9.30.2024.10.30.07.03.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Oct 2024 07:03:46 -0700 (PDT) From: srinivas.kandagatla@linaro.org To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, Stanislav Jakubek , Conor Dooley , Srinivas Kandagatla Subject: [PATCH 7/7] dt-bindings: nvmem: sprd,ums312-efuse: convert to YAML Date: Wed, 30 Oct 2024 14:03:15 +0000 Message-Id: <20241030140315.40562-8-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241030140315.40562-1-srinivas.kandagatla@linaro.org> References: <20241030140315.40562-1-srinivas.kandagatla@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3578; i=srinivas.kandagatla@linaro.org; h=from:subject; bh=KRQQIVEb1QG17qT/vexKrFyaF1lhidf4LqH3l2Ml8z0=; b=owEBbQGS/pANAwAKAXqh/VnHNFU3AcsmYgBnIjyjwEUbVowkDYQEa/E4a+mOIziAT2ys6cE9r BQ/fc4lTKuJATMEAAEKAB0WIQQi509axvzi9vce3Y16of1ZxzRVNwUCZyI8owAKCRB6of1ZxzRV N1pjCACVdJhd8UdhnmKM8UUZLTfKk59F6X05rvHJO9hq2xUhFPig6enJiMQmEWBTO8JpNp6DkxE MN2iogCEHR9J4c4Sszhh3c5P2BFPprzbCN9YrLZ5U8MPfqq9DChkDSamwkEGvAkm9ghKuPmI6Lw obOVs7NegaAqb7bQml9E+6a9mGQS1fv7qWheUm7ynC/Z6nlRkrS90CDxaTXOpbwqQi50U+1160m E1rZFDmOC8OOkXB5dOyBIXzvYXKgdypXF+aR3f4Kr9d+jpSIUlrxSV2ZPjBX4ohW9D0a4dnaaRO xF+aN14R372TERXW0DrD9dk/oNtcf3G0hPnFlsOgkNoiBRik X-Developer-Key: i=srinivas.kandagatla@linaro.org; a=openpgp; fpr=ED6472765AB36EC43B3EF97AD77E3FC0562560D6 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Stanislav Jakubek Convert the Spreadtrum UMS312 eFuse bindings to DT schema. Adjust filename to match compatible. Note: the UMS312 clock bindings include doesn't seem to exist (yet?), so the UMS512 one was used for the "CLK_EFUSE_EB" define. Reviewed-by: Conor Dooley Signed-off-by: Stanislav Jakubek Signed-off-by: Srinivas Kandagatla --- .../bindings/nvmem/sprd,ums312-efuse.yaml | 61 +++++++++++++++++++ .../devicetree/bindings/nvmem/sprd-efuse.txt | 39 ------------ 2 files changed, 61 insertions(+), 39 deletions(-) create mode 100644 Documentation/devicetree/bindings/nvmem/sprd,ums312-efu= se.yaml delete mode 100644 Documentation/devicetree/bindings/nvmem/sprd-efuse.txt diff --git a/Documentation/devicetree/bindings/nvmem/sprd,ums312-efuse.yaml= b/Documentation/devicetree/bindings/nvmem/sprd,ums312-efuse.yaml new file mode 100644 index 000000000000..00e0fd1353a3 --- /dev/null +++ b/Documentation/devicetree/bindings/nvmem/sprd,ums312-efuse.yaml @@ -0,0 +1,61 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/nvmem/sprd,ums312-efuse.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Spreadtrum UMS312 eFuse + +maintainers: + - Orson Zhai + - Baolin Wang + - Chunyan Zhang + +properties: + compatible: + const: sprd,ums312-efuse + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + clock-names: + const: enable + + hwlocks: + maxItems: 1 + +required: + - compatible + - reg + - clocks + - clock-names + - hwlocks + +allOf: + - $ref: nvmem.yaml# + - $ref: nvmem-deprecated-cells.yaml# + +unevaluatedProperties: false + +examples: + - | + #include + + efuse@32240000 { + compatible =3D "sprd,ums312-efuse"; + reg =3D <0x32240000 0x10000>; + clocks =3D <&aonapb_gate CLK_EFUSE_EB>; + clock-names =3D "enable"; + hwlocks =3D <&hwlock 8>; + #address-cells =3D <1>; + #size-cells =3D <1>; + + /* Data cells */ + thermal_calib: calib@10 { + reg =3D <0x10 0x2>; + }; + }; +... diff --git a/Documentation/devicetree/bindings/nvmem/sprd-efuse.txt b/Docum= entation/devicetree/bindings/nvmem/sprd-efuse.txt deleted file mode 100644 index 96b6feec27f0..000000000000 --- a/Documentation/devicetree/bindings/nvmem/sprd-efuse.txt +++ /dev/null @@ -1,39 +0,0 @@ -=3D Spreadtrum eFuse device tree bindings =3D - -Required properties: -- compatible: Should be "sprd,ums312-efuse". -- reg: Specify the address offset of efuse controller. -- clock-names: Should be "enable". -- clocks: The phandle and specifier referencing the controller's clock. -- hwlocks: Reference to a phandle of a hwlock provider node. - -=3D Data cells =3D -Are child nodes of eFuse, bindings of which as described in -bindings/nvmem/nvmem.txt - -Example: - - ap_efuse: efuse@32240000 { - compatible =3D "sprd,ums312-efuse"; - reg =3D <0 0x32240000 0 0x10000>; - clock-names =3D "enable"; - hwlocks =3D <&hwlock 8>; - clocks =3D <&aonapb_gate CLK_EFUSE_EB>; - - /* Data cells */ - thermal_calib: calib@10 { - reg =3D <0x10 0x2>; - }; - }; - -=3D Data consumers =3D -Are device nodes which consume nvmem data cells. - -Example: - - thermal { - ... - - nvmem-cells =3D <&thermal_calib>; - nvmem-cell-names =3D "calibration"; - }; --=20 2.25.1