Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1892057lqe; Tue, 9 Apr 2024 03:49:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUooHMadXEU/ppg/i21kF2wyxH1q5UPYlQi53keSQHb0+ZhvBUT8k+TTUCJ1p5XGuUrWgfJ+YKNn6dm2XgeuGKVGmN1xg3aosZu0hT6eA== X-Google-Smtp-Source: AGHT+IHub72ZUPCxRNW6EJhmgoMhqCBf0Vi5nMX3ORsmWr0MwD3bX5/NHUlHTm538iUV1B5N69pa X-Received: by 2002:a17:906:7f0a:b0:a51:9f5c:c731 with SMTP id d10-20020a1709067f0a00b00a519f5cc731mr8804360ejr.76.1712659793539; Tue, 09 Apr 2024 03:49:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712659793; cv=pass; d=google.com; s=arc-20160816; b=OpyjnsBN5qZFyqEKd/3/mp8EowxGpEX+cCOGXOeytc9NUDTbxrW1VSLCrBC2Vh6eRl fmOEeFB8hgogbki4h1G3aeiTHvF1IyXZg69ondfogByVbBHUZejINdYYU7CmPwG1uteF xUB0GbuqdaGQKu0jkYoE8HaSImF8qVRk52YExNzP81ST7jtC/iqdwupg4MMdEZWKaq+E EbBKJgeA9NjCBq2+2h3hGp8ymdHo0TbmKbqg6Lt9Pu8exsuwoBfiES4vL4bTfA8saVLR ltEjg4vpsoIzV55GkJPRs4d0MEWEvWCdbjsJ5N2XnzzHD55n3wOnZZzQPTD+A9RNfHth K6iQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=qb2wqghkyDyVVjXxQrtrveUC/kM5okvGzepkmoBvYB8=; fh=HSq/OUM0V6RvFNR3wHNon8yYnDkXonPX10xRbiBCAqI=; b=UrqA4+D2T1YZ2swICsfzOgjRrqEaw9s02PUSuQ3ZXBVlEuvqcK36pGTfpt37oGzdkN CJBW9mmVWrkGE4zlbTt1Imq2YgeDeKyAndq8qZd2GPEAo6YJ8QqqPD7zwYTXh6ap1F9y 7Qs46ZZVD0SrrULeyQZDQO5c+mc0AmIvyhas98HBWyZFRcxYh4GxqwxE1ipLyekrapLw lDGHb6mBDdshSkJDrFjC7V1hsmBYszhR8gerb4lnPAByE3UVKm3Zs5PcdmbJd3hUmAiz c1myIzxK8Z5Flt2FHy/f6WKj+VtLwqyUrOm5pYg5Fgg6Hy8KYYjYoBOlgzifUkqJinsV 1Ncg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-136702-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136702-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id ho40-20020a1709070ea800b00a4e05f6a457si4906434ejc.935.2024.04.09.03.49.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 03:49:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-136702-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-136702-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136702-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 44E791F24A70 for ; Tue, 9 Apr 2024 10:49:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3BCC383A08; Tue, 9 Apr 2024 10:49:47 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AB96E80603; Tue, 9 Apr 2024 10:49:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712659786; cv=none; b=F1VbmZ755IkcPjtwyLz3LI5l7iaPkDNdYR7RsvNveGZ4LRg6hFS0v2V7yZ64qVdfWlGkYOKT8cPDu/glp2RdSUlVapMciHigM0RN/Y/RR619NFgE0iP9YXHvfOsdSE6FfgLCzS91u5ww7SbjvtRiSIot4EXN/oDDb6h6Z2MQp6M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712659786; c=relaxed/simple; bh=XXednxn3A2ELXwpsSYuPnlymvAJgKHfR1r+rrAGVfBI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=NxxFQ/kPxwEBUnXr3lzvjiTRSxGsuJDVUZoW1vzKJ0jvxnVDfwYnX+e3uXir5ndvy9jlFBnbSTN3JQG/CLxcEkLGISOMJZpWPkoRByWd0tlviSwYrs9RP8Tf8wSsQAzmZh+Epzvvf6wLlGK1VM0/Ppwv4dE8Q9rps6yzbDC/hyM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A07B01007; Tue, 9 Apr 2024 03:50:14 -0700 (PDT) Received: from bogus (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 486E73F766; Tue, 9 Apr 2024 03:49:42 -0700 (PDT) Date: Tue, 9 Apr 2024 11:49:39 +0100 From: Sudeep Holla To: Peng Fan Cc: "Peng Fan (OSS)" , Cristian Marussi , Sudeep Holla , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , "devicetree@vger.kernel.org" , "imx@lists.linux.dev" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v2 3/6] firmware: arm_scmi: add initial support for i.MX BBM protocol Message-ID: References: <20240405-imx95-bbm-misc-v2-v2-0-9fc9186856c2@nxp.com> <20240405-imx95-bbm-misc-v2-v2-3-9fc9186856c2@nxp.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, Apr 09, 2024 at 09:13:33AM +0000, Peng Fan wrote: > Hi Sudeep, > > > Subject: Re: [PATCH v2 3/6] firmware: arm_scmi: add initial support for i.MX > > BBM protocol > > > > On Mon, Apr 08, 2024 at 07:04:43PM +0100, Cristian Marussi wrote: > > > On Fri, Apr 05, 2024 at 08:39:25PM +0800, Peng Fan (OSS) wrote: > > > > From: Peng Fan > > > > > > > > The i.MX BBM protocol is for managing i.MX BBM module which provides > > > > RTC and BUTTON feature. > > > > > > > > > > I appreciate that you added versioning but I think a bit of > > > documentation about what the protocol and its comamnds purpose is > > > still lacking, as asked by Sudeep previously > > > > > > > > > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore > > > .kernel.org%2Flinux-arm- > > kernel%2FZeGtoJ7ztSe8Kg8R%40bogus%2F%23t&data= > > > > > 05%7C02%7Cpeng.fan%40nxp.com%7Ce92ff78b9126447afe9708dc587358d > > 4%7C686e > > > > > a1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C638482499632395762%7C > > Unknown%7C > > > > > TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiL > > CJXVC > > > > > I6Mn0%3D%7C0%7C%7C%7C&sdata=7QP%2BkkjHA3Sa0CdcbbObGG4kgYYK > > XAGA2r%2F%2F > > > x0MogqU%3D&reserved=0 > > > > > > > I have decided to ignore all these vendor protocol patches until they have > > some documentation to understand what these protocol are for, what are the > > commands, their input/output parameter details, any conditions are the > > caller and callee,..etc very similar to SCMI spec. > > Where do you expect the documentation to be put? > To begin with, we need all these vendor protocols in a directory say vendors/nxp under drivers/firmware/arm_scmi. It can be a simple text file under that. We can see later if we need any more formal version elsewhere but that shouldn't be a blocker for these changes. > similar as scmi_protocol.h, put in scmi_imx_protcol.h? > > > > To start with can you please expand what is BBM or MISC protocol is ? > > ok. Sorry for missing your previous comment in v1. Let me write here briefly > first. > Thanks > The Battery Backup (BB) Domain contains the Battery Backed Security > Module (BBSM) and the Battery Backed Non-Secure Module (BBNSM). > BBM protocol is to manage i.MX BBSM and BBNSM. This protocol supports > #define COMMAND_PROTOCOL_VERSION 0x0U > #define COMMAND_PROTOCOL_ATTRIBUTES 0x1U > #define COMMAND_PROTOCOL_MESSAGE_ATTRIBUTES 0x2U > #define COMMAND_BBM_GPR_SET 0x3U > #define COMMAND_BBM_GPR_GET 0x4U > #define COMMAND_BBM_RTC_ATTRIBUTES 0x5U > #define COMMAND_BBM_RTC_TIME_SET 0x6U > #define COMMAND_BBM_RTC_TIME_GET 0x7U > #define COMMAND_BBM_RTC_ALARM_SET 0x8U > #define COMMAND_BBM_BUTTON_GET 0x9U > #define COMMAND_BBM_RTC_NOTIFY 0xAU > #define COMMAND_BBM_BUTTON_NOTIFY 0xBU > #define COMMAND_NEGOTIATE_PROTOCOL_VERSION 0x10U > Hopefully description of each of these commands cover what GPR above means really. > For now in this patchset for linux, we only use RTC, and BUTTON > for system wakeup > > For MISC protocol, it is for various misc things, such as discover > build info, get rom passed data, get reset reason, get i.mx > cfg name, control set(for gpio expander under m33 control and > etc). The command as below: > #define COMMAND_PROTOCOL_VERSION 0x0U > #define COMMAND_PROTOCOL_ATTRIBUTES 0x1U > #define COMMAND_PROTOCOL_MESSAGE_ATTRIBUTES 0x2U > #define COMMAND_MISC_CONTROL_SET 0x3U > #define COMMAND_MISC_CONTROL_GET 0x4U > #define COMMAND_MISC_CONTROL_ACTION 0x5U > #define COMMAND_MISC_DISCOVER_BUILD_INFO 0x6U > #define COMMAND_MISC_ROM_PASSOVER_GET 0x7U > #define COMMAND_MISC_CONTROL_NOTIFY 0x8U > #define COMMAND_MISC_REASON_ATTRIBUTES 0x9U > #define COMMAND_MISC_RESET_REASON 0xAU > #define COMMAND_MISC_SI_INFO 0xBU > #define COMMAND_MISC_CFG_INFO 0xCU > #define COMMAND_MISC_SYSLOG 0xDU > #define COMMAND_NEGOTIATE_PROTOCOL_VERSION 0x10U > And same here. Just as an example what BUILD_INFO ? There will be 10s if not 100s of different image in the system. What does this BUILD_INFO provide ? And why is this important over version or release info ? These are simple pointers, expect more questions like this if the document is not self sufficient in explaining such details. -- Regards, Sudeep