Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4167916rwl; Tue, 28 Mar 2023 03:45:53 -0700 (PDT) X-Google-Smtp-Source: AKy350ZIYHuNRjAItKTn/yh8xKpe5OdfT+uLbdvfsZxs1wDSR5wVG0L2L3wsUeFh9AQLxqOOTmth X-Received: by 2002:a17:906:39d3:b0:931:86cf:9556 with SMTP id i19-20020a17090639d300b0093186cf9556mr18594595eje.23.1680000353604; Tue, 28 Mar 2023 03:45:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680000353; cv=none; d=google.com; s=arc-20160816; b=Jpnk9lakw3hZwGwmfDJXLsbdvB0L8xoWSwZ75cG0UKEWXtKatmgkwY2bmCmc4SJdvz YfN/bcObBJsn2KDTbO0dyx8itJYzQZtNWBg8e9HekxTO/gP5gTmDDZopTz/mk0B8WV1O GXAu++DRMLiWATH8laQ3QNBFQCLL1b+6Pcl1Mzn2AnuKrCGYTANYyGCGTH88dkOjMoUC pMbQQ5Ip/3SMXipaTWL1/nICgk7EO6kKcLKK1ZoqYibRGczE9WrZhLzSY8VJ1eqeMoq3 ZBV/30/q/RNc7rLtNP1ZiEvty38LgNsSrV6Jhb/GTN4roAOhKpITcVyEWGxG0Wv2fuSz KeOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=zgOiq+AtOeciCdmH4CfKTQkHujujZJqW/oCAjnkxQJQ=; b=jheC0hCemk/Ly62brVX+au9XbazBDUz6YuYo3NDeQG5iHkRwkeXDby6ASMDnCllo7v AHR1fHkhTogQBz5kFprdFBqksQ12yyUohc+ElNSluqjwBqcT1oGeHbq4CMoo6KSsRkG6 CNVlOy5rd1305FHvJOq8P75GsG1L04UDb5B5iPppoordWB3ovJJDKrPp9rSYaUtCbNmf LRFvXyO1AvmedxynrnQnQ4GSKia9Ul+mAXtEVwdR4aBf5Aj3zplUSx6bB8WSNIrCJ1+m LDvIX7fmW+IUVystOXN2uLEvK5MC0ru1mg3VvE672vgBiASW7tI6wTQbk6vV6+iqmu5+ xlgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=z2fbJCUs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id wf11-20020a170907d68b00b0092ffc08bcffsi29813260ejc.535.2023.03.28.03.45.28; Tue, 28 Mar 2023 03:45:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=z2fbJCUs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232134AbjC1KnP (ORCPT + 99 others); Tue, 28 Mar 2023 06:43:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231833AbjC1KnO (ORCPT ); Tue, 28 Mar 2023 06:43:14 -0400 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 74C1C49F6 for ; Tue, 28 Mar 2023 03:43:11 -0700 (PDT) Received: by mail-ed1-x536.google.com with SMTP id er13so6733497edb.9 for ; Tue, 28 Mar 2023 03:43:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680000190; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=zgOiq+AtOeciCdmH4CfKTQkHujujZJqW/oCAjnkxQJQ=; b=z2fbJCUs40UgcqDVbQGQh4kmhI6WeRhHxPmP8pKs0i8yh52/eine8xe/tM/6QfvHbP QJ84tlX3SNKaesXQdNLzBBkJHTcBgYG7l2PiH0gk90E2Chf5Q8oxKOxEQZzjceExb8vV IFVjPu6VDsTPVaDViZGIefeYhR1c4k5DYYYwxvCTyMrdGYlVYsbct9l4o4yRFTLvE6pt vlLybW/hJd+JVIsi5Xs53rx0D2PkCx0duxyHUGoPHLLWQol/hyhwBr1dgVwtULDJqQw7 732Bg4O/RimTRXeC9m48hFh3Q2utdgpE4jfJ1dLpIrMKbGJz/F2vu4hnYh454T3cAXpQ ckeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680000190; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=zgOiq+AtOeciCdmH4CfKTQkHujujZJqW/oCAjnkxQJQ=; b=LmaBJ3nk4Pz63wdIrbIYmxxgFpBJx3MIIGnGcw8RErfICwRq2k27xJf/Iu04YxuTWA MyLnnglE7NLdDE3vv2K5KQGG+qvV3MZNyhf1AsgdfGjz8UbKuISogSKB8To38Bc/In5L 7S/PkFv4YoA0FhIxsqhlD4Tn7WTdxuLopxe2nzG5sKWpl5LhmlDiQViFJnyjB3bZHq5L 3CDGxNMLHAgCoqj6OBlATQ+AKT35uDtJQGqrHrexJSt0ykFgVDGheEvpnVhNrc6As+Qg dkduQ5EF95HeqUqLpN3oX8DLrP44uOu4wHqQp2A80Tnt0ZaGOjgspalfjilz6OANfq5K qsjQ== X-Gm-Message-State: AAQBX9dd30gO1cvRkztlgMHFIhfzWdxJM/T/Jqft283GXk5dgJLstvzn 2dszTNzVK1RCOdcZhqbuZvlZDQ== X-Received: by 2002:a17:906:3f8e:b0:939:ad91:adf5 with SMTP id b14-20020a1709063f8e00b00939ad91adf5mr17014758ejj.25.1680000189965; Tue, 28 Mar 2023 03:43:09 -0700 (PDT) Received: from ?IPV6:2a02:810d:15c0:828:9e92:dca6:241d:71b6? ([2a02:810d:15c0:828:9e92:dca6:241d:71b6]) by smtp.gmail.com with ESMTPSA id lj24-20020a170906f9d800b00932ba722482sm14366953ejb.149.2023.03.28.03.43.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Mar 2023 03:43:09 -0700 (PDT) Message-ID: Date: Tue, 28 Mar 2023 12:43:08 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH] dt-bindings: usb: typec-tcpci: convert to DT schema format Content-Language: en-US To: Jun Li , "Peng Fan (OSS)" , "robh+dt@kernel.org" , "krzysztof.kozlowski+dt@linaro.org" , "gregkh@linuxfoundation.org" Cc: "linux-usb@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Peng Fan References: <20230323065824.3857573-1-peng.fan@oss.nxp.com> <5675373c-af4f-906f-9906-7853a85f8ed6@linaro.org> From: Krzysztof Kozlowski In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, 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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 28/03/2023 11:24, Jun Li wrote: > Hi Krzysztof, >> -----Original Message----- >> From: Krzysztof Kozlowski >> Sent: Monday, March 27, 2023 3:41 PM >> To: Peng Fan (OSS) ; robh+dt@kernel.org; >> krzysztof.kozlowski+dt@linaro.org; gregkh@linuxfoundation.org; Jun Li >> >> Cc: linux-usb@vger.kernel.org; devicetree@vger.kernel.org; >> linux-kernel@vger.kernel.org; Peng Fan >> Subject: Re: [PATCH] dt-bindings: usb: typec-tcpci: convert to DT schema >> format >> >> On 23/03/2023 07:58, Peng Fan (OSS) wrote: >>> From: Peng Fan >>> >>> Convert the binding to DT schema format. The default speed is HS, so >>> add a dummy port@0 in the example. >>> >>> Signed-off-by: Peng Fan >>> --- >>> >>> V1: >>> The default speed is HS, so port@0 is not added for some device tree, >>> however the usb-c-connector requires port@0. Not sure we should drop >>> the required port@0 from usb-c-connector schema or add a dummy port@0 >>> for tcpci as what this patch does. >> >> imx8mq-librem5-devkit has full port@0 so just use similar approach. >> >>> >>> .../devicetree/bindings/usb/typec-tcpci.txt | 49 ------------ >>> .../devicetree/bindings/usb/typec-tcpci.yaml | 80 >>> +++++++++++++++++++ >>> 2 files changed, 80 insertions(+), 49 deletions(-) delete mode >>> 100644 Documentation/devicetree/bindings/usb/typec-tcpci.txt >>> create mode 100644 >>> Documentation/devicetree/bindings/usb/typec-tcpci.yaml >>> >>> diff --git a/Documentation/devicetree/bindings/usb/typec-tcpci.txt >>> b/Documentation/devicetree/bindings/usb/typec-tcpci.txt >>> deleted file mode 100644 >>> index 2082522b1c32..000000000000 >>> --- a/Documentation/devicetree/bindings/usb/typec-tcpci.txt >>> +++ /dev/null >>> @@ -1,49 +0,0 @@ >>> -TCPCI(Typec port cotroller interface) binding >>> ---------------------------------------------- >>> - >>> -Required properties: >>> -- compatible: should be set one of following: >>> - - "nxp,ptn5110" for NXP USB PD TCPC PHY IC ptn5110. >>> - >>> -- reg: the i2c slave address of typec port controller device. >>> -- interrupt-parent: the phandle to the interrupt controller which provides >>> - the interrupt. >>> -- interrupts: interrupt specification for tcpci alert. >>> - >>> -Required sub-node: >>> -- connector: The "usb-c-connector" attached to the tcpci chip, the >>> bindings >>> - of connector node are specified in >>> - Documentation/devicetree/bindings/connector/usb-connector.yaml >>> - >>> -Example: >>> - >>> -ptn5110@50 { >>> - compatible = "nxp,ptn5110"; >>> - reg = <0x50>; >>> - interrupt-parent = <&gpio3>; >>> - interrupts = <3 IRQ_TYPE_LEVEL_LOW>; >>> - >>> - usb_con: connector { >>> - compatible = "usb-c-connector"; >>> - label = "USB-C"; >>> - data-role = "dual"; >>> - power-role = "dual"; >>> - try-power-role = "sink"; >>> - source-pdos = ; >>> - sink-pdos = >> - PDO_VAR(5000, 12000, 2000)>; >>> - op-sink-microwatt = <10000000>; >>> - >>> - ports { >>> - #address-cells = <1>; >>> - #size-cells = <0>; >>> - >>> - port@1 { >>> - reg = <1>; >>> - usb_con_ss: endpoint { >>> - remote-endpoint = <&usb3_data_ss>; >>> - }; >>> - }; >>> - }; >>> - }; >>> -}; >>> diff --git a/Documentation/devicetree/bindings/usb/typec-tcpci.yaml >>> b/Documentation/devicetree/bindings/usb/typec-tcpci.yaml >>> new file mode 100644 >>> index 000000000000..067d3b032e3d >>> --- /dev/null >>> +++ b/Documentation/devicetree/bindings/usb/typec-tcpci.yaml >> >> Is this a binding for PTN5110 or for generic tcpci? Looks like the first, >> thus name should be rather device specific, so nxp,ptn5110. >> Specially that there are other tcpci chips in separate bindings. > > This binding doc is target for generic tcpci, ptn5110 is the one Does this mean that TCPCI requires every device to have exactly one interrupt (no 0, no 2, exactly 1), no supplies and no additional GPIOs (like reset GPIO)? Because this is what this binding is saying. > fully compliance with tcpci spec, if change it to be only specific > to nxp,ptn5110, my understanding is then other chips need duplicate > a binding doc even common tcpci binding and driver is enough for them. Depends. Usually we have common schema used by actual device schemas. If TCPCI-compliant device cannot have additional properties, then this one here looks fine. One more thing - typec-tcpci is a bit redundant "tc" means typec, so basicaly you said "typec-typec-pci". This shouold be then just typec-pci or tcpci. Best regards, Krzysztof