ARM: tegra: Enable SLINK controller driver
cover ARM: tegra: Enable SLINK controller driver
This series modify the dts file to add the slink addresses, make entry of slink in clock tables, defines SLINK addressed, enable slink controller in Tegra30 based platform cardhu.
Laxman Dewangan (5):
ARM: tegra: Add slink controller base address
ARM: tegra: dts: add slink controller dt entry
ARM: tegra: fix clock entry of slink controller
ARM: tegra: dts: cardhu: enable SLINK4
ARM: tegra: config: enable spi driver for Tegra SLINK controller
arch/arm/boot/dts/tegra20.dtsi | 40 +++++++++++++++++++ arch/arm/boot/dts/tegra30-cardhu.dtsi | 5 ++ arch/arm/boot/dts/tegra30.dtsi | 60 +++++++++++++++++++++++++++++ arch/arm/configs/tegra_defconfig | 2 +- arch/arm/mach-tegra/board-dt-tegra20.c | 8 ++++ arch/arm/mach-tegra/board-dt-tegra30.c | 12 ++++++ arch/arm/mach-tegra/include/mach/iomap.h | 22 +++++++---- arch/arm/mach-tegra/tegra20_clocks_data.c | 16 ++++---- arch/arm/mach-tegra/tegra30_clocks_data.c | 36 +++++++++--------- 9 files changed, 166 insertions(+), 35 deletions(-)
PATCH 1/5 ARM: tegra: Add slink controller base address
Add base address of all slink controller of Tegra20 and tegra30.
--- arch/arm/mach-tegra/include/mach/iomap.h | 22 ++++++++++++++-------- 1 files changed, 14 insertions(+), 8 deletions(-)
arch/arm/mach-tegra/include/mach/iomap.h +14 -8
@@ -206,17 +206,23 @@#define TEGRA_DVC_BASE 0x7000D000#define TEGRA_DVC_SIZE SZ_512 -#define TEGRA_SPI1_BASE 0x7000D400 -#define TEGRA_SPI1_SIZE SZ_512 +#define TEGRA_SLINK1_BASE 0x7000D400 +#define TEGRA_SLINK1_SIZE SZ_512 -#define TEGRA_SPI2_BASE 0x7000D600 -#define TEGRA_SPI2_SIZE SZ_512 +#define TEGRA_SLINK2_BASE 0x7000D600 +#define TEGRA_SLINK2_SIZE SZ_512 -#define TEGRA_SPI3_BASE 0x7000D800 -#define TEGRA_SPI3_SIZE SZ_512 +#define TEGRA_SLINK3_BASE 0x7000D800 +#define TEGRA_SLINK3_SIZE SZ_512 -#define TEGRA_SPI4_BASE 0x7000DA00 -#define TEGRA_SPI4_SIZE SZ_512 +#define TEGRA_SLINK4_BASE 0x7000DA00 +#define TEGRA_SLINK4_SIZE SZ_512 + +#define TEGRA_SLINK5_BASE 0x7000DC00 +#define TEGRA_SLINK5_SIZE SZ_512 + +#define TEGRA_SLINK6_BASE 0x7000DE00 +#define TEGRA_SLINK6_SIZE SZ_512#define TEGRA_RTC_BASE 0x7000E000#define TEGRA_RTC_SIZE SZ_256
Signature · 1 line
1.7.1.1
PATCH 2/5 ARM: tegra: dts: add slink controller dt entry
In reply to Laxman DewanganAdd slink controller details in the dts file of
Tegra20 and Tegra30.
--- arch/arm/boot/dts/tegra20.dtsi | 40 ++++++++++++++++++++++++++ arch/arm/boot/dts/tegra30.dtsi | 60 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 100 insertions(+), 0 deletions(-)
arch/arm/boot/dts/tegra20.dtsi +40 -0
@@ -186,6 +186,46 @@ status = "disabled"; }; + slink at 7000d400 { + compatible = "nvidia,tegra20-slink"; + reg = <0x7000d400 0x200>; + interrupts = <0 59 0x04>; + nvidia,dma-req-sel = <15>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + slink at 7000d600 { + compatible = "nvidia,tegra20-slink"; + reg = <0x7000d600 0x200>; + interrupts = <0 82 0x04>; + nvidia,dma-req-sel = <16>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + slink at 7000d800 { + compatible = "nvidia,tegra20-slink"; + reg = <0x7000d480 0x200>; + interrupts = <0 83 0x04>; + nvidia,dma-req-sel = <17>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + slink at 7000da00 { + compatible = "nvidia,tegra20-slink"; + reg = <0x7000da00 0x200>; + interrupts = <0 93 0x04>; + nvidia,dma-req-sel = <18>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + pmc { compatible = "nvidia,tegra20-pmc"; reg = <0x7000e400 0x400>;
arch/arm/boot/dts/tegra30.dtsi +60 -0
66 lines not on this page · raw message
Signature · 1 line
1.7.1.1
PATCH 3/5 ARM: tegra: fix clock entry of slink controller
In reply to Laxman DewanganFix the driver name, connection name and clock name for slink controller clocks in clock table of Tegra20 and Tegra30.
--- arch/arm/mach-tegra/board-dt-tegra20.c | 8 ++++++ arch/arm/mach-tegra/board-dt-tegra30.c | 12 +++++++++ arch/arm/mach-tegra/tegra20_clocks_data.c | 16 ++++++------ arch/arm/mach-tegra/tegra30_clocks_data.c | 36 ++++++++++++++-------------- 4 files changed, 46 insertions(+), 26 deletions(-)
arch/arm/mach-tegra/board-dt-tegra20.c +8 -0
@@ -90,6 +90,10 @@ struct of_dev_auxdata tegra20_auxdata_lookup[] __initdata = { &tegra_ehci3_pdata),OF_DEV_AUXDATA ("nvidia,tegra20-apbdma" ,TEGRA_APB_DMA_BASE ,"tegra-apbdma" ,NULL ),OF_DEV_AUXDATA ("nvidia,tegra20-pwm" ,TEGRA_PWFM_BASE ,"tegra-pwm" ,NULL ), +OF_DEV_AUXDATA ("nvidia,tegra20-slink" ,TEGRA_SLINK1_BASE ,"spi-tegra-slink.0" ,NULL ), +OF_DEV_AUXDATA ("nvidia,tegra20-slink" ,TEGRA_SLINK2_BASE ,"spi-tegra-slink.1" ,NULL ), +OF_DEV_AUXDATA ("nvidia,tegra20-slink" ,TEGRA_SLINK3_BASE ,"spi-tegra-slink.2" ,NULL ), + OF_DEV_AUXDATA("nvidia,tegra20-slink", TEGRA_SLINK4_BASE, "spi-tegra-slink.3", NULL), {} };
@@ -109,6 +113,10 @@ static __initdata struct tegra_clk_init_table tegra_dt_clk_init_table[] = { { "sdmmc1", "pll_p", 48000000, false}, { "sdmmc3", "pll_p", 48000000, false}, { "sdmmc4", "pll_p", 48000000, false}, + { "slink1", "pll_p", 100000000, false }, + { "slink2", "pll_p", 100000000, false }, + { "slink3", "pll_p", 100000000, false }, + { "slink4", "pll_p", 100000000, false }, { NULL, NULL, 0, 0}, };
arch/arm/mach-tegra/board-dt-tegra30.c +12 -0
@@ -52,6 +52,12 @@ struct of_dev_auxdata tegra30_auxdata_lookup[] __initdata = {OF_DEV_AUXDATA ("nvidia,tegra30-ahub" ,0x70080000 ,"tegra30-ahub" ,NULL ),OF_DEV_AUXDATA ("nvidia,tegra30-apbdma" ,0x6000a000 ,"tegra-apbdma" ,NULL ),OF_DEV_AUXDATA ("nvidia,tegra30-pwm" ,TEGRA_PWFM_BASE ,"tegra-pwm" ,NULL ), +OF_DEV_AUXDATA ("nvidia,tegra30-slink" ,TEGRA_SLINK1_BASE ,"spi-tegra-slink.0" ,NULL ), +OF_DEV_AUXDATA ("nvidia,tegra30-slink" ,TEGRA_SLINK2_BASE ,"spi-tegra-slink.1" ,NULL ), +OF_DEV_AUXDATA ("nvidia,tegra30-slink" ,TEGRA_SLINK3_BASE ,"spi-tegra-slink.2" ,NULL ), +OF_DEV_AUXDATA ("nvidia,tegra30-slink" ,TEGRA_SLINK4_BASE ,"spi-tegra-slink.3" ,NULL ), +OF_DEV_AUXDATA ("nvidia,tegra30-slink" ,TEGRA_SLINK5_BASE ,"spi-tegra-slink.4" ,NULL ), + OF_DEV_AUXDATA("nvidia,tegra30-slink", TEGRA_SLINK6_BASE, "spi-tegra-slink.5", NULL), {} };
@@ -71,6 +77,12 @@ static __initdata struct tegra_clk_init_table tegra_dt_clk_init_table[] = { { "sdmmc1", "pll_p", 48000000, false}, { "sdmmc3", "pll_p", 48000000, false}, { "sdmmc4", "pll_p", 48000000, false}, + { "slink1", "pll_p", 100000000, false}, + { "slink2", "pll_p", 100000000, false}, + { "slink3", "pll_p", 100000000, false}, + { "slink4", "pll_p", 100000000, false}, + { "slink5", "pll_p", 100000000, false}, + { "slink6", "pll_p", 100000000, false}, { NULL, NULL, 0, 0}, };
arch/arm/mach-tegra/tegra20_clocks_data.c +8 -8
@@ -894,10 +894,10 @@ PERIPH_CLK(pwm, "tegra-pwm", NULL, 17, 0x110, 432000000, mux_pllp_pllc_audio_cPERIPH_CLK (spi,"spi" ,NULL ,43 ,0x114 ,40000000 , mux_pllp_pllc_pllm_clkm,MUX |DIV_U71 );PERIPH_CLK (xio,"xio" ,NULL ,45 ,0x120 ,150000000 , mux_pllp_pllc_pllm_clkm,MUX |DIV_U71 );PERIPH_CLK (twc,"twc" ,NULL ,16 ,0x12c ,150000000 , mux_pllp_pllc_pllm_clkm,MUX |DIV_U71 ); -PERIPH_CLK (sbc1,"spi_tegra.0" ,NULL ,41 ,0x134 ,160000000 , mux_pllp_pllc_pllm_clkm,MUX |DIV_U71 ); -PERIPH_CLK (sbc2,"spi_tegra.1" ,NULL ,44 ,0x118 ,160000000 , mux_pllp_pllc_pllm_clkm,MUX |DIV_U71 ); -PERIPH_CLK (sbc3,"spi_tegra.2" ,NULL ,46 ,0x11c ,160000000 , mux_pllp_pllc_pllm_clkm,MUX |DIV_U71 ); -PERIPH_CLK (sbc4,"spi_tegra.3" ,NULL ,68 ,0x1b4 ,160000000 , mux_pllp_pllc_pllm_clkm,MUX |DIV_U71 ); +PERIPH_CLK (slink1,"spi-tegra-slink.0" ,"slink" ,41 ,0x134 ,160000000 , mux_pllp_pllc_pllm_clkm,MUX |DIV_U71 ); +PERIPH_CLK (slink2,"spi-tegra-slink.1" ,"slink" ,44 ,0x118 ,160000000 , mux_pllp_pllc_pllm_clkm,MUX |DIV_U71 ); +PERIPH_CLK (slink3,"spi-tegra-slink.2" ,"slink" ,46 ,0x11c ,160000000 , mux_pllp_pllc_pllm_clkm,MUX |DIV_U71 ); +PERIPH_CLK (slink4,"spi-tegra-slink.3" ,"slink" ,68 ,0x1b4 ,160000000 , mux_pllp_pllc_pllm_clkm,MUX |DIV_U71 );PERIPH_CLK (ide,"ide" ,NULL ,25 ,0x144 ,100000000 , mux_pllp_pllc_pllm_clkm,MUX |DIV_U71 );/* requires min voltage */ PERIPH_CLK (ndflash,"tegra_nand" ,NULL ,13 ,0x160 ,164000000 , mux_pllp_pllc_pllm_clkm,MUX |DIV_U71 );/* scales with voltage */ PERIPH_CLK (vfir,"vfir" ,NULL ,7 ,0x168 ,72000000 , mux_pllp_pllc_pllm_clkm,MUX |DIV_U71 );
@@ -960,10 +960,10 @@ static struct clk *tegra_list_clks[] = { &tegra_spi, &tegra_xio, &tegra_twc, - &tegra_sbc1, - &tegra_sbc2, - &tegra_sbc3, - &tegra_sbc4, + &tegra_slink1, + &tegra_slink2, + &tegra_slink3, + &tegra_slink4, &tegra_ide, &tegra_ndflash, &tegra_vfir,
arch/arm/mach-tegra/tegra30_clocks_data.c +18 -18
@@ -1046,12 +1046,12 @@ PERIPH_CLK(dam2, "tegra30-dam.2", NULL, 110, 0x3e0, 48000000, mux_plla_pllc_pllPERIPH_CLK (hda,"tegra30-hda" ,"hda" ,125 ,0x428 ,108000000 , mux_pllp_pllc_pllm_clkm,MUX |DIV_U71 );PERIPH_CLK (hda2codec_2x,"tegra30-hda" ,"hda2codec" ,111 ,0x3e4 ,48000000 , mux_pllp_pllc_pllm_clkm,MUX |DIV_U71 );PERIPH_CLK (hda2hdmi,"tegra30-hda" ,"hda2hdmi" ,128 ,0 ,48000000 , mux_clk_m,0 ); -PERIPH_CLK (sbc1,"spi_tegra.0" ,NULL ,41 ,0x134 ,160000000 , mux_pllp_pllc_pllm_clkm,MUX |DIV_U71 |PERIPH_ON_APB ); -PERIPH_CLK (sbc2,"spi_tegra.1" ,NULL ,44 ,0x118 ,160000000 , mux_pllp_pllc_pllm_clkm,MUX |DIV_U71 |PERIPH_ON_APB ); -PERIPH_CLK (sbc3,"spi_tegra.2" ,NULL ,46 ,0x11c ,160000000 , mux_pllp_pllc_pllm_clkm,MUX |DIV_U71 |PERIPH_ON_APB ); -PERIPH_CLK (sbc4,"spi_tegra.3" ,NULL ,68 ,0x1b4 ,160000000 , mux_pllp_pllc_pllm_clkm,MUX |DIV_U71 |PERIPH_ON_APB ); -PERIPH_CLK (sbc5,"spi_tegra.4" ,NULL ,104 ,0x3c8 ,160000000 , mux_pllp_pllc_pllm_clkm,MUX |DIV_U71 |PERIPH_ON_APB ); -PERIPH_CLK (sbc6,"spi_tegra.5" ,NULL ,105 ,0x3cc ,160000000 , mux_pllp_pllc_pllm_clkm,MUX |DIV_U71 |PERIPH_ON_APB ); +PERIPH_CLK (slink1,"spi-tegra-slink.0" ,"slink" ,41 ,0x134 ,160000000 , mux_pllp_pllc_pllm_clkm,MUX |DIV_U71 |PERIPH_ON_APB ); +PERIPH_CLK (slink2,"spi-tegra-slink.1" ,"slink" ,44 ,0x118 ,160000000 , mux_pllp_pllc_pllm_clkm,MUX |DIV_U71 |PERIPH_ON_APB ); +PERIPH_CLK (slink3,"spi-tegra-slink.2" ,"slink" ,46 ,0x11c ,160000000 , mux_pllp_pllc_pllm_clkm,MUX |DIV_U71 |PERIPH_ON_APB ); +PERIPH_CLK (slink4,"spi-tegra-slink.3" ,"slink" ,68 ,0x1b4 ,160000000 , mux_pllp_pllc_pllm_clkm,MUX |DIV_U71 |PERIPH_ON_APB ); +PERIPH_CLK (slink5,"spi-tegra-slink.4" ,"slink" ,104 ,0x3c8 ,160000000 , mux_pllp_pllc_pllm_clkm,MUX |DIV_U71 |PERIPH_ON_APB ); +PERIPH_CLK (slink6,"spi-tegra-slink.5" ,"slink" ,105 ,0x3cc ,160000000 , mux_pllp_pllc_pllm_clkm,MUX |DIV_U71 |PERIPH_ON_APB );PERIPH_CLK (sata_oob,"tegra_sata_oob" ,NULL ,123 ,0x420 ,216000000 , mux_pllp_pllc_pllm_clkm,MUX |DIV_U71 );PERIPH_CLK (sata,"tegra_sata" ,NULL ,124 ,0x424 ,216000000 , mux_pllp_pllc_pllm_clkm,MUX |DIV_U71 );PERIPH_CLK (sata_cold,"tegra_sata_cold" ,NULL ,129 ,0 ,48000000 , mux_clk_m,0 );
@@ -1163,12 +1163,12 @@ struct clk *tegra_list_clks[] = { &tegra_hda, &tegra_hda2codec_2x, &tegra_hda2hdmi, - &tegra_sbc1, - &tegra_sbc2, - &tegra_sbc3, - &tegra_sbc4, - &tegra_sbc5, - &tegra_sbc6, + &tegra_slink1, + &tegra_slink2, + &tegra_slink3, + &tegra_slink4, + &tegra_slink5, + &tegra_slink6, &tegra_sata_oob, &tegra_sata, &tegra_sata_cold,
@@ -1271,12 +1271,12 @@ struct clk_duplicate tegra_clk_duplicates[] = {CLK_DUPLICATE ("i2c3" ,"tegra-i2c-slave.2" ,NULL ),CLK_DUPLICATE ("i2c4" ,"tegra-i2c-slave.3" ,NULL ),CLK_DUPLICATE ("i2c5" ,"tegra-i2c-slave.4" ,NULL ), -CLK_DUPLICATE ("sbc1" ,"spi_slave_tegra.0" ,NULL ), -CLK_DUPLICATE ("sbc2" ,"spi_slave_tegra.1" ,NULL ), -CLK_DUPLICATE ("sbc3" ,"spi_slave_tegra.2" ,NULL ), -CLK_DUPLICATE ("sbc4" ,"spi_slave_tegra.3" ,NULL ), -CLK_DUPLICATE ("sbc5" ,"spi_slave_tegra.4" ,NULL ), -CLK_DUPLICATE ("sbc6" ,"spi_slave_tegra.5" ,NULL ), +CLK_DUPLICATE ("slink1" ,"spi_slave_tegra.0" ,NULL ), +CLK_DUPLICATE ("slink2" ,"spi_slave_tegra.1" ,NULL ), +CLK_DUPLICATE ("slink3" ,"spi_slave_tegra.2" ,NULL ), +CLK_DUPLICATE ("slink4" ,"spi_slave_tegra.3" ,NULL ), +CLK_DUPLICATE ("slink5" ,"spi_slave_tegra.4" ,NULL ), +CLK_DUPLICATE ("slink6" ,"spi_slave_tegra.5" ,NULL ),CLK_DUPLICATE ("twd" ,"smp_twd" ,NULL ),CLK_DUPLICATE ("vcp" ,"nvavp" ,"vcp" ), CLK_DUPLICATE("i2s0", NULL, "i2s0"),
Signature · 1 line
1.7.1.1
PATCH 4/5 ARM: tegra: dts: cardhu: enable SLINK4
In reply to Laxman DewanganEnable SLINK4 in Tegra30 based platform Cardhu.
Setting maximum spi frequency to 25MHz.
--- arch/arm/boot/dts/tegra30-cardhu.dtsi | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
arch/arm/boot/dts/tegra30-cardhu.dtsi +5 -0
@@ -275,6 +275,11 @@ }; }; + slink at 7000da00 { + status = "okay"; + spi-max-frequency = <25000000>; + }; + ahub { i2s at 70080400 { status = "okay";
Signature · 1 line
1.7.1.1
PATCH 5/5 ARM: tegra: config: enable spi driver for Tegra SLINK controller
In reply to Laxman Dewangan--- arch/arm/configs/tegra_defconfig | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/configs/tegra_defconfig +1 -1
@@ -117,7 +117,7 @@ CONFIG_I2C_MUX=y CONFIG_I2C_MUX_PINCTRL=y CONFIG_I2C_TEGRA=y CONFIG_SPI=y -CONFIG_SPI_TEGRA=y +CONFIG_SPI_TEGRA20_SLINK=y CONFIG_GPIO_PCA953X_IRQ=y CONFIG_GPIO_TPS6586X=y CONFIG_GPIO_TPS65910=y
Signature · 1 line
1.7.1.1
Re: [PATCH 1/5] ARM: tegra: Add slink controller base address
In reply to Laxman DewanganQuoted 2 lines · Laxman Dewangan
Add base address of all slink controller of Tegra20 and tegra30.
Lets not add anything to iomap.h; we're trying to remove it. Instead, just put the raw address in the AUXDATA; I assume that's the only place these defines end up being used...
Re: [PATCH 2/5] ARM: tegra: dts: add slink controller dt entry
In reply to Laxman Dewanganarch/arm/boot/dts/tegra20.dtsi line 193
Quoted 10 lines · Laxman Dewangan
Add slink controller details in the dts file of
Tegra20 and Tegra30.arch/arm/boot/dts/tegra20.dtsi +5
-0+ slink at 7000d400 { + compatible = "nvidia,tegra20-slink"; + reg = <0x7000d400 0x200>; + interrupts = <0 59 0x04>; + nvidia,dma-req-sel = <15>;
I thought the common DT DMA bindings were going to be in 3.7, and hence we could just use them here rather than inventing another custom property for this purpose?
Re: [PATCH 3/5] ARM: tegra: fix clock entry of slink controller
In reply to Laxman DewanganQuoted 3 lines · Laxman Dewangan
Fix the driver name, connection name and clock name for slink controller clocks in clock table of Tegra20 and Tegra30.
The patch subject isn't entirely accurate here; this patch isn't just about fixing clock entries.
arch/arm/mach-tegra/board-dt-tegra20.c struct of_dev_auxdata tegra20_auxdata_lookup[] __initdata = { · line 93
Quoted 7 lines
arch/arm/mach-tegra/board-dt-tegra20.c +1
-0@@ -90,6 +90,10 @@ struct of_dev_auxdata tegra20_auxdata_lookup[] __initdata = { &tegra_ehci3_pdata),OF_DEV_AUXDATA ("nvidia,tegra20-apbdma" ,TEGRA_APB_DMA_BASE ,"tegra-apbdma" ,NULL ),OF_DEV_AUXDATA ("nvidia,tegra20-pwm" ,TEGRA_PWFM_BASE ,"tegra-pwm" ,NULL ), + OF_DEV_AUXDATA("nvidia,tegra20-slink", TEGRA_SLINK1_BASE, "spi-tegra-slink.0", NULL),
Here, can't we just use the existing device names in the clock files...
So we can completely drop the changes to these two files:
arch/arm/mach-tegra/tegra30_clocks_data.c
Quoted 2 lines
arch/arm/mach-tegra/tegra20_clocks_data.c +0
-0arch/arm/mach-tegra/tegra30_clocks_data.c +0
-0
The device names will hopefully be irrelevant once we're able to use DT-based clock lookups.
Re: [PATCH 1/5] ARM: tegra: Add slink controller base address
In reply to Stephen WarrenQuoted 6 lines · Stephen Warren
Quoted 2 lines · Laxman Dewangan
Add base address of all slink controller of Tegra20 and tegra30.
Lets not add anything to
iomap.h; we're trying to remove it. Instead, just put the raw address in the AUXDATA; I assume that's the only place these defines end up being used...
OK, I will drop this change and add the base address definition in the AUXDATA file only.
Re: [PATCH 2/5] ARM: tegra: dts: add slink controller dt entry
In reply to Stephen WarrenQuoted 12 lines · Stephen Warren
arch/arm/boot/dts/tegra20.dtsi
Quoted 8 lines · Laxman Dewangan
Add slink controller details in the dts file of
Tegra20 and Tegra30.arch/arm/boot/dts/tegra20.dtsi +5
-0+ slink at 7000d400 { + compatible = "nvidia,tegra20-slink"; + reg =<0x7000d400 0x200>; + interrupts =<0 59 0x04>; + nvidia,dma-req-sel =<15>;I thought the common DT DMA bindings were going to be in 3.7, and hence we could just use them here rather than inventing another custom property for this purpose?
Adding Vinod here.
I looked the dma devicetree bingind document and did not found the generic binding name. Howvere, for arm-pl330.txt, it is explained as Example:
pdma0: pdma at 12680000 {
compatible = "arm,pl330", "arm,primecell";
reg = <0x12680000 0x1000>;
interrupts = <99>;
};Client drivers (device nodes requiring dma transfers from dev-to-mem or mem-to-dev) should specify the DMA channel numbers using a two-value pair as shown below.
[property name] = <[phandle of the dma controller] [dma request id]>;
where 'dma request id' is the dma request number which is connected to the client controller. The 'property name' is recommended to be of the form <name>-dma-channel.
Example: tx-dma-channel = <&pdma0 12>;
So here I can also add the name like same.
Vinod,
Do you see any issue in follow the above mechanism for Tegra dma client driver?
Thanks,
Laxman
Re: [PATCH 3/5] ARM: tegra: fix clock entry of slink controller
In reply to Stephen WarrenQuoted 4 lines · Stephen Warren
The patch subject isn't entirely accurate here; this patch isn't just about fixing clock entries.
OK, then will break in two patches.
Quoted 6 lines
arch/arm/mach-tegra/board-dt-tegra20.c struct of_dev_auxdata tegra20_auxdata_lookup[] __initdata = { · line 93
Quoted 2 lines
arch/arm/mach-tegra/board-dt-tegra20.c +1
-0+ OF_DEV_AUXDATA("nvidia,tegra20-slink", TEGRA_SLINK1_BASE, "spi-tegra-slink.0", NULL),Here, can't we just use the existing device names in the clock files...
So we can completely drop the changes to these two files:
I want to name the driver as spi-tegra-slink. When we add the sflash spi driver for tegra20, the driver name will be spi-tegra-sflash. Also current name is "spi_tegra" I do not want to name with "_". So it is require to convert as "-".
Quoted 4 lines
arch/arm/mach-tegra/tegra30_clocks_data.c
Quoted 2 lines
arch/arm/mach-tegra/tegra20_clocks_data.c +0
-0arch/arm/mach-tegra/tegra30_clocks_data.c +0
-0The device names will hopefully be irrelevant once we're able to use DT-based clock lookups.
Agree, but currently we can add this to have progress.
Re: [PATCH 2/5] ARM: tegra: dts: add slink controller dt entry
In reply to Laxman DewanganQuoted 12 lines · Laxman Dewangan
Quoted 10 lines · Stephen Warren
arch/arm/boot/dts/tegra20.dtsi
Quoted 9 lines · Laxman Dewangan
Add slink controller details in the dts file of
Tegra20 and Tegra30.arch/arm/boot/dts/tegra20.dtsi +5
-0+ slink at 7000d400 { + compatible = "nvidia,tegra20-slink"; + reg =<0x7000d400 0x200>; + interrupts =<0 59 0x04>; + nvidia,dma-req-sel =<15>;
(Oh, you need a space before and after the = in all the lines above)
Quoted 8 lines
Quoted 3 lines
I thought the common DT DMA bindings were going to be in 3.7, and hence we could just use them here rather than inventing another custom property for this purpose?
Adding Vinod here.
I looked the dma devicetree bingind document and did not found the generic binding name. Howvere, for arm-pl330.txt, it is explained as ...
That's not the generic bindings. I guess they didn't get merged then. I guess we can continue with custom bindings until they are.
Re: [PATCH 3/5] ARM: tegra: fix clock entry of slink controller
In reply to Laxman DewanganQuoted 4 lines · Laxman Dewangan
Quoted 2 lines · Stephen Warren
Quoted 2 lines
+ OF_DEV_AUXDATA("nvidia,tegra20-slink",
TEGRA_SLINK1_BASE,
"spi-tegra-slink.0", NULL),
Quoted 8 lines
Quoted 3 lines
Here, can't we just use the existing device names in the clock files...
So we can completely drop the changes to these two files:
I want to name the driver as spi-tegra-slink. When we add the sflash spi driver for tegra20, the driver name will be spi-tegra-sflash. Also current name is "
spi_tegra" I do not want to name with "_". So it is require to convert as "-".
The driver name is whatever you put into the driver file. The AUXDATA only affects the device name. There should be no conflict with the "sflash" driver, since that clock is set up to expect driver name "spi" which doesn't conflict with "spi_tegra.*".
So, there's really no point in churning the clock names any more, especially since it's temporary. If you feel strongly about this, the best thing to do is help push Tegra's support of DT clock bindings forward.
Re: [PATCH 2/5] ARM: tegra: dts: add slink controller dt entry
In reply to Stephen WarrenQuoted 20 lines · Stephen Warren
Quoted 12 lines · Laxman Dewangan
Quoted 10 lines · Stephen Warren
arch/arm/boot/dts/tegra20.dtsi
Quoted 9 lines · Laxman Dewangan
Add slink controller details in the dts file of
Tegra20 and Tegra30.arch/arm/boot/dts/tegra20.dtsi +5
-0+ slink at 7000d400 { + compatible = "nvidia,tegra20-slink"; + reg =<0x7000d400 0x200>; + interrupts =<0 59 0x04>; + nvidia,dma-req-sel =<15>;(Oh, you need a space before and after the = in all the lines above)
Quoted 4 lines
Quoted 3 lines
I thought the common DT DMA bindings were going to be in 3.7, and hence we could just use them here rather than inventing another custom property for this purpose?
Quoted 7 lines
Quoted 4 lines
Adding Vinod here.
I looked the dma devicetree bingind document and did not found the generic binding name. Howvere, for arm-pl330.txt, it is explained as ...
That's not the generic bindings. I guess they didn't get merged then. I guess we can continue with custom bindings until they are.
Yes they are in topic topic/dmaengine_dt in my tree. Will be merged once we sort out slave apis.
Signature · 2 lines
Vinod Koul Intel Corp.