From patchwork Sat Sep 23 07:39:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abdel Alkuor X-Patchwork-Id: 143889 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp156735vqu; Sat, 23 Sep 2023 05:49:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEodzq9k0A5g3XwP3sVyeUCLmGpHFMFqxe1R8A6ld/QRlz6l67bqAH17uPTjrGXL8qE42vD X-Received: by 2002:a05:6a20:1451:b0:157:b453:dbb9 with SMTP id a17-20020a056a20145100b00157b453dbb9mr2130475pzi.6.1695473393898; Sat, 23 Sep 2023 05:49:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695473393; cv=none; d=google.com; s=arc-20160816; b=rkoszdZ+3tArHZzQ+K9YAhRKE1KnlKFrp6OGRVeECYa8QG1s6u8oTpXVrpLGiCDj8G A/AbfXIB1Xg/+cQnaTtspaVFcyllYYeUQCKg7g7u+/TDm4y2qpmZcfjgTyZZx/EAuu46 zgyAgB3y7kUGByCFdmiIMDWxvAKnL6vn36ApdWMIuyukjelUmwA3WABZfftnFiOs1yc/ epbf8Ss5Q/SlT03ie6Uxjx/2QeUBOnd1IfiKO2JJgM1RMGihLTq9NlxcFa2ipTWjSlL3 ZaPexOMSvNIS9Wz3GcrVt9YDFlP8+qOThIB7aGN97gM7GFjRxvo3sc1ptjpgndKLlPql qk2A== 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=YKrPJWkjEs+cK0uLXs72u7EPbOGJFSfMi3rQJfH1tGU=; fh=UDTK5wkdLkKA1RzU/KF6Y0FI+lzcfubocuuGO7tFl2w=; b=LeJmE0poX9QL9C8R/BBF3w5uUx35NNGTAbNoZ2FBu45gQQxasO2f8tdlmRpNLpqJ51 K1JSJMg50MH5ROyVqAyru6QrUKRxQUw9cJnJ9au+f6yNnw+xRusbs6N6w34eGAVmwu1m PKU0Fe4njfLqlKgcGji5RMZZyIUh9USTxiPN3l7+6KDovqp9kqdxAX9+Fg9JYT1IOgZo b43NbazUu/cpopFbA0aUZu/z/GpJUoYCyxoubMP9Lc56SW6RvAWkWRNY/gZr2U1IlxSM 0eju3zW6EwxqFEF8Wy4aLdkol12DQXPxBCZ1mTaSWNqzpWHM8pGXes7tYSTGptbxjWV5 qsjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=XpXotixH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id t19-20020a17090a951300b002748c1bbd79si8376711pjo.6.2023.09.23.05.49.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Sep 2023 05:49:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=XpXotixH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id 54060826EBA6; Sat, 23 Sep 2023 00:40:59 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230252AbjIWHkx (ORCPT + 29 others); Sat, 23 Sep 2023 03:40:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230210AbjIWHkr (ORCPT ); Sat, 23 Sep 2023 03:40:47 -0400 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1272C198; Sat, 23 Sep 2023 00:40:37 -0700 (PDT) Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-31fe2c8db0dso2914513f8f.3; Sat, 23 Sep 2023 00:40:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695454835; x=1696059635; 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=YKrPJWkjEs+cK0uLXs72u7EPbOGJFSfMi3rQJfH1tGU=; b=XpXotixH/ksLEUKAvx6sE9Ol2rUjmpxU2HR4eyOakFDtWu9vljhafL8BZwt7KceT59 idMdabsIse9xos+jA/3cokT7Hmp/nYgw2+Gx8THBwfZXogtueZHgebwswFEJ2f89KMCv qwo+54aOUpEjSPwqsIDu1fGbuw3TmuKHiySjVoVNpoFhMiuoq1kIzwGeZLqqmkYQ0RGH m6pIzG+jVqt/eRn6oSqsRryktX4X77hwLSMHvIXLU5nxGA7T2H6N8hxpHhrzZryMZ4Jv 8QDlpG2zmp6qIDgqSJr0xXgnIT4WqmZSwCpYRBh0XX1LkX+zOahwqk0PJx2dElI8KU5x YZKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695454835; x=1696059635; 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=YKrPJWkjEs+cK0uLXs72u7EPbOGJFSfMi3rQJfH1tGU=; b=HkrnCJdK0CpdKqidPK/txgrxGEucwNIg5gIGzQNJkdAOF/XYTlGn4NS3JzLwetT2ZV 5oZx2o/5eX7hFIK5sMiM+9cxL0XRxfWPXmzxtY8tHRwqGrnz/4Tgx2m7Pp0wDuAa5xcq ygwN1QFvNxy8BLefESpc+KAb7pKw8Dq7CnhaPvmYdXPtmTzke4QVcF9+qLGBPwKI/28y y3+TCxC1EOeAsgIKwlgV7OqPxXR58KsGhl7ZWrC8fDMtX/KsRRrvDsbSN+zb09WCUbL/ eT9nADR/h9T4I41xsfuAlBEHjX97klxGfbINB0S3XxSoN0OOMbITslxFHNfcnNVPewjF BpJA== X-Gm-Message-State: AOJu0YyqwJ2o7LnYL9wFH+b0p5+vAOdn7ChaV3lGWv70dbEGfsxjbATp MQzyNc1TCRSWeRxRVp2xC58= X-Received: by 2002:a05:6000:819:b0:323:1689:6607 with SMTP id bt25-20020a056000081900b0032316896607mr1557349wrb.5.1695454835447; Sat, 23 Sep 2023 00:40:35 -0700 (PDT) Received: from primary.. ([213.139.62.222]) by smtp.gmail.com with ESMTPSA id k6-20020adfe3c6000000b003196e992567sm6236955wrm.115.2023.09.23.00.40.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Sep 2023 00:40:35 -0700 (PDT) From: Abdel Alkuor To: heikki.krogerus@linux.intel.com, krzysztof.kozlowski+dt@linaro.org, bryan.odonoghue@linaro.org Cc: gregkh@linuxfoundation.org, robh+dt@kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, conor+dt@kernel.org, ryan.eleceng@gmail.com, Abdel Alkuor Subject: [PATCH v6 01/14] dt-bindings: usb: tps6598x: Add tps25750 Date: Sat, 23 Sep 2023 03:39:46 -0400 Message-Id: <20230923073959.86660-2-alkuor@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230923073959.86660-1-alkuor@gmail.com> References: <20230923073959.86660-1-alkuor@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (howler.vger.email [0.0.0.0]); Sat, 23 Sep 2023 00:40:59 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777828914805391143 X-GMAIL-MSGID: 1777832709375022082 From: Abdel Alkuor TPS25750 is USB TypeC PD controller which is a subset of TPS6598x. Signed-off-by: Abdel Alkuor --- Changes in v6: - Use reg property for patch address Changes in v5: - Add tps25750 bindings .../devicetree/bindings/usb/ti,tps6598x.yaml | 80 ++++++++++++++++++- 1 file changed, 78 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/usb/ti,tps6598x.yaml b/Documentation/devicetree/bindings/usb/ti,tps6598x.yaml index 5497a60cddbc..da299a2bb19e 100644 --- a/Documentation/devicetree/bindings/usb/ti,tps6598x.yaml +++ b/Documentation/devicetree/bindings/usb/ti,tps6598x.yaml @@ -20,8 +20,7 @@ properties: enum: - ti,tps6598x - apple,cd321x - reg: - maxItems: 1 + - ti,tps25750 wakeup-source: true @@ -32,10 +31,55 @@ 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 + + reg-names: + description: | + The first reg is PD device address and the second + reg is 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 + items: + - const: main + - const: patch-address + + connector: + required: + - data-role + + required: + - connector + - reg-names + else: + properties: + reg: + maxItems: 1 + + additionalProperties: true examples: @@ -68,4 +112,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>; + }; + }; + }; + }; + }; ...