[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1616985818.26412.9.camel@mtksdccf07>
Date: Mon, 29 Mar 2021 10:43:38 +0800
From: Nina Wu <nina-cm.wu@...iatek.com>
To: Chun-Kuang Hu <chunkuang.hu@...nel.org>
CC: Rob Herring <robh+dt@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>,
Zhen Lei <thunder.leizhen@...wei.com>,
Neal Liu <neal.liu@...iatek.com>,
DTML <devicetree@...r.kernel.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
"moderated list:ARM/Mediatek SoC support"
<linux-mediatek@...ts.infradead.org>,
srv_heupstream <srv_heupstream@...iatek.com>,
<Jackson-kt.Chang@...iatek.com>
Subject: Re: [PATCH 1/2] dt-bindings: devapc: Update bindings
Hi, Chun-Kuang
On Sat, 2021-03-27 at 00:18 +0800, Chun-Kuang Hu wrote:
> Hi, Nina:
>
> Nina Wu <nina-cm.wu@...iatek.com> 於 2021年3月26日 週五 下午3:34寫道:
> >
> > From: Nina Wu <Nina-CM.Wu@...iatek.com>
> >
> > To support newer hardware architecture of devapc,
> > update device tree bindings.
> >
> > Signed-off-by: Nina Wu <Nina-CM.Wu@...iatek.com>
> > ---
> > .../devicetree/bindings/soc/mediatek/devapc.yaml | 41 ++++++++++++++++++++++
> > 1 file changed, 41 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/soc/mediatek/devapc.yaml b/Documentation/devicetree/bindings/soc/mediatek/devapc.yaml
> > index 31e4d3c..489f6a9 100644
> > --- a/Documentation/devicetree/bindings/soc/mediatek/devapc.yaml
> > +++ b/Documentation/devicetree/bindings/soc/mediatek/devapc.yaml
> > @@ -20,9 +20,27 @@ properties:
> > compatible:
> > enum:
> > - mediatek,mt6779-devapc
> > + - mediatek,mt8192-devapc
> > +
> > + version:
> > + description: The version of the hardware architecture
> > + $ref: /schemas/types.yaml#/definitions/uint32
> > + enum: [1, 2]
> > + maxItems: 1
> > +
> > + slave_type_num:
> > + description: The number of the devapc set
> > + $ref: /schemas/types.yaml#/definitions/uint32
> > + enum: [1, 4]
> > + maxItems: 1
> >
> > reg:
> > description: The base address of devapc register bank
> > + maxItems: 4
> > +
> > + vio_idx_num:
> > + description: The number of the devices controlled by devapc
> > + $ref: /schemas/types.yaml#/definitions/uint32-array
> > maxItems: 1
> >
> > interrupts:
> > @@ -39,7 +57,10 @@ properties:
> >
> > required:
> > - compatible
> > + - version
> > + - slave_type_num
> > - reg
> > + - vio_idx_num
> > - interrupts
> > - clocks
> > - clock-names
> > @@ -53,8 +74,28 @@ examples:
> >
> > devapc: devapc@...07000 {
> > compatible = "mediatek,mt6779-devapc";
> > + version = <1>;
>
> I think version is redundant. For example, if mt0001-devapc is
> identical to mt6779-devapc, its compatible should be
>
> compatible = "mediatek,mt0001-devapc", "mediatek,mt6779-devapc";
>
> In driver, only keep compatible for mt6779 and no mt0001 because
> mt0001 is identical to mt6779.
> In probe sequence, try first compatible string
> "mediatek,mt0001-devapc", but it does not exist in driver, so try next
> compatible string "mediatek,mt6779-devapc" and match.
> So mt0001-devapc would work as mt6779-devapc.
>
I think the version is still needed.
Because there is little difference in the registers which save debug
info.
> > + slave_type_num = <1>;
> > reg = <0x10207000 0x1000>;
> > + vio_idx_num = <511>;
> > interrupts = <GIC_SPI 168 IRQ_TYPE_LEVEL_LOW>;
> > clocks = <&infracfg_ao CLK_INFRA_DEVICE_APC>;
> > clock-names = "devapc-infra-clock";
> > };
> > + - |
> > + #include <dt-bindings/interrupt-controller/arm-gic.h>
> > + #include <dt-bindings/clock/mt8192-clk.h>
> > +
> > + devapc: devapc@...07000 {
> > + compatible = "mediatek,mt8192-devapc";
> > + version = <2>;
> > + slave_type_num = <4>;
> > + reg = <0 0x10207000 0 0x1000>,
> > + <0 0x10274000 0 0x1000>,
> > + <0 0x10275000 0 0x1000>,
> > + <0 0x11020000 0 0x1000>;
> > + vio_idx_num = <367 292 242 58>;
> > + interrupts = <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>;
> > + clocks = <&infracfg_ao CLK_INFRA_DEVICE_APC>;
> > + clock-names = "devapc-infra-clock";
> > + };
>
> It looks like that there are 4 devapc device in mt8192.
> These 4 device work independently, so I would like to decouple them
> rather than couple them.
>
> devapc0: devapc@...07000 {
> compatible = "mediatek,mt8192-devapc";
> reg = <0 0x10207000 0 0x1000>;
> vio_idx_num = <367>;
> ...
> };
>
> devapc1: devapc@...74000 {
> compatible = "mediatek,mt8192-devapc";
> reg = <0 0x10274000 0 0x1000>;
> vio_idx_num = <292>;
> ...
> };
>
> devapc2: devapc@...75000 {
> compatible = "mediatek,mt8192-devapc";
> reg = <0 0x10275000 0 0x1000>;
> vio_idx_num = <242>;
> ...
> };
>
> devapc3: devapc@...20000 {
> compatible = "mediatek,mt8192-devapc";
> reg = <0 0x11020000 0 0x1000>;
> vio_idx_num = <58>;
> ...
> };
>
I will try this with shared IRQ and re-submit another version.
> Regards,
> Chun-Kuang.
>
> > --
> > 2.6.4
> > _______________________________________________
> > Linux-mediatek mailing list
> > Linux-mediatek@...ts.infradead.org
> > https://urldefense.com/v3/__http://lists.infradead.org/mailman/listinfo/linux-mediatek__;!!CTRNKA9wMg0ARbw!02jtHESdXiknfQKFC-IqkUJOuWEjeE-GMqwk3RmPMm3_T-Xv9pmUk9Zoi2e2kvXjoKc$
Powered by blists - more mailing lists