Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp8122036ybn; Tue, 1 Oct 2019 03:37:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqwYXWiG1s2H+TfPr0UbtI7hj7brI8t0gXafbJpggceDfKKhxl8QP32lIKLXKhKIjjy+TZVM X-Received: by 2002:a17:906:4ad2:: with SMTP id u18mr23240925ejt.117.1569926242373; Tue, 01 Oct 2019 03:37:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569926242; cv=none; d=google.com; s=arc-20160816; b=WajcEZGNTmUNoQDvlbFLiRJrOIgiuoPavdjhMbDwx4REx3CZlXHYp1HOqHKchXRV9d ieACrtjtUAmFWDCx0XlzD4nwnyTgPqamVU2NRwTgHJfXCGBSmJtasBwORh80EqmTrJgG VyBaR8rsReoRSeAdIAoS4rJMFaUrL8/j7+Ixl3tGznE/s/DpbP1Cb+lRBfe2TN79xvOs mdHhgHTFjR5aDHdQCbtMtSYlWvW4J+v1ywixnnyphL3zl1IGE3Vtj7QHUgxYPCDOXAhJ fnDioNH7+UKwZLufIhBNSZySxa0pFR+LKP18tFSVCLtM+O5cwTIXNto6erom64u0FT0m SzjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=2nnlLMd0aBTJcx0TGQUJ/OOnhcmE3H5ErK+mVqFID/o=; b=T9oAsYwwxytU+jgHPQSRK3lE+c9jHOD+o44qhRufd6umYNTNC4ZVrP3g3qOQ7Achxh TTkCQ3IC10HrvwdAmwZmAEt7ngeAq6D94icID1+WFqVnXM7qkcPQ/i3n+mGkL0Sr3/Mc oNnwttNXgWsGMtDpHWSyd3EMfDVuOJn13Mu2SovJhGyMbM07VOnQgpxgp1s51bsvbaOY WPAN4OlRo5sktdLv9BWM5bVFXCq7N/fdbUTfv4Gjsjm5b5hewCdjl98I/xI5nSfBkLkC Pdm0H/PHIFG61kCKopbhWyduVTdekhgT9GbK9xwaLnH4AahuH2YgJmT9lN+vcJDThQXc 3Hfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Z66BKWUB; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id rh9si8402924ejb.102.2019.10.01.03.36.58; Tue, 01 Oct 2019 03:37:22 -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=@amarulasolutions.com header.s=google header.b=Z66BKWUB; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730286AbfJAKe6 (ORCPT + 99 others); Tue, 1 Oct 2019 06:34:58 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:44758 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726130AbfJAKe5 (ORCPT ); Tue, 1 Oct 2019 06:34:57 -0400 Received: by mail-wr1-f67.google.com with SMTP id z9so1705146wrl.11 for ; Tue, 01 Oct 2019 03:34:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2nnlLMd0aBTJcx0TGQUJ/OOnhcmE3H5ErK+mVqFID/o=; b=Z66BKWUBz/7pM2VRxk3KnGYg20Csj7AdSD9P0w9lQJpvKT+CLAzweqGDltfQrgmCx1 aXrKqiMH9VmljnfZ2/d7SJRxMtRnMWbIM1AfyT+Ef28nin11VRwfZ5K5DqZmZSp0PI0U U/aWeYK3Yz5Hov7A+DzLuUPuzjc++sXzjDrt0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2nnlLMd0aBTJcx0TGQUJ/OOnhcmE3H5ErK+mVqFID/o=; b=R4bnG6l0NNSJyQudt9a/OUq/g7W5lk81EZ3nrpO9nxsbQZFv+AX1WVIvr3/9a1peU0 LdO0OZDx3RayIHLRJyrSBWDpoHDVMyeqTCg0+f6UhDVfP1f6lvp4eboHGLALk7n/xPVf qxFnrs3zXTcwONQRdcVuRh2wcDDvG5cinGeAqEVDvHCJdOYF3MOOI7bzKjGvSk5e1biX Fcxrq8xeHHuBI9/XsgvvjasV8YpqRviR+S8d+xE1UYzZdDcy3oDDrPyISGxefHq83T1l 9UAp7SBUfOg4ngSIcSsMlMvVFI7z6uXvCmyXXbmZkJL2zdO5BUpA/z22opZqNCldC04t KB8g== X-Gm-Message-State: APjAAAVHfixwG+8jAp4GQ73vPDobR2wqBZpL2DTjbpOzZpllADESHcy0 UdQsQsz6i0CrK1T+2d1g/pmdICnfaEu635F2exC9dw== X-Received: by 2002:adf:e909:: with SMTP id f9mr1653755wrm.129.1569926094373; Tue, 01 Oct 2019 03:34:54 -0700 (PDT) MIME-Version: 1.0 References: <20190919052822.10403-1-jagan@amarulasolutions.com> <20190919052822.10403-2-jagan@amarulasolutions.com> <6797961.eJj5WIFbM9@phil> In-Reply-To: From: Michael Nazzareno Trimarchi Date: Tue, 1 Oct 2019 12:34:42 +0200 Message-ID: Subject: Re: [PATCH 1/6] arm64: dts: rockchip: Fix rk3399-roc-pc pwm2 pin To: Jagan Teki Cc: Heiko Stuebner , Levin Du , Akash Gajjar , Rob Herring , Mark Rutland , Da Xue , devicetree , linux-arm-kernel , "open list:ARM/Rockchip SoC..." , linux-kernel , linux-amarula Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi On Tue, Oct 1, 2019 at 12:26 PM Jagan Teki wrote: > > Hi Heiko, > > On Mon, Sep 30, 2019 at 2:51 AM Heiko Stuebner wrote: > > > > Hi Jagan, > > > > Am Donnerstag, 19. September 2019, 07:28:17 CEST schrieb Jagan Teki: > > > ROC-PC is not able to boot linux console if PWM2_d is > > > unattached to any pinctrl logic. > > > > > > To be precise the linux boot hang with last logs as, > > > ... > > > ..... > > > [ 0.003367] Console: colour dummy device 80x25 > > > [ 0.003788] printk: console [tty0] enabled > > > [ 0.004178] printk: bootconsole [uart8250] disabled > > > The only sense is that is connected with vdd_log: vdd-log { compatible = "pwm-regulator"; pwms = <&pwm2 0 25000 1>; regulator-name = "vdd_log"; regulator-min-microvolt = <800000>; regulator-max-microvolt = <1100000>; regulator-always-on; regulator-boot-on; /* for rockchip boot on */ rockchip,pwm_id= <2>; rockchip,pwm_voltage = <1000000>; }; I don't know how this in mailine is mapped Michael > > > In ROC-PC the PWM2_d pin is connected to LOG_DVS_PWM of > > > VDD_LOG. So, for normal working operations this needs to > > > active and pull-down. > > > > > > This patch fix, by attaching pinctrl active and pull-down > > > the pwm2. > > > > This looks highly dubious on first glance. The pwm subsystem nor > > the Rockchip pwm driver do not do any pinctrl handling. > > > > So I don't really see where that "active" pinctrl state is supposed > > to come from. > > > > Comparing with the pwm driver in the vendor tree I see that there > > is such a state defined there. But that code there also looks strange > > as that driver never again leaves this active state after entering it. > > > > Also for example all the Gru devices run with quite a number of pwm- > > regulators without needing additional fiddling with the pwm itself, so > > I don't really see why that should be different here. > > I deed, I was supposed to think the same. but the vendor kernel dts > from firefly do follow the pwm2 pinctrl [1]. I wouldn't find any > information other than this vensor information, ie one of the reason I > have marked "Levin Du" who initially supported this board. > > One, think I have seen was this pinctrl active fixed the boot hang. > any inputs from would be very helpful. > > Levin Du, any inputs? > > [1] https://github.com/FireflyTeam/kernel/blob/stable-4.4-rk3399-linux/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi#L1184 > > -- | Michael Nazzareno Trimarchi Amarula Solutions BV | | COO - Founder Cruquiuskade 47 | | +31(0)851119172 Amsterdam 1018 AM NL | | [`as] http://www.amarulasolutions.com |