Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp4281705rwb; Mon, 16 Jan 2023 21:33:28 -0800 (PST) X-Google-Smtp-Source: AMrXdXsF59fCOMAuD0heuf+EkRM1jRHtingcL51uREHA2gcZAZaJiEo6DdjnhYb+i9kRfXvYYPCW X-Received: by 2002:a05:6a20:cf62:b0:b8:775b:2caa with SMTP id hz34-20020a056a20cf6200b000b8775b2caamr1605969pzb.42.1673933608661; Mon, 16 Jan 2023 21:33:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673933608; cv=none; d=google.com; s=arc-20160816; b=oUGDYvxSIELNXKxq1MJFr+jAfZ9YosXpP2KUZ5L7NBleNA7Qs/wc5O+SZ4zhAVHdLr 9rtOcUTCpywT3q1/BLoBhJbdkxwYpo1/8mzPXkNf5TkKjf28G/4YVuWKtQbfjTlTEtIf 96kSqW1mN73NE6xwYvaj6CKQfIIEtAxXVYzwlR6o55LeT2d5AAHxIyvWjBKlgk+y5hqZ s35IJEthTsuBF0h3LNtEaCodM2NSZ+JOUzdjoBN20ml7VV7qhRrHwEDrQ4KaBI4b3Q6B w3eol0FBnQo/wQWVWSY/BWF82kQqndckWHDVnAJb49rHQggxmY8ywzWqaeIbtMexDYi6 fFaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:cc:user-agent:mime-version :date:message-id:dkim-signature; bh=m6wYalfTMNF3q/k6hE7vf1IFXNcR4EAEmeW5euyuYvM=; b=EFGXw1h8Vz0pztL3kR1DzihyDZsmiVpouD716So9AodW7Lin8EwjWkNFiAhJ61G+Wh Zv5DmRg5uBTHFqOGPaTiF7+pJuB1tj3/N56eItQFfS97V5JwdwIRVzKFxOhWp6yy0KZX rsW3ts7xgmYR45M69j9rGYIk0P7H6LRWXG/uzT7k2atpLcW3mdHfcpHrE7XWF1WbSh1L GeDT9nmp80m//lGT0LbLoOhDVlQkG0utd8vAJdJ7X5e3CU3RpFEEJuGS4xP2j3FjMIhU adT0zj9Kx7H7Lj+agkODL/IDLy+J+3Id4fe0DKwqC0iIN1o1qngeIgkLuTVCGeE7Fhf6 GKWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=RKXAy2bb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k20-20020a63d854000000b0047907294d38si32344616pgj.427.2023.01.16.21.33.22; Mon, 16 Jan 2023 21:33:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=RKXAy2bb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235331AbjAQF3G (ORCPT + 50 others); Tue, 17 Jan 2023 00:29:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235177AbjAQF3C (ORCPT ); Tue, 17 Jan 2023 00:29:02 -0500 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB039233D2; Mon, 16 Jan 2023 21:29:01 -0800 (PST) Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 30H5Si1c040614; Mon, 16 Jan 2023 23:28:44 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1673933324; bh=m6wYalfTMNF3q/k6hE7vf1IFXNcR4EAEmeW5euyuYvM=; h=Date:CC:Subject:To:References:From:In-Reply-To; b=RKXAy2bbS6FTxJddeKuTqFdawGMytEIgbEVb57Z7Kz5Yz7TMI0HwTKNxkM2ZR12e5 b96HQIyDjXWFuy2la5tSTy/6q/3NPo8c1y9vYa2xxLk9BuWaqJxL2jCKeX5mG5pl2d edebBk92rm2y4rAJ4HNui10ccs54MtlZ64COODcQ= Received: from DFLE114.ent.ti.com (dfle114.ent.ti.com [10.64.6.35]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 30H5Siwr124918 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 16 Jan 2023 23:28:44 -0600 Received: from DFLE109.ent.ti.com (10.64.6.30) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Mon, 16 Jan 2023 23:28:44 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE109.ent.ti.com (10.64.6.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Mon, 16 Jan 2023 23:28:44 -0600 Received: from [172.24.145.61] (ileaxei01-snat.itg.ti.com [10.180.69.5]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 30H5Sdj1093170; Mon, 16 Jan 2023 23:28:39 -0600 Message-ID: <566700c6-df9b-739b-81ff-8745eea10ff3@ti.com> Date: Tue, 17 Jan 2023 10:58:38 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 CC: , , , , , , , Roger Quadros , , , , , , , , , Subject: Re: [PATCH net-next 5/5] arm64: dts: ti: k3-am625-sk: Add cpsw3g cpts PPS support Content-Language: en-US To: Vignesh Raghavendra References: <20230111114429.1297557-1-s-vadapalli@ti.com> <20230111114429.1297557-6-s-vadapalli@ti.com> <6ae650c9-d68d-d2fc-8319-b7784cd2a749@kernel.org> <2007adb5-0980-eee3-8d2f-e30183cf408e@kernel.org> <4d7ac24a-0a35-323c-045c-cc5b3d3c715a@ti.com> From: Siddharth Vadapalli In-Reply-To: <4d7ac24a-0a35-323c-045c-cc5b3d3c715a@ti.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Vignesh, On 16/01/23 22:00, Vignesh Raghavendra wrote: > > > On 16/01/23 9:35 pm, Roger Quadros wrote: >>>>> diff --git a/arch/arm64/boot/dts/ti/k3-am625-sk.dts b/arch/arm64/boot/dts/ti/k3-am625-sk.dts >>>>> index 4f179b146cab..962a922cc94b 100644 >>>>> --- a/arch/arm64/boot/dts/ti/k3-am625-sk.dts >>>>> +++ b/arch/arm64/boot/dts/ti/k3-am625-sk.dts >>>>> @@ -366,6 +366,10 @@ &cpsw3g { >>>>> pinctrl-names = "default"; >>>>> pinctrl-0 = <&main_rgmii1_pins_default >>>>> &main_rgmii2_pins_default>; >>>>> + >>>>> + cpts@3d000 { >>>>> + ti,pps = <2 1>; >>>>> + }; >>>>> }; >>>>> >>>>> &cpsw_port1 { >>>>> @@ -464,3 +468,19 @@ partition@3fc0000 { >>>>> }; >>>>> }; >>>>> }; >>>>> + >>>>> +#define TS_OFFSET(pa, val) (0x4+(pa)*4) (0x10000 | val) >>>> Should this go in ./include/dt-bindings/pinctrl/k3.h ? >>>> That way every board DT file doesn't have to define it. >>>> >>>> The name should be made more platform specific. >>>> e.g. K3_TS_OFFSET if it is the same for all K3 platforms. >>>> If not then please add Platform name instead of K3. >>> The offsets are board specific. If it is acceptable, I will add board specific >>> macro for the TS_OFFSET definition in the ./include/dt-bindings/pinctrl/k3.h >>> file. Please let me know. >> If it is board specific then it should remain in the board file. > > > The values you pass to macro maybe board specific. But the macro > definition itself same for a given SoC right? Also, is its same across > K3 family ? > > Please use SoC specific prefix like AM62X_TS_OFFSET() or K3_TS_OFFSET() > accordingly. For certain SoCs including AM62X, the macro is: #define TS_OFFSET(pa, val) (0x4+(pa)*4) (0x10000 | val) while for other SoCs (refer [0]), the macro is: #define TS_OFFSET(pa, val) (0x4+(pa)*4) (0x80000000 | val) Therefore, I will use SoC specific prefix in the macro. Please let me know if the SoC specific macro can be added to the ./include/dt-bindings/pinctrl/k3.h file for each SoC. If not, I will add the SoC specific macro in the board file itself. [0] https://lwn.net/Articles/819313/ Regards, Siddharth.