2017-09-19 12:05:59

by Neil Armstrong

[permalink] [raw]
Subject: [PATCH 0/2] ARM64: Add Vega S96 board support

This patchset adds support for the Tronsmart Vega S96 TV Box based
on the Q200 Amlogic Reference design.

Neil Armstrong (2):
ARM64: dts: meson-gxm: Add Vega S96 board
dt-bindings: arm: amlogic: Add Tronsmart Vega S96 binding

Documentation/devicetree/bindings/arm/amlogic.txt | 1 +
arch/arm64/boot/dts/amlogic/Makefile | 1 +
arch/arm64/boot/dts/amlogic/meson-gxm-vega-s96.dts | 39 ++++++++++++++++++++++
3 files changed, 41 insertions(+)
create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxm-vega-s96.dts

--
1.9.1


2017-09-19 12:06:02

by Neil Armstrong

[permalink] [raw]
Subject: [PATCH 2/2] dt-bindings: arm: amlogic: Add Tronsmart Vega S96 binding

Cc: [email protected]
Signed-off-by: Oleg <[email protected]>
Signed-off-by: Neil Armstrong <[email protected]>
---
Documentation/devicetree/bindings/arm/amlogic.txt | 1 +
1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/arm/amlogic.txt b/Documentation/devicetree/bindings/arm/amlogic.txt
index 4e4bc0b..d6163ac 100644
--- a/Documentation/devicetree/bindings/arm/amlogic.txt
+++ b/Documentation/devicetree/bindings/arm/amlogic.txt
@@ -73,6 +73,7 @@ Board compatible values (alphabetically, grouped by SoC):
- "amlogic,q201" (Meson gxm s912)
- "kingnovel,r-box-pro" (Meson gxm S912)
- "nexbox,a1" (Meson gxm s912)
+ - "tronsmart,vega-s96" (Meson gxm s912)

Amlogic Meson Firmware registers Interface
------------------------------------------
--
1.9.1

2017-09-19 12:06:26

by Neil Armstrong

[permalink] [raw]
Subject: [PATCH 1/2] ARM64: dts: meson-gxm: Add Vega S96 board

The Tronsmart Vega S96 is a TV box derived from Amlogic q200 reference design.

Cc: [email protected]
Signed-off-by: Oleg <[email protected]>
Signed-off-by: Neil Armstrong <[email protected]>
---
arch/arm64/boot/dts/amlogic/Makefile | 1 +
arch/arm64/boot/dts/amlogic/meson-gxm-vega-s96.dts | 39 ++++++++++++++++++++++
2 files changed, 40 insertions(+)
create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxm-vega-s96.dts

diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
index 7a9f48c..a6c4a06 100644
--- a/arch/arm64/boot/dts/amlogic/Makefile
+++ b/arch/arm64/boot/dts/amlogic/Makefile
@@ -19,6 +19,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxm-nexbox-a1.dtb
dtb-$(CONFIG_ARCH_MESON) += meson-gxm-q200.dtb
dtb-$(CONFIG_ARCH_MESON) += meson-gxm-q201.dtb
dtb-$(CONFIG_ARCH_MESON) += meson-gxm-rbox-pro.dtb
+dtb-$(CONFIG_ARCH_MESON) += meson-gxm-vega-s96.dtb

always := $(dtb-y)
subdir-y := $(dts-dirs)
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-vega-s96.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-vega-s96.dts
new file mode 100644
index 0000000..ba74240
--- /dev/null
+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-vega-s96.dts
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2017 BayLibre, SAS.
+ * Author: Neil Armstrong <[email protected]>
+ * Copyright (c) 2017 Oleg <[email protected]>
+ *
+ * SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+ */
+
+/dts-v1/;
+
+#include "meson-gxm.dtsi"
+#include "meson-gx-p23x-q20x.dtsi"
+
+/ {
+ compatible = "tronsmart,vega-s96", "amlogic,s912", "amlogic,meson-gxm";
+ model = "Tronsmart Vega S96";
+
+};
+
+&ethmac {
+ pinctrl-0 = <&eth_pins>;
+ pinctrl-names = "default";
+
+ /* Select external PHY by default */
+ phy-handle = <&external_phy>;
+
+ amlogic,tx-delay-ns = <2>;
+
+ /* External PHY is in RGMII */
+ phy-mode = "rgmii";
+};
+
+&external_mdio {
+ external_phy: ethernet-phy@0 {
+ compatible = "ethernet-phy-id001c.c916", "ethernet-phy-ieee802.3-c22";
+ reg = <0>;
+ max-speed = <1000>;
+ };
+};
--
1.9.1

2017-09-19 15:01:25

by Jerome Brunet

[permalink] [raw]
Subject: Re: [PATCH 1/2] ARM64: dts: meson-gxm: Add Vega S96 board

On Tue, 2017-09-19 at 14:05 +0200, Neil Armstrong wrote:
> The Tronsmart Vega S96 is a TV box derived from Amlogic q200 reference design.
>
> Cc: [email protected]
> Signed-off-by: Oleg <[email protected]>

Does Oleg have a surname ? :)

> Signed-off-by: Neil Armstrong <[email protected]>
> ---
> arch/arm64/boot/dts/amlogic/Makefile | 1 +
> arch/arm64/boot/dts/amlogic/meson-gxm-vega-s96.dts | 39
> ++++++++++++++++++++++
> 2 files changed, 40 insertions(+)
> create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxm-vega-s96.dts
>
> diff --git a/arch/arm64/boot/dts/amlogic/Makefile
> b/arch/arm64/boot/dts/amlogic/Makefile
> index 7a9f48c..a6c4a06 100644
> --- a/arch/arm64/boot/dts/amlogic/Makefile
> +++ b/arch/arm64/boot/dts/amlogic/Makefile
> @@ -19,6 +19,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxm-nexbox-a1.dtb
> dtb-$(CONFIG_ARCH_MESON) += meson-gxm-q200.dtb
> dtb-$(CONFIG_ARCH_MESON) += meson-gxm-q201.dtb
> dtb-$(CONFIG_ARCH_MESON) += meson-gxm-rbox-pro.dtb
> +dtb-$(CONFIG_ARCH_MESON) += meson-gxm-vega-s96.dtb
>
> always := $(dtb-y)
> subdir-y := $(dts-dirs)
> diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-vega-s96.dts
> b/arch/arm64/boot/dts/amlogic/meson-gxm-vega-s96.dts
> new file mode 100644
> index 0000000..ba74240
> --- /dev/null
> +++ b/arch/arm64/boot/dts/amlogic/meson-gxm-vega-s96.dts
> @@ -0,0 +1,39 @@
> +/*
> + * Copyright (c) 2017 BayLibre, SAS.
> + * Author: Neil Armstrong <[email protected]>
> + * Copyright (c) 2017 Oleg <[email protected]>
> + *
> + * SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> + */
> +
> +/dts-v1/;
> +
> +#include "meson-gxm.dtsi"
> +#include "meson-gx-p23x-q20x.dtsi"
> +
> +/ {
> + compatible = "tronsmart,vega-s96", "amlogic,s912", "amlogic,meson-
> gxm";
> + model = "Tronsmart Vega S96";
> +
> +};
> +
> +&ethmac {
> + pinctrl-0 = <&eth_pins>;
> + pinctrl-names = "default";
> +
> + /* Select external PHY by default */
> + phy-handle = <&external_phy>;
> +
> + amlogic,tx-delay-ns = <2>;
> +
> + /* External PHY is in RGMII */
> + phy-mode = "rgmii";
> +};
> +
> +&external_mdio {
> + external_phy: ethernet-phy@0 {
> + compatible = "ethernet-phy-id001c.c916", "ethernet-phy-
> ieee802.3-c22";
> + reg = <0>;
> + max-speed = <1000>;
I don't think this max-speed property is necessary

> + };
> +};

2017-09-19 15:03:36

by Jerome Brunet

[permalink] [raw]
Subject: Re: [PATCH 0/2] ARM64: Add Vega S96 board support

On Tue, 2017-09-19 at 14:05 +0200, Neil Armstrong wrote:
> This patchset adds support for the Tronsmart Vega S96 TV Box based
> on the Q200 Amlogic Reference design.
>
> Neil Armstrong (2):
> ARM64: dts: meson-gxm: Add Vega S96 board
> dt-bindings: arm: amlogic: Add Tronsmart Vega S96 binding
>
> Documentation/devicetree/bindings/arm/amlogic.txt | 1 +
> arch/arm64/boot/dts/amlogic/Makefile | 1 +
> arch/arm64/boot/dts/amlogic/meson-gxm-vega-s96.dts | 39
> ++++++++++++++++++++++
> 3 files changed, 41 insertions(+)
> create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxm-vega-s96.dts
>

Apart from the 2 comments on patch 1, Series looks good to me
With this fixed, feel free to add

Acked-by: Jerome Brunet <[email protected]>

2017-09-19 17:51:49

by Martin Blumenstingl

[permalink] [raw]
Subject: Re: [PATCH 1/2] ARM64: dts: meson-gxm: Add Vega S96 board

Hi Neil,

On Tue, Sep 19, 2017 at 2:05 PM, Neil Armstrong <[email protected]> wrote:
> The Tronsmart Vega S96 is a TV box derived from Amlogic q200 reference design.
>
> Cc: [email protected]
> Signed-off-by: Oleg <[email protected]>
> Signed-off-by: Neil Armstrong <[email protected]>
> ---
> arch/arm64/boot/dts/amlogic/Makefile | 1 +
> arch/arm64/boot/dts/amlogic/meson-gxm-vega-s96.dts | 39 ++++++++++++++++++++++
> 2 files changed, 40 insertions(+)
> create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxm-vega-s96.dts
>
> diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
> index 7a9f48c..a6c4a06 100644
> --- a/arch/arm64/boot/dts/amlogic/Makefile
> +++ b/arch/arm64/boot/dts/amlogic/Makefile
> @@ -19,6 +19,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxm-nexbox-a1.dtb
> dtb-$(CONFIG_ARCH_MESON) += meson-gxm-q200.dtb
> dtb-$(CONFIG_ARCH_MESON) += meson-gxm-q201.dtb
> dtb-$(CONFIG_ARCH_MESON) += meson-gxm-rbox-pro.dtb
> +dtb-$(CONFIG_ARCH_MESON) += meson-gxm-vega-s96.dtb
>
> always := $(dtb-y)
> subdir-y := $(dts-dirs)
> diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-vega-s96.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-vega-s96.dts
> new file mode 100644
> index 0000000..ba74240
> --- /dev/null
> +++ b/arch/arm64/boot/dts/amlogic/meson-gxm-vega-s96.dts
> @@ -0,0 +1,39 @@
> +/*
> + * Copyright (c) 2017 BayLibre, SAS.
> + * Author: Neil Armstrong <[email protected]>
> + * Copyright (c) 2017 Oleg <[email protected]>
> + *
> + * SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> + */
> +
> +/dts-v1/;
> +
> +#include "meson-gxm.dtsi"
> +#include "meson-gx-p23x-q20x.dtsi"
> +
> +/ {
> + compatible = "tronsmart,vega-s96", "amlogic,s912", "amlogic,meson-gxm";
> + model = "Tronsmart Vega S96";
> +
> +};
> +
> +&ethmac {
> + pinctrl-0 = <&eth_pins>;
> + pinctrl-names = "default";
> +
> + /* Select external PHY by default */
> + phy-handle = <&external_phy>;
> +
> + amlogic,tx-delay-ns = <2>;
> +
> + /* External PHY is in RGMII */
> + phy-mode = "rgmii";
> +};
> +
> +&external_mdio {
> + external_phy: ethernet-phy@0 {
> + compatible = "ethernet-phy-id001c.c916", "ethernet-phy-ieee802.3-c22";
some time ago I thought it was smart to add a compatible string with the PHY ID.
this was until I figured out that it should only be done if the PHY
reports an invalid ID: [0]
that's why most .dts files that I've touched skip the "compatible"
property and use a comment like "/* Realtek RTL8211F (0x001cc916) */"
instead

> + reg = <0>;
> + max-speed = <1000>;
> + };
> +};
> --
> 1.9.1
>
>
> _______________________________________________
> linux-amlogic mailing list
> [email protected]
> http://lists.infradead.org/mailman/listinfo/linux-amlogic


Regards,
Martin


[0] https://github.com/torvalds/linux/commit/7630ea4bda18df2ee1c64dfdca1724a9cc32f920

2017-09-19 18:18:40

by Oleg

[permalink] [raw]
Subject: Re: [PATCH 1/2] ARM64: dts: meson-gxm: Add Vega S96 board



> Does Oleg have a surname ? :)
Yes, there is Ivanov :)



>> + reg = <0>;
>> + max-speed = <1000>;
> I don't think this max-speed property is necessary
>
>> + };
>> +};

I will try to test and write the result.

2017-09-20 08:28:29

by Neil Armstrong

[permalink] [raw]
Subject: Re: [PATCH 1/2] ARM64: dts: meson-gxm: Add Vega S96 board

On 09/19/2017 08:12 PM, Oleg wrote:
>
>
>> Does Oleg have a surname ? :)
> Yes, there is Ivanov  :)

Ok, then can I replace the Signed-off-bys with "Signed-off-by: Oleg Ivanov <[email protected]>" ?

>
>
>
>>> +        reg = <0>;
>>> +        max-speed = <1000>;
>> I don't think this max-speed property is necessary
>>
>>> +    };
>>> +};
>
> I will try to test and write the result.

Great, thanks !

Neil

2017-09-20 08:36:33

by Neil Armstrong

[permalink] [raw]
Subject: Re: [PATCH 1/2] ARM64: dts: meson-gxm: Add Vega S96 board

On 09/19/2017 07:51 PM, Martin Blumenstingl wrote:
> Hi Neil,
>
> On Tue, Sep 19, 2017 at 2:05 PM, Neil Armstrong <[email protected]> wrote:
>> The Tronsmart Vega S96 is a TV box derived from Amlogic q200 reference design.
>>
>> Cc: [email protected]
>> Signed-off-by: Oleg <[email protected]>
>> Signed-off-by: Neil Armstrong <[email protected]>
>> ---
>> arch/arm64/boot/dts/amlogic/Makefile | 1 +
>> arch/arm64/boot/dts/amlogic/meson-gxm-vega-s96.dts | 39 ++++++++++++++++++++++
>> 2 files changed, 40 insertions(+)
>> create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxm-vega-s96.dts
>>
>> diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
>> index 7a9f48c..a6c4a06 100644
>> --- a/arch/arm64/boot/dts/amlogic/Makefile
>> +++ b/arch/arm64/boot/dts/amlogic/Makefile
>> @@ -19,6 +19,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxm-nexbox-a1.dtb
>> dtb-$(CONFIG_ARCH_MESON) += meson-gxm-q200.dtb
>> dtb-$(CONFIG_ARCH_MESON) += meson-gxm-q201.dtb
>> dtb-$(CONFIG_ARCH_MESON) += meson-gxm-rbox-pro.dtb
>> +dtb-$(CONFIG_ARCH_MESON) += meson-gxm-vega-s96.dtb
>>
>> always := $(dtb-y)
>> subdir-y := $(dts-dirs)
>> diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-vega-s96.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-vega-s96.dts
>> new file mode 100644
>> index 0000000..ba74240
>> --- /dev/null
>> +++ b/arch/arm64/boot/dts/amlogic/meson-gxm-vega-s96.dts
>> @@ -0,0 +1,39 @@
>> +/*
>> + * Copyright (c) 2017 BayLibre, SAS.
>> + * Author: Neil Armstrong <[email protected]>
>> + * Copyright (c) 2017 Oleg <[email protected]>
>> + *
>> + * SPDX-License-Identifier: (GPL-2.0+ OR MIT)
>> + */
>> +
>> +/dts-v1/;
>> +
>> +#include "meson-gxm.dtsi"
>> +#include "meson-gx-p23x-q20x.dtsi"
>> +
>> +/ {
>> + compatible = "tronsmart,vega-s96", "amlogic,s912", "amlogic,meson-gxm";
>> + model = "Tronsmart Vega S96";
>> +
>> +};
>> +
>> +&ethmac {
>> + pinctrl-0 = <&eth_pins>;
>> + pinctrl-names = "default";
>> +
>> + /* Select external PHY by default */
>> + phy-handle = <&external_phy>;
>> +
>> + amlogic,tx-delay-ns = <2>;
>> +
>> + /* External PHY is in RGMII */
>> + phy-mode = "rgmii";
>> +};
>> +
>> +&external_mdio {
>> + external_phy: ethernet-phy@0 {
>> + compatible = "ethernet-phy-id001c.c916", "ethernet-phy-ieee802.3-c22";
> some time ago I thought it was smart to add a compatible string with the PHY ID.
> this was until I figured out that it should only be done if the PHY
> reports an invalid ID: [0]
> that's why most .dts files that I've touched skip the "compatible"
> property and use a comment like "/* Realtek RTL8211F (0x001cc916) */"
> instead

Done, thanks !

Neil

>
>> + reg = <0>;
>> + max-speed = <1000>;
>> + };
>> +};
>> --
>> 1.9.1
>>
>>
>> _______________________________________________
>> linux-amlogic mailing list
>> [email protected]
>> http://lists.infradead.org/mailman/listinfo/linux-amlogic
>
>
> Regards,
> Martin
>
>
> [0] https://github.com/torvalds/linux/commit/7630ea4bda18df2ee1c64dfdca1724a9cc32f920
>

2017-09-20 10:55:52

by Oleg

[permalink] [raw]
Subject: Re: [PATCH 1/2] ARM64: dts: meson-gxm: Add Vega S96 board


> Ok, then can I replace the Signed-off-bys with "Signed-off-by: Oleg Ivanov <[email protected]>" ?
>

Yes, that's right. Thanks for the patch.

2017-09-21 23:41:34

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH 2/2] dt-bindings: arm: amlogic: Add Tronsmart Vega S96 binding

On Tue, Sep 19, 2017 at 02:05:48PM +0200, Neil Armstrong wrote:
> Cc: [email protected]
> Signed-off-by: Oleg <[email protected]>
> Signed-off-by: Neil Armstrong <[email protected]>
> ---
> Documentation/devicetree/bindings/arm/amlogic.txt | 1 +
> 1 file changed, 1 insertion(+)

Acked-by: Rob Herring <[email protected]>

2017-09-27 12:31:59

by Oleg

[permalink] [raw]
Subject: Re: [PATCH 1/2] ARM64: dts: meson-gxm: Add Vega S96 board


>>>> + reg = <0>;
>>>> + max-speed = <1000>;
>>> I don't think this max-speed property is necessary
>>>
>>>> + };
>>>> +};
>> I will try to test and write the result.
> Great, thanks !
>
> Neil
I removed two strings and checked on Vega s96,
the wired network works fine.

+&external_mdio {
+ external_phy: ethernet-phy@0 {
+ /* Realtek RTL8211F (0x001cc916) */
+ reg = <0>;
+ };
+};