Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp1064463pxb; Fri, 15 Apr 2022 20:12:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwiNOtwUiodKmejpsfcRFyPehiIdA47gIZ6esMKmLyPPszxgp3S39KRe7rOYm9sv6M+KEJO X-Received: by 2002:a17:902:b48d:b0:156:7f54:8ffc with SMTP id y13-20020a170902b48d00b001567f548ffcmr1926063plr.95.1650078725659; Fri, 15 Apr 2022 20:12:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650078725; cv=none; d=google.com; s=arc-20160816; b=hxc3sKHR69RtGWbpHPQeSBmDqOvPF7Hu3k1cWM9xkfG6TjP23DpvCUW3fhgvk4S5Nm OAk2Bq3Hitqlpy4XwCs5hTAoBAD7pTURIEPib4hGf7AOlngAjdnNWtzgdq+LqN9v3vPH SxPxm/DD6df0XpJLWI7WHDBICYmcI77X9dZXqGw2JO9XuWpWQh2XXJGzMtnCs3oIxWlc shg+Rs+UxHTlS1hYKBT34OZ9o/pmsjZVYloBzegoM+xaXfDdgPdkW1o8AEZ2KkP5d2Pg TvZ/OHTVFfxC1382kCfFrhio2EK3CTX5/exGIZWfqzUQAjgMSb0aRNlxrTboJPSQKY2v uuwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=xXwXtnkkynlf3OpFEL2MaE3G+9L74/QRDs/KqCc+vz8=; b=AzNvPmAhgF9XsRKJqAFPwiMAJyH9GwDo7nwfaZuFOjC4trv+lGmvzvJrkVUh/T2Nq5 x52BM6DjJKI31nsrSgPtBq1lpVmpCwfK91e0abUUEYMvj42Q+oh4iLsAH9PfAFguCjnt m5ZceIdzgg4+aGD7wPX6rDEu2oPOu/kzwMjkRO1fuT3R+dnGZVBzQlbSwbHaSbsBhurq HaA04nPwwOnLP6dgwtgmu+OEaG+G1dLGvqDh0SHt/gLEW5R/foOqXr4Of7uclkzEhf1Y PbWZ/7eXS1cLDUmTftko5/RabxWOGlLiW/3oU1X5Zl+oTwsLGfzN+KnF//qc3Xyrj6Sb vVZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=NSNbWsgo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id q18-20020a17090311d200b00156dd62acffsi3412033plh.376.2022.04.15.20.12.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 20:12:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=NSNbWsgo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2BC16101E; Fri, 15 Apr 2022 19:58:48 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229535AbiDPDBN (ORCPT + 99 others); Fri, 15 Apr 2022 23:01:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229481AbiDPDBM (ORCPT ); Fri, 15 Apr 2022 23:01:12 -0400 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17990D5F; Fri, 15 Apr 2022 19:58:40 -0700 (PDT) Received: by mail-ej1-x62e.google.com with SMTP id g18so18129155ejc.10; Fri, 15 Apr 2022 19:58:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=xXwXtnkkynlf3OpFEL2MaE3G+9L74/QRDs/KqCc+vz8=; b=NSNbWsgohv9oHu/RpiT2zekHIhOQEZl6CrfvUaGxjzco1wyFBSttQIidkzq3IazBkC 0+Fva2HN+4q9JhswjZMjdep4/GWg18/k+vdTXM+5VRtORMqTBPR1qB/KCWJeQPqc8osS 2iLlDVWE1LXbBGFXDs7wiDf3aTLuHwakk/eqxlPQXlpzgPGO4D0IAFfd+yYWexuMHL8S 5gYhJhPNBFxaZbDohyFe4fDAKLli55+Th99dUb/svX4c+cjWwJw5FsVFHyc25FXl+LKF kvn9q1oPq/kZZEJT0vZBZT/bf01oJlxKIwm2M7VTTTBtYlrPHqEfE05+vMZJ2P+b/51e xS0A== 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=xXwXtnkkynlf3OpFEL2MaE3G+9L74/QRDs/KqCc+vz8=; b=C8SQkGmfqPfWaWKn8ZwM0q0ho7Lae9Il3lcGsiwMAmem019C1d9ZpvCbL457OTNlIV NIBd9MkktAeVaQzOtK9jIHnxEMiEQloRoa1+bZatXCzwddFyaAe9L5izzP7a61RFiYet 1K6sR4kjpSl0/XlWHigigd67wTebas8tR5r+iwQOyKb62bjc4rNC+53bsWpsp0pNKakt nM2tmltgf9K3rke9TPO1sf6p3IJBP46h6wn9L4pvKlik+VgBeDqdcc3BXTsWZdJyKOqx g9xqAR1iKKPguj3X378/VJtm6CJxvFMDpx86F+eBkSce/U8F2n/QAyzV42tj5dD8t1VS hjZQ== X-Gm-Message-State: AOAM530+/uPuoXscqgD+A6n4X//mHeT2a0dWrE306gAIsNAhrNdebAVb u3H7LjyhV2DrThhDwSgeruE= X-Received: by 2002:a17:907:ea1:b0:6e8:917b:6b6f with SMTP id ho33-20020a1709070ea100b006e8917b6b6fmr1320790ejc.409.1650077918706; Fri, 15 Apr 2022 19:58:38 -0700 (PDT) Received: from localhost.localdomain ([138.199.7.159]) by smtp.gmail.com with ESMTPSA id oz20-20020a170906cd1400b006e872188edbsm2200915ejb.104.2022.04.15.19.58.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 19:58:38 -0700 (PDT) From: Yassine Oudjana X-Google-Original-From: Yassine Oudjana To: Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Michael Turquette , Stephen Boyd , Ilia Lin , Viresh Kumar , Nishanth Menon , "Rafael J. Wysocki" Cc: Konrad Dybcio , Dmitry Baryshkov , Loic Poulain , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-pm@vger.kernel.org, Yassine Oudjana Subject: [PATCH RESEND v2 0/9] Add support for MSM8996 Pro Date: Sat, 16 Apr 2022 06:56:28 +0400 Message-Id: <20220416025637.83484-1-y.oudjana@protonmail.com> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org MSM8996 Pro (also known as MSM8996SG) is a newer revision of MSM8996 with different CPU/CBF/GPU frequencies and CPR parameters. Its CBF clock also has a different divisor. This series handles the difference in the CBF clock and adds a new DTSI for MSM8996 Pro with CPU and GPU OPPs. It also removes reading msm-id from SMEM in qcom-cpufreq-nvmem as it becomes no longer necessary with the introduction. of a separate device tree. Separating MSM8996 and MSM8996 Pro will help with implementing CBF scaling and CPR; as they have different CPR parameters and CPU:CBF OPP mapping which is difficult to implement in the same cluster OPP tables. Dependencies: - clk: qcom: msm8996-cpu: Add CBF support https://lore.kernel.org/linux-arm-msm/20210528192541.1120703-1-konrad.dybcio@somainline.org/#t - arm64: dts: qcom: msm8996: Add support for the CBF clock https://lore.kernel.org/linux-arm-msm/20210528192541.1120703-2-konrad.dybcio@somainline.org/ Changes since v1: - Rebase DT changes on already merged patches[1][2]. - Add more details to commit messages. - Split removing MSM8996 Pro speed bin bits from opp-supported-hw into a separate patch. - Rename msm8996-xiaomi-scorpio.dts to msm8996pro-xiaomi-scorpio.dts [1] https://lore.kernel.org/linux-arm-msm/20220203072226.51482-1-y.oudjana@protonmail.com/T/#m6e1341ccfa50d11d221ba8c618f73c21a83b8acb [2] https://lore.kernel.org/linux-arm-msm/20220203072226.51482-1-y.oudjana@protonmail.com/T/#m36f194cd9da1fee7058a88412985aab10c499fa7 Yassine Oudjana (9): dt-bindings: clk: qcom: msm8996-apcc: Add CBF dt-bindings: clk: qcom: msm8996-apcc: Add MSM8996 Pro compatible clk: qcom: msm8996-cpu: Add MSM8996 Pro CBF support cpufreq: qcom_cpufreq_nvmem: Simplify reading kryo speedbin dt-bindings: opp: opp-v2-kryo-cpu: Remove SMEM arm64: dts: qcom: msm8996: Remove MSM8996 Pro speed bins from cluster OPP tables dt-bindings: arm: qcom: Add MSM8996 Pro compatible arm64: dts: qcom: msm8996: Add MSM8996 Pro support arm64: dts: qcom: msm8996-xiaomi-scorpio: Use MSM8996 Pro .../devicetree/bindings/arm/qcom.yaml | 5 + .../bindings/clock/qcom,msm8996-apcc.yaml | 11 +- .../bindings/opp/opp-v2-kryo-cpu.yaml | 56 ++-- arch/arm64/boot/dts/qcom/Makefile | 2 +- .../boot/dts/qcom/msm8996-xiaomi-common.dtsi | 3 - .../boot/dts/qcom/msm8996-xiaomi-gemini.dts | 1 + arch/arm64/boot/dts/qcom/msm8996.dtsi | 82 ++--- ...rpio.dts => msm8996pro-xiaomi-scorpio.dts} | 4 +- arch/arm64/boot/dts/qcom/msm8996pro.dtsi | 281 ++++++++++++++++++ drivers/clk/qcom/clk-cpu-8996.c | 61 ++-- drivers/cpufreq/Kconfig.arm | 1 - drivers/cpufreq/qcom-cpufreq-nvmem.c | 75 +---- 12 files changed, 410 insertions(+), 172 deletions(-) rename arch/arm64/boot/dts/qcom/{msm8996-xiaomi-scorpio.dts => msm8996pro-xiaomi-scorpio.dts} (99%) create mode 100644 arch/arm64/boot/dts/qcom/msm8996pro.dtsi -- 2.35.1