From patchwork Wed Mar 22 12:56:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan \(OSS\)" X-Patchwork-Id: 666096 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 32331C6FD1F for ; Wed, 22 Mar 2023 12:51:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230401AbjCVMvU (ORCPT ); Wed, 22 Mar 2023 08:51:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230081AbjCVMvS (ORCPT ); Wed, 22 Mar 2023 08:51:18 -0400 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2048.outbound.protection.outlook.com [40.107.20.48]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60E1811EBB; Wed, 22 Mar 2023 05:51:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=N4RkyQgMBeh2kj+hHrxCcty1iRz6lCAfW30Q2WQjQIoJLdfPkDFwyy8kFYpdz93uoACbsdQyrUfKMAu6QhzE5JgbXfiEzdPc4uDpQSBKcfNcYztq/kB+FNg1l5LRfDB8X7R7DFBYssg4oKDSvskBfWnRS/0MUPvu3l8lakgByc1ks5O9RH4VnQt80vSnCZ43vkLVteiQhuc2Om1NXGbEHCKsbLdUB0hJFExa2fcx8kG54HPedrYsgJsnYbHeLXVWX+XqvpE4pjXA0fsaT0RKEtXP4ZpE+fxBWW1gBbQs4YagiImKy8VpZniddGgm0ws6YPS8/2t5J7KOP8VSTyeNiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=yE+SF97Nr9xmxw2bxHnZ1+fzvQeNqUA1CQdOXXeesDM=; b=fijcRX4vdIXzNhBSuM3++HWMOzKIHHXHH1vcU4nzmS7YIpVFrHnKAoh2m+YKNbhGs+KV1F5V2RtJztsjBOUEISUnSaCjo33YrJjit3IvHQjhCz7abk2/mcv6aqIenbq8Io1j+fs7cqcZtTGjUfqCap41DHp8yPc+apoOTz4pAtyHWdQKfd5L9KqAMEqLZDKVOGLB7gM+U3kPxv6W5hYNoUsXfxz8cpcCLwym5TbUFW22szPcDw0yLLY0SbZHivVrjrx/hXr56/Yp+MANkz1qVi5SlZt2DN4IF1IX4VXH8pEK1XgDbL9IAzgu+APmY6UVXwsb2SRoHmdkX0AkJrll7g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yE+SF97Nr9xmxw2bxHnZ1+fzvQeNqUA1CQdOXXeesDM=; b=BPri4+22Y+GvuumeejvXU+p3ScyaVm6WAbMdMWzQRag21Q61zZbUKWWcRl3xz2LR98EyXkaLkSeNrrfDxry26DrRGaVwhEoifwdFVu4qzyWKsgSDIQAf3L1s9UXZ0T1FT7z8ZqFlkorSrcgu0SRKuo4FIvXT/kxW43qoi4dSYB4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) by AS5PR04MB9756.eurprd04.prod.outlook.com (2603:10a6:20b:677::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.37; Wed, 22 Mar 2023 12:51:13 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::f55a:cf12:da08:6d2a]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::f55a:cf12:da08:6d2a%7]) with mapi id 15.20.6178.037; Wed, 22 Mar 2023 12:51:13 +0000 From: "Peng Fan (OSS)" To: gregkh@linuxfoundation.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de, xu.yang_2@nxp.com Cc: kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, jun.li@nxp.com, Peng Fan Subject: [PATCH linux-next V2] dt-bindings: usb: snps,dwc3: correct i.MX8MQ support Date: Wed, 22 Mar 2023 20:56:18 +0800 Message-Id: <20230322125618.3402577-1-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.37.1 X-ClientProxiedBy: SI2PR02CA0010.apcprd02.prod.outlook.com (2603:1096:4:194::15) To DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR04MB9417:EE_|AS5PR04MB9756:EE_ X-MS-Office365-Filtering-Correlation-Id: aab6a2a0-bb18-46c8-668b-08db2ad41e28 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 83afpwXshU6CCoVx2X37b+78ny5EfJVkxwrvipwYftxFqVH7zM/r+2YAfIuUzu+lii66h14NvlfprNQYwNQGtgOczT2/B0bcd5dmNV43ZDi7cd8bVbiooQq6PIWj9rclf9gk7shhRaSWV74GV2zUij1/lN1uri1WdGtvAVhYcThOfPKqCTc2M6bgsHlSXMnCQq6ktdc5rqGasZQu+twJRxsiNyYw99DQtDzYHCSMEnl2LTiptF24bYmGwVanLWPHAh5LA4R+yqBYt3LIkcdVYOMEz/J/ISJggXcVLQ2hwPM7rZlfD5ZUzUeUrbZKVxjN1NXHgsak2ufGzEhGxIN/V6VGlj9vnq6dMccBOVmDiYLfZa0K6q6J6DyCEVma1E/xroQPmbTeCLbigZneLr5W6eiei4vdWVVJ2bw6UnvqTGU8J8eGLy4vzGYKRY7G61ubAw7aAx30hdbulugMqlFdks5+ZIoRqA3IS/yyX2wiWMiGV/6f4LjfYFdf2Mre9D+pV5dPUMOaHzO83pNo2HAcmWmJENnnG70/1gR315RBlkc5jBPwnhSsqwxMM+DBSUmwPcdqZiwgp6rjThsD9TmC2hhgdFS4fDsbsF/eFjWS/YL1sdB3ITlGebTDYoSu33H3mfENvSdKJ7CSOXh4mN9s/COVmZxp3hoAXWR1TXFwcZ298RMNB0vj3smOpia3NvMaUwZsg/KYYE/+WLqmdZq0cEx6h6B97MqHCvxEGdtXUK8= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DU0PR04MB9417.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(4636009)(376002)(39860400002)(136003)(366004)(396003)(346002)(451199018)(2616005)(83380400001)(478600001)(6486002)(26005)(6512007)(52116002)(6506007)(186003)(5660300002)(1076003)(7416002)(316002)(966005)(38100700002)(86362001)(8936002)(66946007)(66556008)(8676002)(2906002)(4326008)(41300700001)(38350700002)(66476007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: uySpZ5VGdvmGF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wSRienFKKWQH//iS0RiOCOUiPQ/sbBJwAOwf/D30Jq3mVMO0+JetyYU3dh46LnjYXZ21+YvlMLjB0aBWTHQ7xSsjggOJBTHJZvcziN1Xi89UMHofGF3S2XPTGvjEEn1PSa28qNSeA/w7+5aZNxpmrAwWeRY8y3HbVHPrNPvseYYKJhuEzTolG+NlCx3KuuA4Cs0oaVs+G7T0B41TnqeRag49+ucOyGk4sQnhRLyGeClozOsAJDdsvwEK25tJRkEUZAMXBXWilCALgMN585rkaLGE66t339/62aYONEzazoBNyDgUzhHxxC5qESpOd187dttWN0r1z07S0DCsmMtqGdffFt01ix/d1ttmqJ7RacI/QBY6LJloKUrbmLeWFbX3BOucNVXxhOAQ4lHLcEph3Z+8N+qwFpQwZmSju4QU7wIlcqnfngB7yN+eOHGJ+sprTPKrtTsArtslbv//1SnNZ9At3W/5z9UZBiGyxILcpR4IL/pYWLP7SRkX++ X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: aab6a2a0-bb18-46c8-668b-08db2ad41e28 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Mar 2023 12:51:13.3110 (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: AFEsE4OEf5T0fCnXVzVj10/WTjIPo5RYXByxI6EBZL3i44hkkfBW7daw4ExJBp9ZRfWX/yfKACkXJcvhD6QhFg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS5PR04MB9756 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org From: Peng Fan The previous i.MX8MQ support breaks rockchip,dwc3 support, so use select to restrict i.MX8MQ support and avoid break others. Fixes: 3754c41c7686 ("dt-bindings: usb: snps,dwc3: support i.MX8MQ") Signed-off-by: Peng Fan --- V2: Add a new yaml file for i.MX8MQ DWC3. I am not sure whether this is right, still meet dtbs error: arch/arm64/boot/dts/freescale/imx8mq-kontron-pitx-imx8m.dtb: usb@38100000: Unevaluated properties are not allowed ('phys', 'phy-names', 'maximum-speed' were unexpected) But there is already ref to snps,dwc3.yaml and dwc3 yaml ref to usb-x.yaml .../bindings/usb/fsl,imx8mq-dwc3.yaml | 74 +++++++++++++++++++ .../devicetree/bindings/usb/snps,dwc3.yaml | 12 ++- 2 files changed, 79 insertions(+), 7 deletions(-) create mode 100644 Documentation/devicetree/bindings/usb/fsl,imx8mq-dwc3.yaml diff --git a/Documentation/devicetree/bindings/usb/fsl,imx8mq-dwc3.yaml b/Documentation/devicetree/bindings/usb/fsl,imx8mq-dwc3.yaml new file mode 100644 index 000000000000..055ffb122db7 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/fsl,imx8mq-dwc3.yaml @@ -0,0 +1,74 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/fsl,imx8mq-dwc3.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP iMX8MQ Soc USB Controller + +maintainers: + - Li Jun + - Peng Fan + +select: + properties: + compatible: + contains: + enum: + - fsl,imx8mq-dwc3 + required: + - compatible + +properties: + compatible: + items: + - const: fsl,imx8mq-dwc3 + - const: snps,dwc3 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + items: + - description: Controller root clock + - description: Controller core reference clock + - description: clock that used for wakeup + + clock-names: + items: + - const: bus_early + - const: ref + - const: suspend + + power-domains: + maxItems: 1 + +required: + - compatible + - reg + - interrupts + +allOf: + - $ref: snps,dwc3.yaml# + +unevaluatedProperties: false + +examples: + - | + #include + #include + + usb_dwc3_1: usb@38200000 { + compatible = "fsl,imx8mq-dwc3", "snps,dwc3"; + reg = <0x38200000 0x10000>; + clocks = <&clk IMX8MQ_CLK_USB2_CTRL_ROOT>, + <&clk IMX8MQ_CLK_USB_CORE_REF>, + <&clk IMX8MQ_CLK_32K>; + clock-names = "bus_early", "ref", "suspend"; + interrupts = ; + phys = <&usb3_phy1>, <&usb3_phy1>; + phy-names = "usb2-phy", "usb3-phy"; + }; diff --git a/Documentation/devicetree/bindings/usb/snps,dwc3.yaml b/Documentation/devicetree/bindings/usb/snps,dwc3.yaml index 16c7d06c9172..c167fd577cae 100644 --- a/Documentation/devicetree/bindings/usb/snps,dwc3.yaml +++ b/Documentation/devicetree/bindings/usb/snps,dwc3.yaml @@ -30,13 +30,11 @@ allOf: properties: compatible: - oneOf: - - items: - - const: fsl,imx8mq-dwc3 - - const: snps,dwc3 - - const: snps,dwc3 - - const: synopsys,dwc3 - deprecated: true + contains: + oneOf: + - const: snps,dwc3 + - const: synopsys,dwc3 + deprecated: true reg: maxItems: 1