From patchwork Sat Mar 18 12:36:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 9632163 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 993F6602D6 for ; Sat, 18 Mar 2017 12:47:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8A4A828485 for ; Sat, 18 Mar 2017 12:47:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7C4EF284FE; Sat, 18 Mar 2017 12:47:31 +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=-1.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 F361F28485 for ; Sat, 18 Mar 2017 12:47:30 +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=GHNCx/Z0p4HGGIYXHDDTjlKamz7TB8P6OY5pvYVwnjA=; b=T72s9Qm/YWwpjKejkZpsg6yb2G QEXr4LXdqjHrMI8IlJtbRJuHN8SKvFDWvy9chB2ACk5lwW9qz9iOQv/Bs0Qi0MF4bklpPVZzKf/2D kStWMXHldCg/fltKvCbYl2sLor+9jGOyY1mpj2J0aXuNyZRWB1Z3avLJGuY4ddZ3H+0fe3I1cfHfK +m9UHFlotcfOsH5DbWrqzPjx8qJQwM3vKviTcdkQgrw5uHCToEEgSmhw1LWGxK/2Pc5BOz36HCAI+ iUh5mrgO6hO+tfflvtbyTSZaUuJRSHhreObH0SfCMyLwGxRjoOk35fr9xlzDd5O+pQ4j/6U+BKifS 3z5PYRww==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cpDlS-0006bU-8A; Sat, 18 Mar 2017 12:47:22 +0000 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cpDc4-00029C-NR; Sat, 18 Mar 2017 12:37:46 +0000 Received: by mail-wm0-x244.google.com with SMTP id x124so7174290wmf.3; Sat, 18 Mar 2017 05:37:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=P+GzNhn1iyccwZAtzHmsFoFSdrOAi85XmJvlDKHCXjw=; b=SXpIRkx5YSZieD35HpMei5NgXe7Qpg9HdrXhcueo7WAt2QoUX2l2GNjVQ3ZUjO1wev 3m0K1NowCZrVJXjoInGeOoMEs0XKKsFtDsTJ6Rb9g7MEjuTYGBd7L2NAL3cjerktSv+c /hKfoiWvZJF9VQ/gQuycBLzyTFxrPfiBRVAnmt/E4Mp2rpPKCxSXd4BXrvuz6cGu4ZQY rvO7fFXy2CXLTd8k7DkwfjiBZU6AqFy5+xYyf5k8Hd5UVsZ1A732maT3gtBxcYo0gN72 4j+b0/cZ6V3wO+Q6w/bvV5Td6OSBrL+944tu7sqNTebjC/wJ1cF+C7UMoFhcDaSOEmKj o1QA== 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=P+GzNhn1iyccwZAtzHmsFoFSdrOAi85XmJvlDKHCXjw=; b=mMyQy6or8Xf8VM3K/c5WQlvMOZTrFBszTd33m9In6mTrrfiXEYXzSI03208NZ7EVhO KtxWzqXCKIsPEPYaCHNuvN0JGUv4OP7POAxMC6pkm/oNLp/ydA9Zy2sl8dtEuyGHda7A Y9okShd8UzD0craHbNyG4fZLGuhNXSvaocGR//1r5hzMpw34uVtNDWdPXXXhE0oKKPGu bYEShX7RM92CjX/seO2+0zivp6/fEoJasU2KZattQgIp4b+Z/vo9BF8cX8+e3PrSD2mN d8ZgSQ6j/hlLr0fdBKyAvL5F5a0bjGz9wg3CbYYhxqBViCI57//xtK+KdpcYKQnVq7mV LQ0g== X-Gm-Message-State: AFeK/H3y4TZcprcqv72TSioTloOLHt330HSbYePC1U4shUKU3WsrrPC41DXn4+RXmA5IzA== X-Received: by 10.28.135.149 with SMTP id j143mr2429624wmd.19.1489840638954; Sat, 18 Mar 2017 05:37:18 -0700 (PDT) Received: from blackbox.darklights.net (p5DE38642.dip0.t-ipconnect.de. [93.227.134.66]) by smtp.googlemail.com with ESMTPSA id t103sm13500752wrc.43.2017.03.18.05.37.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 18 Mar 2017 05:37:17 -0700 (PDT) From: Martin Blumenstingl To: robh+dt@kernel.org, carlo@caione.org, khilman@baylibre.com, devicetree@vger.kernel.org, linux-amlogic@lists.infradead.org Subject: [PATCH v2 3/3] ARM64: dts: meson-gxl: add support for the Khadas VIM board Date: Sat, 18 Mar 2017 13:36:57 +0100 Message-Id: <20170318123657.13798-4-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170318123657.13798-1-martin.blumenstingl@googlemail.com> References: <20170304215126.7020-1-martin.blumenstingl@googlemail.com> <20170318123657.13798-1-martin.blumenstingl@googlemail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170318_053740_945305_3C323EF0 X-CRM114-Status: GOOD ( 14.70 ) 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@arm.com, narmstrong@baylibre.com, Martin Blumenstingl , catalin.marinas@arm.com, will.deacon@arm.com, gouwa@szwesion.com, afaerber@suse.de, linux-arm-kernel@lists.infradead.org, jbrunet@baylibre.com 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 Khadas VIM series consists of two boards which are almost identical: They are both using the same GXL S905X SoC, 100Mbit/s ethernet (through the SoC-internal PHY), 2GB DDR3 memory, a micro-SD card slot, onboard eMMC, Broadcom based SDIO WIFI, 2x USB A and 1x USB Type-C (the latter with OTG support). The red LED is driven by PWM_AO_B (which allows dimming), while the blue LED is managed by the firmware. The differences are: - the VIM Pro has a 16GB eMMC module, while the VIM only has 8GB - the VIM Pro uses an AP6255 a/b/g/n/ac WIFI module, while the VIM comes with an AP6212 b/g/n SDIO WIFI module (the Vim uses an 8GB eMMC module, while The boards are based on Amlogic's GXL S905X P212 reference design, which is why most of the functionality (all MMC controllers and power sequences, IR remote input, the main UART, ADC and ethernet) is simply inherited from meson-gxl-s905x-p212.dtsi. Signed-off-by: Martin Blumenstingl Tested-by: Neil Armstrong --- arch/arm64/boot/dts/amlogic/Makefile | 1 + .../dts/amlogic/meson-gxl-s905x-khadas-vim.dts | 114 +++++++++++++++++++++ 2 files changed, 115 insertions(+) create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile index 99ddfc8087d1..b9ad2db7398b 100644 --- a/arch/arm64/boot/dts/amlogic/Makefile +++ b/arch/arm64/boot/dts/amlogic/Makefile @@ -7,6 +7,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-vega-s95-meta.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-vega-s95-telos.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-wetek-hub.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-wetek-play2.dtb +dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-khadas-vim.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 diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts new file mode 100644 index 000000000000..3c8b0b51ef27 --- /dev/null +++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts @@ -0,0 +1,114 @@ +/* + * Copyright (c) 2017 Martin Blumenstingl . + * + * SPDX-License-Identifier: (GPL-2.0+ OR MIT) + */ + +/dts-v1/; + +#include + +#include "meson-gxl-s905x-p212.dtsi" + +/ { + compatible = "khadas,vim", "amlogic,s905x", "amlogic,meson-gxl"; + model = "Khadas VIM"; + + adc-keys { + compatible = "adc-keys"; + io-channels = <&saradc 0>; + io-channel-names = "buttons"; + keyup-threshold-microvolt = <1710000>; + + button-function { + label = "Function"; + linux,code = ; + press-threshold-microvolt = <10000>; + }; + }; + + aliases { + serial2 = &uart_AO_B; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <100>; + + button@0 { + label = "power"; + linux,code = ; + gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>; + }; + }; + + pwmleds { + compatible = "pwm-leds"; + + power { + label = "vim:red:power"; + pwms = <&pwm_AO_ab 1 7812500 0>; + max-brightness = <255>; + linux,default-trigger = "default-on"; + }; + }; +}; + +&i2c_A { + status = "okay"; + pinctrl-0 = <&i2c_a_pins>; + pinctrl-names = "default"; +}; + +&i2c_B { + status = "okay"; + pinctrl-0 = <&i2c_b_pins>; + pinctrl-names = "default"; + + rtc: rtc@51 { + /* has to be enabled manually when a battery is connected: */ + status = "disabled"; + compatible = "haoyu,hym8563"; + reg = <0x51>; + #clock-cells = <0>; + clock-frequency = <32768>; + clock-output-names = "xin32k"; + }; +}; + +&ir { + linux,rc-map-name = "rc-geekbox"; +}; + +&pwm_AO_ab { + status = "okay"; + pinctrl-0 = <&pwm_ao_a_3_pins>, <&pwm_ao_b_pins>; + pinctrl-names = "default"; + clocks = <&clkc CLKID_FCLK_DIV4>; + clock-names = "clkin0"; +}; + +&pwm_ef { + pinctrl-0 = <&pwm_e_pins>, <&pwm_f_clk_pins>; +}; + +&sd_emmc_a { + brcmf: bcrmf@1 { + reg = <1>; + compatible = "brcm,bcm4329-fmac"; + }; +}; + +/* This is brought out on the Linux_RX (18) and Linux_TX (19) pins: */ +&uart_AO { + status = "okay"; +}; + +/* This is brought out on the UART_RX_AO_B (15) and UART_TX_AO_B (16) pins: */ +&uart_AO_B { + status = "okay"; + pinctrl-0 = <&uart_ao_b_pins>; + pinctrl-names = "default"; +};