From patchwork Fri Nov 6 09:45:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 320786 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp1161969ilc; Fri, 6 Nov 2020 01:46:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJymsabbzwVieGJNOWgftCzdUR+w4hVVoxsL4z09mdxGGfU674YfWSBlXPBphRv0JvYmZuOr X-Received: by 2002:a17:906:c096:: with SMTP id f22mr1154938ejz.488.1604655973820; Fri, 06 Nov 2020 01:46:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604655973; cv=none; d=google.com; s=arc-20160816; b=TFWWl0vuVnCNSgP9oJ2c1nRftuwEJIMev0ZbFMwJR19YRFlOohhxnOJS9sJOJnKtbE zzhlRJMg99XQxBMZt8is5/lqJGQfcmLb0QdszFlRkmhUtn/Vty6crfEGV7WuliIRupkf ENAu3/adxUOQm1Vd368IVVoOEXPrp5/CSrXOLFpib2jpZQbmDLgoxX9YYDcSpjHlTl6S NYHWkvuKkLEjqKliOUwwDix5EwrjxZn22aZYLAV67zeEb9F6QpxbWsA4lNmw+Wb9OAIf DUn251Tv66aznBzM/VujWP/kpJu+pdtmGxJ8gc14WxSOXGUaob2lkYBhB6DcysmqGsAR l/tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=KkH8S6IgKvWWuDmH5bkEJQ6SjcQSglYye6DAJfmFUV8=; b=gVLiijfc4ifkJBLfbnuZilOpWj/Bdy8AZ3rvdOFdM8lM8kPBWrtZgx+F4/yFkRWqox cXeO6xJSaphazOyJG2iqK/UESBaI+OBdAbv8h/nCX/g0JYmFkxTPk7e0N18cWkOAlX02 Yj/Czx5kTxRMwEG/03BTPG5dOpENmwS/AaYzAyiUM7cS/V85oVGC1MJxyv7Mi9DgRWB7 Gs27FMcx6PPprI2X6L2eH8R8hzp6ye5c/PiaCmT8oh59BLwMOwP1Hs2V5OiS5LMFnM68 1CCQyaz/JQhxJ4kqb0XBijM4mD2dxiaaa7w2t5WVOsGsM8VXhTpo7lsGWR2rP0xM9GMz Ssew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=Ed7NvAdF; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id r26si566969edt.63.2020.11.06.01.46.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Nov 2020 01:46:13 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=Ed7NvAdF; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7B3A780404; Fri, 6 Nov 2020 10:46:11 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.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=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="Ed7NvAdF"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C91458232D; Fri, 6 Nov 2020 10:46:09 +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=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) (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 417AB80404 for ; Fri, 6 Nov 2020 10:46:05 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jbrunet@baylibre.com Received: by mail-wr1-x443.google.com with SMTP id a3so594782wrx.13 for ; Fri, 06 Nov 2020 01:46:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KkH8S6IgKvWWuDmH5bkEJQ6SjcQSglYye6DAJfmFUV8=; b=Ed7NvAdFGfR/1U5oHtK3OwGfpLbPq/32ibCxSR/ZnhUAB82wF8PC9vr1yXG/LakYlk uM0q1EiEr2vBpNHV7IPw3ew3bUb4PZoXrPOmDDuh/UFTaTXX2P1TaGRE2rYFIRUMXTa/ AMpuH1Il96BlPoa5zsCqVXa/lJC36ua64Rjp1p3lNgus576tXBCtw5mUcOMkvgEwQoOz m0fuStnOnJdyqciFJnCViqjr/B91G4RjwpnNezAMW5/QVDUbuf7o9pWZ+wYAcB7PkdOG UCLNPuOhE0zJaoq6nO+D849Vz5go2fYbdgtzTqhyJYrW+dIaYnDC75XaJljis5K+7PQV 0QMQ== 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:mime-version:content-transfer-encoding; bh=KkH8S6IgKvWWuDmH5bkEJQ6SjcQSglYye6DAJfmFUV8=; b=sLj/OhUrWfkc4Dzh7s/pNqGA1U2oFHE70Lq17XoC5JKvvN5UpBo8xGYjKC1eNNuDJg nwIBu7IcoBUTM8qVZ5DbzaKBH3Tkug2Nciq8B27Ssdsy3QdUQaRdpiyJjla9lFXr7Bvo 8U8Y0BW6FeW4RTNlQcb8V5i8xmCZKSMQBt5TMTpYQ7r/8FKD0OMZLykErro5c/cp3GFy QIYsSZaWH0vZ4T16RuudGcnqXmJMSB7VrARZWDQbJEOYS3EuqfpBkAXkClJXm/dHh653 dKZrkIeiOmqN/1/Kh32Byz6LiqXvAShW96252+ju0JNJdR+I+IYZx0DZGdIvIEkgUbG9 Rt2w== X-Gm-Message-State: AOAM533He6+pZVbQLPIVH8fBdfRgu1mkZ714KGgdZaDUuOU2HnA/KQK5 sF5Zq6GmPvrUTKV1LQxeXLxclv1EIJSSlcQo X-Received: by 2002:a5d:67ca:: with SMTP id n10mr1632019wrw.209.1604655964866; Fri, 06 Nov 2020 01:46:04 -0800 (PST) Received: from localhost.localdomain (253.35.17.109.rev.sfr.net. [109.17.35.253]) by smtp.googlemail.com with ESMTPSA id j71sm1414910wmj.10.2020.11.06.01.46.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Nov 2020 01:46:04 -0800 (PST) From: Jerome Brunet To: Neil Armstrong , u-boot@lists.denx.de, u-boot-amlogic@groups.io Cc: Jerome Brunet , Da Xue Subject: [PATCH RESEND v2 1/2] arm64: dts: import libretech-cc-v2 from linux v5.10-rc1 Date: Fri, 6 Nov 2020 10:45:54 +0100 Message-Id: <20201106094555.34241-2-jbrunet@baylibre.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201106094555.34241-1-jbrunet@baylibre.com> References: <20201106094555.34241-1-jbrunet@baylibre.com> MIME-Version: 1.0 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 Sync the libretech cc v2 device tree from Linux v5.10-rc1 commit 3650b228f83a ("Linux 5.10-rc1") Signed-off-by: Jerome Brunet --- arch/arm/dts/Makefile | 1 + .../dts/meson-gxl-s905x-libretech-cc-v2.dts | 318 ++++++++++++++++++ 2 files changed, 319 insertions(+) create mode 100644 arch/arm/dts/meson-gxl-s905x-libretech-cc-v2.dts -- 2.28.0 diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index b195723f1645..e957820e8e62 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -159,6 +159,7 @@ dtb-$(CONFIG_ARCH_MESON) += \ meson-gxl-s905x-p212.dtb \ meson-gxl-s805x-libretech-ac.dtb \ meson-gxl-s905x-libretech-cc.dtb \ + meson-gxl-s905x-libretech-cc-v2.dtb \ meson-gxl-s905x-khadas-vim.dtb \ meson-gxl-s905d-libretech-pc.dtb \ meson-gxm-khadas-vim2.dtb \ diff --git a/arch/arm/dts/meson-gxl-s905x-libretech-cc-v2.dts b/arch/arm/dts/meson-gxl-s905x-libretech-cc-v2.dts new file mode 100644 index 000000000000..675eaa87963e --- /dev/null +++ b/arch/arm/dts/meson-gxl-s905x-libretech-cc-v2.dts @@ -0,0 +1,318 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2020 BayLibre, SAS. + * Author: Jerome Brunet + */ + +/dts-v1/; + +#include +#include +#include + +#include "meson-gxl-s905x.dtsi" + +/ { + compatible = "libretech,aml-s905x-cc-v2", "amlogic,s905x", + "amlogic,meson-gxl"; + model = "Libre Computer AML-S905X-CC V2"; + + aliases { + serial0 = &uart_AO; + ethernet0 = ðmac; + spi0 = &spifc; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + emmc_pwrseq: emmc-pwrseq { + compatible = "mmc-pwrseq-emmc"; + reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>; + }; + + hdmi-connector { + compatible = "hdmi-connector"; + type = "a"; + + port { + hdmi_connector_in: endpoint { + remote-endpoint = <&hdmi_tx_tmds_out>; + }; + }; + }; + + leds { + compatible = "gpio-leds"; + + led-blue { + color = ; + function = LED_FUNCTION_STATUS; + gpios = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "heartbeat"; + panic-indicator; + }; + + led-green { + color = ; + function = LED_FUNCTION_DISK_ACTIVITY; + gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "disk-activity"; + }; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x0 0x0 0x80000000>; + }; + + ao_5v: regulator-ao_5v { + compatible = "regulator-fixed"; + regulator-name = "AO_5V"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + vin-supply = <&dc_in>; + regulator-always-on; + }; + + dc_in: regulator-dc_in { + compatible = "regulator-fixed"; + regulator-name = "DC_IN"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-always-on; + }; + + + vcck: regulator-vcck { + compatible = "regulator-fixed"; + regulator-name = "VCCK"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + vin-supply = <&ao_5v>; + regulator-always-on; + }; + + vcc_card: regulator-vcc_card { + compatible = "regulator-fixed"; + regulator-name = "VCC_CARD"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + vin-supply = <&vddio_ao3v3>; + + gpio = <&gpio GPIOCLK_1 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + vcc5v: regulator-vcc5v { + compatible = "regulator-fixed"; + regulator-name = "VCC5V"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + vin-supply = <&ao_5v>; + + gpio = <&gpio GPIOH_3 GPIO_OPEN_DRAIN>; + }; + + vddio_ao3v3: regulator-vddio_ao3v3 { + compatible = "regulator-fixed"; + regulator-name = "VDDIO_AO3V3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + vin-supply = <&ao_5v>; + regulator-always-on; + }; + + + vddio_card: regulator-vddio-card { + compatible = "regulator-gpio"; + regulator-name = "VDDIO_CARD"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + + gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>; + gpios-states = <0>; + + states = <3300000 0>, + <1800000 1>; + + regulator-settling-time-up-us = <200>; + regulator-settling-time-down-us = <50000>; + }; + + vddio_ao18: regulator-vddio_ao18 { + compatible = "regulator-fixed"; + regulator-name = "VDDIO_AO18"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + vin-supply = <&vddio_ao3v3>; + regulator-always-on; + }; + + vcc_1v8: regulator-vcc_1v8 { + compatible = "regulator-fixed"; + regulator-name = "VCC 1V8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + vin-supply = <&vddio_ao3v3>; + regulator-always-on; + }; + + sound { + compatible = "amlogic,gx-sound-card"; + model = "GXL-LIBRETECH-S905X-CC-V2"; + 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_I2S_ENCODER>; + dai-format = "i2s"; + mclk-fs = <256>; + + codec-0 { + sound-dai = <&aiu AIU_HDMI CTRL_I2S>; + }; + }; + + dai-link-2 { + sound-dai = <&aiu AIU_HDMI CTRL_OUT>; + + codec-0 { + sound-dai = <&hdmi_tx>; + }; + }; + }; +}; + + +&aiu { + status = "okay"; +}; + +&cec_AO { + status = "okay"; + pinctrl-0 = <&ao_cec_pins>; + pinctrl-names = "default"; + hdmi-phandle = <&hdmi_tx>; +}; + + +ðmac { + status = "okay"; +}; + +&internal_phy { + pinctrl-0 = <ð_link_led_pins>, <ð_act_led_pins>; + pinctrl-names = "default"; +}; + +&ir { + status = "okay"; + pinctrl-0 = <&remote_input_ao_pins>; + pinctrl-names = "default"; +}; + +&hdmi_tx { + status = "okay"; + pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>; + hdmi-supply = <&vcc5v>; + pinctrl-names = "default"; +}; + +&hdmi_tx_tmds_port { + hdmi_tx_tmds_out: endpoint { + remote-endpoint = <&hdmi_connector_in>; + }; +}; + +&saradc { + status = "okay"; + vref-supply = <&vddio_ao18>; +}; + +/* SD card */ +&sd_emmc_b { + pinctrl-0 = <&sdcard_pins>; + pinctrl-1 = <&sdcard_clk_gate_pins>; + pinctrl-names = "default", "clk-gate"; + + bus-width = <4>; + cap-sd-highspeed; + sd-uhs-sdr12; + sd-uhs-sdr25; + sd-uhs-sdr50; + sd-uhs-ddr50; + max-frequency = <100000000>; + disable-wp; + + cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>; + + vmmc-supply = <&vcc_card>; + vqmmc-supply = <&vddio_card>; + + status = "okay"; +}; + +/* eMMC */ +&sd_emmc_c { + pinctrl-0 = <&emmc_pins>; + pinctrl-1 = <&emmc_clk_gate_pins>; + pinctrl-names = "default", "clk-gate"; + + bus-width = <8>; + cap-mmc-highspeed; + mmc-hs200-1_8v; + max-frequency = <200000000>; + disable-wp; + + mmc-pwrseq = <&emmc_pwrseq>; + vmmc-supply = <&vddio_ao3v3>; + vqmmc-supply = <&vcc_1v8>; + + status = "okay"; +}; + +&spifc { + status = "okay"; + pinctrl-0 = <&nor_pins>; + pinctrl-names = "default"; + + nor_4u1: spi-flash@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <3000000>; + }; +}; + +&uart_AO { + status = "okay"; + pinctrl-0 = <&uart_ao_a_pins>; + pinctrl-names = "default"; +}; + +&usb { + status = "okay"; + dr_mode = "host"; +}; + +&usb2_phy0 { + pinctrl-names = "default"; + phy-supply = <&vcc5v>; +}; + +&usb2_phy1 { + phy-supply = <&vcc5v>; +};