Message ID | 20221107135825.583877-3-herve.codina@bootlin.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2065865wru; Mon, 7 Nov 2022 06:00:49 -0800 (PST) X-Google-Smtp-Source: AMsMyM5rr/qt/L+GGNJ/Gmuth81sliQazHe/F1CYFaQA4YVGuonUz6msrjS7etNtmcCJdozjDxzH X-Received: by 2002:a17:902:b788:b0:186:a810:4072 with SMTP id e8-20020a170902b78800b00186a8104072mr50921245pls.86.1667829649267; Mon, 07 Nov 2022 06:00:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667829649; cv=none; d=google.com; s=arc-20160816; b=kRPvwFPoxAz7UP8iyZGW9ViCIDkTotPGPJ7Xp9a3r+EhCpaG2YrmT+5/OamlBlWNP5 MQ4zw1OuBN0dhPfYZVpfc58Cb5bfNuqZNQmukeNtWZLjv4nDAyUSaJsWhjAtHPdr8dPu fnZUbGUPYptQnuNTmRqqSQemWB1/mUbDCCLMF3luIumj3ik9P66LxbA7GUhxvF0u8aAX 1riRg9w8ifex0TjACZUbydbaQAq0CGLYo1qIqT5pekOCtYVFeojYSc3/QoZ4adJvnkhr mwUhw+MRsAtf6Pa/OdV1HRsmlz9ePWg9+O23Irs/LakbTEZ6KUMRgrW6kIa6A4TKeGfh uYVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=OtZQJBL/FYUOH9MyZ1O4/vM6k2nj9uAHCCwNNoTB1Ag=; b=qSzD0w4eEFo40XOA5L00JYg/+WeSo7lcNb9poQrpk2cAEl91hoUlaSE14m2uL4mjyo KSD6gWCfaFpal0rw/Uy2URezpnnnhy+0DzVBtoedEY0SnCiQolep8AS1SRBNG4lqI+qo E5eY0QcGFhBTgGEWI80cpc+Jcl9Waiyipk4oXoFWjMh015aSiA3oUF+6XBNFAvE/2LEB Ewxpzb5ulu9fayjtXh32DLkEzHkNtiPF15zv+Ubii1xUtyV+jHpcXqiGppP08BA+z0If ekpUsECIXcca8bJB65y+UYOd5/71zVlUkqGFbQ2wL5FAGEHXmx9JrpJLYslvWJbfjlrk Fh5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=dYl4ZSG0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u2-20020a627902000000b00564874e14e9si9359938pfc.280.2022.11.07.06.00.34; Mon, 07 Nov 2022 06:00:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=dYl4ZSG0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232002AbiKGN7z (ORCPT <rfc822;hjfbswb@gmail.com> + 99 others); Mon, 7 Nov 2022 08:59:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232029AbiKGN7x (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 7 Nov 2022 08:59:53 -0500 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8443DB1E; Mon, 7 Nov 2022 05:59:52 -0800 (PST) Received: (Authenticated sender: herve.codina@bootlin.com) by mail.gandi.net (Postfix) with ESMTPA id 83B6B4000A; Mon, 7 Nov 2022 13:59:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1667829591; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OtZQJBL/FYUOH9MyZ1O4/vM6k2nj9uAHCCwNNoTB1Ag=; b=dYl4ZSG0LJDPOMJ5EHeoZ+Khw1qoNXzZorJHW3LE++5rFQ2XWIMrIfG9Ue9o/u2zMt06W6 bqt/b69ECQ5OX5c7e3YMHx7pp9yWbcYUXZuOpoJDQCgdMYQd3kY1GpbKVVNMNWVZ8k3Vc1 MPnDR3sv8HCz8ie7pLuJfkjk0zw1kEonuvcQ33DuYw68V3rZWlb3qWm3FVC7GEyW/WQ8Jc 1ElOfqedAaYiA1jjD24a21E9EYc43uJTeE7gf+cpAKs2puyatNixrXScLeAJkOH7xM2Uay yrM4H78serZxde+4erp+1S8pgJWNQJN81GVpma20WBqvVAw62+8FU0BB7oUPFQ== From: Herve Codina <herve.codina@bootlin.com> To: Geert Uytterhoeven <geert+renesas@glider.be>, Michael Turquette <mturquette@baylibre.com>, Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Herve Codina <herve.codina@bootlin.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Magnus Damm <magnus.damm@gmail.com>, Gareth Williams <gareth.williams.jx@renesas.com> Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Thomas Petazzoni <thomas.petazzoni@bootlin.com>, Miquel Raynal <miquel.raynal@bootlin.com> Subject: [PATCH 2/7] dt-bindings: clock: renesas,r9a06g032-sysctrl: Add h2mode property Date: Mon, 7 Nov 2022 14:58:20 +0100 Message-Id: <20221107135825.583877-3-herve.codina@bootlin.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221107135825.583877-1-herve.codina@bootlin.com> References: <20221107135825.583877-1-herve.codina@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748846142021170237?= X-GMAIL-MSGID: =?utf-8?q?1748846142021170237?= |
Series |
Add the Renesas USBF controller support
|
|
Commit Message
Herve Codina
Nov. 7, 2022, 1:58 p.m. UTC
Add the h2mode property to force the USBs mode ie:
- 2 hosts
or
- 1 host and 1 device
Signed-off-by: Herve Codina <herve.codina@bootlin.com>
---
.../bindings/clock/renesas,r9a06g032-sysctrl.yaml | 10 ++++++++++
1 file changed, 10 insertions(+)
Comments
Hi Hervé, On Mon, Nov 7, 2022 at 2:59 PM Herve Codina <herve.codina@bootlin.com> wrote: > Add the h2mode property to force the USBs mode ie: > - 2 hosts > or > - 1 host and 1 device > > Signed-off-by: Herve Codina <herve.codina@bootlin.com> Thanks for your patch! > --- a/Documentation/devicetree/bindings/clock/renesas,r9a06g032-sysctrl.yaml > +++ b/Documentation/devicetree/bindings/clock/renesas,r9a06g032-sysctrl.yaml > @@ -39,6 +39,16 @@ properties: > '#power-domain-cells': > const: 0 > > + renesas,h2mode: > + description: | > + Configure the USBs mode. > + - <0> : the USBs are in 1 host and 1 device mode. > + - <1> : the USBs are in 2 host mode. > + If the property is not present, the value used is the one already present > + in the CFG_USB register (from reset or set by the bootloader). > + $ref: /schemas/types.yaml#/definitions/uint32 > + enum: [0, 1] > + > '#address-cells': > const: 1 While the H2MODE register bit is indeed located in the sysctrl's address space, and handling it here makes it simpler for the drivers (especially w.r.t. the default handling), this is really a property of the switchable usbh/f core... Perhaps it can be moved there? Or not? Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Hi Geert, On Mon, 7 Nov 2022 16:14:10 +0100 Geert Uytterhoeven <geert@linux-m68k.org> wrote: > Hi Hervé, > > On Mon, Nov 7, 2022 at 2:59 PM Herve Codina <herve.codina@bootlin.com> wrote: > > Add the h2mode property to force the USBs mode ie: > > - 2 hosts > > or > > - 1 host and 1 device > > > > Signed-off-by: Herve Codina <herve.codina@bootlin.com> > > Thanks for your patch! > > > --- a/Documentation/devicetree/bindings/clock/renesas,r9a06g032-sysctrl.yaml > > +++ b/Documentation/devicetree/bindings/clock/renesas,r9a06g032-sysctrl.yaml > > @@ -39,6 +39,16 @@ properties: > > '#power-domain-cells': > > const: 0 > > > > + renesas,h2mode: > > + description: | > > + Configure the USBs mode. > > + - <0> : the USBs are in 1 host and 1 device mode. > > + - <1> : the USBs are in 2 host mode. > > + If the property is not present, the value used is the one already present > > + in the CFG_USB register (from reset or set by the bootloader). > > + $ref: /schemas/types.yaml#/definitions/uint32 > > + enum: [0, 1] > > + > > '#address-cells': > > const: 1 > > While the H2MODE register bit is indeed located in the sysctrl's > address space, and handling it here makes it simpler for the drivers > (especially w.r.t. the default handling), this is really a property > of the switchable usbh/f core... > Perhaps it can be moved there? Or not? Moving the property outside sysctrl (and so its handling) will not be that easy especially if some more operations are needed (as you mention in your patch 3/4 review). Not sure about what is the best thing to do. (a) Keep it simple and stay in sysctrl or (b) Create an usb_role_switch driver. > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds
diff --git a/Documentation/devicetree/bindings/clock/renesas,r9a06g032-sysctrl.yaml b/Documentation/devicetree/bindings/clock/renesas,r9a06g032-sysctrl.yaml index 95bf485c6cec..f9e0a58aa4fb 100644 --- a/Documentation/devicetree/bindings/clock/renesas,r9a06g032-sysctrl.yaml +++ b/Documentation/devicetree/bindings/clock/renesas,r9a06g032-sysctrl.yaml @@ -39,6 +39,16 @@ properties: '#power-domain-cells': const: 0 + renesas,h2mode: + description: | + Configure the USBs mode. + - <0> : the USBs are in 1 host and 1 device mode. + - <1> : the USBs are in 2 host mode. + If the property is not present, the value used is the one already present + in the CFG_USB register (from reset or set by the bootloader). + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [0, 1] + '#address-cells': const: 1