Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp817999rdg; Fri, 13 Oct 2023 01:53:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHe5Y14PahHDDWPQHj90w4vwM4aARlKkPMgOLneKUCtwRjv5wPBiO/ugS+RJscuNwqiX1D2 X-Received: by 2002:a05:6a20:734b:b0:14c:de3:95d6 with SMTP id v11-20020a056a20734b00b0014c0de395d6mr27102470pzc.45.1697187208277; Fri, 13 Oct 2023 01:53:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697187208; cv=none; d=google.com; s=arc-20160816; b=B76oYsSFlpv724VnQ7w/RmUa16prLeHbOKNY/48upFj31ehGeAbzqYnG2XLqoOHyk6 T1oHwLIV9w+odH+BHMAJb45LzlAHXa1V86uYqcivFyPSZPO3JRfWCoJo1n4NnuJDcSJR 6xZFc/Zd/clQr4ARt9whOMh14zbOB0IKChtJLg2ysdNEPoTlmy3zzIRXrzlWb1bTMT9y Qns1+ZlGLTHrOnUvx1kIcq6X9KBJE9fHBHdjO0YKIYDyC4gkc93QM4KTjDt344UEkxqu BY800XvK08fBHdPMRG97fMI4j8jgzfIM69aEUhOt+k4xp0UvVFEGY/qGW7SZIlIPeQvg 1mzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=OMsxy+WRFTvVWQUjTpH47x0e7OESMLVwCdR526kLjyM=; fh=6AZHubC6HownpunfGBPlMfdhKDJzsWatYHqDzFKxk7s=; b=z2IdP4NfPqAICaK2pBPB4o9x0oJ3Mwg/W73y37B+/vIC0U36Ucu7oy8rRWGrRseyeb kY1Bn+/njkGGo3G3oEfBQy4gBKeM6BDSkoMif8dZZBvuD0sbWxXkfhxRM12OEvHyHYf9 hdhGiUHXoUSfHiaFUb/8iFM1E2lQHhWZjYIwOo3QXRRYrUiBeJMKCSP4gSHnYwOSobTd bggYMqm5pslLYiBRbPw6s6JT/ScdjzEDFMRiuq/xwBBHnvyPUNq+NlMjrJ2NwH4DspVd QLMgpMCar/oXyyrY3pwqtXGV9d8drNo+p7YgtkUpMdEXaJISpj7t61OUbvJRY5M49GGl 3x+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wkennington-com.20230601.gappssmtp.com header.s=20230601 header.b="TlwNs/vA"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id j20-20020a17090aeb1400b002777ccd05bcsi3895326pjz.25.2023.10.13.01.53.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 01:53:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@wkennington-com.20230601.gappssmtp.com header.s=20230601 header.b="TlwNs/vA"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 4BFC782C2D0E; Fri, 13 Oct 2023 01:53:25 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230193AbjJMIxN (ORCPT + 99 others); Fri, 13 Oct 2023 04:53:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230128AbjJMIxM (ORCPT ); Fri, 13 Oct 2023 04:53:12 -0400 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE8BABE for ; Fri, 13 Oct 2023 01:53:07 -0700 (PDT) Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-53d9f001b35so3177942a12.2 for ; Fri, 13 Oct 2023 01:53:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wkennington-com.20230601.gappssmtp.com; s=20230601; t=1697187186; x=1697791986; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=OMsxy+WRFTvVWQUjTpH47x0e7OESMLVwCdR526kLjyM=; b=TlwNs/vAUP69k89accyituAFuPK4PIma+nurmzMZPAPL9zP89CP18V3VC+SsXvU3sH rcF50lwuaduezrurDZgewrlQ4WTH+TGjoIT5YdyMr0czmZw8v2zbBnKkN41ckLahBZ4y Jy+N+NMIWzFl+Y+TvWOZy3w6Pywx3sk29CDTFVder87jCaK4fq2BVz7/TuH0I0z6z3yq 8BySJl0a1T4pZpLHr2z7FKuiCTXCVUleydSzV+qPUz7cc++TLPjHEvN+Iw5in77nKAUa +bWUDvNahhDl8RqXH3mlYsZgpnjkHuUAhjuTcsF7Xa3ZYdbjKQzmb7KJSLEUa8DmWxN9 MXEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697187186; x=1697791986; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OMsxy+WRFTvVWQUjTpH47x0e7OESMLVwCdR526kLjyM=; b=GkLejYH/xaPKCBstZFtTtl3nMw6U2KnZgF8pgtqQu7gi8pWASlVkfE8F5/LoTdtjdj pZjAWeBa6hHfEdLQJqRhgkr8GTUAjrJFTfz1ja1gmgwYkeAEpthvOgHW0e6eQxP5g9Iu f/WJj9glY0RmAnehNdtaeXmI+ya4MT9j2kJK8QN6s4lDpsRIv3TS6K/XoDW7A1gSO81z a2iOcRs6Ip/IHb6hsKRno/3OQUGuGQJLNpEsU16f0I0XnOUu4h95LhdM/oWWK/QmOVOL HVq6nUswnK6vzcs0B23oXrg/5HDwHW9blgWg6+KsDdtVXkYdJFDZhuMoNRXw+cH/G7Kh bqPw== X-Gm-Message-State: AOJu0Yw5ZHRqP6HPC0lw66LP3l2xnraV+yw0S4uKSDagEvghFHtS8N9h 18ENqqg9YxWDfkfNf+NxyrguSTRDUo4h2XYBm07j23YmlDMAjQOg6fI= X-Received: by 2002:a05:6402:1219:b0:530:77e6:849f with SMTP id c25-20020a056402121900b0053077e6849fmr23219312edw.27.1697187186325; Fri, 13 Oct 2023 01:53:06 -0700 (PDT) MIME-Version: 1.0 References: <20230926230712.516709-1-william@wkennington.com> In-Reply-To: From: William Kennington Date: Fri, 13 Oct 2023 04:52:54 -0400 Message-ID: Subject: Re: [PATCH] mux: Make it possible to select MULTIPLEXER if EXPERT To: Peter Rosin Cc: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 13 Oct 2023 01:53:25 -0700 (PDT) On Fri, Oct 13, 2023 at 4:36=E2=80=AFAM Peter Rosin wrote= : > > Hi! > > 2023-10-12 at 23:52, William Kennington wrote: > > On Wed, Sep 27, 2023 at 16:08 Peter Rosin > wrote: > > > > Hi! > > > > 2023-09-27 at 01:07, William A. Kennington III wrote: > > > Right now, there is no way to enable multiplexer support unless a= nother > > > config option selects it. When using `allnoconfig` with CONFIG_EX= PERT, > > > this is deselected with no way to enable it. > > > > I fail to see how that would be useful? Why would you want the mux > > core if there are no users? > > > > > > In this case the user is a custom configuration that is added per board= following > > Documentation/devicetree/bindings/arm/npcm/nuvoton,gcr.yaml > > (That binding has recently been moved: > Documentation/devicetree/bindings/soc/nuvoton/nuvoton,npcm-gcr.yaml) > > > > > I suppose the problem is that ARCH_NPCM7XX doesn=E2=80=99t select MULTI= PLEXER and MUX_MMIO. Maybe that=E2=80=99s the patch you are looking for? No= thing else that we use has a dt compatible string with mmio-mux or uses the= functionality under the covers. This leads to our board config selecting i= t manually. > > Perhaps? I think that's one way to do it. > > I'm not sure about what exactly should select MULTIPLEXER in your case, > but the thinking is that whatever driver wants to use a mux controller > should be responsible for selecting the mux core. > > Maybe that thinking needs revisiting? It looks like for many of our boards, we are basically relying on mmio-mux to be able to set the initial state for some of the registers in the SoC. In our usecase we want the serial port mux registers to be set to an idle value that never gets updated by any driver, so we have these dangling mmio-mux entries. > > When digging I'm finding nodes that wants to add mux controllers to the > npcm "gcr" syscon node in: > > arch/arm/boot/dts/nuvoton/nuvoton-npcm730-gbs.dts > arch/arm/boot/dts/nuvoton/nuvoton-npcm730-kudo.dts > arch/arm/boot/dts/nuvoton/nuvoton-npcm750-runbmc-olympus.dts > > But I then find no mention of any nodes wanting make use of those mux > controllers. My thinking is that whomever comes up with a dts that > actually has such nodes will also want to select drivers for those nodes. > And those drivers in turn should select MULTIPLEXER. It seems like there are no consuming drivers, we just want a global initial state set for SoC registers when the kernel starts. There is probably a better way to do this. I think the intention was to be able to expose the mmio-mux functionality to userspace but obvious the mmio-mux in itself doesn't support that. > > (The above olympus case is a bit suspect since the mux controller has no > label, and it is therefore needlessly difficult to reference the node > from a node that needs a mux controller) > > Cheers, > Peter