Skip to content

Commit

Permalink
asus: grouper: add Google Nexus 7 (2012) support
Browse files Browse the repository at this point in the history
Includes 3 ASUS/Google devices:
- Nexus 7 (2012) E1565
- Nexus 7 (2012) PM269
- Nexus 7 (2012) 3G - tilapia

Tested-by: Andreas Westman Dorcsak <[email protected]> # ASUS Grouper E1565
Signed-off-by: Svyatoslav Ryhel <[email protected]>
  • Loading branch information
clamor-s committed Jan 20, 2023
1 parent 0a71bd7 commit 7c30624
Show file tree
Hide file tree
Showing 19 changed files with 1,282 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/arm/dts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,9 @@ dtb-$(CONFIG_ARCH_TEGRA) += \
tegra20-colibri.dtb \
tegra20-qemu.dtb \
tegra30-apalis.dtb \
tegra30-asus-nexus7-grouper-PM269.dtb \
tegra30-asus-nexus7-grouper-E1565.dtb \
tegra30-asus-nexus7-tilapia-E1565.dtb \
tegra30-asus-p1801-t.dtb \
tegra30-asus-tf201.dtb \
tegra30-asus-tf300t.dtb \
Expand Down
126 changes: 126 additions & 0 deletions arch/arm/dts/tegra30-asus-grouper-common.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
// SPDX-License-Identifier: GPL-2.0-or-later

#include <dt-bindings/input/gpio-keys.h>
#include <dt-bindings/input/linux-event-codes.h>

#include "tegra30.dtsi"

/ {
chosen {
stdout-path = &uarta;
};

aliases {
i2c0 = &pmic_i2c;

mmc0 = &sdmmc4; /* eMMC */

rtc1 = "/rtc@7000e000";

usb0 = &usb1;
};

memory {
device_type = "memory";
reg = <0x80000000 0x40000000>;
};

host1x@50000000 {
dc@54200000 {
nvidia,180-rotation;
rgb {
status = "okay";

nvidia,panel = <&panel>;
};
};
};

gpio@6000d000 {
volume-buttons-hog {
gpio-hog;
gpios = <TEGRA_GPIO(R, 0) GPIO_ACTIVE_HIGH>,
<TEGRA_GPIO(Q, 0) GPIO_ACTIVE_HIGH>;
output-low;
};
};

uarta: serial@70006000 {
status = "okay";
};

pwm: pwm@7000a000 {
status = "okay";
};

sdmmc4: sdhci@78000600 {
status = "okay";
bus-width = <8>;
non-removable;
};

usb1: usb@7d000000 {
status = "okay";
dr_mode = "otg";
};

backlight: backlight {
compatible = "pwm-backlight";

enable-gpios = <&gpio TEGRA_GPIO(H, 2) GPIO_ACTIVE_HIGH>;
power-supply = <&vdd_5v0_bl>;
pwms = <&pwm 0 50000>;

brightness-levels = <0 4 8 16 32 64 128 255>;
default-brightness-level = <6>;
};

/* PMIC has a built-in 32KHz oscillator which is used by PMC */
clk32k_in: clock-32k {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <32768>;
clock-output-names = "pmic-oscillator";
};

gpio-keyboard {
compatible = "gpio-kbd";

key-power {
label = "Power";
gpios = <&gpio TEGRA_GPIO(V, 0) GPIO_ACTIVE_LOW>;
linux,code = <KEY_ENTER>;
};

key-volume-up {
label = "Volume Up";
gpios = <&gpio TEGRA_GPIO(Q, 2) GPIO_ACTIVE_LOW>;
linux,code = <KEY_UP>;
};

key-volume-down {
label = "Volume Down";
gpios = <&gpio TEGRA_GPIO(Q, 3) GPIO_ACTIVE_LOW>;
linux,code = <KEY_DOWN>;
};
};

vdd_pnl_reg: regulator-pnl {
compatible = "regulator-fixed";
regulator-name = "vdd_panel";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
gpio = <&gpio TEGRA_GPIO(W, 1) GPIO_ACTIVE_HIGH>;
enable-active-high;
};

vdd_5v0_bl: regulator-bl {
compatible = "regulator-fixed";
regulator-name = "vdd_5v0_bl";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
regulator-boot-on;
gpio = <&gpio TEGRA_GPIO(H, 3) GPIO_ACTIVE_HIGH>;
enable-active-high;
};
};
43 changes: 43 additions & 0 deletions arch/arm/dts/tegra30-asus-nexus7-grouper-E1565.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// SPDX-License-Identifier: GPL-2.0-or-later
/dts-v1/;

#include <dt-bindings/input/gpio-keys.h>
#include <dt-bindings/input/linux-event-codes.h>

#include "tegra30-asus-grouper-common.dtsi"

/ {
model = "ASUS Google Nexus 7 (Project Nakasi / ME370T) E1565";
compatible = "asus,grouper", "nvidia,tegra30";

pmic_i2c: i2c@7000d000 {
status = "okay";
clock-frequency = <400000>;
};

panel: panel {
compatible = "simple-panel";

power-supply = <&vdd_pnl_reg>;
enable-gpios = <&gpio TEGRA_GPIO(N, 6) GPIO_ACTIVE_HIGH>;

backlight = <&backlight>;

display-timings {
timing@0 {
/* 1280x800@60Hz */
clock-frequency = <68000000>;

hactive = <800>;
hfront-porch = <24>;
hback-porch = <32>;
hsync-len = <24>;

vactive = <1280>;
vfront-porch = <5>;
vback-porch = <32>;
vsync-len = <1>;
};
};
};
};
68 changes: 68 additions & 0 deletions arch/arm/dts/tegra30-asus-nexus7-grouper-PM269.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
// SPDX-License-Identifier: GPL-2.0-or-later
/dts-v1/;

#include <dt-bindings/input/gpio-keys.h>
#include <dt-bindings/input/linux-event-codes.h>

#include "tegra30-asus-grouper-common.dtsi"

/ {
model = "ASUS Google Nexus 7 (Project Nakasi / ME370T) PM269";
compatible = "asus,grouper", "nvidia,tegra30";

pmic_i2c: i2c@7000d000 {
status = "okay";
clock-frequency = <400000>;

/* Texas Instruments TPS659110 PMIC */
pmic: tps65911@2d {
compatible = "ti,tps65911";
reg = <0x2d>;

interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
#interrupt-cells = <2>;
interrupt-controller;

ti,system-power-controller;

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

regulators {
/* eMMC VDD */
vcore_emmc: ldo1 {
regulator-name = "vdd_emmc_core";
regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <3300000>;
regulator-always-on;
};
};
};
};

panel: panel {
compatible = "simple-panel";

power-supply = <&vdd_pnl_reg>;
enable-gpios = <&gpio TEGRA_GPIO(N, 6) GPIO_ACTIVE_HIGH>;

backlight = <&backlight>;

display-timings {
timing@0 {
/* 1280x800@60Hz */
clock-frequency = <68000000>;

hactive = <800>;
hfront-porch = <24>;
hback-porch = <32>;
hsync-len = <24>;

vactive = <1280>;
vfront-porch = <5>;
vback-porch = <32>;
vsync-len = <1>;
};
};
};
};
43 changes: 43 additions & 0 deletions arch/arm/dts/tegra30-asus-nexus7-tilapia-E1565.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// SPDX-License-Identifier: GPL-2.0-or-later
/dts-v1/;

#include <dt-bindings/input/gpio-keys.h>
#include <dt-bindings/input/linux-event-codes.h>

#include "tegra30-asus-grouper-common.dtsi"

/ {
model = "ASUS Google Nexus 7 (Project Bach / ME370TG) E1565";
compatible = "asus,tilapia", "nvidia,tegra30";

pmic_i2c: i2c@7000d000 {
status = "okay";
clock-frequency = <400000>;
};

panel: panel {
compatible = "simple-panel";

power-supply = <&vdd_pnl_reg>;
enable-gpios = <&gpio TEGRA_GPIO(N, 6) GPIO_ACTIVE_HIGH>;

backlight = <&backlight>;

display-timings {
timing@0 {
/* 1280x800@60Hz */
clock-frequency = <81750000>;

hactive = <800>;
hfront-porch = <64>;
hback-porch = <128>;
hsync-len = <64>;

vactive = <1280>;
vfront-porch = <5>;
vback-porch = <2>;
vsync-len = <1>;
};
};
};
};
5 changes: 5 additions & 0 deletions arch/arm/mach-tegra/tegra30/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ config TARGET_COLIBRI_T30
bool "Toradex Colibri T30 board"
select BOARD_LATE_INIT

config TARGET_GROUPER
bool "Asus and Google Grouper board"
select BOARD_LATE_INIT

config TARGET_TEC_NG
bool "Avionic Design TEC-NG board"
select BOARD_LATE_INIT
Expand All @@ -37,6 +41,7 @@ endchoice
config SYS_SOC
default "tegra30"

source "board/asus/grouper/Kconfig"
source "board/asus/transformer-t30/Kconfig"
source "board/toradex/apalis_t30/Kconfig"
source "board/nvidia/beaver/Kconfig"
Expand Down
20 changes: 20 additions & 0 deletions board/asus/grouper/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
if TARGET_GROUPER

config SYS_BOARD
default "grouper"

config SYS_VENDOR
default "asus"

config SYS_CONFIG_NAME
default "grouper"

config GROUPER_TPS65911
bool "Enable support TI TPS65911 PMIC"
default n

config GROUPER_MAX77663
bool "Enable support MAXIM MAX77663 PMIC"
default n

endif
6 changes: 6 additions & 0 deletions board/asus/grouper/MAINTAINERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
GROUPER BOARD
M: Svyatoslav Ryhel <[email protected]>
S: Maintained
F: board/asus/grouper/
F: include/configs/grouper.h
F: configs/grouper_common_defconfig
14 changes: 14 additions & 0 deletions board/asus/grouper/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# SPDX-License-Identifier: GPL-2.0-or-later
#
# (C) Copyright 2010-2012
# NVIDIA Corporation <www.nvidia.com>
#
# (C) Copyright 2021
# Svyatoslav Ryhel <[email protected]>

ifdef CONFIG_SPL_BUILD
obj-$(CONFIG_GROUPER_MAX77663) += grouper-spl-max.o
obj-$(CONFIG_GROUPER_TPS65911) += grouper-spl-ti.o
endif

obj-y += grouper.o grouper-late.o
Loading

0 comments on commit 7c30624

Please sign in to comment.