Skip to contentSkip to conversation

Documentation: devicetree: amlogic: Document P20x and ODROID-C2 boards

PATCH New Kevin Hilman 3 participants 9 messages Mar 23, 2016 – Mar 24, 2016

Subsystems (2)
lore
Share & tools
lore

Kevin Hilman

author maintainer
#0 lore raw

PATCH 1/3 Documentation: devicetree: amlogic: Document P20x and ODROID-C2 boards

Add compatible strings for Amlogic S905/GXBB based boards: Hardkernel ODROID-C2, Amlogic P200 and Amlogic P201.

---
 Documentation/devicetree/bindings/arm/amlogic.txt | 3 +++
 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/arm/amlogic.txt +3 -0
index 8a5122ab19b0..fcc6f6c10803 100644
@@ -25,3 +25,6 @@ Board compatible values:
   - "tronsmart,vega-s95-pro", "tronsmart,vega-s95" (Meson gxbb)
   - "tronsmart,vega-s95-meta", "tronsmart,vega-s95" (Meson gxbb)
   - "tronsmart,vega-s95-telos", "tronsmart,vega-s95" (Meson gxbb)
+  - "hardkernel,odroid-c2" (Meson gxbb)
+  - "amlogic,p200" (Meson gxbb)
+  - "amlogic,p201" (Meson gxbb)
Signature · 1 line
2.7.4
author maintainer
#1 lore raw

PATCH 2/3 ARM64: dts: amlogic: add Hardkernel ODROID-C2

Add minimal DT files for the Hardkernel ODROID-C2 board based on the Amlogic S905/GXBB SoC.

Used the other gxbb boards from Andreas F?rber as a starting point.

Cc Andreas F?rber <[email protected]>
Cc Carlo Caione <[email protected]>
---
 arch/arm64/boot/dts/amlogic/Makefile               |  1 +
 .../arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 65 ++++++++++++++++++++++
 2 files changed, 66 insertions(+)
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
arch/arm64/boot/dts/amlogic/Makefile +1 -0
index eb672f38f89e..a595752459e8 100644
@@ -1,3 +1,4 @@
+dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-odroidc2.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-vega-s95-pro.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-vega-s95-meta.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-vega-s95-telos.dtb
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts new file +65 -0

65 lines not on this page · raw message

Signature · 1 line
2.7.4
#2 lore raw

PATCH 2/3 ARM64: dts: amlogic: add Hardkernel ODROID-C2

Quoted 8 lines · On Wednesday 23 March 2016 11:33:32 Kevin Hilman wrote:
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts new file +7 -0
+/ {
+       compatible = "hardkernel,odroid-c2", "amlogic,meson-gxbb";
+       model = "Hardkernel ODROID-C2";
+       
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };

arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts line 65

Quoted 10 lines
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts new file +10 -0
+
+       memory at 0 {
+               device_type = "memory";
+               reg = <0x0 0x0 0x0 0x80000000>;
+       };
+};
+
+&uart_AO {
+       status = "okay";
+};

Shouldn't this also add the serial0 alias?

It seems that the .dtsi file accidentally sets an alias to a disabled device, which isn't really valid. Can you fix that when adding the .dts?

Arnd

#3 lore raw

PATCH 2/3 ARM64: dts: amlogic: add Hardkernel ODROID-C2

Am 24.03.2016 um 13:58 schrieb Arnd Bergmann:

Quoted 22 lines · On Wednesday 23 March 2016 11:33:32 Kevin Hilman wrote:
Quoted 8 lines
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts new file +7 -0
+/ {
+       compatible = "hardkernel,odroid-c2", "amlogic,meson-gxbb";
+       model = "Hardkernel ODROID-C2";
+       
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };

arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts line 65

Quoted 10 lines
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts new file +10 -0
+
+       memory at 0 {
+               device_type = "memory";
+               reg = <0x0 0x0 0x0 0x80000000>;
+       };
+};
+
+&uart_AO {
+       status = "okay";
+};

Shouldn't this also add the serial0 alias?

Quoted 3 lines

It seems that the .dtsi file accidentally sets an alias to a disabled device, which isn't really valid. Can you fix that when adding the .dts?

Hm, would it be any better to not disable either of the serials and leave the aliases in the .dtsi?

Regards,
Andreas

Signature · 2 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany
GF: Felix Imend?rffer, Jane Smithard, Graham Norton; HRB 21284 (AG N?rnberg)
author maintainer
#4 lore raw

PATCH 2/3 ARM64: dts: amlogic: add Hardkernel ODROID-C2

Quoted 24 lines · Andreas F?rber

Am 24.03.2016 um 13:58 schrieb Arnd Bergmann:

Quoted 22 lines · On Wednesday 23 March 2016 11:33:32 Kevin Hilman wrote:
Quoted 8 lines
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts new file +7 -0
+/ {
+       compatible = "hardkernel,odroid-c2", "amlogic,meson-gxbb";
+       model = "Hardkernel ODROID-C2";
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };

arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts line 65

Quoted 10 lines
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts new file +10 -0
+
+       memory at 0 {
+               device_type = "memory";
+               reg = <0x0 0x0 0x0 0x80000000>;
+       };
+};
+
+&uart_AO {
+       status = "okay";
+};

Shouldn't this also add the serial0 alias?

Quoted 6 lines
Quoted 3 lines

It seems that the .dtsi file accidentally sets an alias to a disabled device, which isn't really valid. Can you fix that when adding the .dts?

Hm, would it be any better to not disable either of the serials and leave the aliases in the .dtsi?

I'm going to respin, moving the aliases that are actually into the .dts that use them, and dropping the unused/disabled serial1.

Kevin

#5 lore raw

PATCH 2/3 ARM64: dts: amlogic: add Hardkernel ODROID-C2

Am 24.03.2016 um 18:16 schrieb Kevin Hilman:

Quoted 28 lines · Andreas F?rber
Quoted 27 lines

Am 24.03.2016 um 13:58 schrieb Arnd Bergmann:

Quoted 25 lines · On Wednesday 23 March 2016 11:33:32 Kevin Hilman wrote:
Quoted 8 lines
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts new file +7 -0
+/ {
+       compatible = "hardkernel,odroid-c2", "amlogic,meson-gxbb";
+       model = "Hardkernel ODROID-C2";
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };

arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts line 65

Quoted 10 lines
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts new file +10 -0
+
+       memory at 0 {
+               device_type = "memory";
+               reg = <0x0 0x0 0x0 0x80000000>;
+       };
+};
+
+&uart_AO {
+       status = "okay";
+};

Shouldn't this also add the serial0 alias?

It seems that the .dtsi file accidentally sets an alias to a disabled device, which isn't really valid. Can you fix that when adding the .dts?

Quoted 5 lines
Quoted 2 lines

Hm, would it be any better to not disable either of the serials and leave the aliases in the .dtsi?

I'm going to respin, moving the aliases that are actually into the .dts that use them, and dropping the unused/disabled serial1.

Carlo and me both agreed to that approach.

However @Arnd, I still don't understand how an alias to a disabled device hurts? It was not accidental on my part. And I'm pretty sure on my PowerMac's OpenFirmware I had aliases to disk devices not connected.

Using an alias to a disabled device should be no different from using the full path to a disabled device. We don't prevent the latter, so why the former?

If the serial node is disabled, the meson_uart driver won't probe and won't look up its alias. Who else uses it apart from stdout-path?

The order was intentionally always AO (always-on) bus first, and there are just two UARTs I'm aware of.

Regards,
Andreas

Signature · 2 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany
GF: Felix Imend?rffer, Jane Smithard, Graham Norton; HRB 21284 (AG N?rnberg)
#6 lore raw

PATCH 2/3 ARM64: dts: amlogic: add Hardkernel ODROID-C2

Quoted 9 lines · On Thursday 24 March 2016 18:26:18 Andreas F?rber wrote:

However @Arnd, I still don't understand how an alias to a disabled device hurts? It was not accidental on my part. And I'm pretty sure on my PowerMac's OpenFirmware I had aliases to disk devices not connected.

Using an alias to a disabled device should be no different from using the full path to a disabled device. We don't prevent the latter, so why the former?

Quoted 5 lines

If the serial node is disabled, the meson_uart driver won't probe and won't look up its alias. Who else uses it apart from stdout-path?

The order was intentionally always AO (always-on) bus first, and there are just two UARTs I'm aware of.

The aliases are supposed to reflect the numbering that is used on the board, and in most cases the SoC supports more UARTS than the board does, and not every board uses the same ones, so it's easier to always define the serial aliases in the .dts file and only list the ones that are actually wired up on the board.

With the disks in your example, the aliases would reflect the number of the connector, whether there is something on it or not, so that makes a lot of sense too.

Arnd

author maintainer
#7 lore raw

PATCH 3/3 ARM64: dts: amlogic: Add P200/P201 boards

In reply to Kevin Hilman

Add minimal DT files for the Amlogic P20x development boards, based on the Amlogic S905/GXBB SoC.

Cc Andreas F?rber <[email protected]>
Cc Carlo Caione <[email protected]>
---
 arch/arm64/boot/dts/amlogic/Makefile             |  2 +
 arch/arm64/boot/dts/amlogic/meson-gxbb-p200.dts  | 52 +++++++++++++++++++++
 arch/arm64/boot/dts/amlogic/meson-gxbb-p201.dts  | 52 +++++++++++++++++++++
 arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi | 57 ++++++++++++++++++++++++
 4 files changed, 163 insertions(+)
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxbb-p200.dts
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxbb-p201.dts
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
arch/arm64/boot/dts/amlogic/Makefile +2 -0
index a595752459e8..47ec703cb230 100644
@@ -1,4 +1,6 @@
 dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-odroidc2.dtb
+dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-p200.dtb
+dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-p201.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-vega-s95-pro.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-vega-s95-meta.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-vega-s95-telos.dtb
arch/arm64/boot/dts/amlogic/meson-gxbb-p200.dts new file +52 -0

52 lines not on this page · raw message

arch/arm64/boot/dts/amlogic/meson-gxbb-p201.dts new file +52 -0

52 lines not on this page · raw message

arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi new file +57 -0

57 lines not on this page · raw message

Signature · 1 line
2.7.4
#8 lore raw

PATCH 1/3 Documentation: devicetree: amlogic: Document P20x and ODROID-C2 boards

In reply to Kevin Hilman

Am 23.03.2016 um 19:33 schrieb Kevin Hilman:

Quoted 13 lines

Add compatible strings for Amlogic S905/GXBB based boards: Hardkernel ODROID-C2, Amlogic P200 and Amlogic P201.

---
 Documentation/devicetree/bindings/arm/amlogic.txt | 3 +++
 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/arm/amlogic.txt +0 -0
index 8a5122ab19b0..fcc6f6c10803 100644

Documentation/devicetree/bindings/arm/amlogic.txt Board compatible values: · line 30

Quoted 6 lines
Documentation/devicetree/bindings/arm/amlogic.txt +3 -0
@@ -25,3 +25,6 @@ Board compatible values:
   - "tronsmart,vega-s95-pro", "tronsmart,vega-s95" (Meson gxbb)
   - "tronsmart,vega-s95-meta", "tronsmart,vega-s95" (Meson gxbb)
   - "tronsmart,vega-s95-telos", "tronsmart,vega-s95" (Meson gxbb)
+  - "hardkernel,odroid-c2" (Meson gxbb)
+  - "amlogic,p200" (Meson gxbb)
+  - "amlogic,p201" (Meson gxbb)

Thanks,
Andreas

Signature · 2 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany
GF: Felix Imend?rffer, Jane Smithard, Graham Norton; HRB 21284 (AG N?rnberg)