From patchwork Thu Nov 8 15:33:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 10674535 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C87E214E2 for ; Thu, 8 Nov 2018 15:35:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B47912DE5F for ; Thu, 8 Nov 2018 15:35:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A85722DE76; Thu, 8 Nov 2018 15:35:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 12A3A2DE5F for ; Thu, 8 Nov 2018 15:35:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=EuEhQUvYfZbY0q7sPsGy71Tsj3mdBB2ARh+9WkxXl2Y=; b=sVhv66Rb4dEczT07TtohHQh8BG f959mhwZnKYSADIHnNk7cq4ynbJ897eWmYLwVr8Niz+P/n/hDJ1bzfMGjN20U8IHwXzqcuReigIRy tvU2E0+1ILsfcScSH+BotA6TeXbeW650IoIMflVrGWRQV9TpJdAz92TJP3nwktahSzmQ863aEMHqN MIJeGkY2c3qYpBmooEVdjuzRp4/BkKg7WdiXoGhsTKExzjgLrb2xzTswOhFhMcfw0no1u1prdG4Jm LElf0aWQiHcfKWjLP8coCxcdTsatFbq/aZ1R5Zbvh0YzoSnIFOloUCCim0vbKIsRrpcv/wTiMUIGh Vw2VLkIQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gKmL8-0007od-Sn; Thu, 08 Nov 2018 15:35:26 +0000 Received: from mail-qk1-x742.google.com ([2607:f8b0:4864:20::742]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gKmKH-0005ii-0K; Thu, 08 Nov 2018 15:34:35 +0000 Received: by mail-qk1-x742.google.com with SMTP id m5so3434428qka.9; Thu, 08 Nov 2018 07:34:29 -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=mR73z2NnwUn9GRNx46jlR0E6A25LCSe0eVXD8ZaCB6A=; b=iy93PKxR2ouMzV37Ff9UeLjrFMUyVvNs9nhqXJHb9TascLajNT1ax8vP0lYwPs6xnO AFhBFVH/gG4x1F3lOXYEx2bR6NeXr4NTWSJ1LPTxk+cAHbs9yX2E7kLvJxWxDkBNcKni hQZhyZZoKPcBP/svjJbqVNv7+PyQcMcnNxb11vvye1amxwHPWsfGpBBI6qFbrwLhqAvj cJ8ZuVb4DiLHMibUF5DrhH3VwmHUamzi/JbCD1njOF/MDZCoKXJSypUO0tQeFIrMthYl hDuDIbnltlBownqDjBAUvKHlMR8skqDsc5CGMWw+H87ylMiqNSXS136sHGuS2APVKcaR vaeA== 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=mR73z2NnwUn9GRNx46jlR0E6A25LCSe0eVXD8ZaCB6A=; b=uTWRRZu7g2yp9pjrmBbaCiD+S+btscz/jDvTEZiFq6wbtfR4nFgwxdvzfCsIb/26V9 Xzvf3gb9kGYg/fNDyvtYLfFJD053RCJjCTBZrl1tDj8KJih/mbQLYzPE6hqcn9n8JfZy x2xHubiS6DN2ovp52zgwkz1ClFyw8A0naiC0ezOc0lFE9J9CHNeh16lglO45Fs22bdFn BOpwV2epLURKSFYb7DGQmnpPHssO/Yl/wj1tHBujD/3LD6eAWYPPx8dJ8t9ww9mkVRz5 9ZfKl857U0cvuBzbCnWq0fhLvCZqKiIqjFtOAlFdlNSdfEAQuDRPYg1EkpFDY84S4H8H QY4Q== X-Gm-Message-State: AGRZ1gJfAMF+5QdsHDasCV1EJCt5LhK4Xx92Ox7XPeuaMiURJmKl5TUP 3FetJ6u2VQaBqyGHf4yIvFs= X-Google-Smtp-Source: AJdET5eFez9Iu143XxXroON7OzJXc8i4+OQoSdf3b7Og9CJnBQ0fBRNE+2KdlXV8R01/c2x74lvPAQ== X-Received: by 2002:a37:7183:: with SMTP id m125mr4403263qkc.195.1541691269163; Thu, 08 Nov 2018 07:34:29 -0800 (PST) Received: from localhost.localdomain ([50.224.228.202]) by smtp.gmail.com with ESMTPSA id u90sm2407127qki.39.2018.11.08.07.34.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 08 Nov 2018 07:34:28 -0800 (PST) From: Christian Hewitt To: Subject: [PATCH 3/3] ARM64: dts: meson-gxl: Add support for the Smartlabs SML-5442TW Date: Thu, 8 Nov 2018 19:33:22 +0400 Message-Id: <1541691207-24768-3-git-send-email-christianshewitt@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1541691207-24768-1-git-send-email-christianshewitt@gmail.com> References: <1541691207-24768-1-git-send-email-christianshewitt@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181108_073433_067823_9B4F9D92 X-CRM114-Status: GOOD ( 18.46 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, =?utf-8?q?Noralf_Tr=C3=B8nnes?= , David Lechner , Jianxin Pan , Neil Armstrong , Martin Blumenstingl , Kevin Hilman , christianshewitt@gmail.com, Johan Hovold , linux-kernel@vger.kernel.org, Rob Herring , Carlo Caione , linux-amlogic@lists.infradead.org, Thierry Reding , =?utf-8?q?Andreas_F=C3=A4rber?= , linux-arm-kernel@lists.infradead.org, Jerome Brunet MIME-Version: 1.0 Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The Smartlabs SML-5442TW is broadly similar to the P231 reference design but with the following differences: - Yellow and Blue front-panel LEDs are available but disabled - Red/Green LED is used to signal off/on status - GPIOX_17 is set high to enable the QCA9377 wireless module - uart_AO can be accessed after opening the case; soldered pins exist Signed-off-by: Christian Hewitt --- arch/arm64/boot/dts/amlogic/Makefile | 1 + .../boot/dts/amlogic/meson-gxl-s905d-sml5442tw.dts | 327 +++++++++++++++++++++ 2 files changed, 328 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 c31f29d6..37d7dbd 100644 --- a/arch/arm64/boot/dts/amlogic/Makefile +++ b/arch/arm64/boot/dts/amlogic/Makefile @@ -18,6 +18,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-nexbox-a95x.dtb 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-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..4b40a71 --- /dev/null +++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-sml5442tw.dts @@ -0,0 +1,327 @@ +// 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" + +/ { + 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>; + }; + + 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 = "simple-audio-card"; + simple-audio-card,name = "HDMI"; + + simple-audio-card,dai-link@0 { + /* HDMI Output */ + format = "i2s"; + mclk-fs = <128>; + bitclock-master = <&i2s_dai>; + frame-master = <&i2s_dai>; + plat { + sound-dai = <&aiu_i2s_dma>; + }; + + cpu { + sound-dai = <&i2s_dai>; + }; + + codec { + sound-dai = <&hdmi_tx>; + }; + }; + }; +}; + +&cec_AO { + status = "okay"; + pinctrl-0 = <&ao_cec_pins>; + pinctrl-names = "default"; + hdmi-phandle = <&hdmi_tx>; +}; + +&audio { + status = "okay"; +}; + +&aiu_i2s_dma { + status = "okay"; +}; + +&i2s_dai { + status = "okay"; +}; + +&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"; + linux,rc-map-name = "rc-o2cz-khamsin"; +}; + +&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"; +}; + +/* 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"; +};