phone-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: phone-devel@vger.kernel.org,
	kernel list <linux-kernel@vger.kernel.org>,
	fiona.klute@gmx.de, martijn@brixit.nl, samuel@sholland.org,
	heikki.krogerus@linux.intel.com, gregkh@linuxfoundation.org,
	linux-usb@vger.kernel.org, robh+dt@kernel.org,
	krzysztof.kozlowski+dt@linaro.org, devicetree@vger.kernel.org,
	megi@xff.cz
Subject: Re: [PATCHv2 1/2] dt-bindings: usb: typec: anx7688: start a binding document
Date: Mon, 11 Mar 2024 22:22:15 +0100	[thread overview]
Message-ID: <Ze92B/PPOvvrtnkA@duo.ucw.cz> (raw)
In-Reply-To: <ZdkOCqPKqa/u9Ftb@duo.ucw.cz>

[-- Attachment #1: Type: text/plain, Size: 4387 bytes --]

Hi!

> Add binding for anx7688 usb type-c bridge. I don't have a datasheet,
> but I did best I could.
> 
> Signed-off-by: Pavel Machek <pavel@ucw.cz>

Any more comments here? Automatic system told me I need to replace one
character...

Best regards,
								Pavel

> ---
> 
> v2: implement review feedback
> 
> diff --git a/Documentation/devicetree/bindings/usb/analogix,anx7688.yaml b/Documentation/devicetree/bindings/usb/analogix,anx7688.yaml
> new file mode 100644
> index 000000000000..9e887eafb5fc
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/usb/analogix,anx7688.yaml
> @@ -0,0 +1,127 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/usb/analogix,anx7688.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +# Pin names can be deduced from
> +# https://files.pine64.org/doc/PinePhone/PinePhone%20v1.2b%20Released%20Schematic.pdf
> +
> +title: Analogix ANX7688 Type-C controller
> +
> +maintainers:
> +  - Pavel Machek <pavel@ucw.cz>
> +
> +properties:
> +  compatible:
> +    enum:
> +      - analogix,anx7688
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  reset-gpios:
> +    maxItems: 1
> +    description: GPIO controlling RESET_N (B7) pin.
> +
> +  enable-gpios:
> +    maxItems: 1
> +    description: GPIO controlling POWER_EN (D2) pin.
> +
> +  cabledet-gpios:
> +    maxItems: 1
> +    description: GPIO controlling CABLE_DET (C3) pin.
> +
> +  avdd10-supply:
> +    description: 1.0V power supply going to AVDD10 (A4, ...) pins
> +
> +  dvdd10-supply:
> +    description: 1.0V power supply going to DVDD10 (D6, ...) pins
> +
> +  avdd18-supply:
> +    description: 1.8V power supply going to AVDD18 (E3, ...) pins
> +
> +  dvdd18-supply:
> +    description: 1.8V power supply going to DVDD18 (G4, ...) pins
> +
> +  avdd33-supply:
> +    description: 3.3V power supply going to AVDD33 (C4, ...) pins
> +
> +  i2c-supply: true
> +  vconn-supply: true
> +  hdmi-vt-supply: true
> +  vbus-supply: true
> +  vbus-in-supply: true
> +
> +  connector:
> +    type: object
> +    $ref: /schemas/connector/usb-connector.yaml
> +
> +    description:
> +      Properties for usb c connector.
> +
> +    properties:
> +      compatible:
> +        const: usb-c-connector
> +
> +required:
> +  - compatible
> +  - reg
> +  - connector
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +    #include <dt-bindings/gpio/gpio.h>
> +
> +    i2c {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        typec@2c {
> +            compatible = "analogix,anx7688";
> +            reg = <0x2c>;
> +            interrupts = <8 IRQ_TYPE_EDGE_FALLING>;
> +            interrupt-parent = <&gpio0>;
> +
> +            enable-gpios = <&pio 3 10 GPIO_ACTIVE_LOW>; /* PD10 */
> +            reset-gpios = <&pio 3 6 GPIO_ACTIVE_HIGH>; /* PD6 */
> +            cabledet-gpios = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
> +
> +            avdd10-supply = <&reg_anx1v0>;
> +            dvdd10-supply = <&reg_anx1v0>;
> +            avdd18-supply = <&reg_ldo_io1>;
> +            dvdd18-supply = <&reg_ldo_io1>;
> +            avdd33-supply = <&reg_dcdc1>;
> +            i2c-supply = <&reg_ldo_io0>;
> +            vconn-supply = <&reg_vconn5v0>;
> +            hdmi_vt-supply = <&reg_dldo1>;
> +
> +            vbus-supply = <&reg_usb_5v>;
> +            vbus-in-supply = <&usb_power_supply>;
> +
> +            typec_con: connector {
> +                compatible = "usb-c-connector";
> +                power-role = "dual";
> +                data-role = "dual";
> +                try-power-role = "source";
> +
> +                ports {
> +                    #address-cells = <1>;
> +                    #size-cells = <0>;
> +                    port@0 {
> +                        reg = <0>;
> +                        typec_con_ep: endpoint {
> +                            remote-endpoint = <&usbotg_hs_ep>;
> +                        };
> +                    };
> +                };
> +            };
> +        };
> +    };
> +...
> 



-- 
People of Russia, stop Putin before his war on Ukraine escalates.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

  parent reply	other threads:[~2024-03-11 21:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-09 19:51 [PATCH] dt-bindings: usb: typec: anx7688: start a binding document Pavel Machek
2024-02-11 13:56 ` Krzysztof Kozlowski
2024-02-12 11:02   ` Pavel Machek
2024-02-12 11:16     ` Krzysztof Kozlowski
2024-02-21 22:45   ` Pavel Machek
2024-02-22  8:22     ` Krzysztof Kozlowski
2024-02-23 21:28 ` [PATCHv2 1/2] " Pavel Machek
2024-02-23 22:59   ` Rob Herring
2024-03-11 21:22   ` Pavel Machek [this message]
2024-03-12 10:51     ` Krzysztof Kozlowski
2024-02-23 21:28 ` [PATCHv2 2/2] usb: typec: anx7688: Add driver for ANX7688 USB-C HDMI bridge Pavel Machek
2024-03-11 21:22   ` Pavel Machek
2024-03-12 14:12   ` Heikki Krogerus
2024-03-21 22:10     ` Pavel Machek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Ze92B/PPOvvrtnkA@duo.ucw.cz \
    --to=pavel@ucw.cz \
    --cc=devicetree@vger.kernel.org \
    --cc=fiona.klute@gmx.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=martijn@brixit.nl \
    --cc=megi@xff.cz \
    --cc=phone-devel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=samuel@sholland.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).