Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1435814ybh; Sun, 19 Jul 2020 20:21:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwaLSJrZUxho5ibXVxt7Hh1q9OQWpViTNTtIpZ5w2lOwui8TVCsxi7M+OoAlGtpEWRxZvd+ X-Received: by 2002:a17:907:4420:: with SMTP id om24mr18450931ejb.10.1595215261131; Sun, 19 Jul 2020 20:21:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595215261; cv=none; d=google.com; s=arc-20160816; b=XyIxI2snTUh/t+5apOSRIsNmL31S31nOccu+Us+6aMJX9FvPBq4/pmu/zRpFi0PbbR chGUicf2RUyZKWba2x4SURUL6Uxyt2T9vZIXYxYQthSzW3CMThVa67jnlYMTjfTu8fDP Nfitja9Im3ObNSYaepJNcNFr6ySUF0FeBjLjtUxtkHifiIzm3sDZrwvhrOed3I9yp4S1 sHXh3F52ZSoFb9HCfpLvB1MgukqUDCkBx0hMS5MMAPb6qkpsYw6ZsKC+5FH8uqpXTHaZ FnMThfvdFVbsoFPAaJtzaz1k41Zqhfeaah3jqM5XLqz8Yy5LfU6MupaKiJTus0VxfanG fRpA== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=OWswHlb/FQeyYToYqgiOm+7uAJVRAxLTFOerT1JJ44U=; b=Lw4x5IuRhccDmjRYrl2926yiZImv+rGw0rYgEh8LwjmO8CACXXe/I2m9E5ZY+ZkDHb TOiOfjtTZ0PF8rpR28vPCJhlLEnVoF/JXPYki6NNQ1bMYXQkquYsofQkzXwJ9R9mQjTJ t/SrP97iv4I+XsDKJ5kq/DZXtE685abo0/DOMyG/maynJ48Wj53nl6F+Q1D+DgIevr48 P4gaG36LAeOiJRHko1EywzylRoIEQcHns1VxgYVol0CftSUh6WwJ9tkpQsYvL5/Bbms0 ACG6xBzbvHjf1TOLsRLc8nh5Qh69CvLbmkiBPZqKLlGgmnyUux6j60I0rYeQtGiCeLmk Z1SA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ubxc5Zi5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h12si10440203ejx.234.2020.07.19.20.20.37; Sun, 19 Jul 2020 20:21:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ubxc5Zi5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726680AbgGTDSI (ORCPT + 99 others); Sun, 19 Jul 2020 23:18:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726312AbgGTDSI (ORCPT ); Sun, 19 Jul 2020 23:18:08 -0400 Received: from mail-il1-x143.google.com (mail-il1-x143.google.com [IPv6:2607:f8b0:4864:20::143]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B0E9C0619D2; Sun, 19 Jul 2020 20:18:08 -0700 (PDT) Received: by mail-il1-x143.google.com with SMTP id x9so12048932ila.3; Sun, 19 Jul 2020 20:18:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=OWswHlb/FQeyYToYqgiOm+7uAJVRAxLTFOerT1JJ44U=; b=ubxc5Zi5Us4nRLynsw3CuoEEBiu3e+C1bp6XMRyxJR+teI2Jqte9VSeMqRdsGdqYUW dICQxWQf+1mbiFXZHo/XGNWVtfDOUmGZpLiWVKpD4Oyu8W8cPaMYcKfmDoT/IUH5UYJs mCt11rqew5IdrbrAbW2y7S/ARnWE3hWQKsaWkY/Ci6hyCPK7fc7H5qSwrWFwdaTB4vuW PlWlOcn1ImMknJ4BEhxy9qHJE7bZTPDetGxHAsXQ96XrUYPOWmaqJpD1k1muXPEoxLG9 j23HHm+55REyPXdvdCWrUhTBFA6I1wA9a6b3AFx8jz3CcXRQOIuFeXiaMwFDl96P5Pcy irsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=OWswHlb/FQeyYToYqgiOm+7uAJVRAxLTFOerT1JJ44U=; b=aLtb/MEqcDLapExGO19igFJ64LWVRFSriFQhy0hPskg3Sixu8NKGjfy66q8OQIIp/g il1QHxnyu93X/GefMSta3GNKCda6iEr52pf1jpyZPtSIm99xFlqOYnbWzOAqwAzdiZOi M17pPNcnQI3mHSnDplLJZoTBz8firXYjoCRFSME7JQ62Rjm8S3y0MmFiNRNxfImQuh5p 8OFaJdK012zDUw5pyLYm9Be1LhawlWB6zkMTdKOBP2l7FTUnVlGUMdB9BfgA0N8LbJZt c1MyH6vLmME6JM+vtLMeZ0JeoBDTjLjKfD+0EkPqeSzePKNaObeQ3ABiQRKON903kpri 0l+A== X-Gm-Message-State: AOAM530wrDBurXc0zFIBOaap5rYenJcEllQpL4pXDmV7tfwodcpdrP+k hB2vs/92fwkJph4rpeAu+djBrIZZSpRYk6tGY4A= X-Received: by 2002:a92:840b:: with SMTP id l11mr20967909ild.129.1595215087463; Sun, 19 Jul 2020 20:18:07 -0700 (PDT) MIME-Version: 1.0 References: <20200702172714.158786-1-pop.adrian61@gmail.com> <20200702172714.158786-2-pop.adrian61@gmail.com> In-Reply-To: From: Hua Dillon Date: Mon, 20 Jul 2020 11:17:56 +0800 Message-ID: Subject: Re: [PATCH v2 2/2] ARM: dts: stm32: Enable MIPI DSI display support. To: Adrian Pop Cc: Maxime Coquelin , Alexandre Torgue , Rob Herring , Lee Jones , devicetree@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Adrian, Adrian Pop =E4=BA=8E2020=E5=B9=B47=E6=9C=8819=E6= =97=A5=E5=91=A8=E6=97=A5 =E4=B8=8B=E5=8D=8810:54=E5=86=99=E9=81=93=EF=BC=9A > > Hello Hua, > > Thank you for your review, > > On Tue, Jul 14, 2020 at 6:37 AM Hua Dillon wrote: > > > > Hi, Adrian, > > > > Just one suggestion for you. > > > > Adrian Pop =E4=BA=8E2020=E5=B9=B47=E6=9C=883= =E6=97=A5=E5=91=A8=E4=BA=94 =E4=B8=8A=E5=8D=881:30=E5=86=99=E9=81=93=EF=BC= =9A > > > > > > STM32f769-disco features a 4" MIPI DSI display: add support for it. > > > On Cortex-M7 DMA can't use cached memory. For this reason I use a ded= icated > > > memory pool for DMA with no-cache attribute which is located at the e= nd of > > > RAM. > > > > > > Signed-off-by: Adrian Pop > > > --- > > > arch/arm/boot/dts/stm32f746.dtsi | 34 +++++++++++++++++++ > > > arch/arm/boot/dts/stm32f769-disco.dts | 49 +++++++++++++++++++++++++= ++ > > > 2 files changed, 83 insertions(+) > > > > > > diff --git a/arch/arm/boot/dts/stm32f746.dtsi b/arch/arm/boot/dts/stm= 32f746.dtsi > > > index 93c063796780..577a812ca01c 100644 > > > --- a/arch/arm/boot/dts/stm32f746.dtsi > > > +++ b/arch/arm/boot/dts/stm32f746.dtsi > > > @@ -48,6 +48,19 @@ / { > > > #address-cells =3D <1>; > > > #size-cells =3D <1>; > > > > > > + reserved-memory { > > > + #address-cells =3D <1>; > > > + #size-cells =3D <1>; > > > + ranges; > > > + > > > + linux,dma { > > > + compatible =3D "shared-dma-pool"; > > > + linux,dma-default; > > > + no-map; > > > + reg =3D <0xc0f00000 0x100000>; > > > + }; > > > + }; > > > + > > Christoph Hellwig was submit a patch for !CONFIG_MMU platforms to suppo= rt mmap. > > the patch is : 1fbf57d05302 dma-direct: re-enable mmap for !CONFIG_MMU > > i thought there is no need to create a reserved-memory for it. > > Just tried with his patch, if I don't have the reserved-memory, I get: > > [drm] Initialized stm 1.0.0 20170330 for 40016800.display-controller on m= inor 0 > ------------[ cut here ]------------ > WARNING: CPU: 0 PID: 5 at arch/arm/mm/dma-mapping-nommu.c:50 0xc000b8e9 > CPU: 0 PID: 5 Comm: kworker/0:0 Not tainted 5.8.0-rc1-next-20200616 #4 > Hardware name: STM32 (Device Tree Support) > Workqueue: events 0xc0150fc1 > > This is the reason I added the reserved memory in the first place. > Oh, sorry, i forget stm32f7 with cache inside. yes, you need a reserve memory for that case. but, "reg =3D <0xc0f00000 0x100000>;" should big enough for framebuffer, as your know this is a global reserve memory for all devices, it's might need more for other devices, like camera etc. or use per-device reserve memory region. thanks. > > > > > clocks { > > > clk_hse: clk-hse { > > > #clock-cells =3D <0>; > > > @@ -75,6 +88,27 @@ clk_i2s_ckin: clk-i2s-ckin { > > > }; > > > > > > soc { > > > + ltdc: display-controller@40016800 { > > > + compatible =3D "st,stm32-ltdc"; > > > + reg =3D <0x40016800 0x200>; > > > + interrupts =3D <88>, <89>; > > > + resets =3D <&rcc STM32F7_APB2_RESET(LTDC)>; > > > + clocks =3D <&rcc 1 CLK_LCD>; > > > + clock-names =3D "lcd"; > > > + status =3D "disabled"; > > > + }; > > > + > > > + dsi: dsi@40016c00 { > > > + compatible =3D "st,stm32-dsi"; > > > + reg =3D <0x40016c00 0x800>; > > > + interrupts =3D <98>; > > > + clocks =3D <&rcc 1 CLK_F769_DSI>, <&clk_hse>; > > > + clock-names =3D "pclk", "ref"; > > > + resets =3D <&rcc STM32F7_APB2_RESET(DSI)>; > > > + reset-names =3D "apb"; > > > + status =3D "disabled"; > > > + }; > > > + > > > timer2: timer@40000000 { > > > compatible =3D "st,stm32-timer"; > > > reg =3D <0x40000000 0x400>; > > > diff --git a/arch/arm/boot/dts/stm32f769-disco.dts b/arch/arm/boot/dt= s/stm32f769-disco.dts > > > index 1626e00bb2cb..a9e81b49809c 100644 > > > --- a/arch/arm/boot/dts/stm32f769-disco.dts > > > +++ b/arch/arm/boot/dts/stm32f769-disco.dts > > > @@ -153,3 +153,52 @@ &usbotg_hs { > > > pinctrl-names =3D "default"; > > > status =3D "okay"; > > > }; > > > + > > > +&dsi { > > > + #address-cells =3D <1>; > > > + #size-cells =3D <0>; > > > + status =3D "okay"; > > > + > > > + ports { > > > + #address-cells =3D <1>; > > > + #size-cells =3D <0>; > > > + > > > + port@0 { > > > + reg =3D <0>; > > > + dsi_in: endpoint { > > > + remote-endpoint =3D <<dc_out_dsi>; > > > + }; > > > + }; > > > + > > > + port@1 { > > > + reg =3D <1>; > > > + dsi_out: endpoint { > > > + remote-endpoint =3D <&dsi_in_panel>; > > > + }; > > > + }; > > > + > > > + }; > > > + > > > + panel: panel { > > > + compatible =3D "orisetech,otm8009a"; > > > + reg =3D <0>; > > > + reset-gpios =3D <&gpioj 15 GPIO_ACTIVE_LOW>; > > > + status =3D "okay"; > > > + > > > + port { > > > + dsi_in_panel: endpoint { > > > + remote-endpoint =3D <&dsi_out>; > > > + }; > > > + }; > > > + }; > > > +}; > > > + > > > +<dc { > > > + status =3D "okay"; > > > + > > > + port { > > > + ltdc_out_dsi: endpoint { > > > + remote-endpoint =3D <&dsi_in>; > > > + }; > > > + }; > > > +}; > > > -- > > > 2.27.0 > > > > > > > > > _______________________________________________ > > > linux-arm-kernel mailing list > > > linux-arm-kernel@lists.infradead.org > > > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel > > Regards, > Adrian