From patchwork Thu Sep 13 20:29:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 10600067 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 ECCF214F9 for ; Thu, 13 Sep 2018 20:33:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D9F8A2A5F9 for ; Thu, 13 Sep 2018 20:33:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CA6192B4DB; Thu, 13 Sep 2018 20:33:34 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham 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 299302A5F9 for ; Thu, 13 Sep 2018 20:33:34 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=sgy3r2LYjWwwEhMWi30b68Ga9P2VEOK2mStOfUVL0m4=; b=U9Rx+pOHUrO2+u p4zBszp8VDiKdpOLdfVYDesDUES5Uan3cbaFKj+8aroyUI2uzUNASlcEHJr4LEYbPCtFB9r1aeAL/ H/Pw/Lz+oFyyH46LHZtinB8kWYkxQIlmLQdmyyOakijIqZ/elMIicq5vaejqAPoG+kK8IdCTo09Ws 6PbPaGWul5WUNvN/uT4bWboEyJR1dLML4O8izk0+C55VWFSGvZUlYVNPFvuH38coV4UPXjOQwyiQ4 PYzQK12PME1bhF/BvC0o6y8S9+0dWg3rYiTGZ1VG2z/PFfbDAy5CgrRMRZi9RKa9g1Sr939MxohiB zwkfLcgwDtOhVj6YOHEg==; 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 1g0YIi-0001Ch-VH; Thu, 13 Sep 2018 20:33:21 +0000 Received: from mail-wm1-f68.google.com ([209.85.128.68]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g0YF9-0006gY-2n; Thu, 13 Sep 2018 20:30:04 +0000 Received: by mail-wm1-f68.google.com with SMTP id s12-v6so93813wmc.0; Thu, 13 Sep 2018 13:29:28 -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=hLeIs94Wo3ta7UfkhFfKKo6COsbQz27rvtbRMJCHnO0=; b=rK5HrkbDykA0VEjsxwg/VWGmgbH5FFR8rg3u4+PlisX/O4P5urMC41fb36ksLh/8kg YKVbJ+hTW+2atly3ws4cHXMRE1jBHKYY+SIKvpG87187tc91+tpH/irXDdQcv2KJUs5A 4XYk2opliGuIfVXEyliIB4U3COgefSSgVDUhcTxXrde8Tp+ZpJPp3nbgBVdauc21Fkac VsoslxAcHillmT4dGLxa2E2gj4kSJTcZNiqHQZmUEX50YCvKSOI9SrvG3lxb/cwphaFb MKEUYx10TRSpXmMV+VzBBxT32bmAP+ZQR4W24unoboJqMTLgrIa0kRiFc36ZJHkrdsXq whag== 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=hLeIs94Wo3ta7UfkhFfKKo6COsbQz27rvtbRMJCHnO0=; b=oiiHTqJ71D503nLwlpvwqgNFkDFvGh2AKZ3Xw0yMlFnBrORx3uphiaJfYhCrmSXAIV xDDM8L9pyrvRAq3IJE0icVT5Mwc1jxqXJ7qx5Ml/fYcTb//1JDvq1+Ol0Iw+7sH50UIs jDJ4zeYhmGZY4yxSR4CfVmKWc3B3leB0Eurg30F9J2a+Z8vKxMzeQOK3LfgaZ0jOLoNJ o050M5VUEaofKSJ1ID0EpnNkECTKV92yzhI14iw/Ny2iZkg6D3a0uocQBRVjkJpW3LmG qkHkbMiJeeUAdwjLgDxd5Y9FTZDEiLhCgWi6TBmSu0CW/Xsgdh48oBKOQGK0J+xYy2Vs MCuQ== X-Gm-Message-State: APzg51B7jnsgTLJH80/iqWjZ0v2PBXA5EN/GcMi13cNcAuWha6tlAzGz U09ZQ83DLqQSDVYgMiiy/6bHVjjU X-Google-Smtp-Source: ANB0VdbwmPF2cyb7wEOrSnTzhU+Q06ciTpZaEmUU/5GV+xtCPwQenPCVcDhgHbLIrvcoiBIlRhVcoQ== X-Received: by 2002:a1c:40d5:: with SMTP id n204-v6mr6863221wma.44.1536870565852; Thu, 13 Sep 2018 13:29:25 -0700 (PDT) Received: from blackbox.darklights.net (p200300DCD72E2B00B426A3A246F82EA8.dip0.t-ipconnect.de. [2003:dc:d72e:2b00:b426:a3a2:46f8:2ea8]) by smtp.googlemail.com with ESMTPSA id e7-v6sm6076254wru.46.2018.09.13.13.29.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Sep 2018 13:29:25 -0700 (PDT) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org, khilman@baylibre.com, carlo@caione.org Subject: [PATCH 1/4] ARM: dts: meson8b: odroidc1: add the CPU voltage regulator Date: Thu, 13 Sep 2018 22:29:16 +0200 Message-Id: <20180913202919.20927-2-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180913202919.20927-1-martin.blumenstingl@googlemail.com> References: <20180913202919.20927-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180913_132939_209583_AB050320 X-CRM114-Status: GOOD ( 12.00 ) 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: Martin Blumenstingl , linux-arm-kernel@lists.infradead.org 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 CPU voltage regulator is a "Monolithic Power Systems MP2161" (according to the Odroid-C1+'s schematics). It is driven by PWM_C on GPIODV_9. Hardkernel's 3.10 kernel (based on the Amlogic GPL kernel sources) defines a PWM voltage table with the following values: - 0.86 volts = PWM register value 0x10f001b - (more values in 0.1 volt increments) - 1.14 volts = PWM register value 0x000012a When using the XTAL (24MHz) as input this translates into a PWM period of 12218ns with 0.86V using a duty cycle of 91% and 1.14V using a duty cycle of 0%. Signed-off-by: Martin Blumenstingl --- arch/arm/boot/dts/meson8b-odroidc1.dts | 27 ++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/arch/arm/boot/dts/meson8b-odroidc1.dts b/arch/arm/boot/dts/meson8b-odroidc1.dts index ef3177d3da3d..0557823cdd64 100644 --- a/arch/arm/boot/dts/meson8b-odroidc1.dts +++ b/arch/arm/boot/dts/meson8b-odroidc1.dts @@ -101,6 +101,25 @@ states = <3300000 0 1800000 1>; }; + + vcck: regulator-vcck { + /* Monolithic Power Systems MP2161 */ + compatible = "pwm-regulator"; + + regulator-name = "VCCK"; + regulator-min-microvolt = <860000>; + regulator-max-microvolt = <1140000>; + + pwms = <&pwm_cd 0 12218 0>; + pwm-dutycycle-range = <91 0>; + + regulator-boot-on; + regulator-always-on; + }; +}; + +&cpu0 { + cpu-supply = <&vcck>; }; ðmac { @@ -180,6 +199,14 @@ }; }; +&pwm_cd { + status = "okay"; + pinctrl-0 = <&pwm_c1_pins>; + pinctrl-names = "default"; + clocks = <&clkc CLKID_XTAL>; + clock-names = "clkin0"; +}; + &uart_AO { status = "okay"; pinctrl-0 = <&uart_ao_a_pins>; From patchwork Thu Sep 13 20:29:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 10600061 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 9FA7F14F9 for ; Thu, 13 Sep 2018 20:32:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8CE3A2B4F5 for ; Thu, 13 Sep 2018 20:32:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 817452B512; Thu, 13 Sep 2018 20:32:37 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham 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 053092B4F5 for ; Thu, 13 Sep 2018 20:32:36 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=a6mHRupHWW9qBtBSxC6zlmJG3RGOY3q5XsYQVE4G5/A=; b=Ofw31mGjA967Hh LY/8Eu6mjT7fv6l6/uECFZPJ2FYcWUwVelIg+he7TGRP1jvz63inEGhzsywqxq6TrxplCXJNCekSk pc65XLX/CbjdEZcXrD0pZPIxKEiEhemZ3ApxOFYLXCw3uZQ6aWHVUA8R7MTcHcyn9SUxKHjKIfDwj er5ojVor6hr++0Qef8MGD+rMPvbxyB6LKlxC3c4NqxKfDlifYnbgUGIHhvxdM96hxoHjSYDAbU486 vR+KE2F67oAlHzrr/+JUd81jjz4tEZYIO9LlZmFjHcLtpAkr4bkFUu56aFWpEYdqAuwiyMQvjYYKT 1pONFD8hg92tfD7KYY4w==; 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 1g0YHn-0000qY-Cf; Thu, 13 Sep 2018 20:32:23 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g0YFF-0006nT-Ry; Thu, 13 Sep 2018 20:29:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=p6S+XLj7G5aywwSNKr0XBMllwrjvbp9GivNG+56tFI8=; b=dd+ivEsc7tpCeBJ350IREUGHJL 75NXOaG8mG2xcKDSvmk9gTSS7DwmIPjK3WyRTeREA4iF+XE4qrgaQHWYWel+iRJR6W7L31EReKrKD c2Y06aHPfg10xWSQAQFW2uuXlYFvVvJMBYbeBzpU68m6MRV4uTvCyCHaaJeHbciRnGrYauMSIM58Q FKRLfYS2nWPt1gZu3sYTOTIHyTX0COFZCHnZ9QrWOVCu45LQl9GUTDr6xWTnnMAN4p0jTKAW34IQI ryPck+DXHaF50QTzamkkwqbOs4FISXk/ZTVZ4C1AC+MNpNqG2IuyoiopmiFTQvmGHVQsp04T2JQTN EbD2qoAQ==; Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g0YFC-0006yS-Rd; Thu, 13 Sep 2018 20:29:43 +0000 Received: by mail-wr1-x443.google.com with SMTP id s14-v6so7976527wrw.6; Thu, 13 Sep 2018 13:29:30 -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=p6S+XLj7G5aywwSNKr0XBMllwrjvbp9GivNG+56tFI8=; b=Y0jEqHWUIn6EfsJrhqQBrtkoHgt1FJIMYcz7hhRXx5f2dOUfT43VHPnX7Zj3IryRd2 XqdcasL/9DLHMCXZQbnx0WdMhznCzsm7giNy4paYkgn1dFgqduIrtq4fml9Obzrm+6J+ VIBZGk77XM4fVlC6jzQ7RUfCbBezLCeqdURB5SO7rdn34YBTgA6vVyMxdgcsvm94cByy NQgsMX2dm2wjMqLUumDc0No24p89s658qTotEX30MsAXq3Nqe7Uq0JbnwTiZiSOwSWIY +9KfB03myWYV1QNmFEPTeN9bHObcpII82an6DfAV2nXYdCGOVvLTG+jz81ZZQa+n6019 hs4w== 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=p6S+XLj7G5aywwSNKr0XBMllwrjvbp9GivNG+56tFI8=; b=Nh81uXBULZh8YYh+6/urRF3fzk1+cZjS+A43NgR1r2InuBcW/dglsx5pOlfU2ocrAm 7QhI9ZlA8O03LEl+cqi5yrmLkv3vD0c3KHs24UT2nEZiYRQVemUBmQvNuTc9X6gM8eK0 vQ9NSThVoyDRyNjfts72PNT9BbdqRw6F7koAXOQ4Tg69hFGbwJfxT0e+wuz2Ew9ZevEj TsBcuvyAgcSuaul0NmsIjrZ65Xz9A8eW93Pqk1/jkE6Gmzx8Y7wR3YjzNz1rzySSiaHV 56HmugFFzFmXRejqultn+CvBICdziX0u6HHUlxC7kzfeyxjTtvpfzSfRLSvpRxjRSh+M ZCZg== X-Gm-Message-State: APzg51ClmloaJHyfYN4E6Ka/cMdFcGk2F9A1S2G7MPzmnGMAzsHazqTk iIB2WrQFH62p0gQa4BDhGNXGHCQR X-Google-Smtp-Source: ANB0VdZn3DzfYf1TkBzNtt+ewyeP7kehdRNN7wOs5A+RwqTFjXMTsrmtWZtklKxAj5RYUYfirOvFcg== X-Received: by 2002:adf:a4d1:: with SMTP id h17-v6mr6444529wrb.167.1536870566901; Thu, 13 Sep 2018 13:29:26 -0700 (PDT) Received: from blackbox.darklights.net (p200300DCD72E2B00B426A3A246F82EA8.dip0.t-ipconnect.de. [2003:dc:d72e:2b00:b426:a3a2:46f8:2ea8]) by smtp.googlemail.com with ESMTPSA id e7-v6sm6076254wru.46.2018.09.13.13.29.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Sep 2018 13:29:26 -0700 (PDT) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org, khilman@baylibre.com, carlo@caione.org Subject: [PATCH 2/4] ARM: dts: meson8b: odroidc1: add the fixed voltage regulators Date: Thu, 13 Sep 2018 22:29:17 +0200 Message-Id: <20180913202919.20927-3-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180913202919.20927-1-martin.blumenstingl@googlemail.com> References: <20180913202919.20927-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180913_162942_999835_52665403 X-CRM114-Status: GOOD ( 14.05 ) 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: Martin Blumenstingl , linux-arm-kernel@lists.infradead.org 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 There are multiple fixed regulators on the Odroid-C1 board. Add them so they can be used when we add the devices that need them (SAR ADC needs the 1.8V IOREF, RTC needs VDD_RTC). These are: - P5V0 is the main 5V power input - VCC3V3 / VDDIO_AO3V3 / VDD3V3: fixed regulator with 3.3V output which is supplied by P5V0 - IOREF_1V8 / VCC1V8 / VDD1V8: fixed regulator with 1.8V output which is supplied by P5V0 - VDD_RTC: fixed voltage regulator with 0.9V output which is supplied by VDDIO_AO3V3 - DDR_VDDC / DDR3_1V5: fixed voltage regulator with 1.5V output which is supplied by P5V0 - the existing TF_IO and RFLASH_VDD_EN regulators are supplied by VDDIO_AO3V3 - the existing VCCK regulator is supplied by P5V0 This does not add the missing VDDEE regulator (controlled by PWM_D) because it's not clear yet how to configure the voltage of that regulator. Signed-off-by: Martin Blumenstingl --- arch/arm/boot/dts/meson8b-odroidc1.dts | 73 ++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/arch/arm/boot/dts/meson8b-odroidc1.dts b/arch/arm/boot/dts/meson8b-odroidc1.dts index 0557823cdd64..a08dccccdb5e 100644 --- a/arch/arm/boot/dts/meson8b-odroidc1.dts +++ b/arch/arm/boot/dts/meson8b-odroidc1.dts @@ -71,6 +71,14 @@ }; }; + p5v0: regulator-p5v0 { + compatible = "regulator-fixed"; + + regulator-name = "P5V0"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + }; + tflash_vdd: regulator-tflash_vdd { /* * signal name from schematics: TFLASH_VDD_EN @@ -81,6 +89,8 @@ regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; + vin-supply = <&vcc_3v3>; + gpio = <&gpio GPIOY_12 GPIO_ACTIVE_HIGH>; enable-active-high; }; @@ -92,6 +102,8 @@ regulator-min-microvolt = <1800000>; regulator-max-microvolt = <3300000>; + vin-supply = <&vcc_3v3>; + /* * signal name from schematics: TF_3V3N_1V8_EN */ @@ -102,6 +114,36 @@ 1800000 1>; }; + vcc_1v8: regulator-vcc-1v8 { + /* + * RICHTEK RT9179 configured for a fixed output voltage of + * 1.8V. This supplies not only VCC1V8 but also IOREF_1V8 and + * VDD1V8 according to the schematics. + */ + compatible = "regulator-fixed"; + + regulator-name = "VCC1V8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + + vin-supply = <&p5v0>; + }; + + vcc_3v3: regulator-vcc-3v3 { + /* + * Monolithic Power Systems MP2161 configured for a fixed + * output voltage of 3.3V. This supplies not only VCC3V3 but + * also VDD3V3 and VDDIO_AO3V3 according to the schematics. + */ + compatible = "regulator-fixed"; + + regulator-name = "VCC3V3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + + vin-supply = <&p5v0>; + }; + vcck: regulator-vcck { /* Monolithic Power Systems MP2161 */ compatible = "pwm-regulator"; @@ -110,12 +152,43 @@ regulator-min-microvolt = <860000>; regulator-max-microvolt = <1140000>; + vin-supply = <&p5v0>; + pwms = <&pwm_cd 0 12218 0>; pwm-dutycycle-range = <91 0>; regulator-boot-on; regulator-always-on; }; + + vddc_ddr: regulator-vddc-ddr { + /* + * Monolithic Power Systems MP2161 configured for a fixed + * output voltage of 1.5V. This supplies not only DDR_VDDC but + * also DDR3_1V5 according to the schematics. + */ + compatible = "regulator-fixed"; + + regulator-name = "DDR_VDDC"; + regulator-min-microvolt = <1500000>; + regulator-max-microvolt = <1500000>; + + vin-supply = <&p5v0>; + }; + + vdd_rtc: regulator-vdd-rtc { + /* + * Torex Semiconductor XC6215 configured for a fixed output of + * 0.9V. + */ + compatible = "regulator-fixed"; + + regulator-name = "VDD_RTC"; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <900000>; + + vin-supply = <&vcc_3v3>; + }; }; &cpu0 { From patchwork Thu Sep 13 20:29:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 10600075 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 F1CE06CB for ; Thu, 13 Sep 2018 20:44:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 224642A733 for ; Thu, 13 Sep 2018 20:44:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 145932B56C; Thu, 13 Sep 2018 20:44:35 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham 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 A47F82A733 for ; Thu, 13 Sep 2018 20:44:34 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=ffl0APaUVRAjAXaiB2czkEdgrBMXKbHBBBEe+DK7OLA=; b=r7YMFmmIYx5zB7 Gr5rTP+quIM2YWR4T3+3fh9B+bl4lQhTAN1Mytq/TUb6RCIyHBljLqL0AMWC1fpkrdZyYks7MuB6j FDQpNNrqjseuNWnCHDD3mpPzn0h65fB+fklJZWA47r48YiL5TgSgLie5FrX/uqaFyfV9Dh829SJ1B P1wUNdyDmxCC9qUeVprpC3ictCDT8D+oT6v2JBR/w+ml1A4nG2OOv5+cno9aPm3sTfmI2VzffKPYW VuYCNsHKYCLU5WAlXBPHDXzunkQzI////OJt7Wf3Vul0nfYrI7WMYJu6WccDkDgmLjtYACvJzuPzz +49Fms7+PWozA6nYATwg==; 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 1g0YTQ-0005Br-Mv; Thu, 13 Sep 2018 20:44:24 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g0YTK-0004gl-C5; Thu, 13 Sep 2018 20:44:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ggiUzi1+C6r5k3AwYmH4QEZqN6b6a1Ufy1Uia43pTB0=; b=DkbrpJivfTjwxQgiNqWo4DV9fb M0242BxJvaNdv77yRPzd55lxAjXqcRXJGLuxkn/lKYkD9dKg0dKDiKeZuBQVBVl8Wk20N2MqzR/Bs wwZd8xBmAQ/Q5JahKIfHaGR/JLXNeUTWP+0I6fmhlH9O21bw/UdvPuoKT1lemvmVLI+SKTjhQyTAY zyFTgFbkGa0xMUKaFFgylICbjXx2Bbfet7TP9M+Xa8BBKX16GNvQWNKXg7xAf3/CUYmZDGaFuOL/R A1hUsNnUePt4oErUfr6Xdd8jW/1qiHIqo+oE4eozStXhlu0XOmPG8vpeY6whl2OTB4qmDjKyrSy+C kHEX7QKw==; Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g0YF9-0006hT-Ot; Thu, 13 Sep 2018 20:29:41 +0000 Received: by mail-wr1-x444.google.com with SMTP id v16-v6so7963564wro.11; Thu, 13 Sep 2018 13:29:29 -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=ggiUzi1+C6r5k3AwYmH4QEZqN6b6a1Ufy1Uia43pTB0=; b=Ynwb8r4+A9WGXgzbKLsFYSd4HL33bMbK42ZSeJQydvwtricGmkNSn3o6h6rJ8xi4eD Q1pYvytBe5+nmxcmmnsvvlqdy64SGfDdb/Pars+Es+9NAP25IsMeuuRv8mrvL0aN2J/1 zfXKJ11MnxaqAp+OEj8POjevn0aEaRfN4WHA38bd1o7n2Ed5x2aO9A2zCrl+qCuOQHls RF/NPEs5JUHYQ+fL+N27dMaEhf4ET/IQkZTA0OFQFpvFmDWtHU5pin0OyW9bT8TxpYn0 GjxW4SALSNb9osBhxyvIOHTXHo6jDIR3JEGCQhVAnJ16g1zaTCuSoIno/KcnTKKxPaJd Y9aw== 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=ggiUzi1+C6r5k3AwYmH4QEZqN6b6a1Ufy1Uia43pTB0=; b=PSVsbC3fUO6VIP57BecpbnK77kdB/lZQZaWSpxVzR1jKiJ+tJZ3oD+kLUPk/rN48Bi 3xCerYeB1amHrTAZPFsclYfOrZi9x3oGlB9na1fD0VnyHVL+SmEQmURQ3ole+3ahZ+SG U5NSS5lLUb1DUBmwNZWqyHeHSl3p+dY7K1nae7CgRPLlSDHAKkPOdg2u3zBoDTbSOXN+ JSW6xHHSAzGiy3ZWY7TWqkPLfdSuDoJB0ILaItdTDEHhAtsrI+7nSUbEo43F5JwOjNr0 CmSD/slkuUnFY6cqJLWHmcmwNnjeTJtU9FaO554yEqFRBsGlI3uMTPr/gRI5PxsZvmpH o19A== X-Gm-Message-State: APzg51Djr+yqgcwMqyEuECF6IdEV22sxgOJlCUHWqLyZgDS4rptBixp4 aHnQanA6Luz4o+X46uMNoKsINQ9c X-Google-Smtp-Source: ANB0Vdbm70ynXVTaE3onT1EJ6I/kocmPqNAO90/pybQD6twPHru5Ovjts89+/3V0cwfaO1clxw7PPA== X-Received: by 2002:a5d:4250:: with SMTP id s16-v6mr6904710wrr.260.1536870567844; Thu, 13 Sep 2018 13:29:27 -0700 (PDT) Received: from blackbox.darklights.net (p200300DCD72E2B00B426A3A246F82EA8.dip0.t-ipconnect.de. [2003:dc:d72e:2b00:b426:a3a2:46f8:2ea8]) by smtp.googlemail.com with ESMTPSA id e7-v6sm6076254wru.46.2018.09.13.13.29.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Sep 2018 13:29:27 -0700 (PDT) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org, khilman@baylibre.com, carlo@caione.org Subject: [PATCH 3/4] ARM: dts: meson8b: odroidc1: enable the SAR ADC Date: Thu, 13 Sep 2018 22:29:18 +0200 Message-Id: <20180913202919.20927-4-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180913202919.20927-1-martin.blumenstingl@googlemail.com> References: <20180913202919.20927-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180913_212939_796568_FD58DB6B X-CRM114-Status: GOOD ( 11.16 ) 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: Martin Blumenstingl , linux-arm-kernel@lists.infradead.org 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 Odroid-C1 exposes ADC channels 0 and 1 on the GPIO headers. NOTE: Due to the SoC design these are limited to 1.8V (instead of 3.3V like all other pins). Enable the SAR ADC to enable voltage measurements on these pins. Signed-off-by: Martin Blumenstingl --- arch/arm/boot/dts/meson8b-odroidc1.dts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm/boot/dts/meson8b-odroidc1.dts b/arch/arm/boot/dts/meson8b-odroidc1.dts index a08dccccdb5e..7c1225658567 100644 --- a/arch/arm/boot/dts/meson8b-odroidc1.dts +++ b/arch/arm/boot/dts/meson8b-odroidc1.dts @@ -246,6 +246,11 @@ pinctrl-names = "default"; }; +&saradc { + status = "okay"; + vref-supply = <&vcc_1v8>; +}; + &sdio { status = "okay"; From patchwork Thu Sep 13 20:29:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 10600069 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 BAFAF14F9 for ; Thu, 13 Sep 2018 20:34:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AAB5B2B4F8 for ; Thu, 13 Sep 2018 20:34:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9ECF82B525; Thu, 13 Sep 2018 20:34:11 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham 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 E3C0D2B4F8 for ; Thu, 13 Sep 2018 20:34:10 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=QZKQGchWmBmJT6ERjHhXplenD0o32h7ImtJA17TF01w=; b=eO8gy2VcvewflI jV0QiNPkJ48D3/8PUOwfbeEJjRHWQkNvO3xqiIwglKCkJd3vc7rPrub5eJRcUhwCWJzune1EA7CzA ECGnbe67mabhDW+3HlEIlcGLepMlg6W22Qxmr7UVr5G76S6zIybwizW7YRQ5ILSrTRIDacbec0fM3 jdDOI2B/XdBCs5Oe55LXeg5nTahEAus1SxwkYn7oujKqUsPkjvbccESud0DftGZyyO8t4OFVSc6Ms bq//OOmA79stC2L0GZrQOWdJ1KnHZ3Ap2LtnWn03bbCaW0eve+Z+XPeXvw+fSmUAl32sxfHPVUt5M fXY6CObZpbzPaekyNqRg==; 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 1g0YJM-0001TO-D2; Thu, 13 Sep 2018 20:34:00 +0000 Received: from mail-wr1-f68.google.com ([209.85.221.68]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g0YFB-0006i2-PN; Thu, 13 Sep 2018 20:30:07 +0000 Received: by mail-wr1-f68.google.com with SMTP id n2-v6so7983116wrw.7; Thu, 13 Sep 2018 13:29:31 -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=tjOLX51GQEmynWjlS2OEyC+R7BmgQ2xEs4nrv5u/iV4=; b=lacryls9gXJP8iAkho3yQv1hoTgYs/pI+DCpLzlVMvoL/9yJwtUyEjSKr0golTd+5s MhnohBpjLY0ZjbbAPGQn5Fr2aCsVjf9pGcUXkzxzga9yg+LkAyZ1meNZbaVjg6eEu66i yLF9RQijPnlUMB68Vw9XFYYx247y6Wvv3XB35VhAy0KZGysxhvncUWQ2QYMfmwHCo6D3 vM3o0NlF7pkan9CUjYTjIX/c/qB0wFfjObkS/5zSh6K72m+Kgc/vdhE+sEjHPLp7ECuN 8zkGBpWBaLF3U/+a02GeiPny4V76Svx3r04vuAlPtbKMDC/QgQvZvs/mUN1ItNpuljm4 3ZDg== 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=tjOLX51GQEmynWjlS2OEyC+R7BmgQ2xEs4nrv5u/iV4=; b=bu6zHgKBCqv2FyXZdXPXVTu9CemlxTgLU1en2WOU+L9nYfxPcUvz9+Svfdybu6k30v ndC6A+iv8JRi6VHJ0fDdwbcSA404LqMXms6wR2NviXUYBlWViuwWP8e9Wc6DUSCUp7Ou 6dwQlXoFtqipM+H6mUuyS9rUNc78f6dbw5FIlAkACtRGjlXL0WaWvFfOSfXDMz9q+7B1 exaYgS7/HKZkyoUzlUf4cq76mnNA43ELG2lVrGrsKkMPbbuebfvOxHdk/acN/X7Qw/ru Z/QR+kFU/sr4Jl9CKklRpsDjgr4/NS3yi8mSRSiAusRyZ3+MNSgWkwWDh35xvMDT86Kd lBJQ== X-Gm-Message-State: APzg51AERsacV5YOvmxQu8kW/Ed66gyvUvBgmD3xpJ+cS2SbXgEyhzTd m7R6SNuP4OtYxrgs+d3IAMPnL6FB X-Google-Smtp-Source: ANB0Vdag3g/+ltpJqeBjsV7RUInOL0NIDq7E0icOCE1CmX0gRTSdthhGt9UbTtXyum4yNjakQgi+Iw== X-Received: by 2002:a1c:c7c1:: with SMTP id x184-v6mr7106495wmf.134.1536870569027; Thu, 13 Sep 2018 13:29:29 -0700 (PDT) Received: from blackbox.darklights.net (p200300DCD72E2B00B426A3A246F82EA8.dip0.t-ipconnect.de. [2003:dc:d72e:2b00:b426:a3a2:46f8:2ea8]) by smtp.googlemail.com with ESMTPSA id e7-v6sm6076254wru.46.2018.09.13.13.29.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Sep 2018 13:29:28 -0700 (PDT) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org, khilman@baylibre.com, carlo@caione.org Subject: [PATCH 4/4] ARM: dts: meson8b: odroidc1: add stdout-path property Date: Thu, 13 Sep 2018 22:29:19 +0200 Message-Id: <20180913202919.20927-5-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180913202919.20927-1-martin.blumenstingl@googlemail.com> References: <20180913202919.20927-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180913_132941_859317_9D098CD5 X-CRM114-Status: GOOD ( 10.40 ) 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: Martin Blumenstingl , linux-arm-kernel@lists.infradead.org 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 To use the "earlycon" kernel command line parameter (without arguments) we need a stdout-path property under the /chosen node. Add this to make it easier to spot errors early in the boot process when looking for them. Signed-off-by: Martin Blumenstingl --- arch/arm/boot/dts/meson8b-odroidc1.dts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/meson8b-odroidc1.dts b/arch/arm/boot/dts/meson8b-odroidc1.dts index 7c1225658567..58669abda259 100644 --- a/arch/arm/boot/dts/meson8b-odroidc1.dts +++ b/arch/arm/boot/dts/meson8b-odroidc1.dts @@ -57,6 +57,10 @@ mmc0 = &sd_card_slot; }; + chosen { + stdout-path = "serial0:115200n8"; + }; + memory { reg = <0x40000000 0x40000000>; };