devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sean Wang <sean.wang@mediatek.com>
To: Rob Herring <robh@kernel.org>
Cc: matthias.bgg@gmail.com, mark.rutland@arm.com,
	devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 18/19] arm: dts: mt7623: add MT7623A reference boards
Date: Sat, 3 Mar 2018 10:15:43 +0800	[thread overview]
Message-ID: <1520043343.8089.216.camel@mtkswgap22> (raw)
In-Reply-To: <20180302154547.xq5nkmkdk3oenbta@rob-hp-laptop>

On Fri, 2018-03-02 at 09:45 -0600, Rob Herring wrote:
> On Fri, Feb 23, 2018 at 06:16:38PM +0800, sean.wang@mediatek.com wrote:
> > From: Sean Wang <sean.wang@mediatek.com>
> > 
> > Add mt7623a-rfb.dtsi where most nodes can be inherited from
> > mt7623n-rfb.dtsi and keep these distinctions from MT7623A boards in
> > mt7623a-rfb.dtsi for most definition can be reused among MT7623A board
> > variants.
> > 
> > MT7623A has its specific definition of power domain and thus we need
> > to change related devices such as audio, ethernet, crypto, high-speed
> > DMA, NAND, and USB controller to the power domain they specifically
> > belong to. In addition, MT7530 exists as built-in module inside MT7623A
> > SoC and I2C2 and UART[0-1] get being removed and UART2 have distinct pin
> > usage. Those all differences can be totally seen in mt7623a-rfb.dtsi.
> > 
> > Signed-off-by: Sean Wang <sean.wang@mediatek.com>
> > ---
> >  arch/arm/boot/dts/Makefile             |  2 +
> >  arch/arm/boot/dts/mt7623a-rfb-emmc.dts | 22 +++++++++
> >  arch/arm/boot/dts/mt7623a-rfb-nand.dts | 26 +++++++++++
> >  arch/arm/boot/dts/mt7623a-rfb.dtsi     | 84 ++++++++++++++++++++++++++++++++++
> >  arch/arm/boot/dts/mt7623n-rfb.dtsi     | 15 ++++++
> >  5 files changed, 149 insertions(+)
> >  create mode 100644 arch/arm/boot/dts/mt7623a-rfb-emmc.dts
> >  create mode 100644 arch/arm/boot/dts/mt7623a-rfb-nand.dts
> >  create mode 100644 arch/arm/boot/dts/mt7623a-rfb.dtsi
> > 
> > diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> > index 5af6fce..818817c 100644
> > --- a/arch/arm/boot/dts/Makefile
> > +++ b/arch/arm/boot/dts/Makefile
> > @@ -1122,6 +1122,8 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
> >  	mt6580-evbp1.dtb \
> >  	mt6589-aquaris5.dtb \
> >  	mt6592-evb.dtb \
> > +	mt7623a-rfb-emmc.dtb \
> > +	mt7623a-rfb-nand.dtb \
> >  	mt7623n-rfb-emmc.dtb \
> >  	mt7623n-rfb-nand.dtb \
> >  	mt7623n-bananapi-bpi-r2.dtb \
> > diff --git a/arch/arm/boot/dts/mt7623a-rfb-emmc.dts b/arch/arm/boot/dts/mt7623a-rfb-emmc.dts
> > new file mode 100644
> > index 0000000..ef6398e
> > --- /dev/null
> > +++ b/arch/arm/boot/dts/mt7623a-rfb-emmc.dts
> > @@ -0,0 +1,22 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +/*
> > + * Copyright (c) 2017-2018 MediaTek Inc.
> > + * Author: Sean Wang <sean.wang@mediatek.com>
> > + *
> > + */
> > +
> > +/dts-v1/;
> > +#include "mt7623a-rfb.dtsi"
> > +
> > +/ {
> > +	model = "MediaTek MT7623A with eMMC reference board";
> > +	compatible = "mediatek,mt7623a-rfb-emmc", "mediatek,mt7623";
> > +
> > +	chosen {
> > +		bootargs = "console=ttyS0,115200n8 earlyprintk";
> 
> Use stdout-path instead. earlyprintk option only works for a kernel 
> built with a debug uart at a fixed address, so drop it.
> 

thanks, I will try and have stdout-path instead. 

But for earlyprintk, our kernel can support and be built with a debug
uart at a fixed address and it is greatly useful to know what's going
on when a system hang happens on certain device's initialization prior
to uart initialization such as PCI device.

Thus, I consider to keep it there in special on such kinds of
development boards for debugging purpose.

> > +	};
> > +};
> > +
> > +&mmc0 {
> > +	status = "okay";
> > +};
> > diff --git a/arch/arm/boot/dts/mt7623a-rfb-nand.dts b/arch/arm/boot/dts/mt7623a-rfb-nand.dts
> > new file mode 100644
> > index 0000000..592d5d7
> > --- /dev/null
> > +++ b/arch/arm/boot/dts/mt7623a-rfb-nand.dts
> > @@ -0,0 +1,26 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +/*
> > + * Copyright (c) 2017-2018 MediaTek Inc.
> > + * Author: Sean Wang <sean.wang@mediatek.com>
> > + *
> > + */
> > +
> > +/dts-v1/;
> > +#include "mt7623a-rfb.dtsi"
> > +
> > +/ {
> > +	model = "MediaTek MT7623A with NAND reference board";
> > +	compatible = "mediatek,mt7623a-rfb-nand", "mediatek,mt7623";
> > +
> > +	chosen {
> > +		bootargs = "console=ttyS0,115200n8 earlyprintk";
> 
> ditto.
> 
> > +	};
> > +};
> > +
> > +&bch {
> > +	status = "okay";
> > +};
> > +
> > +&nandc {
> > +	status = "okay";
> > +};
> > diff --git a/arch/arm/boot/dts/mt7623a-rfb.dtsi b/arch/arm/boot/dts/mt7623a-rfb.dtsi
> > new file mode 100644
> > index 0000000..3a15c46
> > --- /dev/null
> > +++ b/arch/arm/boot/dts/mt7623a-rfb.dtsi
> > @@ -0,0 +1,84 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +/*
> > + * Copyright (c) 2017-2018 MediaTek Inc.
> > + * Author: Sean Wang <sean.wang@mediatek.com>
> > + *
> > + */
> > +
> > +/dts-v1/;
> > +#include <dt-bindings/power/mt7623a-power.h>
> > +#include "mt7623n-rfb.dtsi"
> > +
> > +/ {
> > +	memory {
> 
> Unit-address?

If unit-address is being included, it seem there is dtc problem two ,
memory nodes are generated, one with invalid size 0 would cause boot
fails as [1] I addressed.

[1]
http://lists.infradead.org/pipermail/linux-mediatek/2018-March/012249.html


> > +		device_type = "memory";
> > +		reg = <0 0x80000000 0 0x20000000>;
> > +	};
> > +};
> > +
> > +&afe {
> > +	power-domains = <&scpsys MT7623A_POWER_DOMAIN_IFR_MSC>;
> > +};
> > +
> > +&cir {
> > +	status = "disabled";
> > +};
> > +
> > +&crypto {
> > +	power-domains = <&scpsys MT7623A_POWER_DOMAIN_ETH>;
> > +};
> > +
> > +&eth {
> > +	power-domains = <&scpsys MT7623A_POWER_DOMAIN_ETH>;
> > +};
> > +
> > +&hsdma {
> > +	power-domains = <&scpsys MT7623A_POWER_DOMAIN_ETH>;
> > +};
> > +
> > +&i2c2 {
> > +	pinctrl-names = "default";
> > +	pinctrl-0 = <&i2c2_pins_b>;
> > +};
> > +
> > +&mt7530 {
> > +	mediatek,mcm;
> > +	resets = <&ethsys MT2701_ETHSYS_MCM_RST>;
> > +	reset-names = "mcm";
> > +};
> > +
> > +&nandc {
> > +	power-domains = <&scpsys MT7623A_POWER_DOMAIN_IFR_MSC>;
> > +};
> > +
> > +&pcie {
> > +	power-domains = <&scpsys MT7623A_POWER_DOMAIN_HIF>;
> > +};
> > +
> > +&scpsys {
> > +	compatible = "mediatek,mt7623a-scpsys",
> > +		     "syscon";
> > +	clocks = <&topckgen CLK_TOP_ETHIF_SEL>;
> > +	clock-names = "ethif";
> > +};
> > +
> > +&uart0 {
> > +	status = "disabled";
> > +};
> > +
> > +&uart1 {
> > +	status = "disabled";
> > +};
> > +
> > +&uart2 {
> > +	pinctrl-names = "default";
> > +	pinctrl-0 = <&uart2_pins_b>;
> > +};
> > +
> > +&usb1 {
> > +	power-domains = <&scpsys MT7623A_POWER_DOMAIN_HIF>;
> > +};
> > +
> > +&usb2 {
> > +	power-domains = <&scpsys MT7623A_POWER_DOMAIN_HIF>;
> > +};
> > diff --git a/arch/arm/boot/dts/mt7623n-rfb.dtsi b/arch/arm/boot/dts/mt7623n-rfb.dtsi
> > index 0237476..07ed15d 100644
> > --- a/arch/arm/boot/dts/mt7623n-rfb.dtsi
> > +++ b/arch/arm/boot/dts/mt7623n-rfb.dtsi
> > @@ -380,6 +380,14 @@
> >  		};
> >  	};
> >  
> > +	i2c2_pins_b: i2c2-alt {
> > +		pin-i2c2 {
> > +			pinmux = <MT7623_PIN_122_GPIO122_FUNC_SDA2>,
> > +				 <MT7623_PIN_123_HTPLG_FUNC_SCL2>;
> > +			bias-disable;
> > +		};
> > +	};
> > +
> >  	i2s0_pins_a: i2s0-default {
> >  		pin-i2s0 {
> >  			pinmux = <MT7623_PIN_49_I2S0_DATA_FUNC_I2S0_DATA>,
> > @@ -629,6 +637,13 @@
> >  				 <MT7623_PIN_15_GPIO15_FUNC_UTXD2>;
> >  		};
> >  	};
> > +
> > +	uart2_pins_b: uart2-alt {
> > +		pins-dat {
> > +			pinmux = <MT7623_PIN_200_URXD2_FUNC_URXD2>,
> > +				 <MT7623_PIN_201_UTXD2_FUNC_UTXD2>;
> > +		};
> > +	};
> >  };
> >  
> >  &pwm {
> > -- 
> > 2.7.4
> > 

  reply	other threads:[~2018-03-03  2:15 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-23 10:16 [PATCH v1 00/19] refactor dts and add support for more boards sean.wang
     [not found] ` <cover.1519378871.git.sean.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2018-02-23 10:16   ` [PATCH v1 01/19] dt-bindings: pinctrl: mediatek: use - instead of _ in examples sean.wang-NuS5LvNUpcJWk0Htik3J/w
2018-03-02  7:43     ` Linus Walleij
2018-02-23 10:16   ` [PATCH v1 02/19] dt-bindings: cpufreq: " sean.wang-NuS5LvNUpcJWk0Htik3J/w
2018-02-26  4:13     ` Viresh Kumar
2018-03-19  2:51       ` Sean Wang
2018-03-19 10:35         ` Matthias Brugger
2018-03-02 15:53     ` Rob Herring
2018-02-23 10:16   ` [PATCH v1 03/19] dt-bindings: pinctrl: mediatek: add bindings for I2C2 and SPI2 on MT7623 sean.wang-NuS5LvNUpcJWk0Htik3J/w
2018-03-02  7:44     ` Linus Walleij
2018-02-23 10:16   ` [PATCH v1 06/19] arm: dts: mt7623: fix USB initialization fails on bananapi-r2 sean.wang-NuS5LvNUpcJWk0Htik3J/w
2018-03-12 11:03     ` Matthias Brugger
2018-02-23 10:16   ` [PATCH v1 19/19] arm: dts: mediatek: converted to using SPDX identifiers sean.wang-NuS5LvNUpcJWk0Htik3J/w
2018-03-02 15:52     ` Rob Herring
2018-02-23 10:16 ` [PATCH v1 04/19] dt-bindings: arm: mediatek: add support for more mt7623 reference boards sean.wang
2018-03-02 16:00   ` Rob Herring
2018-03-12 11:03     ` Matthias Brugger
2018-02-23 10:16 ` [PATCH v1 05/19] arm: dts: mt7623: add BTIF, HSDMA and SPI-NOR device nodes sean.wang
2018-03-12  9:40   ` Matthias Brugger
2018-03-12  9:53     ` Sean Wang
2018-02-23 10:16 ` [PATCH v1 07/19] arm: dts: mt7623: fix the regulators mmc should use on bananapi-r2 sean.wang
2018-03-18 23:49   ` Matthias Brugger
2018-02-23 10:16 ` [PATCH v1 08/19] arm: dts: mt7623: enable three available UARTs " sean.wang
2018-03-18 23:49   ` Matthias Brugger
2018-02-23 10:16 ` [PATCH v1 09/19] arm: dts: mt7623: add related clock properties to cpu[1-3] nodes sean.wang
2018-02-26  4:13   ` Viresh Kumar
2018-03-18 23:49   ` Matthias Brugger
2018-02-23 10:16 ` [PATCH v1 10/19] arm: dts: mt7623: remove useless property pinctrl-names at node switch@0 sean.wang
2018-03-18 23:50   ` Matthias Brugger
2018-02-23 10:16 ` [PATCH v1 11/19] arm: dts: mt7623: use - instead of _ in DT node name sean.wang
2018-03-18 23:50   ` Matthias Brugger
2018-02-23 10:16 ` [PATCH v1 12/19] arm: dts: mt7623: fix all Warnings (unit_address_vs_reg) sean.wang
2018-03-18 21:54   ` Matthias Brugger
2018-02-23 10:16 ` [PATCH v1 13/19] arm: dts: mt7623: move node mt6323 leds to mt6323.dtsi sean.wang
2018-03-02 15:40   ` Rob Herring
2018-03-02 22:46     ` Sean Wang
2018-03-18 23:46       ` Matthias Brugger
2018-03-18 22:01   ` Matthias Brugger
2018-02-23 10:16 ` [PATCH v1 14/19] arm: dts: mt7623: extend common file to unify all boards with MT7623 SoCs sean.wang
2018-02-23 10:16 ` [PATCH v1 15/19] arm: dts: mt7623: add SPI[1, 2], I2C2 and sound related nodes to reference board sean.wang
2018-02-23 10:16 ` [PATCH v1 16/19] arm: dts: mt7623: fixup available memory size on bananapi-r2 sean.wang
2018-03-02 15:42   ` Rob Herring
2018-03-02 23:27     ` Sean Wang
2018-03-05 14:16       ` Rob Herring
2018-03-05 15:46         ` Sean Wang
2018-02-23 10:16 ` [PATCH v1 17/19] arm: dts: mt7623: add MT7623N reference board with eMMC sean.wang
2018-02-23 10:16 ` [PATCH v1 18/19] arm: dts: mt7623: add MT7623A reference boards sean.wang
2018-03-02 15:45   ` Rob Herring
2018-03-03  2:15     ` Sean Wang [this message]
2018-03-05 14:10       ` Rob Herring
2018-03-05 15:10         ` Sean Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1520043343.8089.216.camel@mtkswgap22 \
    --to=sean.wang@mediatek.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=matthias.bgg@gmail.com \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).