Skip to contentSkip to conversation

arm64: dts: meson-gxl: add support for phicomm n1

PATCH New yangxuan8282 at gmail.com 2 participants 3 messages Oct 13, 2018 – Nov 1, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: dts: meson-gxl: add support for phicomm n1

From: He Yangxuan <[email protected]>

This patch adds support for the Phicomm N1. This device based on P230 reference design. The phy is RTL8211F, need to disable Energy Efficient Ethernet (EEE) to make it stable. And this box doesn't have cvbs, so disable related section in device tree.

---
 arch/arm64/boot/dts/amlogic/Makefile               |  1 +
 .../dts/amlogic/meson-gxl-s905d-phicomm-n1.dts     | 32 ++++++++++++++++++++++
 2 files changed, 33 insertions(+)
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxl-s905d-phicomm-n1.dts
arch/arm64/boot/dts/amlogic/Makefile +1 -0
index a97c0e2d7..ebd96da2c 100644
@@ -17,6 +17,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-nexbox-a95x.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-p212.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-p230.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-p231.dtb
+dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-phicomm-n1.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s805x-p241.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905w-p281.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905w-tx3-mini.dtb
arch/arm64/boot/dts/amlogic/meson-gxl-s905d-phicomm-n1.dts new file +32 -0
new file mode 100644
index 000000000..1daf58df0
@@ -0,0 +1,32 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2018 He Yangxuan
+ */
+
+/dts-v1/;
+
+#include "meson-gxl-s905d-p230.dts"
+
+/ {
+	compatible = "phicomm,n1", "amlogic,s905d", "amlogic,meson-gxl";
+	model = "Phicomm N1";
+
+	cvbs-connector {
+		status = "disabled";
+	};
+};
+
+&cvbs_vdac_port {
+	status = "disabled";
+};
+
+&external_mdio {
+	external_phy: ethernet-phy at 0 {
+		compatible = "ethernet-phy-id001c.c916", "ethernet-phy-ieee802.3-c22";
+		reg = <0>;
+		eee-broken-1000t;
+		max-speed = <1000>;
+		interrupt-parent = <&gpio_intc>;
+		interrupts = <29 IRQ_TYPE_LEVEL_LOW>;
+	};
+};
Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/1 arm64: dts: meson-gxl: add support for phicomm n1

Hi,

many thanks for your patch!

Quoted 6 lines · On Sat, Oct 13, 2018 at 11:45 AM <[email protected]> wrote:

From: He Yangxuan <[email protected]>

This patch adds support for the Phicomm N1. This device based on P230 reference design. The phy is RTL8211F, need to disable Energy Efficient Ethernet (EEE) to make it stable. And this box doesn't have cvbs, so disable related section in device tree.

do you have any hint how to connect the serial console on the PCB?

Quoted 26 lines
---
 arch/arm64/boot/dts/amlogic/Makefile               |  1 +
 .../dts/amlogic/meson-gxl-s905d-phicomm-n1.dts     | 32 ++++++++++++++++++++++
 2 files changed, 33 insertions(+)
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxl-s905d-phicomm-n1.dts
arch/arm64/boot/dts/amlogic/Makefile +1 -0
index a97c0e2d7..ebd96da2c 100644
@@ -17,6 +17,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-nexbox-a95x.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-p212.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-p230.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-p231.dtb
+dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-phicomm-n1.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s805x-p241.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905w-p281.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905w-tx3-mini.dtb
arch/arm64/boot/dts/amlogic/meson-gxl-s905d-phicomm-n1.dts new file +1 -0
new file mode 100644
index 000000000..1daf58df0
@@ -0,0 +1,32 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)

arch/arm64/boot/dts/amlogic/meson-gxl-s905d-phicomm-n1.dts line 11

Quoted 10 lines
arch/arm64/boot/dts/amlogic/meson-gxl-s905d-phicomm-n1.dts new file +10 -0
+/*
+ * Copyright (c) 2018 He Yangxuan
+ */
+
+/dts-v1/;
+
+#include "meson-gxl-s905d-p230.dts"
+
+/ {
+       compatible = "phicomm,n1", "amlogic,s905d", "amlogic,meson-gxl";

the "phicomm" vendor-prefix should be documented in devicetree/bindings/vendor-prefixes.txt (in a separate pach) additionally "phicomm,n1" should be documented in Documentation/devicetree/bindings/arm/amlogic.txt (in a separate patch as well)

Quoted 4 lines
arch/arm64/boot/dts/amlogic/meson-gxl-s905d-phicomm-n1.dts new file +4 -0
+       model = "Phicomm N1";
+
+       cvbs-connector {
+               status = "disabled";

arch/arm64/boot/dts/amlogic/meson-gxl-s905d-phicomm-n1.dts line 25

Quoted 10 lines
arch/arm64/boot/dts/amlogic/meson-gxl-s905d-phicomm-n1.dts new file +10 -0
+       };
+};
+
+&cvbs_vdac_port {
+       status = "disabled";
+};
+
+&external_mdio {
+       external_phy: ethernet-phy at 0 {
+               compatible = "ethernet-phy-id001c.c916", "ethernet-phy-ieee802.3-c22";

please don't use a "ethernet-phy-id..." compatible
see commit 7630ea4bda18df "Documentation: net: phy: improve explanation when to specify the PHY ID" for the reason why (when the documentation was updated we already used "ethernet-phy-id..." for some boards)

arch/arm64/boot/dts/amlogic/meson-gxl-s905d-phicomm-n1.dts line 29

Quoted 4 lines
arch/arm64/boot/dts/amlogic/meson-gxl-s905d-phicomm-n1.dts new file +4 -0
+               reg = <0>;
+               eee-broken-1000t;
+               max-speed = <1000>;
+               interrupt-parent = <&gpio_intc>;

please add a comment here stating to which GPIO IRQ 29 belongs to (see meson-gxm-khadas-vim2.dts for an example)

Quoted 11 lines
arch/arm64/boot/dts/amlogic/meson-gxl-s905d-phicomm-n1.dts new file +3 -1
+               interrupts = <29 IRQ_TYPE_LEVEL_LOW>;
+       };
+};
--

2.11.0

_______________________________________________
linux-amlogic mailing list
linux-amlogic at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

Regards
Martin

#2 lore raw

PATCH 1/1 arm64: dts: meson-gxl: add support for phicomm n1

Quoted 4 lines · Martin Blumenstingl

Hi,

many thanks for your patch!

Quoted 8 lines
Quoted 6 lines · On Sat, Oct 13, 2018 at 11:45 AM <[email protected]> wrote:

From: He Yangxuan <[email protected]>

This patch adds support for the Phicomm N1. This device based on P230 reference design. The phy is RTL8211F, need to disable Energy Efficient Ethernet (EEE) to make it stable. And this box doesn't have cvbs, so disable related section in device tree.

do you have any hint how to connect the serial console on the PCB?

I did not connect to serial my self, but other user say it's possible to connect it, details here: http://www.right.com.cn/forum/thread-324996-1-1.html

Quoted 33 lines
Quoted 33 lines
---
 arch/arm64/boot/dts/amlogic/Makefile               |  1 +
 .../dts/amlogic/meson-gxl-s905d-phicomm-n1.dts     | 32 ++++++++++++++++++++++
 2 files changed, 33 insertions(+)
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxl-s905d-phicomm-n1.dts
arch/arm64/boot/dts/amlogic/Makefile +1 -0
index a97c0e2d7..ebd96da2c 100644
@@ -17,6 +17,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-nexbox-a95x.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-p212.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-p230.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-p231.dtb
+dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-phicomm-n1.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s805x-p241.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905w-p281.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905w-tx3-mini.dtb
arch/arm64/boot/dts/amlogic/meson-gxl-s905d-phicomm-n1.dts new file +8 -0
new file mode 100644
index 000000000..1daf58df0
@@ -0,0 +1,32 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2018 He Yangxuan
+ */
+
+/dts-v1/;
+
+#include "meson-gxl-s905d-p230.dts"
Quoted 8 lines

arch/arm64/boot/dts/amlogic/meson-gxl-s905d-phicomm-n1.dts line 11

Quoted 3 lines
arch/arm64/boot/dts/amlogic/meson-gxl-s905d-phicomm-n1.dts new file +3 -0
+
+/ {
+       compatible = "phicomm,n1", "amlogic,s905d", "amlogic,meson-gxl";

the "phicomm" vendor-prefix should be documented in devicetree/bindings/vendor-prefixes.txt (in a separate pach) additionally "phicomm,n1" should be documented in Documentation/devicetree/bindings/arm/amlogic.txt (in a separate patch as well)

I will submit separate patch later for vendor.

Quoted 34 lines
Quoted 4 lines
arch/arm64/boot/dts/amlogic/meson-gxl-s905d-phicomm-n1.dts new file +4 -0
+       model = "Phicomm N1";
+
+       cvbs-connector {
+               status = "disabled";

arch/arm64/boot/dts/amlogic/meson-gxl-s905d-phicomm-n1.dts line 25

Quoted 10 lines
arch/arm64/boot/dts/amlogic/meson-gxl-s905d-phicomm-n1.dts new file +10 -0
+       };
+};
+
+&cvbs_vdac_port {
+       status = "disabled";
+};
+
+&external_mdio {
+       external_phy: ethernet-phy at 0 {
+               compatible = "ethernet-phy-id001c.c916", "ethernet-phy-ieee802.3-c22";

please don't use a "ethernet-phy-id..." compatible
see commit 7630ea4bda18df "Documentation: net: phy: improve explanation when to specify the PHY ID" for the reason why (when the documentation was updated we already used "ethernet-phy-id..." for some boards)

arch/arm64/boot/dts/amlogic/meson-gxl-s905d-phicomm-n1.dts line 29

Quoted 4 lines
arch/arm64/boot/dts/amlogic/meson-gxl-s905d-phicomm-n1.dts new file +4 -0
+               reg = <0>;
+               eee-broken-1000t;
+               max-speed = <1000>;
+               interrupt-parent = <&gpio_intc>;

please add a comment here stating to which GPIO IRQ 29 belongs to (see meson-gxm-khadas-vim2.dts for an example)

Quoted 7 lines
arch/arm64/boot/dts/amlogic/meson-gxl-s905d-phicomm-n1.dts new file +3 -1
+               interrupts = <29 IRQ_TYPE_LEVEL_LOW>;
+       };
+};
--

2.11.0

Quoted 8 lines
Quoted 4 lines

_______________________________________________
linux-amlogic mailing list
linux-amlogic at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

Regards
Martin

Neil Armstrong suggest me in IRC just keep different part from meson-gxl-s905d-p230.dts, so the external phy part should simple like this:

&external_mdio {
        external_phy: ethernet-phy at 0 {
                /* Realtek RTL8211F (0x001cc916) */
                eee-broken-1000t;
        };
};

Yangxuan