2023-07-23 15:07:12

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH v2] dt-bindings: mfd: maxim,max77693: Add USB connector

Add micro-USB connector under "muic" node to properly represent the
hardware. Deprecate also the old "max77693-muic" in favor of generic
"muic" (this is max77693, so there is no need to state it in its child
nodes). This "muic" node is used only to instantiate MUIC driver by
compatible, thus actual Linux driver changes are needed. Extend the
example with this new code.

Signed-off-by: Krzysztof Kozlowski <[email protected]>

---

Changes in v2:
1. Put connector node in the muic node (Henrik).
2. Rename max77693-muic -> muic.
3. Extend example.

DTS change using this:
https://lore.kernel.org/linux-samsung-soc/[email protected]/T/#u
---
.../bindings/mfd/maxim,max77693.yaml | 48 +++++++++++++++++++
1 file changed, 48 insertions(+)

diff --git a/Documentation/devicetree/bindings/mfd/maxim,max77693.yaml b/Documentation/devicetree/bindings/mfd/maxim,max77693.yaml
index 1b06a77ec798..6a6f222b868f 100644
--- a/Documentation/devicetree/bindings/mfd/maxim,max77693.yaml
+++ b/Documentation/devicetree/bindings/mfd/maxim,max77693.yaml
@@ -37,6 +37,7 @@ properties:
max77693-muic:
type: object
additionalProperties: false
+ deprecated: true

properties:
compatible:
@@ -45,6 +46,21 @@ properties:
required:
- compatible

+ muic:
+ type: object
+ additionalProperties: false
+
+ properties:
+ compatible:
+ const: maxim,max77693-muic
+
+ connector:
+ $ref: /schemas/connector/usb-connector.yaml#
+ unevaluatedProperties: false
+
+ required:
+ - compatible
+
motor-driver:
type: object
additionalProperties: false
@@ -107,6 +123,38 @@ examples:
};
};

+ muic {
+ compatible = "maxim,max77693-muic";
+
+ connector {
+ compatible = "samsung,usb-connector-11pin",
+ "usb-b-connector";
+ label = "micro-USB";
+ type = "micro";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ muic_to_usb: endpoint {
+ remote-endpoint = <&usb_to_muic>;
+ };
+ };
+
+ port@3 {
+ reg = <3>;
+
+ muic_to_mhl: endpoint {
+ remote-endpoint = <&mhl_to_muic>;
+ };
+ };
+ };
+ };
+ };
+
motor-driver {
compatible = "maxim,max77693-haptic";
haptic-supply = <&ldo26_reg>;
--
2.34.1



2023-07-23 22:00:32

by Chanwoo Choi

[permalink] [raw]
Subject: Re: [PATCH v2] dt-bindings: mfd: maxim,max77693: Add USB connector

On 23. 7. 23. 23:28, Krzysztof Kozlowski wrote:
> Add micro-USB connector under "muic" node to properly represent the
> hardware. Deprecate also the old "max77693-muic" in favor of generic
> "muic" (this is max77693, so there is no need to state it in its child
> nodes). This "muic" node is used only to instantiate MUIC driver by
> compatible, thus actual Linux driver changes are needed. Extend the
> example with this new code.
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
>
> ---
>
> Changes in v2:
> 1. Put connector node in the muic node (Henrik).
> 2. Rename max77693-muic -> muic.
> 3. Extend example.
>
> DTS change using this:
> https://lore.kernel.org/linux-samsung-soc/[email protected]/T/#u
> ---
> .../bindings/mfd/maxim,max77693.yaml | 48 +++++++++++++++++++
> 1 file changed, 48 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/mfd/maxim,max77693.yaml b/Documentation/devicetree/bindings/mfd/maxim,max77693.yaml
> index 1b06a77ec798..6a6f222b868f 100644
> --- a/Documentation/devicetree/bindings/mfd/maxim,max77693.yaml
> +++ b/Documentation/devicetree/bindings/mfd/maxim,max77693.yaml
> @@ -37,6 +37,7 @@ properties:
> max77693-muic:
> type: object
> additionalProperties: false
> + deprecated: true
>
> properties:
> compatible:
> @@ -45,6 +46,21 @@ properties:
> required:
> - compatible
>
> + muic:
> + type: object
> + additionalProperties: false
> +
> + properties:
> + compatible:
> + const: maxim,max77693-muic
> +
> + connector:
> + $ref: /schemas/connector/usb-connector.yaml#
> + unevaluatedProperties: false
> +
> + required:
> + - compatible
> +
> motor-driver:
> type: object
> additionalProperties: false
> @@ -107,6 +123,38 @@ examples:
> };
> };
>
> + muic {
> + compatible = "maxim,max77693-muic";
> +
> + connector {
> + compatible = "samsung,usb-connector-11pin",
> + "usb-b-connector";
> + label = "micro-USB";
> + type = "micro";
> +
> + ports {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + port@0 {
> + reg = <0>;
> +
> + muic_to_usb: endpoint {
> + remote-endpoint = <&usb_to_muic>;
> + };
> + };
> +
> + port@3 {
> + reg = <3>;
> +
> + muic_to_mhl: endpoint {
> + remote-endpoint = <&mhl_to_muic>;
> + };
> + };
> + };
> + };
> + };
> +
> motor-driver {
> compatible = "maxim,max77693-haptic";
> haptic-supply = <&ldo26_reg>;

Reviewed-by: Chanwoo Choi <[email protected]>

Thanks.

--
Best Regards,
Samsung Electronics
Chanwoo Choi


2023-07-24 16:55:28

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH v2] dt-bindings: mfd: maxim,max77693: Add USB connector


On Sun, 23 Jul 2023 16:28:42 +0200, Krzysztof Kozlowski wrote:
> Add micro-USB connector under "muic" node to properly represent the
> hardware. Deprecate also the old "max77693-muic" in favor of generic
> "muic" (this is max77693, so there is no need to state it in its child
> nodes). This "muic" node is used only to instantiate MUIC driver by
> compatible, thus actual Linux driver changes are needed. Extend the
> example with this new code.
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
>
> ---
>
> Changes in v2:
> 1. Put connector node in the muic node (Henrik).
> 2. Rename max77693-muic -> muic.
> 3. Extend example.
>
> DTS change using this:
> https://lore.kernel.org/linux-samsung-soc/[email protected]/T/#u
> ---
> .../bindings/mfd/maxim,max77693.yaml | 48 +++++++++++++++++++
> 1 file changed, 48 insertions(+)
>

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


2023-07-28 11:34:56

by Lee Jones

[permalink] [raw]
Subject: Re: (subset) [PATCH v2] dt-bindings: mfd: maxim,max77693: Add USB connector

On Sun, 23 Jul 2023 16:28:42 +0200, Krzysztof Kozlowski wrote:
> Add micro-USB connector under "muic" node to properly represent the
> hardware. Deprecate also the old "max77693-muic" in favor of generic
> "muic" (this is max77693, so there is no need to state it in its child
> nodes). This "muic" node is used only to instantiate MUIC driver by
> compatible, thus actual Linux driver changes are needed. Extend the
> example with this new code.
>
> [...]

Applied, thanks!

[1/1] dt-bindings: mfd: maxim,max77693: Add USB connector
commit: 0ddf8139e205a2adba575a552d7520f6e1849b7d

--
Lee Jones [李琼斯]