Skip to contentSkip to conversation

ARM: dts: cm-t335: add peripherals - part 2

PATCH New Uri Mashiach 2 participants 6 messages Dec 30, 2015 – Jan 27, 2016 Device tree bindings

lore
Share & tools
lore
#0 lore raw

cover ARM: dts: cm-t335: add peripherals - part 2

Add support for the following peripherals:
- CAN BUS
- Touchscreen
- Audio

Uri Mashiach (3):
ARM: dts: cm-t335: Add support for CAN bus
ARM: dts: cm-t335: add touchscreen support
ARM: dts: cm-t335: add audio support

 arch/arm/boot/dts/am335x-cm-t335.dts | 116 +++++++++++++++++++++++++++++++++++
 1 file changed, 116 insertions(+)
Signature · 1 line
2.5.0
#1 lore raw

PATCH 1/3 ARM: dts: cm-t335: Add support for CAN bus

Add CAN bus pinmux.
Enable D_CAN bus controllers 0 and 1

The pinmux of uart1 node contradicts the pinmux of dcan0 and dcan1 nodes. U-Boot should delete the uart1 or dcan0/1 nodes.

---
 arch/arm/boot/dts/am335x-cm-t335.dts | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
arch/arm/boot/dts/am335x-cm-t335.dts +30 -0
index b700940..f3d7845 100644
@@ -144,6 +144,24 @@
 		>;
 	};
 
+	dcan0_pins: pinmux_dcan0_pins {
+		pinctrl-single,pins = <
+			/* uart1_ctsn.dcan0_tx */
+			AM33XX_IOPAD(0x978, PIN_OUTPUT | MUX_MODE2)
+			/* uart1_rtsn.dcan0_rx */
+			AM33XX_IOPAD(0x97C, PIN_INPUT | MUX_MODE2)
+		>;
+	};
+
+	dcan1_pins: pinmux_dcan1_pins {
+		pinctrl-single,pins = <
+			/* uart1_rxd.dcan1_tx */
+			AM33XX_IOPAD(0x980, PIN_OUTPUT | MUX_MODE2)
+			/* uart1_txd.dcan1_rx */
+			AM33XX_IOPAD(0x984, PIN_INPUT | MUX_MODE2)
+		>;
+	};
+
 	ecap0_pins: pinmux_ecap0_pins {
 		pinctrl-single,pins = <
 			/* eCAP0_in_PWM0_out.eCAP0_in_PWM0_out MODE0 */
@@ -448,3 +466,15 @@ status = "okay";
 		vwlan-supply = <&vwlan_fixed>;
 	};
 };
+
+&dcan0 {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&dcan0_pins>;
+};
+
+&dcan1 {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&dcan1_pins>;
+};
Signature · 1 line
2.5.0
#2 lore raw

PATCH 2/3 ARM: dts: cm-t335: add touchscreen support

In reply to Uri Mashiach

Touchscreen and analog digital converter configurations.

---
 arch/arm/boot/dts/am335x-cm-t335.dts | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
arch/arm/boot/dts/am335x-cm-t335.dts +17 -0
index f3d7845..f232322 100644
@@ -478,3 +478,20 @@ status = "okay";
 	pinctrl-names = "default";
 	pinctrl-0 = <&dcan1_pins>;
 };
+
+/* Touschscreen and analog digital converter */
+&tscadc {
+	status = "okay";
+	tsc {
+		ti,wires = <4>;
+		ti,x-plate-resistance = <200>;
+		ti,coordinate-readouts = <5>;
+		ti,wire-config = <0x01 0x10 0x23 0x32>;
+		ti,charge-delay = <0x400>;
+	};
+
+	adc {
+		ti,adc-channels = <4 5 6 7>;
+	};
+};
+
Signature · 1 line
2.5.0
#3 lore raw

PATCH 3/3 ARM: dts: cm-t335: add audio support

In reply to Uri Mashiach

The TLV320AIC23B codec is connected to the CPU by McASP controller 1 for data and I2C0 for control.

Modifications:
- Enable and configure McASP controller 1.
- Add TLV320AIC23B codec pinmux.
- Add TLV320AIC23B codec configurations.
- Use simple-audio-card as CPU to codec glue.

---
 arch/arm/boot/dts/am335x-cm-t335.dts | 69 ++++++++++++++++++++++++++++++++++++
 1 file changed, 69 insertions(+)
arch/arm/boot/dts/am335x-cm-t335.dts +69 -0
index f232322..080340e 100644
@@ -56,6 +56,36 @@
 		brightness-levels = <0 51 53 56 62 75 101 152 255>;
 		default-brightness-level = <8>;
 	};
+
+	sound {
+		compatible = "simple-audio-card";
+		simple-audio-card,name = "cm-t335";
+
+		simple-audio-card,widgets =
+			"Microphone", "Mic Jack",
+			"Line", "Line In",
+			"Headphone", "Headphone Jack";
+
+		simple-audio-card,routing =
+			"Headphone Jack", "LHPOUT",
+			"Headphone Jack", "RHPOUT",
+			"LLINEIN", "Line In",
+			"RLINEIN", "Line In",
+			"MICIN", "Mic Jack";
+
+		simple-audio-card,format = "i2s";
+		simple-audio-card,bitclock-master = <&sound_master>;
+		simple-audio-card,frame-master = <&sound_master>;
+
+		simple-audio-card,cpu {
+			sound-dai = <&mcasp1>;
+		};
+
+		sound_master: simple-audio-card,codec {
+			sound-dai = <&tlv320aic23>;
+			system-clock-frequency = <12000000>;
+		};
+	};
 };
 
 &am33xx_pinmux {
@@ -283,6 +313,20 @@
 			AM33XX_IOPAD(0x9b4, PIN_OUTPUT | MUX_MODE7)
 		>;
 	};
+
+	/* TLV320AIC23B codec */
+	mcasp1_pins: pinmux_mcasp1_pins {
+		pinctrl-single,pins = <
+			/* MII1_CRS.mcasp1_aclkx */
+			AM33XX_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE4)
+			/* MII1_RX_ER.mcasp1_fsx */
+			AM33XX_IOPAD(0x910, PIN_INPUT_PULLDOWN | MUX_MODE4)
+			/* MII1_COL.mcasp1_axr2 */
+			AM33XX_IOPAD(0x908, PIN_INPUT_PULLDOWN | MUX_MODE4)
+			/* RMII1_REF_CLK.mcasp1_axr3 */
+			AM33XX_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE4)
+		>;
+	};
 };
 
 &uart0 {
@@ -317,6 +361,13 @@ status = "okay";
 		compatible = "emmicro,em3027";
 		reg = <0x56>;
 	};
+	/* Audio codec */
+	tlv320aic23: codec at 1a {
+		compatible = "ti,tlv320aic23";
+		reg = <0x1a>;
+		#sound-dai-cells= <0>;
+		status = "okay";
+	};
 };
 
 &usb {
@@ -495,3 +546,21 @@ status = "okay";
 	};
 };
 
+/* CPU audio */
+&mcasp1 {
+		pinctrl-names = "default";
+		pinctrl-0 = <&mcasp1_pins>;
+
+		op-mode = <0>;          /* MCASP_IIS_MODE */
+		tdm-slots = <2>;
+		/* 16 serializers */
+		num-serializer = <16>;
+		serial-dir = <  /* 0: INACTIVE, 1: TX, 2: RX */
+			0 0 2 1 0 0 0 0 0 0 0 0 0 0 0 0
+		>;
+		tx-num-evt = <1>;
+		rx-num-evt = <1>;
+
+		#sound-dai-cells= <0>;
+		status = "okay";
+};
Signature · 1 line
2.5.0
#4 lore raw

cover ARM: dts: cm-t335: add peripherals - part 2

In reply to Uri Mashiach

Gentle ping

Quoted 13 lines · Uri Mashiach

Add support for the following peripherals:
- CAN BUS
- Touchscreen
- Audio

Uri Mashiach (3):
ARM: dts: cm-t335: Add support for CAN bus
ARM: dts: cm-t335: add touchscreen support
ARM: dts: cm-t335: add audio support

  arch/arm/boot/dts/am335x-cm-t335.dts | 116 +++++++++++++++++++++++++++++++++++
  1 file changed, 116 insertions(+)
Signature · 2 lines
Regards,
Uri
#5 lore raw

cover ARM: dts: cm-t335: add peripherals - part 2

Quoted 15 lines · Uri Mashiach

Gentle ping

Quoted 12 lines · Uri Mashiach

Add support for the following peripherals:
- CAN BUS
- Touchscreen
- Audio

Uri Mashiach (3):
ARM: dts: cm-t335: Add support for CAN bus
ARM: dts: cm-t335: add touchscreen support
ARM: dts: cm-t335: add audio support

 arch/arm/boot/dts/am335x-cm-t335.dts | 116 +++++++++++++++++++++++++++++++++++
 1 file changed, 116 insertions(+)

Sorry for the delay, I was waiting forv4.5-rc1 and have most fixes out of the way first. Applying into omap-for-v4.6/dt.

Regards,

Tony