From patchwork Sat Mar 4 21:51:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 9604275 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 C5FC460414 for ; Sat, 4 Mar 2017 21:54:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B614B28395 for ; Sat, 4 Mar 2017 21:54:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AAA21283D4; Sat, 4 Mar 2017 21:54:03 +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 0D26928395 for ; Sat, 4 Mar 2017 21:54:03 +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=uJ1eLVHJyqbYodJZct/6XVdV2RL5eNr1U6Sa5JAtD/U=; b=GaHqXLzMtvP8EuPZrhLNbtxrBx SpZLRdJuJxX/EUdPcYWysqgVw0I6IIMrDVNMoT9THT/OhseV65hPmwGzwHrPjQiAHmEKtUE74Tc2H QwpAewh3/JtQ9wrX6JSmNoLQwwdvuTxiTqnJ1UHOa9Sowz5fl+42nRhteVhfrrbgLUa4sxzWtZXnB Z/XmOEvKW1qZVDU0HKsRZbVYU98YnMnkAl/MuJVBEFGCtNWdgnCPGo/mE3ydwkfqcQKL8C68BSgHW Pqb2lZ1Xmadw1QFX772fvmRpYxIFGGDvcvsnWJavFrKg/+5mWtRGoIw0wIsYIsaW1/xqtR5EKvfsE 2kyLQzwQ==; 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 1ckHco-00080J-QA; Sat, 04 Mar 2017 21:54:02 +0000 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1ckHav-0005wG-OP; Sat, 04 Mar 2017 21:52:09 +0000 Received: by mail-wm0-x241.google.com with SMTP id u132so129573wmg.1; Sat, 04 Mar 2017 13:51:46 -0800 (PST) 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=rWSFv8PSCHwxWRBkpsN1vPf8zbW6mCJQjTst/jrbs6Q=; b=RMjBrno0TYqg7o6HVwmsmoUosk6Uvv03OS4jYoUBormxEAZ0sLdloyKBbebRNcs/QM kygM41iC/oV5+Y0Q5AgprgvayYv4zXLL4sgvmZGNQbkl5K7SO/8ZbKBYKlVjEC2EgmpQ tBATSU7ma0+Ix+pekCjMnNoPDyXesh7KVIPJjA9cKWfBdIIkOqweUds+M9Fygfxa/eMF z1HaJqSpQxk8OcHSb1wTojvIhI7Ihsf/+bekj0ERWlpTlR/cHaTB4rDuVTz8X5XkLTfp MGPhFed1gJUAGW5AA+XC6fG7usWUtFbbcVq4DopCH0YU7TrJwyeYCWZlEUKpzm8iNIHS Vgwg== 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=rWSFv8PSCHwxWRBkpsN1vPf8zbW6mCJQjTst/jrbs6Q=; b=Jtp034gFqpvEBbPrS2ojwbQpCoTiezgnTETGM0q9GaCrVloBnoKa5R4aha/IjPOl5o MLatSZCSU0bn6+1/M1TwRZ7X2nUiL76o3isr51SXouJeLDvTogBS2XKPAcM3AkwEv4tt cCOUnUTyFfrg6owkQFsas71V3O+F9r+1V1u6PSRzeHAFxBbyH4KhInhrw2xMkfi1ANYz zk8jMnktlJVqzTicYCvnGPeUU0Cip5x8uEOk1Z1itZebbijEAxg/A1Wq/+23iZ1jq1UT MzQQI/whvaEHggZsGB3bzrpSsMm69vh6kgg5lJ7TjABlXmtgHttLtCIFw2m6MwALn5GS C7EQ== X-Gm-Message-State: AMke39lLwB8lG10qrr3xwfTGCHec3WU8B9rQIRkueF3rSDDxYDYMbyVVzXmXQDNCE2t/3g== X-Received: by 10.28.156.69 with SMTP id f66mr4205298wme.56.1488664305601; Sat, 04 Mar 2017 13:51:45 -0800 (PST) Received: from blackbox.darklights.net (p200300DCD3D1DA0468C08A6D1835A6BF.dip0.t-ipconnect.de. [2003:dc:d3d1:da04:68c0:8a6d:1835:a6bf]) by smtp.googlemail.com with ESMTPSA id 10sm20623775wrw.13.2017.03.04.13.51.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 04 Mar 2017 13:51:44 -0800 (PST) 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 3/3] ARM64: dts: meson-gxl: add support for the Khadas VIM board Date: Sat, 4 Mar 2017 22:51:26 +0100 Message-Id: <20170304215126.7020-4-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170304215126.7020-1-martin.blumenstingl@googlemail.com> References: <20170304215126.7020-1-martin.blumenstingl@googlemail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170304_135205_948987_0BCB357E X-CRM114-Status: GOOD ( 14.82 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=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 --- 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 3f94bce33b7f..6a316f863d73 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"; +};