From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 36272D62060 for ; Tue, 19 Nov 2024 10:10:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=QaGyi8stG9QRBl/fszkXPCN0/YMnVBQAMkr+7eUPAJE=; b=UsDOdg6WNdtXku K2jK3+uKiPno6O0jx8jiM/+90+UwindgljvGSYtbEmU7ad3qo9qHe/p9PPRAVVEQZdpcMHPQ3gA1q MvWMtfgQeGGHNfUzBwiWZiYVpT0QwbpQHcjc5DoHIKst39nh+3aIj8vghQp0vwuSC5ea0nJP4DfRy ygvU6pHhgTw/BfDgUTOH1nmgYdnePbBaIUrh+RcwP27xteOkCUK/UCD9GWuURnU5MRz/LiWNZBmcQ +BIiccayp02K530HlTAdXyUwAD3DyLRJ9NhnEu4l80iwmP86xqM7yAZkEWKdI0xtf8OmQthJo/MXa nEYZue2dSk8gFfLh70nw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tDLBI-0000000Bzj2-3sQu; Tue, 19 Nov 2024 10:10:00 +0000 Received: from mail-db8eur05on20618.outbound.protection.outlook.com ([2a01:111:f403:2614::618] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tDLBG-0000000Bzg4-3h5E; Tue, 19 Nov 2024 10:10:00 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=fxvr7P0prZ+WdD24393gHrQwxZsj0j73Lv1n5u/147qRamIbbLRvuvdxJTd0M9r3M9T1JmrpQhJo4PsvM27kZYH2efGIyCgdYnDdjZ07PuY+bMNhV4x8m9RiKjjiuBboIlNUg9d3IFVwYoTHbT2yULeNivjX7L67nOqXgzZzoht/Yqkc9wKpqLgY6vi2tstpJRqvdUa/rXV6fLDjBOVE3MW8sP/q5NNBTbiVfPuFz8+thye9aIibup3vhzc6i+/Hnxc59n4GFAwRPqjCGm+mvCD+Oc4Xdni/EOMF6prSjKbRdYKzxTxSq6Mnu9kXedJ1uKGd1hKa1bWVnGAjhjz4LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1og3xBx3TcLGOM0hgrhkwz0AE9BJdmvnl46cNmpAhTo=; b=nng8IRVJWtXaqUU5UvUJpR0kFrHR2SqmULCbRJZ1NVVbpB9npl2XNOTIsit4+hqyeYAoZor5tjb0L6OJqH0nUMdAfZXJ/f126UtEKxWsNzJPLR1Tkp086YsQOg6mVg2R6wRZy42dW+UOeLB/xC70KwDLT4yGJmwmyO8LZw3kRPreUiHd9lUWkJfgGybagcC0NFxd5sDy4YAfTYqb+F8Fx/4RXdeGzPva3Lhj9kznJxR6vHCHTbfnrPxztqJLVTr9PD4veyM3mOgttoSDbsTMMhNstCy4r9xuGAqr+96esI++0tsuL88Md1GK5gTwFTw4XMZ3Sg1GEN4zZHAuWmDJkQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1og3xBx3TcLGOM0hgrhkwz0AE9BJdmvnl46cNmpAhTo=; b=a5EVKKayjPw7WSVJ/5e38UCvKhSW6mYhNFietRAQ0jfkBKPa3IujaaC8c3vD9i23FRrzwckN1jd7sWetnOw3aSshEWl6IrdUY4z2r0Z5jfRoffmFMLpZC6twxHr6q3EoP5SZzKZFr/7yzYnvXhoAsi1jalL4gkUl8bQ156CK4rs78SrhuVqSYj9qdk+s9FEjxccMJciiRciSrgzE+Buz2THJxYyT1rtTI1+fQ4UTnlwI7lTvHg9cgFXcvEfRvbOogmA/QzsX8KskJJke6mxZvf5zYwUjZuEJqZa/doucB1QLEuwVuQITQKTbuLCff/xR8x8tWBKAuqcePLJ5PKqjIg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) by GV1PR04MB9215.eurprd04.prod.outlook.com (2603:10a6:150:2a::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.23; Tue, 19 Nov 2024 10:09:51 +0000 Received: from DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::4e24:c2c7:bd58:c5c7]) by DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::4e24:c2c7:bd58:c5c7%6]) with mapi id 15.20.8158.023; Tue, 19 Nov 2024 10:09:50 +0000 Date: Tue, 19 Nov 2024 18:07:29 +0800 From: Xu Yang To: Conor Dooley Cc: vkoul@kernel.org, kishon@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, jun.li@nxp.com, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-usb@vger.kernel.org Subject: Re: [PATCH] dt-bindings: phy: imx8mq-usb: optionally refer to usb-switch.yaml Message-ID: <20241119100729.cjol44ozd55vcter@hippo> References: <20241114102203.4065533-1-xu.yang_2@nxp.com> <20241114-marmalade-bottling-8fe656515ee7@spud> <20241115020045.qlrkyrelpgdwpxxk@hippo> <20241115-bladder-legislate-7daef7a750ad@spud> Content-Disposition: inline In-Reply-To: <20241115-bladder-legislate-7daef7a750ad@spud> X-ClientProxiedBy: AM9P250CA0021.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:21c::26) To DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8822:EE_|GV1PR04MB9215:EE_ X-MS-Office365-Filtering-Correlation-Id: 2089a5e9-e93c-447e-178d-08dd08824dca X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|52116014|376014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?aIaZJ3QPgV3jC7xhWbTyheyIDQCAYqVSvrt/w1H3ABUrLLQKVzurx3WmKuCv?= =?us-ascii?Q?b0eK9BbE5G+yOqYaAvg0NKxWPlJ9AA8RKJlHwu1mCUnEe8g6EmpJQLO9g0Em?= =?us-ascii?Q?fk4OXqav3LRHbxTSRj7mkdP3PDC8L/BzeM84HhClPGQo/r2KFsFax7vCqWX5?= =?us-ascii?Q?O0xS1dBLtYjNFeqIbJIJiLtxZc274MWOD2XFh/IAYDXbU8Uj5FWXQfQunu6f?= =?us-ascii?Q?T0KdqNSuSkWzQ/1hIi1hir0D8C+MLY3PO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QpBRmcqbsBbaK/dt5lo39itboFc/CiMkwaDjp8NSvXmfC60cRT+R/q?= =?us-ascii?Q?1Rth09h3273xHQXo1VShC2qwgjzyXoU4hnD1IUU7iRu86L89lkZaZEc8Qh7f?= =?us-ascii?Q?somv2bRWpiG8mbTPZwgblIJ4DCHCRDBCluCplqG3uYj4qjJ2y5CGLdjj8PD3?= =?us-ascii?Q?mPoMj5RwpM6Kqnv+AKFf1fdY7UMQRLTygcuVsUSx1vDVZtk41KLplwRtT0Nq?= =?us-ascii?Q?ss4Iw4JP5JNraaSOIiaUPOpT46pc?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU2PR04MB8822.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(7416014)(52116014)(376014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?hxcyZbJdCYs2NCHTHcGy/ea69A+1DSPTH7MrRoC7l05+aax76t7gk+OnQD2z?= =?us-ascii?Q?S9Q8hQZt8H6LJUvGQP6GSuA8/vq+HZG6gVW0UMavQkQURcr6x9CsyN2TRzFs?= =?us-ascii?Q?/WTPLYzams6iI1oijRdOud+wyVcPA+aY1iQK6QzysSqwpgqPba3NZD+6iqHX?= =?us-ascii?Q?AgvcYDx0eXX4eQe6gC7Ufl6T99lu3k7t2uCGFNUoeJtaVlcTDNnFKeIKq/cf?= =?us-ascii?Q?BS6OD1ONUgeoubqkT7QI+bYpKNfbqYetyAG7oAnwRmVD9OgqBQw3mFu3MAs/?= =?us-ascii?Q?HQ2PBZzxdK1Iz4bVpfTJ9EUaxNLQy8AUTo44pva94928sp1rQalWk2EMiUul?= =?us-ascii?Q?T7hJbLjl+F0PSk1tyz1Ur1zQcQwr4usf/N0YKb9+h8cTrv4o+tDpdQ+hDUGe?= =?us-ascii?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mpr?= =?us-ascii?Q?rcKJwAWnS9fpWNRam+4g5xWXFXZrZA4ytnCZEpQDAbpL3pAT9VyM7wjqS+L5?= =?us-ascii?Q?J/jwTaWIqJthbfFRf84SX4z2oDJp2pGUn9qjAhHQjD2zy8w0Lm+J9EQcN4Bj?= =?us-ascii?Q?V70JpZjXDjfF7GwqQr5jYmFWwgE0f3UCtJX1eP1G/KCYjP/Rqyi0sPe/aPUO?= =?us-ascii?Q?b1eO01gCbFF+BT392RdrywgnrIreS1fZUbZVnURdtmuiapnKvyzYgRPr6Y2O?= =?us-ascii?Q?up02QKhVYFtXSFY2SFlXtXURLyRU0vi9yD5lMKNT?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2089a5e9-e93c-447e-178d-08dd08824dca X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8822.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Nov 2024 10:09:50.8357 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: C2wN7cHta/kJgaK+Xr6dN0lNZcnEDPKfzKJTSnOkOmpaAodvfg9lwo+46Mrgn/GUh16TjVw6WkhZPMhz2Si68Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR04MB9215 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241119_020958_919306_CF90A6A0 X-CRM114-Status: GOOD ( 34.81 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org On Fri, Nov 15, 2024 at 06:34:50PM +0000, Conor Dooley wrote: > On Fri, Nov 15, 2024 at 10:00:45AM +0800, Xu Yang wrote: > > On Thu, Nov 14, 2024 at 05:45:07PM +0000, Conor Dooley wrote: > > > On Thu, Nov 14, 2024 at 06:22:03PM +0800, Xu Yang wrote: > > > > The i.MX95 usb-phy can work with or without orientation-switch. With > > > > current setting, if usb-phy works without orientation-switch, the > > > > dt-schema check will show below error: > > > > > > > > phy@4c1f0040: 'oneOf' conditional failed, one must be fixed: > > > > 'port' is a required property > > > > 'ports' is a required property > > > > from schema $id: http://devicetree.org/schemas/phy/fsl,imx8mq-usb-phy.yaml# > > > > > > > > This will add a condition to optionally refer to usb-switch.yaml. > > > > > > > > Signed-off-by: Xu Yang > > > > > > $subject is not what the patch does. > > > > I look through other yaml and find below format could achieve the > > restriction on one property: > > > > https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/tree/Documentation/devicetree/bindings/usb/gpio-sbu-mux.yaml?h=usb-testing#n54 > > > > - if: > > required: > > - mode-switch > > then: > > required: > > - enable-gpios > > > > If mode-switch is present, then enable-gpios is required. If not, then > > enable-gpios is not required. > > > > For my case, if compatible contains "fsl,imx95-usb-phy" and orientation-switch > > is present, then this schema needs to refer to usb-switch.yaml. If not. then > > this schema will not refer to usb-switch.yaml. So the subject could reflect > > the thing this patch does. > > > > Is this feasible? If not, could you give some advices? > > Hmm, I guess I can now see an interpretation of the wording that > reflects what the patch contents contains. However, you need a hardware > based justification for the condition you're adding since it disables > mode-switch and defining port nodes etc if orientation-switch isn't present. Okay. You are right. Based on current schema, it does disable mode-switch and port. However, the initial intention of referring usb-switch.yaml is only to support orientation switching. > That's fine if that hardware doesn't support mode switching or ports > without orientation switching, but not if it does. Yes, the hardware doesn't support mode swiching for now. Therefore, it should be fine to add such condition. Maybe the future hardware will need mode-switch and this schema needs update accordingly. I find the condition of judging compatible "fsl,imx95-usb-phy" and orientation-switch present is a little complicated. I plan to send v2 to simply the condition. Thanks, Xu Yang > > Cheers, > Conor. > > > > > Thanks, > > Xu Yang > > > > > > > > > --- > > > > Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml | 2 ++ > > > > 1 file changed, 2 insertions(+) > > > > > > > > diff --git a/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml b/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml > > > > index 6d6d211883ae..1238792157f8 100644 > > > > --- a/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml > > > > +++ b/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml > > > > @@ -118,6 +118,8 @@ allOf: > > > > contains: > > > > enum: > > > > - fsl,imx95-usb-phy > > > > + required: > > > > + - orientation-switch > > > > then: > > > > $ref: /schemas/usb/usb-switch.yaml# > > > > > > > > -- > > > > 2.34.1 > > > > > > > > -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy