[PATCH v4 3/4] phy: spacemit: support K1 USB2.0 PHY controller
Ze Huang
huangze at whut.edu.cn
Mon May 26 09:13:22 PDT 2025
On 5/26/25 11:51 PM, neil.armstrong at linaro.org wrote:
> Hi,
>
> On 26/05/2025 16:31, Ze Huang wrote:
>> The SpacemiT K1 SoC includes three USB ports:
>>
>> - One USB2.0 OTG port
>> - One USB2.0 host-only port
>> - One USB3.0 port with an integrated USB2.0 DRD interface
>>
>> Each of these ports is connected to a USB2.0 PHY responsible for USB2
>> transmission.
>>
>> This commit adds support for the SpacemiT K1 USB2.0 PHY, which is
>> compliant with the USB 2.0 specification and supports both 8-bit 60MHz
>> and 16-bit 30MHz parallel interfaces.
>>
>> Signed-off-by: Ze Huang <huangze at whut.edu.cn>
>> ---
>> drivers/phy/Kconfig | 1 +
>> drivers/phy/Makefile | 1 +
>> drivers/phy/spacemit/Kconfig | 13 ++++
>> drivers/phy/spacemit/Makefile | 2 +
>> drivers/phy/spacemit/phy-k1-usb2.c | 131
>> +++++++++++++++++++++++++++++++++++++
>> 5 files changed, 148 insertions(+)
>>
...
>> +
>> +static const struct of_device_id spacemit_usb2phy_dt_match[] = {
>> + { .compatible = "spacemit,k1-usb2-phy", },
>> + { /* sentinal */ }
>
> => sentinel
Thanks!
>
>> +};
>> +MODULE_DEVICE_TABLE(of, spacemit_usb2phy_dt_match);
>> +
>> +static struct platform_driver spacemit_usb2_phy_driver = {
>> + .probe = spacemit_usb2phy_probe,
>> + .driver = {
>> + .name = "spacemit-usb2-phy",
>> + .of_match_table = spacemit_usb2phy_dt_match,
>> + },
>> +};
>> +module_platform_driver(spacemit_usb2_phy_driver);
>> +
>> +MODULE_DESCRIPTION("Spacemit USB 2.0 PHY driver");
>> +MODULE_LICENSE("GPL");
>>
>
> It looks fine, but why didn't also convert thid driver to regmap ?
Will do
>
> Thanks,
> Neil
>
>
>
More information about the linux-riscv
mailing list