Tegra: add ASUS/Google Nexus 7 (2012) support
Subsystems (3)
v2 cover Tegra: add ASUS/Google Nexus 7 (2012) support
This patchset adds support for native use of U-Boot on ASUS/Google Nexus 7 (2012), aka grouper/tilapia as a replacement of vendor bootloader. Alongside device bringup tegra requires few small patches:
- add gpio keyboard as stdin device
- make networking boot options optional
- add a small tool to generate SoC UID
---
Changes from v1:
- fix fuse headers for newer Tegra generations
- allow grouper_common_defconfig to pass without fragments
---
Jonas Schwöbel (1):
configs: tegra-common-post: make PXE and DHCP boot targets optional
Svyatoslav Ryhel (3):
configs: tegra-common-post: add GPIO keyboard as STDIN device
ARM: tegra: add SoC UID calculation function
board: asus: grouper: add Google Nexus 7 (2012) support
arch/arm/dts/Makefile | 3 + arch/arm/dts/tegra30-asus-grouper-common.dtsi | 125 ++++++ .../dts/tegra30-asus-nexus7-grouper-E1565.dts | 40 ++ .../dts/tegra30-asus-nexus7-grouper-PM269.dts | 65 ++++ .../dts/tegra30-asus-nexus7-tilapia-E1565.dts | 40 ++ arch/arm/include/asm/arch-tegra/fuse.h | 7 + arch/arm/mach-tegra/Makefile | 2 +- arch/arm/mach-tegra/fuse.c | 151 ++++++++ arch/arm/mach-tegra/tegra30/Kconfig | 5 + board/asus/grouper/Kconfig | 22 ++ board/asus/grouper/MAINTAINERS | 6 + board/asus/grouper/Makefile | 14 + board/asus/grouper/grouper-spl-max.c | 46 +++ board/asus/grouper/grouper-spl-ti.c | 42 ++ board/asus/grouper/grouper.c | 209 ++++++++++ board/asus/grouper/pinmux-config-grouper.h | 362 ++++++++++++++++++ configs/grouper_E1565.config | 2 + configs/grouper_PM269.config | 2 + configs/grouper_common_defconfig | 84 ++++ configs/tilapia.config | 3 + include/configs/grouper.h | 68 ++++ include/configs/tegra-common-post.h | 28 +- 22 files changed, 1320 insertions(+), 6 deletions(-) create mode 100644 arch/arm/dts/tegra30-asus-grouper-common.dtsi create mode 100644 arch/arm/dts/tegra30-asus-nexus7-grouper-E1565.dts create mode 100644 arch/arm/dts/tegra30-asus-nexus7-grouper-PM269.dts create mode 100644 arch/arm/dts/tegra30-asus-nexus7-tilapia-E1565.dts create mode 100644 arch/arm/mach-tegra/fuse.c create mode 100644 board/asus/grouper/Kconfig create mode 100644 board/asus/grouper/MAINTAINERS create mode 100644 board/asus/grouper/Makefile create mode 100644 board/asus/grouper/grouper-spl-max.c create mode 100644 board/asus/grouper/grouper-spl-ti.c create mode 100644 board/asus/grouper/grouper.c create mode 100644 board/asus/grouper/pinmux-config-grouper.h create mode 100644 configs/grouper_E1565.config create mode 100644 configs/grouper_PM269.config create mode 100644 configs/grouper_common_defconfig create mode 100644 configs/tilapia.config create mode 100644 include/configs/grouper.h
Signature · 1 line
2.37.2
PATCH v2 1/4 configs: tegra-common-post: add GPIO keyboard as STDIN device
GPIO keyboard is used on many newly upstreamed devices.
--- include/configs/tegra-common-post.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
include/configs/tegra-common-post.h +7 -1
@@ -35,6 +35,12 @@#define STDIN_KBD_USB ""#endif +#ifdef CONFIG_BUTTON_KEYBOARD +#define STDIN_BTN_KBD ",button-kbd" +#else +#define STDIN_BTN_KBD "" +#endif +#ifdef CONFIG_VIDEO #define STDOUT_VIDEO ",vidconsole"#else
@@ -48,7 +54,7 @@#endif #define TEGRA_DEVICE_SETTINGS \ - "stdin=serial" STDIN_KBD_KBC STDIN_KBD_USB STDOUT_CROS_EC "\0" \ + "stdin=serial" STDIN_KBD_KBC STDIN_KBD_USB STDOUT_CROS_EC STDIN_BTN_KBD "\0" \ "stdout=serial" STDOUT_VIDEO "\0" \ "stderr=serial" STDOUT_VIDEO "\0" \ ""
Signature · 1 line
2.37.2
PATCH v2 2/4 configs: tegra-common-post: make PXE and DHCP boot targets optional
In reply to Svyatoslav RyhelFrom: Jonas Schwöbel <[email protected]>
Disabling the network related features in defconfig causes build to fail so make them optional.
--- include/configs/tegra-common-post.h | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-)
include/configs/tegra-common-post.h +16 -4
@@ -8,9 +8,21 @@#define __TEGRA_COMMON_POST_H#if IS_ENABLED (CONFIG_CMD_USB ) -# define BOOT_TARGET_USB (func) func(USB, usb, 0) +#define BOOT_TARGET_USB (func) func(USB, usb, 0)#else -# define BOOT_TARGET_USB (func) +#define BOOT_TARGET_USB (func) +#endif + +#if CONFIG_IS_ENABLED (CMD_DHCP ) &&CONFIG_IS_ENABLED (CMD_PXE ) +#define BOOT_TARGET_PXE (func) func(PXE, pxe, na) +#else +#define BOOT_TARGET_PXE (func) +#endif + +#if CONFIG_IS_ENABLED (CMD_DHCP ) +#define BOOT_TARGET_DHCP (func) func(DHCP, dhcp, na) +#else +#define BOOT_TARGET_DHCP (func)#endif #ifndef BOOT_TARGET_DEVICES
@@ -18,8 +30,8 @@ func(MMC, mmc, 1) \ func(MMC, mmc, 0) \ BOOT_TARGET_USB(func) \ - func(PXE, pxe, na) \ - func(DHCP, dhcp, na) + BOOT_TARGET_PXE(func) \ + BOOT_TARGET_DHCP(func)#endif #include <config_distro_bootcmd.h>
Signature · 1 line
2.37.2
PATCH v2 3/4 ARM: tegra: add SoC UID calculation function
In reply to Svyatoslav RyhelThis is a small tool for calculation of SoC UID based on the same Linux function. It can be further used for generation of device unique data like mac address or exposing it as serial number.
--- arch/arm/include/asm/arch-tegra/fuse.h | 7 ++ arch/arm/mach-tegra/Makefile | 2 +- arch/arm/mach-tegra/fuse.c | 151 +++++++++++++++++++++++++ 3 files changed, 159 insertions(+), 1 deletion(-) create mode 100644 arch/arm/mach-tegra/fuse.c
arch/arm/include/asm/arch-tegra/fuse.h +7 -0
@@ -19,4 +19,11 @@ struct fuse_regs { u32 security_mode; /* 0x1A0: FUSE_SECURITY_MODE */ }; +/** +* Calculate SoC UID +* +* Return: uid if ok, 0 on error +*/ +unsigned long long tegra_chip_uid (void ); +#endif /* ifndef _FUSE_H_ */
arch/arm/mach-tegra/Makefile +1 -1
@@ -14,7 +14,7 @@ endif obj-$(CONFIG_TEGRA_GP_PADCTRL) += ap.o obj-y += board.o board2.o -obj-y += cache.o +obj-y += cache.o fuse.o obj-$(CONFIG_TEGRA_CLKRST) += clock.o obj-$(CONFIG_$(SPL_)TEGRA_CRYPTO) += crypto.o obj-$(CONFIG_TEGRA_PINCTRL) += pinmux-common.o
arch/arm/mach-tegra/fuse.c new file +151 -0
151 lines not on this page · raw message
Signature · 1 line
2.37.2
PATCH v2 4/4 board: asus: grouper: add Google Nexus 7 (2012) support
In reply to Svyatoslav RyhelNexus 7 is a mini tablet computer co-developed by Google and Asus that runs the Android operating system. The Nexus 7 features a 7" display, an Nvidia Tegra 3 quad-core chip, 1 GB of RAM and 8/16 GB of internal storage.
This patch brings support for all 3 known ASUS/Google devices:
- Nexus 7 (2012) E1565
- Nexus 7 (2012) PM269
- Nexus 7 (2012) 3G - tilapia
--- arch/arm/dts/Makefile | 3 + arch/arm/dts/tegra30-asus-grouper-common.dtsi | 125 ++++++ .../dts/tegra30-asus-nexus7-grouper-E1565.dts | 40 ++ .../dts/tegra30-asus-nexus7-grouper-PM269.dts | 65 ++++ .../dts/tegra30-asus-nexus7-tilapia-E1565.dts | 40 ++ arch/arm/mach-tegra/tegra30/Kconfig | 5 + board/asus/grouper/Kconfig | 22 ++ board/asus/grouper/MAINTAINERS | 6 + board/asus/grouper/Makefile | 14 + board/asus/grouper/grouper-spl-max.c | 46 +++ board/asus/grouper/grouper-spl-ti.c | 42 ++ board/asus/grouper/grouper.c | 209 ++++++++++ board/asus/grouper/pinmux-config-grouper.h | 362 ++++++++++++++++++ configs/grouper_E1565.config | 2 + configs/grouper_PM269.config | 2 + configs/grouper_common_defconfig | 84 ++++ configs/tilapia.config | 3 + include/configs/grouper.h | 68 ++++ 18 files changed, 1138 insertions(+) create mode 100644 arch/arm/dts/tegra30-asus-grouper-common.dtsi create mode 100644 arch/arm/dts/tegra30-asus-nexus7-grouper-E1565.dts create mode 100644 arch/arm/dts/tegra30-asus-nexus7-grouper-PM269.dts create mode 100644 arch/arm/dts/tegra30-asus-nexus7-tilapia-E1565.dts create mode 100644 board/asus/grouper/Kconfig create mode 100644 board/asus/grouper/MAINTAINERS create mode 100644 board/asus/grouper/Makefile create mode 100644 board/asus/grouper/grouper-spl-max.c create mode 100644 board/asus/grouper/grouper-spl-ti.c create mode 100644 board/asus/grouper/grouper.c create mode 100644 board/asus/grouper/pinmux-config-grouper.h create mode 100644 configs/grouper_E1565.config create mode 100644 configs/grouper_PM269.config create mode 100644 configs/grouper_common_defconfig create mode 100644 configs/tilapia.config create mode 100644 include/configs/grouper.h
arch/arm/dts/Makefile +3 -0
@@ -227,6 +227,9 @@ dtb-$(CONFIG_ARCH_TEGRA) += tegra20-harmony.dtb \ tegra20-ventana.dtb \ tegra20-colibri.dtb \ tegra30-apalis.dtb \ + tegra30-asus-nexus7-grouper-PM269.dtb \ + tegra30-asus-nexus7-grouper-E1565.dtb \ + tegra30-asus-nexus7-tilapia-E1565.dtb \ tegra30-beaver.dtb \ tegra30-cardhu.dtb \ tegra30-colibri.dtb \
arch/arm/dts/tegra30-asus-grouper-common.dtsi new file +125 -0
125 lines not on this page · raw message
arch/arm/dts/tegra30-asus-nexus7-grouper-E1565.dts new file +40 -0
@@ -0,0 +1,40 @@ +// SPDX-License-Identifier: GPL-2.0 +/dts-v1/; + +#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>; + }; + }; + }; +};
arch/arm/dts/tegra30-asus-nexus7-grouper-PM269.dts new file +65 -0
65 lines not on this page · raw message
arch/arm/dts/tegra30-asus-nexus7-tilapia-E1565.dts new file +40 -0
@@ -0,0 +1,40 @@ +// SPDX-License-Identifier: GPL-2.0 +/dts-v1/; + +#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>; + }; + }; + }; +};
arch/arm/mach-tegra/tegra30/Kconfig +5 -0
@@ -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
@@ -29,6 +33,7 @@ endchoice config SYS_SOC default "tegra30" +source "board/asus/grouper/Kconfig" source "board/toradex/apalis_t30/Kconfig" source "board/nvidia/beaver/Kconfig" source "board/nvidia/cardhu/Kconfig"
board/asus/grouper/Kconfig new file +22 -0
@@ -0,0 +1,22 @@ +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" + select CMD_POWEROFF + default n + +config GROUPER_MAX77663 + bool "Enable support MAXIM MAX77663 PMIC" + select CMD_POWEROFF + default n + +endif
board/asus/grouper/MAINTAINERS new file +6 -0
@@ -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
board/asus/grouper/Makefile new file +14 -0
@@ -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
board/asus/grouper/grouper-spl-max.c new file +46 -0
46 lines not on this page · raw message
board/asus/grouper/grouper-spl-ti.c new file +42 -0
42 lines not on this page · raw message
board/asus/grouper/grouper.c new file +209 -0
209 lines not on this page · raw message
board/asus/grouper/pinmux-config-grouper.h new file +362 -0
362 lines not on this page · raw message
configs/grouper_E1565.config new file +2 -0
@@ -0,0 +1,2 @@ +CONFIG_DEFAULT_DEVICE_TREE="tegra30-asus-nexus7-grouper-E1565" +CONFIG_GROUPER_MAX77663=y
configs/grouper_PM269.config new file +2 -0
@@ -0,0 +1,2 @@ +CONFIG_DEFAULT_DEVICE_TREE="tegra30-asus-nexus7-grouper-PM269" +CONFIG_GROUPER_TPS65911=y
configs/grouper_common_defconfig new file +84 -0
84 lines not on this page · raw message
configs/tilapia.config new file +3 -0
@@ -0,0 +1,3 @@ +CONFIG_DEFAULT_DEVICE_TREE="tegra30-asus-nexus7-tilapia-E1565" +CONFIG_GROUPER_MAX77663=y +CONFIG_SYS_PROMPT="Tegra30 (Tilapia) # "
include/configs/grouper.h new file +68 -0
68 lines not on this page · raw message
Signature · 1 line
2.37.2