From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) (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 0A4CA1465AE for ; Mon, 8 Apr 2024 20:12:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712607157; cv=none; b=nMsR5DBt89qCi4MdFXV/MMtLlA4yLS18cwOwJqHv9UkZwf4RXgeqNO7L7q8vQFM49XXU1IalJ4K3btVNG9GAjsyprJR0P2y7HuxrqcewcZ9RWoSsvcgxVd67EAnirxfpaDABOMShZIybXjx643gM8ED9Tn5qypLAGQb5o7a8JYo= 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.47 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Ps5hVdF8" Received: by mail-lf1-f47.google.com with SMTP id 2adb3069b0e04-516f2e0edb7so2060742e87.1 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=ShyTfpEmPmTAEVmst9Ec4c6pijUxgFF16PQeLF4Gvx1jUtgiJ7LslwoHuwaIIZJsPB zJxFM+ArkODUfhzasg1sfr8zfBMxvSN2Ly0pMP0OKVMpvEVQvNpNpbvF+vHRwXGmG7qM JMkbdIrInxywwGi17/sbaFtbwsPtRUloNEnE0mCTuyFSeXI1wb3mkIA8LTfjkGcN9twz e5X+GC51a+drxcGB/ocQckciPJfDTDsQxcB08jn3PWvf49ndX6gN1J9+Swa7xQqRB19f BuQDv1oMxI4X3XrLYJ4QeI8rW8RMmYhYzmTQW5Xhx6/UWaF5pNLy0hWsgn0q5K/+vbOH PYTA== X-Forwarded-Encrypted: i=1; AJvYcCVtbnDWtbqNo7HkUE1lmjT/TrfrLouprUjh68ROmmd+QYw1zj4ovBRwr6TMDomuGRNOkPy7qIn/9pWU3uOqCIA/Bn1lyHmTSHpJ X-Gm-Message-State: AOJu0YzMeAT5v5k6m1uVYjTqMo3hb636rZVpnjuTrxBUFfQVuarUHp7Z D65/L2Fom1zNJTr9gHp8WArCxE9n6a9OlgQma0M47LThbMFK2N8VmhUlZHz+P1I= X-Google-Smtp-Source: AGHT+IG2W2zaknbzAY47gOd5Azp1rY1fNswZewy/6JZJGK07p5lhNS0K5dfBr87ujo/gmLS3TlT9Bg== 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-usb@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/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVTr09ewARAQABzTRLcnp5c3p0b2Yg S296bG93c2tpIDxrcnp5c3p0b2Yua296bG93c2tpQGxpbmFyby5vcmc+wsGUBBMBCgA+FiEE m9B+DgxR+NWWd7dUG5NDfTtBYpsFA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mRuqsvv6dcbblD8ZLkz1EVZL6djImH5zc5x8qpVxlA0A0i23v5QvN00m6G9NFF0Le 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