From patchwork Thu Jun 20 23:13:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Protsenko X-Patchwork-Id: 13706539 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D322CC2BA18 for ; Thu, 20 Jun 2024 23:14:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=MgnmbN5MPz4u6HwtpTU4Zp3I0CSg6ni7gpmRecQhhsc=; b=R3RalIAxHqfsZ0PHzs/ucR34Z4 Jn61bwx0b9s+Mr8OhzIUK11Q2X0o20qGU3ZA4JWw8RERqan/pmOQE0isIix5E2Cl91ovFzquxrpXE tLkIcuLloFoW7EsTBOq06pcp7RpNEEg1eEmD/el7uC301aKCADHbFISvSvjItQ1fMerSmk/Oe1kkG n/oqo4TfAI0a0nXXjLqEU4gmq47cu8TvnMDih9zo3Mfw01khc8hN4AHwQYHJePeWl9ZXkdbnE5vCa 6faXgg3UquDUgyV7ubPUp2kS28imhm5rmrTFqfl0/rvv7TEe4KoAP7x21wb9xwUG/rSNdXGZlWy+R rEJEwEGA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sKQyX-0000000754V-0erE; Thu, 20 Jun 2024 23:13:53 +0000 Received: from mail-ot1-x333.google.com ([2607:f8b0:4864:20::333]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sKQyM-000000074ze-0Fi8 for linux-arm-kernel@lists.infradead.org; Thu, 20 Jun 2024 23:13:45 +0000 Received: by mail-ot1-x333.google.com with SMTP id 46e09a7af769-6f97a4c4588so865182a34.2 for ; Thu, 20 Jun 2024 16:13:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718925221; x=1719530021; darn=lists.infradead.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=MgnmbN5MPz4u6HwtpTU4Zp3I0CSg6ni7gpmRecQhhsc=; b=q5zfTYsB5vYX+9Z8QvuzQ+BKhnHGG91WS0x0vWcq7P71TY3IP6gH3L0TTy54j7+gY8 KINm73un8E7/NXklcBBceUQEMJ0xHTln7JoPbeHpexexoJXWYFs4SJb3RxkT//AN5kv5 ueuTyp9YBhYYvVuNVSc8WbsEibD6pTTlSH6lpAyy0zwsIfDbq8DCLWRECZr8ai9CMTSp EcrYmY5sFnk9xlIrrR/BZl2UVmnim43qgCbaZyP8buHB36WtGz4sakRWaWn//oMA3tmX PUopW9fz9VYSP6Mp1EdMrZe7vt2fQ8skiSl8sNMgaqv6Ef+WGBt0EaPCD+ew2NfBGq0T xIEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718925221; x=1719530021; 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=MgnmbN5MPz4u6HwtpTU4Zp3I0CSg6ni7gpmRecQhhsc=; b=niWEr/h9yjkVGjJD3JSUzdKjfD0HhzelLfLw7VLf8cukS+JobAvCdXyCPG3wIDyBkr P8MV/RLu4Wd91Pxs3+JbiOjUtYeHPaidsGpSxcyREBiUxbd/DZa3OwS1Xy0tVcGoLQ2V 1MdWq4hvEMzPTOYeck3SPRwSkQO42maSWQJmQCttKMszvhTfEvj8XuWk/TnvU+A8HRYo 5txgjAtwc0R9fAkISaPHbi9kXMOx95LWRJe64hUSSsBBrddn2fNUEP3jrO8DcgJzZQSS LqwEvz5DtVhjxtI7Su7YTNRtCqbSp2CG1/Bg1+45lscEmvDyav4TlOm2LwY5ISgCtg+c pxfw== X-Forwarded-Encrypted: i=1; AJvYcCWG0QsAwq5olWNtVs3G5o1fxipKA6gxMoG//qESwpwce271VMaWKVm7kejpxVmJNxfbBMCio6D4KviLd5tnReqg35W8Bgv8MCzE4z3XcpDhgggI9tA= X-Gm-Message-State: AOJu0Yxk4bFlCO86g7lAlxsJ8eK+FqjK1QeW7Z5dkc8oDedBr3v4GAmL IUi2IwsFHXtrzwb+OCGwQXrzXp8azmvsKWKCUR8bqqECBqourgIe7vA4zd1vXWs= X-Google-Smtp-Source: AGHT+IGcflyEPj6w5naITQ8Pm+V6zs8OQmKJmr+51gTiWQ/prs82vRgY/sUN5+lTjL9xSd1p6OXsXA== X-Received: by 2002:a05:6830:1018:b0:6f9:a5bc:fae9 with SMTP id 46e09a7af769-700748c96ccmr7378826a34.10.1718925220685; Thu, 20 Jun 2024 16:13:40 -0700 (PDT) Received: from localhost ([136.62.192.75]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-7009c5df247sm89737a34.6.2024.06.20.16.13.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jun 2024 16:13:40 -0700 (PDT) From: Sam Protsenko To: =?utf-8?q?=C5=81ukasz_Stelmach?= , Krzysztof Kozlowski , Rob Herring , Conor Dooley Cc: Anand Moon , Olivia Mackall , Herbert Xu , Alim Akhtar , linux-samsung-soc@vger.kernel.org, linux-crypto@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 1/6] dt-bindings: rng: Add Exynos850 support to exynos-trng Date: Thu, 20 Jun 2024 18:13:34 -0500 Message-Id: <20240620231339.1574-2-semen.protsenko@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240620231339.1574-1-semen.protsenko@linaro.org> References: <20240620231339.1574-1-semen.protsenko@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240620_161342_383105_D4972E3B X-CRM114-Status: GOOD ( 12.50 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The TRNG block in Exynos850 is pretty much the same as in Exynos5250, but there are two clocks that has to be controlled to make it work: 1. Functional (operating) clock: called ACLK in Exynos850, the same as "secss" clock in Exynos5250 2. Interface (bus) clock: called PCLK in Exynos850. It has to be enabled in order to access TRNG registers Document Exynos850 compatible and the related clock changes. Signed-off-by: Sam Protsenko Reviewed-by: Krzysztof Kozlowski --- Changes in v3: - Added R-b tag from Krzysztof Changes in v2: - Removed example added in v1 .../bindings/rng/samsung,exynos5250-trng.yaml | 40 +++++++++++++++++-- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/rng/samsung,exynos5250-trng.yaml b/Documentation/devicetree/bindings/rng/samsung,exynos5250-trng.yaml index 765d9f9edd6e..1a71935d8a19 100644 --- a/Documentation/devicetree/bindings/rng/samsung,exynos5250-trng.yaml +++ b/Documentation/devicetree/bindings/rng/samsung,exynos5250-trng.yaml @@ -12,14 +12,17 @@ maintainers: properties: compatible: - const: samsung,exynos5250-trng + enum: + - samsung,exynos5250-trng + - samsung,exynos850-trng clocks: - maxItems: 1 + minItems: 1 + maxItems: 2 clock-names: - items: - - const: secss + minItems: 1 + maxItems: 2 reg: maxItems: 1 @@ -30,6 +33,35 @@ required: - clock-names - reg +allOf: + - if: + properties: + compatible: + contains: + const: samsung,exynos850-trng + + then: + properties: + clocks: + items: + - description: SSS (Security Sub System) operating clock + - description: SSS (Security Sub System) bus clock + + clock-names: + items: + - const: secss + - const: pclk + + else: + properties: + clocks: + items: + - description: SSS (Security Sub System) operating clock + + clock-names: + items: + - const: secss + additionalProperties: false examples: