Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp5236218rwb; Wed, 17 Aug 2022 13:45:04 -0700 (PDT) X-Google-Smtp-Source: AA6agR58axrvdiZ9+UEo6jZIw0vpty+yy8dIlRt9/Tds6AdclzSueM7xqNUlpHq3iI1NV64K43sx X-Received: by 2002:a17:902:db12:b0:16e:eaf9:e98d with SMTP id m18-20020a170902db1200b0016eeaf9e98dmr27761551plx.172.1660769104544; Wed, 17 Aug 2022 13:45:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1660769104; cv=pass; d=google.com; s=arc-20160816; b=uW9z7JCTmAZqd5YAnOVJDNVFexT38hniXOESE+VLtw7+HJimiXVkR5AXmovGXH0vQL K/G/0fUZb3ixi5hIkIZ0HJWxvl9r5pzi+pjkVjAe6R++o4lu//QU9Ah+a4Kn6vPaA0aj H5MmVNzOrS+MSVehOzx2ER1xGtTB3EJYLBOKBFZnrZdyXy7aipSTuvmKDg+7fyzebQ8R T59qHS75wtoMRuYAB2eooSIYnkh5uJub6aTl4bTo+O5AfZesceta0nBr8g8A+gpsc0Ao Bft/9K74RVkEEqascJybs4YWe0tMy6vekE7MJEWwRmFG1cvVyBtO3mYDj0EwO15uja3i udvw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:in-reply-to:user-agent:date:message-id:from :references:cc:to:subject:dkim-signature; bh=RuqqDWez4jtw4njFeTi91fS504hTCepG9mQMuZgr9Vw=; b=FwoBq1uzvaBFNKS2SIYBrGAiy+piBNGeIgXqZDcCOYSfroe1MXUsStYihcaCHWXCCX jvSy6q8KjzStuJQTWiMeJ4Svg6vkZ88PMH1y9I4MM0++4z5GZUwvP0yChOdkXwQuiK+L KmlOMbtQxhU+oqPEVTrqTNdRDC+HVr2BpEDosJUFyXOCoDE5FUGl91cV33V2xAPxXqyV 1dp9KNiv+COBTELy+wqE85eXHkMBOACtjsUUshOL1qxsFjEnlw3zlRKFuCPzO1q1FRbD WywbsLz3LJ9dbhmdaeqXEd4dnmYPXWCzXTZZEdRBbyBmR4ygkAotDpDsj2Deq8kbpLxv roog== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@seco.com header.s=selector1 header.b=cA41sGua; arc=pass (i=1 spf=pass spfdomain=seco.com dkim=pass dkdomain=seco.com dmarc=pass fromdomain=seco.com); 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=REJECT sp=REJECT dis=NONE) header.from=seco.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z23-20020a631917000000b0041ddeeed656si16691484pgl.243.2022.08.17.13.44.28; Wed, 17 Aug 2022 13:45:04 -0700 (PDT) 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=@seco.com header.s=selector1 header.b=cA41sGua; arc=pass (i=1 spf=pass spfdomain=seco.com dkim=pass dkdomain=seco.com dmarc=pass fromdomain=seco.com); 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=REJECT sp=REJECT dis=NONE) header.from=seco.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241676AbiHQUUq (ORCPT + 99 others); Wed, 17 Aug 2022 16:20:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241886AbiHQUUd (ORCPT ); Wed, 17 Aug 2022 16:20:33 -0400 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60042.outbound.protection.outlook.com [40.107.6.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0DB9A9F1A0 for ; Wed, 17 Aug 2022 13:20:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JMF064gBMKrW3vYl0OLM8grAXqVC4+Rn+iBjc8gTE++UXwAELididtQffVDiJUhIMLVrlfTrGb+lNlV8RFOG7XxVCMeRXMlMEhS2I4XH7cU3/MCk3SUSCkjPgUfW/1pAOy5CVri7cPyHgl05b0y7JsQTcJhxk37xthtpRd4n6842CUW6IfcFjApgbRWg9dUMN7xI3/sSu6A1VdSFCGLrjHbO06QXbdCnDMgA+6xuuDyetpUCoMGI5p958A4gBVK+t/nndvAj2rtjDbDL5uPHlFVhA5/95H/MZKJjDAtGAkcLCKFPo2o+oR20VR6YRFKfPkFizfFu3nIrsv8UmR3wcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=RuqqDWez4jtw4njFeTi91fS504hTCepG9mQMuZgr9Vw=; b=SBpp/xLOvk6ehY58mmmqBkp29MgLxio/GOAfZ68Kj0DO8wvNIHbd52+FP5O3ElbIPkwtS4GLFvGQI9nOYXlcZpk82Vw/VLGAvPMqd/cJ4xZt++4FZINwtdDnSkFr7ziXhzHHzNu2zbGJw2vMT2A3DuTW7yPQjnZ2z+VAyuYru0srQDMH9wZYW2qbVlGsSnI6BsPExP+5IvWHrfy0F3jtW0zrvTvzX9w9uWTw1Sdluh8964uphZ5lgs8mEssdbC3NJn+I4hmIgDPKymreHuJhz1pKcQ2PVluN+z9cc3nLZ2FjEjlMNo9WpgJ/0Ca/BGi7WWqx/4hY1Yug0iKfyvSFgg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=seco.com; dmarc=pass action=none header.from=seco.com; dkim=pass header.d=seco.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seco.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RuqqDWez4jtw4njFeTi91fS504hTCepG9mQMuZgr9Vw=; b=cA41sGuaAbU0CCRZ05ob/JaM+lDcDTdw25WEfMITToS1jGAEVxwQ456CUAvgw/uZoYjiKGCvB9PvmAEtLfJ+Y9KdHMA/y01P/cVbRbsw8Z5RCh/jsjEHxUShTtGgHrIuNhUcpp7I1QDfJ+pmTHJZqU73HR71kcVdtM2cKvOBHbeLfx1rtl/GNIJxGhq5tjKS9ahQQKT+uRNZdubVQgQPf866g7AfrnIOtfFfU4d6wz3/Wo0JsXaOOfiMa8Kiav+GZmeEDC95RHQ3E/LueajVBRINAV2LofmGgbn/cYO+r6xmUuSXHZYreuUOwePJ3xiu+pyb/BEimyb7+ugUC2t8fw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=seco.com; Received: from DB7PR03MB4972.eurprd03.prod.outlook.com (2603:10a6:10:7d::22) by VI1PR03MB4159.eurprd03.prod.outlook.com (2603:10a6:803:53::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5546.16; Wed, 17 Aug 2022 20:20:26 +0000 Received: from DB7PR03MB4972.eurprd03.prod.outlook.com ([fe80::ecaa:a5a9:f0d5:27a2]) by DB7PR03MB4972.eurprd03.prod.outlook.com ([fe80::ecaa:a5a9:f0d5:27a2%4]) with mapi id 15.20.5504.019; Wed, 17 Aug 2022 20:20:26 +0000 Subject: Re: [PATCH v3 3/8] arm64: dts: ls1028a: add flextimer based pwm nodes To: Michael Walle , biwen.li@nxp.com Cc: leoyang.li@nxp.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, olteanv@gmail.com, shawnguo@kernel.org References: <20220728093318.299798-1-michael@walle.cc> From: Sean Anderson Message-ID: Date: Wed, 17 Aug 2022 16:20:21 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 In-Reply-To: <20220728093318.299798-1-michael@walle.cc> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-ClientProxiedBy: CH0PR03CA0026.namprd03.prod.outlook.com (2603:10b6:610:b0::31) To DB7PR03MB4972.eurprd03.prod.outlook.com (2603:10a6:10:7d::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: af73958e-0a31-4505-2b0e-08da808dec07 X-MS-TrafficTypeDiagnostic: VI1PR03MB4159:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FK4NHAcrez7tUypECicsVZZHJtZKt+hSqzZccfKnQ29c4vEHeAW5s2wVd/PHIR8i5H44CvEovfjNmRJyvKGHE4CgJ6jx02gwbhfWok5CH6JTHk1nF8CqfhGLEMEmVEXkfJoAfMySS1bNF8v9Ku6a0Hgc96DT7ciWNBRFrK/OizFCgKi9cDktMnmasGokXfGhPs7NGukbWGEOLCLWAd6q8O1eAuehr0mm4GRWHEfdVAJ2ojaLDQJ8FcQF2uJg19UzPOB0mpgHy9i10NwENyNql1gEl5w8JcHRM6LNZN6XBWk0/4BKpcS6Xq+jzEurf2Ax5GPJKMOPStfLvAUIHRRknIyME9Zr19PQil3fqF5YuWyv4v2XRe1SkNIJCGs5FBq0KtA1Pcu/Wuzyd9vAd33vTjx6sZQHI53EvN3aGnLofyhQTBmIkT4FquT3cjhRr6BjjyhiRc1gi5xhZAFL56dkNJVHO1JB+/VSN8SJGWGPSanbOEMduObrSwyTBjSKnLScnBd3ppPMLayFQjuNsJ3ZUVPEkZnrVfcElZXIEFClTLEvzqpYQ7MXhesL3FlqRx8CdmNK0L4IQG0zdSymoCsGqFgqrmiHrS+KcbrHtr+iem32LvtjK5TnOgEq5GEGYJp1Fx+BqVfuNUxu4tlAo0QNo0gixEVZ+bwV5u8T+KW4t31LfAUklhrPK1gwCV6kRFKGTB1jUgvJ/pFPkHYfB7PhOUk0VFJ6dFsw4Ldvc4Om0BLlx4NYSTcNd9iyy2g8O15ETH7qSsV8hJXlnS4960ejpUT2yojcPK0ncU/0F6LCA7lLMUV/ZzKDYGtBV1B2KVlEF8AxCzspXsK6lRKZW/kgcqFe4pR9qIjZcZ/xFuplfZA= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB7PR03MB4972.eurprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(39840400004)(136003)(346002)(366004)(396003)(376002)(83380400001)(53546011)(52116002)(6506007)(6512007)(26005)(2616005)(186003)(38350700002)(38100700002)(8936002)(5660300002)(44832011)(4326008)(8676002)(66946007)(66556008)(66476007)(2906002)(478600001)(6486002)(966005)(6666004)(41300700001)(316002)(31696002)(86362001)(36756003)(31686004)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ZTFXNlV4QVJ3SFpkU3Boc2dobkFQN1dGeDBqL0s0MFlDOHhZSUN6QkRHVzdU?= =?utf-8?B?L3FnT2tsU0RRdTFLZXZGMzdiVnloTTBnT081SFVzYUE1N3lKVENKRWdWTFNo?= =?utf-8?B?dmYwK21teGtLWXVOekNCNUx2Qmk0UjlHSGMzZ1ZmZDdyenlQLzdsejdsVlow?= =?utf-8?B?aVFoMWVpaHd3eGtRMW5LeXA1Zm42UHNmSVk1RmpoS29xTHZPVDNqKzZRcERl?= =?utf-8?B?QzVwYTI2M3MrSzFucHF6c24wUlBvQVlTT05pdC9rcWdITkMwamRHS3F1aSs2?= =?ut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OUTdJRGVKc2lpMlNsZ3kyL3pnVWIv?= =?utf-8?B?UlFNU0tLNFpEczNCNC94TjhFMVFoRS9JWUxwSXpZc1VZSzZvd2M0VUFhSTRs?= =?utf-8?B?U2c9PQ==?= X-OriginatorOrg: seco.com X-MS-Exchange-CrossTenant-Network-Message-Id: af73958e-0a31-4505-2b0e-08da808dec07 X-MS-Exchange-CrossTenant-AuthSource: DB7PR03MB4972.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Aug 2022 20:20:26.6389 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bebe97c3-6438-442e-ade3-ff17aa50e733 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Iqm2RmMBlOn6yxJsHukU4a50t+sDWSj4TQCyoE1OeMPcEpsB0GgfQghYhSEBmOJeOwS1TFwUsup2rUY2oc0bgw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR03MB4159 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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 Hi Michael, On 7/28/22 5:33 AM, Michael Walle wrote: > Hi, > > sorry for digging up this old thread. But I've noticed some > inconsistencies here while syncing the device tree with u-boot. > >>> On Wed, Apr 13, 2022 at 06:07:20PM +0000, Leo Li wrote: >>> > > arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi:1210.21-1219.5: >>> > > Warning >>> > > (unique_unit_address): /soc/pwm@2800000: duplicate unit-address >>> > > (also used in node /soc/timer@2800000) >>> > > arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi:1221.21-1230.5: >>> > > Warning >>> > > (unique_unit_address): /soc/pwm@2810000: duplicate unit-address >>> > > (also used in node /soc/timer@2810000) >>> > >>> > Well, this is similar situation as pcie. The flextimer controller can >>> > be used as timer, PWM or alarm. We have separate drivers and bindings >>> > for these modes which resulted in different nodes for the same >>> > controller. >>> >>> I think the mfd framework can address the situation where multiple drivers, >>> with multiple functionalities, want access to the same memory region? >> >> I know mfd is used for device providing multiple functions at the same >> time. I'm not sure if it can help dealing with the one function at a time >> scenario. > > Funnily enough, I had the same concern: > https://lore.kernel.org/lkml/92eaa24876a823aa5833435f51095812@walle.cc/ (a bit late, but I didn't see this the first time around) One alternate approach is to do something like commit bc1ce713a084 ("pwm: Add support for Xilinx AXI Timer"). Both arch/microblaze/kernel/timer.c and drivers/pwm/pwm-xilinx.c are drivers for the same device (and have e.g. the same compatible string). They determine whether to bind based on whether #pwm-cells is present or not. This avoids having two nodes with the same address, since one node can be used, with an overlay (or an included) used to specify the function. It would be better to defer this to when userspace can have a say, but timers are probed very early on, so we can't do that. For the pcie device, perhaps you could use #address-cells? --Sean