Re: [RFC PATCH v2 1/3] ramips: add support for the RT6855A SoC

2020-12-28 Thread Daniel Golle
On Mon, Dec 28, 2020 at 02:16:29PM +0100, Adrian Schmutzler wrote:
> Hi,
> 
> some additional (general) remarks below.
> 
> > -Original Message-
> > From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org]
> > On Behalf Of Rafaël Carré
> > Sent: Montag, 28. Dezember 2020 01:25
> > To: openwrt-devel@lists.openwrt.org
> > Cc: Rafaël Carré 
> > Subject: [RFC PATCH v2 1/3] ramips: add support for the RT6855A SoC
> > 
> > Add Linksys WAP300N target
> > 
> > Signed-off-by: Rafaël Carré 
> > ---
> > Changes since v1:
> > - Use OpenWrt .dts (CONFIG_MIPS_RAW_APPENDED_DTB)
> > - clean up rt6855a.mk
> > - add case/esac in /etc/board.d/*
> > - tidy up config-5.4
> > 
> >  target/linux/ramips/Makefile  |   2 +-
> >  target/linux/ramips/dts/rt6855a.dtsi  | 190 ++
> >  .../ramips/dts/rt6855a_linksys_wap300n.dts|  22 ++
> >  target/linux/ramips/image/Makefile|   1 +
> >  target/linux/ramips/image/rt6855a.mk  |  12 +
> >  .../rt6855a/base-files/etc/board.d/01_leds|  17 +
> >  .../rt6855a/base-files/etc/board.d/02_network |  17 +
> >  .../base-files/etc/board.d/03_gpio_switches   |  16 +
> >  target/linux/ramips/rt6855a/config-5.4| 344 ++
> >  .../ramips/rt6855a/profiles/00-default.mk |  17 +
> >  target/linux/ramips/rt6855a/target.mk |  15 +
> >  11 files changed, 652 insertions(+), 1 deletion(-)  create mode 100644
> > target/linux/ramips/dts/rt6855a.dtsi
> >  create mode 100644 target/linux/ramips/dts/rt6855a_linksys_wap300n.dts
> >  create mode 100644 target/linux/ramips/image/rt6855a.mk
> >  create mode 100755 target/linux/ramips/rt6855a/base-
> > files/etc/board.d/01_leds
> >  create mode 100755 target/linux/ramips/rt6855a/base-
> > files/etc/board.d/02_network
> >  create mode 100755 target/linux/ramips/rt6855a/base-
> > files/etc/board.d/03_gpio_switches
> >  create mode 100644 target/linux/ramips/rt6855a/config-5.4
> >  create mode 100644 target/linux/ramips/rt6855a/profiles/00-default.mk
> >  create mode 100644 target/linux/ramips/rt6855a/target.mk
> > 
> > diff --git a/target/linux/ramips/Makefile b/target/linux/ramips/Makefile
> > index c3d118b2ab..f03118c1aa 100644
> > --- a/target/linux/ramips/Makefile
> > +++ b/target/linux/ramips/Makefile
> > @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk  ARCH:=mipsel
> > BOARD:=ramips  BOARDNAME:=MediaTek Ralink MIPS
> > -SUBTARGETS:=mt7620 mt7621 mt76x8 rt288x rt305x rt3883
> > +SUBTARGETS:=mt7620 mt7621 mt76x8 rt288x rt305x rt3883 rt6855a
> >  FEATURES:=squashfs gpio
> > 
> >  KERNEL_PATCHVER:=5.4
> > diff --git a/target/linux/ramips/dts/rt6855a.dtsi
> > b/target/linux/ramips/dts/rt6855a.dtsi
> > new file mode 100644
> > index 00..76cd3da568
> > --- /dev/null
> > +++ b/target/linux/ramips/dts/rt6855a.dtsi
> > @@ -0,0 +1,190 @@
> > +// SPDX-License-Identifier: GPL-2.0
> 
> Please add /dts-v1/; here, with empty line before and after.
> 
> > +/ {
> > +   #address-cells = <1>;
> > +   #size-cells = <1>;
> > +   compatible = "ralink,rt6855a-soc";
> > +
> > +   cpus {
> > +   cpu@0 {
> > +   compatible = "mips,mips34Kc";
> > +   };
> > +   };
> > +
> > +   cpuintc: cpuintc {
> > +   #address-cells = <0>;
> > +   #interrupt-cells = <1>;
> > +   interrupt-controller;
> > +   compatible = "mti,cpu-interrupt-controller";
> > +   };
> > +
> > +   palmbus@1fb0 {
> > +   compatible = "palmbus";
> > +   reg = <0x1fb0 0xe>;
> > +   ranges = <0x0 0x1fb0 0x10>;
> > +
> > +   #address-cells = <1>;
> > +   #size-cells = <1>;
> > +
> > +   sysc@800 {
> > +   compatible = "ralink,rt6855a-sysc";
> > +   reg = <0x800 0x100>;
> > +   };
> > +
> > +   intc: intc@4 {
> > +   compatible = "ralink,rt6855a-intc";
> > +   reg = <0x4 0x100>;
> > +
> > +   interrupt-controller;
> > +   #interrupt-cells = <1>;
> > +
> > +   interrupt-parent = <>;
> > +   };
> > +
> > +   memc@300 {
> > +   compatible = "ralink,rt6855a-memc", "ralink,rt3050-
> > memc";
> > +   reg = <0x300 0x100>;
> > +   };
> > +
> > +   watchdog@f0100 {
> > +   compatible = "ralink,rt6855a-wdt";
> > +   reg = <0xf0100 0x10>;
> > +   };
> > +
> > +   uart: uart@f {
> > +   compatible = "ns8250";
> > +   reg = <0xf 0x30>;
> > +   interrupts = <0>;
> > +
> > +   clock-frequency = <921600>;
> > +
> > +   reg-io-width = <4>;
> > +   reg-shift = <2>;
> > +   no-loopback-test;
> > +
> > +   status = "okay";
> > +
> > +   interrupt-parent = <>;
> > +   };
> > +
> > +   gdma: gdma@3 {

RE: [RFC PATCH v2 1/3] ramips: add support for the RT6855A SoC

2020-12-28 Thread Adrian Schmutzler
Hi,

some additional (general) remarks below.

> -Original Message-
> From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org]
> On Behalf Of Rafaël Carré
> Sent: Montag, 28. Dezember 2020 01:25
> To: openwrt-devel@lists.openwrt.org
> Cc: Rafaël Carré 
> Subject: [RFC PATCH v2 1/3] ramips: add support for the RT6855A SoC
> 
> Add Linksys WAP300N target
> 
> Signed-off-by: Rafaël Carré 
> ---
> Changes since v1:
> - Use OpenWrt .dts (CONFIG_MIPS_RAW_APPENDED_DTB)
> - clean up rt6855a.mk
> - add case/esac in /etc/board.d/*
> - tidy up config-5.4
> 
>  target/linux/ramips/Makefile  |   2 +-
>  target/linux/ramips/dts/rt6855a.dtsi  | 190 ++
>  .../ramips/dts/rt6855a_linksys_wap300n.dts|  22 ++
>  target/linux/ramips/image/Makefile|   1 +
>  target/linux/ramips/image/rt6855a.mk  |  12 +
>  .../rt6855a/base-files/etc/board.d/01_leds|  17 +
>  .../rt6855a/base-files/etc/board.d/02_network |  17 +
>  .../base-files/etc/board.d/03_gpio_switches   |  16 +
>  target/linux/ramips/rt6855a/config-5.4| 344 ++
>  .../ramips/rt6855a/profiles/00-default.mk |  17 +
>  target/linux/ramips/rt6855a/target.mk |  15 +
>  11 files changed, 652 insertions(+), 1 deletion(-)  create mode 100644
> target/linux/ramips/dts/rt6855a.dtsi
>  create mode 100644 target/linux/ramips/dts/rt6855a_linksys_wap300n.dts
>  create mode 100644 target/linux/ramips/image/rt6855a.mk
>  create mode 100755 target/linux/ramips/rt6855a/base-
> files/etc/board.d/01_leds
>  create mode 100755 target/linux/ramips/rt6855a/base-
> files/etc/board.d/02_network
>  create mode 100755 target/linux/ramips/rt6855a/base-
> files/etc/board.d/03_gpio_switches
>  create mode 100644 target/linux/ramips/rt6855a/config-5.4
>  create mode 100644 target/linux/ramips/rt6855a/profiles/00-default.mk
>  create mode 100644 target/linux/ramips/rt6855a/target.mk
> 
> diff --git a/target/linux/ramips/Makefile b/target/linux/ramips/Makefile
> index c3d118b2ab..f03118c1aa 100644
> --- a/target/linux/ramips/Makefile
> +++ b/target/linux/ramips/Makefile
> @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk  ARCH:=mipsel
> BOARD:=ramips  BOARDNAME:=MediaTek Ralink MIPS
> -SUBTARGETS:=mt7620 mt7621 mt76x8 rt288x rt305x rt3883
> +SUBTARGETS:=mt7620 mt7621 mt76x8 rt288x rt305x rt3883 rt6855a
>  FEATURES:=squashfs gpio
> 
>  KERNEL_PATCHVER:=5.4
> diff --git a/target/linux/ramips/dts/rt6855a.dtsi
> b/target/linux/ramips/dts/rt6855a.dtsi
> new file mode 100644
> index 00..76cd3da568
> --- /dev/null
> +++ b/target/linux/ramips/dts/rt6855a.dtsi
> @@ -0,0 +1,190 @@
> +// SPDX-License-Identifier: GPL-2.0

Please add /dts-v1/; here, with empty line before and after.

> +/ {
> + #address-cells = <1>;
> + #size-cells = <1>;
> + compatible = "ralink,rt6855a-soc";
> +
> + cpus {
> + cpu@0 {
> + compatible = "mips,mips34Kc";
> + };
> + };
> +
> + cpuintc: cpuintc {
> + #address-cells = <0>;
> + #interrupt-cells = <1>;
> + interrupt-controller;
> + compatible = "mti,cpu-interrupt-controller";
> + };
> +
> + palmbus@1fb0 {
> + compatible = "palmbus";
> + reg = <0x1fb0 0xe>;
> + ranges = <0x0 0x1fb0 0x10>;
> +
> + #address-cells = <1>;
> + #size-cells = <1>;
> +
> + sysc@800 {
> + compatible = "ralink,rt6855a-sysc";
> + reg = <0x800 0x100>;
> + };
> +
> + intc: intc@4 {
> + compatible = "ralink,rt6855a-intc";
> + reg = <0x4 0x100>;
> +
> + interrupt-controller;
> + #interrupt-cells = <1>;
> +
> + interrupt-parent = <>;
> + };
> +
> + memc@300 {
> + compatible = "ralink,rt6855a-memc", "ralink,rt3050-
> memc";
> + reg = <0x300 0x100>;
> + };
> +
> + watchdog@f0100 {
> + compatible = "ralink,rt6855a-wdt";
> + reg = <0xf0100 0x10>;
> + };
> +
> + uart: uart@f {
> + compatible = "ns8250";
> + reg = <0xf 0x30>;
> + interrupts = <0>;
> +
> + clock-frequency = <921600>;
> +
> + reg-io-width = <4>;
> + reg-shift = <2>;
> + no-loopback-test;
> +
> + status = "okay";
> +
> + interrupt-parent = <>;
> + };
> +
> + gdma: gdma@3 {
> + compatible = "ralink,gdma-rt2880";
> + reg = <0x3 0x100>;
> + };
> +
> +ethernet: ethernet@5{
> +compatible = "ralink,rt6855a-eth";
> +reg =