Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4072233pxb; Tue, 2 Nov 2021 03:41:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyco7vVXbl8reOZg42NAumYcuACfQB672rOau5rzmNoDlKvi8SqNvgqUXUuUuO/aw/HJPiN X-Received: by 2002:a17:906:3456:: with SMTP id d22mr28606983ejb.267.1635849675106; Tue, 02 Nov 2021 03:41:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635849675; cv=none; d=google.com; s=arc-20160816; b=ImqxNT3QIhw417HUhBUajKWBtkA19ke4O6cwoOtZkHloerWDGtzjmjuuIiFoX55i52 SIDIwF9/71P1P8UwaAUYEspbh560+B8bjtlidlLqMKiie0uYvzDYAOlCU5VgLq1JwX4a YhP9gvmW7WGmpGdChlL34bGpYmhXTsHp0IA0ysRDkBer2dw6piWsU1UExwKYm/KViW65 W0pRIdR92kZ+NTY+e2iGMFRhYsY3ejrfnYG9YBrnBPf48tfu68n+8bZFT7ZMByrivU73 c9KD7qOX7SKMY8MQuQA0p0GD/IXEDizSWvdz/sZ8D5+tnxxoY7YmSL+97i5KZGbHbroI 1KtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dmarc-filter:sender:dkim-signature; bh=5IssT2DP4vP4gHm4/0t00G7qOoes9ldO5A4j8f/thEw=; b=hnXXDXVNhWAxYYVUhebJtzhRdoB0kL85HCYAk8rU1vvxcD/OEUcC0LywJe2TNixLl3 YAVNxHkMT7C/kc1gM9n7y8+rOGRqS5tCTxTp35UBihxYOz2GGvbjvmQoogFLeSn7ouFk lJQlPiiqm5Wl/4W9zySytD07KZAWcP5Sd223eAvNmunN4DVSrM43nYjdwBMZp1SpoHRu NMr5r+SopaihNwApWSkFs/0jzyK5M2BgyngeG35uqziTAMURvfM8+Bq3V9P1gwWWyMhS VIx8a9ESOZAZJ4NEOUM2QNs0z+UNcVe/BLCiR/TINSyVyoqUJCIw/zsBkc5r//O9ilAw qwnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=KutRexuD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f14si4317763edc.450.2021.11.02.03.40.47; Tue, 02 Nov 2021 03:41:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=KutRexuD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230128AbhKBKlh (ORCPT + 99 others); Tue, 2 Nov 2021 06:41:37 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:16366 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229800AbhKBKlg (ORCPT ); Tue, 2 Nov 2021 06:41:36 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1635849541; h=Content-Transfer-Encoding: Content-Type: In-Reply-To: MIME-Version: Date: Message-ID: From: References: Cc: To: Subject: Sender; bh=5IssT2DP4vP4gHm4/0t00G7qOoes9ldO5A4j8f/thEw=; b=KutRexuDkQiEOKCxOBxNTboYnpizUfW++rFAKulVaKnXfv3nBkF9neSnKymWKmYp5m8sCGjf wxeiyDEm3VNUgbb7g1XOd4pCX3tn6moeDr7wxUFFSbxqBaCPUgGRs+AVxqBW7NOsIGaV0T5C t95av56mnG5rgP96SetjjK7IJNo= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n01.prod.us-west-2.postgun.com with SMTP id 61811545c8c1b282a560c188 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 02 Nov 2021 10:39:01 GMT Sender: rnayak=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id E8390C43460; Tue, 2 Nov 2021 10:39:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.4 required=2.0 tests=ALL_TRUSTED,BAYES_00, NICE_REPLY_A,SPF_FAIL autolearn=unavailable autolearn_force=no version=3.4.0 Received: from [192.168.1.102] (unknown [49.207.214.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: rnayak) by smtp.codeaurora.org (Postfix) with ESMTPSA id 7564BC4338F; Tue, 2 Nov 2021 10:38:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.codeaurora.org 7564BC4338F Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=codeaurora.org Subject: Re: [PATCH v2 1/2] pinctrl: qcom: Add egpio feature support To: Stephen Boyd , agross@kernel.org, bjorn.andersson@linaro.org, linus.walleij@linaro.org Cc: linux-arm-msm@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, psodagud@codeaurora.org, dianders@chromium.org References: <1635250056-20274-1-git-send-email-rnayak@codeaurora.org> <40fa13cd-f24c-e3a9-9b49-23ad26507bfe@codeaurora.org> From: Rajendra Nayak Message-ID: <67d5895f-0793-7916-067b-346425aeb548@codeaurora.org> Date: Tue, 2 Nov 2021 16:08:53 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/30/2021 12:35 AM, Stephen Boyd wrote: > Quoting Rajendra Nayak (2021-10-29 03:19:04) >> >> >> On 10/29/2021 12:24 PM, Stephen Boyd wrote: >>> Quoting Rajendra Nayak (2021-10-26 05:07:35) >>>> From: Prasad Sodagudi >>>> >>>> egpio is a scheme which allows special power Island Domain IOs >>>> (LPASS,SSC) to be reused as regular chip GPIOs by muxing regular >>>> TLMM functions with Island Domain functions. >>>> With this scheme, an IO can be controlled both by the cpu running >>>> linux and the Island processor. This provides great flexibility to >>>> re-purpose the Island IOs for regular TLMM usecases. >>>> >>>> 2 new bits are added to ctl_reg, egpio_present is a read only bit >>>> which shows if egpio feature is available or not on a given gpio. >>>> egpio_enable is the read/write bit and only effective if egpio_present >>>> is 1. Once its set, the Island IO is controlled from Chip TLMM. >>>> egpio_enable when set to 0 means the GPIO is used as Island Domain IO. >>>> >>>> To support this we add a new function 'egpio' which can be used to >>>> set the egpio_enable to 0, for any other TLMM controlled functions >>>> we set the egpio_enable to 1. >>>> >>>> Signed-off-by: Prasad Sodagudi >>>> Signed-off-by: Rajendra Nayak >>>> --- >>> >>> Does this supersede adding support for lpass pinctrl in this series[1]? >> >> No, the driver in [1] actually manages the LPASS TLMM instance, while this patch >> makes it possible for the 'same' pins to be managed by the SoC TLMM instance. >> On sc7280 SoC for instance GPIO144-158 maps to LPI-GPIO-0-14, and GPIO159-174 >> maps to SSC-GPIO-0-15. > > How do we make sure that the LPASS pins are actually muxed out of the > SoC and not blocked by eGPIO in this driver muxing out the pin as a > gpio? Do they avoid conflicting with each other somehow? No, currently they don't. The default value of egpio_enable is 0, so if SoC TLMM grabs it first and sets it to 1 and then the LPASS TLMM tries to grab it, perhaps it can find out and throw and error, though I don;t think it does that today. I am not sure how this can be caught when its the other way round (LPASS grabs it first) -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation