Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp784978ybi; Fri, 24 May 2019 11:22:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqwgnrZogkKsZ0bghKDKzzMQrQ511a/8ebNRhISoUtTGG3YRtiMDz/7Ff4aHgSccw5QOZdPz X-Received: by 2002:a17:902:b704:: with SMTP id d4mr37972319pls.217.1558722155180; Fri, 24 May 2019 11:22:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558722155; cv=none; d=google.com; s=arc-20160816; b=G3d3IcziztFCd3L8HhkfzE6eFCX/7kij2i7J7aHe+vzRG39wefdnjkJ1R4xsfzcBta U0laiIz9rmpdAfWcnlcU2UCBfRdi2TzPxn0nFj4L8F8nXGnr9Ij7aYEldcEzPx4xC2ty XmtgkYRCalZ03YAWlSf9T+D5NPMR5UE1P8Bjj8CYqm8Zl8ffVFTxSygRE7zFvZ7mwm8/ EMWEEw/Whl+Zx1HIlVuVVLhlsuKx85GYZxRtHQNlBKmeZ5m7dyYDWL9IWUFnfzS/1mbi sgLS0WI0Fc6ZUv9/LEMfuWFnTcrWJNS2FEuOVnQbJkINChoZMjyDQwpPAunAeLsuHFac OPLQ== 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=CMwpxmkiGGLj4LCUsjsXv0reA0jujs/nc9A8nY8SSPI=; b=geyXk5AJ95NDjOVio7nYP/EDg8s2JDXURkJH+C6wdU8T7Ods4zYjmauvvUzvuyPOhl 5khbbYDSGBfYPDn/2dZoPhSqjp/JyMO+uBwObwODXaReTc3BWTmjb6QucS99GDR9GJrT HC1R4AEu9PaYCgkerDFIXIse22RteIExICMNZ7H/yw57kEi+w7pqXQCn2uOQLRFFub3c 69gmc6wvvFDJEwpt2h/aZgQHXUt34tyrys07pZMBVpvjRkprIvqtBv6AK63QpAI4SyPz 93RSzeqBI19a3F/U7EGuWUgQ2mav0oF71qj+128CqQcEYwr9fXxwGli0MaPJsSxAbcmN /F9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b=UHexDVlZ; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 95si4885361pld.143.2019.05.24.11.22.19; Fri, 24 May 2019 11:22:35 -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=@googlemail.com header.s=20161025 header.b=UHexDVlZ; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391479AbfEXSTv (ORCPT + 99 others); Fri, 24 May 2019 14:19:51 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:36221 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729348AbfEXSTt (ORCPT ); Fri, 24 May 2019 14:19:49 -0400 Received: by mail-wm1-f67.google.com with SMTP id v22so2864818wml.1 for ; Fri, 24 May 2019 11:19:48 -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 :mime-version:content-transfer-encoding; bh=CMwpxmkiGGLj4LCUsjsXv0reA0jujs/nc9A8nY8SSPI=; b=UHexDVlZQnrlflu++xZeqp3+kXzwHwQxVNyVA4s0XysLJxw4bOA/fNezB3O55xHeeI e9r31Ts0F83VTO1oxBzHc8Yp84Wa4K0U5mvtIrHdyHn9T9Ux7Af8l9yWKscJDhifFeSF rQ7ZMwr07ggFveiQG3oJ/gJh7Z2oPKQLcN1ywgweuWNKb4zZhHOXQoXf3mIuKL3buiG5 0qyy7pvtzyImFT5jjqqSKrxvzJ+hvCTrt8KmZjR5G57VufYOYvk5glbrfOXdsUWkcyHS AqxVn4IJzCgDsWej9viPIefzvxXOC/mFEBAZ7RKBEra1CavFioRdliWZORGFaPadS/yt kqCA== 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=CMwpxmkiGGLj4LCUsjsXv0reA0jujs/nc9A8nY8SSPI=; b=HV1eF7oO9AD4tL0jrgaJyIpLA3bCbDa4/+2WNxpv0WQ2zhRhKnPeeLxEMaU9OZO0HK Y6hXFxHFgKjMMPvlQDiMfoC4E4O83BvEmyq0cXVy3v8PQGY660A4vGCab/ytfOk+62tR jIwyAO7dZ+ZQfdaWavGNukuqrb4rYwV7vImjsGbMwFswN8Hsph+yYFN5n0Eor89TL5tx BigwRRapfgorCABSx3RnIAa90D/zdRsTV+OT6Qp5tj6xgVPXDN1UzMjlueW2+75NlGsY 2jSPIHE7HM56Z4GCKSTd+o0snpBosKZ6D/mQi8UF8ABePqBuk4ZvxcCtI1+nMuBemtZM nbUQ== X-Gm-Message-State: APjAAAU3Axs4xb7yqJq0gERKH2U5SWjJEGY5gIeRjLw/T0XZxgb2YkX5 OW7K9N83tgFkRLKjYjBqRmQ= X-Received: by 2002:a1c:a00a:: with SMTP id j10mr820472wme.41.1558721987620; Fri, 24 May 2019 11:19:47 -0700 (PDT) Received: from blackbox.darklights.net (p200300F133EE7100D0AA8776F4474B72.dip0.t-ipconnect.de. [2003:f1:33ee:7100:d0aa:8776:f447:4b72]) by smtp.googlemail.com with ESMTPSA id i15sm3181831wre.30.2019.05.24.11.19.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 May 2019 11:19:46 -0700 (PDT) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org, khilman@baylibre.com Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, hexdump0815@googlemail.com, Martin Blumenstingl Subject: [PATCH 1/1] ARM: dts: meson8b: mxq: improve support for the TRONFY MXQ S805 Date: Fri, 24 May 2019 20:19:36 +0200 Message-Id: <20190524181936.29470-2-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190524181936.29470-1-martin.blumenstingl@googlemail.com> References: <20190524181936.29470-1-martin.blumenstingl@googlemail.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 The TRONFY MXQ comes with either 1GB or 2GB RAM. Both variants share (like most boards based on Amlogic reference designs): - 10/100 PHY (IC Plus IP101GR) with GPIOH_4 being the reset line and GPIOH_3 the interrupt line - SD card slot with the card detection GPIO at CARD_6 - VCCK is generated by PWM_C with a period of 1148ns and XTAL as input clock - USB OTG exposed on one of the USB-A connectors - 4-port USB hub with 3 ports exposed to the outside There seem the multiple board revision out there according to various forum posts: - storage: eMMC or NAND flash - wifi: Ampak AP6210 or Realtek 8189 Add support for the following functionality: - SoC temperature (hwmon) - changing the CPU voltage - Ethernet connectivity - SD card - USB Signed-off-by: Martin Blumenstingl --- arch/arm/boot/dts/meson8b-mxq.dts | 139 ++++++++++++++++++++++++++++++ 1 file changed, 139 insertions(+) diff --git a/arch/arm/boot/dts/meson8b-mxq.dts b/arch/arm/boot/dts/meson8b-mxq.dts index 08ddd7fb0bf8..07f1cc513f8a 100644 --- a/arch/arm/boot/dts/meson8b-mxq.dts +++ b/arch/arm/boot/dts/meson8b-mxq.dts @@ -45,6 +45,9 @@ */ /dts-v1/; + +#include + #include "meson8b.dtsi" / { @@ -63,6 +66,126 @@ device_type = "memory"; reg = <0x40000000 0x40000000>; }; + + iio-hwmon { + compatible = "iio-hwmon"; + io-channels = <&saradc 8>; + }; + + vcck: regulator-vcck { + compatible = "pwm-regulator"; + + regulator-name = "VCCK"; + regulator-min-microvolt = <860000>; + regulator-max-microvolt = <1140000>; + + pwms = <&pwm_cd 0 1148 0>; + pwm-dutycycle-range = <100 0>; + + regulator-boot-on; + regulator-always-on; + }; + + vcc_1v8: regulator-vcc1v8 { + compatible = "regulator-fixed"; + + regulator-name = "VCC1V8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + + vin-supply = <&vcc_3v3>; + }; + + vcc_3v3: regulator-vcc3v3 { + compatible = "regulator-fixed"; + + regulator-name = "VCC3V3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + + vin-supply = <&vcc_5v>; + }; + + vcc_5v: regulator-vcc5v { + compatible = "regulator-fixed"; + + regulator-name = "VCC5V"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + + regulator-boot-on; + regulator-always-on; + }; +}; + +&cpu0 { + cpu-supply = <&vcck>; +}; + +ðmac { + status = "okay"; + + pinctrl-0 = <ð_rmii_pins>; + pinctrl-names = "default"; + + phy-handle = <ð_phy0>; + phy-mode = "rmii"; + + snps,reset-gpio = <&gpio GPIOH_4 0>; + snps,reset-delays-us = <0 10000 1000000>; + snps,reset-active-low; + + mdio { + compatible = "snps,dwmac-mdio"; + #address-cells = <1>; + #size-cells = <0>; + + eth_phy0: ethernet-phy@0 { + /* IC Plus IP101A/G (0x02430c54) */ + reg = <0>; + icplus,select-interrupt; + interrupt-parent = <&gpio_intc>; + /* GPIOH_3 */ + interrupts = <17 IRQ_TYPE_LEVEL_LOW>; + }; + }; +}; + +&saradc { + status = "okay"; + vref-supply = <&vcc_1v8>; +}; + +&sdio { + status = "okay"; + + pinctrl-0 = <&sd_b_pins>; + pinctrl-names = "default"; + + /* SD card */ + sd_card_slot: slot@1 { + compatible = "mmc-slot"; + reg = <1>; + status = "okay"; + + bus-width = <4>; + no-sdio; + cap-mmc-highspeed; + cap-sd-highspeed; + disable-wp; + + cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>; + + vmmc-supply = <&vcc_3v3>; + }; +}; + +&pwm_cd { + status = "okay"; + pinctrl-0 = <&pwm_c1_pins>; + pinctrl-names = "default"; + clocks = <&clkc CLKID_XTAL>; + clock-names = "clkin0"; }; &uart_AO { @@ -70,3 +193,19 @@ pinctrl-0 = <&uart_ao_a_pins>; pinctrl-names = "default"; }; + +&usb0 { + status = "okay"; +}; + +&usb0_phy { + status = "okay"; +}; + +&usb1 { + status = "okay"; +}; + +&usb1_phy { + status = "okay"; +}; -- 2.21.0