From patchwork Tue Dec 15 12:32:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 1416427 X-Patchwork-Delegate: narmstrong@baylibre.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=OQohrmLi; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CwJhQ0F7nz9sPB for ; Wed, 16 Dec 2020 00:17:25 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7642682980; Tue, 15 Dec 2020 14:17:13 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="OQohrmLi"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1031182956; Tue, 15 Dec 2020 13:32:25 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3388A8293C for ; Tue, 15 Dec 2020 13:32:21 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=christianshewitt@gmail.com Received: by mail-wm1-x344.google.com with SMTP id a3so18323744wmb.5 for ; Tue, 15 Dec 2020 04:32:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=H3VUdZGzEC9eqg/X4nAd3MWNdFxy1Z+n9ALXgdjNxyM=; b=OQohrmLi2LNUknToKj65XAhnxkWbhx86VhySburvjPgschC91O9tH0L68kpiceL+Lb 7ro6shtCO2Y30JsSAL+zl//qSvX8FHjLGAYgHDvDb32PG6w976EJUZqdj/UXOV+dy/Z+ vjY1+i2G6aijW/24ODt19rUt2mzSjGqiKJE4bI58tlUn69YQoBV1GWwKH0R6+cD9T0rO BfE2lJlafeoEUEylGNJ8RcV+4dy9a+j9dxuMrBJkNsZqWj5Tj5XEzS3+4yfZ2OX8yK7z Exa32yl1415RhvoHj/vebHNx6gEM0DnPbBMYEv0O+yuVQpZLgdJpicM+3U40u68dgNX+ zqSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=H3VUdZGzEC9eqg/X4nAd3MWNdFxy1Z+n9ALXgdjNxyM=; b=t7UvmKkJ1R/+wYcjYq7t5jmCpV76KlpwKlo13rbauknom10otGmrQmhJ1nkPf4k2F/ sRp7sFrj7FbpfsSlM5/DTocCV+7uPKW2TOyweBd34gFOpbQGky4r6TbuUMAKE25PHb1H eF9YyMF5FvADFHTpHwMsJskMHHPdL7PZyZv6Ju9qZSy2HzPp+wsK7TXgWv9JbQpUb9of ITqTSzZEJNlD9RbqDUJGpyh6pgB6ITYfZ9EKKDLm/J7yIzVRT3IQtzBwpBtvQZZp4tAD irP6KYN2IkW1qQwtfW7xunP8oJ3yd0qQeOyWIU07yqUzDga5FRpaBL8ZCxq0Zo4mErc2 CN8A== X-Gm-Message-State: AOAM5309/ux0Ro2PO1ibcjG6rlOz0tzbEArm57NO4lYdvP6g62saJvNo ks0DtRRmgBwPVhjEKOzg8EVtQXhl8A1KfA== X-Google-Smtp-Source: ABdhPJwTL8lGr6ZSq3bxjxEZ467wWY+TTAKgLLQOV/71DpKy27zq72FvD+5COYSpF6gUySN3wt5Skg== X-Received: by 2002:a1c:6446:: with SMTP id y67mr2029443wmb.144.1608035540355; Tue, 15 Dec 2020 04:32:20 -0800 (PST) Received: from localhost.localdomain ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id n3sm38488406wrw.61.2020.12.15.04.32.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Dec 2020 04:32:19 -0800 (PST) From: Christian Hewitt To: u-boot@lists.denx.de, u-boot-amlogic@groups.io, linux-amlogic@lists.infradead.org Cc: Christian Hewitt Subject: [PATCH 1/3] ARM: dts: import WeTek Core2 DTs from Linux 5.10 Date: Tue, 15 Dec 2020 12:32:12 +0000 Message-Id: <20201215123214.18661-2-christianshewitt@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201215123214.18661-1-christianshewitt@gmail.com> References: <20201215123214.18661-1-christianshewitt@gmail.com> X-Mailman-Approved-At: Tue, 15 Dec 2020 14:17:09 +0100 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Import the WeTek Core2 and supporting meson-gx-p23x-q20x.dtsi files from Linux 5.10. Signed-off-by: Christian Hewitt --- arch/arm/dts/Makefile | 1 + arch/arm/dts/meson-gx-p23x-q20x.dtsi | 324 ++++++++++++++++++ .../arm/dts/meson-gxm-wetek-core2-u-boot.dtsi | 7 + arch/arm/dts/meson-gxm-wetek-core2.dts | 87 +++++ 4 files changed, 419 insertions(+) create mode 100644 arch/arm/dts/meson-gx-p23x-q20x.dtsi create mode 100644 arch/arm/dts/meson-gxm-wetek-core2-u-boot.dtsi create mode 100644 arch/arm/dts/meson-gxm-wetek-core2.dts diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 4cbf3746f3..99f89227cb 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -166,6 +166,7 @@ dtb-$(CONFIG_ARCH_MESON) += \ meson-gxl-s905d-libretech-pc.dtb \ meson-gxm-khadas-vim2.dtb \ meson-gxm-s912-libretech-pc.dtb \ + meson-gxm-wetek-core2.dtb \ meson-axg-s400.dtb \ meson-g12a-u200.dtb \ meson-g12a-sei510.dtb \ diff --git a/arch/arm/dts/meson-gx-p23x-q20x.dtsi b/arch/arm/dts/meson-gx-p23x-q20x.dtsi new file mode 100644 index 0000000000..6b57e15aad --- /dev/null +++ b/arch/arm/dts/meson-gx-p23x-q20x.dtsi @@ -0,0 +1,324 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2016 Endless Computers, Inc. + * Author: Carlo Caione + */ + +/* Common DTSI for same Amlogic Q200/Q201 and P230/P231 boards using either + * the pin-compatible S912 (GXM) or S905D (GXL) SoCs. + */ + +#include + +/ { + aliases { + serial0 = &uart_AO; + ethernet0 = ðmac; + }; + + dio2133: analog-amplifier { + compatible = "simple-audio-amplifier"; + sound-name-prefix = "AU2"; + VCC-supply = <&hdmi_5v>; + enable-gpios = <&gpio GPIOH_5 GPIO_ACTIVE_HIGH>; + }; + + spdif_dit: audio-codec-0 { + #sound-dai-cells = <0>; + compatible = "linux,spdif-dit"; + status = "okay"; + sound-name-prefix = "DIT"; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x0 0x0 0x80000000>; + }; + + hdmi_5v: regulator-hdmi-5v { + compatible = "regulator-fixed"; + + regulator-name = "HDMI_5V"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + + gpio = <&gpio GPIOH_3 GPIO_ACTIVE_HIGH>; + enable-active-high; + regulator-always-on; + }; + + vddio_ao18: regulator-vddio_ao18 { + compatible = "regulator-fixed"; + regulator-name = "VDDIO_AO18"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + vddio_boot: regulator-vddio_boot { + compatible = "regulator-fixed"; + regulator-name = "VDDIO_BOOT"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + vddao_3v3: regulator-vddao_3v3 { + compatible = "regulator-fixed"; + regulator-name = "VDDAO_3V3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; + + vcc_3v3: regulator-vcc_3v3 { + compatible = "regulator-fixed"; + regulator-name = "VCC_3V3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; + + emmc_pwrseq: emmc-pwrseq { + compatible = "mmc-pwrseq-emmc"; + reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>; + }; + + wifi32k: wifi32k { + compatible = "pwm-clock"; + #clock-cells = <0>; + clock-frequency = <32768>; + pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */ + }; + + sdio_pwrseq: sdio-pwrseq { + compatible = "mmc-pwrseq-simple"; + reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>; + clocks = <&wifi32k>; + clock-names = "ext_clock"; + }; + + cvbs-connector { + compatible = "composite-video-connector"; + + port { + cvbs_connector_in: endpoint { + remote-endpoint = <&cvbs_vdac_out>; + }; + }; + }; + + hdmi-connector { + compatible = "hdmi-connector"; + type = "a"; + + port { + hdmi_connector_in: endpoint { + remote-endpoint = <&hdmi_tx_tmds_out>; + }; + }; + }; + + sound { + compatible = "amlogic,gx-sound-card"; + model = "GX-P230-Q200"; + audio-aux-devs = <&dio2133>; + audio-widgets = "Line", "Lineout"; + audio-routing = "AU2 INL", "ACODEC LOLP", + "AU2 INR", "ACODEC LORP", + "AU2 INL", "ACODEC LOLN", + "AU2 INR", "ACODEC LORN", + "Lineout", "AU2 OUTL", + "Lineout", "AU2 OUTR"; + assigned-clocks = <&clkc CLKID_MPLL0>, + <&clkc CLKID_MPLL1>, + <&clkc CLKID_MPLL2>; + assigned-clock-parents = <0>, <0>, <0>; + assigned-clock-rates = <294912000>, + <270950400>, + <393216000>; + status = "okay"; + + dai-link-0 { + sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>; + }; + + dai-link-1 { + sound-dai = <&aiu AIU_CPU CPU_SPDIF_FIFO>; + }; + + dai-link-2 { + sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>; + dai-format = "i2s"; + mclk-fs = <256>; + + codec-0 { + sound-dai = <&aiu AIU_HDMI CTRL_I2S>; + }; + + codec-1 { + sound-dai = <&aiu AIU_ACODEC CTRL_I2S>; + }; + }; + + dai-link-3 { + sound-dai = <&aiu AIU_CPU CPU_SPDIF_ENCODER>; + + codec-0 { + sound-dai = <&spdif_dit>; + }; + }; + + dai-link-4 { + sound-dai = <&aiu AIU_HDMI CTRL_OUT>; + + codec-0 { + sound-dai = <&hdmi_tx>; + }; + }; + + dai-link-5 { + sound-dai = <&aiu AIU_ACODEC CTRL_OUT>; + + codec-0 { + sound-dai = <&acodec>; + }; + }; + }; +}; + +&acodec { + AVDD-supply = <&vddio_ao18>; + status = "okay"; +}; + +&aiu { + status = "okay"; + pinctrl-0 = <&spdif_out_h_pins>; + pinctrl-names = "default"; + +}; + +&cec_AO { + status = "okay"; + pinctrl-0 = <&ao_cec_pins>; + pinctrl-names = "default"; + hdmi-phandle = <&hdmi_tx>; +}; + +&cvbs_vdac_port { + cvbs_vdac_out: endpoint { + remote-endpoint = <&cvbs_connector_in>; + }; +}; + +ðmac { + status = "okay"; +}; + +&hdmi_tx { + status = "okay"; + pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>; + pinctrl-names = "default"; + hdmi-supply = <&hdmi_5v>; +}; + +&hdmi_tx_tmds_port { + hdmi_tx_tmds_out: endpoint { + remote-endpoint = <&hdmi_connector_in>; + }; +}; + +&ir { + status = "okay"; + pinctrl-0 = <&remote_input_ao_pins>; + pinctrl-names = "default"; +}; + +&pwm_ef { + status = "okay"; + pinctrl-0 = <&pwm_e_pins>; + pinctrl-names = "default"; + clocks = <&clkc CLKID_FCLK_DIV4>; + clock-names = "clkin0"; +}; + +&saradc { + status = "okay"; + vref-supply = <&vddio_ao18>; +}; + +/* Wireless SDIO Module */ +&sd_emmc_a { + status = "okay"; + pinctrl-0 = <&sdio_pins>; + pinctrl-1 = <&sdio_clk_gate_pins>; + pinctrl-names = "default", "clk-gate"; + #address-cells = <1>; + #size-cells = <0>; + + bus-width = <4>; + cap-sd-highspeed; + max-frequency = <50000000>; + + non-removable; + disable-wp; + + /* WiFi firmware requires power to be kept while in suspend */ + keep-power-in-suspend; + + mmc-pwrseq = <&sdio_pwrseq>; + + vmmc-supply = <&vddao_3v3>; + vqmmc-supply = <&vddio_boot>; +}; + +/* SD card */ +&sd_emmc_b { + status = "okay"; + pinctrl-0 = <&sdcard_pins>; + pinctrl-1 = <&sdcard_clk_gate_pins>; + pinctrl-names = "default", "clk-gate"; + + bus-width = <4>; + cap-sd-highspeed; + max-frequency = <50000000>; + disable-wp; + + cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>; + + vmmc-supply = <&vddao_3v3>; + vqmmc-supply = <&vddio_boot>; +}; + +/* eMMC */ +&sd_emmc_c { + status = "okay"; + pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>; + pinctrl-1 = <&emmc_clk_gate_pins>; + pinctrl-names = "default", "clk-gate"; + + bus-width = <8>; + cap-mmc-highspeed; + max-frequency = <200000000>; + non-removable; + disable-wp; + mmc-ddr-1_8v; + mmc-hs200-1_8v; + + mmc-pwrseq = <&emmc_pwrseq>; + vmmc-supply = <&vcc_3v3>; + vqmmc-supply = <&vddio_boot>; +}; + +/* This UART is brought out to the DB9 connector */ +&uart_AO { + status = "okay"; + pinctrl-0 = <&uart_ao_a_pins>; + pinctrl-names = "default"; +}; + +&usb { + status = "okay"; + dr_mode = "otg"; +}; diff --git a/arch/arm/dts/meson-gxm-wetek-core2-u-boot.dtsi b/arch/arm/dts/meson-gxm-wetek-core2-u-boot.dtsi new file mode 100644 index 0000000000..39270ea71c --- /dev/null +++ b/arch/arm/dts/meson-gxm-wetek-core2-u-boot.dtsi @@ -0,0 +1,7 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2019 BayLibre, SAS. + * Author: Neil Armstrong + */ + +#include "meson-gxl-u-boot.dtsi" diff --git a/arch/arm/dts/meson-gxm-wetek-core2.dts b/arch/arm/dts/meson-gxm-wetek-core2.dts new file mode 100644 index 0000000000..ec794c134c --- /dev/null +++ b/arch/arm/dts/meson-gxm-wetek-core2.dts @@ -0,0 +1,87 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2020 Christian Hewitt + */ + +/dts-v1/; + +#include "meson-gxm.dtsi" +#include "meson-gx-p23x-q20x.dtsi" +#include +#include + +/ { + compatible = "wetek,core2", "amlogic,s912", "amlogic,meson-gxm"; + model = "WeTek Core 2"; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x0 0x0 0x80000000>; /* 2 GiB or 3 GiB */ + }; + + leds { + compatible = "gpio-leds"; + + blue { + color = ; + function = LED_FUNCTION_STATUS; + gpios = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>; + default-state = "on"; + }; + }; + + adc-keys { + compatible = "adc-keys"; + io-channels = <&saradc 0>; + io-channel-names = "buttons"; + keyup-threshold-microvolt = <1710000>; + + button-update { + label = "update"; + linux,code = ; + press-threshold-microvolt = <10000>; + }; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <100>; + + button-power { + label = "power"; + linux,code = ; + gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>; + }; + }; +}; + +/* Disabled as Realtek RTL8152 USB provides Ethernet */ +ðmac { + status = "disabled"; +}; + +&internal_phy { + status = "disabled"; +}; + +&ir { + linux,rc-map-name = "rc-wetek-play2"; +}; + +/* This is connected to the Bluetooth module: */ +&uart_A { + status = "okay"; + pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>; + pinctrl-names = "default"; + uart-has-rtscts; + + bluetooth { + compatible = "brcm,bcm43438-bt"; + shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>; + max-speed = <2000000>; + clocks = <&wifi32k>; + clock-names = "lpo"; + }; +}; From patchwork Tue Dec 15 12:32:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 1416428 X-Patchwork-Delegate: narmstrong@baylibre.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=YU64BV2a; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CwJhd3K75z9sRK for ; Wed, 16 Dec 2020 00:17:37 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 93D8B82986; Tue, 15 Dec 2020 14:17:15 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="YU64BV2a"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5779082954; Tue, 15 Dec 2020 13:32:25 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,UPPERCASE_50_75 autolearn=no autolearn_force=no version=3.4.2 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 9ABFF82907 for ; Tue, 15 Dec 2020 13:32:22 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=christianshewitt@gmail.com Received: by mail-wr1-x442.google.com with SMTP id w5so15935446wrm.11 for ; Tue, 15 Dec 2020 04:32:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=onEabqdmtNzjpYK/tr7QwKjGVZ6M4J0y8id46375WXs=; b=YU64BV2alvIIxJCNE25UJe+2NWPxNANqkqV6jL6Sx/tDMTP5cTCYN9olyKIXRO8ca4 q3S5GEtuaqeLFOVQAtEwtZTDk/w9egx29NACpcMtL9bM2V1HPls4/qhJr7vSfGepkATF ghL079a15xYro2hY4V54QIOqhlC8KZbgnJw3JmSc0CI+ScryClH7a0ukzyKFsFdeRVib VU5JnVl3n+sLfyaF/DJzeqDCsWV8ct/r1zDuojp5hr4xLEy22qYQdkiWBJU2JpW+0sBE MhtfzKNdaJxZr1kyVx2q8RB7UM0ap9fHTGJQrbNGrawZkUR1kOmyZiyY+cct9G3ZKB3Q HizA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=onEabqdmtNzjpYK/tr7QwKjGVZ6M4J0y8id46375WXs=; b=TRx1VbL/0hEATN0owxwI2mvHjNw7WdT0wugIUG0aS5AV3zQ00cURYbTRcjPHMFo4F7 HrNvsirSTD9sLXi1n23EdZ7fdBFZ7ZbxFjCs3sY5J3sRzRGP42nHozPa0is+hJk5QI8a fomU2chsk7wUSSgaxbaeAjhpAePzws5Mjxl6oQQD41EaKewgyM/TuCAOB41UC9CVpqIO FXiTfZsfv9h/E8Ec5UATpZH9+NPJHGLyohnOt1x/Z9j+zW3FaMg7sH3HQyU8LPOgnw44 caZlA+zOeuhWnq8SjEw9IPLeCWXf9DYegtwwuhNpaIBcnnscMqichG2nKaquOl+eAolj vcRg== X-Gm-Message-State: AOAM531CBe9KTGOuVFPvytOPbmNqZ40kZCyGI2B4zRWsZ94SE+pQ3sqF ZsTYQ31FCp/SBPEyFgvBFwFvBzpIbIgp7A== X-Google-Smtp-Source: ABdhPJwVQb8704rO1fF4GSdOxwCh8yDlh0Qj6MHvE+LJNL8tBNfwwrtfIy2PZAdk2viS/1roA640Eg== X-Received: by 2002:adf:eb08:: with SMTP id s8mr2574901wrn.12.1608035542072; Tue, 15 Dec 2020 04:32:22 -0800 (PST) Received: from localhost.localdomain ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id n3sm38488406wrw.61.2020.12.15.04.32.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Dec 2020 04:32:21 -0800 (PST) From: Christian Hewitt To: u-boot@lists.denx.de, u-boot-amlogic@groups.io, linux-amlogic@lists.infradead.org Cc: Christian Hewitt Subject: [PATCH 2/3] boards: amlogic: add WeTek Core2 support Date: Tue, 15 Dec 2020 12:32:13 +0000 Message-Id: <20201215123214.18661-3-christianshewitt@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201215123214.18661-1-christianshewitt@gmail.com> References: <20201215123214.18661-1-christianshewitt@gmail.com> X-Mailman-Approved-At: Tue, 15 Dec 2020 14:17:09 +0100 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Add a config for the WeTek Core2, largely based on the VIM2 config. Signed-off-by: Christian Hewitt --- configs/wetek-core2_defconfig | 70 +++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 configs/wetek-core2_defconfig diff --git a/configs/wetek-core2_defconfig b/configs/wetek-core2_defconfig new file mode 100644 index 0000000000..706abff962 --- /dev/null +++ b/configs/wetek-core2_defconfig @@ -0,0 +1,70 @@ +CONFIG_ARM=y +CONFIG_ARCH_MESON=y +CONFIG_SYS_TEXT_BASE=0x01000000 +CONFIG_NR_DRAM_BANKS=1 +CONFIG_ENV_SIZE=0x2000 +CONFIG_DM_GPIO=y +CONFIG_MESON_GXM=y +CONFIG_DEBUG_UART_BASE=0xc81004c0 +CONFIG_DEBUG_UART_CLOCK=24000000 +CONFIG_IDENT_STRING=" wetek-core2" +CONFIG_DEFAULT_DEVICE_TREE="meson-gxm-wetek-core2" +CONFIG_DEBUG_UART=y +CONFIG_OF_BOARD_SETUP=y +CONFIG_CONSOLE_MUX=y +# CONFIG_DISPLAY_CPUINFO is not set +CONFIG_MISC_INIT_R=y +# CONFIG_CMD_BDI is not set +# CONFIG_CMD_IMI is not set +CONFIG_CMD_ADC=y +CONFIG_CMD_GPIO=y +# CONFIG_CMD_LOADS is not set +CONFIG_CMD_MMC=y +CONFIG_CMD_SF_TEST=y +CONFIG_CMD_USB=y +CONFIG_CMD_USB_MASS_STORAGE=y +# CONFIG_CMD_SETEXPR is not set +CONFIG_CMD_REGULATOR=y +CONFIG_OF_CONTROL=y +CONFIG_SYS_RELOC_GD_ENV_ADDR=y +CONFIG_NET_RANDOM_ETHADDR=y +CONFIG_SARADC_MESON=y +CONFIG_DM_MMC=y +CONFIG_MMC_MESON_GX=y +CONFIG_MTD=y +CONFIG_DM_MTD=y +CONFIG_PHY_REALTEK=y +CONFIG_DM_ETH=y +CONFIG_ETH_DESIGNWARE=y +CONFIG_MESON_GXL_USB_PHY=y +CONFIG_PINCTRL=y +CONFIG_PINCTRL_MESON_GXL=y +CONFIG_DM_REGULATOR=y +CONFIG_POWER_DOMAIN=y +CONFIG_MESON_GX_VPU_POWER_DOMAIN=y +CONFIG_DM_REGULATOR_FIXED=y +CONFIG_DM_RESET=y +CONFIG_DEBUG_UART_ANNOUNCE=y +CONFIG_DEBUG_UART_MESON=y +CONFIG_DEBUG_UART_SKIP_INIT=y +CONFIG_MESON_SERIAL=y +CONFIG_USB=y +CONFIG_DM_USB=y +CONFIG_USB_KEYBOARD=y +CONFIG_DM_VIDEO=y +# CONFIG_VIDEO_BPP8 is not set +# CONFIG_VIDEO_BPP16 is not set +CONFIG_SYS_WHITE_ON_BLACK=y +CONFIG_VIDEO_MESON=y +CONFIG_VIDEO_DT_SIMPLEFB=y +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_XHCI_DWC3=y +CONFIG_USB_DWC3=y +# CONFIG_USB_DWC3_GADGET is not set +CONFIG_USB_DWC3_MESON_GXL=y +CONFIG_USB_GADGET=y +CONFIG_USB_GADGET_VENDOR_NUM=0x1b8e +CONFIG_USB_GADGET_PRODUCT_NUM=0xfada +CONFIG_USB_GADGET_DWC2_OTG=y +CONFIG_USB_GADGET_DOWNLOAD=y +CONFIG_OF_LIBFDT_OVERLAY=y From patchwork Tue Dec 15 12:32:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 1416429 X-Patchwork-Delegate: narmstrong@baylibre.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=mlgf6qe4; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CwJhq3CnPz9sPB for ; Wed, 16 Dec 2020 00:17:47 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E8D868298F; Tue, 15 Dec 2020 14:17:17 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="mlgf6qe4"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5C0178293C; Tue, 15 Dec 2020 13:32:28 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 51C2D82976 for ; Tue, 15 Dec 2020 13:32:24 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=christianshewitt@gmail.com Received: by mail-wr1-x436.google.com with SMTP id i9so19688131wrc.4 for ; Tue, 15 Dec 2020 04:32:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=z9iUoQ4Wap4UDaUD9Nyn62MUTm5cihfXRRiq9AEQgeg=; b=mlgf6qe4S88imDnU/dtW/FEKtZrxQzMDx5FhOm01CnULODQzuWq9zrW6aKY7iDmwrt O7YuZzv0/tMoHli5oQMPVpdpEb/w9kjLNEDUNt51eI4BMBb5zO0l7e0UfdwAKKYPG8nS xryzoeRGdsB9OhKwLwgBGwSQKADyia67izve5T1Fyix5FraJXXX3zlqJiu8W49RfIDhC +fppLI7vGUhq18u0D/u72QW/Yv1VnNNXYaEQ93O18kKnA4ZOiAN6ORWID4DhECAjyBPP 6vAtLEsyKp4Sei/JdnVKW8CB4vGx+ktviMZu4Ad9mfoIZuFnKplRd/vs3pbqkUgagCXE xh5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=z9iUoQ4Wap4UDaUD9Nyn62MUTm5cihfXRRiq9AEQgeg=; b=H7pROZHW+yk0yjKIJgmnjqHJxtSNdivjK2sFXTPW6b6y8VXxYljNUW5sRwrmftOxPo 7Bn1O/xuxhxnfPFu2Ft8j1a0MKAXX+jP1nF5eN2WXLHF43IeFXrVCFuZXnRUftKw1JVS IVETig0ZqDfwiVaX/EyQ380/SGDKybC0xgriLn5GJszcAE8BeZr3LKWq+xHP2c9BsRD4 ebKVlloUNQ0KtBPdP75711K3YIrkQ7HFX5ChvSMULhSuSRDVD0flV7h3o8tln+e1/Z8z 74FeLNFUbr3kV4sSJXgF6WNP+dnZxD58p0HC3Ijkzri9FUVn9S3ptw7MR0GTafXdt0rX x4fQ== X-Gm-Message-State: AOAM533HxY2++cXG34meVLIhEXm/NWMOvq00hvZIaLVBPNSHDW6rIbZa arGAeYkufBDuMrS2DW0SqWg0aXJ/7wPglw== X-Google-Smtp-Source: ABdhPJyv0J94bRxM53cOCs2rYD+3cNvooroO96OVSRJtQ+vW6bjVrq+bfuyV8p8bf1ndRoePbZDmnA== X-Received: by 2002:a05:6000:1152:: with SMTP id d18mr2563143wrx.6.1608035543643; Tue, 15 Dec 2020 04:32:23 -0800 (PST) Received: from localhost.localdomain ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id n3sm38488406wrw.61.2020.12.15.04.32.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Dec 2020 04:32:23 -0800 (PST) From: Christian Hewitt To: u-boot@lists.denx.de, u-boot-amlogic@groups.io, linux-amlogic@lists.infradead.org Cc: Christian Hewitt Subject: [PATCH 3/3] boards: amlogic: update documentation for WeTek Core2 Date: Tue, 15 Dec 2020 12:32:14 +0000 Message-Id: <20201215123214.18661-4-christianshewitt@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201215123214.18661-1-christianshewitt@gmail.com> References: <20201215123214.18661-1-christianshewitt@gmail.com> X-Mailman-Approved-At: Tue, 15 Dec 2020 14:17:09 +0100 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Update the device matrix and add build instructions. Signed-off-by: Christian Hewitt --- doc/board/amlogic/index.rst | 3 +- doc/board/amlogic/wetek-core2.rst | 90 +++++++++++++++++++++++++++++++ 2 files changed, 92 insertions(+), 1 deletion(-) create mode 100644 doc/board/amlogic/wetek-core2.rst diff --git a/doc/board/amlogic/index.rst b/doc/board/amlogic/index.rst index cba1c7b726..a585d857df 100644 --- a/doc/board/amlogic/index.rst +++ b/doc/board/amlogic/index.rst @@ -17,7 +17,7 @@ This matrix concerns the actual source code version. +===============================+===========+=================+==============+============+============+=============+==============+ | Boards | Odroid-C2 | P212 | Khadas VIM2 | S400 | U200 | Odroid-N2 | SEI610 | | | Nanopi-K2 | Khadas-VIM | Libretech-PC | | SEI510 | Khadas-VIM3 | Khadas-VIM3L | -| | P200 | LibreTech-CC v1 | | | | | Odroid-C4 | +| | P200 | LibreTech-CC v1 | WeTek Core2 | | | | Odroid-C4 | | | P201 | LibreTech-AC v2 | | | | | | +-------------------------------+-----------+-----------------+--------------+------------+------------+-------------+--------------+ | UART | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | @@ -95,4 +95,5 @@ Board Documentation sei510 sei610 u200 + wetek-core2 w400 diff --git a/doc/board/amlogic/wetek-core2.rst b/doc/board/amlogic/wetek-core2.rst new file mode 100644 index 0000000000..d2aeb90c3d --- /dev/null +++ b/doc/board/amlogic/wetek-core2.rst @@ -0,0 +1,90 @@ +.. SPDX-License-Identifier: GPL-2.0+ +U-Boot for WeTek Core2 +====================== + +WeTek Core2 is an Android STB based on the Q200 reference design with +the following specifications: + + - Amlogic S912 ARM Cortex-A53 octo-core SoC @ 1.5GHz + - ARM Mali T820 GPU + - 3GB DDR4 SDRAM + - 10/100 Realtek RTL8152 Ethernet (internal USB) + - HDMI 2.0 4K/60Hz display + - 2x USB 2.0 Host, 1x USB 2.0 OTG (internal) + - 32GB eMMC + - microSD + - SDIO Wifi Module, Bluetooth + - Two channel IR receiver + +U-Boot compilation +------------------ + +.. code-block:: bash + $ export CROSS_COMPILE=aarch64-none-elf- + $ make wetek-core2_defconfig + $ make +Image creation +-------------- + +Amlogic does not provide sources for the firmware or the tools needed +to create the bootloader image, and WeTek has not publicly shared the +precompiled FIP binaries. However the public Khadas VIM2 sources also +work with the Core2 box so we can use the Khadas git tree: + +.. code-block:: bash + $ wget https://releases.linaro.org/archive/13.11/components/toolchain/binaries/gcc-linaro-aarch64-none-elf-4.8-2013.11_linux.tar.xz + $ wget https://releases.linaro.org/archive/13.11/components/toolchain/binaries/gcc-linaro-arm-none-eabi-4.8-2013.11_linux.tar.xz + $ tar xvfJ gcc-linaro-aarch64-none-elf-4.8-2013.11_linux.tar.xz + $ tar xvfJ gcc-linaro-arm-none-eabi-4.8-2013.11_linux.tar.xz + $ export PATH=$PWD/gcc-linaro-aarch64-none-elf-4.8-2013.11_linux/bin:$PWD/gcc-linaro-arm-none-eabi-4.8-2013.11_linux/bin:$PATH + $ git clone https://github.com/khadas/u-boot -b khadas-vim-v2015.01 vim-u-boot + $ cd vim-u-boot + $ make kvim2_defconfig + $ make + $ export FIPDIR=$PWD/fip + +Go back to mainline U-Boot source tree then: + +.. code-block:: bash + $ mkdir fip + $ cp $FIPDIR/gxl/bl2.bin fip/ + $ cp $FIPDIR/gxl/acs.bin fip/ + $ cp $FIPDIR/gxl/bl21.bin fip/ + $ cp $FIPDIR/gxl/bl30.bin fip/ + $ cp $FIPDIR/gxl/bl301.bin fip/ + $ cp $FIPDIR/gxl/bl31.img fip/ + $ cp u-boot.bin fip/bl33.bin + $ $FIPDIR/blx_fix.sh \ + fip/bl30.bin \ + fip/zero_tmp \ + fip/bl30_zero.bin \ + fip/bl301.bin \ + fip/bl301_zero.bin \ + fip/bl30_new.bin \ + bl30 + $ python $FIPDIR/acs_tool.pyc fip/bl2.bin fip/bl2_acs.bin fip/acs.bin 0 + $ $FIPDIR/blx_fix.sh \ + fip/bl2_acs.bin \ + fip/zero_tmp \ + fip/bl2_zero.bin \ + fip/bl21.bin \ + fip/bl21_zero.bin \ + fip/bl2_new.bin \ + bl2 + $ $FIPDIR/gxl/aml_encrypt_gxl --bl3enc --input fip/bl30_new.bin + $ $FIPDIR/gxl/aml_encrypt_gxl --bl3enc --input fip/bl31.img + $ $FIPDIR/gxl/aml_encrypt_gxl --bl3enc --input fip/bl33.bin + $ $FIPDIR/gxl/aml_encrypt_gxl --bl2sig --input fip/bl2_new.bin --output fip/bl2.n.bin.sig + $ $FIPDIR/gxl/aml_encrypt_gxl --bootmk \ + --output fip/u-boot.bin \ + --bl2 fip/bl2.n.bin.sig \ + --bl30 fip/bl30_new.bin.enc \ + --bl31 fip/bl31.img.enc \ + --bl33 fip/bl33.bin.enc + +then write the image to SD with: + +.. code-block:: bash + $ DEV=/dev/your_sd_device + $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1 + $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=444