From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5A968C433B4 for ; Thu, 8 Apr 2021 20:05:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 302EF61105 for ; Thu, 8 Apr 2021 20:05:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231906AbhDHUFb (ORCPT ); Thu, 8 Apr 2021 16:05:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231451AbhDHUFb (ORCPT ); Thu, 8 Apr 2021 16:05:31 -0400 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7543FC061760; Thu, 8 Apr 2021 13:05:19 -0700 (PDT) Received: by mail-wm1-x332.google.com with SMTP id g18-20020a7bc4d20000b0290116042cfdd8so3555371wmk.4; Thu, 08 Apr 2021 13:05:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=tX16rYfnc+gH4Tt0HpCPrhcqr2Z+F5SWlJqMaI9bYv4=; b=KdvlR16PUlG7CDNXDX8iz3+AH3FuFNm5TuZsPPn/OQsiFVat03p+jLLcFP0zLrBVdT Goo0sKMTXxwq7iID+sl+k0upsYqVPaYqi+o0rpL88AYiRxWY+hp0pSlPiovokukkrM+0 v3+yy8xrCGhAHT415KK5Bhs4v1Rqbw8a9oUkzR+mlpvsga4r2G+AGPT9jn7q9sVj7w7r cCAegaMPr1H33rI57orHmj2dtZ/hvzAka51I2iq3DZLHKA/KET9adScHtfl42CTLlq76 h4iZC61bghITH1oigrTMWc8fQDW1xO3fB0kqFRkI3ka2KlQWo3UUmgjE1qXO8hLeZAG5 zesQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=tX16rYfnc+gH4Tt0HpCPrhcqr2Z+F5SWlJqMaI9bYv4=; b=VbvGfNsz53WNgCgFb/9DYgRWnFlMiWI4SL9QaHjTSqH2fKrZ92UL3qjDu5u2pKE+59 S5jJhk/csRK7j0UjX0tW0Vn/C20TAt4IAOlzVpft1pPgtLH0CGZcNzTdrz5O+kX05uT3 pyQ5tj3JN6dDVuySuQ4yqbY3oOpBT83J1BMpDJf14OLS3umrS7VmS7WpyLQJO4RBJw84 XjViOmAwx+GrilPKRQqACHFueUiLkl82FwrZuc4tjprirt5CX2zA9qwce2N+kgzzJj6H cCRTGxex955LBSFdg9XP+OfalPG3qVTRCtXss4KJqVKjRiqNQ7GzCgbtIV5wDRH1PsYR rfng== X-Gm-Message-State: AOAM531qcFXshrFcgIPe5tWfVsneQbRFai8vMlP0Ueh65xPt3EbkUW6C E/8TGRQqpyqt3uGsylBmf80frRLq+ZL1mg== X-Google-Smtp-Source: ABdhPJyV2ZTS1pmrbKMsk/v+cY3LiErgpSvRS4s1j8TtHC8CT7uz4wkWeq3jZnfkDExxXFGK/G9Idw== X-Received: by 2002:a1c:49c2:: with SMTP id w185mr10659600wma.163.1617912318165; Thu, 08 Apr 2021 13:05:18 -0700 (PDT) Received: from [192.168.1.101] (abac128.neoplus.adsl.tpnet.pl. [83.6.166.128]) by smtp.gmail.com with ESMTPSA id h14sm592618wrq.45.2021.04.08.13.05.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 08 Apr 2021 13:05:17 -0700 (PDT) Subject: Re: [PATCH 1/1] arm64: dts: qcom: msm8994: Reserve gpio ranges To: Petr Vorel , Linus Walleij Cc: Bjorn Andersson , MSM , Andy Gross , Rob Herring , Ricardo Ribalda , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" References: <20210405200259.23525-1-petr.vorel@gmail.com> <20210405225222.GD904837@yoga> From: Konrad Dybcio Message-ID: Date: Thu, 8 Apr 2021 22:05:14 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Hi, to clear up some confusion: On Qualcomm boards GPIOs that are used for "secure" (duh) peripherals, like a fingerprint scanner, are not allowed to be controlled from Linux (the "non-secure world"). Trying to do so causes an immediate reboot due to "attempting to violate the security". The GPIOs seem to all be iterated over on boot, except for the ones specified in "gpio-reserved-ranges". As a result, if such "secure" GPIOs are not declared in the DT, the board essentially dies on TLMM (pinctrl) probe (which happens veeeery early - so that all other peripherals can set the pins as they see fit) and that's very unpleasant to debug. Without this patch, Petr's device will simply not boot. So, why did it work before!? Well, either the GPIOs weren't iterated over, or the TLMM (pinctrl) driver wasn't in place back then. As for the initrd crash.. perhaps you have an Android initrd which dies as soon as it doesn't detect SELINUX and a couple of other options.. You might want to try postmarketOS's one, or any other Linux distro's armv7/aarch64 initrd. To replace it, simply use abootimg like so: abootimg -u boot.img -r ramdisk.img If it says something something "too small", add -c "bootsize=30000000" to make the boot.img exactly 30 million bytes (or change it as you see fit). Konrad