* [PATCH v2 1/4] arm64: DTS: allwinner: a64: Add pinmux for RGB666 LCD
2019-05-16 15:49 [PATCH v2 0/4] Add missing device nodes for Olimex Teres-I Torsten Duwe
@ 2019-05-16 15:51 ` Torsten Duwe
2019-05-20 7:42 ` Maxime Ripard
2019-05-16 15:51 ` [PATCH v2 2/4] dt-bindings: Add ANX6345 DP/eDP transmitter binding Torsten Duwe
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: Torsten Duwe @ 2019-05-16 15:51 UTC (permalink / raw)
To: David Airlie, Daniel Vetter, Rob Herring, Mark Rutland,
Thierry Reding, Maxime Ripard, Chen-Yu Tsai, Archit Taneja,
Andrzej Hajda, Laurent Pinchart, Icenowy Zheng, Sean Paul,
Vasily Khoruzhick, Harald Geyer
Cc: dri-devel, devicetree, linux-arm-kernel, linux-kernel
From: Icenowy Zheng <icenowy@aosc.io>
Allwinner A64's TCON0 can output RGB666 LCD signal.
Add its pinmux.
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Torsten Duwe <duwe@suse.de>
---
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index 2abb335145a6..a8bbee84e7da 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -559,6 +559,16 @@
function = "i2c1";
};
+ /omit-if-no-ref/
+ lcd_rgb666_pins: lcd-rgb666-pins {
+ pins = "PD0", "PD1", "PD2", "PD3", "PD4",
+ "PD5", "PD6", "PD7", "PD8", "PD9",
+ "PD10", "PD11", "PD12", "PD13",
+ "PD14", "PD15", "PD16", "PD17",
+ "PD18", "PD19", "PD20", "PD21";
+ function = "lcd0";
+ };
+
mmc0_pins: mmc0-pins {
pins = "PF0", "PF1", "PF2", "PF3",
"PF4", "PF5";
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v2 1/4] arm64: DTS: allwinner: a64: Add pinmux for RGB666 LCD
2019-05-16 15:51 ` [PATCH v2 1/4] arm64: DTS: allwinner: a64: Add pinmux for RGB666 LCD Torsten Duwe
@ 2019-05-20 7:42 ` Maxime Ripard
0 siblings, 0 replies; 8+ messages in thread
From: Maxime Ripard @ 2019-05-20 7:42 UTC (permalink / raw)
To: Torsten Duwe
Cc: David Airlie, Daniel Vetter, Rob Herring, Mark Rutland,
Thierry Reding, Chen-Yu Tsai, Archit Taneja, Andrzej Hajda,
Laurent Pinchart, Icenowy Zheng, Sean Paul, Vasily Khoruzhick,
Harald Geyer, dri-devel, devicetree, linux-arm-kernel,
linux-kernel
[-- Attachment #1: Type: text/plain, Size: 471 bytes --]
On Thu, May 16, 2019 at 05:51:30PM +0200, Torsten Duwe wrote:
> From: Icenowy Zheng <icenowy@aosc.io>
>
> Allwinner A64's TCON0 can output RGB666 LCD signal.
>
> Add its pinmux.
>
> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
> Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
> Signed-off-by: Torsten Duwe <duwe@suse.de>
Applied, with sed/DTS/dts/ in the commit title
Maxime
--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2 2/4] dt-bindings: Add ANX6345 DP/eDP transmitter binding
2019-05-16 15:49 [PATCH v2 0/4] Add missing device nodes for Olimex Teres-I Torsten Duwe
2019-05-16 15:51 ` [PATCH v2 1/4] arm64: DTS: allwinner: a64: Add pinmux for RGB666 LCD Torsten Duwe
@ 2019-05-16 15:51 ` Torsten Duwe
2019-05-16 15:51 ` [PATCH v2 3/4] arm64: DTS: allwinner: a64: Enable audio on Teres-I Torsten Duwe
2019-05-16 15:51 ` [PATCH v2 4/4] arm64: DTS: allwinner: a64: enable ANX6345 bridge " Torsten Duwe
3 siblings, 0 replies; 8+ messages in thread
From: Torsten Duwe @ 2019-05-16 15:51 UTC (permalink / raw)
To: David Airlie, Daniel Vetter, Rob Herring, Mark Rutland,
Thierry Reding, Maxime Ripard, Chen-Yu Tsai, Archit Taneja,
Andrzej Hajda, Laurent Pinchart, Icenowy Zheng, Sean Paul,
Vasily Khoruzhick, Harald Geyer
Cc: dri-devel, devicetree, linux-arm-kernel, linux-kernel
From: Icenowy Zheng <icenowy@aosc.io>
The ANX6345 is an ultra-low power DisplayPort/eDP transmitter designed
for portable devices.
Add a binding document for it.
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Torsten Duwe <duwe@suse.de>
---
.../bindings/display/bridge/anx6345.txt | 56 +++++++++++++++++++
1 file changed, 56 insertions(+)
create mode 100644 Documentation/devicetree/bindings/display/bridge/anx6345.txt
diff --git a/Documentation/devicetree/bindings/display/bridge/anx6345.txt b/Documentation/devicetree/bindings/display/bridge/anx6345.txt
new file mode 100644
index 000000000000..e79a11348d11
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/bridge/anx6345.txt
@@ -0,0 +1,56 @@
+Analogix ANX6345 eDP Transmitter
+--------------------------------
+
+The ANX6345 is an ultra-low power Full-HD eDP transmitter designed for
+portable devices.
+
+Required properties:
+
+ - compatible : "analogix,anx6345"
+ - reg : I2C address of the device
+ - reset-gpios : Which GPIO to use for reset
+ - dvdd12-supply : Regulator for 1.2V digital core power.
+ - dvdd25-supply : Regulator for 2.5V digital core power.
+
+Optional properties:
+
+ - Video ports for RGB input and eDP output using the DT bindings
+ defined in [1]
+
+[1]: Documentation/devicetree/bindings/media/video-interfaces.txt
+
+Example:
+
+anx6345: anx6345@38 {
+ compatible = "analogix,anx6345";
+ reg = <0x38>;
+ reset-gpios = <&pio 3 24 GPIO_ACTIVE_LOW>; /* PD24 */
+ dvdd25-supply = <®_dldo2>;
+ dvdd12-supply = <®_fldo1>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ anx6345_in: port@0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0>;
+ anx6345_in_tcon0: endpoint@0 {
+ reg = <0>;
+ remote-endpoint = <&tcon0_out_anx6345>;
+ };
+ };
+
+ anx6345_out: port@1 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <1>;
+
+ anx6345_out_panel: endpoint@0 {
+ reg = <0>;
+ remote-endpoint = <&panel_in_edp>;
+ };
+ };
+ };
+};
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 3/4] arm64: DTS: allwinner: a64: Enable audio on Teres-I
2019-05-16 15:49 [PATCH v2 0/4] Add missing device nodes for Olimex Teres-I Torsten Duwe
2019-05-16 15:51 ` [PATCH v2 1/4] arm64: DTS: allwinner: a64: Add pinmux for RGB666 LCD Torsten Duwe
2019-05-16 15:51 ` [PATCH v2 2/4] dt-bindings: Add ANX6345 DP/eDP transmitter binding Torsten Duwe
@ 2019-05-16 15:51 ` Torsten Duwe
2019-05-20 7:56 ` Chen-Yu Tsai
2019-05-16 15:51 ` [PATCH v2 4/4] arm64: DTS: allwinner: a64: enable ANX6345 bridge " Torsten Duwe
3 siblings, 1 reply; 8+ messages in thread
From: Torsten Duwe @ 2019-05-16 15:51 UTC (permalink / raw)
To: David Airlie, Daniel Vetter, Rob Herring, Mark Rutland,
Thierry Reding, Maxime Ripard, Chen-Yu Tsai, Archit Taneja,
Andrzej Hajda, Laurent Pinchart, Icenowy Zheng, Sean Paul,
Vasily Khoruzhick, Harald Geyer
Cc: dri-devel, devicetree, linux-arm-kernel, linux-kernel
From: Harald Geyer <harald@ccbib.org>
The TERES-I has internal speakers (left, right), internal microphone
and a headset combo jack (headphones + mic), "CTIA" (android) pinout.
The headphone and mic detect lines of the A64 are connected properly,
but AFAIK currently unsupported by the driver.
Signed-off-by: Harald Geyer <harald@ccbib.org>
Signed-off-by: Torsten Duwe <duwe@suse.de>
---
.../boot/dts/allwinner/sun50i-a64-teres-i.dts | 53 +++++++++++++++++++
1 file changed, 53 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts
index f9eede0a8bd3..d57049fbdaca 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts
@@ -70,6 +70,25 @@
compatible = "mmc-pwrseq-simple";
reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
};
+
+ speaker_amp: audio-amplifier {
+ compatible = "simple-audio-amplifier";
+ enable-gpios = <&r_pio 0 12 GPIO_ACTIVE_HIGH>; /* PL12 */
+ sound-name-prefix = "Speaker Amp";
+ };
+};
+
+&codec {
+ status = "okay";
+};
+
+&codec_analog {
+ cpvdd-supply = <®_eldo1>;
+ status = "okay";
+};
+
+&dai {
+ status = "okay";
};
&ehci1 {
@@ -258,6 +286,29 @@
vcc-hdmi-supply = <®_dldo1>;
};
+&sound {
+ simple-audio-card,aux-devs = <&codec_analog>, <&speaker_amp>;
+ simple-audio-card,widgets = "Headphone", "Headphone Jack",
+ "Microphone", "Headset Microphone",
+ "Microphone", "Internal Microphone",
+ "Speaker", "Internal Speaker";
+ simple-audio-card,routing =
+ "Left DAC", "AIF1 Slot 0 Left",
+ "Right DAC", "AIF1 Slot 0 Right",
+ "AIF1 Slot 0 Left ADC", "Left ADC",
+ "AIF1 Slot 0 Right ADC", "Right ADC",
+ "Headphone Jack", "HP",
+ "Speaker Amp INL", "LINEOUT",
+ "Speaker Amp INR", "LINEOUT",
+ "Internal Speaker", "Speaker Amp OUTL",
+ "Internal Speaker", "Speaker Amp OUTR",
+ "Internal Microphone", "MBIAS",
+ "MIC1", "Internal Microphone",
+ "Headset Microphone", "HBIAS",
+ "MIC2", "Headset Microphone";
+ status = "okay";
+};
+
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pb_pins>;
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v2 3/4] arm64: DTS: allwinner: a64: Enable audio on Teres-I
2019-05-16 15:51 ` [PATCH v2 3/4] arm64: DTS: allwinner: a64: Enable audio on Teres-I Torsten Duwe
@ 2019-05-20 7:56 ` Chen-Yu Tsai
2019-05-20 8:09 ` Maxime Ripard
0 siblings, 1 reply; 8+ messages in thread
From: Chen-Yu Tsai @ 2019-05-20 7:56 UTC (permalink / raw)
To: Torsten Duwe
Cc: David Airlie, Daniel Vetter, Rob Herring, Mark Rutland,
Thierry Reding, Maxime Ripard, Archit Taneja, Andrzej Hajda,
Laurent Pinchart, Icenowy Zheng, Sean Paul, Vasily Khoruzhick,
Harald Geyer, dri-devel, devicetree, linux-arm-kernel,
linux-kernel
On Thu, May 16, 2019 at 11:52 PM Torsten Duwe <duwe@lst.de> wrote:
>
> From: Harald Geyer <harald@ccbib.org>
>
> The TERES-I has internal speakers (left, right), internal microphone
> and a headset combo jack (headphones + mic), "CTIA" (android) pinout.
>
> The headphone and mic detect lines of the A64 are connected properly,
> but AFAIK currently unsupported by the driver.
>
> Signed-off-by: Harald Geyer <harald@ccbib.org>
> Signed-off-by: Torsten Duwe <duwe@suse.de>
Looks good to me.
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 3/4] arm64: DTS: allwinner: a64: Enable audio on Teres-I
2019-05-20 7:56 ` Chen-Yu Tsai
@ 2019-05-20 8:09 ` Maxime Ripard
0 siblings, 0 replies; 8+ messages in thread
From: Maxime Ripard @ 2019-05-20 8:09 UTC (permalink / raw)
To: Chen-Yu Tsai
Cc: Torsten Duwe, David Airlie, Daniel Vetter, Rob Herring,
Mark Rutland, Thierry Reding, Archit Taneja, Andrzej Hajda,
Laurent Pinchart, Icenowy Zheng, Sean Paul, Vasily Khoruzhick,
Harald Geyer, dri-devel, devicetree, linux-arm-kernel,
linux-kernel
[-- Attachment #1: Type: text/plain, Size: 737 bytes --]
On Mon, May 20, 2019 at 03:56:13PM +0800, Chen-Yu Tsai wrote:
> On Thu, May 16, 2019 at 11:52 PM Torsten Duwe <duwe@lst.de> wrote:
> >
> > From: Harald Geyer <harald@ccbib.org>
> >
> > The TERES-I has internal speakers (left, right), internal microphone
> > and a headset combo jack (headphones + mic), "CTIA" (android) pinout.
> >
> > The headphone and mic detect lines of the A64 are connected properly,
> > but AFAIK currently unsupported by the driver.
> >
> > Signed-off-by: Harald Geyer <harald@ccbib.org>
> > Signed-off-by: Torsten Duwe <duwe@suse.de>
>
> Looks good to me.
>
> Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Applied, thanks!
Maxime
--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2 4/4] arm64: DTS: allwinner: a64: enable ANX6345 bridge on Teres-I
2019-05-16 15:49 [PATCH v2 0/4] Add missing device nodes for Olimex Teres-I Torsten Duwe
` (2 preceding siblings ...)
2019-05-16 15:51 ` [PATCH v2 3/4] arm64: DTS: allwinner: a64: Enable audio on Teres-I Torsten Duwe
@ 2019-05-16 15:51 ` Torsten Duwe
3 siblings, 0 replies; 8+ messages in thread
From: Torsten Duwe @ 2019-05-16 15:51 UTC (permalink / raw)
To: David Airlie, Daniel Vetter, Rob Herring, Mark Rutland,
Thierry Reding, Maxime Ripard, Chen-Yu Tsai, Archit Taneja,
Andrzej Hajda, Laurent Pinchart, Icenowy Zheng, Sean Paul,
Vasily Khoruzhick, Harald Geyer
Cc: dri-devel, devicetree, linux-arm-kernel, linux-kernel
From: Icenowy Zheng <icenowy@aosc.io>
TERES-I has an ANX6345 bridge connected to the RGB666 LCD output, and
the I2C controlling signals are connected to I2C0 bus.
Enable it in the device tree.
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Signed-off-by: Torsten Duwe <duwe@suse.de>
---
originally: patchwork.kernel.org/patch/10646867
Changed the reset polarity, which is active low,
according to the (terse) datasheet, Teres-I and pinebook schematics,
and the confusing parts of the linux driver code (not yet included here).
Active low -> no more confusion.
---
.../boot/dts/allwinner/sun50i-a64-teres-i.dts | 40 +++++++++++++++++--
1 file changed, 36 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts
index c455b24dd079..bc1d0d6c0672 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts
@@ -72,20 +72,38 @@
};
};
+&de {
+ status = "okay";
+};
+
&ehci1 {
status = "okay";
};
-/* The ANX6345 eDP-bridge is on i2c0. There is no linux (mainline)
- * driver for this chip at the moment, the bootloader initializes it.
- * However it can be accessed with the i2c-dev driver from user space.
- */
&i2c0 {
clock-frequency = <100000>;
pinctrl-names = "default";
pinctrl-0 = <&i2c0_pins>;
status = "okay";
+
+ anx6345: anx6345@38 {
+ compatible = "analogix,anx6345";
+ reg = <0x38>;
+ reset-gpios = <&pio 3 24 GPIO_ACTIVE_LOW>; /* PD24 */
+ dvdd25-supply = <®_dldo2>;
+ dvdd12-supply = <®_dldo3>;
+
+ port {
+ anx6345_in: endpoint {
+ remote-endpoint = <&tcon0_out_anx6345>;
+ };
+ };
+ };
+};
+
+&mixer0 {
+ status = "okay";
};
&mmc0 {
@@ -258,6 +276,20 @@
vcc-hdmi-supply = <®_dldo1>;
};
+&tcon0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&lcd_rgb666_pins>;
+
+ status = "okay";
+};
+
+&tcon0_out {
+ tcon0_out_anx6345: endpoint@0 {
+ reg = <0>;
+ remote-endpoint = <&anx6345_in>;
+ };
+};
+
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pb_pins>;
^ permalink raw reply related [flat|nested] 8+ messages in thread