mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matthias Brugger <matthias.bgg@gmail.com>
To: Sam Shih <sam.shih@mediatek.com>,
	Rob Herring <robh+dt@kernel.org>,
	Hsin-Yi Wang <hsinyi@chromium.org>,
	Enric Balletbo i Serra <enric.balletbo@collabora.com>,
	Fabien Parent <fparent@baylibre.com>,
	Seiya Wang <seiya.wang@mediatek.com>,
	Sean Wang <sean.wang@mediatek.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org
Cc: John Crispin <john@phrozen.org>, Ryder Lee <Ryder.Lee@mediatek.com>
Subject: Re: [PATCH v7 2/3] arm64: dts: mediatek: add basic mt7986a support
Date: Fri, 19 Nov 2021 11:31:15 +0100	[thread overview]
Message-ID: <a4605e32-3af3-5636-6682-475bef8448d1@gmail.com> (raw)
In-Reply-To: <59963509ec833009f5c10f0a1aee91670224c6c7.camel@mediatek.com>

	

On 18/11/2021 04:48, Sam Shih wrote:
> Hi
> 
> On Tue, 2021-11-16 at 12:18 +0100, Matthias Brugger wrote:
>>
>> On 16/11/2021 02:39, Sam Shih wrote:
>>> Hi,
>>>
>>> On Mon, 2021-11-15 at 17:27 +0100, Matthias Brugger wrote:
>>>> Hi,
>>>>
>>>> On 18/10/2021 13:40, Sam Shih wrote:
>>>>> Add basic chip support for Mediatek mt7986a, include
>>>>> basic uart nodes, rng node and watchdog node.
>>>>>
>>>>> Add cpu node, timer node, gic node, psci and reserved-memory
>>>>> node
>>>>> for ARM Trusted Firmware.
>>>>>
>>>>
>>>> What is the exact difference between mt7986a and mt7986b? Right
>>>> now,
>>>> it's only
>>>> the compatible, for that it makes no sense to split them.
>>>>
>>>
>>> The difference between mt7986a and mt7986b is pinout which
>>> described
>>> in our pinctrl patch series
>>>
> https://urldefense.com/v3/__https://lore.kernel.org/all/20211022124036.5291-3-sam.shih@mediatek.com/__;!!CTRNKA9wMg0ARbw!0kseU8x1KnHHXDErh6Yj6MKqecufPEfGyeumtTBism47e99UFO2Gs-HfWjL1_jUv$
>>>   
>>>
>>> You are right, in this "basic SoC support" patch series, only show
>>> compatible differences
>>>
>>>> It would be good to see what the exact differences are, so that
>>>> we
>>>> can see if it
>>>> makes sense to have one of the alternatives:
>>>> 1) use a common mt7986.dtsi which get included by
>>>> mt7986[a,b].dtsi
>>>> 2) Use on mt7986.dtsi and only add one mt7986a.dtsi or
>>>> mt7986b.dtsi
>>>> which has
>>>> add-ons.
>>>>
>>>
>>> In this case, can we use solution (1) to create a generic
>>> mt7986.dtsi
>>> in this patch series, and add mt7986[a,b].dtsi to the dts part of
>>> the
>>> pinctrl patch series to separate the difference nodes?
>>>
>>
>> If the only difference is the GPIO controller then why not go with
>> solution 2.
>> Create a mt7986.dtsi which holds e.g. the node for pincontroller
>> mt7986a and
>> then create a mt7986b.dtsi that just changes compatible and gpio-
>> ranges:
>>
>> &pio {
>>      compatible = "mediatek,mt7986b-pinctrl";
>>      gpio-ranges = <&pio 0 0 41>, <&pio 66 66 35>;
>> }
>>
>> What do you think?
> 
> Ok,
> 
> For this basic patch series DTS, I will send the next version:
> - Use "mt7986.dtsi" instead of "mt7986[a,b].dtsi",
>    And make"mt7986.dtsi" get included by "mt7986[a,b]-rfb.dts"
>    (No dedicated uart1/uart2 pinout for mt7986b-rfb, status of dts node
> shoud be set to "disabled")
> 
> 
> For the pinctrl patch series DTS, I will send th next version:
> - Add "mt7986b.dtsi" according to your suggestion,
>    the new include
> chain will be:
>    mt7986a-rfb.dts <-- mt7986.dtsi (mt7986a pinctrl)
>   
> mt7986b-rfb.dts <-- mt7986b.dtsi (mt7986b pinctrl) <-- mt7986.dtsi
> (mt7986a pinctrl)
> 
> Do you agree above proposal?
> 

I mean something like this:
mt7986a.dtsi:
pio: pinctrl@1001f000 {
	compatible = "mediatek,mt7986a-pinctrl";
	reg = <0 0x1001f000 0 0x1000>,
	      <0 0x11c30000 0 0x1000>,
	      <0 0x11c40000 0 0x1000>,
	      <0 0x11e20000 0 0x1000>,
	      <0 0x11e30000 0 0x1000>,
	      <0 0x11f00000 0 0x1000>,
	      <0 0x11f10000 0 0x1000>,
	      <0 0x1000b000 0 0x1000>;
	reg-names = "gpio", "iocfg_rt", "iocfg_rb", "iocfg_lt",
		    "iocfg_lb", "iocfg_tr", "iocfg_tl", "eint";
	gpio-controller;
	#gpio-cells = <2>;
	gpio-ranges = <&pio 0 0 100>;
	interrupt-controller;
	interrupts = <GIC_SPI 225 IRQ_TYPE_LEVEL_HIGH>;
	interrupt-parent = <&gic>;
	#interrupt-cells = <2>;
};

mt7986b.dtsi:
#include "mt7986a.dtsi"

&pio {
      compatible = "mediatek,mt7986b-pinctrl";
      gpio-ranges = <&pio 0 0 41>, <&pio 66 66 35>;
}

mt7986b-rfb.dts:
#include "mt7986b.dtsi"

&pio {
	uart1_pins: uart1-pins {
		mux { [...]


mt7986a-rfb.dts:
#include "mt7986a.dtsi"

&pio {
	uart1_pins: uart1-pins {
		mux { [...]


Makes sense?

Regards,
Matthias


  reply	other threads:[~2021-11-19 10:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-18 11:40 [PATCH v7 0/3] Add basic SoC support for mediatek mt7986 Sam Shih
2021-10-18 11:40 ` [PATCH v7 1/3] dt-bindings: arm64: dts: mediatek: Add mt7986 series Sam Shih
2021-10-18 11:40 ` [PATCH v7 2/3] arm64: dts: mediatek: add basic mt7986a support Sam Shih
2021-11-15 16:27   ` Matthias Brugger
2021-11-16  1:39     ` Sam Shih
2021-11-16 11:18       ` Matthias Brugger
2021-11-18  3:48         ` Sam Shih
2021-11-19 10:31           ` Matthias Brugger [this message]
2021-11-22 12:46             ` Sam Shih
2021-10-18 11:40 ` [PATCH v7 3/3] arm64: dts: mediatek: add basic mt7986b support Sam Shih

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=a4605e32-3af3-5636-6682-475bef8448d1@gmail.com \
    --to=matthias.bgg@gmail.com \
    --cc=Ryder.Lee@mediatek.com \
    --cc=devicetree@vger.kernel.org \
    --cc=enric.balletbo@collabora.com \
    --cc=fparent@baylibre.com \
    --cc=hsinyi@chromium.org \
    --cc=john@phrozen.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=robh+dt@kernel.org \
    --cc=sam.shih@mediatek.com \
    --cc=sean.wang@mediatek.com \
    --cc=seiya.wang@mediatek.com \
    /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

all inboxes | Powered by JetHome®