From patchwork Tue Oct 3 07:10:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 730516 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 856C8E75434 for ; Tue, 3 Oct 2023 07:10:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231210AbjJCHKf (ORCPT ); Tue, 3 Oct 2023 03:10:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230412AbjJCHKe (ORCPT ); Tue, 3 Oct 2023 03:10:34 -0400 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 729B0B0 for ; Tue, 3 Oct 2023 00:10:29 -0700 (PDT) Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-4066241289bso5729585e9.0 for ; Tue, 03 Oct 2023 00:10:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696317028; x=1696921828; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=bWSoJPhCIlN0cC4i2L0NWdvzE2l13BuJshGU4nRAwjo=; b=QLsmYww4Qg3ptWMRpcL6sdk6DBNGBGvZa7L/xuX//J0OdjwjHHB+W/qqvNtSoUvKk4 LZMyedpltPTHDK46VWU9qKk7iPc64f/NpEbOtAEjn/bYx94toRKMygM3R0AdSzjt4du7 lD2jqVe/7iRv9bhINz3HRUpra132+eIpe5vozguMaxXc8CnthnMDzPb+btTpMD4jNVyn /yNUmnijOwcQXl/md5/NZQ/cT+sFbc405323iQxD1LZxI/Trfvt52Wd4zJsxkrGAhhmK p/Ix1N9gv08sx7u9i/BjpEeo5uuxM48Sxp3AU4rkYFcBXTq2mkRggqT9Odl8fKYdG8MU +i6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696317028; x=1696921828; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bWSoJPhCIlN0cC4i2L0NWdvzE2l13BuJshGU4nRAwjo=; b=dwVzql+ZReWEPN0URMWbN4wKEVA99hZfevQNnFM0eqpcLbkOFV09esnyYkMq3ZJVHZ jxTrscTkO6nSl7XIrMNEnrRdEnDPZC4l+dLnlgaLKr38+FLOpPzQIWQ2QtQe2rtrgOHc pM8+PXlRAT9H6I0wG/bZUoJ58p5jLY37rD3spZlgkHO2XCaX34tusO2f+vcQNPAteTEo ykk1KwWZrurstJRHzT/PPBRalFItDmtZis6EovamgbRMYTnx2/R+QOnKjDY15tLkeYTP Xvt2SPXtUbJKYsZjja3aQABBuQz7JtqxnMK26GDiEw3Bkm3FIrDkDOvf6cARge92S1RZ Jw8A== X-Gm-Message-State: AOJu0YwJPD2tqtn7H2pJ/mfDawnjd0cVfTtrCgul++qKjx6JQBzwSImm jdKyZhf15AocXuW0jFV/7mUSYQ== X-Google-Smtp-Source: AGHT+IGi+6RqGcb+4ZRpRhh6xCxxmKzBvdEFVYnmyjGFav/kxPiBX/fbrHwOPunT0Gyn3vVA2KU2Aw== X-Received: by 2002:a05:600c:2303:b0:405:dbe2:df10 with SMTP id 3-20020a05600c230300b00405dbe2df10mr11472017wmo.35.1696317027775; Tue, 03 Oct 2023 00:10:27 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:8261:5fff:fe11:bdda]) by smtp.gmail.com with ESMTPSA id k2-20020a05600c1c8200b004065d72ab19sm8746652wms.0.2023.10.03.00.10.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 00:10:27 -0700 (PDT) From: Neil Armstrong Date: Tue, 03 Oct 2023 09:10:19 +0200 Subject: [PATCH v4 1/5] dt-bindings: crypto: qcom,prng: document that RNG on SM8450 is a TRNG MIME-Version: 1.0 Message-Id: <20231003-topic-sm8550-rng-v4-1-255e4d0ba08e@linaro.org> References: <20231003-topic-sm8550-rng-v4-0-255e4d0ba08e@linaro.org> In-Reply-To: <20231003-topic-sm8550-rng-v4-0-255e4d0ba08e@linaro.org> To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Herbert Xu , "David S. Miller" , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vinod Koul Cc: linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Neil Armstrong , Om Prakash Singh X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=1743; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=8CwyDjTKBT82oN5QeEf44nn7stnpG4wjL1jNGz85BlQ=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBlG75fnBvRRVRmH6ri56CNjn4g9zIjD1YBZR8zzUKs BCJ5GDWJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZRu+XwAKCRB33NvayMhJ0WkvD/ 0XVBX3vNDxd0zFxw8kZ4Zp6w9qMu8h2j3ZsJtXBqefv4yQ3oKtndrJoqRlfqgD6hfj03u0IRwjbkwC YzwGOVAf2UqSwUgx1CynzxHUYDYwZc+OCBDAHbfRaBUiDhmPXjgVdI9v8xouMk7BK5KaGiMspjQ07B NUtmJMTdYlqUfizUlyfQLmLaqkGXSwyMqy7GxTbibx/d9ug/3j2SBEKJ5Cr/Q5DuR2StXh8jh7lLNV z/y9D/Y5z3PKYltC11W+Q94XXB64ZXcLH8+3ZctIXDflCdP2XvFd9+x+jhxbuwOpn4a4wBUK01fqFl rSCRB/CPq6AXtsxdeef53kDt4AFR8OB+G89oPn4HCA7oZX/Fb8G8Jl/iIm1T1uyBrqfQCLt1EQew0k M3lAHdkb7LwuhACRzfFsD897dLN3CjVL22Z12cgxzLfJXNHm01/eypnizTg2Y1qcMjSE6+sdRIgkkN nM8PC1hwd2/DlLOEtlq1alnIXJjqWXRcghW6kUE7SghUb1a4jfxiiMwyeSGfStb6IZaVHZ39TEw3wX AVbJkXYHls2S1nH+fri2LlbYSEnBGShAnQg0jPnuzVLLgUrUo0qeyiYkeMpR5OnaqSv5+hYsoize1r GpukhE83FsjPNgpHRBM6+03pNbmfo1riWH1M6zaQUtQeAacRPgqmLRNYsujg== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org It has been reported at [1] the RNG HW on SM8450 is in fact a True Random Number Generator and no more Pseudo, document this by adding a new qcom,trng and the corresponding SoC specific sm8450 compatible. [1] https://lore.kernel.org/all/20230818161720.3644424-1-quic_omprsing@quicinc.com/ Suggested-by: Om Prakash Singh Suggested-by: Konrad Dybcio Reviewed-by: Om Prakash Singh Signed-off-by: Neil Armstrong --- .../devicetree/bindings/crypto/qcom,prng.yaml | 25 +++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/Documentation/devicetree/bindings/crypto/qcom,prng.yaml b/Documentation/devicetree/bindings/crypto/qcom,prng.yaml index bb42f4588b40..04ddcc0f7165 100644 --- a/Documentation/devicetree/bindings/crypto/qcom,prng.yaml +++ b/Documentation/devicetree/bindings/crypto/qcom,prng.yaml @@ -11,9 +11,14 @@ maintainers: properties: compatible: - enum: - - qcom,prng # 8916 etc. - - qcom,prng-ee # 8996 and later using EE + oneOf: + - enum: + - qcom,prng # 8916 etc. + - qcom,prng-ee # 8996 and later using EE + - items: + - enum: + - qcom,sm8450-trng + - const: qcom,trng reg: maxItems: 1 @@ -28,8 +33,18 @@ properties: required: - compatible - reg - - clocks - - clock-names + +allOf: + - if: + not: + properties: + compatible: + contains: + const: qcom,trng + then: + required: + - clocks + - clock-names additionalProperties: false From patchwork Tue Oct 3 07:10:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 728908 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 761CEE75432 for ; Tue, 3 Oct 2023 07:10:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239184AbjJCHKg (ORCPT ); Tue, 3 Oct 2023 03:10:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230470AbjJCHKe (ORCPT ); Tue, 3 Oct 2023 03:10:34 -0400 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88106A4 for ; Tue, 3 Oct 2023 00:10:30 -0700 (PDT) Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-405417465aaso5878385e9.1 for ; Tue, 03 Oct 2023 00:10:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696317029; x=1696921829; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=JssHYOFSSsJtW/9ko+cRQNdDDnX/e2dMOwlr6O98kGw=; b=Bw3BUh16HcG7MpTKAbNKrFk90VMe/WAHpAHIOieEahF7gaSwcKWhYUC77JCfgJA01N 9IEzqd9GFf8nUVNy0iGCOtgsbUoHgAdeIPbvpB7qc7Mf9dJHCNY9QAbIF3SuLDEnaO1G K6RqxOQ2uSwsjabILVDfgEaux3xaUR1Zd3HIlcqN4s+e9gmay1Z3BFUP/38U1KwaZdtn Q/ocoOccy0aSeqJZbuIER673TLvHNG8XYXw0bXgm3mUgytAXvUo2qfxPoJ89d928iEqj Ko0av2QRb6ETeUzybvAVGzglrtjdi1NRnYNata69a0ZJxD3pXGBJmx/DweezGCzi2O4t nOTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696317029; x=1696921829; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JssHYOFSSsJtW/9ko+cRQNdDDnX/e2dMOwlr6O98kGw=; b=Aq7LHgFdqyUFFRTiGoprt97oKyuaXfYJF/tPNoMM7auhZKlfT97Co/7J3+WH6HfV+J MLUzjrMEmQMWYvvRbnb6uR8VhC3UUkF1ACeOP9A+cYrT8YcXBJ4UhJ7MYdZOOCtmL+eA XZcZTg84F/tlAiDVQn02LjuuDiPxzXmt/8629+ZyL+GFQ4BNykZhZOYcqLT9Cezbl/G/ AJu9nF6Uy5qgQz+xmSZUiySveufr4bOtKiQkq3BwkGyTI70es5m3EbhFCV7XvZjtG4LT V1xJUgW0eODfQQfWSHkeVNrLdhMwJgOVuOqU4mBQSdWLnybU6K1muZhu8ygbyZXJdv+O JzKA== X-Gm-Message-State: AOJu0YzfZOq4fRbvmn7h8Zp8zcPOXSgZJhisXpqZs9VUJyGGbM7760xm gV4f/RcEHn7YB58qEwST4baVAg== X-Google-Smtp-Source: AGHT+IF7aHvQpC0Bf6IGTXkdlSkgULFkZEZzy1fGTLIUj9kIes1KcqPlMS1t1CQ10jvTzHteINF86Q== X-Received: by 2002:a7b:c3c1:0:b0:404:7670:90b8 with SMTP id t1-20020a7bc3c1000000b00404767090b8mr11953540wmj.27.1696317028852; Tue, 03 Oct 2023 00:10:28 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:8261:5fff:fe11:bdda]) by smtp.gmail.com with ESMTPSA id k2-20020a05600c1c8200b004065d72ab19sm8746652wms.0.2023.10.03.00.10.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 00:10:28 -0700 (PDT) From: Neil Armstrong Date: Tue, 03 Oct 2023 09:10:20 +0200 Subject: [PATCH v4 2/5] dt-bindings: crypto: qcom,prng: document SM8550 MIME-Version: 1.0 Message-Id: <20231003-topic-sm8550-rng-v4-2-255e4d0ba08e@linaro.org> References: <20231003-topic-sm8550-rng-v4-0-255e4d0ba08e@linaro.org> In-Reply-To: <20231003-topic-sm8550-rng-v4-0-255e4d0ba08e@linaro.org> To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Herbert Xu , "David S. Miller" , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vinod Koul Cc: linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Neil Armstrong , Om Prakash Singh , Krzysztof Kozlowski X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=848; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=577swv6REyO06YPayl/NJ2+pSbFK1mIeUk3V8xet8Ks=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBlG75f6qguhMqLrMtJ9Gn1S2J0RQ/8QXI4aa9yW9/g BsLkUE2JAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZRu+XwAKCRB33NvayMhJ0Yn2D/ 9+KxFN4Iwpoe8z/Oytxz5DNjMENQctIVVYj3gvweaZjB2TuB6i0oWN3WMeyV7rTly6mvOmsF5OgI2C KLBzmmODHtH89TowGcW0md1zjBtKbt7Ena4hw437RyQW4ROGuYPZMIqvtWs/zCsfV3WSkjGSdOPTq9 oVLVELSr02/q1majkUjPCM4hquMjQPcZqGa8jH3Vlrj7iYALebBzUvQNwPjYjWhVZEBnbQGMqd4xTp KRlyyii8ZrR3lUiFHsdhWMsjPa3ztV9H0wH7w+hU/uiOwY1OasCwZ846nonvd4TBRicUujqnmhv5fV 1yIBI17Ym5UZ+1VCw5Ko651OZatT0BaUyqnRmI4V7MBuFxSIfMErG6UBEr61WzPNtEmu5jwhmPpeDi aGYI/w4FQu2zZdv9fGSWXRcfJXjU0wBOjLyJVHIHHSjfcBKUGCHIPSkKPm7zs+TFGf2++ny5sUJBOy ctoKv6aY6WDfGFuyUsbc/a+IEJw4glLxT8E9KKsFR0rJGkQq755kpys4OZ4q+XIUGgFuEUYQ5IiTa2 YASVc2b8t2la7gu8e0mT8guju5tfQcLtxivv0rv9rr8TdZCtS5uKrbXrfAe/oHoygJETZIyvw630Zq xa6yGqDLSA2A7kxbejBdq65I0XZbmW3eqgXjuczYD6jbTl9oZdaHgRBmgFKw== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Document SM8550 compatible for the True Random Number Generator. Reviewed-by: Om Prakash Singh Reviewed-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong --- Documentation/devicetree/bindings/crypto/qcom,prng.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/crypto/qcom,prng.yaml b/Documentation/devicetree/bindings/crypto/qcom,prng.yaml index 04ddcc0f7165..633993f801c6 100644 --- a/Documentation/devicetree/bindings/crypto/qcom,prng.yaml +++ b/Documentation/devicetree/bindings/crypto/qcom,prng.yaml @@ -18,6 +18,7 @@ properties: - items: - enum: - qcom,sm8450-trng + - qcom,sm8550-trng - const: qcom,trng reg: From patchwork Tue Oct 3 07:10:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 730515 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DD61FE75432 for ; Tue, 3 Oct 2023 07:10:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239201AbjJCHKk (ORCPT ); Tue, 3 Oct 2023 03:10:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230521AbjJCHKf (ORCPT ); Tue, 3 Oct 2023 03:10:35 -0400 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7E6BCC for ; Tue, 3 Oct 2023 00:10:31 -0700 (PDT) Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-405417465aaso5878605e9.1 for ; Tue, 03 Oct 2023 00:10:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696317030; x=1696921830; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=IywbLeV1JE7fISvBp0m3U1FAV92P00oRfMvIqcDu3Zk=; b=NDRZbtOFImeypJzEHKgLysE/Mm5OXE5ASOeMXAR9FTQMjw+QABp0daEnPOF30ifgV9 jjxS1wHbei3ItQiH1xMehMNItTmHOUc8ACh6UKhVdkGI+K3ierhY6b8l0QGfVRTEEKDN woi7q2r+NRM9TSrMq5PqFl9axML7Mk6I4CPMg43idlB1S+siRMUH8HMmRnYuE7Fn8hjb 6NfCO66QNeawAYM0bX8M/RpZqT4v0EXiQvV050giH3YDn5RS+sh3gkxyxThw0Q4SxwSS ZqV4+5lpRhPJzLd04jqz0E5gSI6kCG369pfjOL/ppSSTBe18LMMIh4CpeFEwa1sm3LKp S39A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696317030; x=1696921830; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IywbLeV1JE7fISvBp0m3U1FAV92P00oRfMvIqcDu3Zk=; b=o+vNHAcFbOoRFR1SFxb3yxnvGRDgZm/ZpVt7ju+/hAMD1kSqXy+mVHBGdW27hAPTJS 8Ssntjnn/Xr1TSoULhqDJwyoScBMN8EmShZAnJyBqGcpZT9ZksN6rUtKJ6Bm6S6Hr0aj Xj9EhiY0fPim0LBL72EzVtZ2tgS7nqQOgXVXmmAQfrEolAvaM7J4XvxWla5uGnrwVxeI VZAXlAxKK/3jLMsd1aZgc3xrJ8Iz0jpdMvAQxNMroVpnXey7yDNShOtCs3Q25U6/2DkG LIKizuEM1xO3Kv318UveByPHshn9Cx43OMv3bpTTctQ0LMgwMLGfybJzH7TGQLBkOXm8 XxTg== X-Gm-Message-State: AOJu0YzT/j7TdHFsOPzMMy51ykGUfUhy+Ut/7cv67o4RYYGxpyP7xT6d ZAxwfILfCVUeVvHdyLCu4rnKTA== X-Google-Smtp-Source: AGHT+IGY906kVJig/V12DoguZU16BgJDEgJZd0/1sIm1JRgE9n6IDBV9mUI6yYIO1gKCbMz5JbDaHQ== X-Received: by 2002:a7b:c397:0:b0:3fe:3004:1ffd with SMTP id s23-20020a7bc397000000b003fe30041ffdmr11865022wmj.4.1696317029901; Tue, 03 Oct 2023 00:10:29 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:8261:5fff:fe11:bdda]) by smtp.gmail.com with ESMTPSA id k2-20020a05600c1c8200b004065d72ab19sm8746652wms.0.2023.10.03.00.10.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 00:10:29 -0700 (PDT) From: neil.armstrong@linaro.org Date: Tue, 03 Oct 2023 09:10:21 +0200 Subject: [PATCH v4 3/5] crypto: qcom-rng - Add hw_random interface support MIME-Version: 1.0 Message-Id: <20231003-topic-sm8550-rng-v4-3-255e4d0ba08e@linaro.org> References: <20231003-topic-sm8550-rng-v4-0-255e4d0ba08e@linaro.org> In-Reply-To: <20231003-topic-sm8550-rng-v4-0-255e4d0ba08e@linaro.org> To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Herbert Xu , "David S. Miller" , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vinod Koul Cc: linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Neil Armstrong , Om Prakash Singh , Bjorn Andersson X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=4714; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=ZtCB6lsbxvSa3eirhPxOyVDi+suZRyTxM+5dgiifh+4=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBlG75gVaZ0azfyvKpaRHykx/cbFhLJvTna1PxaHvVH KswlclGJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZRu+YAAKCRB33NvayMhJ0VM1D/ 4mimcU9Z6SAgY6DGnzoJNlEKrYbNRd+OEe0okGp5QrZRA23McBeGRwI+ru3UdnIsX9pRZIc3cH0RBv hkOFSvMx3mXP9DjmBvrRt8yCZoMcfEm6Wn8ReWrZWdBP9AqzS6ObSgefpzfx/zNLDfir8iw2rvkl1i IanVFhLGc9EI0tbgUgALxhKVbr863iV7wThCJrk6czDf+MlSRbpXFIqECg5PhcSySF1Fm9Dq+c4PcF VU373UHytW98QUEGx4a8k5y8zvKS0YGc0JuW6aIJcds2mI9zdc7FkYnadIcGwgH8YEZFrR+8frnrRL qVjVvXsjAB86yto5r0qI7M/42LXj4KiKu9pcY4HpepPy07SEIrLTV1Cx4SFBSDvoRtOZZH43IZr/9V g3H36x4pNTqpWWSVx7es4Ty/01NMWzoIXOR+7MxDJGtX/QPZ6dwEdehUyjdV5UfVv47etadam9M6SQ rRZ7Qmyilz3CwBQ08lzL171Q1WDWvd8Jl+qn8jIAGruyQx4dL1L7etqGX6+FPciq0nK9aqTx1pqjLr +aw1AoCi1MrmO1kuGjLnG3hpazI39ltYcZp9WYYmXP/jGC+5kGB1H0rIDoxm9IWOWg9+wdFXkN1ET6 /S3UzwesxpSxordgNtrV3TcD/WjE1qJS8e1TUMzEWgPzQJP95CQ+cA4FqMJw== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Om Prakash Singh Add hw_random interface support in qcom-rng driver as new IP block in Qualcomm SoC has inbuilt NIST SP800 90B compliant entropic source to generate true random number. Keeping current rng_alg interface as well for random number generation using Kernel Crypto API. Signed-off-by: Om Prakash Singh Reviewed-by: Bjorn Andersson Signed-off-by: Neil Armstrong --- drivers/crypto/qcom-rng.c | 65 ++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 58 insertions(+), 7 deletions(-) diff --git a/drivers/crypto/qcom-rng.c b/drivers/crypto/qcom-rng.c index 825a729f205e..8b506abb934c 100644 --- a/drivers/crypto/qcom-rng.c +++ b/drivers/crypto/qcom-rng.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -28,17 +29,25 @@ #define WORD_SZ 4 +#define QCOM_TRNG_QUALITY 1024 + struct qcom_rng { struct mutex lock; void __iomem *base; struct clk *clk; - unsigned int skip_init; + struct hwrng hwrng; + struct qcom_rng_of_data *of_data; }; struct qcom_rng_ctx { struct qcom_rng *rng; }; +struct qcom_rng_of_data { + bool skip_init; + bool hwrng_support; +}; + static struct qcom_rng *qcom_rng_dev; static int qcom_rng_read(struct qcom_rng *rng, u8 *data, unsigned int max) @@ -66,11 +75,11 @@ static int qcom_rng_read(struct qcom_rng *rng, u8 *data, unsigned int max) } else { /* copy only remaining bytes */ memcpy(data, &val, max - currsize); - break; + currsize = max; } } while (currsize < max); - return 0; + return currsize; } static int qcom_rng_generate(struct crypto_rng *tfm, @@ -92,6 +101,9 @@ static int qcom_rng_generate(struct crypto_rng *tfm, mutex_unlock(&rng->lock); clk_disable_unprepare(rng->clk); + if (ret >= 0) + ret = 0; + return ret; } @@ -101,6 +113,13 @@ static int qcom_rng_seed(struct crypto_rng *tfm, const u8 *seed, return 0; } +static int qcom_hwrng_read(struct hwrng *hwrng, void *data, size_t max, bool wait) +{ + struct qcom_rng *qrng = container_of(hwrng, struct qcom_rng, hwrng); + + return qcom_rng_read(qrng, data, max); +} + static int qcom_rng_enable(struct qcom_rng *rng) { u32 val; @@ -136,7 +155,7 @@ static int qcom_rng_init(struct crypto_tfm *tfm) ctx->rng = qcom_rng_dev; - if (!ctx->rng->skip_init) + if (!ctx->rng->of_data->skip_init) return qcom_rng_enable(ctx->rng); return 0; @@ -177,15 +196,31 @@ static int qcom_rng_probe(struct platform_device *pdev) if (IS_ERR(rng->clk)) return PTR_ERR(rng->clk); - rng->skip_init = (unsigned long)device_get_match_data(&pdev->dev); + rng->of_data = (struct qcom_rng_of_data *)of_device_get_match_data(&pdev->dev); qcom_rng_dev = rng; ret = crypto_register_rng(&qcom_rng_alg); if (ret) { dev_err(&pdev->dev, "Register crypto rng failed: %d\n", ret); qcom_rng_dev = NULL; + return ret; + } + + if (rng->of_data->hwrng_support) { + rng->hwrng.name = "qcom_hwrng"; + rng->hwrng.read = qcom_hwrng_read; + rng->hwrng.quality = QCOM_TRNG_QUALITY; + ret = devm_hwrng_register(&pdev->dev, &rng->hwrng); + if (ret) { + dev_err(&pdev->dev, "Register hwrng failed: %d\n", ret); + qcom_rng_dev = NULL; + goto fail; + } } + return ret; +fail: + crypto_unregister_rng(&qcom_rng_alg); return ret; } @@ -198,6 +233,21 @@ static int qcom_rng_remove(struct platform_device *pdev) return 0; } +struct qcom_rng_of_data qcom_prng_of_data = { + .skip_init = false, + .hwrng_support = false, +}; + +struct qcom_rng_of_data qcom_prng_ee_of_data = { + .skip_init = true, + .hwrng_support = false, +}; + +struct qcom_rng_of_data qcom_trng_of_data = { + .skip_init = true, + .hwrng_support = true, +}; + static const struct acpi_device_id __maybe_unused qcom_rng_acpi_match[] = { { .id = "QCOM8160", .driver_data = 1 }, {} @@ -205,8 +255,9 @@ static const struct acpi_device_id __maybe_unused qcom_rng_acpi_match[] = { MODULE_DEVICE_TABLE(acpi, qcom_rng_acpi_match); static const struct of_device_id __maybe_unused qcom_rng_of_match[] = { - { .compatible = "qcom,prng", .data = (void *)0}, - { .compatible = "qcom,prng-ee", .data = (void *)1}, + { .compatible = "qcom,prng", .data = &qcom_prng_of_data }, + { .compatible = "qcom,prng-ee", .data = &qcom_prng_ee_of_data }, + { .compatible = "qcom,trng", .data = &qcom_trng_of_data }, {} }; MODULE_DEVICE_TABLE(of, qcom_rng_of_match); From patchwork Tue Oct 3 07:10:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 728907 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8CAC1E7542F for ; Tue, 3 Oct 2023 07:10:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239333AbjJCHK7 (ORCPT ); Tue, 3 Oct 2023 03:10:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230323AbjJCHKg (ORCPT ); Tue, 3 Oct 2023 03:10:36 -0400 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0127FE1 for ; Tue, 3 Oct 2023 00:10:32 -0700 (PDT) Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-4054f790190so5688705e9.2 for ; Tue, 03 Oct 2023 00:10:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696317031; x=1696921831; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=cLb8XoK4xSjjsLEStZVUx0dslR054K9qkL2umFuXmJI=; b=iAw2ZftUVWWv+93fWKZW8nrbN+MiECIIfXdA6iAmLbuQtiae6Uc8cYgvMOZFZLtPrD X/dGqFiNCKylqs1/p+DCxLZceNy+jOkjxr27ctBxfK7ywJt0zrwQNohBePZ9Djl3Bx8i N0+V3Rw60AN0rJjMHhoS89wvX8fGu2R/+FaD7fhvqOOF2NPktuzajp7t0tgAJ76zenn5 pxCp80SWDa0JDpgh1b04tn85vg25tdUI6IemY1YBNxuHrBySPcmJ8fYBOUlQkGlkyJ5h +3hOjOftltvcz76RYlpiKs/NegypEYiNti8pvacWOIGZ0VGbALPpVqDHzew0Bpdn1D/E pe/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696317031; x=1696921831; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cLb8XoK4xSjjsLEStZVUx0dslR054K9qkL2umFuXmJI=; b=nQ7KSQxTLH6+g1rp9EbbOJ29b+z3iU8wd7co3d3LVuyPhcHdsYzdRjiZAyAHH27NkH q7TSc2sT2DksVDwFyi/t+6wVqQr0rEiBYfhPMjDDK8/ovStdnVG5IIRYzgtv+tuIfVPw x0/9hl5MDneqbGYJfpAsC+9IGmu+13yS39Huh+SMvsI2jq+Nk9iI6cSW0SIvkqCbeEla uIMFztXwMeUuSC4cKe5hHTH94RMOrbBUhHIQmLnTaf4Tj/Qkh+pjQaXfCYh8sZA92qdo 9SVlajjfe9XyPjWIuZTl6R7ZbavJRey89JSoWhkdIUgV1mrECE/ebgY19rmcRKj3qteN dETQ== X-Gm-Message-State: AOJu0Yysk1QZkrMZFmcWkluVw0B8fO+HwmLizW3imgdaQH1wIJABqCYI F/oo0UEWa4lYfbVXH63DsC1BnO5f8TlmWY2ehaUHWju7 X-Google-Smtp-Source: AGHT+IHurqPmTOvQyywenR4me6Rb+i5W+aB4YiRsbt4CxttjX51aKVEL8lhtgZye9Gb5Lx1RvbgloA== X-Received: by 2002:a05:600c:1c1a:b0:406:53c0:3c71 with SMTP id j26-20020a05600c1c1a00b0040653c03c71mr11351278wms.37.1696317031207; Tue, 03 Oct 2023 00:10:31 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:8261:5fff:fe11:bdda]) by smtp.gmail.com with ESMTPSA id k2-20020a05600c1c8200b004065d72ab19sm8746652wms.0.2023.10.03.00.10.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 00:10:30 -0700 (PDT) From: Neil Armstrong Date: Tue, 03 Oct 2023 09:10:22 +0200 Subject: [PATCH v4 4/5] arm64: dts: qcom: sm8550: add TRNG node MIME-Version: 1.0 Message-Id: <20231003-topic-sm8550-rng-v4-4-255e4d0ba08e@linaro.org> References: <20231003-topic-sm8550-rng-v4-0-255e4d0ba08e@linaro.org> In-Reply-To: <20231003-topic-sm8550-rng-v4-0-255e4d0ba08e@linaro.org> To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Herbert Xu , "David S. Miller" , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vinod Koul Cc: linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Neil Armstrong X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=811; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=EgwvrFMRksPbvZchOPqxaCjQZivk90KnsC77FZnwMJk=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBlG75gZ7bQ7XpHOKc3PJogc7Mtyyex96/6Kl3S8QgK 2Sy2qTaJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZRu+YAAKCRB33NvayMhJ0R9GD/ 4p+8ciexogAPDkS7uTlwEf9YXZ2vrLOwUzBBEtos6jxzNxEckv2opMRaLR6vh4Ayr2b6PsUiZo4hcS 8ONS5EYJFiFZN6sRiAoVRqTBELM6iEPgn3xA73aTPa2Cwg9jv2nQW72dDiCpzkqPDspf5SrZ9spIuJ VuVgOeUnV+TqFhMbVnwkp5W/I1BfOIn0gkSIcPw4Rl/1cFVfCnL1K54h6EiwOTeoowCckEzgpMVgvO j5J9NhtSrHWUFICxefvm93rSA46g/c+IeOsabCpY2Txdo4eTGZQ+++3/tgtGDVhIsHJEuwBN/byRkt +4DzzRoK475lOYA4NMx1F/Tg3Jvs4fOw/QkG+LTqGC/iUIZx5AXkb2DzOrkQx2s3w6CdZK8b0VIDBn 4aHTHqs4yEJj2ahjzq6ZyN/J7q96RTld7MZDmMBj/J5qod1OhYJ0gDEk5xJiDlXtMaSbjB4b2Urk+b fbk6erm12zjOsZmx6sh0KxyARAJoipOoRXnLCntnevg+Mj/+bl6pSWhHMVgwlA4IgLgydlGZoib4+9 SJLE4rh9K7Ods4Z/dL5smpUuGb7PzF0NQ6kK1rbe92ahVb5ps9NFCkhPqh/sTDYC+9iJ/+siqX+WL6 CRn8fgVnZSackQLVmogdlfI88VocHjqueuvt7eGTuxnEAecWDOImoPReKvaw== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add the Qualcomm True Random Number Generator node. Reviewed-by: Konrad Dybcio Signed-off-by: Neil Armstrong --- arch/arm64/boot/dts/qcom/sm8550.dtsi | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8550.dtsi b/arch/arm64/boot/dts/qcom/sm8550.dtsi index 7b9ddde0b2c9..7bafb3d88d69 100644 --- a/arch/arm64/boot/dts/qcom/sm8550.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8550.dtsi @@ -1677,6 +1677,11 @@ mmss_noc: interconnect@1780000 { qcom,bcm-voters = <&apps_bcm_voter>; }; + rng: rng@10c3000 { + compatible = "qcom,sm8550-trng", "qcom,trng"; + reg = <0 0x010c3000 0 0x1000>; + }; + pcie0: pci@1c00000 { device_type = "pci"; compatible = "qcom,pcie-sm8550"; From patchwork Tue Oct 3 07:10:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 730514 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5709CE7542D for ; Tue, 3 Oct 2023 07:11:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239362AbjJCHLF (ORCPT ); Tue, 3 Oct 2023 03:11:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239187AbjJCHKi (ORCPT ); Tue, 3 Oct 2023 03:10:38 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C21EA4 for ; Tue, 3 Oct 2023 00:10:34 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-50435a9f800so633644e87.2 for ; Tue, 03 Oct 2023 00:10:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696317032; x=1696921832; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=dFSd4fSB4DzPMdE39OUqbklHCe7VB7SI126p8m3GbCs=; b=UTkUM5o6CxHj8sm0k+oYOYnLdkHtwVGVpMcn+abKxbmaK5DiENML4FKFcIWzqCV4S4 rIqh99963a/0gkew3peZNx9hCRUfLLVDenFXDQddIJDmZdkMG/O6T1AEUvHhjptfYrzF iS915G+v8c39VKhXWeR9I/RdxUR49HNKAGuYCt45LI+Cn5Uh7ZoZ8VDSQHuUaBp5mHDc mLzCSSErOqn3XG37kSdJwyXU6k3iwkdrbD73RMDyknacHrSMLg4/Z/B1qG0Y7dQtlmZF rD7gzyxtmp+uyq96fsQSR9JRNA1fqjHBSm8Q+cNkx1k/xPCwDQIuQVRecSQcFyc8OPsW TMuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696317032; x=1696921832; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dFSd4fSB4DzPMdE39OUqbklHCe7VB7SI126p8m3GbCs=; b=l53jXQubY2m7d1cP9F5Wi4pvIpxSpuGHt99MUebbqNYknYpN+l0993rhRkMa59DVUc 2pLnqC4cTMZCAdB8Cnvi6HHLTBK2SzF3MQ7c9VyZNbIVoiT2+UIiC1Qtv9Z808yugoAJ 9MGRKnxraLNTFe1inQs9JMOsROZJBNGDupsAoN4gjN1KdID7Siwc7G+i/+O6pL4wLJr7 8+Ao1R2xdTEIbnMOynrM9awIxP7uXL4Uc4oDp53/KBKHwH2eFVrQDzxlqdBrZzKldiCX H7mJAcBylMVLqWEEWzYWzr9bd2L6zOYsUQaDqejyuEbhy1dDiIz9mCzd+BKGTfI9mg7A DlYg== X-Gm-Message-State: AOJu0YzjiP4u7ntTBnND5mcJe4Zvx3apwbGxJaBxUq59SDlALm5m4nX+ I+vQ8/mUlLSNvS8Jx2jaDw0YMw== X-Google-Smtp-Source: AGHT+IHArH/IjYooLEDj4lVd7xFtDtmqV3QPFk/s89/iJNy+nBeFn/Ipd5FQHYlE9WpZeYEL/p9lZw== X-Received: by 2002:a05:6512:3137:b0:4fb:889c:c53d with SMTP id p23-20020a056512313700b004fb889cc53dmr10381624lfd.10.1696317032279; Tue, 03 Oct 2023 00:10:32 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:8261:5fff:fe11:bdda]) by smtp.gmail.com with ESMTPSA id k2-20020a05600c1c8200b004065d72ab19sm8746652wms.0.2023.10.03.00.10.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 00:10:31 -0700 (PDT) From: Neil Armstrong Date: Tue, 03 Oct 2023 09:10:23 +0200 Subject: [PATCH v4 5/5] arm64: dts: qcom: sm8450: add TRNG node MIME-Version: 1.0 Message-Id: <20231003-topic-sm8550-rng-v4-5-255e4d0ba08e@linaro.org> References: <20231003-topic-sm8550-rng-v4-0-255e4d0ba08e@linaro.org> In-Reply-To: <20231003-topic-sm8550-rng-v4-0-255e4d0ba08e@linaro.org> To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Herbert Xu , "David S. Miller" , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vinod Koul Cc: linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Neil Armstrong X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=826; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=Hm1MPLKUH9tBWMMNXkinW+xDa10cw2ZXd53LQwFFR9I=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBlG75hsFIRN6yFE7mxKY45ckp6XvVNthN2ptfbZHI5 4iKfr7KJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZRu+YQAKCRB33NvayMhJ0QWDD/ 9QrGGccCEgDyyppdwR4TS4pJdlMQNZRHKb8vK9uQcqHYGmPSDQK4j2MsfKiqeCTeXL4lxDNCxcTvE6 XjQ4wEI+9pyuH/CBEmP8EhF3ZGhgdhc3vdQoYYFI/JTH9Hm/moe9tzG4WpTag7hYUzFk5b7bLnuyqI IcGOhcYpKZj4uGYlgm/xu7P47NF0Yg1AYocEscgRVKW/Pcw/AgRbUPw9mxx6ak3eqPfwQD7YJNyo/R VBuT4TVvgKQvwwgN9Z8qnoaXdzq5uj48x5Z6W7TBpFiSEJwYooGMH6OOmyH3h74pNPMaH5DSwe+o+p ZfKyPFzNBtrjSQmHnawuy2GT83Wft7iEtenO3xpZpEvnQLcoJehTqLPkUDja75N5Pl5C7DfKm4nmPo legR/tmbwI9gv3YqE3UE9TlfEP9zZN4n+Qc57j/fGp3aLXvDU+FaPYrG4FSUOCYjTzYlese+ihyQL+ 8X4BZMtOFdyi/4S5Wi75+A6xbuGlLFleJUTDMLvjyokuJijq8Uf11ULUAavtKyY2jKMDs9PGIAR6E5 sf9RdOJZvECdTaBLsHmBawefi04pS3qb+LNuwZnl5Vp95O7KlcCtrvST95DW51JMslpY08XkvOaYfV WZLQ2Pcf3QY2HCK/DIMTav/OGmB4JJgqSqJXmgpMJyQtXtGi5YbgislKYCBw== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The SM8450 SoC has a True Random Number Generator, add the node with the correct compatible set. Reviewed-by: Konrad Dybcio Signed-off-by: Neil Armstrong --- arch/arm64/boot/dts/qcom/sm8450.dtsi | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi index 1783fa78bdbc..bde9c1093384 100644 --- a/arch/arm64/boot/dts/qcom/sm8450.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi @@ -1739,6 +1739,11 @@ spi14: spi@a98000 { }; }; + rng: rng@10c3000 { + compatible = "qcom,sm8450-trng", "qcom,trng"; + reg = <0 0x010c3000 0 0x1000>; + }; + pcie0: pci@1c00000 { compatible = "qcom,pcie-sm8450-pcie0"; reg = <0 0x01c00000 0 0x3000>,