dt-bindings: usb: mtu3: add support mt8196
Subsystems (4)
Chunfeng Yun
maintainerPATCH v4 1/2 dt-bindings: usb: mtu3: add support mt8196
There are three USB controllers on mt8196, each controller's wakeup control is different, add some specific versions for them, and add compatilbe for mt8196.
Acked-by Conor Dooley <[email protected]>
Reviewed-by AngeloGioacchino Del Regno <[email protected]>
Signed-off-by Chunfeng Yun <[email protected]>
---
v4: add reviewed-by
v3: add the ommitted third dual-role controller suggested by Angelo
v2: add wakeup for dual-role controllers
--- Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml +5 -1
@@ -28,6 +28,7 @@ properties: - mediatek,mt8188-mtu3 - mediatek,mt8192-mtu3 - mediatek,mt8195-mtu3 + - mediatek,mt8196-mtu3 - mediatek,mt8365-mtu3 - const: mediatek,mtu3
@@ -200,7 +201,10 @@ properties: 103 - used by mt8195, IP0, specific 1.03; 105 - used by mt8195, IP2, specific 1.05; 106 - used by mt8195, IP3, specific 1.06; - enum: [1, 2, 101, 102, 103, 105, 106] + 107 - used by mt8196, IP0, specific 1.07; + 108 - used by mt8196, IP1, specific 1.08; + 109 - used by mt8196, IP2, specific 1.09; + enum: [1, 2, 101, 102, 103, 105, 106, 107, 108, 109] mediatek,u3p-dis-msk: $ref: /schemas/types.yaml#/definitions/uint32
Signature · 1 line
2.45.2
Chunfeng Yun
maintainerPATCH v4 2/2 usb: mtu3: add support remote wakeup of mt8196
There are three USB controllers on mt8196, each controller's wakeup control is different, add some specific versions for them.
Reviewed-by AngeloGioacchino Del Regno <[email protected]>
Signed-off-by Chunfeng Yun <[email protected]>
---
v4: add reviewed-by
v3: add the ommitted third dual-role controller add acked by Conor
v2: new patch for dual-role controllers
--- drivers/usb/mtu3/mtu3_host.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+)
drivers/usb/mtu3/mtu3_host.c +26 -0
@@ -46,6 +46,14 @@#define WC1_IS_P_95 BIT(12)#define WC1_IS_EN_P0_95 BIT(6) +/* mt8196 */ +#define PERI_WK_CTRL0_8196 0x08 +#define WC0_IS_EN_P0_96 BIT(0) +#define WC0_IS_EN_P1_96 BIT(7) + +#define PERI_WK_CTRL1_8196 0x10 +#define WC1_IS_EN_P2_96 BIT(0) +/* mt2712 etc */ #define PERI_SSUSB_SPM_CTRL 0x0#define SSC_IP_SLEEP_EN BIT(4)
@@ -59,6 +67,9 @@ enum ssusb_uwk_vers {SSUSB_UWK_V1_3 ,/* mt8195 IP0 */ SSUSB_UWK_V1_5 =105 ,/* mt8195 IP2 */ SSUSB_UWK_V1_6 ,/* mt8195 IP3 */ +SSUSB_UWK_V1_7 ,/* mt8196 IP0 */ +SSUSB_UWK_V1_8 ,/* mt8196 IP1 */ + SSUSB_UWK_V1_9, /* mt8196 IP2 */ };/*
@@ -100,6 +111,21 @@ static void ssusb_wakeup_ip_sleep_set(struct ssusb_mtk *ssusb, bool enable) msk =WC0_IS_EN_P3_95 |WC0_IS_C_95 (0x7 ) |WC0_IS_P_95 ; val = enable ? (WC0_IS_EN_P3_95 |WC0_IS_C_95 (0x1 )) :0 ;break ; +case SSUSB_UWK_V1_7 : + reg = ssusb->uwk_reg_base +PERI_WK_CTRL0_8196 ; + msk =WC0_IS_EN_P0_96 ; + val = enable ? msk :0 ; +break ; +case SSUSB_UWK_V1_8 : + reg = ssusb->uwk_reg_base +PERI_WK_CTRL0_8196 ; + msk =WC0_IS_EN_P1_96 ; + val = enable ? msk :0 ; +break ; +case SSUSB_UWK_V1_9 : + reg = ssusb->uwk_reg_base +PERI_WK_CTRL1_8196 ; + msk =WC1_IS_EN_P2_96 ; + val = enable ? msk :0 ; +break ;case SSUSB_UWK_V2 : reg = ssusb->uwk_reg_base +PERI_SSUSB_SPM_CTRL ; msk =SSC_IP_SLEEP_EN |SSC_SPM_INT_EN ;
Signature · 1 line
2.45.2