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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 65DB4C433F5 for ; Thu, 4 Nov 2021 11:36:30 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AD95061168 for ; Thu, 4 Nov 2021 11:36:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org AD95061168 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C7C3F83305; Thu, 4 Nov 2021 12:36:17 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="oTy1ULOP"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 853DC83659; Thu, 4 Nov 2021 12:28:06 +0100 (CET) Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 548378320C for ; Thu, 4 Nov 2021 12:28:01 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=knaerzche@gmail.com Received: by mail-wm1-x332.google.com with SMTP id g191-20020a1c9dc8000000b0032fbf912885so3997324wme.4 for ; Thu, 04 Nov 2021 04:28:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=r40Zb4XIqKgJyx+8bYKmn8ifwmQvJhZYL+OMywAB+wk=; b=oTy1ULOP5lI3MZuO5rfEwlXkuELCPn26XyGB2cvRNB8g4FYJw6mwnpeCkwt/mSyUOg 45qtXoRaTMgbG36wAMHYKSv6lvXG3q6Vi57CuqPX5vtHx4RlodPATZpZNSGAK3FJ+gM7 LA998piXZ9VSOuKpDrHw3k0FRjONlOlzwu+IkWN05HSvqw5kDQEuaFCDi/dqP2tQ5RWZ UXn1Ts5BjI3kgRd2G5N+csjTVjMVaISTI8ppQUbYlcsQK/ogxTnrB8P/NGbqNGRwDEuF a4ZboRjVYbfyYDOTiDxoZnyoLkdXqJC1pMzmMRkfp3hw7N4piDZSCodtUJjxvS+6EG3d hnZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=r40Zb4XIqKgJyx+8bYKmn8ifwmQvJhZYL+OMywAB+wk=; b=g9p3IFPbyPh4g+9SdGF0OCjE8e2UBsfTD7b21p1poVtSn78uJdbEloeRHxHhrwlOxb 2id803ryi10IaBq2gJla3tr0x9jZtwI1n3eNyUgEQE2z5Pia35OX79iGbO1S4YM0OWxM px56Z4tIKAdJJ4O5nONPNk8t3BqSi/2xtza4dkcDRQc0GaaE8GaYMF1EECH1WNsn7F7W +IqB04zfuGO0PwBKDigLe3M3XcZXTjY6UUMr4bieTVr04axlDobYm1lUh4gIXQk93eC9 U2qnHRDCXVAA+j7d92i3eA34Fw+RZTbCA+oaKwFuoMpTTRakJL7dtbRDKVB/uXcLPMQR p9uw== X-Gm-Message-State: AOAM532bTl8oEUVqokdmuwcbRMMhP0+7SPwGrIUKkqmbc1iSY5jamqAY yvDHrj5inPK3jR2sFxJkcLipOjRbVUJ2 X-Google-Smtp-Source: ABdhPJyCqCI+2wZiFvRDLLgtSmhGZK+5va1J0+m8stu3eqIVPnHDfpPd0hzBGY+R05iotqpV/YUUPg== X-Received: by 2002:a05:600c:210d:: with SMTP id u13mr22215817wml.82.1636025280792; Thu, 04 Nov 2021 04:28:00 -0700 (PDT) Received: from [192.168.200.23] (ip5b435a69.dynamic.kabel-deutschland.de. [91.67.90.105]) by smtp.gmail.com with ESMTPSA id r7sm4735627wrq.29.2021.11.04.04.27.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 04 Nov 2021 04:28:00 -0700 (PDT) Subject: Re: [PATCH v2 2/5] ARM: dts: rockchip: update rk3xxx.dtsi To: Johan Jonker , kever.yang@rock-chips.com Cc: sjg@chromium.org, philipp.tomsich@vrull.eu, heiko@sntech.de, paweljarosz3691@gmail.com, u-boot@lists.denx.de References: <20210625132633.14137-1-jbx6244@gmail.com> <20210625132633.14137-2-jbx6244@gmail.com> From: Alex Bee Message-ID: <026eedc5-4abe-a449-0b6f-7ce85bbf8124@gmail.com> Date: Thu, 4 Nov 2021 12:27:59 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20210625132633.14137-2-jbx6244@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-Mailman-Approved-At: Thu, 04 Nov 2021 12:36:12 +0100 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Hi all, I understand that copying dts'es from upstream kernel seems an easy thing to do, but we should be careful: Now that mmc-indexes are defined in board level device trees in kernel , mmc boot order (which I just fixed some month ago [1]) is different per board. This is now broken again - at least for rk3188 and rk3399 (from what I've seen) and it is not fixable with an extra -u-boot.dtsi. Any idea (without having to define an extra config include/configs per board?) [1] https://github.com/u-boot/u-boot/commit/b212ad24a604b00b240add35516b7381965deb31 Alex Am 25.06.21 um 15:26 schrieb Johan Jonker: > In the Linux DT the file rk3xxx.dtsi is shared between > rk3066 and rk3188. This file has recently had some updates. > For a future rk3066 support in U-boot this file must also update. > Move U-boot specific things in a rk3xxx-u-boot.dtsi file. > > Signed-off-by: Johan Jonker > Reviewed-by: Kever Yang > --- > > Changed V2: > add vpu node > changed u-boot include > --- > arch/arm/dts/rk3188-radxarock.dts | 4 + > arch/arm/dts/rk3188.dtsi | 1 + > arch/arm/dts/rk3xxx-u-boot.dtsi | 35 +++++++ > arch/arm/dts/rk3xxx.dtsi | 215 +++++++++++++++++++++++++------------- > 4 files changed, 181 insertions(+), 74 deletions(-) > create mode 100644 arch/arm/dts/rk3xxx-u-boot.dtsi > > diff --git a/arch/arm/dts/rk3188-radxarock.dts b/arch/arm/dts/rk3188-radxarock.dts > index 61367126ba..10527a052d 100644 > --- a/arch/arm/dts/rk3188-radxarock.dts > +++ b/arch/arm/dts/rk3188-radxarock.dts > @@ -12,6 +12,10 @@ > model = "Radxa Rock"; > compatible = "radxa,rock", "rockchip,rk3188"; > > + aliases { > + mmc0 = &mmc0; > + }; > + > chosen { > /* stdout-path = &uart2; */ > stdout-path = "serial2:115200n8"; > diff --git a/arch/arm/dts/rk3188.dtsi b/arch/arm/dts/rk3188.dtsi > index 7bcca6a02d..d872dac174 100644 > --- a/arch/arm/dts/rk3188.dtsi > +++ b/arch/arm/dts/rk3188.dtsi > @@ -8,6 +8,7 @@ > #include > #include > #include "rk3xxx.dtsi" > +#include "rk3xxx-u-boot.dtsi" > > / { > compatible = "rockchip,rk3188"; > diff --git a/arch/arm/dts/rk3xxx-u-boot.dtsi b/arch/arm/dts/rk3xxx-u-boot.dtsi > new file mode 100644 > index 0000000000..581594c35d > --- /dev/null > +++ b/arch/arm/dts/rk3xxx-u-boot.dtsi > @@ -0,0 +1,35 @@ > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) > + > +/ { > + noc: syscon@10128000 { > + compatible = "rockchip,rk3188-noc", "syscon"; > + reg = <0x10128000 0x2000>; > + u-boot,dm-spl; > + }; > + > + dmc: dmc@20020000 { > + /* unreviewed u-boot-specific binding */ > + compatible = "rockchip,rk3188-dmc", "syscon"; > + reg = <0x20020000 0x3fc > + 0x20040000 0x294>; > + clocks = <&cru PCLK_DDRUPCTL>, <&cru PCLK_PUBL>; > + clock-names = "pclk_ddrupctl", "pclk_publ"; > + rockchip,cru = <&cru>; > + rockchip,grf = <&grf>; > + rockchip,pmu = <&pmu>; > + rockchip,noc = <&noc>; > + u-boot,dm-spl; > + }; > +}; > + > +&grf { > + u-boot,dm-spl; > +}; > + > +&pmu { > + u-boot,dm-spl; > +}; > + > +&uart2 { > + clock-frequency = <24000000>; > +}; > diff --git a/arch/arm/dts/rk3xxx.dtsi b/arch/arm/dts/rk3xxx.dtsi > index 612ed44bd6..616a828e0c 100644 > --- a/arch/arm/dts/rk3xxx.dtsi > +++ b/arch/arm/dts/rk3xxx.dtsi > @@ -1,4 +1,4 @@ > -// SPDX-License-Identifier: GPL-2.0+ OR X11 > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) > /* > * Copyright (c) 2013 MundoReader S.L. > * Author: Heiko Stuebner > @@ -6,9 +6,12 @@ > > #include > #include > -#include "skeleton.dtsi" > +#include > > / { > + #address-cells = <1>; > + #size-cells = <1>; > + > interrupt-parent = <&gic>; > > aliases { > @@ -18,9 +21,6 @@ > i2c2 = &i2c2; > i2c3 = &i2c3; > i2c4 = &i2c4; > - mshc0 = &emmc; > - mshc1 = &mmc0; > - mshc2 = &mmc1; > serial0 = &uart0; > serial1 = &uart1; > serial2 = &uart2; > @@ -29,47 +29,6 @@ > spi1 = &spi1; > }; > > - amba { > - compatible = "simple-bus"; > - #address-cells = <1>; > - #size-cells = <1>; > - ranges; > - > - dmac1_s: dma-controller@20018000 { > - compatible = "arm,pl330", "arm,primecell"; > - reg = <0x20018000 0x4000>; > - interrupts = , > - ; > - #dma-cells = <1>; > - arm,pl330-broken-no-flushp; > - clocks = <&cru ACLK_DMA1>; > - clock-names = "apb_pclk"; > - }; > - > - dmac1_ns: dma-controller@2001c000 { > - compatible = "arm,pl330", "arm,primecell"; > - reg = <0x2001c000 0x4000>; > - interrupts = , > - ; > - #dma-cells = <1>; > - arm,pl330-broken-no-flushp; > - clocks = <&cru ACLK_DMA1>; > - clock-names = "apb_pclk"; > - status = "disabled"; > - }; > - > - dmac2: dma-controller@20078000 { > - compatible = "arm,pl330", "arm,primecell"; > - reg = <0x20078000 0x4000>; > - interrupts = , > - ; > - #dma-cells = <1>; > - arm,pl330-broken-no-flushp; > - clocks = <&cru ACLK_DMA2>; > - clock-names = "apb_pclk"; > - }; > - }; > - > xin24m: oscillator { > compatible = "fixed-clock"; > clock-frequency = <24000000>; > @@ -77,7 +36,30 @@ > clock-output-names = "xin24m"; > }; > > - L2: l2-cache-controller@10138000 { > + gpu: gpu@10090000 { > + compatible = "arm,mali-400"; > + reg = <0x10090000 0x10000>; > + clocks = <&cru ACLK_GPU>, <&cru ACLK_GPU>; > + clock-names = "bus", "core"; > + assigned-clocks = <&cru ACLK_GPU>; > + assigned-clock-rates = <100000000>; > + resets = <&cru SRST_GPU>; > + status = "disabled"; > + }; > + > + vpu: video-codec@10104000 { > + compatible = "rockchip,rk3066-vpu"; > + reg = <0x10104000 0x800>; > + interrupts = , > + ; > + interrupt-names = "vepu", "vdpu"; > + clocks = <&cru ACLK_VDPU>, <&cru HCLK_VDPU>, > + <&cru ACLK_VEPU>, <&cru HCLK_VEPU>; > + clock-names = "aclk_vdpu", "hclk_vdpu", > + "aclk_vepu", "hclk_vepu"; > + }; > + > + L2: cache-controller@10138000 { > compatible = "arm,pl310-cache"; > reg = <0x10138000 0x1000>; > cache-unified; > @@ -92,14 +74,14 @@ > global_timer: global-timer@1013c200 { > compatible = "arm,cortex-a9-global-timer"; > reg = <0x1013c200 0x20>; > - interrupts = ; > + interrupts = ; > clocks = <&cru CORE_PERI>; > }; > > local_timer: local-timer@1013c600 { > compatible = "arm,cortex-a9-twd-timer"; > reg = <0x1013c600 0x20>; > - interrupts = ; > + interrupts = ; > clocks = <&cru CORE_PERI>; > }; > > @@ -133,10 +115,44 @@ > status = "disabled"; > }; > > - noc: syscon@10128000 { > - u-boot,dm-spl; > - compatible = "rockchip,rk3188-noc", "syscon"; > - reg = <0x10128000 0x2000>; > + qos_gpu: qos@1012d000 { > + compatible = "rockchip,rk3066-qos", "syscon"; > + reg = <0x1012d000 0x20>; > + }; > + > + qos_vpu: qos@1012e000 { > + compatible = "rockchip,rk3066-qos", "syscon"; > + reg = <0x1012e000 0x20>; > + }; > + > + qos_lcdc0: qos@1012f000 { > + compatible = "rockchip,rk3066-qos", "syscon"; > + reg = <0x1012f000 0x20>; > + }; > + > + qos_cif0: qos@1012f080 { > + compatible = "rockchip,rk3066-qos", "syscon"; > + reg = <0x1012f080 0x20>; > + }; > + > + qos_ipp: qos@1012f100 { > + compatible = "rockchip,rk3066-qos", "syscon"; > + reg = <0x1012f100 0x20>; > + }; > + > + qos_lcdc1: qos@1012f180 { > + compatible = "rockchip,rk3066-qos", "syscon"; > + reg = <0x1012f180 0x20>; > + }; > + > + qos_cif1: qos@1012f200 { > + compatible = "rockchip,rk3066-qos", "syscon"; > + reg = <0x1012f200 0x20>; > + }; > + > + qos_rga: qos@1012f280 { > + compatible = "rockchip,rk3066-qos", "syscon"; > + reg = <0x1012f280 0x20>; > }; > > usb_otg: usb@10180000 { > @@ -149,7 +165,6 @@ > g-np-tx-fifo-size = <16>; > g-rx-fifo-size = <275>; > g-tx-fifo-size = <256 128 128 64 64 32>; > - g-use-dma; > phys = <&usbphy0>; > phy-names = "usb2-phy"; > status = "disabled"; > @@ -184,60 +199,99 @@ > status = "disabled"; > }; > > - mmc0: dwmmc@10214000 { > + mmc0: mmc@10214000 { > compatible = "rockchip,rk2928-dw-mshc"; > reg = <0x10214000 0x1000>; > interrupts = ; > clocks = <&cru HCLK_SDMMC>, <&cru SCLK_SDMMC>; > clock-names = "biu", "ciu"; > + dmas = <&dmac2 1>; > + dma-names = "rx-tx"; > fifo-depth = <256>; > + resets = <&cru SRST_SDMMC>; > + reset-names = "reset"; > status = "disabled"; > }; > > - mmc1: dwmmc@10218000 { > + mmc1: mmc@10218000 { > compatible = "rockchip,rk2928-dw-mshc"; > reg = <0x10218000 0x1000>; > interrupts = ; > clocks = <&cru HCLK_SDIO>, <&cru SCLK_SDIO>; > clock-names = "biu", "ciu"; > + dmas = <&dmac2 3>; > + dma-names = "rx-tx"; > fifo-depth = <256>; > + resets = <&cru SRST_SDIO>; > + reset-names = "reset"; > status = "disabled"; > }; > > - emmc: dwmmc@1021c000 { > + emmc: mmc@1021c000 { > compatible = "rockchip,rk2928-dw-mshc"; > reg = <0x1021c000 0x1000>; > interrupts = ; > clocks = <&cru HCLK_EMMC>, <&cru SCLK_EMMC>; > clock-names = "biu", "ciu"; > + dmas = <&dmac2 4>; > + dma-names = "rx-tx"; > fifo-depth = <256>; > + resets = <&cru SRST_EMMC>; > + reset-names = "reset"; > + status = "disabled"; > + }; > + > + nfc: nand-controller@10500000 { > + compatible = "rockchip,rk2928-nfc"; > + reg = <0x10500000 0x4000>; > + interrupts = ; > + clocks = <&cru HCLK_NANDC0>; > + clock-names = "ahb"; > status = "disabled"; > }; > > pmu: pmu@20004000 { > - compatible = "rockchip,rk3066-pmu", "syscon"; > + compatible = "rockchip,rk3066-pmu", "syscon", "simple-mfd"; > reg = <0x20004000 0x100>; > - u-boot,dm-spl; > + > + reboot-mode { > + compatible = "syscon-reboot-mode"; > + offset = <0x40>; > + mode-normal = ; > + mode-recovery = ; > + mode-bootloader = ; > + mode-loader = ; > + }; > }; > > grf: grf@20008000 { > - compatible = "syscon"; > + compatible = "syscon", "simple-mfd"; > reg = <0x20008000 0x200>; > - u-boot,dm-spl; > }; > > - dmc: dmc@20020000 { > - /* unreviewed u-boot-specific binding */ > - compatible = "rockchip,rk3188-dmc", "syscon"; > - rockchip,cru = <&cru>; > - rockchip,grf = <&grf>; > - rockchip,pmu = <&pmu>; > - rockchip,noc = <&noc>; > - reg = <0x20020000 0x3fc > - 0x20040000 0x294>; > - clocks = <&cru PCLK_DDRUPCTL>, <&cru PCLK_PUBL>; > - clock-names = "pclk_ddrupctl", "pclk_publ"; > - u-boot,dm-spl; > + dmac1_s: dma-controller@20018000 { > + compatible = "arm,pl330", "arm,primecell"; > + reg = <0x20018000 0x4000>; > + interrupts = , > + ; > + #dma-cells = <1>; > + arm,pl330-broken-no-flushp; > + arm,pl330-periph-burst; > + clocks = <&cru ACLK_DMA1>; > + clock-names = "apb_pclk"; > + }; > + > + dmac1_ns: dma-controller@2001c000 { > + compatible = "arm,pl330", "arm,primecell"; > + reg = <0x2001c000 0x4000>; > + interrupts = , > + ; > + #dma-cells = <1>; > + arm,pl330-broken-no-flushp; > + arm,pl330-periph-burst; > + clocks = <&cru ACLK_DMA1>; > + clock-names = "apb_pclk"; > + status = "disabled"; > }; > > i2c0: i2c@2002d000 { > @@ -361,7 +415,6 @@ > interrupts = ; > reg-shift = <2>; > reg-io-width = <1>; > - clock-frequency = <24000000>; > clock-names = "baudclk", "apb_pclk"; > clocks = <&cru SCLK_UART2>, <&cru PCLK_UART2>; > status = "disabled"; > @@ -385,6 +438,8 @@ > #io-channel-cells = <1>; > clocks = <&cru SCLK_SARADC>, <&cru PCLK_SARADC>; > clock-names = "saradc", "apb_pclk"; > + resets = <&cru SRST_SARADC>; > + reset-names = "saradc-apb"; > status = "disabled"; > }; > > @@ -413,4 +468,16 @@ > dma-names = "tx", "rx"; > status = "disabled"; > }; > + > + dmac2: dma-controller@20078000 { > + compatible = "arm,pl330", "arm,primecell"; > + reg = <0x20078000 0x4000>; > + interrupts = , > + ; > + #dma-cells = <1>; > + arm,pl330-broken-no-flushp; > + arm,pl330-periph-burst; > + clocks = <&cru ACLK_DMA2>; > + clock-names = "apb_pclk"; > + }; > };