linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yanteng Si <si.yanteng@linux.dev>
To: Kefan Bai <baikefan@leap-io-kernel.com>, alexs@kernel.org
Cc: dzm91@hust.edu.cn, corbet@lwn.net, linux-doc@vger.kernel.org,
	doubled@leap-io-kernel.com
Subject: Re: [PATCH v4 4/8] docs/zh_CN: Add chipidea.rst translation
Date: Wed, 3 Dec 2025 13:31:06 +0800	[thread overview]
Message-ID: <83858465-202d-4370-9a74-eb9cefc1c6be@linux.dev> (raw)
In-Reply-To: <cda019bbda46d4c0e52364fc8d9c723e614aa8c3.1764674650.git.baikefan@leap-io-kernel.com>


在 2025/12/2 19:56, Kefan Bai 写道:
> Translate .../usb/chipidea.rst into Chinese
>
> Update the translation through commit e4157519ad46
> ("Documentation: usb: correct spelling")
>
> Signed-off-by: Kefan Bai <baikefan@leap-io-kernel.com>
> ---
>   .../translations/zh_CN/usb/chipidea.rst       | 142 ++++++++++++++++++
>   1 file changed, 142 insertions(+)
>   create mode 100644 Documentation/translations/zh_CN/usb/chipidea.rst
>
> diff --git a/Documentation/translations/zh_CN/usb/chipidea.rst b/Documentation/translations/zh_CN/usb/chipidea.rst
> new file mode 100644
> index 000000000000..88f80489fe57
> --- /dev/null
> +++ b/Documentation/translations/zh_CN/usb/chipidea.rst
> @@ -0,0 +1,142 @@
> +.. SPDX-License-Identifier: GPL-2.0
> +.. include:: ../disclaimer-zh_CN.rst
> +
> +:Original: Documentation/usb/chipidea.rst
> +:翻译:
> +
> + 白钶凡 Kefan Bai <baikefan@leap-io-kernel.com>
> +
> +:校译:
> +
> +
> +
> +=============================
> +ChipIdea高速双角色控制器驱动
> +=============================
> +
> +1. 如何测试OTG FSM(HNP 和 SRP)
> +--------------------------------
> +
> +接下来我们在两块Freescale i.MX6Q Sabre SD开发板上,演示如何通过sys输入文件
> +来测试OTG的HNP和SRP功能。
> +
> +1.1 如何使能OTG FSM
> +--------------------
> +
> +1.1.1 在menuconfig中选择CONFIG_USB_OTG_FSM,并重新编译内核
> +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> +
> +重新编译镜像和模块。如果需要查看OTG FSM的内部变量,可以挂载debugfs,
> +会有两个文件用于显示OTG FSM变量和部分控制器寄存器值::
> +
> +	cat /sys/kernel/debug/ci_hdrc.0/otg
> +	cat /sys/kernel/debug/ci_hdrc.0/registers
> +
> +1.1.2 在控制器节点的dts文件中添加以下条目
> +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> +
> +::
> +
> +	otg-rev = <0x0200>;
> +	adp-disable;
> +
> +1.2 测试步骤
> +-------------
> +
> +1) 给两块Freescale i.MX6Q Sabre SD开发板上电,
> +   并加载gadget类驱动(例如 g_mass_storage)。
> +
> +2) 用USB线连接两块开发板:一端是micro A插头,另一端是micro B插头。
> +
> +   插入micro A插头的一端为A设备,它应当枚举另一端的B设备。
> +
> +3) 角色切换
> +
> +   在B设备上执行::
> +
> +	echo 1 > /sys/bus/platform/devices/ci_hdrc.0/inputs/b_bus_req
> +
> +   B设备应切换为host并枚举A设备。
> +
> +4) 把A设备切换为host
> +
> +   在B设备上执行::
> +
> +	echo 0 > /sys/bus/platform/devices/ci_hdrc.0/inputs/b_bus_req
> +
> +   或者通过HNP轮询机制:B-Host可以检测到A外设想成为host的意愿,
> +   从而由A外设触发角色切换。在A设备上执行::
> +   或者通过HNP轮询机制:B-Host可以检测到A外设想切换为host角色的意愿,
> +   并通过A外设对轮询的响应来触发角色切换。
> +   这可以通过在A设备上执行::
> +
> +	echo 1 > /sys/bus/platform/devices/ci_hdrc.0/inputs/a_bus_req
> +
> +   A设备应切换回host并枚举B设备。
> +
> +5) 拔掉 B设备(拔掉 micro B 插头),在10秒内重新插入;
> +   A设备 应重新枚举B设备。

Del space?


Reviewed-by: Yanteng Si <siyanteng@cqsoftware.com.cn>


Thanks,

Yanteng

> +
> +6) 拔掉B设备(拔掉 micro B 插头),在10秒后重新插入;
> +   A设备不应重新枚举B设备。
> +
> +   若A设备想使用总线:
> +
> +   在A设备上::
> +
> +	echo 0 > /sys/bus/platform/devices/ci_hdrc.0/inputs/a_bus_drop
> +	echo 1 > /sys/bus/platform/devices/ci_hdrc.0/inputs/a_bus_req
> +
> +   若B设备想使用总线:
> +
> +   在B设备上::
> +
> +	echo 1 > /sys/bus/platform/devices/ci_hdrc.0/inputs/b_bus_req
> +
> +7) A设备关闭总线供电
> +
> +   在A设备上::
> +
> +	echo 1 > /sys/bus/platform/devices/ci_hdrc.0/inputs/a_bus_drop
> +
> +   A设备应断开与B设备的连接并关闭总线供电。
> +
> +8) B设备进行SRP数据脉冲唤醒
> +
> +   在B设备上::
> +
> +	echo 1 > /sys/bus/platform/devices/ci_hdrc.0/inputs/b_bus_req
> +
> +   A设备应恢复usb总线并枚举B设备。
> +
> +1.3 参考文档
> +-------------
> +《On-The-Go and Embedded Host Supplement to the USB Revision 2.0 Specification
> +July 27, 2012 Revision 2.0 version 1.1a》
> +
> +2. 如何使能USB作为系统唤醒源
> +----------------------------
> +下面是在imx6平台上使能USB作为系统唤醒源的示例。
> +
> +2.1 启用核心控制器的唤醒::
> +
> +	echo enabled > /sys/bus/platform/devices/ci_hdrc.0/power/wakeup
> +
> +2.2 启用glue层的唤醒::
> +	echo enabled > /sys/bus/platform/devices/2184000.usb/power/wakeup
> +
> +2.3 启用PHY的唤醒(可选)::
> +
> +	echo enabled > /sys/bus/platform/devices/20c9000.usbphy/power/wakeup
> +
> +2.4 启用根集线器的唤醒::
> +	echo enabled > /sys/bus/usb/devices/usb1/power/wakeup
> +
> +2.5 启用相关设备的唤醒::
> +
> +	echo enabled > /sys/bus/usb/devices/1-1/power/wakeup
> +
> +如果系统只有一个USB端口,并且你希望在这个端口上启用USB唤醒,
> +你可以使用下面的脚本来启用USB唤醒::
> +
> +	for i in $(find /sys -name wakeup | grep usb);do echo enabled > $i;done;
> --
> 2.52.0
>

  reply	other threads:[~2025-12-03  5:31 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-02 11:56 [PATCH v4 0/8] Add Chinese translation for USB subsystem Kefan Bai
2025-12-02 11:56 ` [PATCH v4 1/8] docs/zh_CN: Add index.rst translation Kefan Bai
2025-12-03  2:34   ` Yanteng Si
2025-12-05  7:24     ` BaiKefan
2025-12-02 11:56 ` [PATCH v4 2/8] docs/zh_CN: Add acm.rst translation Kefan Bai
2025-12-02 11:56 ` [PATCH v4 3/8] docs/zh_CN: Add authorization.rst translation Kefan Bai
2025-12-03  2:29   ` Yanteng Si
2025-12-02 11:56 ` [PATCH v4 4/8] docs/zh_CN: Add chipidea.rst translation Kefan Bai
2025-12-03  5:31   ` Yanteng Si [this message]
2025-12-02 11:56 ` [PATCH v4 5/8] docs/zh_CN: Add dwc3.rst translation Kefan Bai
2025-12-04  2:28   ` Yanteng Si
2025-12-02 11:56 ` [PATCH v4 6/8] docs/zh_CN: Add ehci.rst translation Kefan Bai
2025-12-04  2:35   ` Yanteng Si
2025-12-02 11:56 ` [PATCH v4 7/8] docs/zh_CN: Add usbmon.rst translation Kefan Bai
2025-12-04  2:47   ` Yanteng Si
2025-12-02 11:56 ` [PATCH v4 8/8] docs/zh_CN: Add CREDITS translation Kefan Bai
2025-12-04  2:51   ` Yanteng Si
2025-12-04  2:41 ` [PATCH v4 0/8] Add Chinese translation for USB subsystem Yanteng Si
2025-12-05 10:01   ` BaiKefan
2025-12-05 12:10     ` Alex Shi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83858465-202d-4370-9a74-eb9cefc1c6be@linux.dev \
    --to=si.yanteng@linux.dev \
    --cc=alexs@kernel.org \
    --cc=baikefan@leap-io-kernel.com \
    --cc=corbet@lwn.net \
    --cc=doubled@leap-io-kernel.com \
    --cc=dzm91@hust.edu.cn \
    --cc=linux-doc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).