Message ID | 20221031213237.52275-2-j-choudhary@ti.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2565821wru; Mon, 31 Oct 2022 14:50:06 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4TdEgBUOmLZ9J9b7nNZLev+dCVUQCDZop74kj0Z1CckfU7h2X9dYZqz30oX93ELCd8WaXe X-Received: by 2002:a17:906:8470:b0:7ad:aeda:f47d with SMTP id hx16-20020a170906847000b007adaedaf47dmr13978087ejc.139.1667253006216; Mon, 31 Oct 2022 14:50:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667253006; cv=none; d=google.com; s=arc-20160816; b=INtVaNHptyXUXL4pyDyyg1eQempKqMXSbtyYZ4s0WaS3oZluNhPdEpl+YCSyy5pxR5 KnEqPj275JyA5CBt6gH0sjj+43FD7FNjN/cG9+6RibkV9jEjiU8N3/26nS8dTgQuQ17f d42f1aFz90/OEXknaU5xB037S6i+/qYkYLi/4img7btqq2C8mJSDgqyzY9X+sHmvH5Fs yqazVIOuSqbmuyKKR1FYUXIt2w9XikiRJ5gRICYVzoJ6fZabF5NKOMl4P3713aXLPbS/ GcTRNZVP3Wlx3RTb1/AoUvIK5esCGxJfSA1LNl+71gucT27g+gIVfvpLwxIaTrGwkNQn 9VLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=XcF3dAxSZFAjAytriDncuruEtbokNnyeNZFNaMKF6L0=; b=N2To7rklyf2hq8CBZEZHDGVOwVnpZNk/ymVhY66k/zdIn5UDp9NlnbWNOdk/AfNRNQ SyOMvv3E1PRqAOsEDFLHz3ZWYyeyKkhnf1dMR8Ut+20wTAreNDGzzwNKK7/klCgAz8Ux 6mdwhmHl5ZRG7pz+UFyLCxRCXcYN0Ic4EHJDk4dtVR4LC92zk39og08ai1Aip/FbgdtQ KCUtPCEW7EX2d1WnVePq5WeGYPBWsP8c8RICmLVolmRAUyAjUp75m3ZhyQYY5XqrbwR2 lh5ggBksQp9H98Kx4+8JxomwCPx9VEPpUsd2554x07357/mT8yobJzLKpMpb11H1C9cD FYrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=KRSbQxz9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fd13-20020a056402388d00b00460e1cc2d76si8603262edb.72.2022.10.31.14.49.41; Mon, 31 Oct 2022 14:50:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@ti.com header.s=ti-com-17Q1 header.b=KRSbQxz9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229851AbiJaVcx (ORCPT <rfc822;kartikey406@gmail.com> + 99 others); Mon, 31 Oct 2022 17:32:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229477AbiJaVcv (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 31 Oct 2022 17:32:51 -0400 Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B74A11A34; Mon, 31 Oct 2022 14:32:50 -0700 (PDT) Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 29VLWgbM071182; Mon, 31 Oct 2022 16:32:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1667251962; bh=XcF3dAxSZFAjAytriDncuruEtbokNnyeNZFNaMKF6L0=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=KRSbQxz93DWLpoDBwX5kP5f6dGerSNuSvl1ENKpuFkO1tWSDcqGn33odiyOVnKkBa fSudIANN99rxa9ZpOS6fKiP6LNt/RmR7oYLsAyV+YkspgBdhd/WFdH4a/qEpbLuZUs Nhyp5fnxJo9gYxZZUnzX/y0eYNpGtGeq+j+/lWnM= Received: from DFLE105.ent.ti.com (dfle105.ent.ti.com [10.64.6.26]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 29VLWgNv092326 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 31 Oct 2022 16:32:42 -0500 Received: from DFLE111.ent.ti.com (10.64.6.32) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.6; Mon, 31 Oct 2022 16:32:42 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE111.ent.ti.com (10.64.6.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.6 via Frontend Transport; Mon, 31 Oct 2022 16:32:42 -0500 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 29VLWfdG007184; Mon, 31 Oct 2022 16:32:41 -0500 From: Jayesh Choudhary <j-choudhary@ti.com> To: <nm@ti.com>, <vigneshr@ti.com> CC: <kristo@kernel.org>, <robh+dt@kernel.org>, <afd@ti.com>, <j-keerthy@ti.com>, <krzysztof.kozlowski+dt@linaro.org>, <s-anna@ti.com>, <linux-arm-kernel@lists.infradead.org>, <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <j-choudhary@ti.com> Subject: [PATCH 1/3] arm64: dts: ti: k3-am65-main: drop RNG clock Date: Tue, 1 Nov 2022 03:02:35 +0530 Message-ID: <20221031213237.52275-2-j-choudhary@ti.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221031213237.52275-1-j-choudhary@ti.com> References: <20221031213237.52275-1-j-choudhary@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748241488330184572?= X-GMAIL-MSGID: =?utf-8?q?1748241488330184572?= |
Series |
RNG clock property cleanup
|
|
Commit Message
Jayesh Choudhary
Oct. 31, 2022, 9:32 p.m. UTC
Drop RNG clock property as it is not controlled by rng-driver.
Fixes: b366b2409c97 ("arm64: dts: ti: k3-am6: Add crypto accelarator node")
Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
---
arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 1 -
1 file changed, 1 deletion(-)
Comments
On 03:02-20221101, Jayesh Choudhary wrote: > Drop RNG clock property as it is not controlled by rng-driver. Does'nt tell me what is the alternative? why is the hardware description not sufficient for control? https://software-dl.ti.com/tisci/esd/latest/5_soc_doc/am65x_sr2/clocks.html#clocks-for-sa2-ul0-device Looks like a perfectly valid description - do we have a bug and firmware does'nt allow control here? > > Fixes: b366b2409c97 ("arm64: dts: ti: k3-am6: Add crypto accelarator node") > Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com> > --- > arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi > index 4005a73cfea9..e166d7b7e3a1 100644 > --- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi > +++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi > @@ -126,7 +126,6 @@ rng: rng@4e10000 { > compatible = "inside-secure,safexcel-eip76"; > reg = <0x0 0x4e10000 0x0 0x7d>; > interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>; > - clocks = <&k3_clks 136 1>; Does this mean that the crypto module's power-domains property should be dropped as well? > status = "disabled"; /* Used by OP-TEE */ > }; > }; > -- > 2.25.1 >
On 11/2/22 10:17 AM, Nishanth Menon wrote: > On 03:02-20221101, Jayesh Choudhary wrote: >> Drop RNG clock property as it is not controlled by rng-driver. > > Does'nt tell me what is the alternative? why is the hardware description > not sufficient for control? > > https://software-dl.ti.com/tisci/esd/latest/5_soc_doc/am65x_sr2/clocks.html#clocks-for-sa2-ul0-device > Looks like a perfectly valid description - do we have a bug and firmware > does'nt allow control here? > We have three input clocks feeding the SA2UL module, x1, x2, pka. PKA goes to the PKA sub-module (isn't it nice when they make things simple). But x1 and x2 are miscellaneous and bus clocks respectively and route to several sub-modules. All we drop here is the clock handle in the RNG sub-module, as that sub-module is not the owner of that clock (the parent SA2UL is). The alternative we could implement is to move the clock node up to the parent SA2UL node. >> >> Fixes: b366b2409c97 ("arm64: dts: ti: k3-am6: Add crypto accelarator node") >> Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com> >> --- >> arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 1 - >> 1 file changed, 1 deletion(-) >> >> diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi >> index 4005a73cfea9..e166d7b7e3a1 100644 >> --- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi >> +++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi >> @@ -126,7 +126,6 @@ rng: rng@4e10000 { >> compatible = "inside-secure,safexcel-eip76"; >> reg = <0x0 0x4e10000 0x0 0x7d>; >> interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>; >> - clocks = <&k3_clks 136 1>; > > Does this mean that the crypto module's power-domains property should be > dropped as well? > Why? the power-domains property is in the correct spot (up in the parent node). Now it is true we cant actually shut the SA2UL down since it is owned by the security processor, but since it is marked TI_SCI_PD_SHARED this should be fine. Andrew >> status = "disabled"; /* Used by OP-TEE */ >> }; >> }; >> -- >> 2.25.1 >> >
On 12:04-20221102, Andrew Davis wrote: > On 11/2/22 10:17 AM, Nishanth Menon wrote: > > On 03:02-20221101, Jayesh Choudhary wrote: > > > Drop RNG clock property as it is not controlled by rng-driver. > > > > Does'nt tell me what is the alternative? why is the hardware description > > not sufficient for control? > > > > https://software-dl.ti.com/tisci/esd/latest/5_soc_doc/am65x_sr2/clocks.html#clocks-for-sa2-ul0-device > > Looks like a perfectly valid description - do we have a bug and firmware > > does'nt allow control here? > > > > We have three input clocks feeding the SA2UL module, x1, x2, pka. PKA goes > to the PKA sub-module (isn't it nice when they make things simple). But x1 and > x2 are miscellaneous and bus clocks respectively and route to several sub-modules. > > All we drop here is the clock handle in the RNG sub-module, as that sub-module is > not the owner of that clock (the parent SA2UL is). The alternative we could implement > is to move the clock node up to the parent SA2UL node. > > > > > > > Fixes: b366b2409c97 ("arm64: dts: ti: k3-am6: Add crypto accelarator node") > > > Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com> > > > --- > > > arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 1 - > > > 1 file changed, 1 deletion(-) > > > > > > diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi > > > index 4005a73cfea9..e166d7b7e3a1 100644 > > > --- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi > > > +++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi > > > @@ -126,7 +126,6 @@ rng: rng@4e10000 { > > > compatible = "inside-secure,safexcel-eip76"; > > > reg = <0x0 0x4e10000 0x0 0x7d>; > > > interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>; > > > - clocks = <&k3_clks 136 1>; > > > > Does this mean that the crypto module's power-domains property should be > > dropped as well? > > > > Why? the power-domains property is in the correct spot (up in the parent node). > > Now it is true we cant actually shut the SA2UL down since it is owned > by the security processor, but since it is marked TI_SCI_PD_SHARED this > should be fine. The idea of the descriptions were to describe what is controllable by firmware, if there is no control due to the specified reason, it is a device tree bug, and should be documented when dropping it. If it serves a purpose in the firmware by indicating usage for example - it has valid reason to stick around as it is expected to be used by firmware for some specific reason. The commit description does bring up the above mentioned questions and must be explained appropriately.
On 03/11/22 01:14, Nishanth Menon wrote: > On 12:04-20221102, Andrew Davis wrote: >> On 11/2/22 10:17 AM, Nishanth Menon wrote: >>> On 03:02-20221101, Jayesh Choudhary wrote: >>>> Drop RNG clock property as it is not controlled by rng-driver. >>> >>> Does'nt tell me what is the alternative? why is the hardware description >>> not sufficient for control? >>> >>> https://software-dl.ti.com/tisci/esd/latest/5_soc_doc/am65x_sr2/clocks.html#clocks-for-sa2-ul0-device >>> Looks like a perfectly valid description - do we have a bug and firmware >>> does'nt allow control here? >>> >> >> We have three input clocks feeding the SA2UL module, x1, x2, pka. PKA goes >> to the PKA sub-module (isn't it nice when they make things simple). But x1 and >> x2 are miscellaneous and bus clocks respectively and route to several sub-modules. >> >> All we drop here is the clock handle in the RNG sub-module, as that sub-module is >> not the owner of that clock (the parent SA2UL is). The alternative we could implement >> is to move the clock node up to the parent SA2UL node. >> >>>> >>>> Fixes: b366b2409c97 ("arm64: dts: ti: k3-am6: Add crypto accelarator node") >>>> Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com> >>>> --- >>>> arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 1 - >>>> 1 file changed, 1 deletion(-) >>>> >>>> diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi >>>> index 4005a73cfea9..e166d7b7e3a1 100644 >>>> --- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi >>>> +++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi >>>> @@ -126,7 +126,6 @@ rng: rng@4e10000 { >>>> compatible = "inside-secure,safexcel-eip76"; >>>> reg = <0x0 0x4e10000 0x0 0x7d>; >>>> interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>; >>>> - clocks = <&k3_clks 136 1>; >>> >>> Does this mean that the crypto module's power-domains property should be >>> dropped as well? >>> >> >> Why? the power-domains property is in the correct spot (up in the parent node). >> >> Now it is true we cant actually shut the SA2UL down since it is owned >> by the security processor, but since it is marked TI_SCI_PD_SHARED this >> should be fine. > > The idea of the descriptions were to describe what is controllable by > firmware, if there is no control due to the specified reason, it is a > device tree bug, and should be documented when dropping it. If it serves > a purpose in the firmware by indicating usage for example - it has valid > reason to stick around as it is expected to be used by firmware for some > specific reason. The x1-clk to sa2ul is always running and fixed. What we can do is gate off the clock specific to trng module (x1-clk) by using TRNG_EN MMR to disable TRNG. Hence, uncontrollable. > > The commit description does bring up the above mentioned questions and > must be explained appropriately. > Okay, I will update the description properly in v2 for dropping this clock and for each patch (and not just in the cover-letter).
diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi index 4005a73cfea9..e166d7b7e3a1 100644 --- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi @@ -126,7 +126,6 @@ rng: rng@4e10000 { compatible = "inside-secure,safexcel-eip76"; reg = <0x0 0x4e10000 0x0 0x7d>; interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&k3_clks 136 1>; status = "disabled"; /* Used by OP-TEE */ }; };