From patchwork Fri Feb 23 21:28:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Machek X-Patchwork-Id: 13570068 Received: from jabberwock.ucw.cz (jabberwock.ucw.cz [46.255.230.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9F4E3149388; Fri, 23 Feb 2024 21:28:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.255.230.98 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708723727; cv=none; b=V+PFmri9mGObCWEYRDDOUGbfaQhhe3aZCFHvKDrJz6A4Jm48YhfrcFa4t+LxdLrCI/QBeaPyGp9pB6VR13jTGmGJ8BaAh3sGhcEBVuI4VzxlXQJJsInC2cHhUgNUn2daVGK5gh5leEWG3Oi9FWLNG6KB6O192edYToJdtGik1uE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708723727; c=relaxed/simple; bh=DxNJF2HfobJndwwGNuoV3A/j+HNdIf1M2fN5HyV89UU=; h=Date:From:To:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition; b=ktrIol+xmth1KnhlDqhwXgHLs5yVNAwK3Elbnvu5pb+Ym6LUtvE9cEWu0wBNKNRpKfOnOIs9KABVowsA+pgnKset7DNd3Jl1MiMNdGITz9if639+HfeIlPa+EoIvrCQIIntsi9Exlg01w1bHQSPzCSaOSQQQ8gRnnPwdhRCeFcc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ucw.cz; spf=pass smtp.mailfrom=ucw.cz; dkim=pass (1024-bit key) header.d=ucw.cz header.i=@ucw.cz header.b=DMcfwQ1r; arc=none smtp.client-ip=46.255.230.98 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ucw.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ucw.cz Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ucw.cz header.i=@ucw.cz header.b="DMcfwQ1r" Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 9A52A1C006B; Fri, 23 Feb 2024 22:28:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ucw.cz; s=gen1; t=1708723722; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: references:references; bh=6xEIm2edK68HPN0TzWfyCgFMgXaReyr4GncU+XTIWD8=; b=DMcfwQ1r+t1JybfpFlCJHuyYBt6MEIzKeb2mkpYJ2QO6ipE6xUsGnF/bU5KyGUOJ3NGprB u5/Il0c/+l/OODRyjhQERLN/Nzr3u1wrYJBbF0GtYxWE50lyQDIaIPISAvcUOic1ynAYAF fcBBlUUoVOof1v5ET6HQjXQx0ao9GMo= Date: Fri, 23 Feb 2024 22:28:42 +0100 From: Pavel Machek To: phone-devel@vger.kernel.org, kernel list , 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: [PATCHv2 1/2] dt-bindings: usb: typec: anx7688: start a binding document Message-ID: References: Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline 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 --- 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 + +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 + #include + + 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 = <®_anx1v0>; + dvdd10-supply = <®_anx1v0>; + avdd18-supply = <®_ldo_io1>; + dvdd18-supply = <®_ldo_io1>; + avdd33-supply = <®_dcdc1>; + i2c-supply = <®_ldo_io0>; + vconn-supply = <®_vconn5v0>; + hdmi_vt-supply = <®_dldo1>; + + vbus-supply = <®_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>; + }; + }; + }; + }; + }; + }; +...