* [PATCH 1/4] ARM: tegra: add I2C controllers to Tegra124 DT
@ 2013-12-04 22:26 Stephen Warren
2013-12-04 22:26 ` [PATCH 2/4] ARM: tegra: enable I2C controllers on Venice2 Stephen Warren
` (4 more replies)
0 siblings, 5 replies; 9+ messages in thread
From: Stephen Warren @ 2013-12-04 22:26 UTC (permalink / raw)
To: linux-arm-kernel
From: Stephen Warren <swarren@nvidia.com>
Tegra124 has 6 I2C controllers. The first 5 have identical configuration
to Tegra114, but the sixth obviously has different interrupt/... IDs.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
arch/arm/boot/dts/tegra124.dtsi | 90 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 90 insertions(+)
diff --git a/arch/arm/boot/dts/tegra124.dtsi b/arch/arm/boot/dts/tegra124.dtsi
index 200373236aaa..7017e7ae0176 100644
--- a/arch/arm/boot/dts/tegra124.dtsi
+++ b/arch/arm/boot/dts/tegra124.dtsi
@@ -176,6 +176,96 @@
status = "disabled";
};
+ i2c at 7000c000 {
+ compatible = "nvidia,tegra114-i2c";
+ reg = <0x7000c000 0x100>;
+ interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ clocks = <&tegra_car TEGRA124_CLK_I2C1>;
+ clock-names = "div-clk";
+ resets = <&tegra_car 12>;
+ reset-names = "i2c";
+ dmas = <&apbdma 21>, <&apbdma 21>;
+ dma-names = "rx", "tx";
+ status = "disabled";
+ };
+
+ i2c at 7000c400 {
+ compatible = "nvidia,tegra114-i2c";
+ reg = <0x7000c400 0x100>;
+ interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ clocks = <&tegra_car TEGRA124_CLK_I2C2>;
+ clock-names = "div-clk";
+ resets = <&tegra_car 54>;
+ reset-names = "i2c";
+ dmas = <&apbdma 22>, <&apbdma 22>;
+ dma-names = "rx", "tx";
+ status = "disabled";
+ };
+
+ i2c at 7000c500 {
+ compatible = "nvidia,tegra114-i2c";
+ reg = <0x7000c500 0x100>;
+ interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ clocks = <&tegra_car TEGRA124_CLK_I2C3>;
+ clock-names = "div-clk";
+ resets = <&tegra_car 67>;
+ reset-names = "i2c";
+ dmas = <&apbdma 23>, <&apbdma 23>;
+ dma-names = "rx", "tx";
+ status = "disabled";
+ };
+
+ i2c at 7000c700 {
+ compatible = "nvidia,tegra114-i2c";
+ reg = <0x7000c700 0x100>;
+ interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ clocks = <&tegra_car TEGRA124_CLK_I2C4>;
+ clock-names = "div-clk";
+ resets = <&tegra_car 103>;
+ reset-names = "i2c";
+ dmas = <&apbdma 26>, <&apbdma 26>;
+ dma-names = "rx", "tx";
+ status = "disabled";
+ };
+
+ i2c at 7000d000 {
+ compatible = "nvidia,tegra114-i2c";
+ reg = <0x7000d000 0x100>;
+ interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ clocks = <&tegra_car TEGRA124_CLK_I2C5>;
+ clock-names = "div-clk";
+ resets = <&tegra_car 47>;
+ reset-names = "i2c";
+ dmas = <&apbdma 24>, <&apbdma 24>;
+ dma-names = "rx", "tx";
+ status = "disabled";
+ };
+
+ i2c at 7000d100 {
+ compatible = "nvidia,tegra114-i2c";
+ reg = <0x7000d100 0x100>;
+ interrupts = <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ clocks = <&tegra_car TEGRA124_CLK_I2C6>;
+ clock-names = "div-clk";
+ resets = <&tegra_car 166>;
+ reset-names = "i2c";
+ dmas = <&apbdma 30>, <&apbdma 30>;
+ dma-names = "rx", "tx";
+ status = "disabled";
+ };
+
rtc at 7000e000 {
compatible = "nvidia,tegra124-rtc", "nvidia,tegra20-rtc";
reg = <0x7000e000 0x100>;
--
1.8.1.5
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH 2/4] ARM: tegra: enable I2C controllers on Venice2 2013-12-04 22:26 [PATCH 1/4] ARM: tegra: add I2C controllers to Tegra124 DT Stephen Warren @ 2013-12-04 22:26 ` Stephen Warren 2013-12-06 15:20 ` Thierry Reding 2013-12-04 22:26 ` [PATCH 3/4] ARM: tegra: add audio-related device to Tegra124 DT Stephen Warren ` (3 subsequent siblings) 4 siblings, 1 reply; 9+ messages in thread From: Stephen Warren @ 2013-12-04 22:26 UTC (permalink / raw) To: linux-arm-kernel From: Stephen Warren <swarren@nvidia.com> Enable all the I2C controllers that are wired up on Venice2. I don't know the correct I2C bus clock rates, so set them all to a conservative 100KHz for now. Signed-off-by: Stephen Warren <swarren@nvidia.com> --- arch/arm/boot/dts/tegra124-venice2.dts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/arch/arm/boot/dts/tegra124-venice2.dts b/arch/arm/boot/dts/tegra124-venice2.dts index 098d0b2081bf..7aa711b7b4e3 100644 --- a/arch/arm/boot/dts/tegra124-venice2.dts +++ b/arch/arm/boot/dts/tegra124-venice2.dts @@ -14,6 +14,31 @@ status = "okay"; }; + i2c at 7000c000 { + status = "okay"; + clock-frequency = <100000>; + }; + + i2c at 7000c400 { + status = "okay"; + clock-frequency = <100000>; + }; + + i2c at 7000c500 { + status = "okay"; + clock-frequency = <100000>; + }; + + i2c at 7000c700 { + status = "okay"; + clock-frequency = <100000>; + }; + + i2c at 7000d000 { + status = "okay"; + clock-frequency = <100000>; + }; + pmc at 7000e400 { nvidia,invert-interrupt; nvidia,suspend-mode = <1>; -- 1.8.1.5 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/4] ARM: tegra: enable I2C controllers on Venice2 2013-12-04 22:26 ` [PATCH 2/4] ARM: tegra: enable I2C controllers on Venice2 Stephen Warren @ 2013-12-06 15:20 ` Thierry Reding 2013-12-06 17:42 ` Stephen Warren 0 siblings, 1 reply; 9+ messages in thread From: Thierry Reding @ 2013-12-06 15:20 UTC (permalink / raw) To: linux-arm-kernel On Wed, Dec 04, 2013 at 03:26:54PM -0700, Stephen Warren wrote: > From: Stephen Warren <swarren@nvidia.com> > > Enable all the I2C controllers that are wired up on Venice2. I don't > know the correct I2C bus clock rates, so set them all to a conservative > 100KHz for now. Perhaps we should only enable those that we really need? I currently use these in my local tree: i2c at 7000c400: for the trackpad i2c at 7000c700: for HDMI DDC i2c at 7000d000: for the PMIC Thierry -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20131206/8cc4792e/attachment.sig> ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 2/4] ARM: tegra: enable I2C controllers on Venice2 2013-12-06 15:20 ` Thierry Reding @ 2013-12-06 17:42 ` Stephen Warren 0 siblings, 0 replies; 9+ messages in thread From: Stephen Warren @ 2013-12-06 17:42 UTC (permalink / raw) To: linux-arm-kernel On 12/06/2013 08:20 AM, Thierry Reding wrote: > On Wed, Dec 04, 2013 at 03:26:54PM -0700, Stephen Warren wrote: >> From: Stephen Warren <swarren@nvidia.com> >> >> Enable all the I2C controllers that are wired up on Venice2. I >> don't know the correct I2C bus clock rates, so set them all to a >> conservative 100KHz for now. > > Perhaps we should only enable those that we really need? I > currently use these in my local tree: > > i2c at 7000c400: for the trackpad i2c at 7000c700: for HDMI DDC > i2c at 7000d000: for the PMIC All of these I2C buses are used for something. Missing from your list are e.g.: i2c at 7000c000 Audio CODEC, temperature sensor i2c at 7000c500 TPM ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 3/4] ARM: tegra: add audio-related device to Tegra124 DT 2013-12-04 22:26 [PATCH 1/4] ARM: tegra: add I2C controllers to Tegra124 DT Stephen Warren 2013-12-04 22:26 ` [PATCH 2/4] ARM: tegra: enable I2C controllers on Venice2 Stephen Warren @ 2013-12-04 22:26 ` Stephen Warren 2013-12-04 22:26 ` [PATCH 4/4] ARM: tegra: add sound card to Venice2 DT Stephen Warren ` (2 subsequent siblings) 4 siblings, 0 replies; 9+ messages in thread From: Stephen Warren @ 2013-12-04 22:26 UTC (permalink / raw) To: linux-arm-kernel From: Stephen Warren <swarren@nvidia.com> Tegra124 contains a similar set of audio devices to previous Tegra chips. Specifically, there is an AHUB device which contains DMA FIFOs and audio routing, and which hosts various audio-related components such as I2S controllers. Signed-off-by: Stephen Warren <swarren@nvidia.com> --- arch/arm/boot/dts/tegra124.dtsi | 103 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) diff --git a/arch/arm/boot/dts/tegra124.dtsi b/arch/arm/boot/dts/tegra124.dtsi index 7017e7ae0176..05e9939b4b7c 100644 --- a/arch/arm/boot/dts/tegra124.dtsi +++ b/arch/arm/boot/dts/tegra124.dtsi @@ -320,6 +320,109 @@ status = "disable"; }; + ahub at 70300000 { + compatible = "nvidia,tegra124-ahub"; + reg = <0x70300000 0x200>, + <0x70300800 0x800>, + <0x70300200 0x600>; + interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&tegra_car TEGRA124_CLK_D_AUDIO>, + <&tegra_car TEGRA124_CLK_APBIF>; + clock-names = "d_audio", "apbif"; + resets = <&tegra_car 106>, /* d_audio */ + <&tegra_car 107>, /* apbif */ + <&tegra_car 30>, /* i2s0 */ + <&tegra_car 11>, /* i2s1 */ + <&tegra_car 18>, /* i2s2 */ + <&tegra_car 101>, /* i2s3 */ + <&tegra_car 102>, /* i2s4 */ + <&tegra_car 108>, /* dam0 */ + <&tegra_car 109>, /* dam1 */ + <&tegra_car 110>, /* dam2 */ + <&tegra_car 10>, /* spdif */ + <&tegra_car 153>, /* amx */ + <&tegra_car 185>, /* amx1 */ + <&tegra_car 154>, /* adx */ + <&tegra_car 180>, /* adx1 */ + <&tegra_car 186>, /* afc0 */ + <&tegra_car 187>, /* afc1 */ + <&tegra_car 188>, /* afc2 */ + <&tegra_car 189>, /* afc3 */ + <&tegra_car 190>, /* afc4 */ + <&tegra_car 191>; /* afc5 */ + reset-names = "d_audio", "apbif", "i2s0", "i2s1", "i2s2", + "i2s3", "i2s4", "dam0", "dam1", "dam2", + "spdif", "amx", "amx1", "adx", "adx1", + "afc0", "afc1", "afc2", "afc3", "afc4", "afc5"; + dmas = <&apbdma 1>, <&apbdma 1>, + <&apbdma 2>, <&apbdma 2>, + <&apbdma 3>, <&apbdma 3>, + <&apbdma 4>, <&apbdma 4>, + <&apbdma 6>, <&apbdma 6>, + <&apbdma 7>, <&apbdma 7>, + <&apbdma 12>, <&apbdma 12>, + <&apbdma 13>, <&apbdma 13>, + <&apbdma 14>, <&apbdma 14>, + <&apbdma 29>, <&apbdma 29>; + dma-names = "rx0", "tx0", "rx1", "tx1", "rx2", "tx2", + "rx3", "tx3", "rx4", "tx4", "rx5", "tx5", + "rx6", "tx6", "rx7", "tx7", "rx8", "tx8", + "rx9", "tx9"; + ranges; + #address-cells = <1>; + #size-cells = <1>; + + tegra_i2s0: i2s at 70301000 { + compatible = "nvidia,tegra124-i2s"; + reg = <0x70301000 0x100>; + nvidia,ahub-cif-ids = <4 4>; + clocks = <&tegra_car TEGRA124_CLK_I2S0>; + resets = <&tegra_car 30>; + reset-names = "i2s"; + status = "disabled"; + }; + + tegra_i2s1: i2s at 70301100 { + compatible = "nvidia,tegra124-i2s"; + reg = <0x70301100 0x100>; + nvidia,ahub-cif-ids = <5 5>; + clocks = <&tegra_car TEGRA124_CLK_I2S1>; + resets = <&tegra_car 11>; + reset-names = "i2s"; + status = "disabled"; + }; + + tegra_i2s2: i2s at 70301200 { + compatible = "nvidia,tegra124-i2s"; + reg = <0x70301200 0x100>; + nvidia,ahub-cif-ids = <6 6>; + clocks = <&tegra_car TEGRA124_CLK_I2S2>; + resets = <&tegra_car 18>; + reset-names = "i2s"; + status = "disabled"; + }; + + tegra_i2s3: i2s at 70301300 { + compatible = "nvidia,tegra124-i2s"; + reg = <0x70301300 0x100>; + nvidia,ahub-cif-ids = <7 7>; + clocks = <&tegra_car TEGRA124_CLK_I2S3>; + resets = <&tegra_car 101>; + reset-names = "i2s"; + status = "disabled"; + }; + + tegra_i2s4: i2s at 70301400 { + compatible = "nvidia,tegra124-i2s"; + reg = <0x70301400 0x100>; + nvidia,ahub-cif-ids = <8 8>; + clocks = <&tegra_car TEGRA124_CLK_I2S4>; + resets = <&tegra_car 102>; + reset-names = "i2s"; + status = "disabled"; + }; + }; + cpus { #address-cells = <1>; #size-cells = <0>; -- 1.8.1.5 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 4/4] ARM: tegra: add sound card to Venice2 DT 2013-12-04 22:26 [PATCH 1/4] ARM: tegra: add I2C controllers to Tegra124 DT Stephen Warren 2013-12-04 22:26 ` [PATCH 2/4] ARM: tegra: enable I2C controllers on Venice2 Stephen Warren 2013-12-04 22:26 ` [PATCH 3/4] ARM: tegra: add audio-related device to Tegra124 DT Stephen Warren @ 2013-12-04 22:26 ` Stephen Warren 2013-12-06 14:03 ` [PATCH 1/4] ARM: tegra: add I2C controllers to Tegra124 DT Thierry Reding 2013-12-12 19:44 ` Stephen Warren 4 siblings, 0 replies; 9+ messages in thread From: Stephen Warren @ 2013-12-04 22:26 UTC (permalink / raw) To: linux-arm-kernel From: Stephen Warren <swarren@nvidia.com> Venice2 uses the MAX98090 audio CODEC, and supports built-in speakers, and a combo headphones/microphone jack. Add a top-level sound card node to represent this. Signed-off-by: Stephen Warren <swarren@nvidia.com> --- arch/arm/boot/dts/tegra124-venice2.dts | 35 ++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/arch/arm/boot/dts/tegra124-venice2.dts b/arch/arm/boot/dts/tegra124-venice2.dts index 7aa711b7b4e3..89690238f3ff 100644 --- a/arch/arm/boot/dts/tegra124-venice2.dts +++ b/arch/arm/boot/dts/tegra124-venice2.dts @@ -17,6 +17,13 @@ i2c at 7000c000 { status = "okay"; clock-frequency = <100000>; + + acodec: audio-codec at 10 { + compatible = "maxim,max98090"; + reg = <0x10>; + interrupt-parent = <&gpio>; + interrupts = <TEGRA_GPIO(H, 4) GPIO_ACTIVE_HIGH>; + }; }; i2c at 7000c400 { @@ -62,6 +69,12 @@ bus-width = <8>; }; + ahub at 70300000 { + i2s at 70301100 { + status = "okay"; + }; + }; + clocks { compatible = "simple-bus"; #address-cells = <1>; @@ -74,4 +87,26 @@ clock-frequency = <32768>; }; }; + + sound { + compatible = "nvidia,tegra-audio-max98090-venice2", + "nvidia,tegra-audio-max98090"; + nvidia,model = "NVIDIA Tegra Venice2"; + + nvidia,audio-routing = + "Headphones", "HPR", + "Headphones", "HPL", + "Speakers", "SPKR", + "Speakers", "SPKL", + "Mic Jack", "MICBIAS", + "IN34", "Mic Jack"; + + nvidia,i2s-controller = <&tegra_i2s1>; + nvidia,audio-codec = <&acodec>; + + clocks = <&tegra_car TEGRA124_CLK_PLL_A>, + <&tegra_car TEGRA124_CLK_PLL_A_OUT0>, + <&tegra_car TEGRA124_CLK_EXTERN1>; + clock-names = "pll_a", "pll_a_out0", "mclk"; + }; }; -- 1.8.1.5 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 1/4] ARM: tegra: add I2C controllers to Tegra124 DT 2013-12-04 22:26 [PATCH 1/4] ARM: tegra: add I2C controllers to Tegra124 DT Stephen Warren ` (2 preceding siblings ...) 2013-12-04 22:26 ` [PATCH 4/4] ARM: tegra: add sound card to Venice2 DT Stephen Warren @ 2013-12-06 14:03 ` Thierry Reding 2013-12-06 17:36 ` Stephen Warren 2013-12-12 19:44 ` Stephen Warren 4 siblings, 1 reply; 9+ messages in thread From: Thierry Reding @ 2013-12-06 14:03 UTC (permalink / raw) To: linux-arm-kernel On Wed, Dec 04, 2013 at 03:26:53PM -0700, Stephen Warren wrote: [...] > diff --git a/arch/arm/boot/dts/tegra124.dtsi b/arch/arm/boot/dts/tegra124.dtsi [...] > @@ -176,6 +176,96 @@ > status = "disabled"; > }; > > + i2c at 7000c000 { > + compatible = "nvidia,tegra114-i2c"; Aren't we supposed to always list the most specific compatible as well, just in case we ever need to implement a specific quirk in the future? So this would become: compatible = "nvidia,tegra124-i2c", "nvidia,tegra114-i2c"; Other than that, this is identical to a local patch that I have (minus the reset* and dma* properties). Thierry -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20131206/2f9dd0bd/attachment.sig> ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/4] ARM: tegra: add I2C controllers to Tegra124 DT 2013-12-06 14:03 ` [PATCH 1/4] ARM: tegra: add I2C controllers to Tegra124 DT Thierry Reding @ 2013-12-06 17:36 ` Stephen Warren 0 siblings, 0 replies; 9+ messages in thread From: Stephen Warren @ 2013-12-06 17:36 UTC (permalink / raw) To: linux-arm-kernel On 12/06/2013 07:03 AM, Thierry Reding wrote: > On Wed, Dec 04, 2013 at 03:26:53PM -0700, Stephen Warren wrote: > [...] >> diff --git a/arch/arm/boot/dts/tegra124.dtsi b/arch/arm/boot/dts/tegra124.dtsi > [...] >> @@ -176,6 +176,96 @@ >> status = "disabled"; >> }; >> >> + i2c at 7000c000 { >> + compatible = "nvidia,tegra114-i2c"; > > Aren't we supposed to always list the most specific compatible as well, > just in case we ever need to implement a specific quirk in the future? > > So this would become: > > compatible = "nvidia,tegra124-i2c", "nvidia,tegra114-i2c"; Oops yes, I'll fix that up. ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/4] ARM: tegra: add I2C controllers to Tegra124 DT 2013-12-04 22:26 [PATCH 1/4] ARM: tegra: add I2C controllers to Tegra124 DT Stephen Warren ` (3 preceding siblings ...) 2013-12-06 14:03 ` [PATCH 1/4] ARM: tegra: add I2C controllers to Tegra124 DT Thierry Reding @ 2013-12-12 19:44 ` Stephen Warren 4 siblings, 0 replies; 9+ messages in thread From: Stephen Warren @ 2013-12-12 19:44 UTC (permalink / raw) To: linux-arm-kernel On 12/04/2013 03:26 PM, Stephen Warren wrote: > Tegra124 has 6 I2C controllers. The first 5 have identical configuration > to Tegra114, but the sixth obviously has different interrupt/... IDs. I've applied this series to Tegra's for-3.14/dt branch. ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2013-12-12 19:44 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-12-04 22:26 [PATCH 1/4] ARM: tegra: add I2C controllers to Tegra124 DT Stephen Warren 2013-12-04 22:26 ` [PATCH 2/4] ARM: tegra: enable I2C controllers on Venice2 Stephen Warren 2013-12-06 15:20 ` Thierry Reding 2013-12-06 17:42 ` Stephen Warren 2013-12-04 22:26 ` [PATCH 3/4] ARM: tegra: add audio-related device to Tegra124 DT Stephen Warren 2013-12-04 22:26 ` [PATCH 4/4] ARM: tegra: add sound card to Venice2 DT Stephen Warren 2013-12-06 14:03 ` [PATCH 1/4] ARM: tegra: add I2C controllers to Tegra124 DT Thierry Reding 2013-12-06 17:36 ` Stephen Warren 2013-12-12 19:44 ` Stephen Warren
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).