Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5824728rwb; Tue, 22 Nov 2022 05:31:20 -0800 (PST) X-Google-Smtp-Source: AA0mqf7oQ7sf3r0j3nC8RmzyVMnPm6/Sg8pzU7XuofB0/wTVLLUU4EZ/gyEQFzF2CL7aPnpLeo9r X-Received: by 2002:a17:90a:dc13:b0:212:c87e:dc8b with SMTP id i19-20020a17090adc1300b00212c87edc8bmr25806739pjv.229.1669123880617; Tue, 22 Nov 2022 05:31:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669123880; cv=none; d=google.com; s=arc-20160816; b=YXgcwnXtt0upC2sJZI5k+DbsgfzdABCHiEDlmuw7oFTp5U/WHuQfWsDb2RWP66Gc19 AOzGvJlnMmsJEl7WKzYNoHF9AIoqOG8jFNTiUGf62ot92AjtvIGY/NOcHLukHcKLXmCh 3vwASjzeU4buPvxdXOyEg+NBdg2SKiH+0Fb8RgnsYCRBqaGkq3OT6f1VH09MGhpSQ3PS YSx/NtIGjd59gFdrEB3SeJoXAs0SaOayN83JgxYKpbS5YABcgsKssnJZsfVGqadt6jaE w4Ft8DBjSjRaqbuGPEKQSadPtTQWd1hakHIbFX790BeuWi0zK+2Sbs+oXkk/sCJBcSpR iedA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=wEZwlBsaNUHpzzIaIKYU5AHosPkhDJnwQiQeyEIzxao=; b=r35UlweLRQ6avxi9V97l2EtKSTTgXmru9wU53kS7f0yb68/3GgVrsGV8EsWkXzrVdd h06QPktUv18qKtMY0y6IGDEyvgBOMyrEwfHgIWDKlybZMhXqJxnXqwvVjTVZGVJ71cp/ 2QUSvVu3hx1r5Suem6sgSgrjrJ2qM7O5wCKnrAXX9uE7mq6nvh/+2ienpKqiiZCyAO2z BZMKMPHo44zqsNwfISp4QraQaIxbh4VJN6tL2svIYui3UW51+ieyFwCVAE09423jFi9Y d+43ijRp7qGakry1EI4uCUY4L5hEclUZkgtDSX/ZOXmhjgGcFhCHRTW3Fgmr0QwWyajf N1XQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=hR4YQdlV; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mq15-20020a17090b380f00b00212d06b4743si19816429pjb.34.2022.11.22.05.31.05; Tue, 22 Nov 2022 05:31:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=hR4YQdlV; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233428AbiKVN3Q (ORCPT + 99 others); Tue, 22 Nov 2022 08:29:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233251AbiKVN3L (ORCPT ); Tue, 22 Nov 2022 08:29:11 -0500 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6EA9E64A3A for ; Tue, 22 Nov 2022 05:29:09 -0800 (PST) Received: by mail-wr1-x42d.google.com with SMTP id n3so8154125wrp.5 for ; Tue, 22 Nov 2022 05:29:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=wEZwlBsaNUHpzzIaIKYU5AHosPkhDJnwQiQeyEIzxao=; b=hR4YQdlV1EkXRHumuFyTMUphoGnSOoi+kBYKhoZwncrNATTRb4Aq+D8dU84gikCAjg NJH5I3o17DN36Fu5o0sd5qptScMWUHOddYlLHDb4o3o9tnkrBSxmC8N7hMJRdogxkQ5C NtzV5tAPHOweNoXQbGVy2H49TkRp5XyA/jXXP1y4gmbC3BMzkUBtqkPj9DLPoBDdUuq/ tqgPfK1483mmQEIe6eJUmW6XeJ/OlQCgcFO3Sd8361s1aNDohJL+x1lrI/rivrqWawxj 0bOjWe9JX0T06VXEqDzilosZb0nr9FUQgQ49TzmVGRRO7XwDBJm/1wBnwobvB496NVYp 877Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wEZwlBsaNUHpzzIaIKYU5AHosPkhDJnwQiQeyEIzxao=; b=5dhjpHsmVaPHqgJY70GmvAqRgNcZEjBAoj7F3QU5mMugsvxE/q4TgnSUXaJ2kKMVjA mhNVfBZMghao/wHyy7lJeRGVYg/LsuwpHc17p0pF2Z8hh2ie9z0QJKYMwvahJgNjoJLF 5rrC024f1fuHJftp8A6EtJn7n0EMm8hUwbquL1tItN0xE20c61QwNMQ6/H1w7pp6+rE8 16pNCOs49A0Lhn+1S95LPmE/IbBYEITrlm6uCWRfLSSlWPPxJYrILnkpJqMIP9OBY4p+ CgxlQBWn+rktNj16kMgfXlJuz1A/DkND1WvXToLgu0QmUuTFfB2eYXdTINDvAdQbyvOE zOcw== X-Gm-Message-State: ANoB5pmgKoDdUeqUeCECuhAU6W7rv3pr7doD7Gf7otFK19GmlnB4/QJF cTzc14J9RTpd2xQjGucK0zhWbw== X-Received: by 2002:adf:f50d:0:b0:23a:cdf5:3676 with SMTP id q13-20020adff50d000000b0023acdf53676mr15105069wro.336.1669123748006; Tue, 22 Nov 2022 05:29:08 -0800 (PST) Received: from Red ([2a01:cb1d:3d5:a100:4a02:2aff:fe07:1efc]) by smtp.googlemail.com with ESMTPSA id o2-20020a05600c510200b003cf5ec79bf9sm19435110wms.40.2022.11.22.05.29.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Nov 2022 05:29:07 -0800 (PST) Date: Tue, 22 Nov 2022 14:29:03 +0100 From: Corentin LABBE To: Mikhail Rudenko Cc: Robin Murphy , "Jason A. Donenfeld" , linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, Herbert Xu , Lin Jinhan , wevsty , Heiko Stuebner , Lin Huang , Shawn Lin , linux-rockchip@lists.infradead.org Subject: Re: [PATCH] hw_random: rockchip: import driver from vendor tree Message-ID: References: <20220919210025.2376254-1-Jason@zx2c4.com> <32f8797a-4b65-69df-ee8e-7891a6b4f1af@arm.com> <87y1sasrf2.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87y1sasrf2.fsf@gmail.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Le Wed, Nov 16, 2022 at 09:04:07PM +0300, Mikhail Rudenko a ?crit : > > On 2022-09-29 at 09:45 +02, LABBE Corentin wrote: > > Le Tue, Sep 27, 2022 at 11:39:17PM +0200, Aurelien Jarno a ?crit : > >> On 2022-09-27 21:46, LABBE Corentin wrote: > >> > Le Tue, Sep 27, 2022 at 06:37:53PM +0200, Aurelien Jarno a ?crit : > >> > > On 2022-09-20 10:35, Robin Murphy wrote: > >> > > > On 2022-09-19 22:00, Jason A. Donenfeld wrote: > >> > > > > The Rockchip driver has long existed out of tree, but not upstream. > >> > > > > There is support for it upstream in u-boot, but not in Linux proper. > >> > > > > This commit imports the GPLv2 driver written by Lin Jinhan, together > >> > > > > with the DTS and config blobs from Wevsty. > >> > > > > >> > > > Note that Corentin has a series enabling the full crypto driver for > >> > > > RK3328 and RK3399[1], so it would seem more sensible to add TRNG support > >> > > > to that. Having confliciting compatibles for the same hardware that > >> > > > force the user to change their DT to choose one functionality or the > >> > > > other isn't good (plus there's also no binding for this one). > >> > > > >> > > It might make sense for the cryptov1-rng driver (I haven't checked). For > >> > > the cryptov2-rng driver, I looked at the RK3568 TRM (I can't find the > >> > > RK3588 one), and from what I understand crypto and TRNG are two > >> > > different devices, using different address spaces, clock, reset and > >> > > interrupts. The vendor kernel uses two different drivers. > >> > > > >> > > >> > I confirm that TRNG is not on the same IP on rk3568, something I didnt remark when doing my V2 driver. (I need to remove rng clock from rk3568 dt). > >> > But the rk3588 crypto IP and the TRNG are in the same device. > >> > >> Ok, thanks for confirming about the rk3568. It seems the only one in the > >> family with separate devices for TRNG and crypto. Does it means we need > >> a separate TRNG driver only for it? Or could we handle it the same way > >> than for instance rk3588 anyway? > > > > I just got now the part 1 of rk3588 TRM which I has missing and it show some conflicting information. > > rk3588 seems to have both a dedicated TRNG (TRNG_NS/TRNG_S) with dedicated address space and a TRNG inside the crypto IP. > > But for the moment, the TRNG inside crypto IP seems defective. > > So what's the ultimate decision? Does anyone work on merging this into > the existing crypto driver? I have a use case with an rk3399-based board, > where having hardware rng enhances boot times dramatically (at least for > some userspaces; see also [1]). > > [1] https://bugzilla.kernel.org/show_bug.cgi?id=216502 > Hello I started to work on adding RNG to rk3288_crypto. I need to publish the work on my github and take time to send it for review. Regards