Re: [PATCH 1/3] dt-bindings: power: Add power sequence for Amloigc WCN chips

From: Yang Li
Date: Mon Jul 08 2024 - 02:13:30 EST


Dear Bartosz

Thanks for your careful guidance and suggestions.

On Fri, Jul 5, 2024 at 1:13 PM Yang Li via B4 Relay
<devnull+yang.li.amlogic.com@xxxxxxxxxx> wrote:
From: Yang Li <yang.li@xxxxxxxxxxx>

Add binding document to introduce power sequence of
Amlogic WCN chips.

Hi! Thanks for the interest in this new subsystem.

Signed-off-by: Yang Li <yang.li@xxxxxxxxxxx>
---
.../bindings/power/amlogic,w155s2-pwrseq.yaml | 62 ++++++++++++++++++++++
1 file changed, 62 insertions(+)

diff --git a/Documentation/devicetree/bindings/power/amlogic,w155s2-pwrseq.yaml b/Documentation/devicetree/bindings/power/amlogic,w155s2-pwrseq.yaml
new file mode 100644
index 000000000000..f99a775fcf9b
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/amlogic,w155s2-pwrseq.yaml
@@ -0,0 +1,62 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/power/amlogic,w155s2-pwrseq.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Amlogic power sequence for WCN chips
+
+maintainers:
+ - Yang Li <yang.li@xxxxxxxxxxx>
+
+description:
+ The Amlogic WCN chip contains discrete modules for WLAN and Bluetooth. Power on
+ Bluetooth and Wi-Fi respectively, including chip_en pull-up and bt_en pull-up,
+ and generation of the 32.768KHz clock.
+
+properties:
+ compatible:
+ oneOf:
+ - const: amlogic,w155s2-pwrseq
+ - items:
+ - enum:
+ - amlogic,w265s1-pwrseq
+ - amlogic,w265p1-pwrseq
+ - amlogic,w265s2-pwrseq
+ - const: amlogic,w155s2-pwrseq
The name is wrong. There's no such device as 'pwrseq'. There's most
likely some kind of a Power Management Unit and the compatible string
must reflect this.

Yes, I got it!

I will change "pwrseq" to "pmu".

+
+ clocks:
+ maxItems: 1
+ description: clock provided to the controller (32.768KHz)
+
+ clock-names:
+ items:
+ - const: ext_clock
+
+ amlogic,chip-enable-gpios:
+ maxItems: 1
+ description: gpio specifier used to enable chipset
Why not simply: chip-enable-gpios or even enable-gpios?
Well, I will do. "amlogic,chip-enable-gpios" => "enable-gpios"

+
+ amlogic,bt-enable-gpios:
+ maxItems: 1
+ description: gpio specifier used to enable BT
+
Same here: should be simply bt-enable-gpios.

Bart
Well, I well change "amlogic,bt-enable-gpios" to "bt-enable-gpios".
+required:
+ - compatible
+ - clocks
+ - clock-names
+ - amlogic,chip-enable-gpios
+ - amlogic,bt-enable-gpios
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ wcn_pwrseq {
+ compatible = "amlogic,w155s2-pwrseq";
+ clocks = <&extclk>;
+ clock-names = "ext_clock";
+ amlogic,chip-enable-gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
+ amlogic,bt-enable-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
+ };

--
2.42.0