[PATCH v2 5/9] phy: rockchip: add a new driver for type-c phy

Frank Wang frank.wang at rock-chips.com
Wed May 6 05:09:35 CEST 2020


Hi Jagan,

On 2020/5/1 15:17, Jagan Teki wrote:
> On Thu, Apr 30, 2020 at 7:47 AM Frank Wang <frank.wang at rock-chips.com> wrote:
>> This implements the Type-C PHY driver for Rockchip platform
>> with Cadence IP block.
>>
>> Signed-off-by: Frank Wang <frank.wang at rock-chips.com>
>> Signed-off-by: William Wu <william.wu at rock-chips.com>
>> ---
>>   drivers/phy/Kconfig                    |   7 +
>>   drivers/phy/Makefile                   |   1 +
>>   drivers/phy/phy-rockchip-typec.c       | 523 +++++++++++++++++++++++++
>>   include/linux/usb/rockchip_phy_typec.h |  52 +++
>>   4 files changed, 583 insertions(+)
>>   create mode 100644 drivers/phy/phy-rockchip-typec.c
>>   create mode 100644 include/linux/usb/rockchip_phy_typec.h
>>
>> [...]
>>
>> diff --git a/drivers/phy/phy-rockchip-typec.c b/drivers/phy/phy-rockchip-typec.c
>> new file mode 100644
>> index 0000000000..2e8c8c8ffe
>> --- /dev/null
>> +++ b/drivers/phy/phy-rockchip-typec.c
>> @@ -0,0 +1,523 @@
>> +// SPDX-License-Identifier:     GPL-2.0
>> +/*
>> + * Copyright (C) 2020 Rockchip Electronics Co., Ltd
>> + *
>> + * Based on drivers/phy/rockchip/phy-rockchip-typec.c in Linux Kernel.
>> + */
>> +
>> +#include <common.h>
>> +#include <dm.h>
>> +#include <dm/device_compat.h>
>> +#include <dm/lists.h>
>> +#include <dm/of_access.h>
>> +#include <generic-phy.h>
>> +#include <power/regulator.h>
>> +#include <regmap.h>
>> +#include <reset.h>
>> +#include <syscon.h>
>> +#include <asm-generic/io.h>
>> +#include <asm/arch/clock.h>
> drivers/phy/phy-rockchip-typec.c:19:28: fatal error: asm/arch/clock.h:
> No such file or directory
>   #include <asm/arch/clock.h>

Sorry, there is a 'arch' link to 'arch-rockchip' in my local codes, 
anyway, I will fix it in next.

>> [...]
>>
>> +       reset_deassert(&tcphy->uphy_rst);
>> +
>> +       ret = readx_poll_timeout(readl, tcphy->base + PMA_CMN_CTRL1,
>> +                                val, val & CMN_READY, PHY_MODE_SET_TIMEOUT);
> Please use readl_poll_timeout, now the poll_timeout API has sleep_us
> so readx would mostly have another argument of sleep_us.

ACK

> Jagan.
>




More information about the U-Boot mailing list