Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp1467523rdb; Wed, 20 Sep 2023 09:52:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEzZxKn0SRfu1q7/iw7tI1TpyU/FAJFk2405Ou+pXeOIDyS/Bk2pO8Y6E29wVeWapl5huoS X-Received: by 2002:a17:902:db03:b0:1b7:e49f:1d with SMTP id m3-20020a170902db0300b001b7e49f001dmr2967297plx.62.1695228726608; Wed, 20 Sep 2023 09:52:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695228726; cv=none; d=google.com; s=arc-20160816; b=NDOtqWrR90HXaWczk/aX8rXq+yYNA//ekesntmkLg7KiDsE3+LoaUR3ZJGMcxQzhdn wizL5V4XCtYP72q/3JPgHRSqAlevdatM3M3pUZUAxkZekNz7gMJIEf6NwIYZfyqZyVD0 O2dT9UE5JUedxW2eTNWs/ZsF+MLZdDxKJoCuR5q5FitrcePy3Mvw3BnZMFJZItnsdWuG lth18IJrQOMyMD3X0/WLPBll5V6JvgO4IrvLWthU4JYv0kLw2XACrjb0M9LN5H5f5Pt4 gz1FoHBkNBltpNJq1bW/ys7u56cG7q+03eM7CYlloq5TR0aTQ014CmBhWXrllcbQ5XWK cqDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=YOsfCtgZO3a3ZMSMUVjFBl7idEbB9bgofcyXubLck+M=; fh=ILSV7ddtrCOdmvuHGe8M1jUCOmtisF1KWbJTISP/oKM=; b=yR4t8YR7qOKCk8KOfvPKtqezEuMtE6nasIrD3Z2zfbN20QVfBR7aU4kf2aek58ozI2 pihMnPJZ/g0qFiofJdT0ca95ulsv/0if7IwLlFgaMvrz8XsOyRyxw4d+v4topP4CROy+ FyE1pzpxZBJO6KwA+fUR1QUPmGn2EN08w68+lBPa2QTwj2zshDPYSdzRtf2JeZ1MtXf+ 0I4yWX5ulmxDJM6IEafwNgHoYVUBNVzrutg2RT0+ZbnRmoCB0Hd8jYcDf6QMYNv4tDLo RKyDfteAZwVdS35SDGWkiN41b0FyFvbm+uHyRGxVWgjyhm+rPdya6Lqe+NR+2hYb7sk5 4azQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ef6SlilF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id n13-20020a170902d2cd00b001bb3316f71dsi12871388plc.481.2023.09.20.09.52.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 09:52:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ef6SlilF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 8F725826EDAF; Wed, 20 Sep 2023 09:46:42 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234572AbjITQqi (ORCPT + 99 others); Wed, 20 Sep 2023 12:46:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234502AbjITQqh (ORCPT ); Wed, 20 Sep 2023 12:46:37 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45C32CF; Wed, 20 Sep 2023 09:46:32 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0329EC433C7; Wed, 20 Sep 2023 16:46:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695228391; bh=v2nZUFJb75Eok75BEHLZ6a+wtZb+ffY5WGQfd+Wp6vY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Ef6SlilF31FSgPKwuu0WfymO6HNgzAimtyNgVfXKfqv7AxemX3k92g7NZKKmqxQdD 4SYlOUJ3NC19NmGATgQLggWeCEqmQIj0Dp076wmr1fDow5nW7QNrs5X3UOMv5stdW4 go6Pi4M76ibE/k/1ED9234/0h+LlBe98GE6wJ2S0His1lg6Nui0QNZZBeBYbaHNqzr Xzxxgou53z6XDr51xCg0v5RJ7qzTqlldli/pzFbLObGzy59GAC+dDDH2rysvGW0OIH 6lRJlV/6Y5Ly4EMtOru/RNpBt18cUeQ/A4SdQf3kDd6px94oLuELcR/sB8x+tWYf1L lkgWknBLOspSg== Date: Wed, 20 Sep 2023 09:50:39 -0700 From: Bjorn Andersson To: Neil Armstrong Cc: Andy Gross , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heikki Krogerus , Greg Kroah-Hartman , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Subject: Re: [PATCH 1/4] dt-bindings: soc: qcom: qcom,pmic-glink: add a gpio used to determine the Type-C port plug orientation Message-ID: References: <20230804-topic-sm8550-upstream-type-c-orientation-v1-0-36dd3edec7bf@linaro.org> <20230804-topic-sm8550-upstream-type-c-orientation-v1-1-36dd3edec7bf@linaro.org> <7fc7371a-1b2d-ccce-1e73-6bfe70ea2b20@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7fc7371a-1b2d-ccce-1e73-6bfe70ea2b20@linaro.org> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 morse.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 (morse.vger.email [0.0.0.0]); Wed, 20 Sep 2023 09:46:42 -0700 (PDT) On Mon, Aug 14, 2023 at 10:09:41AM +0200, Neil Armstrong wrote: > On 04/08/2023 18:03, Bjorn Andersson wrote: > > On Fri, Aug 04, 2023 at 03:50:07PM +0200, Neil Armstrong wrote: > > > On SM8450 and SM8550 based platforms, the Type-C plug orientation is given on a > > > GPIO line set by the PMIC. > > > > > > Document this optional Type-C connector property, and take the > > > assumption an active level represents an inverted/flipped orientation. > > > > > > Signed-off-by: Neil Armstrong > > > --- > > > .../devicetree/bindings/soc/qcom/qcom,pmic-glink.yaml | 18 ++++++++++++++++++ > > > 1 file changed, 18 insertions(+) > > > > > > diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,pmic-glink.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,pmic-glink.yaml > > > index bceb479f74c5..1b0a00b19a54 100644 > > > --- a/Documentation/devicetree/bindings/soc/qcom/qcom,pmic-glink.yaml > > > +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,pmic-glink.yaml > > > @@ -35,6 +35,11 @@ properties: > > > '#size-cells': > > > const: 0 > > > + orientation-gpios: > > > + description: An input gpio for Type-C connector orientation, used to detect orientation > > > + of the Type-C connector. GPIO active level means "CC2" or Reversed/Flipped orientation. > > > > This is a per-connector/port property, as such be part of the connector > > sub nodes rather than as a property of the shared pmic_glink entity. > > This has been rejected by Rob, Dmitry & Krzysztof in: > https://lore.kernel.org/all/0fbf55e7-2140-751d-5347-f907a46ef78c@linaro.org/ > & > https://lore.kernel.org/all/20230608154751.GA2750742-robh@kernel.org/ > > Indeed the "GPIO" is not part of the physical USB-C connector, but a property, > and it's not part of the PMIC GLINK firmware either, so ? > > The PMIC function which generates this signal is handled by the PMIC GLINK > firmware, so this representation is the most accurate. > I don't think we reached a conclusion on the discussion that followed. If this indeed is the path forward, please document clearly how the next person should proceed when the need for handling multiple ports with this scheme arise. Thanks, Bjorn > Neil > > > > > Regards, > > Bjorn > > > > > + maxItems: 1 > > > + > > > patternProperties: > > > '^connector@\d$': > > > $ref: /schemas/connector/usb-connector.yaml# > > > @@ -44,6 +49,19 @@ patternProperties: > > > required: > > > - compatible > > > +allOf: > > > + - if: > > > + not: > > > + properties: > > > + compatible: > > > + contains: > > > + enum: > > > + - qcom,sm8450-pmic-glink > > > + - qcom,sm8550-pmic-glink > > > + then: > > > + properties: > > > + orientation-gpios: false > > > + > > > additionalProperties: false > > > examples: > > > > > > -- > > > 2.34.1 > > > >