From patchwork Mon Apr 11 07:21:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Srba X-Patchwork-Id: 12808622 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 823B3C4321E for ; Mon, 11 Apr 2022 07:25:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245329AbiDKH1g (ORCPT ); Mon, 11 Apr 2022 03:27:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245366AbiDKH1P (ORCPT ); Mon, 11 Apr 2022 03:27:15 -0400 Received: from mxd2.seznam.cz (mxd2.seznam.cz [IPv6:2a02:598:2::210]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8AC8E39BBB; Mon, 11 Apr 2022 00:24:52 -0700 (PDT) Received: from email.seznam.cz by email-smtpc7a.ng.seznam.cz (email-smtpc7a.ng.seznam.cz [10.23.10.195]) id 0d4e80be5640d4d70ce74ce0; Mon, 11 Apr 2022 09:24:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seznam.cz; s=beta; t=1649661869; bh=B8UfqYhtDAANtycvzPyjICoFKFyGu9U+8xDMD/CjZMg=; h=Received:From:To:Cc:Subject:Date:Message-Id:X-Mailer:MIME-Version: Content-Transfer-Encoding:X-szn-frgn:X-szn-frgc; b=EuPGSr/E4vPmBSfC5K44HZvO4mod0eCfPeIrHiSU5oLF6M4oI9rksmg9rPw8tRhJ0 UPEs2gtLIcZqbTj6PFiXcaqRXKR3dGP89k01qUAR7dAqZ3eIPMU5+gD8RyzVVD5jwJ o23CtccflugTbGUEh2dbjL7EFxFcXJkfiMfOBfY0= Received: from localhost.localdomain (ip-111-27.static.ccinternet.cz [147.161.27.111]) by email-relay18.ng.seznam.cz (Seznam SMTPD 1.3.136) with ESMTP; Mon, 11 Apr 2022 09:24:22 +0200 (CEST) From: michael.srba@seznam.cz To: Andy Gross , Bjorn Andersson , Rob Herring , Stephen Boyd , Philipp Zabel Cc: Jeffrey Hugo , Linus Walleij , Florian Fainelli , Arnd Bergmann , Greg Kroah-Hartman , Saravana Kannan , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, Michael Srba Subject: [RESEND v9 0/5] enable use of resources on the SSC bus on (some) qcom SoCs Date: Mon, 11 Apr 2022 09:21:51 +0200 Message-Id: <20220411072156.24451-1-michael.srba@seznam.cz> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-szn-frgn: <6611fa77-a821-48c8-bb11-57a3bfa1e278> X-szn-frgc: <0> Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Michael Srba NOTE: previous versions of this series didn't use a cover letter, it's added in this resend in order to not upset the kernel bot. This series adds necessary changes for accessing recources in the SSC block on msm8998 (though it should be possible to extend this to support other SoCs). In order to make use of these changes, Linux (HLOS in qcom's terms) needs to be allowed to access the relevant address ranges by the SMMU configuration. For a simple way to modify an existing (closed source) qcom hypervisor image to change the static SMMU configuration, see [1]. If you lack ownership of your device, it should alternatively be possible to change the SMMU configuration at a later point, provided you manage to get code execution in the hypervisor by way of an exploit. [1] https://michael-srba.cz/mainline4life/msm8998_hypervisor_patch.html Michael Srba (5): dt-bindings: clock: gcc-msm8998: Add definitions of SSC-related clocks clk: qcom: gcc-msm8998: add SSC-related clocks dt-bindings: bus: add device tree bindings for qcom,ssc-block-bus drivers: bus: add driver for initializing the SSC bus on (some) qcom SoCs arm64: dts: qcom: msm8998: reserve potentially inaccessible clocks .../bindings/bus/qcom,ssc-block-bus.yaml | 147 +++++++ arch/arm64/boot/dts/qcom/msm8998.dtsi | 15 + drivers/bus/Kconfig | 11 + drivers/bus/Makefile | 1 + drivers/bus/qcom-ssc-block-bus.c | 391 ++++++++++++++++++ drivers/clk/qcom/gcc-msm8998.c | 56 +++ include/dt-bindings/clock/qcom,gcc-msm8998.h | 4 + 7 files changed, 625 insertions(+) create mode 100644 Documentation/devicetree/bindings/bus/qcom,ssc-block-bus.yaml create mode 100644 drivers/bus/qcom-ssc-block-bus.c