Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp5169605img; Wed, 27 Mar 2019 03:34:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqzmWVXf5AV3St/VdZErjBm5+BluybGvTEvSyuAFUfva7NsCcOSg1XIolTxsBmp/hlJ7UPuT X-Received: by 2002:a17:902:2c01:: with SMTP id m1mr36207100plb.186.1553682867535; Wed, 27 Mar 2019 03:34:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553682867; cv=none; d=google.com; s=arc-20160816; b=CvO/Vrvebxk6Bq2d9+HXil7ELvcehib/xiZboC1aTpbQZrwe/CBx3LRKwAO5mZzE8b z5aQ+1qK1gQ0PbV1vwucGCiUFwsgIy5Kpl45qvQnE5Y6+FO3WuW6/BiFYZ4OwbhvMcqZ DHn+HeeDYP5e3zKqppazrdeYwTpYwFL6+Q4kgrJzO+ZtGhmV2okgVYdN4i3qndfBcVjz 8tlTK0pLyIvNMci25krHfsqHeM/hnzi4vLScucxsZu9dVsFUTP4bJhk9M29eePO7EiCv LojahJTtzCR+NQbNxVlCUDQAzvuwzZuHvNOOEEbMFMnbnbBEfAaioj75EYja2pklTvjT 2BMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=BcWiVHjADXs9333o0RehsMpjl7l4ahHH0tx1c2n3mW4=; b=X7fgrUBnnUVPtZS2GJ7DC1Nu3SP5MLoXCxw6rNXK/Sts41L1kuAceTD1+vynNgdb6Z BzoVbwpdlQw9NujOIaO7zwiVsa7SStZk6rIIfmu0ISxy0VDyNfzLefqEdlSDGUPFz38X 32JKBn6IubaNEF6YWpxLmtbWUiU+t/pu/VKQCB5W/yuE6bGtH2BUDYwIFAhNP/ov08+w kem4H6p2/tCIUPxLpTAXaqbcj+dhxtxgz5EHZR2Tfr5sNyBFXeh1CZL20WD2gqadsCMX Ym5m1X9ofyM1lxXQTGxdaHy8YDryhIkHP/HPF2j/EJnpxGqt1Pq9iQzXnrN9R9sWJBAX +ciQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=bHFdJY+u; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k5si3074805plt.179.2019.03.27.03.34.12; Wed, 27 Mar 2019 03:34:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=bHFdJY+u; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733270AbfC0KdX (ORCPT + 99 others); Wed, 27 Mar 2019 06:33:23 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:38174 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733237AbfC0KdU (ORCPT ); Wed, 27 Mar 2019 06:33:20 -0400 Received: by mail-wr1-f67.google.com with SMTP id k11so10487039wro.5 for ; Wed, 27 Mar 2019 03:33:18 -0700 (PDT) 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=BcWiVHjADXs9333o0RehsMpjl7l4ahHH0tx1c2n3mW4=; b=bHFdJY+u2xDnsL491e4yuZo5sgBKqloxZ6dow+f+YsJ3OtTEm0CUfz0i/LuS4JsqSZ hoTsm7IYkOfnJCvzV9sB6tw/NbORhzdVGMvijMrD0AuypR0szvtEgjOScNvRnABrAg/p P7c0lsQMQsAFE6USCNzZ8IM1Mp1hrdDexVpXTJkMAeO6Zv2O22DQtW5iZmyo203xbcI7 gkNFEVOOS0505XW34XIQ3tKrc1ZyUUDIVEmmf96Bk5kpMVfPLwmO7ulCVygOtKzacNEZ ZMNGBI8UZG+sgDPofIkhQy6jBlT1UYpDlutftk1Rm6DKJCkZIgdRBt2fdA9UfNprWhzq f8Eg== 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=BcWiVHjADXs9333o0RehsMpjl7l4ahHH0tx1c2n3mW4=; b=lPdFSxfNLKLYGdpys4Jl/0wHgJlxCoshkrfEvzXHs7GE6sIa7frXJ+rqNaJOOPBh8V 2cL4LN3Pw0Qi1gF8YqafxVSouoNfoydI42YHSHj8+7gdYNZY9JAVFfZXe/XDNJAVthCV r32OwUZZ6X105FtbnwCs3bhwC/iuGvEwNrJPNWBautbPBFV4aXFHZuGhuC9c5vqygrOG 8lsuTmJvicRByMKFoUvoKYkyVfHcyNpdNABERkM6QsA1hiUJhpcn23UE8b4hca336P0d izbsMGw4MYiSPBXSqz/8b5ainmgR4kTGs9RVWPG+cVBlR1TzFEnJTnXupzGbNXBtY46J FbgA== X-Gm-Message-State: APjAAAWT/XLiz/mfmuhZcFFd7ftHXqQV22mYZFymnPJ8cA+BQHWQPUC5 Ms8S/Y16p25cQ6iSSWlu+VmX4A== X-Received: by 2002:adf:da42:: with SMTP id r2mr22704710wrl.62.1553682797569; Wed, 27 Mar 2019 03:33:17 -0700 (PDT) Received: from bender.baylibre.local (lmontsouris-657-1-212-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.gmail.com with ESMTPSA id a20sm27017513wmb.17.2019.03.27.03.33.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 27 Mar 2019 03:33:16 -0700 (PDT) From: Neil Armstrong To: khilman@baylibre.com Cc: Neil Armstrong , linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH RFC 6/6] arm64: dts: meson: Add minimal support for Odroid-N2 Date: Wed, 27 Mar 2019 11:33:08 +0100 Message-Id: <20190327103308.25058-7-narmstrong@baylibre.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190327103308.25058-1-narmstrong@baylibre.com> References: <20190327103308.25058-1-narmstrong@baylibre.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch adds basic support for : - Amlogic G12B, which is very similar to G12A - The HardKernel Odroid-N2 based on the S922X SoC The Amlogic G12B SoC is very similar with the G12A SoC, sharing most of the features and architecture, but with these differences : - The first CPU cluster only has 2xCortex-A53 instead of 4 - G12B has a second cluster of 4xCortex-A73 - Both cluster can achieve 2GHz instead of 1,8GHz for G12A - CPU Clock architecture is difference, thus needing a different compatible to handle this slight difference - Supports a MIPI CSI input - Embeds a Mali-G52 instead of a Mali-G31, but integration is the same Actual support is done in the same way as for the GXM support, including the G12A dtsi and redefining the CPU clusters. Unlike GXM, the first cluster is different, thus needing to remove the last 2 cpu nodes of the first cluster. Signed-off-by: Neil Armstrong --- arch/arm64/boot/dts/amlogic/Makefile | 1 + .../boot/dts/amlogic/meson-g12b-odroid-n2.dts | 178 ++++++++++++++++++ arch/arm64/boot/dts/amlogic/meson-g12b.dtsi | 82 ++++++++ 3 files changed, 261 insertions(+) create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b.dtsi diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile index e129c03ced14..07b861fe5fa5 100644 --- a/arch/arm64/boot/dts/amlogic/Makefile +++ b/arch/arm64/boot/dts/amlogic/Makefile @@ -3,6 +3,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-axg-s400.dtb dtb-$(CONFIG_ARCH_MESON) += meson-g12a-sei510.dtb dtb-$(CONFIG_ARCH_MESON) += meson-g12a-u200.dtb dtb-$(CONFIG_ARCH_MESON) += meson-g12a-x96-max.dtb +dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nanopi-k2.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nexbox-a95x.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-odroidc2.dtb diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts new file mode 100644 index 000000000000..9dd6e05cfd0e --- /dev/null +++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts @@ -0,0 +1,178 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2019 BayLibre, SAS + * Author: Neil Armstrong + */ + +/dts-v1/; + +#include "meson-g12b.dtsi" +#include +#include + +/ { + compatible = "hardkernel,odroid-n2", "amlogic,g12b"; + model = "Hardkernel ODROID-N2"; + + aliases { + serial0 = &uart_AO; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x0 0x0 0x40000000>; + }; + + leds { + compatible = "gpio-leds"; + + blue { + label = "n2:blue"; + gpios = <&gpio_ao GPIOAO_11 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "heartbeat"; + }; + }; + + main_12v: regulator-main_12v { + compatible = "regulator-fixed"; + regulator-name = "12V"; + regulator-min-microvolt = <12000000>; + regulator-max-microvolt = <12000000>; + regulator-always-on; + }; + + vcc_5v: regulator-vcc_5v { + compatible = "regulator-fixed"; + regulator-name = "5V"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + 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 = <&vcc_3v3>; + regulator-always-on; + }; + + vcc_3v3: regulator-vcc_3v3 { + compatible = "regulator-fixed"; + regulator-name = "VCC_3V3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + vin-supply = <&vddao_3v3>; + regulator-always-on; + /* FIXME: actually controlled by VDDCPU_B_EN */ + }; + + hub_5v: regulator-hub_5v { + compatible = "regulator-fixed"; + regulator-name = "HUB_5V"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + vin-supply = <&vcc_5v>; + + gpio = <&gpio GPIOH_5 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + usb_pwr_en: regulator-usb_pwr_en { + compatible = "regulator-fixed"; + regulator-name = "USB_PWR_EN"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + vin-supply = <&hub_5v>; + + gpio = <&gpio GPIOH_6 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + vddao_1v8: regulator-vddao_1v8 { + compatible = "regulator-fixed"; + regulator-name = "VDDAO_1V8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + vin-supply = <&vddao_3v3>; + regulator-always-on; + }; + + vddao_3v3: regulator-vddao_3v3 { + compatible = "regulator-fixed"; + regulator-name = "VDDAO_3V3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + vin-supply = <&main_12v>; + regulator-always-on; + }; + + hdmi-connector { + compatible = "hdmi-connector"; + type = "a"; + + port { + hdmi_connector_in: endpoint { + remote-endpoint = <&hdmi_tx_tmds_out>; + }; + }; + }; +}; + +&cec_AO { + pinctrl-0 = <&cec_ao_a_h_pins>; + pinctrl-names = "default"; + status = "okay"; + hdmi-phandle = <&hdmi_tx>; +}; + +&gpio { + /* + * WARNING: The USB Hub on the Odroid-N2 needs a reset signal + * to be turned high in order to be detected by the USB Controller + * This signal should be handled by a USB specific power sequence + * in order to reset the Hub when USB bus is powered down. + */ + usb-hub { + gpio-hog; + gpios = ; + output-high; + line-name = "usb-hub-reset"; + }; +}; + +&hdmi_tx { + status = "okay"; + pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>; + pinctrl-names = "default"; + hdmi-supply = <&vcc_5v>; +}; + +&hdmi_tx_tmds_port { + hdmi_tx_tmds_out: endpoint { + remote-endpoint = <&hdmi_connector_in>; + }; +}; + +&uart_AO { + status = "okay"; + pinctrl-0 = <&uart_ao_a_pins>; + pinctrl-names = "default"; +}; + +&usb { + status = "okay"; +}; + +&usb2_phy0 { + phy-supply = <&usb_pwr_en>; +}; + +&usb2_phy1 { + phy-supply = <&vcc_5v>; +}; diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b.dtsi new file mode 100644 index 000000000000..0359539ba884 --- /dev/null +++ b/arch/arm64/boot/dts/amlogic/meson-g12b.dtsi @@ -0,0 +1,82 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2019 BayLibre, SAS + * Author: Neil Armstrong + */ + +#include "meson-g12a.dtsi" + +/ { + compatible = "amlogic,g12b"; + + cpus { + cpu-map { + cluster0 { + core0 { + cpu = <&cpu0>; + }; + + core1 { + cpu = <&cpu1>; + }; + }; + + cluster1 { + core0 { + cpu = <&cpu100>; + }; + + core1 { + cpu = <&cpu101>; + }; + + core2 { + cpu = <&cpu102>; + }; + + core3 { + cpu = <&cpu103>; + }; + }; + }; + + /delete-node/ cpu@2; + /delete-node/ cpu@3; + + cpu100: cpu@100 { + device_type = "cpu"; + compatible = "arm,cortex-a73", "arm,armv8"; + reg = <0x0 0x100>; + enable-method = "psci"; + next-level-cache = <&l2>; + }; + + cpu101: cpu@101 { + device_type = "cpu"; + compatible = "arm,cortex-a73", "arm,armv8"; + reg = <0x0 0x101>; + enable-method = "psci"; + next-level-cache = <&l2>; + }; + + cpu102: cpu@102 { + device_type = "cpu"; + compatible = "arm,cortex-a73", "arm,armv8"; + reg = <0x0 0x102>; + enable-method = "psci"; + next-level-cache = <&l2>; + }; + + cpu103: cpu@103 { + device_type = "cpu"; + compatible = "arm,cortex-a73", "arm,armv8"; + reg = <0x0 0x103>; + enable-method = "psci"; + next-level-cache = <&l2>; + }; + }; +}; + +&clkc { + compatible = "amlogic,g12b-clkc"; +}; -- 2.21.0