From patchwork Wed Apr 6 01:48:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Norris X-Patchwork-Id: 558472 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id ADFAEC433F5 for ; Wed, 6 Apr 2022 14:33:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235117AbiDFOfA (ORCPT ); Wed, 6 Apr 2022 10:35:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235203AbiDFOer (ORCPT ); Wed, 6 Apr 2022 10:34:47 -0400 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F004D42BBA4 for ; Tue, 5 Apr 2022 18:49:21 -0700 (PDT) Received: by mail-pj1-x102f.google.com with SMTP id c15-20020a17090a8d0f00b001c9c81d9648so1277653pjo.2 for ; Tue, 05 Apr 2022 18:49:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=/YAk+fWUU+ETvZMAahO94+Nmhx8ga8SOKFjIYbyRo2A=; b=TdiuHKaZORaWPGQTvEUC06LmhEQ2Hv4BGNuu+2WWjop40q0AwxKFUcVd+SuxV1iC2f fqTGkOvq2So+26pvLbXOPbG++jhun+FsmlEBb7ZVx0joMcOhwx6tONZKnOGOSWcLcAfc /hqRG+wM3LeeAcZ6vYUV1vNuR2rb/C7Aet6wY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=/YAk+fWUU+ETvZMAahO94+Nmhx8ga8SOKFjIYbyRo2A=; b=qgtxdmdWvxKGNJnRprVkJ6IMD8VU6LNnNo0HSgdMd0b3uoE6XApEo1RbHdkrh1zxWX LfaAOGdhOCxZdbLCfWpaQyC/DlfX9CmPJTfvE9lgYqdoOeBin9dcaJ/dyaMojX7IwwlR s9RyVnPPSTDPJtelFJCOQxNW94BC+ZFrR3yaD1kAlIK64Z+waxVjerjDWB/z88USDsts bw5eFnRzObFZ+8fC3OGahGjlIyT7ocTfMQTOT4yl56BoPvCcDOtes9//VBjoRJEDWj2x HS+xWC+0ffHYGV72B0of1w1ZSeHe42S5bLHuvSPRgSKJ8o9vJcCY/o6Xk8aUqvZZ8hKP anjA== X-Gm-Message-State: AOAM531o7IVVG0zdcOqT94OtbGbSS1fXYoKwXAOQrzzcBMmbavXRTTu6 lY6gxTxVw6RrCwz104Muo+PAkA== X-Google-Smtp-Source: ABdhPJxRiO+aF5ru+VVliawznjkQgTfqyIcNS4jn2oAT5iUCxwlpZhGj0CMVfVLc/UCVkgor6cxH+g== X-Received: by 2002:a17:90a:c253:b0:1c9:ada2:f28d with SMTP id d19-20020a17090ac25300b001c9ada2f28dmr7240326pjx.17.1649209761200; Tue, 05 Apr 2022 18:49:21 -0700 (PDT) Received: from localhost ([2620:15c:202:201:6903:769c:e1f5:9c25]) by smtp.gmail.com with UTF8SMTPSA id t69-20020a638148000000b0039822f39a40sm13620410pgd.25.2022.04.05.18.49.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 05 Apr 2022 18:49:20 -0700 (PDT) From: Brian Norris To: MyungJoo Ham , Kyungmin Park , Chanwoo Choi , Heiko Stuebner Cc: linux-kernel@vger.kernel.org, Elaine Zhang , linux-pm@vger.kernel.org, Doug Anderson , linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, Brian Norris Subject: [RFC PATCH 0/2] rockchip / devfreq: Coordinate DRAM controller resources between ATF and kernel Date: Tue, 5 Apr 2022 18:48:40 -0700 Message-Id: <20220406014842.2771799-1-briannorris@chromium.org> X-Mailer: git-send-email 2.35.1.1094.g7c7d902a7c-goog MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org On Rockchip RK3399, there are a few hardware resources that are shared between firmware (ARM Trusted Firmware) and kernel (power domain driver) that need to be coordinated properly for DRAM DVFS to work reliably. See patch 1 for plenty more description. These fixes are based in part on the specification in the RK3399, and in part based on extrapolation and observation. Any confirmation about the behavior of PMU_CRU_GATEDIS_CON0, etc., is welcome. Otherwise, see the patches. Regards, Brian Brian Norris (2): soc: rockchip: power-domain: Manage resource conflicts with firmware PM / devfreq: rk3399_dmc: Block PMU during transitions drivers/devfreq/rk3399_dmc.c | 13 ++++ drivers/soc/rockchip/pm_domains.c | 118 ++++++++++++++++++++++++++++++ include/soc/rockchip/pm_domains.h | 25 +++++++ 3 files changed, 156 insertions(+) create mode 100644 include/soc/rockchip/pm_domains.h Reviewed-by: Douglas Anderson Tested-by: Peter Geis