Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp841445lqj; Mon, 3 Jun 2024 02:26:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWjzSZsQbxtobzvfuFfUr2vAgmPCGEvB+i1+7btM4F9aYo1j4fAT5XjUhFWz9teNhEBy8dzr/jyGdGcqfCwBGkJx1qqdVrM1dq6+MvlRQ== X-Google-Smtp-Source: AGHT+IG2S0WyEw91+Sd7zAsJfr8lWuUQq3zyphJrYgCtPonjS5dXrWMHWJza+YBKkSBb5Z7AfxSB X-Received: by 2002:a05:6808:1506:b0:3c9:686f:8d8b with SMTP id 5614622812f47-3d1e349cb6cmr11554683b6e.24.1717406766143; Mon, 03 Jun 2024 02:26:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717406766; cv=pass; d=google.com; s=arc-20160816; b=yHtKvNJL/N7Glx+q0QpjhCjgLhTJkoZc2QFMDpaatrq5yMnC1mcqlSgdfj9if9XoiT 2Xi7ynM+Hqrc2brs21lI2xnx1iBt1ZvSAevxOqSxujkUpt0xHWDGHmbfkfSL+PKN48/l oN6dY4MdJliSeQToBoQ9rRSc/W8yqMKOeUPoIwjxNHmdimvWHvg5miWsbaxa3BpEn2Zd nnQdHRBKDy1AoOvNAarH8aJVKzP0w9ws0yDAV6nvVI5fmJWwL+OofosCZZECSU8rVm+S 9dknGMYX4RmOMBbxGddgmB/XCYnL7P56fbrANTs2OHF7WI74p0gJnv8uTrP/xq2Hvmg4 TCAw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=mHZqFaN5bKSTWMNSSR+7cQHbzwfkO0znNAJUpVvLcOw=; fh=KeP3GYEIOkZjA/VaBKfx84Y6U7mkJ8zwQnWSqZhIA0w=; b=eimOp/DuIlB0KhzwVKduZjJAzr2Fhbed+uKLZUzqs/TjduyZWktL+27VETvlBJr/2G wdKTOW3kM3iJ8TYHcpBdtYrvVFKnWl9moWr8xv+y71BmtloWxTxMNVMIPiaNyDHbh7T6 W/dgXoqsFztUvjrRllkxQjga9nl5rRkwo2F5TOppDl8jeqbCXeIlUd/bh/hYIJJehjWn Gow71AzOFYQSoOyusjP4PqulDfMdzV8MKvnnN53aby1May/PHyN/HhQhL1NbSfkq4L46 k9P5ToVEERdbnrGyW2JbcAa+cmoVfayZqrXHIg9KXz7zfXLXwR4ar/l/UPOekne7ubfA vPEQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=epSDWs5n; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-198859-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198859-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 41be03b00d2f7-6c3542e3b93si6481075a12.144.2024.06.03.02.26.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 02:26:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-198859-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=epSDWs5n; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-198859-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198859-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 855C3B24392 for ; Mon, 3 Jun 2024 09:20:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 58FE2763E7; Mon, 3 Jun 2024 09:20:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="epSDWs5n" Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4FB4E77F32 for ; Mon, 3 Jun 2024 09:20:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717406413; cv=none; b=En1RVQYkTsj/H7JCRRv7+H0IWxkHQ2CjZYAfYxvO8rcbiTL1t2zB/iifQ6upM939NDmfnhbusaB3LCAu+CyHQc6oM8bSM07sy1yxxAtcSByXzRLd9kZlahpQSjUMj3wzH67AcrMMrvnjBmJM306RmPiIK2WPCO8y6MHqfPJRr2g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717406413; c=relaxed/simple; bh=Ha8VBm8OFXpm7Pbma5iEOhMzm/NDJlVK2JhSWKzDmto=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ioWio2xh3sJLnuK/n1rnwbPT3zAzsTRcNmI7VzL+SBQUs81Y1yzsDuytAuYYQ/3OQ2iA1H/Col41vkD3g646g/JCjYJm1WKEXFyl9Hq+g6RT7P5N4XapQO/dyA492/ehsaVCUKRHyGMaj78Qj9ASAEUynR5dWmEsWZvz/DiaIrQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=epSDWs5n; arc=none smtp.client-ip=209.85.218.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ej1-f52.google.com with SMTP id a640c23a62f3a-a63359aaaa6so531714766b.2 for ; Mon, 03 Jun 2024 02:20:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717406409; x=1718011209; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=mHZqFaN5bKSTWMNSSR+7cQHbzwfkO0znNAJUpVvLcOw=; b=epSDWs5n2U8RsCgdBngeAy7Ibn5gI+tUyUGCIsCuYewx6MURM/ZPfCCjneJdbbQo6c 8TGdSttNU/E/WnE8dai9m0kajegh8w4CAOPn59y+V/FvaFhBuBGr7boX7JkL/e/lzGbo vFOy7VsiRiTGSLp8BfTP8/D1I4pzsn4wgKPX8pLxeUeKBFFdAwsX/DyHjp3YBstrOJ6h dvL57HA2DMoa9ZZzTDUMsI5vsdDX1QhtMNEL0xE307hXN3dAW+cft7ebu3npYxfa47yQ r7iQqznYVdywJf/wEeWeRNRkG4E4R1cD74SRdwBHtcTV+kfnRMlKsz/7BgazNc5fSGJa YsOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717406409; x=1718011209; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=mHZqFaN5bKSTWMNSSR+7cQHbzwfkO0znNAJUpVvLcOw=; b=OPSxLMXSqJv8j77/7ZuW9NJMHYtkheVB8Vi0Ra5BTpIbRtJ+V7bbgimManzVhtVDSz 89h3vP7cFLThrkvqG/j6P2hDTIEehXf15LT9nbYeWIzx6Tkj/tWllRu9/FOFpQBofNsD iaG0UTMxU73a/VJBZlSTsdwRD9GVm8xBm3NzFMrwy0YZDlT3ZOy4g1/0Y73BxGPOxZA8 q5qdFgvC0X9V2wNbUXlH1DG8vEb5xMDlxfejkianDP99k38WtOY4hAWGcuK4SzY6v9oI ZgKl1HwOy32bcyeihXRe2u+r+2dDJq5kTKPNFYGTRL/Cb8IjM52Lo9bMzsB0mzSQGAyg cDsw== X-Forwarded-Encrypted: i=1; AJvYcCVXZskuJcmMxzMjPPef7lJZNU7Lk314NaRg7DSqJEwjgSvHF2fgPKi1EKEaQMRW5U+QK/bchF2qVU9L7IZtOE+jYLbmiLwii1y8jmsK X-Gm-Message-State: AOJu0YyLAWB7khIm2/S4+KSgKEGx8WsJu+sTz1hAyxSReWOt1YRxJZuX bBBzpUwmfSoI7YYLY9zX5CUI9azr+ALRo4w2ygl2aUlPm3BRPOneb+3WAN6TLAo= X-Received: by 2002:a17:906:f6cd:b0:a68:5b93:594e with SMTP id a640c23a62f3a-a685b935b09mr442343266b.39.1717406409346; Mon, 03 Jun 2024 02:20:09 -0700 (PDT) Received: from ?IPV6:2a02:8109:aa0d:be00::8090? ([2a02:8109:aa0d:be00::8090]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a68e2d1333fsm253066666b.219.2024.06.03.02.20.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 03 Jun 2024 02:20:08 -0700 (PDT) Message-ID: Date: Mon, 3 Jun 2024 11:20:07 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v9 2/4] arm64: dts: qcom: qcs8550: introduce qcs8550 dtsi To: Tengfei Fan , andersson@kernel.org, konrad.dybcio@linaro.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, dmitry.baryshkov@linaro.org Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@quicinc.com References: <20240529100926.3166325-1-quic_tengfan@quicinc.com> <20240529100926.3166325-3-quic_tengfan@quicinc.com> Content-Language: en-US From: Caleb Connolly In-Reply-To: <20240529100926.3166325-3-quic_tengfan@quicinc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Tengfei, On 29/05/2024 12:09, Tengfei Fan wrote: > QCS8550 is derived from SM8550. The difference between SM8550 and > QCS8550 is QCS8550 doesn't have modem RF system. QCS8550 is mainly used > in IoT products. > QCS8550 firmware has different memory map compared to SM8550. > The memory map will be runtime added through bootloader. > There are 3 types of reserved memory regions here: > 1. Firmware related regions which aren't shared with kernel. > The device tree source in kernel doesn't need to have node to indicate > the firmware related reserved information. Bootloader converys the > information by updating devicetree at runtime. > This will be described as: UEFI saves the physical address of the > UEFI System Table to dts file's chosen node. Kernel read this table and > add reserved memory regions to efi config table. Current reserved memory > region may have reserved region which was not yet used, release note of > the firmware have such kind of information. Are you describing some particular quirk of the platform here, or just standard UEFI booting? When booting with UEFI, the memory map is passed via the ESRT, so having memory that the kernel shouldn't use it pretty simple (and typical). > 2. Firmware related memory regions which are shared with Kernel > The device tree source in the kernel needs to include nodes that > indicate fimware-related shared information. A label name is suggested > because this type of shared information needs to be referenced by > specific drivers for handling purposes. Again, is there something non-standard here? If not I would suggest dropping these detail comments as they might be misleading. Thanks and regards, > 3. Remoteproc regions. > Remoteproc regions will be reserved and then assigned to subsystem > firmware later. > Here is a reserved memory map for this platform: > 0x100000000 +-------------------+ > | | > | Firmware Related | > | | > 0xd4d00000 +-------------------+ > | | > | Kernel Available | > | | > 0xa7000000 +-------------------+ > | | > | Remoteproc Region | > | | > 0x8a800000 +-------------------+ > | | > | Firmware Related | > | | > 0x80000000 +-------------------+ > > Reviewed-by: Dmitry Baryshkov > Signed-off-by: Tengfei Fan > --- > arch/arm64/boot/dts/qcom/qcs8550.dtsi | 167 ++++++++++++++++++++++++++ > 1 file changed, 167 insertions(+) > create mode 100644 arch/arm64/boot/dts/qcom/qcs8550.dtsi > > diff --git a/arch/arm64/boot/dts/qcom/qcs8550.dtsi b/arch/arm64/boot/dts/qcom/qcs8550.dtsi > new file mode 100644 > index 000000000000..685668c6ad14 > --- /dev/null > +++ b/arch/arm64/boot/dts/qcom/qcs8550.dtsi > @@ -0,0 +1,167 @@ > +// SPDX-License-Identifier: BSD-3-Clause > +/* > + * Copyright (c) 2023-2024, Qualcomm Innovation Center, Inc. All rights reserved. > + */ > + > +#include "sm8550.dtsi" > + > +/delete-node/ &reserved_memory; > + > +/ { > + reserved_memory: reserved-memory { > + #address-cells = <2>; > + #size-cells = <2>; > + ranges; > + > + > + /* These are 3 types of reserved memory regions here: > + * 1. Firmware related regions which aren't shared with kernel. > + * The device tree source in kernel doesn't need to have node to > + * indicate the firmware related reserved information. Bootloader > + * conveys the information by updating devicetree at runtime. > + * This will be described as: UEFI saves the physical address of > + * the UEFI System Table to dts file's chosen node. Kernel read this > + * table and add reserved memory regions to efi config table. Current > + * reserved memory region may have reserved region which was not yet > + * used, release note of the firmware have such kind of information. > + * 2. Firmware related memory regions which are shared with Kernel > + * The device tree source in the kernel needs to include nodes > + * that indicate fimware-related shared information. A label name > + * is suggested because this type of shared information needs to > + * be referenced by specific drivers for handling purposes. > + * 3. Remoteproc regions. > + * Remoteproc regions will be reserved and then assigned to > + * subsystem firmware later. > + * Here is a reserved memory map for this platform: > + * 0x100000000 +-------------------+ > + * | | > + * | Firmware Related | > + * | | > + * 0xd4d00000 +-------------------+ > + * | | > + * | Kernel Available | > + * | | > + * 0xa7000000 +-------------------+ > + * | | > + * | Remoteproc Region | > + * | | > + * 0x8a800000 +-------------------+ > + * | | > + * | Firmware Related | > + * | | > + * 0x80000000 +-------------------+ > + */ > + > + /* > + * Firmware related regions, bootloader will possible reserve parts of > + * region from 0x80000000..0x8a800000. > + */ > + aop_image_mem: aop-image-region@81c00000 { > + reg = <0x0 0x81c00000 0x0 0x60000>; > + no-map; > + }; > + > + aop_cmd_db_mem: aop-cmd-db-region@81c60000 { > + compatible = "qcom,cmd-db"; > + reg = <0x0 0x81c60000 0x0 0x20000>; > + no-map; > + }; > + > + aop_config_mem: aop-config-region@81c80000 { > + no-map; > + reg = <0x0 0x81c80000 0x0 0x20000>; > + }; > + > + smem_mem: smem-region@81d00000 { > + compatible = "qcom,smem"; > + reg = <0x0 0x81d00000 0x0 0x200000>; > + hwlocks = <&tcsr_mutex 3>; > + no-map; > + }; > + > + adsp_mhi_mem: adsp-mhi-region@81f00000 { > + reg = <0x0 0x81f00000 0x0 0x20000>; > + no-map; > + }; > + > + /* PIL region */ > + mpss_mem: mpss-region@8a800000 { > + reg = <0x0 0x8a800000 0x0 0x10800000>; > + no-map; > + }; > + > + q6_mpss_dtb_mem: q6-mpss-dtb-region@9b000000 { > + reg = <0x0 0x9b000000 0x0 0x80000>; > + no-map; > + }; > + > + ipa_fw_mem: ipa-fw-region@9b080000 { > + reg = <0x0 0x9b080000 0x0 0x10000>; > + no-map; > + }; > + > + ipa_gsi_mem: ipa-gsi-region@9b090000 { > + reg = <0x0 0x9b090000 0x0 0xa000>; > + no-map; > + }; > + > + gpu_micro_code_mem: gpu-micro-code-region@9b09a000 { > + reg = <0x0 0x9b09a000 0x0 0x2000>; > + no-map; > + }; > + > + spss_region_mem: spss-region@9b100000 { > + reg = <0x0 0x9b100000 0x0 0x180000>; > + no-map; > + }; > + > + spu_secure_shared_memory_mem: spu-secure-shared-memory-region@9b280000 { > + reg = <0x0 0x9b280000 0x0 0x80000>; > + no-map; > + }; > + > + camera_mem: camera-region@9b300000 { > + reg = <0x0 0x9b300000 0x0 0x800000>; > + no-map; > + }; > + > + video_mem: video-region@9bb00000 { > + reg = <0x0 0x9bb00000 0x0 0x700000>; > + no-map; > + }; > + > + cvp_mem: cvp-region@9c200000 { > + reg = <0x0 0x9c200000 0x0 0x700000>; > + no-map; > + }; > + > + cdsp_mem: cdsp-region@9c900000 { > + reg = <0x0 0x9c900000 0x0 0x2000000>; > + no-map; > + }; > + > + q6_cdsp_dtb_mem: q6-cdsp-dtb-region@9e900000 { > + reg = <0x0 0x9e900000 0x0 0x80000>; > + no-map; > + }; > + > + q6_adsp_dtb_mem: q6-adsp-dtb-region@9e980000 { > + reg = <0x0 0x9e980000 0x0 0x80000>; > + no-map; > + }; > + > + adspslpi_mem: adspslpi-region@9ea00000 { > + reg = <0x0 0x9ea00000 0x0 0x4080000>; > + no-map; > + }; > + > + /* > + * Firmware related regions, bootloader will possible reserve parts of > + * region from 0xd8000000..0x100000000. > + */ > + mpss_dsm_mem: mpss_dsm_region@d4d00000 { > + reg = <0x0 0xd4d00000 0x0 0x3300000>; > + no-map; > + }; > + }; > +}; -- // Caleb (they/them)