mbox series

[v7,0/7] Add minimal MT8365 and MT8365-EVK support

Message ID 20230101220149.3035048-1-bero@baylibre.com
Headers show
Series Add minimal MT8365 and MT8365-EVK support | expand

Message

Bernhard Rosenkränzer Jan. 1, 2023, 10:01 p.m. UTC
This adds minimal support for the MediaTek 8365 SOC and the EVK reference
board, allowing the board to boot to initramfs with serial port I/O.

v7:
  - Update GIC information in mt8365.dtsi (thanks to Marc Zyngier for
    pointing out the problem)
  - Adjust the timer to match the updated GIC information

v6:
  - Add systimer in mt8365.dtsi
  - Add I/D caches and L2 cache details in mt8365.dtsi
  - Move bl31_secmon_reserved from mt8365.dtsi to mt8365-evk.dts
  - Fix inconsistent indentation in mt8365-pinctrl example
  - Further mt8365.dtsi cleanups
  - Submit to additional maintainers spotted by get_maintainer.pl

v5:
  - Reorder top-level entries in mediatek,mt8365-pinctrl.yaml to match
    example-schema
  - Use consistent quotes

v4:
  - Remove pins-are-numbered references that have been holding things up
    now that the patches removing it from dt-bindings have landed in linux-next

v3:
  - Remove a number of components that are not yet supported (they will
    come back alongside the corresponding drivers)
  - Address issues found by dt_binding_check (mostly fixing pinctrl
    bindings)
  - Address issues pointed out in comments
  - Reorder patches

v2:
  - Add missing dt-bindings documentation
  - Small cleanups addressing issues in v1 pointed out by Krzysztof Kozlowski


Bernhard Rosenkränzer (4):
  dt-bindings: arm64: dts: mediatek: Add mt8365-evk board
  dt-bindings: irq: mtk, sysirq: add support for mt8365
  dt-bindings: mfd: syscon: Add mt8365-syscfg
  dt-bindings: pinctrl: add bindings for Mediatek MT8365 SoC

Fabien Parent (3):
  dt-bindings: usb: mediatek,mtu3: add MT8365 SoC bindings
  dt-bindings: usb: mediatek,mtk-xhci: add MT8365 SoC bindings
  arm64: dts: mediatek: Initial mt8365-evk support

 .../devicetree/bindings/arm/mediatek.yaml     |   4 +
 .../interrupt-controller/mediatek,sysirq.txt  |   1 +
 .../devicetree/bindings/mfd/syscon.yaml       |   1 +
 .../pinctrl/mediatek,mt8365-pinctrl.yaml      | 197 +++++++++
 .../bindings/usb/mediatek,mtk-xhci.yaml       |   1 +
 .../bindings/usb/mediatek,mtu3.yaml           |   1 +
 arch/arm64/boot/dts/mediatek/Makefile         |   1 +
 arch/arm64/boot/dts/mediatek/mt8365-evk.dts   | 169 ++++++++
 arch/arm64/boot/dts/mediatek/mt8365.dtsi      | 378 ++++++++++++++++++
 9 files changed, 753 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/pinctrl/mediatek,mt8365-pinctrl.yaml
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8365-evk.dts
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8365.dtsi

Comments

Bernhard Rosenkränzer Jan. 23, 2023, 4:10 p.m. UTC | #1
Hi,

On Fri, Jan 20, 2023 at 11:57 AM Matthias Brugger
<matthias.bgg@gmail.com> wrote:
> On 01/01/2023 23:01, Bernhard Rosenkränzer wrote:
> > +             uart0: serial@11002000 {
> > +                     compatible = "mediatek,mt8365-uart", "mediatek,mt6577-uart";
>
> Unfortunately we are missing this compatible in the binding description.

True, overlooked that one.

> > +             ssusb: usb@11201000 {
> > +                     compatible = "mediatek,mt8365-mtu3", "mediatek,mtu3";
>
> Same here.

This is actually added by an earlier patch within this series (5/7),
but since it isn't used anywhere yet, might as well drop it for now,
"mediatek,mtu3" by itself works.

> > +                     usb_host: usb@11200000 {
> > +                             compatible = "mediatek,mt8365-xhci", "mediatek,mtk-xhci";
>
> Same here.

Also added by an earlier patch within the series (6/7), and also not
used anywhere yet.

> > +     systimer: timer@10017000 {
> > +             compatible = "mediatek,mt6795-systimer";
>
> Why don't we use a compatible like
> "mediatek,mt8365-systimer", "mediatek,mt6795-systimer";

That was in an earlier revision and removed (because the binding
description wasn't merged yet). Can add it of course (but then
mediatek,mt8365-uart and friends should probably stay as well).

I'll post a new revision adding it back (along with the binding
description) and add the binding description for mt8365-uart as well
(getting it to the same place mediatek,mt8365-mtu3 and
mediatek,mt8365-xhci are now).
Let me know if you'd prefer a variant that drops mediatek,mt8365-uart,
mediatek,mt8365-mtu3, mediatek,mt8365-xhci and doesn't bring back
mediatek,mt8365-systimer -- either one works for me, the fallbacks are
sufficient to make it work.

ttyl
bero