Skip to content
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: 121 additions & 8 deletions arch/arm/boot/dts/tegra20-asus-tf101.dts
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,19 @@
status = "okay";
clock-frequency = <400000>;

/* Aichi AMI306 digital compass */
magnetometer@e {
compatible = "asahi-kasei,ak8974";
reg = <0x0e>;

avdd-supply = <&vdd_3v3_sys>;
dvdd-supply = <&vdd_1v8_sys>;

mount-matrix = "-1", "0", "0",
"0", "1", "0",
"0", "0", "-1";
};

wm8903: audio-codec@1a {
compatible = "wlf,wm8903";
reg = <0x1a>;
Expand Down Expand Up @@ -469,9 +482,44 @@

atmel,wakeup-method = <ATMEL_MXT_WAKEUP_I2C_SCL>;
};

gyroscope@68 {
compatible = "invensense,mpu3050";
reg = <0x68>;

interrupt-parent = <&gpio>;
interrupts = <TEGRA_GPIO(Z, 4) IRQ_TYPE_EDGE_RISING>;

vdd-supply = <&vdd_3v3_sys>;
vlogic-supply = <&vdd_1v8_sys>;

mount-matrix = "0", "1", "0",
"-1", "0", "0",
"0", "0", "1";

i2c-gate {
#address-cells = <1>;
#size-cells = <0>;

accelerometer@f {
compatible = "kionix,kxtf9";
reg = <0x0f>;

interrupt-parent = <&gpio>;
interrupts = <TEGRA_GPIO(N, 4) IRQ_TYPE_EDGE_RISING>;

vdd-supply = <&vdd_3v3_sys>;
vddio-supply = <&vdd_1v8_sys>;

mount-matrix = "1", "0", "0",
"0", "1", "0",
"0", "0", "1";
};
};
};
};

i2c@7000c400 {
i2c2: i2c@7000c400 {
status = "okay";
clock-frequency = <100000>;
};
Expand All @@ -481,7 +529,7 @@
#address-cells = <1>;
#size-cells = <0>;

i2c-parent = <&{/i2c@7000c400}>;
i2c-parent = <&i2c2>;

pinctrl-names = "ddc", "pta", "idle";
pinctrl-0 = <&state_i2cmux_ddc>;
Expand All @@ -506,6 +554,49 @@
sbs,poll-retry-count = <10>;
power-supplies = <&mains>;
};

/* Dynaimage ambient light sensor */
light-sensor@1c {
compatible = "dynaimage,al3010";
reg = <0x1c>;

interrupt-parent = <&gpio>;
interrupts = <TEGRA_GPIO(Z, 2) IRQ_TYPE_LEVEL_HIGH>;

vdd-supply = <&vdd_3v3_sys>;
};
};
};

dock-i2c {
compatible = "i2c-hotplug-gpio";

#address-cells = <1>;
#size-cells = <0>;

interrupts-extended = <&gpio TEGRA_GPIO(X, 5) IRQ_TYPE_EDGE_BOTH>;
detect-gpios = <&gpio TEGRA_GPIO(X, 5) GPIO_ACTIVE_LOW>;

i2c-parent = <&lvds_ddc>;

asusec@19 {
compatible = "asus,dock-ec", "asus,ec";
reg = <0x19>;

interrupt-parent = <&gpio>;
interrupts = <TEGRA_GPIO(S, 2) IRQ_TYPE_LEVEL_LOW>;

request-gpio = <&gpio TEGRA_GPIO(S, 3) GPIO_ACTIVE_LOW>;
asus,dockram = <&dockram_dec>;

dock_battery: battery {
charge-full-design = <2260>; /* mAh */
};
};

dockram_dec: dockram@1b {
compatible = "asus,dockram";
reg = <0x1b>;
};
};

Expand All @@ -528,7 +619,7 @@
#gpio-cells = <2>;
gpio-controller;

sys-supply = <&vdd_5v0_reg>;
sys-supply = <&vdd_5v0_sys>;
vin-sm0-supply = <&sys_reg>;
vin-sm1-supply = <&sys_reg>;
vin-sm2-supply = <&sys_reg>;
Expand Down Expand Up @@ -669,22 +760,31 @@
nvidia,sys-clock-req-active-high;
};

/* USB via ASUS connector */
usb@c5000000 {
compatible = "nvidia,tegra20-udc";
status = "okay";
dr_mode = "peripheral";
};

usb-phy@c5000000 {
status = "okay";
dr_mode = "peripheral";
nvidia,xcvr-setup-use-fuses;
nvidia,xcvr-lsfslew = <2>;
nvidia,xcvr-lsrslew = <2>;
vbus-supply = <&vdd_5v0_sys>;
};

/* Dock's USB port */
usb@c5008000 {
status = "okay";
};

usb-phy@c5008000 {
status = "okay";
nvidia,xcvr-setup-use-fuses;
vbus-supply = <&vdd_5v0_sys>;
};

brcm_wifi_pwrseq: wifi-pwrseq {
Expand All @@ -704,7 +804,11 @@
#address-cells = <1>;
#size-cells = <0>;

max-frequency = <50000000>;
assigned-clocks = <&tegra_car TEGRA20_CLK_SDMMC1>;
assigned-clock-parents = <&tegra_car TEGRA20_CLK_PLL_C>;
assigned-clock-rates = <40000000>;

max-frequency = <40000000>;
keep-power-in-suspend;
bus-width = <4>;
non-removable;
Expand Down Expand Up @@ -809,6 +913,15 @@
wakeup-event-action = <EV_ACT_ASSERTED>;
wakeup-source;
};

dock-hall-sensor {
label = "Lid";
gpios = <&gpio TEGRA_GPIO(S, 4) GPIO_ACTIVE_LOW>;
linux,input-type = <EV_SW>;
linux,code = <SW_LID>;
debounce-interval = <10>;
wakeup-source;
};
};

lvds-encoder {
Expand Down Expand Up @@ -874,7 +987,7 @@
power-supply = <&vdd_core>;
};

vdd_5v0_reg: regulator@0 {
vdd_5v0_sys: regulator@0 {
compatible = "regulator-fixed";
regulator-name = "vdd_5v0";
regulator-min-microvolt = <5000000>;
Expand All @@ -888,7 +1001,7 @@
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-always-on;
vin-supply = <&vdd_5v0_reg>;
vin-supply = <&vdd_5v0_sys>;
};

regulator@2 {
Expand All @@ -915,7 +1028,7 @@
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-always-on;
vin-supply = <&vdd_5v0_reg>;
vin-supply = <&vdd_5v0_sys>;
};

vdd_hdmi_en: regulator@5 {
Expand All @@ -924,7 +1037,7 @@
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
regulator-always-on;
vin-supply = <&vdd_5v0_reg>;
vin-supply = <&vdd_5v0_sys>;
gpio = <&gpio TEGRA_GPIO(V, 5) GPIO_ACTIVE_HIGH>;
enable-active-high;
};
Expand Down
16 changes: 14 additions & 2 deletions drivers/mfd/asus-ec.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,18 +108,30 @@ static const struct mfd_cell asus_ec_subdev[] =
};

static const struct asus_ec_initdata asus_ec_model_info[] = {
{ /* Asus Transformer Pad */
{ /* Asus T30 Transformer Pad */
.model = "ASUS-TF201-PAD",
.name = "pad",
.components = EC_PART_BATTERY|EC_PART_CHARGE_LED,
.flags = EC_FLAG_SET_MODE,
},
{ /* Asus Mobile Dock */
{ /* Asus T30 Mobile Dock */
.model = "ASUS-TF201-DOCK",
.name = "dock",
.components = EC_PART_BATTERY|EC_PART_CHARGE_LED|
EC_PART_I8042|EC_PART_EXT_KEYS,
},
{ /* Asus T114 Transformer Pad */
.model = "ASUS-TF701T-PAD",
.name = "pad",
.components = EC_PART_BATTERY|EC_PART_CHARGE_LED,
.flags = EC_FLAG_SET_MODE,
},
{ /* Asus T20 Mobile Dock */
.model = "ASUS-EP101-DOCK",
.name = "dock",
.components = EC_PART_BATTERY|EC_PART_CHARGE_LED|
EC_PART_I8042|EC_PART_EXT_KEYS,
},
};

int asusec_signal_request(const struct asusec_info *ec)
Expand Down