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=-8.2 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable 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 1C14EC433DF for ; Tue, 9 Jun 2020 19:52:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EB3D8206D5 for ; Tue, 9 Jun 2020 19:52:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=marek-ca.20150623.gappssmtp.com header.i=@marek-ca.20150623.gappssmtp.com header.b="i6YB8Qz9" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730897AbgFITwT (ORCPT ); Tue, 9 Jun 2020 15:52:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726912AbgFITwP (ORCPT ); Tue, 9 Jun 2020 15:52:15 -0400 Received: from mail-qk1-x743.google.com (mail-qk1-x743.google.com [IPv6:2607:f8b0:4864:20::743]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3990C03E97C for ; Tue, 9 Jun 2020 12:52:15 -0700 (PDT) Received: by mail-qk1-x743.google.com with SMTP id g28so22096643qkl.0 for ; Tue, 09 Jun 2020 12:52:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marek-ca.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=cJVzflu3n0uAFQ+8fe+/LB9PjLnVhJPcHxR1Rq6fzmQ=; b=i6YB8Qz988IiKK3aivE1cmhvyGVwPo82sEs4IqmBUcpVUf+K6dMCKKO2FKuT1B1XtT laQrON3xYLZBOKA/v79TwV6Pdap89oIeGs7xMCUAEu+VxmAXCAUeFXl6Im9jV4CwRFHL a0L1bnuyZgnyJoS0Zj3+LHnF/RPm+h13m1T9wpjTcVk7UOXXfdvIEfr38e80A8FcvqCC te3m2UGli64Qg6SVog4icTymbN2vngxlkzZmqVJlhk7poXdnrz/NJ52WHY7oVmqi3u+7 V86N0wpSXtv/69KQ5soyepbiVyxZiq/MrxI4EvyQvqhWIJzOmd/5EsICg1v8qBoK/Y8V qp8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=cJVzflu3n0uAFQ+8fe+/LB9PjLnVhJPcHxR1Rq6fzmQ=; b=ke39rPYgOiP2qH8fLXqoX66qLm4kiU5DlJ12LlzyKieL98jmppV98ulHITiA3f0nSh EFvH5HO+7OB778kZ8AuZdWBKdrYn6mhJYI9q7cPAXjayZ5GrfTHBE38nyDwPaSvRfyEv HuWJwXiO5So2KeKi6U5u1uM2osEsuFnahIg+xdHuFHRCTdf1LZ+Yl8I1TqTvrPAWALvA XCm9KpA9FK6htzJP4ZJlSXenXgx6Q+cq4ZLetkrSQhKRHbTaGyF+Q3t7iVlGLMh65jIA 0tpFiNDvQMdTv+L0Dg/icAgUVoK1Q5akTUhvsfXzzC9IoF0pLGMfZ+BgQv3mgZm4wuU1 EyBw== X-Gm-Message-State: AOAM533dy/FuESte0ODxpsuaciRM32xVWmkVBAOyLuDg9BLntu/xK/P3 LDJ3F81rCnHxZVUVQAwHRhOoUg== X-Google-Smtp-Source: ABdhPJzTu4J+zNTT+apFn02pIcjAV1cLOi8wPlDl8Mt++CEUwZ+BUKZ8CcU+YKAZttH1le37hFXHjQ== X-Received: by 2002:ae9:dcc2:: with SMTP id q185mr29173384qkf.104.1591732334838; Tue, 09 Jun 2020 12:52:14 -0700 (PDT) Received: from [192.168.0.189] ([147.253.86.153]) by smtp.gmail.com with ESMTPSA id w94sm10850306qte.19.2020.06.09.12.52.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 09 Jun 2020 12:52:14 -0700 (PDT) Subject: Re: [PATCH 1/6] arm64: dts: qcom: sm8150: add apps_smmu node To: Bjorn Andersson Cc: linux-arm-msm@vger.kernel.org, Andy Gross , Rob Herring , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , open list References: <20200524023815.21789-1-jonathan@marek.ca> <20200524023815.21789-2-jonathan@marek.ca> <20200529025246.GV279327@builder.lan> <20200529031520.GA1799770@builder.lan> <00b8f010-1ae1-45b2-8dd0-a1b582861a2e@marek.ca> <20200529034231.GB1799770@builder.lan> From: Jonathan Marek Message-ID: <8d7cca83-43e4-8889-ac7c-ce3393dc1f70@marek.ca> Date: Tue, 9 Jun 2020 15:52:35 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <20200529034231.GB1799770@builder.lan> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 5/28/20 11:42 PM, Bjorn Andersson wrote: > On Thu 28 May 20:34 PDT 2020, Jonathan Marek wrote: > >> On 5/28/20 11:15 PM, Bjorn Andersson wrote: >>> On Thu 28 May 20:02 PDT 2020, Jonathan Marek wrote: >>> >>>> >>>> >>>> On 5/28/20 10:52 PM, Bjorn Andersson wrote: >>>>> On Sat 23 May 19:38 PDT 2020, Jonathan Marek wrote: >>>>> >>>>>> Add the apps_smmu node for sm8150. Note that adding the iommus field for >>>>>> UFS is required because initializing the iommu removes the bypass mapping >>>>>> that created by the bootloader. >>>>>> >>>>> >>>>> Unrelated to the patch itself; how do you disable the splash screen on >>>>> 8150? "fastboot oem select-display-panel none" doesn't seem to work for >>>>> me on the MTP - and hence this would prevent my device from booting. >>>>> >>>>> Thanks, >>>>> Bjorn >>>>> >>>> >>>> I don't have a MTP, but on HDK855, "fastboot oem select-display-panel none" >>>> combined with setting the physical switch to HDMI mode (which switches off >>>> the 1440x2560 panel) gets it to not setup the display at all (just the >>>> fastboot command isn't enough). >>>> >>> >>> Okay, I don't think we have anything equivalent on the MTP, but good to >>> know. >>> >>>> With HDK865 though that doesn't work and I have a hack to work around it >>>> (writing 0 to INTF_TIMING_ENGINE_EN early on in boot will stop video mode >>>> scanout and it won't crash). >>>> >>> >>> Then we need to sort this out in the arm-smmu driver before we can >>> enable the apps_smmu node on 8250. I did receive some guidance from Will >>> on the subject and have started looking into this. >>> >> >> That's annoying because a lot depends on apps_mmu. GPU is an exception with >> its own MMU but pretty much everything else uses apps_smmu (does it make >> sense to add USB nodes if it won't work without apps_smmu?) Is this >> something that will get resolved soon? >> > > We have a number of boards where this is becoming a critical issue, so > we better find an acceptable solution to this very soon. > I kept the sm8250 apps_smmu patch in V2: I am now using a modified xbl with my HDK865, with a hack to make it use "none" for the display override string, and that allows me to use these patches without any kernel hack. The "fastboot oem select-display-panel none" not working to disable bootloader enabled display definitely seems like a bug (I have not tried to debug it, but everything I've seen indicates that it should be disabling it). I don't think we should be holding this back based on a bootloader bug. > Regards, > Bjorn > >> FWIW, I have another sm8250 board which does not need the workaround (its >> bootloader does not set up the display). AFAIK modifying the bootloader to >> not set up any display is a trivial modification (assuming that's an >> option). >> >>> Thanks, >>> Bjorn >>> >>>>>> Signed-off-by: Jonathan Marek >>>>>> --- >>>>>> arch/arm64/boot/dts/qcom/sm8150.dtsi | 91 ++++++++++++++++++++++++++++ >>>>>> 1 file changed, 91 insertions(+) >>>>>> >>>>>> diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi >>>>>> index a36512d1f6a1..acb839427b12 100644 >>>>>> --- a/arch/arm64/boot/dts/qcom/sm8150.dtsi >>>>>> +++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi >>>>>> @@ -442,6 +442,8 @@ ufs_mem_hc: ufshc@1d84000 { >>>>>> resets = <&gcc GCC_UFS_PHY_BCR>; >>>>>> reset-names = "rst"; >>>>>> + iommus = <&apps_smmu 0x300 0>; >>>>>> + >>>>>> clock-names = >>>>>> "core_clk", >>>>>> "bus_aggr_clk", >>>>>> @@ -706,6 +708,7 @@ usb_1_dwc3: dwc3@a600000 { >>>>>> compatible = "snps,dwc3"; >>>>>> reg = <0 0x0a600000 0 0xcd00>; >>>>>> interrupts = ; >>>>>> + iommus = <&apps_smmu 0x140 0>; >>>>>> snps,dis_u2_susphy_quirk; >>>>>> snps,dis_enblslpm_quirk; >>>>>> phys = <&usb_1_hsphy>, <&usb_1_ssphy>; >>>>>> @@ -742,6 +745,94 @@ spmi_bus: spmi@c440000 { >>>>>> cell-index = <0>; >>>>>> }; >>>>>> + apps_smmu: iommu@15000000 { >>>>>> + compatible = "qcom,sdm845-smmu-500", "arm,mmu-500"; >>>>>> + reg = <0 0x15000000 0 0x100000>; >>>>>> + #iommu-cells = <2>; >>>>>> + #global-interrupts = <1>; >>>>>> + interrupts = , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + , >>>>>> + ; >>>>>> + }; >>>>>> + >>>>>> remoteproc_adsp: remoteproc@17300000 { >>>>>> compatible = "qcom,sm8150-adsp-pas"; >>>>>> reg = <0x0 0x17300000 0x0 0x4040>; >>>>>> -- >>>>>> 2.26.1 >>>>>>