clk: imx8mm: correct the usb1_ctrl parent to be usb_bus
PATCH 3/5 clk: imx8mm: correct the usb1_ctrl parent to be usb_bus
From: Li Jun <[email protected]>
Per latest imx8mm datasheet of CCM, the parent of usb1_ctrl_root_clk should be usb_bus.
--- drivers/clk/imx/clk-imx8mm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/imx/clk-imx8mm.c +1 -1
@@ -631,7 +631,7 @@ static int __init imx8mm_clocks_init(struct device_node *ccm_node) clks[IMX8MM_CLK_UART2_ROOT ] =imx_clk_gate4 ("uart2_root_clk" ,"uart2" , base +0x44a0 ,0 ); clks[IMX8MM_CLK_UART3_ROOT ] =imx_clk_gate4 ("uart3_root_clk" ,"uart3" , base +0x44b0 ,0 ); clks[IMX8MM_CLK_UART4_ROOT ] =imx_clk_gate4 ("uart4_root_clk" ,"uart4" , base +0x44c0 ,0 ); - clks[IMX8MM_CLK_USB1_CTRL_ROOT ] =imx_clk_gate4 ("usb1_ctrl_root_clk" ,"usb_core_ref" , base +0x44d0 ,0 ); + clks[IMX8MM_CLK_USB1_CTRL_ROOT ] =imx_clk_gate4 ("usb1_ctrl_root_clk" ,"usb_bus" , base +0x44d0 ,0 ); clks[IMX8MM_CLK_GPU3D_ROOT ] =imx_clk_gate4 ("gpu3d_root_clk" ,"gpu3d_div" , base +0x44f0 ,0 ); clks[IMX8MM_CLK_USDHC1_ROOT ] =imx_clk_gate4 ("usdhc1_root_clk" ,"usdhc1" , base +0x4510 ,0 ); clks[IMX8MM_CLK_USDHC2_ROOT ] =imx_clk_gate4 ("usdhc2_root_clk" ,"usdhc2" , base +0x4520 ,0 );
Signature · 1 line
2.7.4
PATCH 4/5 arm64: dts: imx8mm: Remove setting for IMX8MM_CLK_USB_CORE_REF
From: Li Jun <[email protected]>
Since IMX8MM_CLK_USB_CORE_REF is not used at all, so remove the setting for it.
--- arch/arm64/boot/dts/freescale/imx8mm.dtsi | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-)
arch/arm64/boot/dts/freescale/imx8mm.dtsi +4 -8
@@ -743,10 +743,8 @@ interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>; clocks = <&clk IMX8MM_CLK_USB1_CTRL_ROOT>; clock-names = "usb1_ctrl_root_clk"; - assigned-clocks = <&clk IMX8MM_CLK_USB_BUS>, - <&clk IMX8MM_CLK_USB_CORE_REF>; - assigned-clock-parents = <&clk IMX8MM_SYS_PLL2_500M>, - <&clk IMX8MM_SYS_PLL1_100M>; + assigned-clocks = <&clk IMX8MM_CLK_USB_BUS>; + assigned-clock-parents = <&clk IMX8MM_SYS_PLL2_500M>; fsl,usbphy = <&usbphynop1>; fsl,usbmisc = <&usbmisc1 0>; status = "disabled";
@@ -764,10 +762,8 @@ interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>; clocks = <&clk IMX8MM_CLK_USB1_CTRL_ROOT>; clock-names = "usb1_ctrl_root_clk"; - assigned-clocks = <&clk IMX8MM_CLK_USB_BUS>, - <&clk IMX8MM_CLK_USB_CORE_REF>; - assigned-clock-parents = <&clk IMX8MM_SYS_PLL2_500M>, - <&clk IMX8MM_SYS_PLL1_100M>; + assigned-clocks = <&clk IMX8MM_CLK_USB_BUS>; + assigned-clock-parents = <&clk IMX8MM_SYS_PLL2_500M>; fsl,usbphy = <&usbphynop2>; fsl,usbmisc = <&usbmisc2 0>; status = "disabled";
Signature · 1 line
2.7.4
PATCH 5/5 arm64: dts: imx8mm-evk: enable usb1 and typec support
In reply to [email protected]From: Li Jun <[email protected]>
USB1 port has typec connector with power delivery support:
- Dual data role: host and device.
- Dual power role: source and sink, prefer power sink.
--- arch/arm64/boot/dts/freescale/imx8mm-evk.dts | 65 ++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+)
arch/arm64/boot/dts/freescale/imx8mm-evk.dts +65 -0
@@ -5,6 +5,7 @@ /dts-v1/; +#include <dt-bindings/usb/pd.h> #include "imx8mm.dtsi" / {
@@ -115,6 +116,21 @@ status = "okay"; }; +&usbotg1 { + dr_mode = "otg"; + hnp-disable; + srp-disable; + adp-disable; + usb-role-switch; + status = "okay"; + + port { + usb1_drd_sw: endpoint { + remote-endpoint = <&typec1_dr_sw>; + }; + }; +}; + &usdhc2 { pinctrl-names = "default", "state_100mhz", "state_200mhz"; pinctrl-0 = <&pinctrl_usdhc2>, <&pinctrl_usdhc2_gpio>;
@@ -257,6 +273,42 @@ }; }; +&i2c2 { + clock-frequency = <400000>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c2>; + status = "okay"; + + ptn5110: tcpc@50 { + compatible = "nxp,ptn5110"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_typec1>; + reg = <0x50>; + interrupt-parent = <&gpio2>; + interrupts = <11 8>; + status = "okay"; + + port { + typec1_dr_sw: endpoint { + remote-endpoint = <&usb1_drd_sw>; + }; + }; + + typec1_con: connector { + compatible = "usb-c-connector"; + label = "USB-C"; + power-role = "dual"; + data-role = "dual"; + try-power-role = "sink"; + source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>; + sink-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM) + PDO_VAR(5000, 20000, 3000)>; + op-sink-microwatt = <15000000>; + self-powered; + }; + }; +}; + &iomuxc { pinctrl-names = "default";
@@ -299,6 +351,13 @@ >; }; + pinctrl_i2c2: i2c2grp { + fsl,pins = < + MX8MM_IOMUXC_I2C2_SCL_I2C2_SCL 0x400001c3 + MX8MM_IOMUXC_I2C2_SDA_I2C2_SDA 0x400001c3 + >; + }; + pinctrl_pmic: pmicirq { fsl,pins = < MX8MM_IOMUXC_GPIO1_IO03_GPIO1_IO3 0x41
@@ -320,6 +379,12 @@ >; }; + pinctrl_typec1: typec1grp { + fsl,pins = < + MX8MM_IOMUXC_SD1_STROBE_GPIO2_IO11 0x159 + >; + }; + pinctrl_uart2: uart2grp { fsl,pins = < MX8MM_IOMUXC_UART2_RXD_UART2_DCE_RX 0x140
Signature · 1 line
2.7.4
Quoted 6 lines · On Wed, Jul 03, 2019 at 03:23:25PM +0800, [email protected] wrote:
From: Li Jun <[email protected]>
Per latest imx8mm datasheet of CCM, the parent of
usb1_ctrl_root_clkshould beusb_bus.Signed-off-by Li Jun <[email protected]>
I only received 3 patches as a series. In that case, the patches should have subject prefix like '[PATCH 1/3]' ...
The patches look good to me. Applied all 3, thanks.
Shawn
Quoted 20 lines
--- drivers/clk/imx/clk-imx8mm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/clk/imx/clk-imx8mm.c +1
-1@@ -631,7 +631,7 @@ static int __init imx8mm_clocks_init(struct device_node *ccm_node) clks[IMX8MM_CLK_UART2_ROOT ] =imx_clk_gate4 ("uart2_root_clk" ,"uart2" , base +0x44a0 ,0 ); clks[IMX8MM_CLK_UART3_ROOT ] =imx_clk_gate4 ("uart3_root_clk" ,"uart3" , base +0x44b0 ,0 ); clks[IMX8MM_CLK_UART4_ROOT ] =imx_clk_gate4 ("uart4_root_clk" ,"uart4" , base +0x44c0 ,0 ); - clks[IMX8MM_CLK_USB1_CTRL_ROOT ] =imx_clk_gate4 ("usb1_ctrl_root_clk" ,"usb_core_ref" , base +0x44d0 ,0 ); + clks[IMX8MM_CLK_USB1_CTRL_ROOT ] =imx_clk_gate4 ("usb1_ctrl_root_clk" ,"usb_bus" , base +0x44d0 ,0 ); clks[IMX8MM_CLK_GPU3D_ROOT ] =imx_clk_gate4 ("gpu3d_root_clk" ,"gpu3d_div" , base +0x44f0 ,0 ); clks[IMX8MM_CLK_USDHC1_ROOT ] =imx_clk_gate4 ("usdhc1_root_clk" ,"usdhc1" , base +0x4510 ,0 ); clks[IMX8MM_CLK_USDHC2_ROOT ] =imx_clk_gate4 ("usdhc2_root_clk" ,"usdhc2" , base +0x4520 ,0 );Signature · 1 line
2.7.4
Quoted 19 lines
-----Original Message-----
From: Shawn Guo <[email protected]>
Sent: 2019年7月22日 11:34
To: Jun Li <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; dl-linux-imx <[email protected]>; [email protected]; Peter Chen <[email protected]>; Jacky Bai <[email protected]>; Leonard Crestez <[email protected]>; Daniel Baluta <[email protected]>; Anson Huang <[email protected]>; Aisheng Dong <[email protected]>; Peng Fan <[email protected]>; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH 3/5] clk: imx8mm: correct theusb1_ctrlparent to beusb_busQuoted 2 lines · On Wed, Jul 03, 2019 at 03:23:25PM +0800, [email protected] wrote:
From: Li Jun <[email protected]>
Quoted 7 lines
Quoted 4 lines
Per latest imx8mm datasheet of CCM, the parent of
usb1_ctrl_root_clkshould beusb_bus.Signed-off-by Li Jun <[email protected]>I only received 3 patches as a series. In that case, the patches should have subject prefix like '[PATCH 1/3]' ...
Another 2 patches are for driver, so I didn't send them to you, yes, I should use the subject prefix like '[PATCH 1/3]' to avoid confusing, will pay attention this.
Thanks
Li Jun
Quoted 21 lines
The patches look good to me. Applied all 3, thanks.
Shawn
drivers/clk/imx/clk-imx8mm.c static int __init imx8mm_clocks_init(struct device_node
Quoted 9 lines
--- drivers/clk/imx/clk-imx8mm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)(quoted diff) +0
-0
b/drivers/clk/imx/clk-imx8mm.cindex 6b8e75d..735cf9d 100644drivers/clk/imx/clk-imx8mm.c +0
-0@@ -631,7 +631,7 @@ static int __init imx8mm_clocks_init(struct device_node
*ccm_node)drivers/clk/imx/clk-imx8mm.c static int __init imx8mm_clocks_init(struct device_node · line 631
Quoted 1 line
drivers/clk/imx/clk-imx8mm.c +0
-0clks[IMX8MM_CLK_UART2_ROOT] = imx_clk_gate4("uart2_root_clk", "uart2",base +
0x44a0, 0);drivers/clk/imx/clk-imx8mm.c static int __init imx8mm_clocks_init(struct device_node · line 632
Quoted 1 line
drivers/clk/imx/clk-imx8mm.c +0
-0clks[IMX8MM_CLK_UART3_ROOT] = imx_clk_gate4("uart3_root_clk", "uart3",base +
0x44b0, 0);drivers/clk/imx/clk-imx8mm.c static int __init imx8mm_clocks_init(struct device_node · line 633
Quoted 1 line
drivers/clk/imx/clk-imx8mm.c +0
-0clks[IMX8MM_CLK_UART4_ROOT] = imx_clk_gate4("uart4_root_clk", "uart4",base +
0x44c0, 0);
Quoted 13 lines
drivers/clk/imx/clk-imx8mm.c static int __init imx8mm_clocks_init(struct device_node · line 634
Quoted 1 line
drivers/clk/imx/clk-imx8mm.c +0
-1- clks[IMX8MM_CLK_USB1_CTRL_ROOT] = imx_clk_gate4("usb1_ctrl_root_clk","
usb_core_ref", base +0x44d0, 0);drivers/clk/imx/clk-imx8mm.c static int __init imx8mm_clocks_init(struct device_node · line 636
Quoted 3 lines
drivers/clk/imx/clk-imx8mm.c +2
-0+ clks[IMX8MM_CLK_USB1_CTRL_ROOT ] = +imx_clk_gate4 ("usb1_ctrl_root_clk" ,"usb_bus" , base +0x44d0 ,0 ); clks[IMX8MM_CLK_GPU3D_ROOT] = imx_clk_gate4("gpu3d_root_clk","
gpu3d_div", base +0x44f0, 0);drivers/clk/imx/clk-imx8mm.c static int __init imx8mm_clocks_init(struct device_node · line 637
Quoted 1 line
drivers/clk/imx/clk-imx8mm.c +0
-0clks[IMX8MM_CLK_USDHC1_ROOT] = imx_clk_gate4("usdhc1_root_clk","usdhc1", base +
0x4510, 0);Quoted 5 lines
clks[IMX8MM_CLK_USDHC2_ROOT] = imx_clk_gate4("usdhc2_root_clk",
"usdhc2", base +0x4520, 0);
--
2.7.4
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel