Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp4459836rwr; Sun, 23 Apr 2023 06:15:11 -0700 (PDT) X-Google-Smtp-Source: AKy350arWq9pb+swSlqV1vw1oLeUisTTGI/NLgmt6QAQwqNzGvL1IYEWjsoXaj4uQupLlHQCondo X-Received: by 2002:a05:6a00:1d8f:b0:63b:4978:a50a with SMTP id z15-20020a056a001d8f00b0063b4978a50amr12367892pfw.1.1682255710702; Sun, 23 Apr 2023 06:15:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682255710; cv=none; d=google.com; s=arc-20160816; b=FPcwk2on5j29d9kJKs722evgh07PVtZ675vj3MulGge8RdFPHFFq/c/1U8XHBueJGm v9dCSRp6Ci+yxza5OrBMgCWBfPZiMT/NsOGob1FtSl1nmH5YMNMIe+AkCyBm/HSs9i90 te8Qs8IWAieTaFbZrp61ksmrqr1GXv3IDZT1BydqGTfB2tZVFcod6fdD/r5SWUyyXdow +eCHaWAxHm2b65nGPzkGEYPgKqU+OUopFmuP6dKwawuhTX0THZQYqo0kMdZveEUrFSqi wj8Q9lIzf3VxvTJQ8T1jNLhhfccWcusak+ubukGBiyZzA4dIH+AfOZvljTKsJijH6aJv KCiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=iytNL3ionK0y40hikstW/BCZlPf3T/1Wm7ZwrV0sJlw=; b=JZjJek0rCm3YbxcrWxtq0vqToO68zqNtMJUej0Cu8QQbKbqR3ydAx5s9rz+/E8Ttiv +3dt6aBY32ymgu1SHalnRte+tzyWM12LxrkzK47yjjzq7JT+Ef2SleeUbDTFQRF7TLXa GOM8IZ0/7GODi2IvzmLT9Nrl4bXMWmni7K1tcBBh94b4LYO8gDwaiq+qFXsG5RF+BclU +YxelSaHLc4SZVgmBUNQ6z6FIS524frsOgV5huUw6WUDYQ4mu1qAMpiqF7NNRlG446RY kDSgcbp5rI2efKj+nDegzAwvNaB5F+oi1Mc/Vv1RCxA9t0XRYenInOZz1HE6Yag0fHpM oDYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=mxFY2HrI; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y19-20020a634953000000b0051fb9c77447si8484507pgk.477.2023.04.23.06.14.55; Sun, 23 Apr 2023 06:15:10 -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=@gmail.com header.s=20221208 header.b=mxFY2HrI; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229510AbjDWMxV (ORCPT + 99 others); Sun, 23 Apr 2023 08:53:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230336AbjDWMxD (ORCPT ); Sun, 23 Apr 2023 08:53:03 -0400 Received: from mail-ed1-x542.google.com (mail-ed1-x542.google.com [IPv6:2a00:1450:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5962B10D0; Sun, 23 Apr 2023 05:53:02 -0700 (PDT) Received: by mail-ed1-x542.google.com with SMTP id 4fb4d7f45d1cf-5058181d58dso5970371a12.1; Sun, 23 Apr 2023 05:53:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682254381; x=1684846381; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=iytNL3ionK0y40hikstW/BCZlPf3T/1Wm7ZwrV0sJlw=; b=mxFY2HrILM2cerTaYDSv71GR+WQ2TxeE3y9At9pEM0MB96S0zeycHmvj5b2o2Nyfah 8Hl6doywdvO32gzAWuXTOUT7U2gYPyaTtw08w4VvSPX7Ciu6zck0aaLKatWWicqz0szb IRmEldsEp1zTkz495xH/zXysU/vFiKUiGzyvNn7aSQE7K0RkI0v9udqJrqic2TQ2bNwn cZcriicgvgEM8HKLukppbCVWxS5Wztoc8HBi9T6Hpy8HogBf7Dg3UEEfv1/j8RSxD1GD S2VJGecIOyRBelHB9ALxDbN5CJd5KkrmJEWVjCMVNimtYnhkWEcLruPlcm57ib1JZTC1 Cjng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682254381; x=1684846381; h=content-transfer-encoding:in-reply-to:from:references:cc: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=iytNL3ionK0y40hikstW/BCZlPf3T/1Wm7ZwrV0sJlw=; b=HwVlsVKpHYSVNm7yqFgG+1kXXHQzQCQsYHt3X13aKd+lvpjVAIE1FGo00XVvLVKKcF Cf4GtwMpNteY3p0El13f6u1JdK3nm5P5uBJc9wuxFfkj359cB+5FqHNvzkQvDijIbxrk PCHEYFNnxq9uYG3vK5bm+HIBOb/yMfmY8gavF7hizcN4jOez/suFDslH+yMBiWhhBCGz pojp5xJMhurlbcTA2iAtLnaqtbUgLGdnaRQ076U6rFcWgzk3B64OXTKLLExKWi1ASWka jHgwNQ6YVmaXDmWkUdlOWlAhNm56cMjZXxkUQwtJRMRX+fE/OKLOPkgh5iX85aRAYHfb zqUg== X-Gm-Message-State: AAQBX9frco1oStuokQmgCdyJreA1J/fWUoFKK6W4Yg9jvzSQKgX+Lp9k uZFBKGkgkoKynOkuN8sDwSo= X-Received: by 2002:a05:6402:641:b0:504:921b:825 with SMTP id u1-20020a056402064100b00504921b0825mr9276422edx.36.1682254380636; Sun, 23 Apr 2023 05:53:00 -0700 (PDT) Received: from [192.168.50.244] (83.11.224.11.ipv4.supernova.orange.pl. [83.11.224.11]) by smtp.gmail.com with ESMTPSA id i21-20020a05640200d500b00501d73cfc86sm3847476edu.9.2023.04.23.05.52.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 23 Apr 2023 05:53:00 -0700 (PDT) Message-ID: Date: Sun, 23 Apr 2023 14:52:58 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH v2 12/12] ARM: dts: exynos: Add Samsung Galaxy Tab 3 8.0 boards Content-Language: en-US To: Henrik Grimler Cc: Krzysztof Kozlowski , Alim Akhtar , Rob Herring , Sylwester Nawrocki , Tomasz Figa , Chanwoo Choi , Michael Turquette , Stephen Boyd , Arnd Bergmann , Olof Johansson , soc@kernel.org, Russell King , Daniel Lezcano , Kukjin Kim , Mauro Carvalho Chehab , Vinod Koul , Kishon Vijay Abraham I , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-pm@vger.kernel.org, linux-media@vger.kernel.org, linux-phy@lists.infradead.org, ~postmarketos/upstreaming@lists.sr.ht References: <20230416133422.1949-1-aweber.kernel@gmail.com> <20230416133422.1949-13-aweber.kernel@gmail.com> From: Artur Weber In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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, On 19/04/2023 22:23, Henrik Grimler wrote: >> + memory@40000000 { >> + device_type = "memory"; >> + >> + /* Technically 2GB, but last 1GB is flaky, so we ignore it for now */ >> + reg = <0x40000000 0x3FC00000>; > > Comment says 1GB but you are skipping 1GB+4MB. Is the entire region > flaky or perhaps just the 4MB region in the middle? I copied the memory bank configuration from downstream: according to boot logs and ATAG data from the stock bootloader, there are two memory regions: one starting at 0x40000000 (size: 1020M) and one starting at 0x80000000 (size: 1024M). Here, only the first bank is added, since the second one doesn't work. I tried changing the size of this first bank to the full 1024M, and it seems to be booting fine; still, I'd rather leave this at the same size as claimed by downstream and ATAG. The second memory bank (anything past 0x80000000) doesn't work, as downstream has some weird special behavior regarding it: that region contains "page holes", and there's a check that discards every second page frame in that region[1][2]. That also means my comment is incorrect - indeed, 2GB of memory are passed to the kernel, but the second 1GB is effectively halved, leaving us with 1.5GB. (That's an oversight on my part - I wasn't aware of this when writing the DTS initially, and only checked this more in-depth now.) I'm not sure if there's a way to re-create this behavior in mainline; the closest thing I can think of is making a separate entry in reg for each of the working pages, but that would leave us with hundreds of lines, which is not ideal... so it's much easier to just leave it unused for now. Best regards Artur Weber [1] https://github.com/gr8nole/android_kernel_samsung_smdk4x12/blob/786b1473b93aabf40c18a2dca035503cce5ecac7/arch/arm/mm/init.c#L413-L414 [2] https://github.com/gr8nole/android_kernel_samsung_smdk4x12/blob/786b1473b93aabf40c18a2dca035503cce5ecac7/arch/arm/mach-exynos/include/mach/memory.h#L30-L38