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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7FC6AC00144 for ; Fri, 29 Jul 2022 12:09:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229871AbiG2MJ7 (ORCPT ); Fri, 29 Jul 2022 08:09:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229603AbiG2MJ6 (ORCPT ); Fri, 29 Jul 2022 08:09:58 -0400 X-Greylist: delayed 583 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 29 Jul 2022 05:09:57 PDT Received: from relay03.th.seeweb.it (relay03.th.seeweb.it [IPv6:2001:4b7a:2000:18::164]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E79387F7B for ; Fri, 29 Jul 2022 05:09:57 -0700 (PDT) Received: from [192.168.1.101] (abxi232.neoplus.adsl.tpnet.pl [83.9.2.232]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r1.th.seeweb.it (Postfix) with ESMTPSA id CEE251F9C3; Fri, 29 Jul 2022 14:00:04 +0200 (CEST) Message-ID: Date: Fri, 29 Jul 2022 14:00:02 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH 7/7] arm64: dts: mediatek: Add support for MT6795 Sony Xperia M5 smartphone Content-Language: en-US To: AngeloGioacchino Del Regno , robh+dt@kernel.org Cc: krzysztof.kozlowski+dt@linaro.org, vkoul@kernel.org, chaotian.jing@mediatek.com, ulf.hansson@linaro.org, matthias.bgg@gmail.com, hsinyi@chromium.org, nfraprado@collabora.com, allen-kh.cheng@mediatek.com, fparent@baylibre.com, sam.shih@mediatek.com, sean.wang@mediatek.com, long.cheng@mediatek.com, wenbin.mei@mediatek.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht References: <20220729104441.39177-1-angelogioacchino.delregno@collabora.com> <20220729104441.39177-8-angelogioacchino.delregno@collabora.com> From: Konrad Dybcio In-Reply-To: <20220729104441.39177-8-angelogioacchino.delregno@collabora.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org On 29.07.2022 12:44, AngeloGioacchino Del Regno wrote: > Add a basic support for the Sony Xperia M5 (codename "Holly") > smartphone, powered by a MediaTek Helio X10 SoC. > > This achieves a console boot. > > Signed-off-by: AngeloGioacchino Del Regno > --- > arch/arm64/boot/dts/mediatek/Makefile | 1 + > .../dts/mediatek/mt6795-sony-xperia-m5.dts | 90 +++++++++++++++++++ > 2 files changed, 91 insertions(+) > create mode 100644 arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts > > diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/mediatek/Makefile > index af362a085a02..72fd683c9264 100644 > --- a/arch/arm64/boot/dts/mediatek/Makefile > +++ b/arch/arm64/boot/dts/mediatek/Makefile > @@ -3,6 +3,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt2712-evb.dtb > dtb-$(CONFIG_ARCH_MEDIATEK) += mt6755-evb.dtb > dtb-$(CONFIG_ARCH_MEDIATEK) += mt6779-evb.dtb > dtb-$(CONFIG_ARCH_MEDIATEK) += mt6795-evb.dtb > +dtb-$(CONFIG_ARCH_MEDIATEK) += mt6795-sony-xperia-m5.dtb -holly.dtb? > dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-evb.dtb > dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-x20-dev.dtb > dtb-$(CONFIG_ARCH_MEDIATEK) += mt7622-rfb1.dtb > diff --git a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts > new file mode 100644 > index 000000000000..94d011c4126c > --- /dev/null > +++ b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts > @@ -0,0 +1,90 @@ > +// SPDX-License-Identifier: GPL-2.0-only > +/* > + * Copyright (c) 2022, Collabora Ltd > + * Author: AngeloGioacchino Del Regno > + */ > + > +/dts-v1/; > +#include "mt6795.dtsi" > + > +#include Looks unused. > + > +/ { > + model = "Sony Xperia M5"; > + compatible = "sony,xperia-m5", "mediatek,mt6795"; sony,holly? > + chassis-type = "handset"; > + > + aliases { > + mmc0 = &mmc0; > + mmc1 = &mmc1; > + serial0 = &uart0; > + serial1 = &uart1; > + }; > + > + memory@40000000 { > + device_type = "memory"; > + reg = <0 0x40000000 0 0x1E800000>; Lowercase hex in size. Also, doesn't the bootloader fill it in? > + }; > + > + reserved_memory: reserved-memory { > + #address-cells = <2>; > + #size-cells = <2>; > + ranges; > + > + /* 128 KiB reserved for ARM Trusted Firmware (BL31) */ Is that true for all devices with this SoC, or..? If so, it may be worth moving this into mt6795.dtsi. > + bl31_secmon_reserved: secmon@43000000 { memory@, everywhere. Use labels to name the nodes. > + no-map; reg goes first. > + reg = <0 0x43000000 0 0x30000>; > + }; > + > + /* preloader and bootloader regions cannot be touched */ > + preloader-region@44800000 { > + no-map; > + reg = <0 0x44800000 0 0x100000>; > + }; > + > + bootloader-region@46000000 { > + no-map; > + reg = <0 0x46000000 0 0x400000>; > + }; > + }; > +}; > + > +&pio { > + uart0_pins: uart0-pins { > + pins-rx { > + pinmux = ; > + bias-pull-up; > + input-enable; > + }; > + pins-tx { > + pinmux = ; > + output-high; > + }; > + }; > + > + uart2_pins: uart2-pins { > + pins-rx { > + pinmux = ; > + bias-pull-up; > + input-enable; > + }; > + pins-tx { > + pinmux = ; > + }; > + }; > +}; > + > +&uart0 { > + status = "okay"; Status last here and below, please. Konrad > + > + pinctrl-names = "default"; > + pinctrl-0 = <&uart0_pins>; > +}; > + > +&uart2 { > + status = "okay"; > + > + pinctrl-names = "default"; > + pinctrl-0 = <&uart2_pins>; > +}; > 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 47114C00144 for ; Fri, 29 Jul 2022 12:01:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=vTGSRrylquGVTCtVUMxzdmKViVHctr///nllBS5e21w=; b=rLTY0NTmgNyr10 5sS4JCXswgrmdiCb5VtrK70CM9rC1PBYl9u0FPF3MdlVwNyI+bIs+QXU/duIEWTHxt4+ALVtfb78w s0NVjDW/OyS4AjS6xcqfl/UPXWeXH7KgCgP4NeCwxAPeVhQLMr6MmenVVsk/DGiluxhuP6QWMU9aj ZP2Vz/wK/QRx2K5fzhJ7eLDpJD88EbaM0sUOLdzLhcDuen7qUhMkvazso2/pqQRb3TbipXM1Pbryv G081RlVjit/u9csC+/BqPFlmCPbhgyoxTlZAoD69tSdNGD1SLpx0vLk8PJprqBq5zQOqTsjdNYfbR FTEja0eh6dcy0nIGeswQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oHOfE-004b7t-S9; Fri, 29 Jul 2022 12:00:20 +0000 Received: from relay04.th.seeweb.it ([2001:4b7a:2000:18::165]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oHOf9-004b0T-N6 for linux-arm-kernel@lists.infradead.org; Fri, 29 Jul 2022 12:00:18 +0000 Received: from [192.168.1.101] (abxi232.neoplus.adsl.tpnet.pl [83.9.2.232]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r1.th.seeweb.it (Postfix) with ESMTPSA id CEE251F9C3; Fri, 29 Jul 2022 14:00:04 +0200 (CEST) Message-ID: Date: Fri, 29 Jul 2022 14:00:02 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH 7/7] arm64: dts: mediatek: Add support for MT6795 Sony Xperia M5 smartphone Content-Language: en-US To: AngeloGioacchino Del Regno , robh+dt@kernel.org Cc: krzysztof.kozlowski+dt@linaro.org, vkoul@kernel.org, chaotian.jing@mediatek.com, ulf.hansson@linaro.org, matthias.bgg@gmail.com, hsinyi@chromium.org, nfraprado@collabora.com, allen-kh.cheng@mediatek.com, fparent@baylibre.com, sam.shih@mediatek.com, sean.wang@mediatek.com, long.cheng@mediatek.com, wenbin.mei@mediatek.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht References: <20220729104441.39177-1-angelogioacchino.delregno@collabora.com> <20220729104441.39177-8-angelogioacchino.delregno@collabora.com> From: Konrad Dybcio In-Reply-To: <20220729104441.39177-8-angelogioacchino.delregno@collabora.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220729_050015_964985_73EC1F6F X-CRM114-Status: GOOD ( 18.58 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 29.07.2022 12:44, AngeloGioacchino Del Regno wrote: > Add a basic support for the Sony Xperia M5 (codename "Holly") > smartphone, powered by a MediaTek Helio X10 SoC. > > This achieves a console boot. > > Signed-off-by: AngeloGioacchino Del Regno > --- > arch/arm64/boot/dts/mediatek/Makefile | 1 + > .../dts/mediatek/mt6795-sony-xperia-m5.dts | 90 +++++++++++++++++++ > 2 files changed, 91 insertions(+) > create mode 100644 arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts > > diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/mediatek/Makefile > index af362a085a02..72fd683c9264 100644 > --- a/arch/arm64/boot/dts/mediatek/Makefile > +++ b/arch/arm64/boot/dts/mediatek/Makefile > @@ -3,6 +3,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt2712-evb.dtb > dtb-$(CONFIG_ARCH_MEDIATEK) += mt6755-evb.dtb > dtb-$(CONFIG_ARCH_MEDIATEK) += mt6779-evb.dtb > dtb-$(CONFIG_ARCH_MEDIATEK) += mt6795-evb.dtb > +dtb-$(CONFIG_ARCH_MEDIATEK) += mt6795-sony-xperia-m5.dtb -holly.dtb? > dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-evb.dtb > dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-x20-dev.dtb > dtb-$(CONFIG_ARCH_MEDIATEK) += mt7622-rfb1.dtb > diff --git a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts > new file mode 100644 > index 000000000000..94d011c4126c > --- /dev/null > +++ b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts > @@ -0,0 +1,90 @@ > +// SPDX-License-Identifier: GPL-2.0-only > +/* > + * Copyright (c) 2022, Collabora Ltd > + * Author: AngeloGioacchino Del Regno > + */ > + > +/dts-v1/; > +#include "mt6795.dtsi" > + > +#include Looks unused. > + > +/ { > + model = "Sony Xperia M5"; > + compatible = "sony,xperia-m5", "mediatek,mt6795"; sony,holly? > + chassis-type = "handset"; > + > + aliases { > + mmc0 = &mmc0; > + mmc1 = &mmc1; > + serial0 = &uart0; > + serial1 = &uart1; > + }; > + > + memory@40000000 { > + device_type = "memory"; > + reg = <0 0x40000000 0 0x1E800000>; Lowercase hex in size. Also, doesn't the bootloader fill it in? > + }; > + > + reserved_memory: reserved-memory { > + #address-cells = <2>; > + #size-cells = <2>; > + ranges; > + > + /* 128 KiB reserved for ARM Trusted Firmware (BL31) */ Is that true for all devices with this SoC, or..? If so, it may be worth moving this into mt6795.dtsi. > + bl31_secmon_reserved: secmon@43000000 { memory@, everywhere. Use labels to name the nodes. > + no-map; reg goes first. > + reg = <0 0x43000000 0 0x30000>; > + }; > + > + /* preloader and bootloader regions cannot be touched */ > + preloader-region@44800000 { > + no-map; > + reg = <0 0x44800000 0 0x100000>; > + }; > + > + bootloader-region@46000000 { > + no-map; > + reg = <0 0x46000000 0 0x400000>; > + }; > + }; > +}; > + > +&pio { > + uart0_pins: uart0-pins { > + pins-rx { > + pinmux = ; > + bias-pull-up; > + input-enable; > + }; > + pins-tx { > + pinmux = ; > + output-high; > + }; > + }; > + > + uart2_pins: uart2-pins { > + pins-rx { > + pinmux = ; > + bias-pull-up; > + input-enable; > + }; > + pins-tx { > + pinmux = ; > + }; > + }; > +}; > + > +&uart0 { > + status = "okay"; Status last here and below, please. Konrad > + > + pinctrl-names = "default"; > + pinctrl-0 = <&uart0_pins>; > +}; > + > +&uart2 { > + status = "okay"; > + > + pinctrl-names = "default"; > + pinctrl-0 = <&uart2_pins>; > +}; > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel