[PATCH v2 2/2] arm64: dts: meson-t7-a311d2-khadas-vim4: add initial device-tree

Conor Dooley conor.dooley at microchip.com
Wed Jun 21 01:01:39 PDT 2023


On Wed, Jun 21, 2023 at 08:37:02AM +0100, Lucas Tanure wrote:
> On Wed, Jun 21, 2023 at 7:02 AM Krzysztof Kozlowski
> <krzysztof.kozlowski at linaro.org> wrote:
> >
> > On 21/06/2023 00:09, Yixun Lan wrote:
> > >> +            apb4: bus at fe000000 {
> > >> +                    compatible = "simple-bus";
> > >> +                    reg = <0x0 0xfe000000 0x0 0x480000>;
> > >> +                    #address-cells = <2>;
> > >> +                    #size-cells = <2>;
> > >> +                    ranges = <0x0 0x0 0x0 0xfe000000 0x0 0x480000>;
> > >> +
> > >> +                    uart_A: serial at 78000 {
> > >> +                            compatible = "amlogic,meson-t7-uart",
> > >                                               ~~~~~~~~~~~~~~~~~
> > > if you introduce new compatible string, then at least you need to document it
> > > so Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml need to be updated
> > >
> > > but my qeustion here, why bother introducing new compatible string if nothing
> > > changed with the compatible data? given the uart is same IP with g12a, can't we just
> > > use "amlogic,meson-g12-uart" for this? no only it will reduce the structure length of
> > > meson_uart_dt_match[], but also relieve maintainer's review burden?
> >
> > https://elixir.bootlin.com/linux/v6.1-rc1/source/Documentation/devicetree/bindings/writing-bindings.rst#L42
> >
> > Best regards,
> > Krzysztof
> >
> Hi, I did not understand the recommendation here.
> Can I add "amlogic,meson-t7-uart" without Documentation changes?

No, you can't.

> I think Yes, as I can see a few compatible strings in dts that don't
> exist anywhere else.

Aye, but we do not want to propagate that. New stuff should not be
adding undocumented compatibles, and those that are undocumented should
be documented.

> My idea here is to add "amlogic,meson-t7-uart" for future use if ever
> created, like if we find a bug in the future that is only relevant to
> T7 soc.
> But for now, fallback to s4 uart, as it seems to be the same controller.
> 
> >From Krzysztof said in the writing-bindings.rst, I am following the rules.
> 
> So, what's the path forward here?

You are following the rules from the dts point of view, you just need a
3rd patch in which you document the pattern you have added here in
amlogic,meson-uart.yaml. It is probably something like:
+      - items:
+          - const: amlogic,meson-t7-uart
+          - const: amlogic,meson-s4-uart
But I have not tested that, I just wrote that in my mail client.

Cheers,
Conor.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20230621/38ffb76a/attachment.sig>


More information about the linux-arm-kernel mailing list