Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1609842rdb; Tue, 20 Feb 2024 01:10:38 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW1DM6VsyBwf2VccnjbAZ0wkgls5rmzxjdtnp8ki3KdIzx1RBOjTjOmJRNOgyqdLMUF4HUjb4o3ly2MkNR2k98H0JLwaC+WEA7+dNPPYA== X-Google-Smtp-Source: AGHT+IGMnm8C8SUEZylQ6aaT8OSGBHgKA8rxr5NCoUWpJDBzELsF4VyYRMU5rzi5H3Or2BXNzzxX X-Received: by 2002:a17:902:cf01:b0:1db:aebd:5e2e with SMTP id i1-20020a170902cf0100b001dbaebd5e2emr14029340plg.28.1708420238694; Tue, 20 Feb 2024 01:10:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708420238; cv=pass; d=google.com; s=arc-20160816; b=kU70t4sns2yoHq5mQq1GMAV8K2hU9z7w1UGhHeuiSNjovq3LSaeM4iGsqKW5eo5fKQ 4gcyukXXT4igbTDJHSmy2fh/3Br5h115H2rcrAHXRMUrAlTdJ66CI1atqm2AIdR9NzUu 9E1F2JE5vduU04NgWzNn/Y+R54WRJyZ9UsMjULVoBcaeoYGyLDIc3WnUphyy0lP45hqB n5gKsS0zYCdOjkOaXOIT+a1U1BUaFfdyokZtVeFA34cM5vsHFZBDyY2eFjLlRiXpZDq4 tPJ7HMF76xTPGEzzKQ16bggSF6Dp2lICtoSkFzxz5L+zqYrwu2I5/rSKAHuuG6HIQ3jc NF5w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=cbWMDXJd3ZYUcTgGErq0K4CkNjjPTv9DAFRCkT5TpOI=; fh=ZiotvjaxIVCk6IW3OJIBmKEMEMiSmpbmvchnrfBtOeM=; b=Z8jVIMXhW1OTlvzvWm0vfsKp48BlnUw0INlZ2Qvd1ljjffUfTn0l3x5ShCj/hnsfXw i2iyl7VD5QfasfCvPModc3bzSVYb5rXSM0u0JbOUxT6xfGzoNSEerJOQHkr8nSGPtmM1 QZLmt0MluJQ99EteQT8haX0KbpryPOxgw2o0LzjKDhAf2lnvECAoEcmspW+1pvyuEfhQ YwKEaFQi4tteUTWn7Y80p4BHQUiDqNS7T8p8sAedvOfRnwytjWROQWX4wFEU0Gv7fLLx S1siwxXR9Q5Gt8BUlw+T7nwCa4iybMi2zkNOfkE+nbKn0EJIhapTmW22mNRMzn7CCJw1 ABsg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=DR+iocJ0; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-72620-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-72620-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id j13-20020a170903028d00b001dbfd7d4e9bsi2688465plr.177.2024.02.20.01.10.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 01:10:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-72620-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=DR+iocJ0; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-72620-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-72620-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id AF550B2418F for ; Tue, 20 Feb 2024 08:58:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 418D85FB84; Tue, 20 Feb 2024 08:54:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="DR+iocJ0" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F00EE5F481; Tue, 20 Feb 2024 08:54:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708419252; cv=none; b=MaC6DUdLL0C2caYbmTxiz73GW3MZDVMgsSqtkkC7cNDRBQs9v7ZFCI4/7hOY+I8aOXM2hP+ZV0D3lTqBvyUr4l6GUYhtogZbyJETUv2XXVP1CPdWlOb8JZ6O3oZFsLVyTew2DOGdgGr4dUVcqa6z2mLdAGEnF/eD8eo/BW0oOIE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708419252; c=relaxed/simple; bh=M8/PhF0aAqABF/pRPoLSGcD9DP7US6tDXUQJIwRD354=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Iqz3KjVQFZTcdhynKGC8Jf2shxY8D8BhwNYyuaRNc30ISEhMA1sWJH6Ro0ijxuhnDtGRwvg6W1wiDX3YLyU2/rs/E4/5pMfpzX9fZRbvoH0WJ+XZql2MzPjp9p4336F3Lc+26trQ0RCQCsoAuTTYuIiMJ2WovmWhis5/7+u9Uio= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=DR+iocJ0; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1708419249; bh=M8/PhF0aAqABF/pRPoLSGcD9DP7US6tDXUQJIwRD354=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=DR+iocJ0Rz307omPoFvSmgFRhhtAABmY+XrQiLAQTlRAUrlFw0GZNJHxjMmhx0/Bt t5k9wtlV0/qqG4tbCx4SsErlOTi62v7aAYS+RtHrrdZ0jEIhRS/GtenkuekSVt9Kxr CoktsWi4i1CuJOQP8KRT7wmCsu4YKDQlTGOnGeBo/CwD2kA83Al4KOzpFyMWL/WheZ XuQ3HJEKCfQUD8iRPn62+QpsOgdO1Ic5ZHti6deOh38+fO8tOzBdL6SKSsr9dnXYEl KSGJ91O8qNhbfMIurf044wjDJA7C2ERHwCRHWNfXtcUGoP1LngdopvU5C0derCZWRP bKQtUiDOAwfqA== Received: from [100.113.186.2] (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madrid.collaboradmins.com (Postfix) with ESMTPSA id E581E37820C1; Tue, 20 Feb 2024 08:54:08 +0000 (UTC) Message-ID: Date: Tue, 20 Feb 2024 09:54:08 +0100 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: [PATCH v2 2/2] arm64: dts: mediatek: add Kontron 3.5"-SBC-i1200 To: Michael Walle , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger Cc: devicetree@vger.kernel.org, Sean Wang , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org References: <20240219084456.1075445-1-mwalle@kernel.org> <20240219084456.1075445-2-mwalle@kernel.org> <2ad6bda8-a457-421b-b35d-dc005fb00ae9@collabora.com> From: AngeloGioacchino Del Regno Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Il 19/02/24 14:59, Michael Walle ha scritto: > On Mon Feb 19, 2024 at 2:35 PM CET, AngeloGioacchino Del Regno wrote: >>>> vbus is always supplied by something, as otherwise USB won't work - whether this >>>> is an always-on regulator or a passthrough from external supply this doesn't really >>>> matter - you should model a regulator-fixed that provides the 5V VBUS line. >>> >>> I don't think this is correct, though. Think of an on-board USB >>> hub. There only D+/D- are connected (and maybe the USB3.2 SerDes >>> lanes). Or have a look at the M.2 pinout. There is no Vbus. >>> >> >> Yes but the MediaTek MTU3 and/or controllers do have it ;-) > > .. and .. > >>>> For example: >>>> vbus_fixed: regulator-vbus { >>>> compatible = "regulator-fixed"; >>>> regulator-name = "usb-vbus"; >>>> regulator-always-on; >>>> regulator-boot-on; >>>> regulator-min-microvolt = <5000000>; >>>> regulator-max-microvolt = <5000000>; >>>> }; >>> >>> As mentioned above, I don't think this will make sense in my case. >>> >> P.S.: If the rail has a different name, please use that different name. Obviously >>>> that requires you to have schematics at hand, and I don't know if you do: if you >>>> don't, then that regulator-vbus name is just fine. >>> >>> I do have the schematics. >> >> In that case, you should model the power tree with the fixed power lines, >> check mt8195-cherry (and/or cherry-tomato) and radxa-nio-12l; even though >> those are technically "doing nothing", this is device tree, so it should >> provide a description of the hardware ... and the board does have fixed >> power lines. >> It has at least one: DC-IN (typec, barrel jack or whatever, the board needs >> power, doesn't it?!). > > Mh, maybe I don't get it. But within the hardware there is simply no > Vbus. Thus I'd argue it doesn't make sense to have a vbus-supply > property. Besides, the mediatek,mtu3.yaml binding lists it as > deprecated anyway and it should rather be on the connector. There, > it makes perfectly sense (at least if it's a USB connector). > > Thus in my case, the xhci for the front port has a vbus-supply > property (but it should rather have a connector node, as I've just > learned). But the internal port which connects to the USB hub > shouldn't have one. > > > +-----+ +-----+ +------+ > | |<--Dp/Dn-->| |<------Dp/Dn----->| USB | > | SoC | | | | Conn | > | | | | +-----+ | | > +-----+ | USB | | PWR |--Vbus->| | > | Hub | | SW | +------+ > | | +-----+ > | | ^ > | | | PRTPWR > | |-----' > +-----+ > > "PWR SW" is a power switch, the input (+5V) isn't shown here. The > power will be enabled by the USB Hub. > Ok then, put the vbus on the connector, where applicable. If PWR_SW is a physical switch (not detectable), then you can still model it as an always-on regulator-fixed, as there's no other clean way of doing that. As for modeling the power tree with the fixed power lines, I mean that you should add the power rails as described in your schematics. You will surely have one DC-IN supply, and others. That should be modeled as a fixed regulator, which outputs to (probably) the PMIC, using it as an input for its buck regulators. Again, your PMIC must be getting a voltage from somewhere in order to regulate that to a different voltage for a different power rail, right? :-) Regards, Angelo