From patchwork Sun Oct 1 08:11:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abdel Alkuor X-Patchwork-Id: 147103 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp892878vqb; Sun, 1 Oct 2023 07:11:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGJv53JE+ze+pX6kgHTFZuOtHCX3idbF1645pkRAm+u87UNaFte3z6YBn7tLVFwfkLVWdaq X-Received: by 2002:a17:902:e74a:b0:1c3:9f2b:4d08 with SMTP id p10-20020a170902e74a00b001c39f2b4d08mr9421227plf.20.1696169517585; Sun, 01 Oct 2023 07:11:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696169517; cv=none; d=google.com; s=arc-20160816; b=Rip51WrRCppB/cZzEOZUfTZe3cedzqtHkEYgMu6E9vMY0+X+clPOehknlhaID0oqXh NBPXRdqE/nQ5CuGs8cTqX5/dSiPf+GgGM+ULqQ5dxnHv7FIkuEV7BFVRpELoSjDI9Qzv 9z+N75tSOg1Nv4Ggpa/yYJEfpEk/dnRzXj0JfgbC2who+Jb7Pw1IcwhA5cn9OSwLEGTg inJEbEJr2QQN2wV00uAU2kRZnJYmK86CA2j0D+Z0q839ZCo4Gs7SFgRAHxojIaMPJ0lH lhIF9tSsnMbC8KHwgAdwC6UFo70ymXnELTm0SyPcLsAF0ycw12Ow+2Xwu1oUHbBxflnt Q7TQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=OGpDxcT5aeITQfH2zI83I7bXWv8lEzILwF0J/4qGo+Y=; fh=B7IWgJVc42wMIMsrVDZntNehKViVjDtT6uWLvo6Gxpo=; b=oIBeh/+kWmDiQqy3zCHoZXtx1R6LRgCe7o6ItSjxvqJZfd1NfhqcCIu2edDSUB3Lzd sEmH+aaEe+MV/yNNII+LzgjF+JpVl2w0fgmUk2WlUO/z+41Iy4n9zzaqEckN8ewCe895 M0GO0EIQQwZ8YK9BjrmLJM2r2nTmO6sR3iJ903ZpDAug/+Evkk5wHLh6TyqiHAAU60zo NamZtLUMP+RYYaurg2oW4sodbxl1aY8FjhtqNveiem4JzU03pCa73qvjDLQtwszygcff PhffIxUU1dnRb9E5bM5LoVaoHf431aSMQHK+AcuQgYlQpnE3YSrG/6qkKTmFF1cr58f4 rV7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=KkOyL5ES; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id p17-20020a170902e75100b001c32d285db8si26557859plf.308.2023.10.01.07.11.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Oct 2023 07:11:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=KkOyL5ES; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id DB4BC802F70C; Sun, 1 Oct 2023 01:16:02 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234495AbjJAIP2 (ORCPT + 19 others); Sun, 1 Oct 2023 04:15:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234480AbjJAIPZ (ORCPT ); Sun, 1 Oct 2023 04:15:25 -0400 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 001D4C2; Sun, 1 Oct 2023 01:15:19 -0700 (PDT) Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-9b2cee40de8so464555766b.1; Sun, 01 Oct 2023 01:15:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696148118; x=1696752918; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=OGpDxcT5aeITQfH2zI83I7bXWv8lEzILwF0J/4qGo+Y=; b=KkOyL5ES7i9q8GzliIAxFb+3VPZ8uBJloVMnbZ0baox7njgRc+AGRULZSxqpr0zxDf fq6NgCyTH+eMoemcSzF30STP1EQc4sZYLSYfXQ14CxvNd8l0bjer8pjUMOLIsiOrSNCd bdM55YDq4KHY3I4msyk2StjgOP7O151EQo3Zw7uwJ64Z24SuepvxXCVy+rpe60wCEVGv IsJmJoi3oSbTU6X6PntX4UL/AEOtbEiDJViD3y3i/+9zzGy3glixT7OCZyWQsJ6DHSc1 GUghF21vuSDQ2taKKgWLzJzU53KquoZkz54chZ/YCxod06hqUIY85OWM71/JzNQocHTW dQpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696148118; x=1696752918; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OGpDxcT5aeITQfH2zI83I7bXWv8lEzILwF0J/4qGo+Y=; b=gAUAcUyis8gx3+0Y790WtTTz3svF4VmRE49Q0bowVaBLDms4D9BZEsn/iBJBvNOuzV fKIL4haDuKqxTqMs6lGjc8tIeziTUzbxShYSriqwTMvUtXcN4KJ8l0sjvmsRJ7alx0Gf smOfLInfzJ2j45d1Y6WGJs59e6NfQcvQ3cvoEa48XzN1ktiuY4Y/3mMBBJebgLmGVszc +UijejVNqiEMPOO0wv7s38q1ITgYqwgNSnqabXfKLoU4/QWmcgBSrxo1m//qxj70OLUa yE6fvwGZgqp+gFqmrRIiAss6KjtI81vnotS/MPPMjx8ENLDYwiStYxdU+KbNPH/1YMJR szRw== X-Gm-Message-State: AOJu0Yxzpeq6SPyw/isI2fBvoglg3QxwFwHZGUimUi+1xcSsrYf9B15t BMg6ICN4g1U+zeAZ4W8dsbk= X-Received: by 2002:a17:906:225c:b0:9a1:f1b2:9f2e with SMTP id 28-20020a170906225c00b009a1f1b29f2emr7570192ejr.2.1696148118076; Sun, 01 Oct 2023 01:15:18 -0700 (PDT) Received: from primary.. ([213.139.52.198]) by smtp.gmail.com with ESMTPSA id e8-20020a170906374800b0099cf840527csm15121841ejc.153.2023.10.01.01.15.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Oct 2023 01:15:17 -0700 (PDT) From: Abdel Alkuor To: heikki.krogerus@linux.intel.com, krzysztof.kozlowski+dt@linaro.org, bryan.odonoghue@linaro.org Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, ryan.eleceng@gmail.com, robh+dt@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org, Abdel Alkuor , Krzysztof Kozlowski Subject: [PATCH v9 01/14] dt-bindings: usb: tps6598x: Add tps25750 Date: Sun, 1 Oct 2023 04:11:21 -0400 Message-Id: <20231001081134.37101-2-alkuor@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231001081134.37101-1-alkuor@gmail.com> References: <20231001081134.37101-1-alkuor@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Sun, 01 Oct 2023 01:16:02 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778562648493991423 X-GMAIL-MSGID: 1778562648493991423 From: Abdel Alkuor TPS25750 is USB TypeC PD controller which is a subset of TPS6598x. Signed-off-by: Abdel Alkuor Reviewed-by: Krzysztof Kozlowski --- Changes in v9: - Add Reviewed-by Changes in v8: - Define reg-names at top-level Changes in v7: - Define reg at top-level - Remove description from reg-names Changes in v6: - Use reg property for patch address Changes in v5: - Add tps25750 bindings .../devicetree/bindings/usb/ti,tps6598x.yaml | 81 ++++++++++++++++++- .../devicetree/bindings/usb/ti,tps6598x.yaml | 81 ++++++++++++++++++- 1 file changed, 80 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/usb/ti,tps6598x.yaml b/Documentation/devicetree/bindings/usb/ti,tps6598x.yaml index 5497a60cddbc..72ac534e6ed2 100644 --- a/Documentation/devicetree/bindings/usb/ti,tps6598x.yaml +++ b/Documentation/devicetree/bindings/usb/ti,tps6598x.yaml @@ -20,8 +20,23 @@ properties: enum: - ti,tps6598x - apple,cd321x + - ti,tps25750 + reg: - maxItems: 1 + minItems: 1 + items: + - description: main PD controller address + - description: | + I2C slave address field in PBMs input data + which is used as the device address when writing the + patch for TPS25750. + The patch address can be any value except 0x00, 0x20, + 0x21, 0x22, and 0x23 + + reg-names: + items: + - const: main + - const: patch-address wakeup-source: true @@ -32,10 +47,42 @@ properties: items: - const: irq + firmware-name: + description: | + Should contain the name of the default patch binary + file located on the firmware search path which is + used to switch the controller into APP mode. + This is used when tps25750 doesn't have an EEPROM + connected to it. + maxItems: 1 + required: - compatible - reg +allOf: + - if: + properties: + compatible: + contains: + const: ti,tps25750 + then: + properties: + reg: + maxItems: 2 + + connector: + required: + - data-role + + required: + - connector + - reg-names + else: + properties: + reg: + maxItems: 1 + additionalProperties: true examples: @@ -68,4 +115,36 @@ examples: }; }; }; + + - | + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + + typec@21 { + compatible = "ti,tps25750"; + reg = <0x21>, <0x0f>; + reg-names = "main", "patch-address"; + + interrupt-parent = <&msmgpio>; + interrupts = <100 IRQ_TYPE_LEVEL_LOW>; + interrupt-names = "irq"; + firmware-name = "tps25750.bin"; + + pinctrl-names = "default"; + pinctrl-0 = <&typec_pins>; + + typec_con0: connector { + compatible = "usb-c-connector"; + label = "USB-C"; + data-role = "dual"; + port { + typec_ep0: endpoint { + remote-endpoint = <&otg_ep>; + }; + }; + }; + }; + }; ...