From patchwork Tue Jun 18 20:45:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Protsenko X-Patchwork-Id: 13703003 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 EEA40C27C4F for ; Tue, 18 Jun 2024 20:45:58 +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=AlbvvMZMqGqL9+iJm7HJUKaP51agxlDWROSsJ57jie8=; b=4kbuP/yIVAeEziALejxcwGPVn8 ch9zprNjNpMCDxP1DQztbvJK4NJEM3n1tkEvS7df4/6LBPJrfIz8QiOOqSQa/AvmzDHgxBEnLwiOM qa1m0D1WyK7I4eS331obdb4yR2DGLKyVhNOFLtO2zcql7YABQz9BwK/5HjDFfm7yb7nSAciHX9jSI c61+Pyj3iFzazwT8aOh21w9AKKEZKLaVXEyO5BjTyBzhd5KNTj2LwYIeolxZOoUM0r1VyPXCHOPGW QNhyht1r0mHJgj/L81w2ppYo9OTm7ZvuJwDVlAhzY1pdgJXM7rqq9HUT/pssEAvu+ZQSuG2f1QC6R +QBTvWcg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJfhq-0000000GWuv-0dcD; Tue, 18 Jun 2024 20:45:30 +0000 Received: from mail-ot1-x32e.google.com ([2607:f8b0:4864:20::32e]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJfhn-0000000GWtD-1Yyf for linux-arm-kernel@lists.infradead.org; Tue, 18 Jun 2024 20:45:29 +0000 Received: by mail-ot1-x32e.google.com with SMTP id 46e09a7af769-6fa0d077694so2518370a34.0 for ; Tue, 18 Jun 2024 13:45:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718743525; x=1719348325; 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=AlbvvMZMqGqL9+iJm7HJUKaP51agxlDWROSsJ57jie8=; b=r7qsaSQ66MJ+DBAbn4l/7i3zC7ANaDVmt1KjZIQ3ws4y9iUWGBMiW+hMpbmd7dOwSR zk3Bh1tz5Bfh8hwZH/OsveOQKbXCjoSscFL3phedZoi023l0q3yKMN6wy2GEbgbHc6tN 1t9jMJrew+VkS2iPPs6lfoMDS6RurW7SBDqjyRJ0i9AxCYnUe+My1SpTxjHQJgTr8rJA /+q+W0SDwmNDKyF2cTY0EFq6hZr+aXUqIu10P+z9PqAk5MEXTuUy+qkBD7byyVsJG1Jl P4hJa7JB7RzP6dsbXkOBgcA+g1fhmRhwf1ZiKQw+bb6u75QA/YvXgGJ/5Yxe7g5vNLZL f9CA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718743525; x=1719348325; 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=AlbvvMZMqGqL9+iJm7HJUKaP51agxlDWROSsJ57jie8=; b=gk6SmTHDgNEvNHDujxwJ79kZMCXFs5b49wLXt3KbhvHEcGC24Cy1WafqvEGNl15x6m /FThmfgupmHRpbNhq7zeeh/wt1QBOjr01jBedAgsMANNBrdIUpXpskXwZ39dFy2gv/uk G1mgNwWICUnAKic5lU4yOIviexsmoDY9NU6+QVI2WVcCtC3hqXaOtFemxBGVIz/ZlEac /KaH21765gpxyY3YlUrGPpJar/h5Z77nWBvTNQo56oS9Z0B3nTn3xMgWiecGSlB/g6A9 5KUyArgRxqZERpSKcqXPczaEMVoJxE4zmKwUYaTuGdlezZLO5G5oUM95B18NnIQRqLS6 5kNw== X-Forwarded-Encrypted: i=1; AJvYcCXrkhaRyLja7jnbFFMXrB/80oHE7nrrd1RV7oybR5SrFXmlor+VjWV4wiKlzVMZmLOqzzqG7oBHjJ5KdbHBxXJmDJcl0cZ7s21mBs+dLE41Yn371fE= X-Gm-Message-State: AOJu0YxOI08xp2T5KXMoiaqjlgssI3hKvwpbhGvI0iB6V2R4+w+kiG/b 7lF5Cj564DSgqukYi2f42RiV9ypq47MY7UPd9JS67jlfp+ey1Kn4Bh0jgDVyABU= X-Google-Smtp-Source: AGHT+IHtQ4jPiGwmE6Fqz4f+T054gfg7HjueTuRrzz7pHpWmzy4tU4cMlClLNNSm5wif6dmg4G42uA== X-Received: by 2002:a9d:7841:0:b0:6fe:858a:8d4a with SMTP id 46e09a7af769-700771e7314mr874352a34.35.1718743525201; Tue, 18 Jun 2024 13:45:25 -0700 (PDT) Received: from localhost ([136.62.192.75]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-6fb5afab892sm1937125a34.7.2024.06.18.13.45.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Jun 2024 13:45:24 -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 v2 1/7] dt-bindings: rng: Add Exynos850 support to exynos-trng Date: Tue, 18 Jun 2024 15:45:17 -0500 Message-Id: <20240618204523.9563-2-semen.protsenko@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240618204523.9563-1-semen.protsenko@linaro.org> References: <20240618204523.9563-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-20240618_134527_628828_C40F3A5C X-CRM114-Status: GOOD ( 13.26 ) 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 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: