Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asus Transformers update #16

Merged
merged 6 commits into from
Jan 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
129 changes: 129 additions & 0 deletions Documentation/devicetree/bindings/sound/nvidia,tegra-audio-rt5631.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---

$id: http://devicetree.org/schemas/sound/nvidia,tegra-audio-rt5631.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Tegra with RT5683 ASoC sound card driver

description: |
This is binding describes the Realtek ALC5631/RT5631 sound codec card.

maintainers:
- Stephen Warren <[email protected]>

properties:
compatible:
enum:
- nvidia,tegra-audio-rt5631

clocks:
minItems: 3
items:
- description: PLL A clock
- description: PLL A OUT0 clock
- description: The Tegra cdev1/extern1 clock, which feeds the card's mclk

clock-names:
minItems: 3
items:
- const: pll_a
- const: pll_a_out0
- const: mclk

assigned-clocks:
minItems: 1
maxItems: 3

assigned-clock-parents:
minItems: 1
maxItems: 3

assigned-clock-rates:
minItems: 1
maxItems: 3

nvidia,model:
$ref: /schemas/types.yaml#/definitions/string
description: The user-visible name of this sound complex.

nvidia,audio-routing:
$ref: /schemas/types.yaml#/definitions/non-unique-string-array
description: |
A list of the connections between audio components.
Each entry is a pair of strings, the first being the connection's sink,
the second being the connection's source. Valid names for sources and
sinks are the RT5631's pins (as documented in its binding), and the jacks
on the board:

* Int Spk
* Headphone Jack
* Mic Jack
* Int Mic

nvidia,i2s-controller:
$ref: /schemas/types.yaml#/definitions/phandle-array
description: The phandle of the Tegra I2S1 controller

nvidia,audio-codec:
$ref: /schemas/types.yaml#/definitions/phandle-array
description: The phandle of the RT5631 audio codec

nvidia,hp-mute-gpios:
description: The GPIO that mutes the headphones (button event)

nvidia,hp-det-gpios:
description: The GPIO that detect headphones are plugged in

additionalProperties: false

required:
- compatible
- clocks
- clock-names
- assigned-clocks
- assigned-clock-parents
- nvidia,model
- nvidia,audio-routing
- nvidia,i2s-controller
- nvidia,audio-codec

examples:
- |
#include<dt-bindings/clock/tegra30-car.h>
#include<dt-bindings/soc/tegra-pmc.h>
#include <dt-bindings/gpio/gpio.h>

sound {
compatible = "nvidia,tegra-audio-rt5631";
nvidia,model = "NVIDIA Tegra Transformer";

nvidia,audio-routing =
"Headphone Jack", "HPOL",
"Headphone Jack", "HPOR",
"Int Spk", "SPOL",
"Int Spk", "SPOR",
"MIC1", "MIC Bias1",
"MIC Bias1", "Mic Jack",
"DMIC", "Int Mic";

nvidia,i2s-controller = <&tegra_i2s1>;
nvidia,audio-codec = <&rt5631>;

nvidia,hp-det-gpios = <&gpio 178 GPIO_ACTIVE_LOW>;
nvidia,hp-mute-gpios = <&gpio 186 GPIO_ACTIVE_LOW>;

clocks = <&tegra_car TEGRA30_CLK_PLL_A>,
<&tegra_car TEGRA30_CLK_PLL_A_OUT0>,
<&tegra_pmc TEGRA_PMC_CLK_OUT_1>;
clock-names = "pll_a", "pll_a_out0", "mclk";

assigned-clocks = <&tegra_car TEGRA30_CLK_EXTERN1>,
<&tegra_pmc TEGRA_PMC_CLK_OUT_1>;

assigned-clock-parents = <&tegra_car TEGRA30_CLK_PLL_A_OUT0>,
<&tegra_car TEGRA30_CLK_EXTERN1>;
};

...
79 changes: 36 additions & 43 deletions arch/arm/boot/dts/tegra30-asus-tf201.dts
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,6 @@
};
};
};

hdmi: hdmi@54280000 {
status = "okay";

hdmi-supply = <&hdmi_5v0_sys>;
pll-supply = <&vdd_1v8>;
vdd-supply = <&vdd_3v3_sys>;

nvidia,hpd-gpio = <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>;
nvidia,ddc-i2c-bus = <&hdmi_ddc>;
};
};

pinmux@70000868 {
Expand Down Expand Up @@ -67,6 +56,20 @@
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
};
gmi_cs4_n_pk2 {
nvidia,pins = "gmi_cs4_n_pk2";
nvidia,function = "gmi";
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_ENABLE>;
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
};
cam_mclk_pcc0 {
nvidia,pins = "cam_mclk_pcc0";
nvidia,function = "vi_alt3";
nvidia,pull = <TEGRA_PIN_PULL_UP>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
};
};
};

Expand Down Expand Up @@ -102,18 +105,19 @@
reset-gpios = <&gpio TEGRA_GPIO(BB, 0) GPIO_ACTIVE_LOW>; // cam_sensor_rst_lo, out, lo
};

front_camera: camera@48 {
compatible = "aptina,mi1040";
/* Front camera Aptina MI1040 image processor */
front_camera: camera-sensor@48 {
compatible = "ovti,ov2710";
reg = <0x48>;

clocks = <>; // <&tegra_car TEGRA30_CLK_PLL_A>; CAM_MCLK
clocks = <&tegra_car TEGRA30_CLK_PLL_A>;
clock-names = "extclk";

vddio-suppy = <&vdd_1v8>;
vdda-suppy = <&vdd_3v3_sys>; // 2.85V?
vddc-supply = <&cam_vddc>; // PWR_DN

reset-gpios = <&gpio TEGRA_GPIO(O, 0) GPIO_ACTIVE_LOW>;

DOVDD-supply = <&vddio_1v8_cam>;
DVDD-supply = <&vdd_2v85_cam2>;
// AVDD-supply = <&cam_vddc>; /* Analog regulator line should be here */
};

gyroscope@68 {
Expand All @@ -124,9 +128,9 @@
/* External I2C interface */
i2c-gate {
accelerometer@f {
mount-matrix = "-1", "0", "0",
"0", "1", "0",
"0", "0", "-1";
mount-matrix = "1", "0", "0",
"0", "-1", "0",
"0", "0", "1";
};
};
};
Expand All @@ -137,22 +141,26 @@
rt5631: audio-codec@1a {
compatible = "realtek,rt5631";
reg = <0x1a>;

realtek,times-of-bclk = <64>;
};
};

usb-phy@7d000000 {
/delete-property/ nvidia,xcvr-setup-use-fuses;
nvidia,xcvr-setup = <5>; /* Based on TF201 fuse value - 48 */
};

usb-phy@7d008000 {
/delete-property/ nvidia,xcvr-setup-use-fuses;
nvidia,xcvr-setup = <5>; /* Based on TF201 fuse value - 48 */
};

/* HannStar HSD101PWW2 Rev0-A00/A01 LCD SuperIPS+ HD panel */
display-panel {
compatible = "panel-lvds";

power-supply = <&vdd_pnl>;
backlight = <&backlight_lvds>;

/*
* The hsd101pww2 panel has same properties as hsd070pww1,
* only difference is physical size.
*/
width-mm = <217>;
height-mm = <136>;

Expand All @@ -179,7 +187,6 @@
};

/* Texas Instruments SN75LVDS83B LVDS Transmitter */
/* NOTE: datasheet also mentions about THine TH133B LVDS Transmitter */
lvds-encoder {
compatible = "ti,sn75lvds83", "lvds-encoder";

Expand Down Expand Up @@ -217,7 +224,7 @@
sound {
compatible = "nvidia,tegra-audio-rt5631-tf201",
"nvidia,tegra-audio-rt5631";
nvidia,model = "ASUS TF201 RT5631";
nvidia,model = "TF201 RT5631";

nvidia,audio-routing =
"Headphone Jack", "HPOL",
Expand All @@ -228,21 +235,7 @@
"MIC Bias1", "Mic Jack",
"DMIC", "Int Mic";

nvidia,i2s-controller = <&tegra_i2s1>;
nvidia,audio-codec = <&rt5631>;

nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(W, 2) GPIO_ACTIVE_LOW>;

clocks = <&tegra_car TEGRA30_CLK_PLL_A>,
<&tegra_car TEGRA30_CLK_PLL_A_OUT0>,
<&tegra_car TEGRA30_CLK_EXTERN1>;
clock-names = "pll_a", "pll_a_out0", "mclk";

assigned-clocks = <&tegra_car TEGRA30_CLK_EXTERN1>,
<&tegra_pmc TEGRA_PMC_CLK_OUT_1>;

assigned-clock-parents = <&tegra_car TEGRA30_CLK_PLL_A_OUT0>,
<&tegra_car TEGRA30_CLK_EXTERN1>;
};

memory-controller@7000f000 {
Expand Down
53 changes: 24 additions & 29 deletions arch/arm/boot/dts/tegra30-asus-tf300t.dts
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,6 @@
};
};
};

hdmi: hdmi@54280000 {
status = "okay";

hdmi-supply = <&hdmi_5v0_sys>;
pll-supply = <&vdd_1v8>;
vdd-supply = <&vdd_3v3_sys>;

nvidia,hpd-gpio = <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>;
nvidia,ddc-i2c-bus = <&hdmi_ddc>;
};
};

pinmux@70000868 {
Expand Down Expand Up @@ -67,6 +56,20 @@
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
};
gmi_cs4_n_pk2 {
nvidia,pins = "gmi_cs4_n_pk2";
nvidia,function = "gmi";
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_ENABLE>;
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
};
cam_mclk_pcc0 {
nvidia,pins = "cam_mclk_pcc0";
nvidia,function = "vi_alt3";
nvidia,pull = <TEGRA_PIN_PULL_UP>;
nvidia,tristate = <TEGRA_PIN_ENABLE>;
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
};
};
};

Expand All @@ -81,10 +84,11 @@
reset-gpios = <&gpio TEGRA_GPIO(H, 6) GPIO_ACTIVE_LOW>;
wakeup-source;

vcc33-supply = <&vdd_3v3_sys>;
vccio-supply = <&vdd_3v3_sys>;

touchscreen-size-x = <2240>;
touchscreen-size-y = <1408>;
// touchscreen-x-mm = <210>;
// touchscreen-y-mm = <132>;
touchscreen-inverted-y;
};
};
Expand Down Expand Up @@ -122,12 +126,18 @@

interrupt-parent = <&gpio>;
interrupts = <TEGRA_GPIO(W, 3) IRQ_TYPE_LEVEL_LOW>;

gpio-controller;
#gpio-cells = <2>;

micdet-cfg = <0>;
micdet-delay = <100>;
gpio-cfg = <0xffffffff 0xffffffff 0 0xffffffff 0xffffffff>;

AVDD-supply = <&vdd_3v3_sys>;
CPVDD-supply = <&vdd_3v3_sys>;
DBVDD-supply = <&vdd_3v3_sys>;
DCVDD-supply = <&vdd_3v3_sys>;
};
};

Expand Down Expand Up @@ -164,7 +174,6 @@
};

/* Texas Instruments SN75LVDS83B LVDS Transmitter */
/* NOTE: datasheet also mentions about THine TH133B LVDS Transmitter */
lvds-encoder {
compatible = "ti,sn75lvds83", "lvds-encoder";

Expand Down Expand Up @@ -196,7 +205,7 @@
sound {
compatible = "nvidia,tegra-audio-wm8903-tf300t",
"nvidia,tegra-audio-wm8903";
nvidia,model = "ASUS TF300T WM8903";
nvidia,model = "TF300T WM8903";

nvidia,audio-routing =
"Headphone Jack", "HPOUTR",
Expand All @@ -208,22 +217,8 @@
"Mic Jack", "MICBIAS",
"IN1L", "Mic Jack";

nvidia,i2s-controller = <&tegra_i2s1>;
nvidia,audio-codec = <&wm8903>;

nvidia,spkr-en-gpios = <&wm8903 2 GPIO_ACTIVE_HIGH>;
nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(W, 2) GPIO_ACTIVE_LOW>;

clocks = <&tegra_car TEGRA30_CLK_PLL_A>,
<&tegra_car TEGRA30_CLK_PLL_A_OUT0>,
<&tegra_car TEGRA30_CLK_EXTERN1>;
clock-names = "pll_a", "pll_a_out0", "mclk";

assigned-clocks = <&tegra_car TEGRA30_CLK_EXTERN1>,
<&tegra_pmc TEGRA_PMC_CLK_OUT_1>;

assigned-clock-parents = <&tegra_car TEGRA30_CLK_PLL_A_OUT0>,
<&tegra_car TEGRA30_CLK_EXTERN1>;
};

memory-controller@7000f000 {
Expand Down
Loading