mbox series

[0/6] usb: chipidea: Export more phy tuning parameters to device tree

Message ID 20221011082924.884123-1-s.hauer@pengutronix.de
Headers show
Series usb: chipidea: Export more phy tuning parameters to device tree | expand

Message

Sascha Hauer Oct. 11, 2022, 8:29 a.m. UTC
This series exports more phy tuning settings to device tree. There are
some values already exported and I follow that example in this series.

Patches 1 and 2 contain two small bugfixes for issues I stumbled upon
along the way. Patches 3 and 4 are cleanups. These patches could be
applied without the remaining two patches.

The binding patch is based on
https://lore.kernel.org/linux-arm-kernel/20221010101816.298334-3-peng.fan@oss.nxp.com/t/,
so this will need a rebase once this series settles.

Sascha

Sascha Hauer (6):
  usb: chipidea: usbmisc_imx: Fix i.MX53 clock sel masks
  usb: chipidea: usbmisc_imx: Fix setting i.MX6SX wakeup source
  usb: chipidea: usbmisc_imx: Use GENMASK/FIELD_PREP for bitfields
  usb: chipidea: usbmisc_imx: Add prefix to register defines
  usb: chipidea: usbmisc_imx: Add device tree properties for i.MX7 phy
    tuning
  dt-bindings: usb: ci-hdrc-usb2: Add more phy tuning properties

 .../devicetree/bindings/usb/ci-hdrc-usb2.yaml |  79 ++++++++
 drivers/usb/chipidea/ci_hdrc_imx.c            |  14 ++
 drivers/usb/chipidea/ci_hdrc_imx.h            |   7 +
 drivers/usb/chipidea/usbmisc_imx.c            | 186 ++++++++++++------
 4 files changed, 230 insertions(+), 56 deletions(-)

Comments

Xu Yang Oct. 18, 2022, 8:45 a.m. UTC | #1
On Tue, Oct 11, 2022 at 4:50 PM Sascha Hauer <s.hauer@pengutronix.de> wrote:
>
> According to the reference manual the masks for the
> MX53_USB_CTRL_1_H*_XCVR_CLK_SEL bits are 0x3, not 0x11 (which were
> probably meant as 0b11).
>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

Reviewed-by: Xu Yang <xu.yang_2@nxp.com>

Thanks,
Xu Yang

> ---
>  drivers/usb/chipidea/usbmisc_imx.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/usb/chipidea/usbmisc_imx.c b/drivers/usb/chipidea/usbmisc_imx.c
> index bac0f5458cab9..8f805aa9c383c 100644
> --- a/drivers/usb/chipidea/usbmisc_imx.c
> +++ b/drivers/usb/chipidea/usbmisc_imx.c
> @@ -42,9 +42,9 @@
>  #define MX53_USB_OTG_PHY_CTRL_0_OFFSET 0x08
>  #define MX53_USB_OTG_PHY_CTRL_1_OFFSET 0x0c
>  #define MX53_USB_CTRL_1_OFFSET         0x10
> -#define MX53_USB_CTRL_1_H2_XCVR_CLK_SEL_MASK (0x11 << 2)
> +#define MX53_USB_CTRL_1_H2_XCVR_CLK_SEL_MASK (0x3 << 2)
>  #define MX53_USB_CTRL_1_H2_XCVR_CLK_SEL_ULPI BIT(2)
> -#define MX53_USB_CTRL_1_H3_XCVR_CLK_SEL_MASK (0x11 << 6)
> +#define MX53_USB_CTRL_1_H3_XCVR_CLK_SEL_MASK (0x3 << 6)
>  #define MX53_USB_CTRL_1_H3_XCVR_CLK_SEL_ULPI BIT(6)
>  #define MX53_USB_UH2_CTRL_OFFSET       0x14
>  #define MX53_USB_UH3_CTRL_OFFSET       0x18
> --
> 2.30.2
>