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 Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DA45FC7EE25 for ; Fri, 9 Jun 2023 22:16:52 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6BDAB846E5; Sat, 10 Jun 2023 00:16:50 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="B5Bv+bdC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B8B9584704; Sat, 10 Jun 2023 00:16:48 +0200 (CEST) Received: from mail-io1-xd30.google.com (mail-io1-xd30.google.com [IPv6:2607:f8b0:4864:20::d30]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 2A968846B7 for ; Sat, 10 Jun 2023 00:16:46 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=cfsworks@gmail.com Received: by mail-io1-xd30.google.com with SMTP id ca18e2360f4ac-77acb04309dso104800439f.2 for ; Fri, 09 Jun 2023 15:16:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686349004; x=1688941004; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=PHnMKOQ2/RweUsaUCVEeQl2V9H09ptr92yd8QnCbEyM=; b=B5Bv+bdCGq6iYkeC28sSDTt+qactPHjAZdR1tfEQ0ABm8JC/NYLdvyha+/30P6KDn4 exduRYcLHm5bbyauNuRU+0T7QQYaTQweSyXztvZZn11lhiWfIwlNpUW3WKAJ7JxLuv7H 4Fe33ukbQY6fE6zs8wDnGfxCIy/jLokfnRhgY/shVCnIdA9Mviz77Qm5it1jYGJlKTqu zBax5NavBF0ygjSXY9Ezf61wg473kClpEpIQCcVSIehf5HtayIsLEGWOcMqGydBEMdGz 7pg4q0JGSB4+5kRkpZaZcZDFUAh/DAEMJTtwJNpLX7DRdvErkYBL/fQBwKsO3Ntym/WW Njdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686349004; x=1688941004; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=PHnMKOQ2/RweUsaUCVEeQl2V9H09ptr92yd8QnCbEyM=; b=AFDKKLvJTLZ69efYZf8SRvAmiHz2oU7zKIWU/DBo+q5oVhDfnzpwkht0NqUPszOcm1 8Lb7IZPPiKNim7fj9wGKor3HGHqjV/FTsoPKaYibN8Fxkg6FFkNGxVc5qiz6BYFF2tRD 36rgL6awa2gKV8Htj/mWb4z1KVPbI39fxRrJQQlaClVC2dGqP6sf4A1HmtIkVIupQXER xPrzrLo5Ie4xhJXrZ0nLH7albPXABma3pAYFod0PLjcOc87h3ZNJi1Uy8KVgiJkAhRaL 9tmPXS6XY4uJ8k1r6LTalLWq23oVQgnsM+Wb1biO7BAObBM/CqxE52FgYNoWmGR22tbH Cjcw== X-Gm-Message-State: AC+VfDzq2etA3s0txrxea97KdZ2Jh6g9Y1SLBmioMArHExdcL49rR+ZH L5EOjnQrOSWDDVMMF8A3LkGfrn4+h3Jwug== X-Google-Smtp-Source: ACHHUZ5z2HrPmGs5rvRGwnfhjaz0ssnieB4/cuyIB9zDvux7dma1pIscdeDpe1XgXG/gu66zEnB7nQ== X-Received: by 2002:a5e:db41:0:b0:77a:c494:b4be with SMTP id r1-20020a5edb41000000b0077ac494b4bemr2861044iop.19.1686349004519; Fri, 09 Jun 2023 15:16:44 -0700 (PDT) Received: from ?IPV6:2001:470:42c4:101:d264:8856:b4e9:a431? ([2001:470:42c4:101:d264:8856:b4e9:a431]) by smtp.gmail.com with ESMTPSA id a13-20020a5d958d000000b0076ffebfc9fasm1312620ioo.47.2023.06.09.15.16.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 09 Jun 2023 15:16:44 -0700 (PDT) Message-ID: <04c52801-a6d0-033b-c7f4-613e0b789d96@gmail.com> Date: Fri, 9 Jun 2023 16:16:43 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [RFC PATCH 00/17] sunxi: rework pinctrl and add T113s support Content-Language: en-US To: u-boot@lists.denx.de, Andre Przywara References: <20221206004549.29015-1-andre.przywara@arm.com> From: Sam Edwards In-Reply-To: <20221206004549.29015-1-andre.przywara@arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Hi Andre, On 12/5/22 17:45, Andre Przywara wrote: > Please let me know if you have any opinions! I believe I promised you last month I'd let you know once I had a build I'm happy with, and I'm pleased to say that I think I've reached that point. I'm running quite rapidly out of sharp edges to sand down, too. I have a build of U-Boot for my target, complete with: - UART3 initialized correctly - DRAM coming up correctly - SPL sets configured boot clock correctly - SPI-NAND support (SPL and U-Boot proper) - MMC support (SPL and U-Boot proper) - SPL boot from FEL - USB gadget support - Ethernet MAC+PHY support - I²C support * - GPIO support (LEDs, buttons, misc. board management) - `reset` working (requries CONFIG_SYSRESET unset, WDT key) - PSCI, nonsec - Able to boot Linux ;) * Requires nonzero `MVTWSI_CONTROL_CLEAR_IFLG` for NCAT2, and a patch to the pinctrl driver to configure the proper mux function for my necessary pins. I figured I'd share this list as a sort of checklist for your own work, too. The remainder of my efforts now will probably be focused on mainlining this stuff (let me know how else I can be of help), and then I'm afraid I'll have to disappear back downstream to the Turing Pi 2 development effort, but maybe our paths will cross again in the kernel lists. :) Thank you greatly, Sam P.S. I figure the reason there aren't I²C function defs in the d1 pinctrl table already is because Allwinner tends to kick around the I²C mux values a lot and we would need a per-pin lookup table that would eat up too much valuable image space? In an entirely JUST FOR FUN exercise to give myself a break from staring at datasheets/patches and do a "pure CS" coding challenge for a change, I came up with a terse encoding scheme for this table. Here is the size (in bits) for a selection of D1's functions (pin assignments harvested from Linux): 'emac': 50, 'i2c0': 101, 'i2c1': 64, 'i2c2': 109, 'i2c3': 91, 'mmc0': 23, 'mmc1': 23, 'mmc2': 20, 'spi0': 41, 'spi1': 48, 'uart0': 78, 'uart1': 87, 'uart2': 88, 'uart3': 102, 'uart4': 68, 'uart5': 66, ...and yes, it also identifies invalid pin assignments! I'd be willing to contribute something like this if there's big interest, but I figure needing to compress this at build-time might be a bit too complicated for the U-Boot project's liking.