Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1579165lqe; Mon, 8 Apr 2024 13:12:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVMka53FsOjvpgCLhAnQFGC7MyYMHbiuyypdrFrgLc/MwQ3zck0ebkwr5VNQAPNzUI9+9cFUQ9lM9AD/KzZxqJisKgIxclvSsje9l3xdQ== X-Google-Smtp-Source: AGHT+IGNTFZx4UPx/n2TU4zD8MSpMTakgls9fpj/WDKVB5MKrd2KhimFFwoMkUqZov125nU7jMzu X-Received: by 2002:a50:c055:0:b0:56e:23db:3e87 with SMTP id u21-20020a50c055000000b0056e23db3e87mr7077244edd.11.1712607169381; Mon, 08 Apr 2024 13:12:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712607169; cv=pass; d=google.com; s=arc-20160816; b=pCT9d2qBhwh2KAd+7p7PD4JFPrH3+Qr2UJXs6/n1WgmFHKMB4/U4iP2kWZJd952I4N qlyWulHThnpcGwaeOyk2gFtMUdDEr6B4cikL8F2MG19u51BM3T7qLFBqL4GCZNTOaek2 OJpulsBqmj/bZksV9iMRTfSkQT+J59yAyL4cYV7Jo4quR6dXI7idqpRwqZQd7694vY+J eHS8ONmVNcDjo7zb6XraF3UaudKlMQO2Uky4XUpsUsau5qWLTCBkZb5gr2GqOrscuB6P G2Vvq905fy4QDsm6Tc5IB753p4FMoYFfnnimhloTcuRRFZbsCYfxFqPMjbmND6kfnagM Nb7w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=D3WZGoA5s1Cdk73nMnJCKpNMxCWu21VuKqBPTiSrXo4=; fh=fiqfgGeeYea1YHHFg2rRp+4d6Hs4xsejr10ll4dFphE=; b=HDw7ySlrppzKmqmfK1XTshtY3lZ8WD1IF+uZSacXWSfWAAmOEJEVH/5rAJcubm9mrn x1QdvJNF+iafWCWjQlf/BQTsS1fj85kvhAwyN66SPr3GTabsH4tCTu4YbyiBexI9cVos lhCVTOQd0KlQb+qRrORNm+QNNh5tl6KmgXnGQhSGuHXLKAaHGc8wH0bb/I/OtAWmuNHY dEO/NLMxA0znKF35Hq09zYTaS0WnbEm6HuSeGrLxpehWBDp64YStC4gvzcesDvuMvxVB 8/5gMLOf/mPPeIB4fWmztLbOqP+eLVSHIiAULDg2cvX37szPywPS9lYeLCE9hL5vZZTg OLwQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ps5hVdF8; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-135900-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-135900-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id e29-20020a50a69d000000b0056bf41eec4bsi3909444edc.681.2024.04.08.13.12.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Apr 2024 13:12:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-135900-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ps5hVdF8; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-135900-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-135900-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id EB6F31F25C26 for ; Mon, 8 Apr 2024 20:12:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2846D1465AE; Mon, 8 Apr 2024 20:12:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Ps5hVdF8" Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0ADF31465BC for ; Mon, 8 Apr 2024 20:12:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712607157; cv=none; b=CcEDRgNr1fs4DCCoS+G+o+OJ2tK5sgi3mr21xfXTIZQhsJ8LN9iYc4Q+y8bhUjMQhgs3uCAMh+gLjEWrZrNzz0W31aoUKC2xqfIAcTgk0LBJcf1W6JPZeVlC3UkHdKabMiyJ1X4GGX/5I3FidWgRRxKaANxSqYOSTgefVFNe69k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712607157; c=relaxed/simple; bh=NVQtYSBEG2pxUndGJuSJkOztjdgw9ulw7xh2JSYD0pw=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type; b=s+eRnaXvNCHs+1F54QJXYfO+nSzGcYKXSQLA8Sv9tl3U04ys2X0ogtKy07Hk4bCd/j/XlQZBIujhoNnaccjRg29Z5+t22dzY3IcgcIXMME2A9zONYy2hiDe05C0gef1uZa+IE/gNxDYPxkb0wGAXkeeE/MhVdBFJ94G+JmOkis4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=Ps5hVdF8; arc=none smtp.client-ip=209.85.167.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-lf1-f41.google.com with SMTP id 2adb3069b0e04-516d6898bebso3565337e87.3 for ; Mon, 08 Apr 2024 13:12:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712607153; x=1713211953; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:to:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=D3WZGoA5s1Cdk73nMnJCKpNMxCWu21VuKqBPTiSrXo4=; b=Ps5hVdF8YL6UnvMHMNVBaJYZR4tHhh/q51Fk92jJAZYUqA2Dm8h9Aa95oFleIZM/vV B49DXzYKL7Vhks468kNPZxQFVBLXtMXC5pBythHDQyFGJme6zi2KknPLaKfuf4hF2U6W ZyP/5MXEDhymltmM/vYSlA2TT05XsMzTTcCBRzjJFyK6Q1cI8JzMsZJ3VovIx8Jx3Bd6 WiyTxhN9jenFl9O9jwOYl2MKCwzMLNMowQ0EV8kitXEoXaN1IJojNhpqOplnZk79uMQ9 ubJkZnJoqQYbkJUfRzC3e/0FDZxG3a5U69lKF5bOb/wkMXphHnNrZIhPAtg5GkyN4mvU wBGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712607153; x=1713211953; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:to:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=D3WZGoA5s1Cdk73nMnJCKpNMxCWu21VuKqBPTiSrXo4=; b=ViUYX3mBoctaAwgUqBgGJbDwR/ab7xzb0mKTCpPFs/FaKsQZvn5nOMoI8EHDcXRd67 Aka7wFVea36f6XSGi/Coy/hUqoZSvMlONR9MPRZ74MaS0SiBs6WYI6bn4kEtYk1R1hOd Hd8mOSxUybCwOmmjdo/lBTHNGzUWtacUUV0OKCkpFu2MOUwmKCJi2vxT5J5WWBvzw5RM i9LJIS2saBDkMLUvPmoxNo1K+fedX8k/bg//dNAqFHq7T7I9T6Xy2voqmQkdmVoBf5Qv jEKfYoTY5w7LuOuSkS0sRUoiyFk29onzpWl2QfqPulGpZAbqlq1GkloHUimskPl+sy6e G3Ag== X-Forwarded-Encrypted: i=1; AJvYcCWj2V6Xor/03+rWxubSXJ8pDWOXa0QZnhHvpNXnoB+AtcghdS73MEXkMPrb5qzs0bUpTZyAC5TxxwNxITd+wy7E92YuhX4MUil+k0LJ X-Gm-Message-State: AOJu0YwF4u9hQUmfbVYzI+XcsDpAK6goz3nO1eqgANLTvoMYDnvPwC8v OXsio/xh8uslfcXD/q9Z4zzig02xey9S0xtPJvabQsdwDqK1SAryaVuKXusQQO0= X-Received: by 2002:ac2:46e9:0:b0:516:bfd7:de92 with SMTP id q9-20020ac246e9000000b00516bfd7de92mr6862950lfo.43.1712607152799; Mon, 08 Apr 2024 13:12:32 -0700 (PDT) Received: from [192.168.1.20] ([178.197.223.16]) by smtp.gmail.com with ESMTPSA id jw20-20020a170906e95400b00a51c5940247sm2834929ejb.213.2024.04.08.13.12.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 08 Apr 2024 13:12:32 -0700 (PDT) Message-ID: <97f2d38d-c863-4c76-91f1-52cd250759d7@linaro.org> Date: Mon, 8 Apr 2024 22:12:30 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCHv3 1/2] dt-bindings: usb: typec: anx7688: start a binding document To: =?UTF-8?Q?Ond=C5=99ej_Jirman?= , Pavel Machek , 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 References: <7976e254-ed1e-406d-870b-1ecdc4b1e23c@linaro.org> <1502383c-9caf-4362-8bd6-ed719a304f08@linaro.org> Content-Language: en-US From: Krzysztof Kozlowski Autocrypt: addr=krzysztof.kozlowski@linaro.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks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9FL7F6AHFzqEFdqGnJQqmEApiRqH6b4jRBOgJ+cY qc+rJggwMQcJL9F+oDm3wX47nr6jIsEB5ZftdybIzpMZ5V9v45lUwmdnMrSzZVgC4jRGXzsU EViBQt2CopXtHtYfPAO5nAkIvKSNp3jmGxZw4aTc5xoAZBLo0OV+Ezo71pg3AYvq0a3/oGRG KQ06ztUMRrj8eVtpImjsWCd0bDWRaaR4vqhCHvAG9iWXZu4qh3ipie2Y0oSJygcZT7H3UZxq fyYKiqEmRuqsvv6dcbblD8ZLkz1EVZL6djImH5zc5x8qpVxlA0A0i23v5QvN00m6G9NFF0Le D2GYIS41Kv4Isx2dEFh+/Q== In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 08/04/2024 17:17, Ondřej Jirman wrote: > On Mon, Apr 08, 2024 at 03:27:00PM GMT, Krzysztof Kozlowski wrote: >> On 08/04/2024 14:48, Ondřej Jirman wrote: >>> Yeah, I understand where the confusion is. The driver is not for anx7688 chip >>> really. The driver is named anx7688, but that's mostly a historical accident at >>> this point. >>> >>> I guess there can be a driver for anx7688 chip that can directly use the chip's >>> resources from the host by directly manipulating its registers and implementing >>> type-c functionality via eg. Linux's TCPM or TCPCI stack, etc. (eg. like >>> fusb302 driver, or various tcpci subdrivers). >>> >>> But in this case the chip is driven by an optional on-chip microcontroller's >>> firmware and *this driver* is specifically for *the Type-C port on Pinephone* >> >> We do not talk here about the driver, but bindings, so hardware. > > Got it. Bindings should be the same regardless of what driver would be used, > whether this OCM based one, or some future one based on the above mentioned > TCPCI in-kernel implementation. Hardware is the same in both cases. > > Just trying to imagine how to actually solve the issues... > > Basic thing with the I2C regulator thing is that needs to be enabled as long > as anx7688 needs to communicate over I2C. Other user of this power rail is > touchscreen controller for its normal power supply, and it needs to be able > to disable it during system suspend. This does not look like anything specific to this particular device... but even without this, please think how you want it to be solved. Same supply which has to be on always, because your anx7688 can talk over I2C, and in the same time sometimes off, so touchscreen can be shutdown. If this is regulator for the I2C bus, then I think we already had this discussion some time ago. I think it is not a property of the I2C device, but the controller. > > Now for things to not fail during suspend/resume based on PM callbacks > invocation order, anx7688 driver needs to enable this regulator too, as long > as it needs it. No, the I2C bus driver needs to manage it. Not one individual I2C device. Again, why anx7688 is specific? If you next phone has anx8867, using different driver, you also add there i2c-supply? And if it is nxp,ptn5100 as well? > > I can put bus-supply to I2C controller node, and read it from the ANX7688 driver > I guess, by going up a DT node. Whether that's going to be acceptable, I don't > know. > > > VCONN regulator I don't know where else to put either. It doesn't seem to belong > anywhere. It's not something directly connected to Type-C connector, so > not part of connector bindings, and there's nothing else I can see, other > than anx7688 device which needs it for core functionality. That sounds like a GPIO, not regulator. anx7688 has GPIOs, right? On Pinephone they go to regulator, but on FooPhone also using anx7688 they go somewhere else, so why this anx7688 assumes this is a regulator? You need to properly represent the hardware, not bend it to your one use-case for one hardware. > > ANX7688 chip desing doesn't have integrated VCONN mosfet switches so it always > needs external supply + switches that are controlled by the chip itself. There's > no sensible design where someone would not want this and the driver needs > to get this regulator reference from somewhere. The switches are sort of an > extension of the chip. Best regards, Krzysztof