From patchwork Mon Sep 9 15:45:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 11138189 X-Patchwork-Delegate: viresh.linux@gmail.com 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 2B57514E5 for ; Mon, 9 Sep 2019 15:46:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 07EBF2171F for ; Mon, 9 Sep 2019 15:46:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="JVGesG1m" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729687AbfIIPqP (ORCPT ); Mon, 9 Sep 2019 11:46:15 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:43827 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729326AbfIIPqP (ORCPT ); Mon, 9 Sep 2019 11:46:15 -0400 Received: by mail-io1-f68.google.com with SMTP id r8so4859209iol.10; Mon, 09 Sep 2019 08:46:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=+8o/RGK/NPs8632xDSooMJK/phaky0Ro4hwcCw71TCc=; b=JVGesG1mnmTyr6WT/iYtanVie5DVOtHQYVM7hTxh57S3deO0Wr539W3FHqd7jUBIQM 8HFwZj9JD+ynD2ZPR3LHJZAlIdbyODk7eftG12HWNqjYYoBtRE5a1J5kB9q5EshinA/U xnUpCaqgHXXq/93EOzbizgqirgU26zOXiSSbeAI9mlZSatKKRR0CSVrUl1dRYsdvhNZ6 yIz1SqQABjMOyqEGTKVbX7mfrlSOeqvxq15YOwJZXsMY219Ruaypo+eEazOhnxVXNXcd usjQyCxidilCtP3QrlAES09YnUE6I21FOvWgdRjDUN2bm54zPmT1w7FFGFUxAmw1I7b0 TUWA== 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; bh=+8o/RGK/NPs8632xDSooMJK/phaky0Ro4hwcCw71TCc=; b=Lwz4MzHkfNsDMvMRwDaBpqVIUQHhEqCN/YzWAbu1sXqkCEqNUhRceWOYPxMvpk0yee yC/ef1NbPTe9KFEOInw712YL0Q+2DvFMKVIf+CSim0jtjPJirzNbq6LPyP1h4EJR79lE Ghdv0rRyoWRlMazs7wuv/tOjwXTW3jwj8NE9Sf4zY+vCoMjSH9+DYkchwcEBc8UOCJXR B2VoSobzATXUnmJ9YtqeA7sC9htbJ3nkMTGe9w4vq5iqv9+T3zE9WY2ZgRnOaOQ+HBPU RMp/K2M4rSs/aXVVnBxIAD3vr4C2yvwnRKz4YhuEyUGMvGmy4M2ihgB+hAgjcNREBvCJ TS8w== X-Gm-Message-State: APjAAAWHMlZbd3AbDm5jfTIr3XFGQ4zVFNV+fP3YUkqwaS5zWKeAlh7k 8BfLtmfFSms7/HvGo2jTeT+CqJ2jE7Y= X-Google-Smtp-Source: APXvYqw3jiFsdDxXaxUuwsb4anV8XMwCTd4KNpVihyxLf9uoXYjoahKJ+etNOiOjAaM9BUZpQd2S2Q== X-Received: by 2002:a6b:7e45:: with SMTP id k5mr13113583ioq.178.1568043974166; Mon, 09 Sep 2019 08:46:14 -0700 (PDT) Received: from aford-OptiPlex-7050.logicpd.com ([174.46.170.158]) by smtp.gmail.com with ESMTPSA id a21sm10402395ioe.27.2019.09.09.08.46.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Sep 2019 08:46:13 -0700 (PDT) From: Adam Ford To: linux-omap@vger.kernel.org Cc: neolynx@gmail.com, letux-kernel@openphoenux.org, andreas@kemnade.info, tony@atomide.com, adam.ford@logicpd.com, hns@goldelico.com, Adam Ford , =?utf-8?q?Beno=C3=AEt_Cousson?= , Rob Herring , Mark Rutland , "Rafael J. Wysocki" , Viresh Kumar , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH 1/2] cpufreq: ti-cpufreq: Add support for AM3517 Date: Mon, 9 Sep 2019 10:45:01 -0500 Message-Id: <20190909154502.19804-1-aford173@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The AM3517 only lists 600MHz @ 1.2V, but the revister values for 0x4830A204 = 1b86 802f, it seems like am3517 might be a derivative of the omap36 which has OPPs would be OPP50 (300 MHz) and OPP100 (600 MHz). This patch simply enable adds the am3517 to the compatible table using the omap3630 structure instead of the 3430. Signed-off-by: Adam Ford diff --git a/drivers/cpufreq/ti-cpufreq.c b/drivers/cpufreq/ti-cpufreq.c index f2f58d689320..6b69fb1d6bdf 100644 --- a/drivers/cpufreq/ti-cpufreq.c +++ b/drivers/cpufreq/ti-cpufreq.c @@ -270,6 +270,7 @@ static int ti_cpufreq_setup_syscon_register(struct ti_cpufreq_data *opp_data) static const struct of_device_id ti_cpufreq_of_match[] = { { .compatible = "ti,am33xx", .data = &am3x_soc_data, }, + { .compatible = "ti,am3517", .data = &omap36xx_soc_data, }, { .compatible = "ti,am43", .data = &am4x_soc_data, }, { .compatible = "ti,dra7", .data = &dra7_soc_data }, { .compatible = "ti,omap34xx", .data = &omap34xx_soc_data, }, From patchwork Mon Sep 9 15:45:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 11138193 X-Patchwork-Delegate: viresh.linux@gmail.com 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 A95B714E5 for ; Mon, 9 Sep 2019 15:46:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 83FE82171F for ; Mon, 9 Sep 2019 15:46:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="idSpqUKF" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388840AbfIIPqR (ORCPT ); Mon, 9 Sep 2019 11:46:17 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:33443 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388835AbfIIPqR (ORCPT ); Mon, 9 Sep 2019 11:46:17 -0400 Received: by mail-io1-f68.google.com with SMTP id m11so29837586ioo.0; Mon, 09 Sep 2019 08:46:16 -0700 (PDT) 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; bh=sAsg4pCxltmGzILf4YXVsFMOxOsAWMDU9ZZ3l3bhmCY=; b=idSpqUKFOUh1FRPn2pH5npRB/GJstm15pSB1JKTywkwVmUJGw6lgtOA4do/AS7USeV ZtePn1Eww8arHVlsadDfRlRiN/YhoFGX4+Q4xt/A70OXrp2ijpYtS7JBuhomoGme8MED 05dmMt5yUT+b6bqIs0YAoI/sJ5crVVgpTvCyLBNGL+GMp7e4KQK2ltyheDed7Yz69OOT a4+xPSThgIvZIrpODu6qDNnCuJQYxZe+MBaPkgzhJWVwzvsoFtEd2l3GYiKPSU2YpSYW ZTVLP6hU4oLEduaeviXBXK48Z53Kabt9psCGFlk7l6tTBz7L0Bd03mky3OiFh7AgBOQo 6xGQ== 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=sAsg4pCxltmGzILf4YXVsFMOxOsAWMDU9ZZ3l3bhmCY=; b=o04X+LHbc1q3C29ak/VS5UBFvAjvyV+usa1lENTT0B/E64XRchT8esulGsyG6Sh8pz 4OT937tiAHp9F041OdH/i2WXlH7lstpai5/+6cSl6TFs+YoprAjnsZoS6AUIHpuEBwJ8 vEC44ZgMmid39yciyRshLFhDSiSjHT/oDOwXWadI5TDzPZE3Q3KebpIVJBg+BYN1OsJb pLdwBtVWPTyUPvIY5ihHNF9qtCxKUHoy7EJy8VNsbHhDn7JXK9kvteyLvba1PozjBL4C gAo7PmJ8CYZO4L8QlNO81P2FldlkeO/F4mQ3mUBYKM5J839RpvDhTWt/qch/J1n3jYne RAxg== X-Gm-Message-State: APjAAAVCCq8eWPXR/5I+aP/Vc4hz8TwgOkIBGUlSHfK96jICsEyrzV5J 258ZppLpgHAFFXSzEA7X2J1P0TG/ttc= X-Google-Smtp-Source: APXvYqxGJQ8QXnAVO0BtgzY4Krmgi2/SSQmpZaUp65xrKuNmEVxpHkCnyCZUqHbrU6mgCIm3IjjQOw== X-Received: by 2002:a02:3446:: with SMTP id z6mr27058650jaz.105.1568043975495; Mon, 09 Sep 2019 08:46:15 -0700 (PDT) Received: from aford-OptiPlex-7050.logicpd.com ([174.46.170.158]) by smtp.gmail.com with ESMTPSA id a21sm10402395ioe.27.2019.09.09.08.46.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Sep 2019 08:46:14 -0700 (PDT) From: Adam Ford To: linux-omap@vger.kernel.org Cc: neolynx@gmail.com, letux-kernel@openphoenux.org, andreas@kemnade.info, tony@atomide.com, adam.ford@logicpd.com, hns@goldelico.com, Adam Ford , =?utf-8?q?Beno=C3=AEt_Cousson?= , Rob Herring , Mark Rutland , "Rafael J. Wysocki" , Viresh Kumar , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH 2/2] ARM: dts: Add OPP-V2 table for AM3517 Date: Mon, 9 Sep 2019 10:45:02 -0500 Message-Id: <20190909154502.19804-2-aford173@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190909154502.19804-1-aford173@gmail.com> References: <20190909154502.19804-1-aford173@gmail.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The AM3517 only lists 600MHz @ 1.2V, but the revister values for 0x4830A204 = 1b86 802f, it seems like am3517 might be a derivative of the omap36 which has OPPs would be OPP50 (300 MHz) and OPP100 (600 MHz). This patch sets up the OPP50 and OPP100 tables at 300MHz and 600MHz for the AM3517 with each having an operating voltage at 1.2V. Signed-off-by: Adam Ford diff --git a/arch/arm/boot/dts/am3517.dtsi b/arch/arm/boot/dts/am3517.dtsi index 23ea381d363f..a0f23361d4bc 100644 --- a/arch/arm/boot/dts/am3517.dtsi +++ b/arch/arm/boot/dts/am3517.dtsi @@ -16,6 +16,37 @@ can = &hecc; }; + cpus { + cpu: cpu@0 { + /* Based on OMAP3630 variants OPP50 and OPP100 */ + operating-points-v2 = <&cpu0_opp_table>; + + clock-latency = <300000>; /* From legacy driver */ + }; + }; + + cpu0_opp_table: opp-table { + compatible = "operating-points-v2-ti-cpu"; + syscon = <&scm_conf>; + /* + * AM3517 TRM only lists 600MHz @ 1.2V, but omap36xx + * appear to operate at 300MHz as well. Since AM3517 only + * lists one operating voltage, it will remain fixed at 1.2V + */ + opp50-300000000 { + opp-hz = /bits/ 64 <300000000>; + opp-microvolt = <1200000>; + opp-supported-hw = <0xffffffff 0xffffffff>; + opp-suspend; + }; + + opp100-600000000 { + opp-hz = /bits/ 64 <600000000>; + opp-microvolt = <1200000>; + opp-supported-hw = <0xffffffff 0xffffffff>; + }; + }; + ocp@68000000 { am35x_otg_hs: am35x_otg_hs@5c040000 { compatible = "ti,omap3-musb";