[PATCH v1] arm: imx8: added usbphy_regs struct

Peng Fan (OSS) peng.fan at oss.nxp.com
Fri Feb 19 10:21:36 CET 2021


> Subject: [PATCH v1] arm: imx8: added usbphy_regs struct

Only a structure?

-Peng
> 
> FROM: Ye Li <ye.li at nxp.com>
> 
> imx8: added usbphy_regs struct
> 
> Signed-off-by: Oliver Graute <oliver.graute at kococonnector.com>
> Cc: Ye Li <ye.li at nxp.com>
> Cc: Stefano Babic <sbabic at denx.de>
> Cc: Peng Fan <peng.fan at nxp.com>
> Cc: Fabio Estevam <festevam at gmail.com>
> Cc: uboot-imx <uboot-imx at nxp.com>
> ---
> 
> This code snippet is from here:
> 
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsource
> .codeaurora.org%2Fexternal%2Fimx%2Fuboot-imx%2Fcommit%2Farch%2Far
> m%2Finclude%2Fasm%2Farch-imx8%2Fimx-regs.h%3Fh%3Dimx_v2020.04_5
> .4.70_2.3.0%26id%3D6affb545f2ef857f63cfa1a14a5c67a3dea6a678&da
> ta=04%7C01%7Cpeng.fan%40nxp.com%7C17d333d7ba0e46cc94b808d8d4b7
> 3564%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C63749323062
> 5813111%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV
> 2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=8c2y0QuF
> p%2FdlnhqLk3HAN2CBjT3BVbng2GHrRyaMuFA%3D&reserved=0
> 
>  arch/arm/include/asm/arch-imx8/imx-regs.h | 78
> +++++++++++++++++++++++
>  1 file changed, 78 insertions(+)
> 
> diff --git a/arch/arm/include/asm/arch-imx8/imx-regs.h
> b/arch/arm/include/asm/arch-imx8/imx-regs.h
> index 6333ff4686..1156346b51 100644
> --- a/arch/arm/include/asm/arch-imx8/imx-regs.h
> +++ b/arch/arm/include/asm/arch-imx8/imx-regs.h
> @@ -45,4 +45,82 @@
>  #define USB_BASE_ADDR		0x5b0d0000
>  #define USB_PHY0_BASE_ADDR	0x5b100000
> 
> +#if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__))
> #include
> +<asm/types.h> #include <stdbool.h>
> +
> +bool is_usb_boot(void);
> +void disconnect_from_pc(void);
> +#define is_boot_from_usb  is_usb_boot
> +
> +struct usbphy_regs {
> +	u32	usbphy_pwd;			/* 0x000 */
> +	u32	usbphy_pwd_set;			/* 0x004 */
> +	u32	usbphy_pwd_clr;			/* 0x008 */
> +	u32	usbphy_pwd_tog;			/* 0x00c */
> +	u32	usbphy_tx;			/* 0x010 */
> +	u32	usbphy_tx_set;			/* 0x014 */
> +	u32	usbphy_tx_clr;			/* 0x018 */
> +	u32	usbphy_tx_tog;			/* 0x01c */
> +	u32	usbphy_rx;			/* 0x020 */
> +	u32	usbphy_rx_set;			/* 0x024 */
> +	u32	usbphy_rx_clr;			/* 0x028 */
> +	u32	usbphy_rx_tog;			/* 0x02c */
> +	u32	usbphy_ctrl;			/* 0x030 */
> +	u32	usbphy_ctrl_set;		/* 0x034 */
> +	u32	usbphy_ctrl_clr;		/* 0x038 */
> +	u32	usbphy_ctrl_tog;		/* 0x03c */
> +	u32	usbphy_status;			/* 0x040 */
> +	u32	reserved0[3];
> +	u32	usbphy_debug0;			/* 0x050 */
> +	u32	usbphy_debug0_set;		/* 0x054 */
> +	u32	usbphy_debug0_clr;		/* 0x058 */
> +	u32	usbphy_debug0_tog;		/* 0x05c */
> +	u32	reserved1[4];
> +	u32	usbphy_debug1;			/* 0x070 */
> +	u32	usbphy_debug1_set;		/* 0x074 */
> +	u32	usbphy_debug1_clr;		/* 0x078 */
> +	u32	usbphy_debug1_tog;		/* 0x07c */
> +	u32	usbphy_version;			/* 0x080 */
> +	u32	reserved2[7];
> +	u32	usb1_pll_480_ctrl;		/* 0x0a0 */
> +	u32	usb1_pll_480_ctrl_set;		/* 0x0a4 */
> +	u32	usb1_pll_480_ctrl_clr;		/* 0x0a8 */
> +	u32	usb1_pll_480_ctrl_tog;		/* 0x0ac */
> +	u32	reserved3[4];
> +	u32	usb1_vbus_detect;		/* 0xc0 */
> +	u32	usb1_vbus_detect_set;		/* 0xc4 */
> +	u32	usb1_vbus_detect_clr;		/* 0xc8 */
> +	u32	usb1_vbus_detect_tog;		/* 0xcc */
> +	u32	usb1_vbus_det_stat;		/* 0xd0 */
> +	u32	reserved4[3];
> +	u32	usb1_chrg_detect;		/* 0xe0 */
> +	u32	usb1_chrg_detect_set;		/* 0xe4 */
> +	u32	usb1_chrg_detect_clr;		/* 0xe8 */
> +	u32	usb1_chrg_detect_tog;		/* 0xec */
> +	u32	usb1_chrg_det_stat;		/* 0xf0 */
> +	u32	reserved5[3];
> +	u32	usbphy_anactrl;			/* 0x100 */
> +	u32	usbphy_anactrl_set;		/* 0x104 */
> +	u32	usbphy_anactrl_clr;		/* 0x108 */
> +	u32	usbphy_anactrl_tog;		/* 0x10c */
> +	u32	usb1_loopback;			/* 0x110 */
> +	u32	usb1_loopback_set;		/* 0x114 */
> +	u32	usb1_loopback_clr;		/* 0x118 */
> +	u32	usb1_loopback_tog;		/* 0x11c */
> +	u32	usb1_loopback_hsfscnt;		/* 0x120 */
> +	u32	usb1_loopback_hsfscnt_set;	/* 0x124 */
> +	u32	usb1_loopback_hsfscnt_clr;	/* 0x128 */
> +	u32	usb1_loopback_hsfscnt_tog;	/* 0x12c */
> +	u32	usphy_trim_override_en;		/* 0x130 */
> +	u32	usphy_trim_override_en_set;	/* 0x134 */
> +	u32	usphy_trim_override_en_clr;	/* 0x138 */
> +	u32	usphy_trim_override_en_tog;	/* 0x13c */
> +	u32	usb1_pfda_ctrl1;		/* 0x140 */
> +	u32	usb1_pfda_ctrl1_set;		/* 0x144 */
> +	u32	usb1_pfda_ctrl1_clr;		/* 0x148 */
> +	u32	usb1_pfda_ctrl1_tog;		/* 0x14c */
> +};
> +#endif
> +
>  #endif /* __ASM_ARCH_IMX8_REGS_H__ */
> --
> 2.17.1



More information about the U-Boot mailing list