Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp319769ybf; Sat, 29 Feb 2020 04:27:27 -0800 (PST) X-Google-Smtp-Source: APXvYqxic70Lzo3t5zV12P9gQoX3N/FBALE5NXbGcq+80k8jYTKozLV9RGVfj9zLEH4X0O/X6TyT X-Received: by 2002:a05:6830:1b68:: with SMTP id d8mr1451763ote.56.1582979246887; Sat, 29 Feb 2020 04:27:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582979246; cv=none; d=google.com; s=arc-20160816; b=zrU7ecZHhm5wZqydeO/rYtvnqB5qVgiCHgFrTlUS5kanT/+5VJrLDK9g/byecS+vgQ JPXE9/8ruiZ+UuC+Bt0yiouOM5YK/6mx4cTM/YeJjiMWwJiuZCgm5lNgsKaZs12zStu0 KKthaN6FLYVwxiiAv0VGkXpz4TJvtoN4IlJcAPuuGdIyaOZPqW0t2z+gZ/fUyhalF7yp CZabOCx+meWLoR5hE0AMVOEAjcWl5d6csctYTqlcKqkPXDzWY5JGl7fbiyvz2p1wVPDm 8tFQnMI6IfMu/QKYOtewGsEieDcAU/5K3D5JvRZle8eQ4xw+2m074BdQGwPpzjXnd6Lx XIVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=iqt9HsFN1ZW/2ADq+kVvY5bRe4idRiANfErV0XrnzDA=; b=B8uAe+5kE+Pz88GqjX/mrRLzQU2mG1ImNe2otD4ZkcVvI5noV8ClITPJOKbzuiB5TW T8gPRWs/Sgtcagrv1agoqhWFDVj8J2cRktgAZAPATvw9/QccPW5syPFqLIY5CHnqjM2Q fTT1t55EYO3G8ec5PF79XEOIZi6vsC9XWhuwn5CwDVumS20OEk38lbazNLXzUR3qsyi1 HqfGCCfYr2n6kfTD4U1u0nSl5q1cGqWt7sJHtZpzizST2RXyzIfwBfjvZBoSd0rYqqz0 FF/HEcTrPr4lh7CyLn5uc+Oat79BlBbzAC7XB1U+/9OWUwvvvWPdsMa3iiNXd6s1mhiY X0Bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lhWZ2fx0; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t9si2907695otp.57.2020.02.29.04.27.14; Sat, 29 Feb 2020 04:27:26 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=lhWZ2fx0; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727073AbgB2M0a (ORCPT + 99 others); Sat, 29 Feb 2020 07:26:30 -0500 Received: from mail-lj1-f195.google.com ([209.85.208.195]:44124 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726944AbgB2M03 (ORCPT ); Sat, 29 Feb 2020 07:26:29 -0500 Received: by mail-lj1-f195.google.com with SMTP id q8so6360560ljj.11; Sat, 29 Feb 2020 04:26:25 -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=iqt9HsFN1ZW/2ADq+kVvY5bRe4idRiANfErV0XrnzDA=; b=lhWZ2fx0w9/tzm9XhmOAn9XUX53OhXkxpqErpZWnTI0Y15ENHXtNQuCJrNjQC5wGW8 RAyc1bmyRrlo5xIhjVFjR4wf4l1bfyzzGPztcEbKf3ha9a6tuWUMAX/+pWTJ/RAHdlO4 xeqpAod+KVL+1v5w8KTDK22myY7EDbZJHdR4J+ntISO2rptef9HONxW6p/5czyPBLFW7 uqvzvWK8TV5tltYIpwsXD5GCLvCpcVzKqMSvK6JK1p648BsUSJ+7k8TNazcw057RGJ/V XxOEkHAkv0BdpYymG/gzhKGaRY7fY/94sBBjH/41hIcIGMYuYRzXxBykGzOe1IbR110+ vH9A== 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=iqt9HsFN1ZW/2ADq+kVvY5bRe4idRiANfErV0XrnzDA=; b=nto9AENf7XpVZuKgJ3LFSBmQait/kbkx2u31Cnn70fuOiTMXtamfrcpxAffQS/CDdV 3jOLjjPAcsob2l5uqEZnSriVDQI00R9JpPuyFRxqR294N35Y8O/Ba469/RcGwwUsJMQT C9GRV2bv+DafDsbS2xaFgo50+7l+9S7nlckCVtibMbv0CfWPKcM6HB7itdOccquCF4yh 85P8Fgf1lhkKyLRG+6AAsOgIhNMZiXZkiv2kkOw6wy3VZ5Ji1Fxu8kMIzIiVDOpSBj/m HX7SC8ysJ4x0NesmmsBRNL+Jee/Xu3DBGtV0HSB+bUlTVodL4HXQ+Q2TQr+3bCsANAN1 zUvw== X-Gm-Message-State: ANhLgQ2TMErQh68iKqatd99z5EP0Qy/VhUUcorn+9eGWH0/TmhCh9AtQ C5/GN0xFTdfwG/JO0L8RE5d1h9QjKojvEg== X-Received: by 2002:a2e:8e70:: with SMTP id t16mr5950017ljk.73.1582979184878; Sat, 29 Feb 2020 04:26:24 -0800 (PST) Received: from localhost.localdomain ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id r10sm8950775ljk.9.2020.02.29.04.26.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 29 Feb 2020 04:26:24 -0800 (PST) From: Christian Hewitt To: Rob Herring , Mark Rutland , Kevin Hilman , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Christian Hewitt , =?UTF-8?q?Andreas=20F=C3=A4rber?= , =?UTF-8?q?Jer=C3=B4me=20Brunet?= Subject: [PATCH v5 3/3] arm64: dts: meson: add support for the SmartLabs SML-5442TW Date: Sat, 29 Feb 2020 16:25:24 +0400 Message-Id: <1582979124-82363-4-git-send-email-christianshewitt@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1582979124-82363-1-git-send-email-christianshewitt@gmail.com> References: <1582979124-82363-1-git-send-email-christianshewitt@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The SmartLabs SML-5442TW is broadly similar to the P231 reference design but with the following differences: - The Yellow and Blue LEDs are available but disabled - The Red and Green LEDs are used to signal off/on status - uart_AO can be accessed after opening the case; soldered pins exist - GPIOX_17 is forced high to enable the QCA9377 module Signed-off-by: Christian Hewitt --- arch/arm64/boot/dts/amlogic/Makefile | 1 + .../boot/dts/amlogic/meson-gxl-s905d-sml5442tw.dts | 386 +++++++++++++++++++++ 2 files changed, 387 insertions(+) create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxl-s905d-sml5442tw.dts diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile index eef0045..6cf8c4a 100644 --- a/arch/arm64/boot/dts/amlogic/Makefile +++ b/arch/arm64/boot/dts/amlogic/Makefile @@ -27,6 +27,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-p212.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-p230.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-p231.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-phicomm-n1.dtb +dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-sml5442tw.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s805x-p241.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905w-p281.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905w-tx3-mini.dtb diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-sml5442tw.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-sml5442tw.dts new file mode 100644 index 0000000..3ad53f7 --- /dev/null +++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-sml5442tw.dts @@ -0,0 +1,386 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2016 Endless Computers, Inc. + * Author: Carlo Caione + * Copyright (c) 2018 BayLibre, SAS + * Author: Neil Armstrong + */ + +/dts-v1/; + +#include "meson-gxl-s905d.dtsi" +#include + +/ { + compatible = "smartlabs,sml5442tw", "amlogic,s905d", + "amlogic,meson-gxl"; + model = "SmartLabs SML-5442TW"; + + aliases { + serial0 = &uart_AO; + serial1 = &uart_A; + ethernet0 = ðmac; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x0 0x0 0x80000000>; + }; + + 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"; + }; + + leds { + compatible = "gpio-leds"; + + yellow { + label = "sml5442tw:yellow"; + gpios = <&gpio_ao GPIOAO_6 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + + blue { + label = "sml5442tw:blue"; + gpios = <&gpio GPIODV_28 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + + green { + label = "sml5442tw:green"; + gpios = <&gpio_ao GPIOAO_9 GPIO_ACTIVE_HIGH>; + default-state = "on"; + }; + + red { + label = "sml5442tw:red"; + gpios = <&gpio GPIODV_27 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + }; + + 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 = "GXL-S905D-SML5442TW"; + 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_MPLL2>, + <&clkc CLKID_MPLL0>, + <&clkc CLKID_MPLL1>; + 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"; + phy-mode = "rmii"; + phy-handle = <&internal_phy>; +}; + +/* This will enable the bluetooth module */ +&gpio { + bt-en { + gpio-hog; + gpios = ; + output-high; + line-name = "bt-en"; + }; +}; + +&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>; + }; +}; + +&i2c_A { + status = "okay"; + pinctrl-0 = <&i2c_a_pins>; + pinctrl-names = "default"; +}; + +&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"; +}; + +&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 = <100000000>; + + non-removable; + disable-wp; + + 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 = <100000000>; + disable-wp; + + cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>; + cd-inverted; + + 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 = <100000000>; + 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 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; +}; + +/* This UART is brought out to the debug header */ +&uart_AO { + status = "okay"; + pinctrl-0 = <&uart_ao_a_pins>; + pinctrl-names = "default"; +}; + +&usb0 { + status = "okay"; +}; -- 2.7.4