From: Matthias Brugger <matthias.bgg@gmail.com>
To: "Bernhard Rosenkränzer" <bero@baylibre.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-usb@vger.kernel.org,
robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
tglx@linutronix.de, maz@kernel.org, lee@kernel.org,
linus.walleij@linaro.org, chunfeng.yun@mediatek.com,
gregkh@linuxfoundation.org,
angelogioacchino.delregno@collabora.com,
allen-kh.cheng@mediatek.com, nfraprado@collabora.com,
sean.wang@mediatek.com, zhiyong.tao@mediatek.com
Subject: Re: [PATCH v7 7/7] arm64: dts: mediatek: Initial mt8365-evk support
Date: Fri, 20 Jan 2023 11:57:29 +0100 [thread overview]
Message-ID: <18e6d30d-15ee-3d88-e9d3-f8dad6034760@gmail.com> (raw)
In-Reply-To: <20230101220149.3035048-8-bero@baylibre.com>
On 01/01/2023 23:01, Bernhard Rosenkränzer wrote:
> From: Fabien Parent <fparent@baylibre.com>
>
> 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.
>
> Signed-off-by: Fabien Parent <fparent@baylibre.com>
> [bero@baylibre.com: Removed parts depending on drivers that aren't upstream yet, cleanups, add CPU cache layout, add systimer, fix GIC]
> Signed-off-by: Bernhard Rosenkränzer <bero@baylibre.com>
> Tested-by: Kevin Hilman <khilman@baylibre.com>
> ---
> arch/arm64/boot/dts/mediatek/Makefile | 1 +
> arch/arm64/boot/dts/mediatek/mt8365-evk.dts | 169 +++++++++
> arch/arm64/boot/dts/mediatek/mt8365.dtsi | 378 ++++++++++++++++++++
> 3 files changed, 548 insertions(+)
> create mode 100644 arch/arm64/boot/dts/mediatek/mt8365-evk.dts
> create mode 100644 arch/arm64/boot/dts/mediatek/mt8365.dtsi
>
> diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/mediatek/Makefile
> index 813e735c5b96d..d78523c5a7dd6 100644
> --- a/arch/arm64/boot/dts/mediatek/Makefile
> +++ b/arch/arm64/boot/dts/mediatek/Makefile
> @@ -47,4 +47,5 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt8195-cherry-tomato-r2.dtb
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt8195-cherry-tomato-r3.dtb
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt8195-demo.dtb
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt8195-evb.dtb
> +dtb-$(CONFIG_ARCH_MEDIATEK) += mt8365-evk.dtb
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt8516-pumpkin.dtb
> diff --git a/arch/arm64/boot/dts/mediatek/mt8365-evk.dts b/arch/arm64/boot/dts/mediatek/mt8365-evk.dts
> new file mode 100644
> index 0000000000000..275ea3a0e7085
> --- /dev/null
> +++ b/arch/arm64/boot/dts/mediatek/mt8365-evk.dts
[...]
> + apdma: dma-controller@11000280 {
> + compatible = "mediatek,mt8365-uart-dma", "mediatek,mt6577-uart-dma";
> + reg = <0 0x11000280 0 0x80>,
> + <0 0x11000300 0 0x80>,
> + <0 0x11000380 0 0x80>,
> + <0 0x11000400 0 0x80>,
> + <0 0x11000580 0 0x80>,
> + <0 0x11000600 0 0x80>;
> + interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_LOW>,
> + <GIC_SPI 46 IRQ_TYPE_LEVEL_LOW>,
> + <GIC_SPI 47 IRQ_TYPE_LEVEL_LOW>,
> + <GIC_SPI 48 IRQ_TYPE_LEVEL_LOW>,
> + <GIC_SPI 51 IRQ_TYPE_LEVEL_LOW>,
> + <GIC_SPI 52 IRQ_TYPE_LEVEL_LOW>;
> + dma-requests = <6>;
> + clocks = <&infracfg CLK_IFR_AP_DMA>;
> + clock-names = "apdma";
> + #dma-cells = <1>;
> + };
> +
> + uart0: serial@11002000 {
> + compatible = "mediatek,mt8365-uart", "mediatek,mt6577-uart";
Unfortunately we are missing this compatible in the binding description.
> + reg = <0 0x11002000 0 0x1000>;
> + interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_LOW>;
> + clocks = <&clk26m>, <&infracfg CLK_IFR_UART0>;
> + clock-names = "baud", "bus";
> + dmas = <&apdma 0>, <&apdma 1>;
> + dma-names = "tx", "rx";
> + status = "disabled";
> + };
> +
> + uart1: serial@11003000 {
> + compatible = "mediatek,mt8365-uart", "mediatek,mt6577-uart";
> + reg = <0 0x11003000 0 0x1000>;
> + interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_LOW>;
> + clocks = <&clk26m>, <&infracfg CLK_IFR_UART1>;
> + clock-names = "baud", "bus";
> + dmas = <&apdma 2>, <&apdma 3>;
> + dma-names = "tx", "rx";
> + status = "disabled";
> + };
> +
> + uart2: serial@11004000 {
> + compatible = "mediatek,mt8365-uart", "mediatek,mt6577-uart";
> + reg = <0 0x11004000 0 0x1000>;
> + interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_LOW>;
> + clocks = <&clk26m>, <&infracfg CLK_IFR_UART2>;
> + clock-names = "baud", "bus";
> + dmas = <&apdma 4>, <&apdma 5>;
> + dma-names = "tx", "rx";
> + status = "disabled";
> + };
> +
> + pwm: pwm@11006000 {
> + compatible = "mediatek,mt8365-pwm";
> + reg = <0 0x11006000 0 0x1000>;
> + #pwm-cells = <2>;
> + interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_LOW>;
> + clocks = <&infracfg CLK_IFR_PWM_HCLK>,
> + <&infracfg CLK_IFR_PWM>,
> + <&infracfg CLK_IFR_PWM1>,
> + <&infracfg CLK_IFR_PWM2>,
> + <&infracfg CLK_IFR_PWM3>;
> + clock-names = "top", "main", "pwm1", "pwm2", "pwm3";
> + };
> +
> + spi: spi@1100a000 {
> + compatible = "mediatek,mt8365-spi", "mediatek,mt7622-spi";
> + reg = <0 0x1100a000 0 0x100>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_LOW>;
> + clocks = <&topckgen CLK_TOP_UNIVPLL2_D4>,
> + <&topckgen CLK_TOP_SPI_SEL>,
> + <&infracfg CLK_IFR_SPI0>;
> + clock-names = "parent-clk", "sel-clk", "spi-clk";
> + status = "disabled";
> + };
> +
> + ssusb: usb@11201000 {
> + compatible = "mediatek,mt8365-mtu3", "mediatek,mtu3";
Same here.
> + reg = <0 0x11201000 0 0x2e00>, <0 0x11203e00 0 0x0100>;
> + reg-names = "mac", "ippc";
> + interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_LOW>;
> + phys = <&u2port0 PHY_TYPE_USB2>,
> + <&u2port1 PHY_TYPE_USB2>;
> + clocks = <&topckgen CLK_TOP_SSUSB_TOP_CK_EN>,
> + <&infracfg CLK_IFR_SSUSB_REF>,
> + <&infracfg CLK_IFR_SSUSB_SYS>,
> + <&infracfg CLK_IFR_ICUSB>;
> + clock-names = "sys_ck", "ref_ck", "mcu_ck", "dma_ck";
> + #address-cells = <2>;
> + #size-cells = <2>;
> + ranges;
> + status = "disabled";
> +
> + usb_host: usb@11200000 {
> + compatible = "mediatek,mt8365-xhci", "mediatek,mtk-xhci";
Same here.
> + reg = <0 0x11200000 0 0x1000>;
> + reg-names = "mac";
> + interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_LOW>;
> + clocks = <&topckgen CLK_TOP_SSUSB_TOP_CK_EN>,
> + <&infracfg CLK_IFR_SSUSB_REF>,
> + <&infracfg CLK_IFR_SSUSB_SYS>,
> + <&infracfg CLK_IFR_ICUSB>,
> + <&infracfg CLK_IFR_SSUSB_XHCI>;
> + clock-names = "sys_ck", "ref_ck", "mcu_ck",
> + "dma_ck", "xhci_ck";
> + status = "disabled";
> + };
> + };
> +
> + u3phy: phy@11cc0000 {
> + compatible = "mediatek,mt8365-tphy", "mediatek,generic-tphy-v2";
> + #address-cells = <2>;
> + #size-cells = <2>;
> + #phy-cells = <1>;
> + ranges;
> +
> + u2port0: usb-phy@11cc0000 {
> + reg = <0 0x11cc0000 0 0x400>;
> + clocks = <&topckgen CLK_TOP_SSUSB_PHY_CK_EN>,
> + <&topckgen CLK_TOP_USB20_48M_EN>;
> + clock-names = "ref", "da_ref";
> + #phy-cells = <1>;
> + };
> +
> + u2port1: usb-phy@11cc1000 {
> + reg = <0 0x11cc1000 0 0x400>;
> + clocks = <&topckgen CLK_TOP_SSUSB_PHY_CK_EN>,
> + <&topckgen CLK_TOP_USB20_48M_EN>;
> + clock-names = "ref", "da_ref";
> + #phy-cells = <1>;
> + };
> + };
> + };
> +
> + timer {
> + compatible = "arm,armv8-timer";
> + interrupt-parent = <&gic>;
> + interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>,
> + <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>,
> + <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>,
> + <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>;
> + };
> +
> + system_clk: dummy13m {
> + compatible = "fixed-clock";
> + clock-frequency = <13000000>;
> + #clock-cells = <0>;
> + };
> +
> + systimer: timer@10017000 {
> + compatible = "mediatek,mt6795-systimer";
Why don't we use a compatible like
"mediatek,mt8365-systimer", "mediatek,mt6795-systimer";
We would need to add this to the binding description as well.
I leave it up to you, but I'd advise to start with a minimal working DT which
includes only the bindings that are already merged. Then we can take the new
devices like mtu3, xhci, spidev or i2c later once they are ready.
Regards,
Matthias
next prev parent reply other threads:[~2023-01-20 10:57 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-01 22:01 [PATCH v7 0/7] Add minimal MT8365 and MT8365-EVK support Bernhard Rosenkränzer
2023-01-01 22:01 ` [PATCH v7 1/7] dt-bindings: arm64: dts: mediatek: Add mt8365-evk board Bernhard Rosenkränzer
2023-01-01 22:01 ` [PATCH v7 2/7] dt-bindings: irq: mtk, sysirq: add support for mt8365 Bernhard Rosenkränzer
2023-01-01 22:01 ` [PATCH v7 3/7] dt-bindings: mfd: syscon: Add mt8365-syscfg Bernhard Rosenkränzer
2023-01-02 12:09 ` AngeloGioacchino Del Regno
2023-01-01 22:01 ` [PATCH v7 4/7] dt-bindings: pinctrl: add bindings for Mediatek MT8365 SoC Bernhard Rosenkränzer
2023-01-08 20:23 ` Rob Herring
2023-01-09 13:35 ` Linus Walleij
2023-01-19 18:21 ` Matthias Brugger
2023-01-01 22:01 ` [PATCH v7 5/7] dt-bindings: usb: mediatek,mtu3: add MT8365 SoC bindings Bernhard Rosenkränzer
2023-01-02 12:09 ` AngeloGioacchino Del Regno
2023-01-01 22:01 ` [PATCH v7 6/7] dt-bindings: usb: mediatek,mtk-xhci: " Bernhard Rosenkränzer
2023-01-01 22:01 ` [PATCH v7 7/7] arm64: dts: mediatek: Initial mt8365-evk support Bernhard Rosenkränzer
2023-01-20 10:57 ` Matthias Brugger [this message]
2023-01-23 16:10 ` Bernhard Rosenkränzer
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=18e6d30d-15ee-3d88-e9d3-f8dad6034760@gmail.com \
--to=matthias.bgg@gmail.com \
--cc=allen-kh.cheng@mediatek.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=bero@baylibre.com \
--cc=chunfeng.yun@mediatek.com \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lee@kernel.org \
--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-usb@vger.kernel.org \
--cc=maz@kernel.org \
--cc=nfraprado@collabora.com \
--cc=robh+dt@kernel.org \
--cc=sean.wang@mediatek.com \
--cc=tglx@linutronix.de \
--cc=zhiyong.tao@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;
as well as URLs for NNTP newsgroup(s).