Skip to contentSkip to conversation

arm64: dts: amlogic: add support for Orbbec Zora P1

PATCH In review Alberto Robazza 3 participants 6 messages Jul 29 – Jul 30

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

v5 cover arm64: dts: amlogic: add support for Orbbec Zora P1

The Orbbec Zora P1 is a vision development board based on the Amlogic A311D (Meson G12B) SoC, with 2 or 4 GiB LPDDR4, an Ampak AP6256 combo module (Broadcom BCM43456 Wi-Fi over SDIO and BCM4345C5 Bluetooth over UART_A), HDMI output and Gigabit Ethernet.

According to its specifications and original device tree, the board is a revised version of the ODROID-N2 with Wi-Fi, Bluetooth and an Amlogic A311D instead of the original S922X. The device tree therefore builds on meson-g12b-a311d.dtsi and meson-g12b-odroid-n2.dtsi, mirroring meson-g12b-odroid-n2-plus.dts. It extends those descriptions with the board-specific AP6256 wiring. The status LED is green instead of the original ODROID-N2 blue and has inverted polarity.

This series consists of:
Patch 1: add the "orbbec" vendor prefix.
Patch 2: document the "orbbec,zora-p1" board compatible. Patch 3: add the meson-g12b-zora-p1.dts board file and Makefile entry.

The DTB was built, validated against the amlogic.yaml binding using DT_SCHEMA_FILES, and boot-tested twice on the board. The AP6256 Wi-Fi interface enumerates and operates with the GPIOX_16 reset and PWM clock description present. Removing the wifi32k and pwm_ef descriptions causes the SDIO Wi-Fi device to stop working on this board.

---
Changes in v2:
- Investigated the apparent GPIOX_16 overlap between the SDIO power sequence reset and the 32.768 kHz PWM clock. Retained the description after two successful hardware tests; removing the clock description prevents the AP6256 Wi-Fi device from working.
- Sort the new DTB entry alphabetically in the Amlogic Makefile.
- Sort the "orbbec" entry alphabetically in vendor-prefixes.yaml.

---
Changes in v3:
- Polished meson-g12b-zora-p1.dts.
- Use proper comment with /* and */.
- Use the new bindings with function and color properties instead of label in leds node.
- Include dt-bindings/leds/common.h.

---
Changes in v4:
- Dropped unnecessary sentences from patch 1 and 2.
- Renamed "wifi32k" node to "clock-32768" as updated guidelines suggest.
---
Changes in v5:
- Add Krzysztof Kozlowski's Acked-by on patch 1/3 (given during v3 review, was accidentally dropped in v4).

Alberto Robazza (3):
dt-bindings: vendor-prefixes: add Orbbec
dt-bindings: arm: amlogic: document Orbbec Zora P1 board compatible
arm64: dts: amlogic: add support for Orbbec Zora P1

 .../devicetree/bindings/arm/amlogic.yaml      |   1 +
 .../devicetree/bindings/vendor-prefixes.yaml  |   2 +
 arch/arm64/boot/dts/amlogic/Makefile          |   1 +
 .../boot/dts/amlogic/meson-g12b-zora-p1.dts   | 105 ++++++++++++++++++
 4 files changed, 109 insertions(+)
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-zora-p1.dts
Signature · 1 line
2.55.0
#1 lore raw

PATCH v5 1/3 dt-bindings: vendor-prefixes: add Orbbec

Add the "orbbec" vendor prefix for Orbbec Inc., a manufacturer of 3D depth cameras and embedded vision boards.

---
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
index 396044f36..a42899bd2 100644
@@ -1251,6 +1251,8 @@ patternProperties:
     description: Option NV
   "^oranth,.*":
     description: Shenzhen Oranth Technology Co., Ltd.
+  "^orbbec,.*":
+    description: Orbbec Inc.
   "^ORCL,.*":
     description: Oracle Corporation
   "^orisetech,.*":
Signature · 1 line
2.55.0
#2 lore raw

PATCH v5 2/3 dt-bindings: arm: amlogic: document Orbbec Zora P1 board compatible

In reply to Alberto Robazza

Document the "orbbec,zora-p1" compatible for the Orbbec Zora P1 board, which is based on the Amlogic A311D (Meson G12B) SoC

---
 Documentation/devicetree/bindings/arm/amlogic.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/amlogic.yaml +1 -0
index 9f73a0054..2d6ecdada 100644
@@ -167,6 +167,7 @@ properties:
               - bananapi,bpi-m2s
               - khadas,vim3
               - libretech,aml-a311d-cc
+              - orbbec,zora-p1
               - radxa,zero2
           - const: amlogic,a311d
           - const: amlogic,g12b
Signature · 1 line
2.55.0
#4 lore raw

PATCH v5 3/3 arm64: dts: amlogic: add support for Orbbec Zora P1

In reply to Alberto Robazza

The Orbbec Zora P1 is an A311D (Meson G12B) board with 2/4 GiB DDR4, an Ampak AP6256 combo module (Broadcom BCM43456 Wi-Fi over SDIO and BCM4345C5 Bluetooth over UART_A).

According to the original Linux dts, the board is a modded version of the ODROID-N2, with Amlogic A311D instead of the original S922X and WiFi and Bluetooth support.
So the device tree builds on meson-g12b-a311d.dtsi and meson-g12b-odroid-n2.dtsi (using same vddcpu values of N2+), extended with the board-specific GPIO wiring for the AP6256 handling, and some modifications for the led, GPIO_ACTIVE_LOW instead of GPIO_ACTIVE_HIGH and different label (it is a green led, not blue as in the Odroid N2).
Add the new DTB to the Makefile.

---
 arch/arm64/boot/dts/amlogic/Makefile          |   1 +
 .../boot/dts/amlogic/meson-g12b-zora-p1.dts   | 105 ++++++++++++++++++
 2 files changed, 106 insertions(+)
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-zora-p1.dts
arch/arm64/boot/dts/amlogic/Makefile +1 -0
index 57bc440fa..83fb38b94 100644
@@ -40,6 +40,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-g12b-radxa-zero2.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-g12b-s922x-bananapi-m2s.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-g12b-s922x-khadas-vim3.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-g12b-ugoos-am6.dtb
+dtb-$(CONFIG_ARCH_MESON) += meson-g12b-zora-p1.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
arch/arm64/boot/dts/amlogic/meson-g12b-zora-p1.dts new file +105 -0

105 lines not on this page · raw message

Signature · 1 line
2.55.0
#5 lore raw
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider: - [High] Pin multiplexing conflict on GPIOX_16 between Wi-Fi reset and PWM clock. - [Low] The LED node…

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] Pin multiplexing conflict on GPIOX_16 between Wi-Fi reset and PWM clock.
- [Low] The LED node fails to override the legacy 'label' property, resulting in incorrect sysfs naming. --

--- Patch [3]: [PATCH v5 3/3] arm64: dts: amlogic: add support for Orbbec Zora P1 --- commit 92879b64fc9510d716492c86c79ec3e7f0eaad2f
Author: Alberto Robazza <[email protected]>

arm64: dts: amlogic: add support for Orbbec Zora P1

The Orbbec Zora P1 is an A311D (Meson G12B) board with 2/4 GiB DDR4, an Ampak AP6256 combo module (Broadcom BCM43456 Wi-Fi over SDIO and BCM4345C5 Bluetooth over UART_A).
According to the original Linux dts, the board is a modded version of the ODROID-N2, with Amlogic A311D instead of the original S922X and WiFi and Bluetooth support.

Quoted 4 lines
arch/arm64/boot/dts/amlogic/meson-g12b-zora-p1.dts new file +0 -0
new file mode 100644

[ ... ]

arch/arm64/boot/dts/amlogic/meson-g12b-zora-p1.dts line 23

Quoted 8 lines
arch/arm64/boot/dts/amlogic/meson-g12b-zora-p1.dts new file +8 -0
+	leds {
+		/* Status led on Zora is actually green, same pin as N2, but reversed polarity */
+		led-blue {
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_GREEN>;
+			gpios = <&gpio_ao GPIOAO_11 GPIO_ACTIVE_LOW>;
+		};
+	};

[Severity: Low]
Is this led-blue node missing a /delete-property/ for the label?

The device tree includes meson-g12b-odroid-n2.dtsi which defines a label property for led-blue. When the LED subsystem parses this in led_parse_fwnode_props(), it reads the inherited label and returns immediately, ignoring the newly added color and function properties.

Will this cause the LED to appear as 'n2:blue' in sysfs instead of the intended color-based name?

Quoted 15 lines
arch/arm64/boot/dts/amlogic/meson-g12b-zora-p1.dts new file +15 -0
+
+	sdio_pwrseq: sdio-pwrseq {
+		compatible = "mmc-pwrseq-simple";
+		reset-gpios = <&gpio GPIOX_16 GPIO_ACTIVE_LOW>;
+		clocks = <&clock_32768>;
+		clock-names = "ext_clock";
+	};
+
+	clock_32768: clock-32768 {
+		compatible = "pwm-clock";
+		#clock-cells = <0>;
+		clock-frequency = <32768>;
+		pwms = <&pwm_ef 0 30518 0>;
+	};
+

arch/arm64/boot/dts/amlogic/meson-g12b-zora-p1.dts line 48

Quoted 10 lines
arch/arm64/boot/dts/amlogic/meson-g12b-zora-p1.dts new file +10 -0
+	sound {
+		model = "ZORA-P1";
+	};
+};
+
+&pwm_ef {
+	status = "okay";
+	pinctrl-0 = <&pwm_e_pins>;
+	pinctrl-names = "default";
+};

[Severity: High]
Does this pin configuration create a multiplexing conflict on GPIOX_16?

The sdio_pwrseq node requests GPIOX_16 as a standard GPIO for the reset sequence. However, pwm_ef requests the pwm_e_pins pinctrl group. Based on drivers/pinctrl/meson/pinctrl-meson-g12a.c, pwm_e_pins maps directly to GPIOX_16.

Since the pinctrl subsystem prevents concurrent claims of the same pin for different functions, will one of these initializations fail and prevent Wi-Fi from working?

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=3
Acked-by on v5 2/3
#3 lore raw

Re: [PATCH v5 2/3] dt-bindings: arm: amlogic: document Orbbec Zora P1 board compatible

In reply to Alberto Robazza
Quoted 7 lines · Alberto Robazza

Document the "orbbec,zora-p1" compatible for the Orbbec Zora P1 board, which is based on the Amlogic A311D (Meson G12B) SoC

---
 Documentation/devicetree/bindings/arm/amlogic.yaml | 1 +
 1 file changed, 1 insertion(+)

Best regards,
Krzysztof