ARM: DT: tegra114: add dt entry for gpio/pinmux/dma/i2c/serial/kbc
cover ARM: DT: tegra114: add dt entry for gpio/pinmux/dma/i2c/serial/kbc
This series add DT entry for the NVIDIA's Tegra114 SoCs for the following controller:
- GPIO controller
- DMA controller.
- Pinmux controller.
- I2c controller.
- KBC controler.
Also add dma requestor and aliases for serial channel.
Laxman Dewangan (7):
ARM: tegra114: select PINCTRL for Tegra114 SoC
ARM: DT: tegra114: add GPIO DT entry
ARM: DT: tegra114: add APB DMA controller DT entry
ARM: DT: tegra114: add pinmux DT entry
ARM: DT: tegra114: Add i2c controller DT entry
ARM: DT: tegra114:add aliases and DMA requestor for serial controller
ARM: DT: tegra114: add KBC controller DT entry
arch/arm/boot/dts/tegra114.dtsi | 139 +++++++++++++++++++++++++++++++++++++- arch/arm/mach-tegra/Kconfig | 2 + 2 files changed, 137 insertions(+), 4 deletions(-)
PATCH 1/7 ARM: tegra114: select PINCTRL for Tegra114 SoC
Select PINCTRL and PINCTRL_TEGRA114 for enabling Tegra114 pincontrol driver for Tegra114 SoC.
--- arch/arm/mach-tegra/Kconfig | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/mach-tegra/Kconfig +2 -0
@@ -51,6 +51,8 @@ config ARCH_TEGRA_114_SOC select CPU_V7 select ARM_L1_CACHE_SHIFT_6 select ARM_ARCH_TIMER + select PINCTRL + select PINCTRL_TEGRA114 help Support for NVIDIA Tegra T114 processor family, based on the ARM CortexA15MP CPU
Signature · 1 line
1.7.1.1
PATCH 2/7 ARM: DT: tegra114: add GPIO DT entry
In reply to Laxman DewanganTegra114 has the GPIO controllers with 8 GPIO bank and each bank supports 32 pins.
Add DT entry for GPIO controller. Tegra114 GPIO controller is compatible with Tegra30 GPIO controller driver.
--- arch/arm/boot/dts/tegra114.dtsi | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-)
arch/arm/boot/dts/tegra114.dtsi +17 -0
@@ -37,6 +37,23 @@ reg = <0x6000c004 0x14c>; }; + gpio: gpio { + compatible = "nvidia,tegra114-gpio", "nvidia,tegra30-gpio"; + reg = <0x6000d000 0x1000>; + interrupts = <0 32 0x04 + 0 33 0x04 + 0 34 0x04 + 0 35 0x04 + 0 55 0x04 + 0 87 0x04 + 0 89 0x04 + 0 125 0x04>; + #gpio-cells = <2>; + gpio-controller; + #interrupt-cells = <2>; + interrupt-controller; + }; + serial at 70006000 { compatible = "nvidia,tegra114-uart", "nvidia,tegra20-uart"; reg = <0x70006000 0x40>;
Signature · 1 line
1.7.1.1
PATCH 3/7 ARM: DT: tegra114: add APB DMA controller DT entry
In reply to Laxman DewanganNVIDIA's Tegra114 has 32 channels APB DMA controller. Add DT entry for APB DMA controllers and make it compatible with "nvidia,tegra114-apbdma".
--- arch/arm/boot/dts/tegra114.dtsi | 37 +++++++++++++++++++++++++++++++++++++ 1 files changed, 37 insertions(+), 0 deletions(-)
arch/arm/boot/dts/tegra114.dtsi +37 -0
@@ -37,6 +37,43 @@ reg = <0x6000c004 0x14c>; }; + apbdma: dma { + compatible = "nvidia,tegra114-apbdma"; + reg = <0x6000a000 0x1400>; + interrupts = <0 104 0x04 + 0 105 0x04 + 0 106 0x04 + 0 107 0x04 + 0 108 0x04 + 0 109 0x04 + 0 110 0x04 + 0 111 0x04 + 0 112 0x04 + 0 113 0x04 + 0 114 0x04 + 0 115 0x04 + 0 116 0x04 + 0 117 0x04 + 0 118 0x04 + 0 119 0x04 + 0 128 0x04 + 0 129 0x04 + 0 130 0x04 + 0 131 0x04 + 0 132 0x04 + 0 133 0x04 + 0 134 0x04 + 0 135 0x04 + 0 136 0x04 + 0 137 0x04 + 0 138 0x04 + 0 139 0x04 + 0 140 0x04 + 0 141 0x04 + 0 142 0x04 + 0 143 0x04>; + }; + gpio: gpio { compatible = "nvidia,tegra114-gpio", "nvidia,tegra30-gpio"; reg = <0x6000d000 0x1000>;
Signature · 1 line
1.7.1.1
Re: [PATCH 3/7] ARM: DT: tegra114: add APB DMA controller DT entry
Quoted 2 lines · Laxman Dewangan
NVIDIA's Tegra114 has 32 channels APB DMA controller. Add DT entry for APB DMA controllers and make it compatible with "nvidia,tegra114-apbdma".
The APB DMA controller node needs a clocks property. The same goes for I2C and KBC. I'd like to avoid merging those 3 patches until the Tegra114 clock patches are present, since the nodes won't be useful until then anyway. I expect the clock patches will be merged in 3.10.
Related, the I2C driver appears to need updates since the HW isn't 100% backwards-compatible. I would prefer not to apply the patch adding DT nodes for I2C until the relevant driver patches are also posted and checked in. That said, Wolfram said he applied the Tegra114 I2C patch on 1/24, although I don't see it in next-20130128; perhaps he simply didn't push out his next branch to the git server yet?
I think the other patches are all OK, so I'll apply them to Tegra's for-3.9/soc-t114 branch.
Re: [PATCH 3/7] ARM: DT: tegra114: add APB DMA controller DT entry
Quoted 8 lines · Stephen Warren
Quoted 2 lines · Laxman Dewangan
NVIDIA's Tegra114 has 32 channels APB DMA controller. Add DT entry for APB DMA controllers and make it compatible with "nvidia,tegra114-apbdma".
The APB DMA controller node needs a clocks property. The same goes for I2C and KBC. I'd like to avoid merging those 3 patches until the Tegra114 clock patches are present, since the nodes won't be useful until then anyway. I expect the clock patches will be merged in 3.10.
I think clock patches can be posted on top of this as Peter is working. Although, the driver will fail in clk_get() but still I think this can be apply to populate the dts file with controller specific information.
Re: [PATCH 3/7] ARM: DT: tegra114: add APB DMA controller DT entry
Quoted 5 lines · Laxman Dewangan
Quoted 4 lines · Stephen Warren
Quoted 3 lines · Laxman Dewangan
NVIDIA's Tegra114 has 32 channels APB DMA controller. Add DT entry for APB DMA controllers and make it compatible with "nvidia,tegra114-apbdma".
Quoted 8 lines
Quoted 4 lines
The APB DMA controller node needs a clocks property. The same goes for I2C and KBC. I'd like to avoid merging those 3 patches until the Tegra114 clock patches are present, since the nodes won't be useful until then anyway. I expect the clock patches will be merged in 3.10.
I think clock patches can be posted on top of this as Peter is working. Although, the driver will fail in
clk_get()but still I think this can be apply to populate the dts file with controller specific information.
While it would be physically possible for me to apply these patches now and rely on Peter to add the clocks properties later, there's no point in doing so, since as you say the drivers won't work with just these patches. There will be less churn if we simply wait for the Tegra114 clock driver first, and then apply patches to add complete and working DT nodes for all the devices.
PATCH 4/7 ARM: DT: tegra114: add pinmux DT entry
In reply to Laxman DewanganAdd DT entry for pinmux and drive configuration addresses.
--- arch/arm/boot/dts/tegra114.dtsi | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
arch/arm/boot/dts/tegra114.dtsi +6 -0
@@ -91,6 +91,12 @@ interrupt-controller; }; + pinmux: pinmux { + compatible = "nvidia,tegra114-pinmux"; + reg = <0x70000868 0x148 /* Pad control registers */ + 0x70003000 0x40c>; /* Mux registers */ + }; + serial at 70006000 { compatible = "nvidia,tegra114-uart", "nvidia,tegra20-uart"; reg = <0x70006000 0x40>;
Signature · 1 line
1.7.1.1
PATCH 5/7 ARM: DT: tegra114: Add i2c controller DT entry
In reply to Laxman DewanganNVIDIA's Tegra114 has 5 i2c controllers. These controllers have additional feature/configurations to make it functional over Tegra30's i2c controller driver.
Add DT entry for i2c controllers and make it compatible with "nvidia,tegra114-i2c".
--- arch/arm/boot/dts/tegra114.dtsi | 45 +++++++++++++++++++++++++++++++++++++++ 1 files changed, 45 insertions(+), 0 deletions(-)
arch/arm/boot/dts/tegra114.dtsi +45 -0
@@ -129,6 +129,51 @@ status = "disabled"; }; + i2c at 7000c000 { + compatible = "nvidia,tegra114-i2c"; + reg = <0x7000c000 0x100>; + interrupts = <0 38 0x04>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + i2c at 7000c400 { + compatible = "nvidia,tegra114-i2c"; + reg = <0x7000c400 0x100>; + interrupts = <0 84 0x04>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + i2c at 7000c500 { + compatible = "nvidia,tegra114-i2c"; + reg = <0x7000c500 0x100>; + interrupts = <0 92 0x04>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + i2c at 7000c700 { + compatible = "nvidia,tegra114-i2c"; + reg = <0x7000c700 0x100>; + interrupts = <0 120 0x04>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + i2c at 7000d000 { + compatible = "nvidia,tegra114-i2c"; + reg = <0x7000d000 0x100>; + interrupts = <0 53 0x04>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + rtc { compatible = "nvidia,tegra114-rtc", "nvidia,tegra20-rtc"; reg = <0x7000e000 0x100>;
Signature · 1 line
1.7.1.1
PATCH 6/7 ARM: DT: tegra114:add aliases and DMA requestor for serial controller
In reply to Laxman DewanganAdd APB DMA requestor and serial aliases for serial controller. There will be two serial driver i.e. 8250 based simple serial driver and APB DMA based serial driver for higher baudrate and performace.
The simple serial driver get enabled with compatible nvidia,tegra20-uart and APB DMA based driver will get enabled with compatible nvidia,tegra30-hsuart.
--- arch/arm/boot/dts/tegra114.dtsi | 27 +++++++++++++++++++++++---- 1 files changed, 23 insertions(+), 4 deletions(-)
arch/arm/boot/dts/tegra114.dtsi +23 -4
@@ -4,6 +4,13 @@ compatible = "nvidia,tegra114"; interrupt-parent = <&gic>; + aliases { + serial0 = &uarta; + serial1 = &uartb; + serial2 = &uartc; + serial3 = &uartd; + }; + gic: interrupt-controller { compatible = "arm,cortex-a15-gic"; #interrupt-cells = <3>;
@@ -97,35 +104,47 @@ 0x70003000 0x40c>; /* Mux registers */ }; - serial at 70006000 { + /* + * There are two serial driver i.e. 8250 based simple serial + * driver and APB DMA based serial driver for higher baudrate + * and performace. To enable the 8250 based driver, the compatible + * is "nvidia,tegra30-uart", "nvidia,tegra20-uart" and to enable + * the APB DMA based serial driver, the comptible is + * "nvidia,tegra30-hsuart", "nvidia,tegra20-hsuart". + */ + uarta: serial at 70006000 { compatible = "nvidia,tegra114-uart", "nvidia,tegra20-uart"; reg = <0x70006000 0x40>; reg-shift = <2>; interrupts = <0 36 0x04>; + nvidia,dma-request-selector = <&apbdma 8>; status = "disabled"; }; - serial at 70006040 { + uartb: serial at 70006040 { compatible = "nvidia,tegra114-uart", "nvidia,tegra20-uart"; reg = <0x70006040 0x40>; reg-shift = <2>; interrupts = <0 37 0x04>; + nvidia,dma-request-selector = <&apbdma 9>; status = "disabled"; }; - serial at 70006200 { + uartc: serial at 70006200 { compatible = "nvidia,tegra114-uart", "nvidia,tegra20-uart"; reg = <0x70006200 0x100>; reg-shift = <2>; interrupts = <0 46 0x04>; + nvidia,dma-request-selector = <&apbdma 10>; status = "disabled"; }; - serial at 70006300 { + uartd: serial at 70006300 { compatible = "nvidia,tegra114-uart", "nvidia,tegra20-uart"; reg = <0x70006300 0x100>; reg-shift = <2>; interrupts = <0 90 0x04>; + nvidia,dma-request-selector = <&apbdma 19>; status = "disabled"; };
Signature · 1 line
1.7.1.1
Re: [PATCH 6/7] ARM: DT: tegra114:add aliases and DMA requestor for serial controller
Quoted 7 lines · Laxman Dewangan
Add APB DMA requestor and serial aliases for serial controller. There will be two serial driver i.e. 8250 based simple serial driver and APB DMA based serial driver for higher baudrate and performace.
The simple serial driver get enabled with compatible nvidia,tegra20-uart and APB DMA based driver will get enabled with compatible nvidia,tegra30-hsuart.
I also can't apply this patch yet since it depends on the APB DMA DT node which as I mentioned I'm not apply yet.
PATCH 7/7 ARM: DT: tegra114: add KBC controller DT entry
In reply to Laxman DewanganNVIDIA's Tegra114 SoCs have the matrix keyboard controller which supports 11x8 type of matrix. The number of rows and columns are configurable.
Add DT entry for KBC controller.
--- arch/arm/boot/dts/tegra114.dtsi | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
arch/arm/boot/dts/tegra114.dtsi +7 -0
@@ -199,6 +199,13 @@ interrupts = <0 2 0x04>; }; + kbc { + compatible = "nvidia,tegra20-kbc"; + reg = <0x7000e200 0x100>; + interrupts = <0 85 0x04>; + status = "disabled"; + }; + pmc { compatible = "nvidia,tegra114-pmc", "nvidia,tegra30-pmc"; reg = <0x7000e400 0x400>;
Signature · 1 line
1.7.1.1