linux-mediatek.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Chunfeng Yun <chunfeng.yun@mediatek.com>
To: Tinghan Shen <tinghan.shen@mediatek.com>,
	Chen-Yu Tsai <wenst@chromium.org>
Cc: <robh+dt@kernel.org>, <linus.walleij@linaro.org>,
	<matthias.bgg@gmail.com>, <broonie@kernel.org>,
	<bgolaszewski@baylibre.com>, <sean.wang@mediatek.com>,
	<bayi.cheng@mediatek.com>, <gch981213@gmail.com>,
	<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-gpio@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-mediatek@lists.infradead.org>, <linux-spi@vger.kernel.org>,
	<Project_Global_Chrome_Upstream_Group@mediatek.com>,
	Seiya Wang <seiya.wang@mediatek.com>
Subject: Re: [PATCH v7 4/4] arm64: dts: Add mediatek SoC mt8195 and evaluation board
Date: Fri, 7 Jan 2022 13:43:37 +0800	[thread overview]
Message-ID: <6dd101e4e65ef56dbf81d67496a383a7db8cefb5.camel@mediatek.com> (raw)
In-Reply-To: <18c342b20ccac520eabe8019562432030ddfe017.camel@mediatek.com>

On Thu, 2022-01-06 at 19:14 +0800, Tinghan Shen wrote:
> On Thu, 2021-12-23 at 17:59 +0800, Chen-Yu Tsai wrote:
> > Hi,
> > 
> > On Mon, Dec 20, 2021 at 8:20 PM Tinghan Shen <
> > tinghan.shen@mediatek.com> wrote:
> > > 
> > > Add basic chip support for mediatek mt8195.
> > > 
> > > Signed-off-by: Seiya Wang <seiya.wang@mediatek.com>
> > > Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com>
> > > ---
> > >  arch/arm64/boot/dts/mediatek/Makefile       |    1 +
> > >  arch/arm64/boot/dts/mediatek/mt8195-evb.dts |  209 ++++
> > >  arch/arm64/boot/dts/mediatek/mt8195.dtsi    | 1034
> > > +++++++++++++++++++
> > >  3 files changed, 1244 insertions(+)
> > >  create mode 100644 arch/arm64/boot/dts/mediatek/mt8195-evb.dts
> > >  create mode 100644 arch/arm64/boot/dts/mediatek/mt8195.dtsi
> > > 
> > > diff --git a/arch/arm64/boot/dts/mediatek/Makefile
> > > b/arch/arm64/boot/dts/mediatek/Makefile
> > > index 4f68ebed2e31..7aa08bb4c078 100644
> > > --- a/arch/arm64/boot/dts/mediatek/Makefile
> > > +++ b/arch/arm64/boot/dts/mediatek/Makefile
> > > @@ -32,4 +32,5 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-
> > > krane-sku0.dtb
> > >  dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-krane-sku176.dtb
> > >  dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-pumpkin.dtb
> > >  dtb-$(CONFIG_ARCH_MEDIATEK) += mt8192-evb.dtb
> > > +dtb-$(CONFIG_ARCH_MEDIATEK) += mt8195-evb.dtb
> > >  dtb-$(CONFIG_ARCH_MEDIATEK) += mt8516-pumpkin.dtb
> > > diff --git a/arch/arm64/boot/dts/mediatek/mt8195-evb.dts
> > > b/arch/arm64/boot/dts/mediatek/mt8195-evb.dts
> > > new file mode 100644
> > > index 000000000000..e581c6bbead6
> > > --- /dev/null
> > > +++ b/arch/arm64/boot/dts/mediatek/mt8195-evb.dts
> > > @@ -0,0 +1,209 @@
> > > +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
> > > +/*
> > > + * Copyright (C) 2021 MediaTek Inc.
> > > + * Author: Seiya Wang <seiya.wang@mediatek.com>
> > > + */
> > > +/dts-v1/;
> > > +#include "mt8195.dtsi"
> > > +
> > > +/ {
> > > +       model = "MediaTek MT8195 evaluation board";
> > > +       compatible = "mediatek,mt8195-evb", "mediatek,mt8195";
> > > +
> > > +       aliases {
> > > +               serial0 = &uart0;
> > > +       };
> > > +
> > > +       chosen {
> > > +               stdout-path = "serial0:921600n8";
> > > +       };
> > > +
> > > +       memory@40000000 {
> > > +               device_type = "memory";
> > > +               reg = <0 0x40000000 0 0x80000000>;
> > > +       };
> > > +};
> > > +
> > > +&auxadc {
> > > +       status = "okay";
> > > +};
> > > +
> > > +&i2c0 {
> > > +       pinctrl-names = "default";
> > > +       pinctrl-0 = <&i2c0_pin>;
> > > +       clock-frequency = <100000>;
> > > +       status = "okay";
> > > +};
> > > +
> > > +&i2c1 {
> > > +       pinctrl-names = "default";
> > > +       pinctrl-0 = <&i2c1_pin>;
> > > +       clock-frequency = <400000>;
> > > +       status = "okay";
> > > +};
> > > +
> > > +&i2c2 {
> > > +       pinctrl-names = "default";
> > > +       pinctrl-0 = <&i2c2_pin>;
> > > +       status = "disabled";
> > > +};
> > > +
> > > +&i2c3 {
> > > +       pinctrl-names = "default";
> > > +       pinctrl-0 = <&i2c3_pin>;
> > > +       status = "disabled";
> > > +};
> > 
> > Is there any reason in particular to list "disabled" devices here?
> > Are they part of some GPIO header? If they are not accessible, then
> > it's better to not list them. If they are, please leave a comment
> > about it.
> > 
> > > +
> > > +&i2c4 {
> > > +       pinctrl-names = "default";
> > > +       pinctrl-0 = <&i2c4_pin>;
> > > +       clock-frequency = <400000>;
> > > +       status = "okay";
> > > +};
> > > +
> > > +&i2c5 {
> > > +       pinctrl-names = "default";
> > > +       pinctrl-0 = <&i2c5_pin>;
> > > +       status = "disabled";
> > > +};
> > > +
> > > +&i2c6 {
> > > +       pinctrl-names = "default";
> > > +       pinctrl-0 = <&i2c6_pin>;
> > > +       clock-frequency = <400000>;
> > > +       status = "disabled";
> > > +};
> > 
> > Same here.
> > 
> > > +
> > > +&nor_flash {
> > > +       status = "okay";
> > > +       pinctrl-names = "default";
> > > +       pinctrl-0 = <&nor_pins_default>;
> > 
> > Please add an empty line between properties and child device nodes.
> > It helps
> > with readability and also fits the style of other parts and other
> > DT
> > files.
> > 
> > > +       flash@0 {
> > > +               compatible = "jedec,spi-nor";
> > > +               reg = <0>;
> > > +               spi-max-frequency = <50000000>;
> > > +       };
> > > +};
> > > +
> > > +&pio {
> > > +       i2c0_pin: i2c0-pins {
> > > +               pins {
> > > +                       pinmux = <PINMUX_GPIO8__FUNC_SDA0>,
> > > +                                <PINMUX_GPIO9__FUNC_SCL0>;
> > > +                       bias-pull-up = <1>;
> > > +                       mediatek,rsel = <7>;
> > 
> > Please use the MTK_PULL_SET_RSEL_* macros with the bias-pull-*
> > properties.
> > We spent a lot of time defining those.
> > 
> > > +                       mediatek,drive-strength-adv = <0>;
> > 
> > This property is not part of the DT binding.
> > 
> > > +                       drive-strength = <MTK_DRIVE_6mA>;
> > 
> > Please just use raw numbers here. MTK_DRIVE_6mA just translates to
> > 6.
> > The binding already specifies mA as the unit for "drive-strength".
> > 
> > > +               };
> > > +       };
> > 
> > Above comments apply to all the other "pins" nodes.
> > 
> > Please add an empty line between different child device nodes. It
> > helps
> > with readability and also fits the style of other parts and other
> > DT
> > files.
> > 
> > > +       i2c1_pin: i2c1-pins {
> > > +               pins {
> > > +                       pinmux = <PINMUX_GPIO10__FUNC_SDA1>,
> > > +                                <PINMUX_GPIO11__FUNC_SCL1>;
> > > +                       bias-pull-up = <1>;
> > > +                       mediatek,rsel = <7>;
> > > +                       mediatek,drive-strength-adv = <0>;
> > > +                       drive-strength = <MTK_DRIVE_6mA>;
> > > +               };
> > > +       };
> > > +       i2c2_pin: i2c2-pins {
> > > +               pins {
> > > +                       pinmux = <PINMUX_GPIO12__FUNC_SDA2>,
> > > +                                <PINMUX_GPIO13__FUNC_SCL2>;
> > > +                       bias-pull-up = <1>;
> > > +                       mediatek,rsel = <7>;
> > > +                       mediatek,drive-strength-adv = <7>;
> > > +               };
> > > +       };
> > > +       i2c3_pin: i2c3-pins {
> > > +               pins {
> > > +                       pinmux = <PINMUX_GPIO14__FUNC_SDA3>,
> > > +                                <PINMUX_GPIO15__FUNC_SCL3>;
> > > +                       bias-pull-up = <1>;
> > > +                       mediatek,rsel = <7>;
> > > +                       mediatek,drive-strength-adv = <7>;
> > > +               };
> > > +       };
> > > +       i2c4_pin: i2c4-pins {
> > > +               pins {
> > > +                       pinmux = <PINMUX_GPIO16__FUNC_SDA4>,
> > > +                                <PINMUX_GPIO17__FUNC_SCL4>;
> > > +                       bias-pull-up = <1>;
> > > +                       mediatek,rsel = <7>;
> > > +                       mediatek,drive-strength-adv = <7>;
> > > +               };
> > > +       };
> > > +       i2c5_pin: i2c5-pins {
> > > +               pins {
> > > +                       pinmux = <PINMUX_GPIO29__FUNC_SCL5>,
> > > +                                <PINMUX_GPIO30__FUNC_SDA5>;
> > > +                       bias-pull-up = <1>;
> > > +                       mediatek,rsel = <7>;
> > > +                       mediatek,drive-strength-adv = <7>;
> > > +               };
> > > +       };
> > > +       i2c6_pin: i2c6-pins {
> > > +               pins {
> > > +                       pinmux = <PINMUX_GPIO25__FUNC_SDA6>,
> > > +                                <PINMUX_GPIO26__FUNC_SCL6>;
> > > +                       bias-pull-up = <1>;
> > > +               };
> > > +       };
> > > +       i2c7_pin: i2c7-pins {
> > > +               pins {
> > > +                       pinmux = <PINMUX_GPIO27__FUNC_SCL7>,
> > > +                                <PINMUX_GPIO28__FUNC_SDA7>;
> > > +                       bias-pull-up = <1>;
> > > +               };
> > > +       };
> > > +       nor_pins_default: nor-pins {
> > > +               pins0 {
> > > +                       pinmux =
> > > <PINMUX_GPIO142__FUNC_SPINOR_IO0>,
> > > +                                        <PINMUX_GPIO141__FUNC_SP
> > > IN
> > > OR_CK>,
> > > +                                        <PINMUX_GPIO143__FUNC_SP
> > > IN
> > > OR_IO1>;
> > > +                       bias-pull-down;
> > > +               };
> > > +               pins1 {
> > > +                       pinmux =
> > > <PINMUX_GPIO140__FUNC_SPINOR_CS>,
> > > +                                    <PINMUX_GPIO130__FUNC_SPINOR
> > > _I
> > > O2>,
> > > +                                    <PINMUX_GPIO131__FUNC_SPINOR
> > > _I
> > > O3>;
> > > +                       bias-pull-up;
> > > +               };
> > > +       };
> > > +       uart0_pin: uart0-pins {
> > > +               pins {
> > > +                       pinmux = <PINMUX_GPIO98__FUNC_UTXD0>,
> > > +                               <PINMUX_GPIO99__FUNC_URXD0>;
> > > +               };
> > > +       };
> > > +};
> > > +
> > > +&u2port0 {
> > > +       status = "okay";
> > > +};
> > > +
> > > +&u2port1 {
> > > +       status = "okay";
> > > +};
> > > +
> > > +&u3phy0 {
> > > +       status="okay";
> > > +};
> > > +
> > > +&u3phy1 {
> > > +       status="okay";
> > > +};
> > > +
> > > +&u3port0 {
> > > +       status = "okay";
> > > +};
> > > +
> > > +&u3port1 {
> > > +       status = "okay";
> > > +};
No need add status property for those u*port* subnodes, add it in
parent node u*phy* is enough.

Thanks

> > > +
> > > +&uart0 {
> > > +       pinctrl-names = "default";
> > > +       pinctrl-0 = <&uart0_pin>;
> > > +       status = "okay";
> > > +};
> > > 
> > 
> 
> 
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

  reply	other threads:[~2022-01-07  5:50 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-20 12:18 [PATCH v7 0/4] Add basic SoC support for mediatek mt8195 Tinghan Shen
2021-12-20 12:18 ` [PATCH v7 1/4] dt-bindings: arm: mediatek: add mt8195 pericfg compatible Tinghan Shen
2021-12-24  9:19   ` AngeloGioacchino Del Regno
2021-12-20 12:18 ` [PATCH v7 2/4] dt-bindings: spi: spi-mtk-nor: add new clock name 'axi' for spi nor Tinghan Shen
2021-12-20 12:57   ` Mark Brown
2021-12-20 12:59   ` Mark Brown
2021-12-29 19:40   ` Matthias Brugger
2021-12-20 12:18 ` [PATCH v7 3/4] dt-bindings: pinctrl: mt8195: add wrapping node of pin configurations Tinghan Shen
2021-12-22 17:50   ` Rob Herring
2021-12-24  9:27   ` AngeloGioacchino Del Regno
2022-01-02  5:16   ` Linus Walleij
2021-12-20 12:18 ` [PATCH v7 4/4] arm64: dts: Add mediatek SoC mt8195 and evaluation board Tinghan Shen
2021-12-23  9:59   ` Chen-Yu Tsai
2022-01-06 11:14     ` Tinghan Shen
2022-01-07  5:43       ` Chunfeng Yun [this message]
2022-01-07  8:36       ` Chen-Yu Tsai
2022-01-07  6:19     ` Chen-Yu Tsai
2021-12-24  9:26   ` AngeloGioacchino Del Regno
2021-12-21  2:51 ` (subset) [PATCH v7 0/4] Add basic SoC support for mediatek mt8195 Mark Brown

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=6dd101e4e65ef56dbf81d67496a383a7db8cefb5.camel@mediatek.com \
    --to=chunfeng.yun@mediatek.com \
    --cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
    --cc=bayi.cheng@mediatek.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gch981213@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=sean.wang@mediatek.com \
    --cc=seiya.wang@mediatek.com \
    --cc=tinghan.shen@mediatek.com \
    --cc=wenst@chromium.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).