Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1723028rwb; Thu, 29 Sep 2022 01:01:45 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5mvuV6/o/6LWfmouH9WYhTQYQBprpLomAqCPXOVUK5J4WyaUyHvNU5PQfsK/1fGIVmCF35 X-Received: by 2002:a05:6402:34cc:b0:451:62bf:c816 with SMTP id w12-20020a05640234cc00b0045162bfc816mr2019793edc.213.1664438505331; Thu, 29 Sep 2022 01:01:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664438505; cv=none; d=google.com; s=arc-20160816; b=Q870+yFgIg0M3V5q13Z5gDELVxhvZtc5mwUB8FeAMiRNRet+gA/slW8XJSxCyXijJY ug+utR2lZRtrGHtyg3iaAUBfUaqEzzH8Obq0i7qrhYcrhPiN6F8QeWityL+xBeKofwIK tL6jKi6bnQzR7016FL9w5/sGv/LEJHdYXjJXUT36JS8ccSqrPqS/ipUwbkEjflKpQOF9 kDIhZJWkJz4hW7ueo8Mnz3C6CuKFh+GPnljrb/t3LM2dqbQI37/0vBs4bX/nUXw1yvdt F/7sN0JvEwl8SRa78m1M+k31Df57fKHazalmiDCLVHhufo9JyECbgvQ8J9bOhfo4Ui7T skVA== 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:to :from:date:dkim-signature; bh=guoNLlLK+w+Celq4Xs8AUibS5WLsjCvsO7YfOGTaInU=; b=SEp2deVTJcuX6SH0yrHLnbSs2QiV1Dj5AHgJeul6hztzLIXtc/u47zgs3HScCcwhQf pOkl0BL4ItWLEuBrSlP4C7vy0BUFhwcbgv8KWzrIEMgcbIixL7hnbLEKLiEmoJAOfGBj vZCxCQb1CJzYAkSnOgHrYG2NetMO32x4oLdaRp4CI4EdxeZEKmhqHxE02IX+sjPawOXq vyP8In+YsMyGyRtoO7Oz9iYi4DHlBCZc3jkoPb738bmdfgNtTb8lz6Aj33NlEJS2Wr0N hauLm9Y5WvSnPVD1QZp22OvYPbOAg28DqUwk9gF10Qoz941Pe6VhzTxJpLcFBiH5JwDD ENfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=Y+rRU8KW; 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 f19-20020a056402355300b00456eaa4fb1fsi8554037edd.223.2022.09.29.01.01.09; Thu, 29 Sep 2022 01:01:45 -0700 (PDT) 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=Y+rRU8KW; 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 S235196AbiI2HpT (ORCPT + 99 others); Thu, 29 Sep 2022 03:45:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235104AbiI2HpS (ORCPT ); Thu, 29 Sep 2022 03:45:18 -0400 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D68835AC53 for ; Thu, 29 Sep 2022 00:45:12 -0700 (PDT) Received: by mail-wr1-x42c.google.com with SMTP id l18so792583wrw.9 for ; Thu, 29 Sep 2022 00:45:12 -0700 (PDT) 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:to:from:date:from:to:cc :subject:date; bh=guoNLlLK+w+Celq4Xs8AUibS5WLsjCvsO7YfOGTaInU=; b=Y+rRU8KWKGamxRVQBlnjssoWflVvUel0TRkBu/ixzRRosKwL3tpkpFu/tlbtGSjABT Ap8uEGQIMjaUagsF8Whox/TJN4SPhvMGNQlxdGypGLna4zs4kOMpDsZPHTWCk8Ix2+bK 6g5UtGpVGAI3sIVza2zjDBqv13XtBGAx9DYqLeELHEtKdw/HQw8Uw9ZXQVK9vFPgCosH +4SnNVsqVpnqlrziBgsIB/rkUUXD60nEztCGRwP6SKxMFlFfLnapzGl4bnCddTxBgR7Z 5+OlEMxcfMwAyLjltlJZBBP6niz/+jniu25Sj46SteH/K5O0FVvsz5fdjHdFxO5bHTar 9S3Q== 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:to:from:date :x-gm-message-state:from:to:cc:subject:date; bh=guoNLlLK+w+Celq4Xs8AUibS5WLsjCvsO7YfOGTaInU=; b=uyqzILzM8nrahsmdixHb08727gMaHNld9VlYitB05BDnTNlBDPCuwCznpf5Xkhkg/W gtH5332mcVnMqaxDQFjxOSp+wbT8bv+tqwBey39Ne1tuu9swoC4zgrLF+Ja1qxlUVwR+ 5Bl3DeLAzGf0/mIRT2dFdY9KE6l7t51xhzY7njuj89/CRwaLIZD0PVqSV5ZUsmLaw3+7 GAkuyn/GN28fliJAtFgzlbZof8e9H6HRTzAMxhrhJi3XreDzqYvZSe1y8L55iphwUN65 M/tumS00efw8RqBvj9DvtwsLvB7G6hVWG2mSIeCTwrfLo8kGU10hWRjZcTuI0gjU/uSr K5xw== X-Gm-Message-State: ACrzQf38DNonmjwwrNOS9X5NRh/oCPFXjdUmQ9k4m9P+7A1hJ+wkKMg6 UDT4pyKpFh+SU/Upi2N4XrDJog== X-Received: by 2002:adf:f342:0:b0:22c:c3ea:c6da with SMTP id e2-20020adff342000000b0022cc3eac6damr1151741wrp.567.1664437511407; Thu, 29 Sep 2022 00:45:11 -0700 (PDT) Received: from Red ([2a01:cb1d:3d5:a100:264b:feff:fe03:2806]) by smtp.googlemail.com with ESMTPSA id w1-20020a5d5441000000b0022cc0a2cbecsm5625633wrv.15.2022.09.29.00.45.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Sep 2022 00:45:11 -0700 (PDT) Date: Thu, 29 Sep 2022 09:45:09 +0200 From: LABBE Corentin To: Robin Murphy , "Jason A. Donenfeld" , linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, Herbert Xu , Lin Jinhan , wevsty , Mikhail Rudenko , 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> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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=unavailable 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 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.