Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1071401ybl; Fri, 6 Dec 2019 10:47:05 -0800 (PST) X-Google-Smtp-Source: APXvYqzAkQv8KROs3A1XKgNdJBRQd1zDeVaDiAGqa4nPDKm6GgLjpbI3wxcCY57ikqsAtYygfIFy X-Received: by 2002:aca:a902:: with SMTP id s2mr14069947oie.5.1575658025188; Fri, 06 Dec 2019 10:47:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575658025; cv=none; d=google.com; s=arc-20160816; b=mAdVw80guvcDlpf3H2FghlgJkc8OwBlCskXJ1n6GDSwFNEwLLJ/HrDkL0UNNW+vKuA J/lND3g2HQ1d03GGZxq+9RxOC7UouBTqqaXkdxhd1AFMECuqS7wshxrFTc/xOUQm5zH5 Gd3PCbRZRV28b8D0UhaebNeFOzDqlaRukUpLmCUlAhvHwur28rNLrScTkWplBfvH9+Wu Ka962ICdjxx+4SbCd7c2M0So6e2v7+zgCrwlsVdK8j9GIIxSbwKbldh//JvOGAk8Q1+4 65jSHd1jYvl6yS4XWV9flsUlj9eIDjaXCIxJO+jssmCEuwQr7PEQtXEe9cuYIW21HWRh IbUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Fi0v276DytflAY2h044Dlr4Bh1mkN9HRCT9MVIFntkY=; b=nK3vj65WCuORrNecu6QnH50BzB/J3/CVMto5wb6Nb04DZ3W8Ka04YO/PbB0PgWrAzv 59WHKitG6bjkIadgFH9hRM+/l3x/yzbThtfdu/zk+386oxDcOwf4dNsk8Tuy3G63AEKk Dx7GsrID8DsuqZwT7Awac5QYJYueTvDYYV2AKExEGGl9pEqk4mFajjA5CmsE4h4aMQD8 V5une7+tZbAMV30lZKdmW0F2/xMOR8R12sBrBVkgHlSNfoKPz3rNbbqpO4ABpjQ3uF3r HTjzlxvV9TsMSPiFqEzNvaDfcAOEbC2yfnSVIkLo3lrpMzbRrTWFnP1usUUcd2aaPEyc Jsaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="kUh88S/s"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c10si7833440oto.293.2019.12.06.10.46.38; Fri, 06 Dec 2019 10:47:05 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="kUh88S/s"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726350AbfLFSpq (ORCPT + 99 others); Fri, 6 Dec 2019 13:45:46 -0500 Received: from mail-pl1-f172.google.com ([209.85.214.172]:46209 "EHLO mail-pl1-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726317AbfLFSpq (ORCPT ); Fri, 6 Dec 2019 13:45:46 -0500 Received: by mail-pl1-f172.google.com with SMTP id k20so3057117pll.13; Fri, 06 Dec 2019 10:45:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Fi0v276DytflAY2h044Dlr4Bh1mkN9HRCT9MVIFntkY=; b=kUh88S/sioS4h6odf8ciymAoRA+iF6r6am/1niCdnSLdPozYU9dH9/TqVtEM0FdTqJ DvARn1aA34ayQ9UgeiGdEylxIUc+/5D7F2McVzdOShdS6npIMJf73uC1lZABX0pr9ve1 em8TXNYcm/OxQkkFoL9030k/+5snXhw1KXnB2Ys5jiDv2BGTLwNtZ1DKQ7EBGPPuWvz6 a2IVyzKZnPoryhDfFVikzF01PPJiDI4yV2DXl0/pe2zEqnPK29qUY+kQkLjPfXeRtMQt re7GZ7QNKP3dHIooQsBlP0V8NxxJEchC4kj2a6TnD+5uPLpOMnQ0a+Bm2M6HtEhFwXDx 3tEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Fi0v276DytflAY2h044Dlr4Bh1mkN9HRCT9MVIFntkY=; b=lFLdqRlyrKXV4MYO3A1jpFWUTxWdaFIyvbKj+SRizOR2LhT+bJJtFx78drqBzOOUhl 7vcHT0WIWhd4smyTl/FaMPpLNWTae2+hqe/iAWhbDmM3vaRf9VKyjzWhAG9NaYPT6UTC frbt7HMXQWRDLAd7do00CViNaUXWyyFw5Rzi6ciafhKZC5jWHUjZFaAEXWSroT8xfr5o aj/FYNXAa1E3DI6Av6K0dxPhuwSrSz37tj0Q7wG5RhBwxr7mhAiZBCRuEb8nh8Yf7UI3 wxZ3CSyagr1iL8uDC4LDl67/cidjb8k21dcoOD+RRQq5oEVs7VtkohY5datVeTmMA+Fk 3r7Q== X-Gm-Message-State: APjAAAUzNThomtqt7GLqdZvBssP0uoNDXEb+xRiW9XGTEXRYiremT/lZ mjJEY5CuwoyNnXJqwpaHWYU= X-Received: by 2002:a17:90a:868b:: with SMTP id p11mr17241511pjn.60.1575657945401; Fri, 06 Dec 2019 10:45:45 -0800 (PST) Received: from localhost.localdomain ([103.51.73.190]) by smtp.gmail.com with ESMTPSA id p4sm16777039pfb.157.2019.12.06.10.45.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Dec 2019 10:45:44 -0800 (PST) From: Anand Moon To: Rob Herring , Mark Rutland , Heiko Stuebner , Jagan Teki , Manivannan Sadhasivam , Robin Murphy , Daniel Schultz Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [RFCv1 0/8] RK3399 clean shutdown issue Date: Fri, 6 Dec 2019 18:45:28 +0000 Message-Id: <20191206184536.2507-1-linux.amoon@gmail.com> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Most of the RK3399 SBC boards do not perform clean shutdown and clean reboot. These patches try to help resolve the issue with proper shutdown by turning off the PMIC. For reference RK805 PMCI data sheet: [0] http://rockchip.fr/RK805%20datasheet%20V1.3.pdf RK808 PMIC data sheet: [1] http://rockchip.fr/RK808%20datasheet%20V1.4.pdf RK817 PMIC data sheet: [2] http://rockchip.fr/RK817%20datasheet%20V1.01.pdf RK818 PMIC data sheet: [3] http://rockchip.fr/RK818%20datasheet%20V1.0.pdf Reboot issue: My guess is that we need to some proper sequence of setting to PMCI to perform clean. If you have any input please share them. Tested on SBC Rock960 Model A Odroid N1 Rock64 -Anand Moon Anand Moon (8): mfd: rk808: Refactor shutdown functions mfd: rk808: use syscore for RK805 PMIC shutdown mfd: rk808: use syscore for RK808 PMIC shutdown mfd: rk808: use syscore for RK818 PMIC shutdown mfd: rk808: cleanup unused function pointer mfd: rk808: use common syscore for all PMCI for clean shutdown arm64: rockchip: drop unused field from rk8xx i2c node arm: rockchip: drop unused field from rk8xx i2c node arch/arm/boot/dts/rk3036-kylin.dts | 1 - arch/arm/boot/dts/rk3188-px3-evb.dts | 1 - arch/arm/boot/dts/rk3288-evb-rk808.dts | 1 - arch/arm/boot/dts/rk3288-phycore-som.dtsi | 1 - arch/arm/boot/dts/rk3288-popmetal.dts | 1 - arch/arm/boot/dts/rk3288-tinker.dtsi | 1 - arch/arm/boot/dts/rk3288-veyron.dtsi | 1 - arch/arm/boot/dts/rk3288-vyasa.dts | 1 - arch/arm/boot/dts/rv1108-elgin-r1.dts | 1 - arch/arm/boot/dts/rv1108-evb.dts | 1 - arch/arm64/boot/dts/rockchip/px30-evb.dts | 1 - arch/arm64/boot/dts/rockchip/rk3328-a1.dts | 1 - arch/arm64/boot/dts/rockchip/rk3328-evb.dts | 1 - .../arm64/boot/dts/rockchip/rk3328-roc-cc.dts | 1 - .../arm64/boot/dts/rockchip/rk3328-rock64.dts | 1 - .../boot/dts/rockchip/rk3368-geekbox.dts | 1 - arch/arm64/boot/dts/rockchip/rk3368-lion.dtsi | 1 - .../boot/dts/rockchip/rk3368-px5-evb.dts | 1 - .../boot/dts/rockchip/rk3399-firefly.dts | 1 - .../boot/dts/rockchip/rk3399-hugsun-x99.dts | 1 - .../boot/dts/rockchip/rk3399-khadas-edge.dtsi | 1 - .../boot/dts/rockchip/rk3399-leez-p710.dts | 1 - .../boot/dts/rockchip/rk3399-nanopi4.dtsi | 1 - .../boot/dts/rockchip/rk3399-orangepi.dts | 1 - arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 1 - .../boot/dts/rockchip/rk3399-roc-pc.dtsi | 1 - .../boot/dts/rockchip/rk3399-rock-pi-4.dts | 1 - .../boot/dts/rockchip/rk3399-rock960.dtsi | 1 - .../boot/dts/rockchip/rk3399-rockpro64.dts | 1 - .../boot/dts/rockchip/rk3399-sapphire.dtsi | 1 - drivers/mfd/rk808.c | 144 +++++------------- include/linux/mfd/rk808.h | 2 - 32 files changed, 42 insertions(+), 134 deletions(-) -- 2.24.0