Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp339039rwr; Tue, 25 Apr 2023 23:25:59 -0700 (PDT) X-Google-Smtp-Source: AKy350ZOmKTD4UggDhg++rtd58ZUNPsed7dJ55dPsjYw/VP4hs2Jb0uGlz2srLOTEcaGHTxvQ+VS X-Received: by 2002:a05:6a20:1596:b0:f2:9d49:5236 with SMTP id h22-20020a056a20159600b000f29d495236mr20317779pzj.20.1682490359437; Tue, 25 Apr 2023 23:25:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682490359; cv=none; d=google.com; s=arc-20160816; b=PZU3kVqoKFAJfn+5Suj3E29aPBtF7dvwyCZ446rWq+y05txxIZ+fTnvEsJ2hAtqzU2 w/HsHN2ID1F3OiSW1EmP7XxATJO+1QibK8ZJwZRWmxzP1k6m+eAxvsChaghLYilTP4hk 1AZrOs8C/AJbQkTcg+F6roFMcFXgj9d478N4t29EY/fOm6fE84oHsACm5uWH5lp0sa09 lJedW/BuHdvY1pLpHo6Da2AHRwMMr4Pf6UcmoAp5D4kxlAw4xFC0JYvUoPexCuuNwX0Y MW6BWP46lGo0U71qz5rUjNbFcKYO8WHhMbdQe2+3pvbiBSYG+sts2nep7wHQqJK0Ijk5 nbHw== 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=cFjTRFmgueCsnTo4GzLGCA8/IUthnHgQpQZGyhDzdnA=; b=aaOjJM643FDPaFuSTlID54l12EOJWjLMgfhddZnWpdUtjPpiFHzFTcxwifvoJ21W2l 0ZqcSBhy/wyvqbZOHvfV+xPPpKb9+w3F5koBKlg2lTsb9jy5K9dwWGIjE9hFAHd1HB46 dUJHLCsHlSfCNDElw4Or54MnBejIslTkN8HZmPmCwMvcd/pJA0dqfLrfy1Lk4Bp1+npO 0Ro0OCkNRNh5+wbcln5rgS4KlMV8HMe4yXhECAudY7/OqZ3VyIS75b8xcISCInE3QRkh n9f15qKWKcWVc6Xd40pz0G5eq+sPq8XDppm/0YvKSVtDf3zxIxzICTBRDLYm16hgo22n qDmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=aB8gLPz3; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k64-20020a632443000000b0051b47fe799fsi15013226pgk.557.2023.04.25.23.25.46; Tue, 25 Apr 2023 23:25:59 -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=@ti.com header.s=ti-com-17Q1 header.b=aB8gLPz3; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239485AbjDZGNb (ORCPT + 99 others); Wed, 26 Apr 2023 02:13:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239409AbjDZGN3 (ORCPT ); Wed, 26 Apr 2023 02:13:29 -0400 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31AD7E70; Tue, 25 Apr 2023 23:13:28 -0700 (PDT) Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 33Q6DDnp001168; Wed, 26 Apr 2023 01:13:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1682489593; bh=cFjTRFmgueCsnTo4GzLGCA8/IUthnHgQpQZGyhDzdnA=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=aB8gLPz3gVWXk63ljTnYTEFgkW0AZHtysQ9cYgkNBYDImFYcKXUPQ8Tk1Fsw1JE0l 2yVsK+ieVaOvbcud+gk/lxFpVBmpEdMWJP5i5bz3LJ03SYZCEZVSxvlfCYcp/l8LO5 A2Lnxl/GldfiWvRBZ54Asi7jCo/0S06QN65Pdwbs= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 33Q6DDqk011203 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 26 Apr 2023 01:13:13 -0500 Received: from DFLE111.ent.ti.com (10.64.6.32) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Wed, 26 Apr 2023 01:13:13 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE111.ent.ti.com (10.64.6.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Wed, 26 Apr 2023 01:13:13 -0500 Received: from [172.24.222.176] (ileaxei01-snat.itg.ti.com [10.180.69.5]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 33Q6D7TB033931; Wed, 26 Apr 2023 01:13:08 -0500 Message-ID: Date: Wed, 26 Apr 2023 11:43:07 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH 1/2] arm64: dts: ti: Add overlay for OLDI-LCD1EVM Display and touch screen Content-Language: en-US To: Andrew Davis , Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Rob Herring , Krzysztof Kozlowski , Catalin Marinas , Will Deacon CC: Devicetree List , Linux Kernel List , Linux ARM Kernel List , Jyri Sarha , Tomi Valkeinen , Praneeth Bajjuri , Rahul T R , Devarsh Thakkar , Jai Luthra , Jayesh Choudhary References: <20230425051235.15533-1-a-bhatia1@ti.com> <20230425051235.15533-2-a-bhatia1@ti.com> <90272486-864d-910c-a10b-4ba71a71f4b0@ti.com> <66a4c8e0-e1d1-4d7d-b0eb-ce092fea8695@ti.com> <19f1d3dc-a416-9d5e-f545-8ccf1a65c73c@ti.com> From: Aradhya Bhatia In-Reply-To: <19f1d3dc-a416-9d5e-f545-8ccf1a65c73c@ti.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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 Andrew, On 25-Apr-23 23:14, Andrew Davis wrote: > On 4/25/23 12:00 PM, Aradhya Bhatia wrote: >> Hi Andrew, >> >> On 25-Apr-23 20:39, Andrew Davis wrote: >>> On 4/25/23 12:12 AM, Aradhya Bhatia wrote: >>>> From: Jyri Sarha >>>> >>>> The OLDI-LCD1EVM add on board has Rocktech RK101II01D-CT panel with >>>> integrated touch screen. The integrated touch screen is Goodix GT928. >>>> Add DT nodes for these and connect the endpoint nodes with DSS. >>>> >>>> This patch was picked from TI's public tree based on 5.10 LTS kernel. >>>> >>>> Signed-off-by: Jyri Sarha >>>> Signed-off-by: Nikhil Devshatwar >>>> [abhatia1@ti.com: Make syntax changes to support 6.1 DTSO format] >>>> Signed-off-by: Aradhya Bhatia >>>> --- >>>>    arch/arm64/boot/dts/ti/Makefile               |  2 + >>>>    .../dts/ti/k3-am654-evm-oldi-lcd1evm.dtso     | 70 >>>> +++++++++++++++++++ >>>>    2 files changed, 72 insertions(+) >>>>    create mode 100644 >>>> arch/arm64/boot/dts/ti/k3-am654-evm-oldi-lcd1evm.dtso >>>> >>>> diff --git a/arch/arm64/boot/dts/ti/Makefile >>>> b/arch/arm64/boot/dts/ti/Makefile >>>> index 6acd12409d59..8956b19e587a 100644 >>>> --- a/arch/arm64/boot/dts/ti/Makefile >>>> +++ b/arch/arm64/boot/dts/ti/Makefile >>>> @@ -26,6 +26,7 @@ dtb-$(CONFIG_ARCH_K3) += >>>> k3-am6548-iot2050-advanced.dtb >>>>    dtb-$(CONFIG_ARCH_K3) += k3-am6548-iot2050-advanced-m2.dtb >>>>    dtb-$(CONFIG_ARCH_K3) += k3-am6548-iot2050-advanced-pg2.dtb >>>>    dtb-$(CONFIG_ARCH_K3) += k3-am654-base-board.dtb >>>> +dtb-$(CONFIG_ARCH_K3) += k3-am654-evm-oldi-lcd1evm.dtbo >>> >>> This name is a bit odd, why "evm" twice? Looks like the first instance >>> is the redundant one as most of the documents on this LCD board call it >>> the "LCD1EVM". How about: >>> >>> k3-am654-lcd1evm.dtbo >> >> I didn't think I could change the name of the overlay picking the patch >> from our tree, but if we are going to do it, can we take up another >> approach, where it would be easier to add panels for AM62x family and >> ensure uniformity throughout. >> > > Yes, we can change what we want when upstreaming. How we did it in our > evil vendor tree should in no way prevent us from doing things better > in upstream. > Okay. >> We have 2 different panels from Vendor A, and another one from Vendor B. >> Vendor B panel connects to AM625-SK via an adapter board. >> >> Vendor-A/Panel-1 only says the name, 'SK-LCD1' on its circuit board. >> Vendor-A/Panel-2 doesn't have any name yet. We only have development >> units. >> Vendor-B/Panel-2 mentions '$(LCD_model) to AM62x SoC adapter board'. >> >> Since, there are too many manufacturers, it is difficult to maintain >> uniformity with the names of panel-boards. So, I have this approach in >> mind (which I have used for our tree for AM62x), but would like your >> comments. >> >> k3-$soc-$board-$(panel_vendor)-$(brief_compatible).dtso >> >> So, for AM625-SKs, >> k3-am625-sk-$(vendor_name)-$(brief_compatible).dtso >> > > Looks reasonable to me. Great! I tweaked this to add the keyword "panel" to also make it reader friendly in v2. k3-$soc-$board-$(panel_vendor)-$(brief_compatible)-panel.dtso > >> and for the current panel Rocktech RK101II01D-CT, which applies on AM654 >> base-board, >> >> k3-am654-base-board-rocktech-rk101.dtso. >> >> This does become rather long, but also is distinguishable. >> > > No limit to file names here, being clear and distinguishable is more > important than short names. > >> Let me know what you think. >> >>> >>> I would like the overlay names to give some hint to what base DTB they >>> apply to, >> >> Agreed. That is indeed how it should be. >> >>> or better yet, apply them here in the build which will check >>> that they apply cleanly. Plus you can drop the silly "+= -@" below. >>> >> >> The above approach will give a hint of the base EVM where a combined >> build is not possible simply because there is no 'official' name for a >> particular combination of panel and EVM. >> > > We do not need to name each possible combination (and we shouldn't, there > would be a combinatorial explosion, avoiding that is the whole point > of using overlays vs .dtsi includes). > > I do think we should name at least the combinations that we ship together. > So as below for AM654 that would be the GPEVM and the IDK. Those are the > two out-of-box combinations available for purchase as a kit. Folks can > still > buy additional add-on cards, and/or mix and match from those two sets. > > As long as we have at least one named combination, then the base-board dtb > file gets symbols automatically and we can drop the "+= -@" line. > Understood! I have incorporated these suggestions, as well as the ones from Tomi and Nishanth, in v2 and posted them. Regards Aradhya > Andrew > >> >> Regards >> Aradhya >> >>> Let's see how this should be called, from the AM65x GP EVM doc[0] we >>> get a nice picture on page 5 and the following: >>> >>> "The AM65x GP EVM consists of a common processor board, an LCD adapter, >>> and a one-lane PCIe/USB3 personality card." >>> >>> So, this would translate to: >>> >>> k3-am654-gp-evm-dtbs := k3-am654-base-board.dtb k3-am654-lcd1evm.dtbo >>> k3-am654-pcie-usb3.dtbo >>> dtb-$(CONFIG_ARCH_K3) += k3-am654-gp-evm.dtb> >>> Next, from the AM65x IDK doc[1] also with a nice image on page 5: >>> >>> "The AM65x IDK consists of a common processor board, IDK application >>> board, >>> and a two-lane PCIe personality card.: >>> >>> So: >>> >>> k3-am654-idk-dtbs := k3-am654-base-board.dtb k3-am654-idk.dtbo >>> k3-am654-pcie-usb2.dtbo >>> dtb-$(CONFIG_ARCH_K3) += k3-am654-idk.dtb >>> >>> Note that we do have all those missing dtso files in our evil vendor >>> tree[2] >>> and will be upstreaming them next, so this naming should all work out >>> nicely. >>> >>> Andrew >>> >>> [0] https://www.ti.com/lit/ug/spruim7/spruim7.pdf >>> [1] https://www.ti.com/lit/ug/spruim6a/spruim6a.pdf >>> [2] >>> https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/arch/arm64/boot/dts/ti?h=ti-linux-5.10.y >>> >>>>      # Boards with J7200 SoC >>>>    dtb-$(CONFIG_ARCH_K3) += k3-j7200-common-proc-board.dtb >>>> @@ -45,3 +46,4 @@ dtb-$(CONFIG_ARCH_K3) += k3-j784s4-evm.dtb >>>>      # Enable support for device-tree overlays >>>>    DTC_FLAGS_k3-am6548-iot2050-advanced-m2 += -@ >>>> +DTC_FLAGS_k3-am654-base-board += -@ >>>> diff --git a/arch/arm64/boot/dts/ti/k3-am654-evm-oldi-lcd1evm.dtso >>>> b/arch/arm64/boot/dts/ti/k3-am654-evm-oldi-lcd1evm.dtso >>>> new file mode 100644 >>>> index 000000000000..b2c790b314cf >>>> --- /dev/null >>>> +++ b/arch/arm64/boot/dts/ti/k3-am654-evm-oldi-lcd1evm.dtso >>>> @@ -0,0 +1,70 @@ >>>> +// SPDX-License-Identifier: GPL-2.0 >>>> +/** >>>> + * OLDI-LCD1EVM Rocktech integrated panel and touch DT overlay for >>>> AM654-EVM. >>>> + * >>>> + * Copyright (C) 2023 Texas Instruments Incorporated - >>>> http://www.ti.com/ >>>> + */ >>>> + >>>> +/dts-v1/; >>>> +/plugin/; >>>> + >>>> +#include >>>> +#include >>>> +#include >>>> + >>>> +&{/} { >>>> +    display0 { >>>> +        compatible = "rocktech,rk101ii01d-ct"; >>>> +        backlight = <&lcd_bl>; >>>> +        enable-gpios = <&pca9555 8 GPIO_ACTIVE_HIGH>; >>>> +        port { >>>> +            lcd_in0: endpoint { >>>> +                remote-endpoint = <&oldi_out0>; >>>> +            }; >>>> +        }; >>>> +    }; >>>> + >>>> +    lcd_bl: backlight { >>>> +        compatible = "pwm-backlight"; >>>> +        pwms = <&ecap0 0 50000 PWM_POLARITY_INVERTED>; >>>> +        brightness-levels = >>>> +            <0 32 64 96 128 160 192 224 255>; >>>> +        default-brightness-level = <8>; >>>> +    }; >>>> +}; >>>> + >>>> +&dss { >>>> +    status = "okay"; >>>> +}; >>>> + >>>> +&dss_ports { >>>> +    #address-cells = <1>; >>>> +    #size-cells = <0>; >>>> + >>>> +    port@0 { >>>> +        reg = <0>; >>>> + >>>> +        oldi_out0: endpoint { >>>> +            remote-endpoint = <&lcd_in0>; >>>> +        }; >>>> +    }; >>>> +}; >>>> + >>>> +&main_i2c1 { >>>> +    #address-cells = <1>; >>>> +    #size-cells = <0>; >>>> + >>>> +    gt928: touchscreen@14 { >>>> +        status = "okay"; >>>> +        compatible = "goodix,gt928"; >>>> +        reg = <0x14>; >>>> + >>>> +        interrupt-parent = <&pca9554>; >>>> +        interrupts = <3 IRQ_TYPE_EDGE_FALLING>; >>>> +        touchscreen-size-x = <1280>; >>>> +        touchscreen-size-y = <800>; >>>> + >>>> +        reset-gpios = <&pca9555 9 GPIO_ACTIVE_HIGH>; >>>> +        irq-gpios = <&pca9554 3 GPIO_ACTIVE_HIGH>; >>>> +    }; >>>> +};