Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp1342479rdb; Sat, 23 Dec 2023 03:15:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IFiSq1mgZ8EgdhDszRjhe+P+4KjWxgoeu9x4s6AFNQWZA7BA9KPIf6khPnnWrOVYky2CjSy X-Received: by 2002:a05:620a:4690:b0:77f:8a87:ebfd with SMTP id bq16-20020a05620a469000b0077f8a87ebfdmr2907274qkb.41.1703330106324; Sat, 23 Dec 2023 03:15:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703330106; cv=none; d=google.com; s=arc-20160816; b=hEyU3D/IT8MFN6FNkEIG2aC/qVpCtLbDjyZaeNlgDzbcEGUfifnkdVrc+oYc78jU+E aJrtvi3SIrMAuo2XQayuBth+cOfZDbqBkW2vHFT4HUW+qqoytYL9EwsKiRGrBileXpOw irxnDw7PC8k44XgThq/YPUeu6Dnyog+wASPf7VVeTCQnfC2eSz3IfBX94Z8yusu2vzQx jlzTfNhDZWqNp6Y9oDlRzAdQh0WA1OcGBe/+7G4s70QkAYJX5pSWw9eTBk4+WsFTQCST 1DlpKv/nWa/ns1ShtSQQAZv5z2e2Db76uV4iteLClOUA9JwmkC2jficbNGuxU/2HU/gI XD3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=UrXH3jWuHs/HH6U7OUE10uuuoLRhgpHq9XyW9Yz3h24=; fh=uSgiDUc31xK5dKWstJ+4Z1XmTH4mMRkefl9D4OEj+rc=; b=XKTsF9F/ga0AuW5E5OyFr8rTpW8pTZ5BEYcvviQKU9Ljb84uGSFe0ApAdFpJ8ZByNS iFm1XoWB4NXaf/zwhI2dvHxazGwveii6NixgCXKux3HyGekzTFlNiAnVItJJNIEchwjO uf9jJzYcvEUFrbeuOsuSjPlSOwRDAWs16pnoxuZQCGaUd2ZG3Oh0Ta7VY3u6FOHNNEaG MBXrMlx+ifkvyYZphJ/k+LDjTf/bKEyeu7wjNobJDxPjfvib4+Rkksm/odUy6k6Q1V/l pBDA/CFwOkRZSeRhOYXGKqhcc/y5OFqFNSgPMonI5muQbMYnthmQ7XRddEh3oF+Sove5 jBlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rock-chips.com header.s=default header.b=BspHYKFM; spf=pass (google.com: domain of linux-kernel+bounces-10388-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10388-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=rock-chips.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id h22-20020ae9ec16000000b0077f10ed7a98si5803133qkg.489.2023.12.23.03.15.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Dec 2023 03:15:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-10388-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@rock-chips.com header.s=default header.b=BspHYKFM; spf=pass (google.com: domain of linux-kernel+bounces-10388-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10388-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=rock-chips.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 040C51C20835 for ; Sat, 23 Dec 2023 11:15:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9505DCA58; Sat, 23 Dec 2023 11:14:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=rock-chips.com header.i=@rock-chips.com header.b="BspHYKFM" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-m6017.netease.com (mail-m6017.netease.com [210.79.60.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 51A0DCA4C; Sat, 23 Dec 2023 11:14:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=rock-chips.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rock-chips.com DKIM-Signature: a=rsa-sha256; b=BspHYKFMaXBputBUpX1ObDvnTFBiitYLacZplp4Pq8etyZvfErVOx47lSjQ+6K/a9lOyD1Hg3amtfuFC6Me6urBC07tlKyuvWaFPe5tCUAnHh+mpBISoGkfEDzo6OOKXvwFEE5gtuD6D0yy8GKCMl+PpqQc1g674AswbI8wGI0I=; s=default; c=relaxed/relaxed; d=rock-chips.com; v=1; bh=UrXH3jWuHs/HH6U7OUE10uuuoLRhgpHq9XyW9Yz3h24=; h=date:mime-version:subject:message-id:from; Received: from [172.16.12.141] (unknown [58.22.7.114]) by mail-m12779.qiye.163.com (Hmail) with ESMTPA id 4D6737801BC; Sat, 23 Dec 2023 19:14:04 +0800 (CST) Message-ID: Date: Sat, 23 Dec 2023 19:14:03 +0800 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 v2 1/3] ARM: dts: rockchip: Add psci for rk3036 Content-Language: en-US To: Alex Bee , Andy Yan , heiko@sntech.de, Kever Yang Cc: krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, zhengxing@rock-chips.com References: <20231218105523.2478315-1-andyshrk@163.com> <20231218105523.2478315-2-andyshrk@163.com> <28216be5-810f-40d6-850b-a0fc590ffa3c@rock-chips.com> <74e497f5-0361-47f7-a410-4b20d3526d52@rock-chips.com> <18c16355-9140-45be-bd16-96fad8b184a4@gmail.com> From: Andy Yan In-Reply-To: <18c16355-9140-45be-bd16-96fad8b184a4@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFDSUNOT01LS0k3V1ktWUFJV1kPCRoVCBIfWUFZQ0NLSVYdTkwZSUlNHhlPT0hVEwETFh oSFyQUDg9ZV1kYEgtZQVlOQ1VJSVVMVUpKT1lXWRYaDxIVHRRZQVlPS0hVSk1PSU5JVUpLS1VKQl kG X-HM-Tid: 0a8c9661daabb24fkuuu4d6737801bc X-HM-MType: 1 X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6NVE6PTo*ETw*Nxw2MCkaGjYC MRRPChBVSlVKTEtISEhLS09OSkxJVTMWGhIXVRoVHwJVAhoVOwkUGBBWGBMSCwhVGBQWRVlXWRIL WUFZTkNVSUlVTFVKSk9ZV1kIAVlBTEhKTzcG Hi Alex, On 12/22/23 23:37, Alex Bee wrote: > Hi Andy, > > Am 22.12.23 um 11:37 schrieb Andy Yan: >> Hi Alex, >> >> On 12/21/23 23:58, Alex Bee wrote: >>> Hi Andy, >>> >>> Am 21.12.23 um 02:07 schrieb Andy Yan: >>>> Hi Alex: >>>> >>>> On 12/20/23 19:16, Alex Bee wrote: >>>>> Hi Andy, >>>>> Am 18.12.23 um 11:55 schrieb Andy Yan: >>>>>> From: Andy Yan >>>>>> >>>>>> The system will hang at bringup secondary CPUs >>>>>> without psci node. >>>>>> >>>>>> Signed-off-by: Andy Yan >>>>>> >>>>>> --- >>>>>> >>>>>> (no changes since v1) >>>>>> >>>>>>   arch/arm/boot/dts/rockchip/rk3036.dtsi | 5 +++++ >>>>>>   1 file changed, 5 insertions(+) >>>>>> >>>>>> diff --git a/arch/arm/boot/dts/rockchip/rk3036.dtsi b/arch/arm/boot/dts/rockchip/rk3036.dtsi >>>>>> index 78686fc72ce6..5344803442a1 100644 >>>>>> --- a/arch/arm/boot/dts/rockchip/rk3036.dtsi >>>>>> +++ b/arch/arm/boot/dts/rockchip/rk3036.dtsi >>>>>> @@ -67,6 +67,11 @@ display-subsystem { >>>>>>           ports = <&vop_out>; >>>>>>       }; >>>>>> +    psci { >>>>>> +        compatible = "arm,psci-1.0"; >>>>>> +        method = "smc"; >>>>>> +    }; >>>>>> + >>>>> I don't think that's an good idea. >>>> >>>> Why? >>> It's only what I've been told before: We shoudn't add properties which >>> depend on non-upstream software (if an upstream alternative exists). Also >> >>> I'm not sure what happens if somebody doesn't use downstream bootloader >>> and PSCI can't be found: Would the board still be able to boot? >> >> The psci is released herel[0]. >> And also, there are only two rk3036 based boards in mainline: >> rk3036-evb,rk3036-keylin, both of them from rockchip. >> And the mainline support of these boards broken from linux 5.7(2020, see PATCH 3), >> no one report this broken until I try to run this board now. >> So maybe there is no such somebody will run into this situation. >> >> >> [0]https://github.com/rockchip-linux/rkbin/tree/master/bin/rk30 >> > Yeah sure, there are binary release for downstream optee implementations, > but the won't work with upstream u-boot, since they are using a calling > convention different from upstream optee os. I tried to add support for > those, but it was rejected [0]. > > Upstream bootflow doesn't implement/need PSCI as it uses a SMP bringup > method which is done in kernel only (see enable-method in cpu section). I > guess that it doesn't work for you is most likely because the downstream > tee os makes the cpu registers the upstream enable-method uses only > accessible in a higher exception level. > > I can undust my RK3036 evb board during christmas holidays and check whats > broken for RK3036 in u-boot. Everything was working fine (including SMP With one day bisect, I finally fond the mainline u-boot support for rk3036 was broken by this commit f113d7d30346 (" Convert CONFIG_SPL_STACK to Kconfig") It makes rk3036 can't set SPL_STACK as rk3036 can't enable SPL_FRAMEWORK(very small sram) I still don't have a proper patch to fix this issue. Thank you very much for you explanation. I think i should not add psci to mainline before the tee binary can be used by mainline u-boot. Nice holidays! > bringup w/o PSCI and upstream u-boot) when I was adding VPU support in 5.14 > [1]. I likely booted from TF-card rather than eMMC. > > [0] https://patchwork.ozlabs.org/project/uboot/patch/20230718145715.1280201-6-knaerzche@gmail.com/ > [1] https://patchwork.kernel.org/project/linux-rockchip/patch/20210527154455.358869-11-knaerzche@gmail.com/ > > Nice holidays! > > Alex > >>>> >>>>> You most likely need that because you have downstream bootloader installed on this board. PSCI implementation takes place in TEE-OS for Rockchips ARM SoCs. There is no support for RK3036 in upstream op-tee OS. It's pretty much the same for RK3128 and RK3288. >>>>> If you use upstream u-boot it should be good as-is. >>>> >>>> Unfortunately, upstream u-boot also cannot boot up on this board. >>>> At present, I haven't had time to debug what is going on. >>>> >>>> Another reason I want to use downstream u-boot it is: I try run >>>> this board with mainline just because i want to test some community >>>> patches about inno-hdmi driver, as you said "the inno-hdmi driver currently gets a lot of attention"[0] >>>> >>> Thanks for helping testing this. >>> >>> Alex >>> >>>> With a downstream u-boot I can easy switch between upstream kernel and downstream kernel(no need to replace other components) >>>> if I found some function is not work as expected. >>>> >>>> >>>> [0]https://patchwork.kernel.org/project/linux-rockchip/cover/20231219170100.188800-1-knaerzche@gmail.com/ >>>>> >>>>> Alex >>>>>>       timer { >>>>>>           compatible = "arm,armv7-timer"; >>>>>>           arm,cpu-registers-not-fw-configured; >>>>> >>>>> >>>>> _______________________________________________ >>>>> Linux-rockchip mailing list >>>>> Linux-rockchip@lists.infradead.org >>>>> http://lists.infradead.org/mailman/listinfo/linux-rockchip