Skip to contentSkip to conversation

ARM: tegra: add support for highspeed serial driver

PATCH In review Laxman Dewangan 3 participants 16 messages Dec 17, 2012 – Dec 18, 2012

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover ARM: tegra: add support for highspeed serial driver

This patch series add the infrastruture for supporting highspeed serial driver for Nvidia's Tegra SOCs.

Laxman Dewangan (4):
ARM: tegra30: Add support for Uart clock source divider as 15.1
ARM: tegra: add connection name for uart clock table
ARM: tegra: Add OF_DEV_AUXDATA for uart driver in board dt
ARM: tegra: dts: add dma requestor and port numbers for serial
controller

 arch/arm/boot/dts/tegra20.dtsi            |   10 ++++
 arch/arm/boot/dts/tegra30.dtsi            |   10 ++++
 arch/arm/mach-tegra/board-dt-tegra20.c    |    8 +++
 arch/arm/mach-tegra/board-dt-tegra30.c    |    9 ++++
 arch/arm/mach-tegra/clock.h               |    3 +-
 arch/arm/mach-tegra/tegra20_clocks_data.c |   12 +++---
 arch/arm/mach-tegra/tegra30_clocks.c      |   70 ++++++++++++++++++++++------
 arch/arm/mach-tegra/tegra30_clocks_data.c |   10 ++--
 8 files changed, 105 insertions(+), 27 deletions(-)
#1 lore raw

PATCH 1/4 ARM: tegra30: Add support for Uart clock source divider as 15.1

Tegra20 uart clock source have the 15.1 clock divider in place of 7.1. Add support for 15.1 clock divider and change the uart clock divider flag to DIV_U151.

---
 arch/arm/mach-tegra/clock.h               |    3 +-
 arch/arm/mach-tegra/tegra30_clocks.c      |   70 ++++++++++++++++++++++------
 arch/arm/mach-tegra/tegra30_clocks_data.c |   10 ++--
 3 files changed, 62 insertions(+), 21 deletions(-)
arch/arm/mach-tegra/clock.h +2 -1
index 2aa37f5..26e9253 100644
@@ -45,11 +45,12 @@
 #define PLLX                    (1 << 15)
 #define MUX_PWM                 (1 << 16)
 #define MUX8                    (1 << 17)
-#define DIV_U71_UART            (1 << 18)
+#define DIV_U151_UART           (1 << 18)
 #define MUX_CLK_OUT             (1 << 19)
 #define PLLM                    (1 << 20)
 #define DIV_U71_INT             (1 << 21)
 #define DIV_U71_IDLE            (1 << 22)
+#define DIV_U151                (1 << 23)
 #define ENABLE_ON_INIT		(1 << 28)
 #define PERIPH_ON_APB           (1 << 29)
 
arch/arm/mach-tegra/tegra30_clocks.c +55 -15

112 lines not on this page · raw message

arch/arm/mach-tegra/tegra30_clocks_data.c +5 -5
index 6942c7a..e2e6022 100644
@@ -1120,11 +1120,11 @@ PERIPH_CLK(i2c2,	"tegra-i2c.1",		"div-clk", 54,	0x198,	26000000,  mux_pllp_clkm,
 PERIPH_CLK(i2c3,	"tegra-i2c.2",		"div-clk", 67,	0x1b8,	26000000,  mux_pllp_clkm,		MUX | DIV_U16 | PERIPH_ON_APB);
 PERIPH_CLK(i2c4,	"tegra-i2c.3",		"div-clk", 103,	0x3c4,	26000000,  mux_pllp_clkm,		MUX | DIV_U16 | PERIPH_ON_APB);
 PERIPH_CLK(i2c5,	"tegra-i2c.4",		"div-clk", 47,	0x128,	26000000,  mux_pllp_clkm,		MUX | DIV_U16 | PERIPH_ON_APB);
-PERIPH_CLK(uarta,	"tegra-uart.0",		NULL,	6,	0x178,	800000000, mux_pllp_pllc_pllm_clkm,	MUX | DIV_U71 | DIV_U71_UART | PERIPH_ON_APB);
-PERIPH_CLK(uartb,	"tegra-uart.1",		NULL,	7,	0x17c,	800000000, mux_pllp_pllc_pllm_clkm,	MUX | DIV_U71 | DIV_U71_UART | PERIPH_ON_APB);
-PERIPH_CLK(uartc,	"tegra-uart.2",		NULL,	55,	0x1a0,	800000000, mux_pllp_pllc_pllm_clkm,	MUX | DIV_U71 | DIV_U71_UART | PERIPH_ON_APB);
-PERIPH_CLK(uartd,	"tegra-uart.3",		NULL,	65,	0x1c0,	800000000, mux_pllp_pllc_pllm_clkm,	MUX | DIV_U71 | DIV_U71_UART | PERIPH_ON_APB);
-PERIPH_CLK(uarte,	"tegra-uart.4",		NULL,	66,	0x1c4,	800000000, mux_pllp_pllc_pllm_clkm,	MUX | DIV_U71 | DIV_U71_UART | PERIPH_ON_APB);
+PERIPH_CLK(uarta,	"tegra-uart.0",		NULL,	6,	0x178,	800000000, mux_pllp_pllc_pllm_clkm,	MUX | DIV_U151 | DIV_U151_UART | PERIPH_ON_APB);
+PERIPH_CLK(uartb,	"tegra-uart.1",		NULL,	7,	0x17c,	800000000, mux_pllp_pllc_pllm_clkm,	MUX | DIV_U151 | DIV_U151_UART | PERIPH_ON_APB);
+PERIPH_CLK(uartc,	"tegra-uart.2",		NULL,	55,	0x1a0,	800000000, mux_pllp_pllc_pllm_clkm,	MUX | DIV_U151 | DIV_U151_UART | PERIPH_ON_APB);
+PERIPH_CLK(uartd,	"tegra-uart.3",		NULL,	65,	0x1c0,	800000000, mux_pllp_pllc_pllm_clkm,	MUX | DIV_U151 | DIV_U151_UART | PERIPH_ON_APB);
+PERIPH_CLK(uarte,	"tegra-uart.4",		NULL,	66,	0x1c4,	800000000, mux_pllp_pllc_pllm_clkm,	MUX | DIV_U151 | DIV_U151_UART | PERIPH_ON_APB);
 PERIPH_CLK(vi,		"tegra_camera",		"vi",	20,	0x148,	425000000, mux_pllm_pllc_pllp_plla,	MUX | DIV_U71 | DIV_U71_INT);
 PERIPH_CLK(3d,		"3d",			NULL,	24,	0x158,	520000000, mux_pllm_pllc_pllp_plla,	MUX | DIV_U71 | DIV_U71_INT | DIV_U71_IDLE | PERIPH_MANUAL_RESET);
 PERIPH_CLK(3d2,		"3d2",			NULL,	98,	0x3b0,	520000000, mux_pllm_pllc_pllp_plla,	MUX | DIV_U71 | DIV_U71_INT | DIV_U71_IDLE | PERIPH_MANUAL_RESET);
Signature · 1 line
1.7.1.1
#7 lore raw

PATCH 2/4 ARM: tegra: add connection name for uart clock table

In reply to Laxman Dewangan

Add connection name "uart-clk" for the uart clock information.

---
 arch/arm/mach-tegra/tegra20_clocks_data.c |   12 ++++++------
 arch/arm/mach-tegra/tegra30_clocks_data.c |   10 +++++-----
 2 files changed, 11 insertions(+), 11 deletions(-)
arch/arm/mach-tegra/tegra20_clocks_data.c +6 -6
index a23a073..a7f03c7 100644
@@ -924,12 +924,12 @@ PERIPH_CLK(i2c1,	"tegra-i2c.0",		"div-clk", 12,	0x124,	26000000,  mux_pllp_pllc_
 PERIPH_CLK(i2c2,	"tegra-i2c.1",		"div-clk", 54,	0x198,	26000000,  mux_pllp_pllc_pllm_clkm,	MUX | DIV_U16);
 PERIPH_CLK(i2c3,	"tegra-i2c.2",		"div-clk", 67,	0x1b8,	26000000,  mux_pllp_pllc_pllm_clkm,	MUX | DIV_U16);
 PERIPH_CLK(dvc,		"tegra-i2c.3",		"div-clk", 47,	0x128,	26000000,  mux_pllp_pllc_pllm_clkm,	MUX | DIV_U16);
-PERIPH_CLK(uarta,	"tegra-uart.0",		NULL,	6,	0x178,	600000000, mux_pllp_pllc_pllm_clkm,	MUX);
-PERIPH_CLK(uartb,	"tegra-uart.1",		NULL,	7,	0x17c,	600000000, mux_pllp_pllc_pllm_clkm,	MUX);
-PERIPH_CLK(uartc,	"tegra-uart.2",		NULL,	55,	0x1a0,	600000000, mux_pllp_pllc_pllm_clkm,	MUX);
-PERIPH_CLK(uartd,	"tegra-uart.3",		NULL,	65,	0x1c0,	600000000, mux_pllp_pllc_pllm_clkm,	MUX);
-PERIPH_CLK(uarte,	"tegra-uart.4",		NULL,	66,	0x1c4,	600000000, mux_pllp_pllc_pllm_clkm,	MUX);
-PERIPH_CLK(3d,		"3d",			NULL,	24,	0x158,	300000000, mux_pllm_pllc_pllp_plla,	MUX | DIV_U71 | PERIPH_MANUAL_RESET); /* scales with voltage and process_id */
+PERIPH_CLK(uarta,	"tegra-uart.0",		"uart-clk",	6,	0x178,	600000000, mux_pllp_pllc_pllm_clkm,	MUX);
+PERIPH_CLK(uartb,	"tegra-uart.1",		"uart-clk",	7,	0x17c,	600000000, mux_pllp_pllc_pllm_clkm,	MUX);
+PERIPH_CLK(uartc,	"tegra-uart.2",		"uart-clk",	55,	0x1a0,	600000000, mux_pllp_pllc_pllm_clkm,	MUX);
+PERIPH_CLK(uartd,	"tegra-uart.3",		"uart-clk",	65,	0x1c0,	600000000, mux_pllp_pllc_pllm_clkm,	MUX);
+PERIPH_CLK(uarte,	"tegra-uart.4",		"uart-clk",	66,	0x1c4,	600000000, mux_pllp_pllc_pllm_clkm,	MUX);
+PERIPH_CLK(3d,		"3d",			"uart-clk",	24,	0x158,	300000000, mux_pllm_pllc_pllp_plla,	MUX | DIV_U71 | PERIPH_MANUAL_RESET); /* scales with voltage and process_id */
 PERIPH_CLK(2d,		"2d",			NULL,	21,	0x15c,	300000000, mux_pllm_pllc_pllp_plla,	MUX | DIV_U71); /* scales with voltage and process_id */
 PERIPH_CLK(vi,		"tegra_camera",		"vi",	20,	0x148,	150000000, mux_pllm_pllc_pllp_plla,	MUX | DIV_U71); /* scales with voltage and process_id */
 PERIPH_CLK(vi_sensor,	"tegra_camera",		"vi_sensor",	20,	0x1a8,	150000000, mux_pllm_pllc_pllp_plla,	MUX | DIV_U71 | PERIPH_NO_RESET); /* scales with voltage and process_id */
arch/arm/mach-tegra/tegra30_clocks_data.c +5 -5
index e2e6022..4edcf60 100644
@@ -1120,11 +1120,11 @@ PERIPH_CLK(i2c2,	"tegra-i2c.1",		"div-clk", 54,	0x198,	26000000,  mux_pllp_clkm,
 PERIPH_CLK(i2c3,	"tegra-i2c.2",		"div-clk", 67,	0x1b8,	26000000,  mux_pllp_clkm,		MUX | DIV_U16 | PERIPH_ON_APB);
 PERIPH_CLK(i2c4,	"tegra-i2c.3",		"div-clk", 103,	0x3c4,	26000000,  mux_pllp_clkm,		MUX | DIV_U16 | PERIPH_ON_APB);
 PERIPH_CLK(i2c5,	"tegra-i2c.4",		"div-clk", 47,	0x128,	26000000,  mux_pllp_clkm,		MUX | DIV_U16 | PERIPH_ON_APB);
-PERIPH_CLK(uarta,	"tegra-uart.0",		NULL,	6,	0x178,	800000000, mux_pllp_pllc_pllm_clkm,	MUX | DIV_U151 | DIV_U151_UART | PERIPH_ON_APB);
-PERIPH_CLK(uartb,	"tegra-uart.1",		NULL,	7,	0x17c,	800000000, mux_pllp_pllc_pllm_clkm,	MUX | DIV_U151 | DIV_U151_UART | PERIPH_ON_APB);
-PERIPH_CLK(uartc,	"tegra-uart.2",		NULL,	55,	0x1a0,	800000000, mux_pllp_pllc_pllm_clkm,	MUX | DIV_U151 | DIV_U151_UART | PERIPH_ON_APB);
-PERIPH_CLK(uartd,	"tegra-uart.3",		NULL,	65,	0x1c0,	800000000, mux_pllp_pllc_pllm_clkm,	MUX | DIV_U151 | DIV_U151_UART | PERIPH_ON_APB);
-PERIPH_CLK(uarte,	"tegra-uart.4",		NULL,	66,	0x1c4,	800000000, mux_pllp_pllc_pllm_clkm,	MUX | DIV_U151 | DIV_U151_UART | PERIPH_ON_APB);
+PERIPH_CLK(uarta,	"tegra-uart.0",		"uart-clk",	6,	0x178,	800000000, mux_pllp_pllc_pllm_clkm,	MUX | DIV_U151 | DIV_U151_UART | PERIPH_ON_APB);
+PERIPH_CLK(uartb,	"tegra-uart.1",		"uart-clk",	7,	0x17c,	800000000, mux_pllp_pllc_pllm_clkm,	MUX | DIV_U151 | DIV_U151_UART | PERIPH_ON_APB);
+PERIPH_CLK(uartc,	"tegra-uart.2",		"uart-clk",	55,	0x1a0,	800000000, mux_pllp_pllc_pllm_clkm,	MUX | DIV_U151 | DIV_U151_UART | PERIPH_ON_APB);
+PERIPH_CLK(uartd,	"tegra-uart.3",		"uart-clk",	65,	0x1c0,	800000000, mux_pllp_pllc_pllm_clkm,	MUX | DIV_U151 | DIV_U151_UART | PERIPH_ON_APB);
+PERIPH_CLK(uarte,	"tegra-uart.4",		"uart-clk",	66,	0x1c4,	800000000, mux_pllp_pllc_pllm_clkm,	MUX | DIV_U151 | DIV_U151_UART | PERIPH_ON_APB);
 PERIPH_CLK(vi,		"tegra_camera",		"vi",	20,	0x148,	425000000, mux_pllm_pllc_pllp_plla,	MUX | DIV_U71 | DIV_U71_INT);
 PERIPH_CLK(3d,		"3d",			NULL,	24,	0x158,	520000000, mux_pllm_pllc_pllp_plla,	MUX | DIV_U71 | DIV_U71_INT | DIV_U71_IDLE | PERIPH_MANUAL_RESET);
 PERIPH_CLK(3d2,		"3d2",			NULL,	98,	0x3b0,	520000000, mux_pllm_pllc_pllp_plla,	MUX | DIV_U71 | DIV_U71_INT | DIV_U71_IDLE | PERIPH_MANUAL_RESET);
Signature · 1 line
1.7.1.1
#11 lore raw

PATCH 3/4 ARM: tegra: Add OF_DEV_AUXDATA for uart driver in board dt

In reply to Laxman Dewangan

Add OF_DEV_AUXDATA for high speed uart controller driver for Tegra20/Tegra30 board dt files.
Set the parent clock of uart controller to PLLP.

---
 arch/arm/mach-tegra/board-dt-tegra20.c |    8 ++++++++
 arch/arm/mach-tegra/board-dt-tegra30.c |    9 +++++++++
 2 files changed, 17 insertions(+), 0 deletions(-)
arch/arm/mach-tegra/board-dt-tegra20.c +8 -0
index 734d9cc..959c8b3 100644
@@ -94,6 +94,11 @@ struct of_dev_auxdata tegra20_auxdata_lookup[] __initdata = {
 	OF_DEV_AUXDATA("nvidia,tegra20-slink", 0x7000D600, "spi_tegra.1", NULL),
 	OF_DEV_AUXDATA("nvidia,tegra20-slink", 0x7000D800, "spi_tegra.2", NULL),
 	OF_DEV_AUXDATA("nvidia,tegra20-slink", 0x7000DA00, "spi_tegra.3", NULL),
+	OF_DEV_AUXDATA("nvidia,tegra20-hsuart", 0x70006000, "tegra-uart.0", NULL),
+	OF_DEV_AUXDATA("nvidia,tegra20-hsuart", 0x70006040, "tegra-uart.1", NULL),
+	OF_DEV_AUXDATA("nvidia,tegra20-hsuart", 0x70006200, "tegra-uart.2", NULL),
+	OF_DEV_AUXDATA("nvidia,tegra20-hsuart", 0x70006300, "tegra-uart.3", NULL),
+	OF_DEV_AUXDATA("nvidia,tegra20-hsuart", 0x70006400, "tegra-uart.4", NULL),
 	OF_DEV_AUXDATA("nvidia,tegra20-host1x", 0x50000000, "host1x", NULL),
 	OF_DEV_AUXDATA("nvidia,tegra20-dc", 0x54200000, "tegradc.0", NULL),
 	OF_DEV_AUXDATA("nvidia,tegra20-dc", 0x54240000, "tegradc.1", NULL),
@@ -106,7 +111,10 @@ struct of_dev_auxdata tegra20_auxdata_lookup[] __initdata = {
 static __initdata struct tegra_clk_init_table tegra_dt_clk_init_table[] = {
 	/* name		parent		rate		enabled */
 	{ "uarta",	"pll_p",	216000000,	true },
+	{ "uartb",	"pll_p",	216000000,	false },
+	{ "uartc",	"pll_p",	216000000,	false },
 	{ "uartd",	"pll_p",	216000000,	true },
+	{ "uarte",	"pll_p",	216000000,	false },
 	{ "usbd",	"clk_m",	12000000,	false },
 	{ "usb2",	"clk_m",	12000000,	false },
 	{ "usb3",	"clk_m",	12000000,	false },
arch/arm/mach-tegra/board-dt-tegra30.c +9 -0
index 6497d12..f430351 100644
@@ -57,6 +57,11 @@ struct of_dev_auxdata tegra30_auxdata_lookup[] __initdata = {
 	OF_DEV_AUXDATA("nvidia,tegra30-slink", 0x7000DA00, "spi_tegra.3", NULL),
 	OF_DEV_AUXDATA("nvidia,tegra30-slink", 0x7000DC00, "spi_tegra.4", NULL),
 	OF_DEV_AUXDATA("nvidia,tegra30-slink", 0x7000DE00, "spi_tegra.5", NULL),
+	OF_DEV_AUXDATA("nvidia,tegra30-hsuart", 0x70006000, "tegra-uart.0", NULL),
+	OF_DEV_AUXDATA("nvidia,tegra30-hsuart", 0x70006040, "tegra-uart.1", NULL),
+	OF_DEV_AUXDATA("nvidia,tegra30-hsuart", 0x70006200, "tegra-uart.2", NULL),
+	OF_DEV_AUXDATA("nvidia,tegra30-hsuart", 0x70006300, "tegra-uart.3", NULL),
+	OF_DEV_AUXDATA("nvidia,tegra30-hsuart", 0x70006400, "tegra-uart.4", NULL),
 	OF_DEV_AUXDATA("nvidia,tegra30-host1x", 0x50000000, "host1x", NULL),
 	OF_DEV_AUXDATA("nvidia,tegra30-dc", 0x54200000, "tegradc.0", NULL),
 	OF_DEV_AUXDATA("nvidia,tegra30-dc", 0x54240000, "tegradc.1", NULL),
@@ -69,6 +74,10 @@ struct of_dev_auxdata tegra30_auxdata_lookup[] __initdata = {
 static __initdata struct tegra_clk_init_table tegra_dt_clk_init_table[] = {
 	/* name		parent		rate		enabled */
 	{ "uarta",	"pll_p",	408000000,	true },
+	{ "uartb",	"pll_p",	408000000,	false },
+	{ "uartc",	"pll_p",	408000000,	false },
+	{ "uartd",	"pll_p",	408000000,	false },
+	{ "uarte",	"pll_p",	408000000,	false },
 	{ "pll_a",	"pll_p_out1",	564480000,	true },
 	{ "pll_a_out0",	"pll_a",	11289600,	true },
 	{ "extern1",	"pll_a_out0",	0,		true },
Signature · 1 line
1.7.1.1
#15 lore raw

PATCH 4/4 ARM: tegra: dts: add dma requestor and port numbers for serial controller

In reply to Laxman Dewangan

Add parameters for:
- port-number to enable the port index in device interface.
- dma requestor id to make trigger for apb dma burst transfer from controller.

---
 arch/arm/boot/dts/tegra20.dtsi |   10 ++++++++++
 arch/arm/boot/dts/tegra30.dtsi |   10 ++++++++++
 2 files changed, 20 insertions(+), 0 deletions(-)
arch/arm/boot/dts/tegra20.dtsi +10 -0
index b8effa1..ca3a2a3 100644
@@ -199,6 +199,8 @@
 		reg = <0x70006000 0x40>;
 		reg-shift = <2>;
 		interrupts = <0 36 0x04>;
+		port-number = <0>;
+		nvidia,dma-request-selector = <&apbdma 8>;
 		status = "disabled";
 	};
 
@@ -207,6 +209,8 @@
 		reg = <0x70006040 0x40>;
 		reg-shift = <2>;
 		interrupts = <0 37 0x04>;
+		port-number = <1>;
+		nvidia,dma-request-selector = <&apbdma 9>;
 		status = "disabled";
 	};
 
@@ -215,6 +219,8 @@
 		reg = <0x70006200 0x100>;
 		reg-shift = <2>;
 		interrupts = <0 46 0x04>;
+		port-number = <2>;
+		nvidia,dma-request-selector = <&apbdma 10>;
 		status = "disabled";
 	};
 
@@ -223,6 +229,8 @@
 		reg = <0x70006300 0x100>;
 		reg-shift = <2>;
 		interrupts = <0 90 0x04>;
+		port-number = <3>;
+		nvidia,dma-request-selector = <&apbdma 19>;
 		status = "disabled";
 	};
 
@@ -231,6 +239,8 @@
 		reg = <0x70006400 0x100>;
 		reg-shift = <2>;
 		interrupts = <0 91 0x04>;
+		port-number = <4>;
+		nvidia,dma-request-selector = <&apbdma 20>;
 		status = "disabled";
 	};
 
arch/arm/boot/dts/tegra30.dtsi +10 -0
index 529fdb8..dcb9caa 100644
@@ -195,6 +195,8 @@
 		reg = <0x70006000 0x40>;
 		reg-shift = <2>;
 		interrupts = <0 36 0x04>;
+		port-number = <0>;
+		nvidia,dma-request-selector = <&apbdma 8>;
 		status = "disabled";
 	};
 
@@ -203,6 +205,8 @@
 		reg = <0x70006040 0x40>;
 		reg-shift = <2>;
 		interrupts = <0 37 0x04>;
+		port-number = <1>;
+		nvidia,dma-request-selector = <&apbdma 9>;
 		status = "disabled";
 	};
 
@@ -211,6 +215,8 @@
 		reg = <0x70006200 0x100>;
 		reg-shift = <2>;
 		interrupts = <0 46 0x04>;
+		port-number = <2>;
+		nvidia,dma-request-selector = <&apbdma 10>;
 		status = "disabled";
 	};
 
@@ -219,6 +225,8 @@
 		reg = <0x70006300 0x100>;
 		reg-shift = <2>;
 		interrupts = <0 90 0x04>;
+		port-number = <3>;
+		nvidia,dma-request-selector = <&apbdma 19>;
 		status = "disabled";
 	};
 
@@ -227,6 +235,8 @@
 		reg = <0x70006400 0x100>;
 		reg-shift = <2>;
 		interrupts = <0 91 0x04>;
+		port-number = <4>;
+		nvidia,dma-request-selector = <&apbdma 20>;
 		status = "disabled";
 	};
 
Signature · 1 line
1.7.1.1
#2 lore raw

Re: [PATCH 1/4] ARM: tegra30: Add support for Uart clock source divider as 15.1

In reply to Laxman Dewangan
Quoted 1 line · Laxman Dewangan

Tegra20 uart clock source have the 15.1 clock divider in place of

That says Tegra20, but ...

Quoted 6 lines

7.1. Add support for 15.1 clock divider and change the uart clock divider flag to DIV_U151.

 arch/arm/mach-tegra/clock.h               |    3 +-
 arch/arm/mach-tegra/tegra30_clocks.c      |   70 ++++++++++++++++++++++------
 arch/arm/mach-tegra/tegra30_clocks_data.c |   10 ++--

... the patch only modifies Tegra30. Do both Tegra20 and Tegra30 have this feature; should both clock drivers be updated?

BTW, Prashant is reworking the Tegra clock support to be modular, rather than having a single monolithic "Tegra clock" type, and also moving the code to drivers/clk. This patch will conflict signifcantly with that. Please work with him to integrate this patch into his rework series, either before or after his changes, and have him include the patch when he posts his series. You'll also need to think about whether/how your and his series depend on each-other.

... but: Is this a pure bug-fix? If so, I guess this patch should be applied before Prashant's patches, and this patch also Cc: stable?

#8 lore raw

Re: [PATCH 2/4] ARM: tegra: add connection name for uart clock table

In reply to Laxman Dewangan
Quoted 1 line · Laxman Dewangan

Add connection name "uart-clk" for the uart clock information.

Does the UART receive more than one clock, so that it actually cares what the clock connection name is? If not, can we just drop this patch?

#12 lore raw

Re: [PATCH 3/4] ARM: tegra: Add OF_DEV_AUXDATA for uart driver in board dt

In reply to Laxman Dewangan

arch/arm/mach-tegra/board-dt-tegra20.c struct of_dev_auxdata tegra20_auxdata_lookup[] __initdata = { · line 99

Quoted 13 lines · Laxman Dewangan

Add OF_DEV_AUXDATA for high speed uart controller driver for Tegra20/Tegra30 board dt files.
Set the parent clock of uart controller to PLLP.

arch/arm/mach-tegra/board-dt-tegra20.c +5 -0
@@ -94,6 +94,11 @@ struct of_dev_auxdata tegra20_auxdata_lookup[] __initdata = {
 
+	OF_DEV_AUXDATA("nvidia,tegra20-hsuart", 0x70006000, "tegra-uart.0", NULL),
+	OF_DEV_AUXDATA("nvidia,tegra20-hsuart", 0x70006040, "tegra-uart.1", NULL),
+	OF_DEV_AUXDATA("nvidia,tegra20-hsuart", 0x70006200, "tegra-uart.2", NULL),
+	OF_DEV_AUXDATA("nvidia,tegra20-hsuart", 0x70006300, "tegra-uart.3", NULL),
+	OF_DEV_AUXDATA("nvidia,tegra20-hsuart", 0x70006400, "tegra-uart.4", NULL),

Instead, can we simply get the clocks from device tree? Prashant, how much effort will that be once your clock patches are checked in, or is it already part of those patches?

arch/arm/mach-tegra/board-dt-tegra20.c struct of_dev_auxdata tegra20_auxdata_lookup[] __initdata = { · line 117

Quoted 8 lines
arch/arm/mach-tegra/board-dt-tegra20.c +3 -0
@@ -106,7 +111,10 @@ struct of_dev_auxdata tegra20_auxdata_lookup[] __initdata = {
 static __initdata struct tegra_clk_init_table tegra_dt_clk_init_table[] = {
 	/* name		parent		rate		enabled */
 	{ "uarta",	"pll_p",	216000000,	true },
+	{ "uartb",	"pll_p",	216000000,	false },
+	{ "uartc",	"pll_p",	216000000,	false },
 	{ "uartd",	"pll_p",	216000000,	true },
+	{ "uarte",	"pll_p",	216000000,	false },

Prashant's clock patches remove this table. Please work with him to work out how to deal with that.

#3 lore raw

Re: [PATCH 1/4] ARM: tegra30: Add support for Uart clock source divider as 15.1

In reply to Stephen Warren
Quoted 20 lines · Stephen Warren
Quoted 1 line · Laxman Dewangan

Tegra20 uart clock source have the 15.1 clock divider in place of

That says Tegra20, but ...

Quoted 5 lines

7.1. Add support for 15.1 clock divider and change the uart clock divider flag to DIV_U151.

  arch/arm/mach-tegra/clock.h               |    3 +-
  arch/arm/mach-tegra/tegra30_clocks.c      |   70 ++++++++++++++++++++++------
  arch/arm/mach-tegra/tegra30_clocks_data.c |   10 ++--

... the patch only modifies Tegra30. Do both Tegra20 and Tegra30 have this feature; should both clock drivers be updated?

BTW, Prashant is reworking the Tegra clock support to be modular, rather than having a single monolithic "Tegra clock" type, and also moving the code to drivers/clk. This patch will conflict signifcantly with that. Please work with him to integrate this patch into his rework series, either before or after his changes, and have him include the patch when he posts his series. You'll also need to think about whether/how your and his series depend on each-other.

Quoted 2 lines

... but: Is this a pure bug-fix? If so, I guess this patch should be applied before Prashant's patches, and this patch also Cc: stable?

My clock driver rework includes this fix. Divider supports both DIVU71 and DIVU151.
UART divider is set to DIVU151.

#13 lore raw

Re: [PATCH 3/4] ARM: tegra: Add OF_DEV_AUXDATA for uart driver in board dt

In reply to Stephen Warren
Quoted 14 lines · Stephen Warren

arch/arm/mach-tegra/board-dt-tegra20.c struct of_dev_auxdata tegra20_auxdata_lookup[] __initdata = { · line 98

Quoted 10 lines · Laxman Dewangan

Add OF_DEV_AUXDATA for high speed uart controller driver for Tegra20/Tegra30 board dt files.
Set the parent clock of uart controller to PLLP.

arch/arm/mach-tegra/board-dt-tegra20.c +5 -0
@@ -94,6 +94,11 @@ struct of_dev_auxdata tegra20_auxdata_lookup[] __initdata = {
+	OF_DEV_AUXDATA("nvidia,tegra20-hsuart", 0x70006000, "tegra-uart.0", NULL),
+	OF_DEV_AUXDATA("nvidia,tegra20-hsuart", 0x70006040, "tegra-uart.1", NULL),
+	OF_DEV_AUXDATA("nvidia,tegra20-hsuart", 0x70006200, "tegra-uart.2", NULL),
+	OF_DEV_AUXDATA("nvidia,tegra20-hsuart", 0x70006300, "tegra-uart.3", NULL),
+	OF_DEV_AUXDATA("nvidia,tegra20-hsuart", 0x70006400, "tegra-uart.4", NULL),

Instead, can we simply get the clocks from device tree? Prashant, how much effort will that be once your clock patches are checked in, or is it already part of those patches?

It is not part of rework patches, but I will send a patch for it immediately after those patches are accepted upstream.

Quoted 10 lines

arch/arm/mach-tegra/board-dt-tegra20.c struct of_dev_auxdata tegra20_auxdata_lookup[] __initdata = { · line 117

Quoted 8 lines
arch/arm/mach-tegra/board-dt-tegra20.c +3 -0
@@ -106,7 +111,10 @@ struct of_dev_auxdata tegra20_auxdata_lookup[] __initdata = {
  static __initdata struct tegra_clk_init_table tegra_dt_clk_init_table[] = {
  	/* name		parent		rate		enabled */
  	{ "uarta",	"pll_p",	216000000,	true },
+	{ "uartb",	"pll_p",	216000000,	false },
+	{ "uartc",	"pll_p",	216000000,	false },
  	{ "uartd",	"pll_p",	216000000,	true },
+	{ "uarte",	"pll_p",	216000000,	false },

Prashant's clock patches remove this table. Please work with him to work out how to deal with that.

Laxman,

If you want I can include these entries in current tables.

#4 lore raw

Re: [PATCH 1/4] ARM: tegra30: Add support for Uart clock source divider as 15.1

In reply to Prashant Gaikwad
Quoted 21 lines · Prashant Gaikwad
Quoted 20 lines · Stephen Warren
Quoted 1 line · Laxman Dewangan

Tegra20 uart clock source have the 15.1 clock divider in place of

That says Tegra20, but ...

Quoted 5 lines

7.1. Add support for 15.1 clock divider and change the uart clock divider flag to DIV_U151.

   arch/arm/mach-tegra/clock.h               |    3 +-
   arch/arm/mach-tegra/tegra30_clocks.c      |   70 ++++++++++++++++++++++------
   arch/arm/mach-tegra/tegra30_clocks_data.c |   10 ++--

... the patch only modifies Tegra30. Do both Tegra20 and Tegra30 have this feature; should both clock drivers be updated?

BTW, Prashant is reworking the Tegra clock support to be modular, rather than having a single monolithic "Tegra clock" type, and also moving the code to drivers/clk. This patch will conflict signifcantly with that. Please work with him to integrate this patch into his rework series, either before or after his changes, and have him include the patch when he posts his series. You'll also need to think about whether/how your and his series depend on each-other.

Quoted 5 lines
Quoted 2 lines

... but: Is this a pure bug-fix? If so, I guess this patch should be applied before Prashant's patches, and this patch also Cc: stable?

My clock driver rework includes this fix. Divider supports both DIVU71 and DIVU151.
UART divider is set to DIVU151.

Prashant,
I like to go this patch as first patch towards bug fixes rather than after moving the clock. The reason is that we will pull this change in our downstream and will be available in our K3.7 code.

#14 lore raw

Re: [PATCH 3/4] ARM: tegra: Add OF_DEV_AUXDATA for uart driver in board dt

In reply to Prashant Gaikwad
Quoted 28 lines · Prashant Gaikwad
Quoted 14 lines · Stephen Warren

arch/arm/mach-tegra/board-dt-tegra20.c struct of_dev_auxdata tegra20_auxdata_lookup[] __initdata = { · line 98

Quoted 10 lines · Laxman Dewangan

Add OF_DEV_AUXDATA for high speed uart controller driver for Tegra20/Tegra30 board dt files.
Set the parent clock of uart controller to PLLP.

arch/arm/mach-tegra/board-dt-tegra20.c +5 -0
@@ -94,6 +94,11 @@ struct of_dev_auxdata tegra20_auxdata_lookup[] __initdata = {
+	OF_DEV_AUXDATA("nvidia,tegra20-hsuart", 0x70006000, "tegra-uart.0", NULL),
+	OF_DEV_AUXDATA("nvidia,tegra20-hsuart", 0x70006040, "tegra-uart.1", NULL),
+	OF_DEV_AUXDATA("nvidia,tegra20-hsuart", 0x70006200, "tegra-uart.2", NULL),
+	OF_DEV_AUXDATA("nvidia,tegra20-hsuart", 0x70006300, "tegra-uart.3", NULL),
+	OF_DEV_AUXDATA("nvidia,tegra20-hsuart", 0x70006400, "tegra-uart.4", NULL),

Instead, can we simply get the clocks from device tree? Prashant, how much effort will that be once your clock patches are checked in, or is it already part of those patches?

It is not part of rework patches, but I will send a patch for it immediately after those patches are accepted upstream.

Quoted 10 lines

arch/arm/mach-tegra/board-dt-tegra20.c struct of_dev_auxdata tegra20_auxdata_lookup[] __initdata = { · line 117

Quoted 8 lines
arch/arm/mach-tegra/board-dt-tegra20.c +3 -0
@@ -106,7 +111,10 @@ struct of_dev_auxdata tegra20_auxdata_lookup[] __initdata = {
   static __initdata struct tegra_clk_init_table tegra_dt_clk_init_table[] = {
   	/* name		parent		rate		enabled */
   	{ "uarta",	"pll_p",	216000000,	true },
+	{ "uartb",	"pll_p",	216000000,	false },
+	{ "uartc",	"pll_p",	216000000,	false },
   	{ "uartd",	"pll_p",	216000000,	true },
+	{ "uarte",	"pll_p",	216000000,	false },

Prashant's clock patches remove this table. Please work with him to work out how to deal with that.

Quoted 3 lines

Laxman,

If you want I can include these entries in current tables.

No issue, you can add this in your change.

#9 lore raw

Re: [PATCH 2/4] ARM: tegra: add connection name for uart clock table

In reply to Stephen Warren
Quoted 4 lines · Stephen Warren
Quoted 1 line · Laxman Dewangan

Add connection name "uart-clk" for the uart clock information.

Does the UART receive more than one clock, so that it actually cares what the clock connection name is? If not, can we just drop this patch?

I like to have this patch because:
- In future, I want to also get the name of the clock source and set parent of uart clock properly.
- I want to switch the parent clock source dynamically between CLKM and PLLP to achieve more power optimization i.e. use CLKM wherever possible..

#5 lore raw

Re: [PATCH 1/4] ARM: tegra30: Add support for Uart clock source divider as 15.1

In reply to Laxman Dewangan
Quoted 24 lines · Laxman Dewangan
Quoted 23 lines · Prashant Gaikwad
Quoted 22 lines · Stephen Warren
Quoted 1 line · Laxman Dewangan

Tegra20 uart clock source have the 15.1 clock divider in place of

That says Tegra20, but ...

Quoted 5 lines

7.1. Add support for 15.1 clock divider and change the uart clock divider flag to DIV_U151.

    arch/arm/mach-tegra/clock.h               |    3 +-
    arch/arm/mach-tegra/tegra30_clocks.c      |   70 ++++++++++++++++++++++------
    arch/arm/mach-tegra/tegra30_clocks_data.c |   10 ++--

... the patch only modifies Tegra30. Do both Tegra20 and Tegra30 have this feature; should both clock drivers be updated?

BTW, Prashant is reworking the Tegra clock support to be modular, rather than having a single monolithic "Tegra clock" type, and also moving the code to drivers/clk. This patch will conflict signifcantly with that. Please work with him to integrate this patch into his rework series, either before or after his changes, and have him include the patch when he posts his series. You'll also need to think about whether/how your and his series depend on each-other.

... but: Is this a pure bug-fix? If so, I guess this patch should be applied before Prashant's patches, and this patch also Cc: stable?

Quoted 7 lines
Quoted 3 lines

My clock driver rework includes this fix. Divider supports both DIVU71 and DIVU151.
UART divider is set to DIVU151.

Prashant,
I like to go this patch as first patch towards bug fixes rather than after moving the clock. The reason is that we will pull this change in our downstream and will be available in our K3.7 code.

Laxman,

We are not going to use ccf in our downstream kernel port to K3.7. How does that help pushing in upstream?

Quoted 2 lines
#6 lore raw

Re: [PATCH 1/4] ARM: tegra30: Add support for Uart clock source divider as 15.1

Quoted 6 lines · Prashant Gaikwad
Quoted 5 lines · Laxman Dewangan
Quoted 4 lines · Prashant Gaikwad

My clock driver rework includes this fix. Divider supports both DIVU71 and DIVU151.
UART divider is set to DIVU151.

Quoted 8 lines
Quoted 4 lines

Prashant,
I like to go this patch as first patch towards bug fixes rather than after moving the clock. The reason is that we will pull this change in our downstream and will be available in our K3.7 code.

Laxman,

We are not going to use ccf in our downstream kernel port to K3.7. How does that help pushing in upstream?

Ok, as per our internal discussion, I am going to drop first three patches. I will relookinto these patches once your series get applied and will work if there is any missing items.

Stephen,
I will respin the 4th patch based on how the discussion on serial driver goes. I will send the new patch for 4th change.

#10 lore raw

Re: [PATCH 2/4] ARM: tegra: add connection name for uart clock table

In reply to Laxman Dewangan
Quoted 10 lines · Laxman Dewangan
Quoted 5 lines · Stephen Warren
Quoted 1 line · Laxman Dewangan

Add connection name "uart-clk" for the uart clock information.

Does the UART receive more than one clock, so that it actually cares what the clock connection name is? If not, can we just drop this patch?

I like to have this patch because:
- In future, I want to also get the name of the clock source and set parent of uart clock properly.

I don't understand that; drivers should not care about the names of clocks; the names will be entirely irrelevant once we get clocks from DT.

Quoted 2 lines

- I want to switch the parent clock source dynamically between CLKM and PLLP to achieve more power optimization i.e. use CLKM wherever possible..

I'd prefer to defer that until after we get clocks from DT. Otherwise, we're just adding more churn to the old clock driver first. It'd be better to just switch to the new clock driver, put all the clocks in DT, and then build on that.