Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp1054214lqo; Thu, 9 May 2024 03:31:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUuNi3dssPN0A3eg58zEOdUALWh656SVAMHx865oTVDrsK4yYuZyf3hdvBQE274N2mnHQJxWxAMSfksArAjdjK7JlnVuGnR20oO4KhWGQ== X-Google-Smtp-Source: AGHT+IH9ngOww1PPaeFZG/dVytdvk/mlrGvzkJUdePDYBF32wbc8Pm9eFueq2PdEMItQOuwGtuPW X-Received: by 2002:a17:906:44d:b0:a59:ca33:6840 with SMTP id a640c23a62f3a-a59fb96c03emr308134266b.44.1715250678345; Thu, 09 May 2024 03:31:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715250678; cv=pass; d=google.com; s=arc-20160816; b=ddKheY+r13dswVptkuRgrtSohv3hNMtzkkiui5CZQijZXeixYIxpzAcgOEWg2njOl4 Dq4mAU2tCEFrfehMieS+k6K3ahaxRe5z+FZuMRvPmaWGaZ8VWinCYDybpULEgdoivr0E dCQV2E6ecEErwisI8AKjw0oL6YAMJXepAUv/z8aQKOBjoboptIv4SaVPSh2EY96erYEo sT14P4ZTmDjM1DGrRcGIQrM99ZwTTJVSgSL+/PEbHd9mxOOW3imqqGZWpZ1QaeaemiVe A5+Rd1jjc9B4T4LMA1e2eHspM9amAL/F+HkZJJf9Ijt8sZUAibeKG3ctLv+vBBxDC+Fl NKGQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:references:in-reply-to :user-agent:subject:cc:to:from:date:dkim-signature; bh=UoPWoPxoQZpguOdRekj+oRD5CmQ9pq1FvJuYO01mGTQ=; fh=Ubi+1L3oToJzojc25hihpMVmN71puUpQtiSJokgX1UY=; b=XHZsaBbVyvOipKBxZ6eDRLy4FBfrp+lQPL2AEgDpx8YxWlhpERpbNEBRpiEPhrguhg izMUEbmZokYYw5HxTSC4YKCwncuFGIf0dmjmnZjLXpKPBIx1P57aVwkR8M52iwsP2EwB fCb9fdaamAyh1Xyma7dFvaJeCG9cMNB8QqHyTWrwfn96EEfl5ENbiStEoUElrZBWYXyD R9yR+EdJYRAjOzz5sEDhVeMuqmGF14dCl8bo33zhzN3YVj1PNWkbC6ADFKK+SQQ5nCdj 4o+LW/BC895//+PKaaVR1CiaeQBw3nTsERTOC2eTArZURwOER0xKtUwJ61kXf4mMjVIH qfuQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=bF1VDIHl; arc=pass (i=1 spf=pass spfdomain=fw-web.de dkim=pass dkdomain=mailerdienst.de); spf=pass (google.com: domain of linux-kernel+bounces-174402-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174402-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17946ae8si65824266b.209.2024.05.09.03.31.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 03:31:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-174402-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=bF1VDIHl; arc=pass (i=1 spf=pass spfdomain=fw-web.de dkim=pass dkdomain=mailerdienst.de); spf=pass (google.com: domain of linux-kernel+bounces-174402-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174402-linux.lists.archive=gmail.com@vger.kernel.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 E4B051F23C1F for ; Thu, 9 May 2024 10:31:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 57C1212F37C; Thu, 9 May 2024 10:31:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mailerdienst.de header.i=@mailerdienst.de header.b="bF1VDIHl" Received: from mxout2.routing.net (mxout2.routing.net [134.0.28.12]) (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 99DF214A8C; Thu, 9 May 2024 10:31:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=134.0.28.12 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715250664; cv=none; b=NvUq8oKx2Y3PA1HV3jn3t9xmxLuZFGgjyqpPa5670llYX1zOMq3RPgHo5fCobB7uCuZlua+T1VsYGYA4v/CqrGNa5+eGO94Rf0Cer9Y44IQwV99tukHsElXO0nZhBw2v+pzWdcO+pW2M+RgUGpf8oTeq4Zjb1PqWZB7ldW/TWUg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715250664; c=relaxed/simple; bh=S+jEeUh3CnxtMBYmGNlqgerH02DoplHUxmWFszkiSp0=; h=Date:From:To:CC:Subject:In-Reply-To:References:Message-ID: MIME-Version:Content-Type; b=pE2e4hnazyFUXn6ZPBJ9YSAZkpSd6G4thQyuSCb17sb1s9sxURENSotfOVRnkTbvYmcmsk/mydQo1tSNbkDEZiFmq5aPlcJUkE8vrcYXqhjyQ7j8ZUTo4RHetJ7Sh3cdDsIV9uI+4IcYX6O4wnNgu+ZBUkK6ynm0rK7EGwxnT5o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fw-web.de; spf=pass smtp.mailfrom=fw-web.de; dkim=pass (1024-bit key) header.d=mailerdienst.de header.i=@mailerdienst.de header.b=bF1VDIHl; arc=none smtp.client-ip=134.0.28.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fw-web.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fw-web.de Received: from mxbox4.masterlogin.de (unknown [192.168.10.79]) by mxout2.routing.net (Postfix) with ESMTP id 0A7DA60437; Thu, 9 May 2024 10:30:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1715250653; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UoPWoPxoQZpguOdRekj+oRD5CmQ9pq1FvJuYO01mGTQ=; b=bF1VDIHl+3ov8Fih1IRzr5Q0+eDUa2ekkDs7yHYqQKVhaVl9yr1LZ6KhyeKcXBgj5+Y3b+ nB17Jn5cSYxJPg9JX/dSVFRpZiSrFARmRt0McwvwsBw/wBgGyAxi6OlXDsppqz/HD8Xhe9 mGfFBV4HAz89Z1XiPyuOHfWfAw/kQcU= Received: from [127.0.0.1] (fttx-pool-217.61.150.116.bambit.de [217.61.150.116]) by mxbox4.masterlogin.de (Postfix) with ESMTPSA id B6F7080319; Thu, 9 May 2024 10:30:51 +0000 (UTC) Date: Thu, 09 May 2024 12:30:51 +0200 From: Frank Wunderlich To: AngeloGioacchino Del Regno , Frank Wunderlich CC: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Michael Turquette , Stephen Boyd , Pavel Machek , Lee Jones , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , Eric Woudstra , Tianling Shen , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-leds@vger.kernel.org, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Tianling Shen Subject: =?US-ASCII?Q?Re=3A_Aw=3A_Re=3A_=5BRFC_v1_5/5=5D_arm64=3A_dts=3A_med?= =?US-ASCII?Q?iatek=3A_Add_mt7986_based_Bananapi_R3_Mini?= User-Agent: K-9 Mail for Android In-Reply-To: References: <20240505164549.65644-1-linux@fw-web.de> <20240505164549.65644-6-linux@fw-web.de> <3E013BA7-0264-4AC3-B677-BDD16B1F8D90@public-files.de> Message-ID: <7859DAB9-107F-432D-AA3D-0F54AE0E30D5@fw-web.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Mail-ID: 3e72358f-e0af-4587-a1ce-e7f27fcbf48b Am 9=2E Mai 2024 12:10:59 MESZ schrieb AngeloGioacchino Del Regno : >Il 08/05/24 20:25, Frank Wunderlich ha scritto: >> Hi >>=20 >>> Gesendet: Dienstag, 07=2E Mai 2024 um 15:35 Uhr >>> Von: "AngeloGioacchino Del Regno" >>>=20 >>> Il 06/05/24 18:00, Frank Wunderlich ha scritto: >>=20 >>>>>> + fan: pwm-fan { >>>>>> + compatible =3D "pwm-fan"; >>>>>> + #cooling-cells =3D <2>; >>>>>> + /* cooling level (0, 1, 2) - pwm inverted */ >>>>>> + cooling-levels =3D <255 96 0>; >>>>>=20 >>>>> Did you try to actually invert the PWM? >>>>>=20 >>>>> Look for PWM_POLARITY_INVERTED ;-) >>>>=20 >>>> Mtk pwm driver does not support it >>>>=20 >>>> https://elixir=2Ebootlin=2Ecom/linux/latest/source/drivers/pwm/pwm-me= diatek=2Ec#L211 >>>>=20 >>>=20 >>> You're right, sorry - I confused the general purpose PWM controller wi= th the >>> rather specific DISP_PWM controller (which does support polarity inver= sion)=2E >>>=20 >>> It's good - but I'd appreciate if you can please add a comment stating= that >>> the PWM values are inverted in SW because the controller does *not* su= pport >>> polarity inversion=2E=2E=2E so that next time someone looks at this wi= ll immediately >>> understand what's going on and why :-) >>=20 >> so i would change comment like this: >>=20 >> /* cooling level (0, 1, 2) >> * signal is inverted on board >> * mtk pwm driver does not support >> * PWM_POLARITY_INVERTED */ >>=20 > >There you go: > >/* > * The signal is inverted on this board and the general purpose > * PWM HW IP in this SoC does not support polarity inversion=2E > */ >/* Cooling level < 0 1 2> */ >cooling-levels =3D <255 96 0>; Thanks for clearing structure of the comment,but imho actually it is a dri= ver issue (for all mtk SoC)=2E Not sure it is really a hardware limitation= =2E So i would change this to "=2E=2E=2E and the PWM driver does not suppor= t polarity inversion=2E" >>>>>> + pwms =3D <&pwm 0 10000>; >>>>>> + status =3D "okay"; >>>>>> + }; >>>>>> + >>>>>> + phy14: ethernet-phy@14 { >> =2E=2E=2E >>>>>> + interrupts-extended =3D <&pio 48 IRQ_TYPE_EDGE_FALLING>; >>>>>> + reset-gpios =3D <&pio 49 GPIO_ACTIVE_LOW>; >>>>>> + reset-assert-us =3D <10000>; >>>>>> + reset-deassert-us =3D <20000>; >>>>>> + phy-mode =3D "2500base-x"; >>>>>> + full-duplex; >>>>>> + pause; >>>>>> + airoha,pnswap-rx; >>>>>> + >>>>>> + leds { >>>>>> + #address-cells =3D <1>; >>>>>> + #size-cells =3D <0>; >>>>>> + >>>>>> + led@0 { /* en8811_a_gpio5 */ >>>>>> + reg =3D <0>; >>>>>> + color =3D ; >>>>>> + function =3D LED_FUNCTION_LAN; >>>>>> + function-enumerator =3D <1>; >>>>>=20 >>>>> Why aren't you simply using a label? >>>>=20 >>>> You mean the comment? I can add it of course like for regulators=2E >>>>=20 >>>=20 >>> I mean in place of the function-enumerator=2E=2E=2E that's practically= used to >>> distinguish between instances, it's not too common to see it, and usua= lly >>> "label" replaces exactly that - just that, instead of a different numb= er, >>> it gets a different name with no (usually) meaningless numbers :-) >>=20 >> as far as i understand using label also makes "function" property usele= ss, after discussing >> this with eric i would drop both on all 4 places by labels like these: >>=20 >> label =3D "yellow-lan"; >> label =3D "green-lan"; >> =2E=2E=2E >>=20 >> not sure if we should drop color property too=2E=2E=2E >>=20 > >I'm looking at the leds binding (leds/common=2Eyaml) right now=2E > >My suggestion of using 'label' was actually wrong - and your devicetree w= as >actually right!!! (apart from the default-trigger that may not work) > >Infact, the documentation says, in brief: > >- function-enumerator is ignored if label is present >- function doesn't say that gets ignored >- color doesn't say that gets ignored >- label says: > - If not present -> get string from node name > - function-enumerator ignored > - This property is deprecated > >=2E=2E=2Ebut the 'label' binding does not say 'deprecated: true', which i= s something >that must be fixed! Ok,i can try to add the property to binding (independ of this series)=2E I= mho label was cleaner than function and function-enumerator=2E=2E=2E >So, I'm sorry for the confusion, the noise and the useless loss of time a= round >this - you can keep the LED nodes as they are, and that's a lesson for th= e future >me reviewing another node like this one=2E Don't worry, we are all humas=2E=2E=2Ei missed looking in linux-next for t= he other binding-patches=2E >P=2ES=2E: This shouldn't have been a RFC, as the patches are more than RF= C quality!!! I sent it as RFC because i had not expected to be merged before next is cl= osed=2E >Cheers, >Angelo > >>>>>> + default-state =3D "keep"; >>>>>> + linux,default-trigger =3D "netdev"; >>>>>> + }; >>>>>> + led@1 { /* en8811_a_gpio4 */ >>>>>> + reg =3D <1>; >>>>>> + color =3D ; >>>>>> + function =3D LED_FUNCTION_LAN; >>>>>> + function-enumerator =3D <2>; >>>>>> + default-state =3D "keep"; >>>>>> + linux,default-trigger =3D "netdev"; >>>>>> + }; >>>>>> + }; >>>>>> + }; >>>>>> + >>>>>> + phy15: ethernet-phy@15 { >>>>>> + reg =3D <15>; regards Frank