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 X-Spam-Level: X-Spam-Status: No, score=-0.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6B3E3C04E30 for ; Mon, 9 Dec 2019 14:56:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3E54B20726 for ; Mon, 9 Dec 2019 14:56:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Jo1DFtbf" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726682AbfLIO4z (ORCPT ); Mon, 9 Dec 2019 09:56:55 -0500 Received: from mail-il1-f193.google.com ([209.85.166.193]:37693 "EHLO mail-il1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726310AbfLIO4z (ORCPT ); Mon, 9 Dec 2019 09:56:55 -0500 Received: by mail-il1-f193.google.com with SMTP id t9so12975433iln.4; Mon, 09 Dec 2019 06:56:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=GZjkca3Zp9sYYYIS/QPCEF0H2DGmE3kQodC7U7RI6jg=; b=Jo1DFtbfEqbVJQq5XZ5LYzCv5LfIMXre5rs2IBqXAEswSM4ZyGHTOACUpAWl/JxobF HLX/pPfXm0RL9M3l645yavzaROmAbjPrumBgCxOs+qt0jECTLvAP2saRGhxDiE4oVabe x5ksCotFtF8bz+kAXYWj99jBeJUme6AdylQlFhZHK5Pd5Gk1t3eZiddRZuYK0LK40RxD YSVYDjyxUtLqzzIQK4xOZoi+glaFkyr5SiLcxWGHnk44UhVVdqwlxJe//NV2RaRGPTNP gl8tmVv118OmwBXVwaHHpaVbbEq1vi6cVvltYUcazpnix7+plbZ6LF5IODbwmjQ4/C3R 9miQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=GZjkca3Zp9sYYYIS/QPCEF0H2DGmE3kQodC7U7RI6jg=; b=HGkTwBtNpfa0PsAvonHxJuAzOIxbuXF03Cfft+CY/0La5g/uYt4+7CnOehphaIlYAf oeVVf4hvIWtiwAV8s5Z29TaVHg0+9ptlOm1akBduHliIGI0nOWkFyawwi23sQAhGcrp5 M784IiwdijVdyyiJP05KvYzUrW5cB6ayAHEmvRFzhV+JcQ+8c4g3uuC+H2kJBACGGorh k6gAXLtw4YyHf2rxQnJg0tEkgbyF9itKdCruZWlqLsvb+Xzf98EsM+JYWl9TZEEdfyJA R9t1oB/NrFSVKWP/AE2RfY0ssvSrHX5YY9j/WFuGC+Bs3ef2OP5gex6vM3907pQ6ROM7 Al/A== X-Gm-Message-State: APjAAAXsKve5UM7kJ0xhJpWIDjOoQcCXi2/iZJ48/TC16wV2jlNNzNnh 6UrflmFgg8uYpJi46BVnYk0yzGhLQYid/1iMFwcOUGi6 X-Google-Smtp-Source: APXvYqxlvrvi0P/1yFULp5Ov9uTz23XUXUnTAB4CPJ8ux5bZ/ALMike0pN8bBYyFrKhz/ds6VBHl/XO9ocuzIVo34UE= X-Received: by 2002:a92:3919:: with SMTP id g25mr10786954ila.221.1575903414183; Mon, 09 Dec 2019 06:56:54 -0800 (PST) MIME-Version: 1.0 References: <20191206184536.2507-1-linux.amoon@gmail.com> <724aa7db-3838-16f9-d344-1789ae2a5746@arm.com> In-Reply-To: <724aa7db-3838-16f9-d344-1789ae2a5746@arm.com> From: Anand Moon Date: Mon, 9 Dec 2019 20:26:42 +0530 Message-ID: Subject: Re: [RFCv1 0/8] RK3399 clean shutdown issue To: Robin Murphy Cc: Rob Herring , Mark Rutland , Heiko Stuebner , Jagan Teki , Manivannan Sadhasivam , Daniel Schultz , devicetree , linux-arm-kernel , linux-rockchip@lists.infradead.org, Linux Kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Robin, On Mon, 9 Dec 2019 at 18:59, Robin Murphy wrote: > > On 06/12/2019 6:45 pm, Anand Moon wrote: > > Most of the RK3399 SBC boards do not perform clean > > shutdown and clean reboot. > > FWIW reboot problems on RK3399 have been tracked down to issues in > upstream ATF, and are unrelated to the PMIC. Yes I am aware of this changes. But, I have tired to study *RK808 datasheet V1.4* [0] below section *5.2.3 Power Channel Control/Monitor Registers* for clean reboot I was going to try disable some bit in below into reboot handle in the future patch. DCDC_EN_REG SLEEP_SET_OFF_REG1 SLEEP_SET_OFF_REG2 DCDC_UV_STS_REG I was going see if this helps to do clean reboot. further more use this in suspend/resume operation. [0] http://rockchip.fr/RK808%20datasheet%20V1.4.pdf But I feed that their is some more issue with related to mmc or PCIe not able to cleanly release the resources while reboot which caused then to disable after reboot. > > > These patches try to help resolve the issue with proper > > shutdown by turning off the PMIC. > > As mentioned elsewhere[1], although this is what the BSP kernel seems to > do, and in practice it's unlikely to matter for the majority of devboard > users like you and me, I still feel a bit uncomfortable with this > solution for systems using ATF as in principle the secure world might > want to know about orderly shutdowns, and this effectively makes every > shutdown an unexpected power loss from secure software's point of view. > > Robin. > > [1] > http://lists.infradead.org/pipermail/linux-rockchip/2019-December/028183.html > Yes I have follow the mailing list and I read this thread. I am not aware of ATF complete architecture. -Anand 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 X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 52B8FC43603 for ; Mon, 9 Dec 2019 14:57:02 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 1A10A207FD for ; Mon, 9 Dec 2019 14:57:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Tf2yf6dj"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Jo1DFtbf" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1A10A207FD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ooFGqWjgUf/WcPR6pPG5Y2H0Iq0rS0gR0HfBl0KRgpk=; b=Tf2yf6dj5AJCZK 2PDmbW+3/dP4gSkG7Rys9Xl1qwuWKdY5y8QhuTD3E2SqMVFhhwgrFfGc4ib5FXHpMGOtOxTInU/1D XVXD4nq1BAZ6BD2hr9zV1/1OUZ/KH37pnKYzUeTmyIyHTuGHMwTgEFUN4f6RWZqaO5eU8+/hy/lDL S3+FkcGfnd+uGyO1st/LC/6JF/r7SiLDVROuyg1A1MN7vIQOjocBfpglUTW/JGEXDEpxizIGrPY8A 0SMKccREs4t9DX0A+5zeGJHbjgPNdToM0aPHNoHXig1EAPwLZRcGggkvizEvh5g8QrjiXUvZThIZy dcO6zYcbhSm2qqyHxe0A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ieKT6-0003QB-2B; Mon, 09 Dec 2019 14:57:00 +0000 Received: from mail-il1-x142.google.com ([2607:f8b0:4864:20::142]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ieKT3-0003Oh-5q; Mon, 09 Dec 2019 14:56:58 +0000 Received: by mail-il1-x142.google.com with SMTP id f6so12943645ilh.9; Mon, 09 Dec 2019 06:56:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=GZjkca3Zp9sYYYIS/QPCEF0H2DGmE3kQodC7U7RI6jg=; b=Jo1DFtbfEqbVJQq5XZ5LYzCv5LfIMXre5rs2IBqXAEswSM4ZyGHTOACUpAWl/JxobF HLX/pPfXm0RL9M3l645yavzaROmAbjPrumBgCxOs+qt0jECTLvAP2saRGhxDiE4oVabe x5ksCotFtF8bz+kAXYWj99jBeJUme6AdylQlFhZHK5Pd5Gk1t3eZiddRZuYK0LK40RxD YSVYDjyxUtLqzzIQK4xOZoi+glaFkyr5SiLcxWGHnk44UhVVdqwlxJe//NV2RaRGPTNP gl8tmVv118OmwBXVwaHHpaVbbEq1vi6cVvltYUcazpnix7+plbZ6LF5IODbwmjQ4/C3R 9miQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=GZjkca3Zp9sYYYIS/QPCEF0H2DGmE3kQodC7U7RI6jg=; b=CQnoLY2AIiinvXXOJHg20vyTFgScMhGs/G42CXO+rhE369Qj2EYDU/AIEmP/u3/O+x +UrcUyYxMmnf6dj+uqPUXNOfud6k2GX+B/v26A+Lnpy9B5kcp4yS++bXDdRt6xnNzs7V kyXqZTnQmUsPQUTa8zLFVG7ahUu0zkzQSibntUamn05d90b2FItihEQgA44uwFGr78PM YT6HNuHyI99rr9RVK4SwA/UK26/2bl0p8zwLW41uURNfSDcBKXP3rsnyKjDxWcuv0vRE hkVnmaMkcOW1LnmUsqSXvtxIpLtcJLlS4hpDBgyl8yM7dorjjKHPGu+OkovJJGLKHXPo OIAQ== X-Gm-Message-State: APjAAAWEAuQV5+3be/JmJfnylYvaPsfZ0RdXVDp2Jt9hcxZxMFY2O+kJ /SH1+WUovBd1ZT0VhjWtVP9tTZ4tI73tFnG5CJY= X-Google-Smtp-Source: APXvYqxlvrvi0P/1yFULp5Ov9uTz23XUXUnTAB4CPJ8ux5bZ/ALMike0pN8bBYyFrKhz/ds6VBHl/XO9ocuzIVo34UE= X-Received: by 2002:a92:3919:: with SMTP id g25mr10786954ila.221.1575903414183; Mon, 09 Dec 2019 06:56:54 -0800 (PST) MIME-Version: 1.0 References: <20191206184536.2507-1-linux.amoon@gmail.com> <724aa7db-3838-16f9-d344-1789ae2a5746@arm.com> In-Reply-To: <724aa7db-3838-16f9-d344-1789ae2a5746@arm.com> From: Anand Moon Date: Mon, 9 Dec 2019 20:26:42 +0530 Message-ID: Subject: Re: [RFCv1 0/8] RK3399 clean shutdown issue To: Robin Murphy X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191209_065657_254599_EDD3D2AE X-CRM114-Status: GOOD ( 14.16 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree , Daniel Schultz , Heiko Stuebner , Linux Kernel , linux-rockchip@lists.infradead.org, Rob Herring , Jagan Teki , Manivannan Sadhasivam , linux-arm-kernel Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Robin, On Mon, 9 Dec 2019 at 18:59, Robin Murphy wrote: > > On 06/12/2019 6:45 pm, Anand Moon wrote: > > Most of the RK3399 SBC boards do not perform clean > > shutdown and clean reboot. > > FWIW reboot problems on RK3399 have been tracked down to issues in > upstream ATF, and are unrelated to the PMIC. Yes I am aware of this changes. But, I have tired to study *RK808 datasheet V1.4* [0] below section *5.2.3 Power Channel Control/Monitor Registers* for clean reboot I was going to try disable some bit in below into reboot handle in the future patch. DCDC_EN_REG SLEEP_SET_OFF_REG1 SLEEP_SET_OFF_REG2 DCDC_UV_STS_REG I was going see if this helps to do clean reboot. further more use this in suspend/resume operation. [0] http://rockchip.fr/RK808%20datasheet%20V1.4.pdf But I feed that their is some more issue with related to mmc or PCIe not able to cleanly release the resources while reboot which caused then to disable after reboot. > > > These patches try to help resolve the issue with proper > > shutdown by turning off the PMIC. > > As mentioned elsewhere[1], although this is what the BSP kernel seems to > do, and in practice it's unlikely to matter for the majority of devboard > users like you and me, I still feel a bit uncomfortable with this > solution for systems using ATF as in principle the secure world might > want to know about orderly shutdowns, and this effectively makes every > shutdown an unexpected power loss from secure software's point of view. > > Robin. > > [1] > http://lists.infradead.org/pipermail/linux-rockchip/2019-December/028183.html > Yes I have follow the mailing list and I read this thread. I am not aware of ATF complete architecture. -Anand _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel