From mboxrd@z Thu Jan 1 00:00:00 1970 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 1A09AC54E94 for ; Wed, 25 Jan 2023 20:24:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=RrlzcqkbkFeSscD+mjnp+sJBLxqSIyYp2fNQyDo/Ink=; b=osCJVzJDyvI0pB e7qjMBuR8uvY3jftLUrQvB3kJDIsHlSrjlhO3f5hywId4ehKLF896SAGkcsCyl9CLDDcPJWjRc8uL 5bY/x82QcDs3oiJoyIFkm8xXXBy1Ah3VHPDRhFHZ9kGBu8k22nWovOJ/ppTrRqkVETnGskiSGPnJg LIG44IkYAHGt4T6sUeo0nr6M9TPLluZ9q5xcyW+9Qv7HJXUs9edm9e8VS4FAhsW8JVw2EE8IF9ksd abX3QT6aVHSdb30hWdT9KRWArjcDUft6cWdN0L24i34L1PQhEmpQTjTDJHwx06C/Uy9d37yuP7vOM ZDA60tyoJna7WIOyJSeQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKmJ7-008ghV-Fw; Wed, 25 Jan 2023 20:23:45 +0000 Received: from mail-oo1-f43.google.com ([209.85.161.43]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKmHk-008g21-Jo for linux-arm-kernel@lists.infradead.org; Wed, 25 Jan 2023 20:22:22 +0000 Received: by mail-oo1-f43.google.com with SMTP id b10-20020a4a9fca000000b004e6f734c6b4so3339111oom.9 for ; Wed, 25 Jan 2023 12:22:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to: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=3QV5aYju94H6dkD3L7A3nPcZMzwhL2uI6SZmpxqkGgo=; b=SF6eSSQ7bJx1FPq+c+BhUqyAcCTRcKbuBQlWulzsH4Vl+VjPXCnqSmFuDlSMyDDpUv yDycTLIZZzgqVgqWz40Zcx+m4Mq7xurbPxYXFRgLxPPhhLToUPCbhOScKlodV40ziUYc 58Rfc3BWfmJ4PbnLJfuT07W73SkZLDzkUMkxmzFsrkHZ3ES99etiWdfIQMoMTBrOn7WR TFMvr4Tcw9AtWzySC0xBxpyS6HtolK8ZIUXY+AIGuetB0yPHVh19Ml2QERg0Xb4aVwOQ Vx/iA1UyaD8KuQsSbAv+yGi4VRL8hFPLh27EmtqYtTFyUEZN4KXjC4TuUCTRnrn69nYJ HSgQ== X-Gm-Message-State: AFqh2koK5Rk/7x3rhKIoCsANgnstKU7uItXhWIKjd8FH3pBghWX/9hkn 0jQXUwFHvezyInDkb15fqg== X-Google-Smtp-Source: AMrXdXv14UQ8CWf0xNn+17CDaLJFAafwyepDkS+ifEDVW5JhBsWhaBfEZyAJnJopDhDR6AXvEOmb2Q== X-Received: by 2002:a4a:498d:0:b0:4f2:6b72:6f75 with SMTP id z135-20020a4a498d000000b004f26b726f75mr15582770ooa.7.1674678136672; Wed, 25 Jan 2023 12:22:16 -0800 (PST) Received: from robh_at_kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id r141-20020a4a3793000000b0050dc3c2f77asm2201809oor.8.2023.01.25.12.22.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Jan 2023 12:22:16 -0800 (PST) Received: (nullmailer pid 2846936 invoked by uid 1000); Wed, 25 Jan 2023 20:22:15 -0000 Date: Wed, 25 Jan 2023 14:22:15 -0600 From: Rob Herring To: Etienne Carriere , Sudeep Holla Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Jens Wiklander , Krzysztof Kozlowski , Marc Zyngier , Sumit Garg , Pascal Paillet Subject: Re: [PATCH v2 1/3] dt-bindings: arm: optee: add interrupt controller properties Message-ID: <20230125202215.GA2811928-robh@kernel.org> References: <20230124105643.1737250-1-etienne.carriere@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230124105643.1737250-1-etienne.carriere@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230125_122220_707875_98EE31E2 X-CRM114-Status: GOOD ( 25.19 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org +Sudeep On Tue, Jan 24, 2023 at 11:56:41AM +0100, Etienne Carriere wrote: > Adds an optional interrupt controller property to optee firmware node > in the DT bindings. Optee driver may embeds an irqchip exposing > interrupts notified by the TEE world. Optee registers up to 1 interrupt > controller and identifies each line with a line number from 0 to > UINT16_MAX. > > In the example, the platform SCMI device uses optee interrupt irq 5 > as async signal to trigger processing of an async incoming SCMI message, > in the scope of a CPU DVFS control. A platform can have several SCMI > channels driven this way. Optee irqs also permits small embedded devices > to share e.g. a gpio expander, a group of wakeup sources, etc... between > OP-TEE world (for sensitive services) and Linux world (for non-sensitive > services). The physical controller is driven from the TEE which exposes > some controls to Linux kernel. > > Cc: Jens Wiklander > Cc: Krzysztof Kozlowski > Cc: Marc Zyngier > Cc: Rob Herring > Cc: Sumit Garg > > Co-developed-by: Pascal Paillet > Signed-off-by: Pascal Paillet > Signed-off-by: Etienne Carriere > --- > Changes since v1: > - Added a description to #interrupt-cells property. > - Changed of example. Linux wakeup event was subject to discussion and > i don't know much about input events in Linux. So move to SCMI. > In the example, an SCMI server in OP-TEE world raises optee irq 5 > so that Linux scmi optee channel &scmi_cpu_dvfs pushed in the incoming > SCMI message in the scmi device for liekly later processing in threaded > context. The example includes all parties: optee, scmi, sram, gic. > - Obviously rephrased the commit message. > - Added Cc: tags > --- > .../arm/firmware/linaro,optee-tz.yaml | 67 +++++++++++++++++++ > 1 file changed, 67 insertions(+) > > diff --git a/Documentation/devicetree/bindings/arm/firmware/linaro,optee-tz.yaml b/Documentation/devicetree/bindings/arm/firmware/linaro,optee-tz.yaml > index d4dc0749f9fd..9c00c27f8b2c 100644 > --- a/Documentation/devicetree/bindings/arm/firmware/linaro,optee-tz.yaml > +++ b/Documentation/devicetree/bindings/arm/firmware/linaro,optee-tz.yaml > @@ -40,6 +40,14 @@ properties: > HVC #0, register assignments > register assignments are specified in drivers/tee/optee/optee_smc.h > > + interrupt-controller: true > + > + "#interrupt-cells": > + const: 1 > + description: | > + OP-TEE exposes irq for irp chip controllers from OP-TEE world. Each > + irq is assigned a single line number identifier used as first argument. > + > required: > - compatible > - method > @@ -64,3 +72,62 @@ examples: > method = "hvc"; > }; > }; > + > + - | > + #include > + firmware { > + optee: optee { > + compatible = "linaro,optee-tz"; > + method = "smc"; > + interrupts = ; > + interrupt-controller; > + #interrupt-cells = <1>; > + }; > + > + scmi { > + compatible = "linaro,scmi-optee"; > + linaro,optee-channel-id = <0>; > + interrupt-parent = <&gic>; > + #address-cells = <1>; > + #size-cells = <0>; > + > + scmi_cpu_dvfs: protocol@13 { > + reg = <0x13>; > + linaro,optee-channel-id = <1>; > + shmem = <&scmi_shm_tx>, <&scmi_shm_rx>; > + interrupts-extended = <&optee 5>; > + interrupt-names = "a2p"; These properties aren't documented. Soon there will be a warning[1]. > + #clock-cells = <1>; > + }; > + }; > + }; > + > + gic: interrupt-controller@a0021000 { > + compatible = "arm,cortex-a7-gic"; > + reg = <0xa0021000 0x1000>, <0xa0022000 0x2000>; > + interrupt-controller; > + #interrupt-cells = <3>; > + }; > + > + soc { > + #address-cells = <1>; > + #size-cells = <1>; > + > + sram@2ffff000 { > + compatible = "mmio-sram"; > + reg = <0x2ffff000 0x1000>; > + #address-cells = <1>; > + #size-cells = <1>; > + ranges = <0 0x2ffff000 0x1000>; > + > + scmi_shm_tx: scmi-sram@0 { > + compatible = "arm,scmi-shmem"; > + reg = <0 0x80>; > + }; > + > + scmi_shm_rx: scmi-sram@100 { > + compatible = "arm,scmi-shmem"; > + reg = <0x100 0x80>; > + }; There's no need to show providers in examples (unless the example is for the provider). Rob _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel