From patchwork Sun Feb 16 17:34:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Moon X-Patchwork-Id: 11384519 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DA292109A for ; Sun, 16 Feb 2020 17:35:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BBFCB227BF for ; Sun, 16 Feb 2020 17:35:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IMejrEl7" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725926AbgBPRfI (ORCPT ); Sun, 16 Feb 2020 12:35:08 -0500 Received: from mail-pj1-f47.google.com ([209.85.216.47]:36171 "EHLO mail-pj1-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725899AbgBPRfI (ORCPT ); Sun, 16 Feb 2020 12:35:08 -0500 Received: by mail-pj1-f47.google.com with SMTP id gv17so6166204pjb.1; Sun, 16 Feb 2020 09:35:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JPM2kqx4hlDXSNBDa3izQLbeJ7f1jy1y8czH2Ne/TYs=; b=IMejrEl725fqCXBPzYt9wmJUvxnKWr0ybMDAva6F56fobzg5h1czrrqJ32BVqj3Lki uF2pqycVRAub8wF470gHyC7O/uukwgYhQwuMlDiJZNwmdEFZTNc22YvxKjwqBNS2h1P5 TVD0CCcGtcrp63oBFDlzB9MLIt4C62A15uR7Dt5mRklg/IDE4wl9Nu6Gzhj4oZu5oee3 jPjt2AwjnwZoQuQR0SHvpmwrHjuocsM6cr45QvQiMUgRC0lkbKiAsO+SSdrj49CJhszq nWxn1JBEAiZGC1eeeuvWRGANygkQYdVY8FWEaAO9kp16OKk5cn0Jh1WRGjca8BQKrvUK 0Czg== 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=JPM2kqx4hlDXSNBDa3izQLbeJ7f1jy1y8czH2Ne/TYs=; b=kWKsog17QryfrAWzOhru1qVkbgu0lCdnKiKwZ0RKBUhYkrC2+op7ryoZeEnmpGaEeB NMtGl9C2iDfJyfHkQFxmZd1QepLJ1fjAlQnS6vsijE+fzvYIOzF7oi8nGtfxQkfpRopU sD/S/jIzOhler8edRNkhi86c/oSC5EwfiNHjxp+KYcLaoEuHIdqX6zC2EuCmh1jez9LF Klv5qJmnVjcb+wJj+WkNjjCmPznX3529mgBALhEG1br62i361ai+twZ+Vgcp82F6A6tw m+TW1+8M1WyOHhL3hQQJ8ednuQzPKlTbkUT6HVk51O0+VMr8q9LkdqddH7MK9Luhcp4S ommA== X-Gm-Message-State: APjAAAUSNYiPJqHwCizzi2kTErk25bWxmGEE/gRzDcXwtBxQBE86dj97 Rbj7xFwTU3BiGavGP/VdceA= X-Google-Smtp-Source: APXvYqwNzqmeVTiT7B3ggj00IH6FrnYaVsK+XBkavG5u0s6WRDvhKYzANPW5j9VnHOG0S/Ue30dTkA== X-Received: by 2002:a17:902:9a45:: with SMTP id x5mr11818858plv.296.1581874507557; Sun, 16 Feb 2020 09:35:07 -0800 (PST) Received: from localhost.localdomain ([103.51.74.127]) by smtp.gmail.com with ESMTPSA id a36sm14284724pga.32.2020.02.16.09.35.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Feb 2020 09:35:07 -0800 (PST) From: Anand Moon To: Rob Herring , Mark Rutland , Neil Armstrong , Martin Blumenstingl , Jerome Brunet , Michael Turquette , Stephen Boyd Cc: Kevin Hilman , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org Subject: [PATCHv1 1/3] arm64: dts: meson: Add missing regulator linked to VDDAO_3V3 regulator to FLASH_VDD Date: Sun, 16 Feb 2020 17:34:44 +0000 Message-Id: <20200216173446.1823-2-linux.amoon@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200216173446.1823-1-linux.amoon@gmail.com> References: <20200216173446.1823-1-linux.amoon@gmail.com> MIME-Version: 1.0 Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org As per schematics add missing VDDAO_3V3 power supply to FLASH_VDD regulator. Also add TFLASH_VDD_EN signal name to gpio pin. Fixes: c35f6dc5c377 (arm64: dts: meson: Add minimal support for Odroid-N2) Cc: Martin Blumenstingl Cc: Jerome Brunet Cc: Neil Armstrong Reviewed-by: Neil Armstrong Signed-off-by: Anand Moon --- arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts index 0e54c1dc2842..353db3b32cc4 100644 --- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts +++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts @@ -51,9 +51,12 @@ tflash_vdd: regulator-tflash_vdd { regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; + /* TFLASH_VDD_EN */ gpio = <&gpio_ao GPIOAO_8 GPIO_ACTIVE_HIGH>; enable-active-high; regulator-always-on; + /* U18 FC8731-09VF05NRR */ + vin-supply = <&vddao_3v3>; }; tf_io: gpio-regulator-tf_io { From patchwork Sun Feb 16 17:34:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Moon X-Patchwork-Id: 11384521 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 63185924 for ; Sun, 16 Feb 2020 17:35:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 468BE22B48 for ; Sun, 16 Feb 2020 17:35:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="RWWAnVhP" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726140AbgBPRfM (ORCPT ); Sun, 16 Feb 2020 12:35:12 -0500 Received: from mail-pl1-f169.google.com ([209.85.214.169]:35333 "EHLO mail-pl1-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725899AbgBPRfM (ORCPT ); Sun, 16 Feb 2020 12:35:12 -0500 Received: by mail-pl1-f169.google.com with SMTP id g6so5778118plt.2; Sun, 16 Feb 2020 09:35:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QJBFrhbCj4MW2FP4lLqpYa6YgQUhBipNhqkx+l0iOfQ=; b=RWWAnVhPGKLJcJMkkbYf5cYcJx/3etaaQ5GWv+d1s/bSvHk0vsmSpKKwFpbUE//oJ/ Jabpj7A7p1mLXVk89Qcx2Wt1btEVkJZmGrnnGOZHldBkZQ2Tujg12uJPpbsRMJxR3h8I O27m8W1aGX4ybUZh1+c+oDpjq7QH28Pqfp26DulN58bVSbvfa8SEpjqnMKleNrMMQWie 3c9DpKIOXHPCa2ucbSdyGUa/O21O4H195iPdZ+rB6pybxBSH2WymvgH9G5gN2ENszDGU sIMHtrlTL/4uEYkwdmu6/d7jEKdsEG0//dXOhUKggEbNOFKVNA//R381eDktPlSa4H9Z 7TCA== 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=QJBFrhbCj4MW2FP4lLqpYa6YgQUhBipNhqkx+l0iOfQ=; b=LCLYqGgH8PJOJk46WLDaGVNREh4JngF2+t9BruU6U1yY0bLocXqCNEakNPLkHtyoHA +npKj511KTvdGcy//SBTnrX3aBHCqfVM3r3X2OMPqBOUpAlxIxNaAgjJ8Fyfv+ph3Vha /jhcYQAFPF34+W/wyWSJxJKAkg821ue7IwrusxU8/9opCBMBpRvYX14cn/Sa/d2LKbYM uGYpMJ/mUA/dhw3Y94WuolqUHbLe/zAVHDTNDPJ90L+kZOSgU4C5FNfZjsIJaJpEw1Je S4lvL5/ff36SoVtBkMYHGGAu+dSxIKOxuJ8DvJVOBPmHtr+zu32ZfBjdaNHforVakdyD HeqA== X-Gm-Message-State: APjAAAWh2zGt56cBHpjPNRZBkqHSF7Q5jMJSfLFau16tvDFUgocSBilc PMplDwkyZsuW3ID0bOPBSTY= X-Google-Smtp-Source: APXvYqwNQKt62HfzoPLn0vewOSTufVzWbDQ09Pjevzec938dfGoWoc0OxhdO/qd9n2HqQTUuodXShA== X-Received: by 2002:a17:90b:28f:: with SMTP id az15mr15247514pjb.4.1581874511589; Sun, 16 Feb 2020 09:35:11 -0800 (PST) Received: from localhost.localdomain ([103.51.74.127]) by smtp.gmail.com with ESMTPSA id a36sm14284724pga.32.2020.02.16.09.35.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Feb 2020 09:35:11 -0800 (PST) From: Anand Moon To: Rob Herring , Mark Rutland , Neil Armstrong , Martin Blumenstingl , Jerome Brunet , Michael Turquette , Stephen Boyd Cc: Kevin Hilman , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org Subject: [PATCHv1 2/3] arm64: dts: meson: Add missing regulator linked to VCCV5 regulator to VDDIO_C/TF_IO Date: Sun, 16 Feb 2020 17:34:45 +0000 Message-Id: <20200216173446.1823-3-linux.amoon@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200216173446.1823-1-linux.amoon@gmail.com> References: <20200216173446.1823-1-linux.amoon@gmail.com> MIME-Version: 1.0 Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org As per schematics add missing VCCV5 power supply to VDDIO_C/TF_IO regulator. Also add TF_3V3N_1V8_EN signal name to gpio pin. Fixes: c35f6dc5c377 (arm64: dts: meson: Add minimal support for Odroid-N2) Cc: Martin Blumenstingl Cc: Jerome Brunet Cc: Neil Armstrong Reviewed-by: Neil Armstrong Signed-off-by: Anand Moon --- arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts index 353db3b32cc4..23eddff85fe5 100644 --- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts +++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts @@ -66,11 +66,14 @@ tf_io: gpio-regulator-tf_io { regulator-min-microvolt = <1800000>; regulator-max-microvolt = <3300000>; + /* TF_3V3N_1V8_EN */ gpios = <&gpio_ao GPIOAO_9 GPIO_ACTIVE_HIGH>; gpios-states = <0>; states = <3300000 0>, <1800000 1>; + /* U16 RT9179GB */ + vin-supply = <&vcc_5v>; }; flash_1v8: regulator-flash_1v8 { From patchwork Sun Feb 16 17:34:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Moon X-Patchwork-Id: 11384525 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A80F0109A for ; Sun, 16 Feb 2020 17:35:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 89821227BF for ; Sun, 16 Feb 2020 17:35:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OecFXFWn" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726656AbgBPRfR (ORCPT ); Sun, 16 Feb 2020 12:35:17 -0500 Received: from mail-pj1-f67.google.com ([209.85.216.67]:36207 "EHLO mail-pj1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725899AbgBPRfQ (ORCPT ); Sun, 16 Feb 2020 12:35:16 -0500 Received: by mail-pj1-f67.google.com with SMTP id gv17so6166313pjb.1; Sun, 16 Feb 2020 09:35:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BNTtBgVLy/qcKAejtYBYBKwDBWINtwQVadgcq2wXqcc=; b=OecFXFWn8mpigldvStNPoHEuXc6i76RtX1CJRWx0neN1mXT3cIGoQY5gMMzf0yW3UU 6fvBb7QDc9gtMQ9bCgAsiRMRapW9YqBFIRMVg45SSoElJYSnaClN0oziimHxUq0Qrdzo KZpX4J3jAnetKAF4uP1Kva9szm/p38k8ivcSjgYcm4HX8ta85lEe+IM1RuIE690JcoKp EAsmYnvFpTPeMKSKQJITs06yp8jvq0+0rT14RJTh7jUGRJL/Nlop/xQNfNel13sWHuOw drjVawtXzz1I8V46Kz0SIg3NNp/hFh+kr4Yi8lFML3tyUTMt6aDce7MmA50ZSllKjb9N 19Dg== 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=BNTtBgVLy/qcKAejtYBYBKwDBWINtwQVadgcq2wXqcc=; b=VzgW9l4FyCT66VJJaUjsECkoQRR8KNYXe9mH7ccFimwkH3XYi0CoDxsMFE7BpmMENq hmswElh2nBWgNtGoJ0JAXbKkxXGTWCbnuHT1pn8d0VTNSc0eBxIOGIOpxFyel6/pCk0p XlRKx0wcbf4GSqRRlGbUwmzQqZL8TNvv7c4M+FOnQZed64Np95H/DNkIg4WMznBZYnK2 uVTkfc60FHAQjRWNLgXQMUNQwJJ8+TmknjRy2jXegqNtKudF/ChEswghxWyIH+4iUqRu eb+EN2kTW2AJ0zyfNfREgHa4Z31aqy1At3HpVOfGsq9nTsLAfwgD6KJrDYX4zgLnOVT4 ZAzw== X-Gm-Message-State: APjAAAVcSu57MiKnAEFXl9kI61Sr/eYoji+elIf/26TXa4MRAaBc3O89 Y3fROPBPW3xdhuRislNPjEY= X-Google-Smtp-Source: APXvYqwqpElMKUvJw6yaThb/Nsi0h1Fel6j7DMtb4gAkPuj7FWaplutLPwGDdfmJ3E9IUhvcpcc2/A== X-Received: by 2002:a17:902:7b92:: with SMTP id w18mr12487443pll.72.1581874515671; Sun, 16 Feb 2020 09:35:15 -0800 (PST) Received: from localhost.localdomain ([103.51.74.127]) by smtp.gmail.com with ESMTPSA id a36sm14284724pga.32.2020.02.16.09.35.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Feb 2020 09:35:15 -0800 (PST) From: Anand Moon To: Rob Herring , Mark Rutland , Neil Armstrong , Martin Blumenstingl , Jerome Brunet , Michael Turquette , Stephen Boyd Cc: Kevin Hilman , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org Subject: [PATCHv1 3/3] clk: meson: g12a: set cpu clock divider flags too CLK_IS_CRITICAL Date: Sun, 16 Feb 2020 17:34:46 +0000 Message-Id: <20200216173446.1823-4-linux.amoon@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200216173446.1823-1-linux.amoon@gmail.com> References: <20200216173446.1823-1-linux.amoon@gmail.com> MIME-Version: 1.0 Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org Odroid N2 would fail to boot using microSD unless we set cpu freq clk divider flags to CLK_IS_CRITICAL to avoid stalling of cpu when booting, most likely because of PWM module linked to the CPU for DVFS is getting disabled in between the late_init call, so gaiting the clock source shuts down the power to the codes. Setting clk divider flags to CLK_IS_CRITICAL help resolve the issue. Cc: Martin Blumenstingl Cc: Jerome Brunet Cc: Neil Armstrong Suggested-by: Neil Armstrong Signed-off-by: Anand Moon --- Following Neil's suggestion, I have prepared this patch. https://patchwork.kernel.org/patch/11177441/#22964889 --- drivers/clk/meson/g12a.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/clk/meson/g12a.c b/drivers/clk/meson/g12a.c index d2760a021301..accae3695fe5 100644 --- a/drivers/clk/meson/g12a.c +++ b/drivers/clk/meson/g12a.c @@ -283,6 +283,7 @@ static struct clk_fixed_factor g12a_fclk_div2_div = { .ops = &clk_fixed_factor_ops, .parent_hws = (const struct clk_hw *[]) { &g12a_fixed_pll.hw }, .num_parents = 1, + .flags = CLK_IS_CRITICAL, }, }; @@ -681,7 +682,7 @@ static struct clk_regmap g12b_cpub_clk = { &g12a_sys_pll.hw }, .num_parents = 2, - .flags = CLK_SET_RATE_PARENT, + .flags = CLK_SET_RATE_PARENT | CLK_IS_CRITICAL, }, };