Re: [PATCH v7 5/6] MIPS: X1000: Add missing X1000 nodes.

Paul Cercueil
2019-12-09T15:15:32Z

Hi Zhou,

Le lun., déc. 9, 2019 at 21:00, 周琰杰 (Zhou Yanjie)
<zhouyanjie@wanyeetech.com> a écrit :
> Add the appropriate DT node to probe pdma/msc/rtc/watchdog/ethernet
> driver using the devicetree.
>
> Signed-off-by: 周琰杰 (Zhou Yanjie) <zhouyanjie@wanyeetech.com>
> ---
>
> Notes:
> v7:
> New patch, merge[05/12],[07/12],[09/12],[11/12] in v6.
>
> arch/mips/boot/dts/ingenic/x1000.dtsi | 96
> +++++++++++++++++++++++++++++++++++
> 1 file changed, 96 insertions(+)
>
> diff --git a/arch/mips/boot/dts/ingenic/x1000.dtsi
> b/arch/mips/boot/dts/ingenic/x1000.dtsi
> index 13a6c9ff..398a756 100644
> --- a/arch/mips/boot/dts/ingenic/x1000.dtsi
> +++ b/arch/mips/boot/dts/ingenic/x1000.dtsi
> @@ -1,5 +1,6 @@
> // SPDX-License-Identifier: GPL-2.0
> #include <dt-bindings/clock/x1000-cgu.h>
> +#include <dt-bindings/dma/x1000-dma.h>
>
> / {
> #address-cells = <1>;
> @@ -68,6 +69,25 @@
> interrupts = <27 26 25>;
> };
>
> + wdt: watchdog@10002000 {
> + compatible = "ingenic,x1000-watchdog", "ingenic,jz4780-watchdog";
> + reg = <0x10002000 0x10>;
> +
> + clocks = <&cgu X1000_CLK_RTCLK>;
> + clock-names = "rtc";
> + };

The watchdog node should be a children of the TCU node, see
Documentation/devicetree/bindings/timer/ingenic,tcu.txt

> +
> + rtc: rtc@10003000 {
> + compatible = "ingenic,x1000-rtc", "ingenic,jz4780-rtc";
> + reg = <0x10003000 0x4c>;
> +
> + interrupt-parent = <&intc>;
> + interrupts = <32>;
> +
> + clocks = <&cgu X1000_CLK_RTCLK>;
> + clock-names = "rtc";
> + };
> +
> pinctrl: pin-controller@10010000 {
> compatible = "ingenic,x1000-pinctrl";
> reg = <0x10010000 0x800>;
> @@ -173,4 +193,80 @@
>
> status = "disabled";
> };
> +
> + pdma: dma-controller@13420000 {
> + compatible = "ingenic,x1000-dma";
> + reg = <0x13420000 0x400
> + 0x13421000 0x40>;
> + #dma-cells = <2>;
> +
> + interrupt-parent = <&intc>;
> + interrupts = <10>;
> +
> + clocks = <&cgu X1000_CLK_PDMA>;
> + };
> +
> + mac: mac@134b0000 {

Please name the nodes according to the devicetree specification; this
should be 'ethernet@134b0000'.

> + compatible = "ingenic,x1000-mac", "snps,dwmac";
> + reg = <0x134b0000 0x2000>;
> +
> + interrupt-parent = <&intc>;
> + interrupts = <55>;
> + interrupt-names = "macirq";
> +
> + clocks = <&cgu X1000_CLK_MAC>;
> + clock-names = "stmmaceth";
> +
> + status = "disabled";
> +
> + mdio: mdio {
> + compatible = "snps,dwmac-mdio";
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + status = "disabled";
> + };
> + };
> +
> + msc0: msc@13450000 {

This should be 'mmc@13450000'

> + compatible = "ingenic,x1000-mmc";
> + reg = <0x13450000 0x1000>;
> +
> + interrupt-parent = <&intc>;
> + interrupts = <37>;
> +
> + clocks = <&cgu X1000_CLK_MSC0>;
> + clock-names = "mmc";
> +
> + cap-sd-highspeed;
> + cap-mmc-highspeed;
> + cap-sdio-irq;
> +
> + dmas = <&pdma X1000_DMA_MSC0_RX 0xffffffff>,
> + <&pdma X1000_DMA_MSC0_TX 0xffffffff>;
> + dma-names = "rx", "tx";
> +
> + status = "disabled";
> + };
> +
> + msc1: msc@13460000 {

This should be 'mmc@13460000'.

Cheers,
-Paul

> + compatible = "ingenic,x1000-mmc";
> + reg = <0x13460000 0x1000>;
> +
> + interrupt-parent = <&intc>;
> + interrupts = <36>;
> +
> + clocks = <&cgu X1000_CLK_MSC1>;
> + clock-names = "mmc";
> +
> + cap-sd-highspeed;
> + cap-mmc-highspeed;
> + cap-sdio-irq;
> +
> + dmas = <&pdma X1000_DMA_MSC1_RX 0xffffffff>,
> + <&pdma X1000_DMA_MSC1_TX 0xffffffff>;
> + dma-names = "rx", "tx";
> +
> + status = "disabled";
> + };
> };
> --
> 2.7.4
>