[RFC,3/4] arm64: dts: meson-gxbb: add support for Videostrong KII Pro
diff mbox series

Message ID 20191117175606.5050-4-mohammad.rasim96@gmail.com
State Superseded
Headers show
Series
  • add support for videostrong KII Pro
Related show

Commit Message

Mohammad Rasim Nov. 17, 2019, 5:56 p.m. UTC
This patch adds support for the Videostrong KII Pro tv box which is based on the gxbb-p201 reference design

Signed-off-by: Mohammad Rasim <mohammad.rasim96@gmail.com>
---
 arch/arm64/boot/dts/amlogic/Makefile          |  1 +
 .../boot/dts/amlogic/meson-gxbb-kii-pro.dts   | 39 +++++++++++++++++++
 2 files changed, 40 insertions(+)
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts

Comments

Neil Armstrong Nov. 18, 2019, 10:26 a.m. UTC | #1
On 17/11/2019 18:56, Mohammad Rasim wrote:
> This patch adds support for the Videostrong KII Pro tv box which is based on the gxbb-p201 reference design
> 
> Signed-off-by: Mohammad Rasim <mohammad.rasim96@gmail.com>
> ---
>  arch/arm64/boot/dts/amlogic/Makefile          |  1 +
>  .../boot/dts/amlogic/meson-gxbb-kii-pro.dts   | 39 +++++++++++++++++++
>  2 files changed, 40 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts
> 
> diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
> index 84afecba9ec0..a795a170dcab 100644
> --- a/arch/arm64/boot/dts/amlogic/Makefile
> +++ b/arch/arm64/boot/dts/amlogic/Makefile
> @@ -6,6 +6,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-g12a-x96-max.dtb
>  dtb-$(CONFIG_ARCH_MESON) += meson-g12b-a311d-khadas-vim3.dtb
>  dtb-$(CONFIG_ARCH_MESON) += meson-g12b-s922x-khadas-vim3.dtb
>  dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2.dtb
> +dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-kii-pro.dtb
>  dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nanopi-k2.dtb
>  dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nexbox-a95x.dtb
>  dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-odroidc2.dtb
> diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts
> new file mode 100644
> index 000000000000..b63dabb7bf97
> --- /dev/null
> +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts
> @@ -0,0 +1,39 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +/*
> +/* Copyright (c) 2019 Mohammad Rasim <mohammad.rasim96@gmail.com>
> +*/
> +
> +/dts-v1/;
> +
> +#include "meson-gxbb-p20x.dtsi"
> +
> +/ {
> +	compatible = "videostrong,kii-pro", "amlogic,p201", "amlogic,s905", "amlogic,meson-gxbb";
> +	model = "Videostrong KII Pro";
> +
> +
> +};
> +
> +&uart_A {
> +	status = "okay";
> +	pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
> +	pinctrl-names = "default";
> +	uart-has-rtscts;
> +
> +	bluetooth {
> +		compatible = "brcm,bcm4335a0";

Use "brcm,bcm43438-bt" here if the I/F is compatible.

> +	};
> +};
> +
> +&ethmac {
> +	status = "okay";
> +	pinctrl-0 = <&eth_rmii_pins>;
> +	pinctrl-names = "default";
> +	phy-mode = "rmii";
> +
> +	snps,reset-gpio = <&gpio GPIOZ_14 0>;
> +	snps,reset-delays-us = <0>, <10000>, <1000000>;
> +	snps,reset-active-low> +};
> +
> +
> 

Did you try to determine the PHY and add a PHY node aswell ? The reset stuff could go in the PHY node.

Neil
Mohammad Rasim Nov. 18, 2019, 7:21 p.m. UTC | #2
On 19/11/18 11:26AM, Neil Armstrong wrote:
> On 17/11/2019 18:56, Mohammad Rasim wrote:
> > This patch adds support for the Videostrong KII Pro tv box which is based on the gxbb-p201 reference design
> > 
> > Signed-off-by: Mohammad Rasim <mohammad.rasim96@gmail.com>
> > ---
> >  arch/arm64/boot/dts/amlogic/Makefile          |  1 +
> >  .../boot/dts/amlogic/meson-gxbb-kii-pro.dts   | 39 +++++++++++++++++++
> >  2 files changed, 40 insertions(+)
> >  create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts
> > 
> > diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
> > index 84afecba9ec0..a795a170dcab 100644
> > --- a/arch/arm64/boot/dts/amlogic/Makefile
> > +++ b/arch/arm64/boot/dts/amlogic/Makefile
> > @@ -6,6 +6,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-g12a-x96-max.dtb
> >  dtb-$(CONFIG_ARCH_MESON) += meson-g12b-a311d-khadas-vim3.dtb
> >  dtb-$(CONFIG_ARCH_MESON) += meson-g12b-s922x-khadas-vim3.dtb
> >  dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2.dtb
> > +dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-kii-pro.dtb
> >  dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nanopi-k2.dtb
> >  dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nexbox-a95x.dtb
> >  dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-odroidc2.dtb
> > diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts
> > new file mode 100644
> > index 000000000000..b63dabb7bf97
> > --- /dev/null
> > +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts
> > @@ -0,0 +1,39 @@
> > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> > +/*
> > +/* Copyright (c) 2019 Mohammad Rasim <mohammad.rasim96@gmail.com>
> > +*/
> > +
> > +/dts-v1/;
> > +
> > +#include "meson-gxbb-p20x.dtsi"
> > +
> > +/ {
> > +	compatible = "videostrong,kii-pro", "amlogic,p201", "amlogic,s905", "amlogic,meson-gxbb";
> > +	model = "Videostrong KII Pro";
> > +
> > +
> > +};
> > +
> > +&uart_A {
> > +	status = "okay";
> > +	pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
> > +	pinctrl-names = "default";
> > +	uart-has-rtscts;
> > +
> > +	bluetooth {
> > +		compatible = "brcm,bcm4335a0";
> 
> Use "brcm,bcm43438-bt" here if the I/F is compatible.
> 
> > +	};
> > +};
> > +
> > +&ethmac {
> > +	status = "okay";
> > +	pinctrl-0 = <&eth_rmii_pins>;
> > +	pinctrl-names = "default";
> > +	phy-mode = "rmii";
> > +
> > +	snps,reset-gpio = <&gpio GPIOZ_14 0>;
> > +	snps,reset-delays-us = <0>, <10000>, <1000000>;
> > +	snps,reset-active-low> +};
> > +
> > +
> > 
> 
> Did you try to determine the PHY and add a PHY node aswell ? The reset stuff could go in the PHY node.
looking at the PCB I can see the phy is "IP101GR" so I thought I can use
the phy node of nextbox-a95x [0] but I get these errors:

```
[   15.867041] meson8b-dwmac c9410000.ethernet eth0: no phy at addr -1
[   15.867079] meson8b-dwmac c9410000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19)
```

[0] https://github.com/torvalds/linux/blob/f9717178b9be9477877d4c3776c61ff56d854ddf/arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts#L165-L177
> 
> Neil

Patch
diff mbox series

diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
index 84afecba9ec0..a795a170dcab 100644
--- a/arch/arm64/boot/dts/amlogic/Makefile
+++ b/arch/arm64/boot/dts/amlogic/Makefile
@@ -6,6 +6,7 @@  dtb-$(CONFIG_ARCH_MESON) += meson-g12a-x96-max.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-g12b-a311d-khadas-vim3.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-g12b-s922x-khadas-vim3.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2.dtb
+dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-kii-pro.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nanopi-k2.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nexbox-a95x.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-odroidc2.dtb
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts
new file mode 100644
index 000000000000..b63dabb7bf97
--- /dev/null
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts
@@ -0,0 +1,39 @@ 
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+/* Copyright (c) 2019 Mohammad Rasim <mohammad.rasim96@gmail.com>
+*/
+
+/dts-v1/;
+
+#include "meson-gxbb-p20x.dtsi"
+
+/ {
+	compatible = "videostrong,kii-pro", "amlogic,p201", "amlogic,s905", "amlogic,meson-gxbb";
+	model = "Videostrong KII Pro";
+
+
+};
+
+&uart_A {
+	status = "okay";
+	pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
+	pinctrl-names = "default";
+	uart-has-rtscts;
+
+	bluetooth {
+		compatible = "brcm,bcm4335a0";
+	};
+};
+
+&ethmac {
+	status = "okay";
+	pinctrl-0 = <&eth_rmii_pins>;
+	pinctrl-names = "default";
+	phy-mode = "rmii";
+
+	snps,reset-gpio = <&gpio GPIOZ_14 0>;
+	snps,reset-delays-us = <0>, <10000>, <1000000>;
+	snps,reset-active-low;
+};
+
+