Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp863191rwi; Thu, 27 Oct 2022 08:22:57 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5nn9G7hHAFaxU0mCShaNaRQipkzeNUSxY0Q6K1mwgnaFkvZWUPNggdnF57kt9a7DltSkvy X-Received: by 2002:a05:6402:1d4f:b0:461:d2ed:788c with SMTP id dz15-20020a0564021d4f00b00461d2ed788cmr19193555edb.418.1666884177450; Thu, 27 Oct 2022 08:22:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666884177; cv=none; d=google.com; s=arc-20160816; b=KxGGhzLtP9YAoC8HrgxaN5eHV7q4B50AIZn/JtNPeakxdVa7NRRt1bRtjMv1v5a+D5 i/GrzSZ/ta4qF+yLgNCdG/iBTD3l0rF9QjIWmwQdunJBNNmjUDt9Stgzao20M6MX3t/u thKr7gwUt1UF8K5edoX8FQelET8uN4u0JlI37swlb8WvjsFIls1/O/fmJmjBOTkzqZbv 5cYChSTVtP5Xhqw2VAc6czqkxpCQF4YdSHDPRS6S2zVd0XbBvDJTKYulMNKGnyrl6Ihl V+sVjQaAUIG5aZond0Ho1cpKFSXvs3Hgx4HVqiJGegeSI4YgQx8zNhURgyVidvBHf+C4 jaSw== 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=aBTBb9mYsO/bWIRGTLUEcV64642M/1C9Rv4JP7J0eJI=; b=Ez73ZJ+I9xPz7cxrv2mDwlZmsNRV4untigZAQAptK/aD6zO0fleku3O9ugvRnZwmuX frVfjpImkecGfNvZLInHbBTE21qN4O8Ck0xkBrpTWgDLKQ8o5LqgpfFyo8fbgksQr1qO 7JED8uvmBmwjefriEeCJbb3np40wAU/t602/sfO19z/sVDq92ZurZmkmSkE4sSxoXYg3 Am8dBwLaUtRViHKGtboDfVbm/3AIhhSk40ML/auKYe6JHd47zQdxv+luf/OdGKtmNNL5 0aXNUk4AYVYyQf9Rcbc2yLwuz/8TVslrBauuKs+OL7+g700bTWiUeWE76R8UMlIPdDM7 38CA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=J2G+exWT; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id eg31-20020a056402289f00b004597b778b3bsi1584299edb.75.2022.10.27.08.22.32; Thu, 27 Oct 2022 08:22:57 -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=@linaro.org header.s=google header.b=J2G+exWT; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235957AbiJ0O6q (ORCPT + 99 others); Thu, 27 Oct 2022 10:58:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235924AbiJ0O6m (ORCPT ); Thu, 27 Oct 2022 10:58:42 -0400 Received: from mail-qk1-x72c.google.com (mail-qk1-x72c.google.com [IPv6:2607:f8b0:4864:20::72c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E3A0108DF2 for ; Thu, 27 Oct 2022 07:58:41 -0700 (PDT) Received: by mail-qk1-x72c.google.com with SMTP id 8so1096757qka.1 for ; Thu, 27 Oct 2022 07:58:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=aBTBb9mYsO/bWIRGTLUEcV64642M/1C9Rv4JP7J0eJI=; b=J2G+exWTK2vBkW5KSNWs9dOO61qmN1M+oA4zlOxHvkZOYdeDYjc8eMy15TODjlMErm sv52x42bTqk4oUCokXyzolTWJP3nbWScYJrbhp/QnCOJJnYl2bdeIfFPo801YA/HBM5n ZtD3VZbui/Ef0Ct5cOc5cRlbn9GftRbDpRp7eMLY0BRlY4HI2xZTy8H5k3OeoUkVltu3 /kGoRCIz8M+RFKYpsQOYipf7amBGUi40siOpDuEiPbokYsf9OzgQAjOvZEfNpPEd0XtQ CyfaiF5HI1n4j3LMQuNu+fYnBSoi4rm+Pt9q1dHxCH6U8rWV61CQQQSirJy30C5Qbvve 7VFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=aBTBb9mYsO/bWIRGTLUEcV64642M/1C9Rv4JP7J0eJI=; b=ObZ7D4EwcGMZx62NwGJrTnMQDyN9gpidoSVwV7Xl4KMKJ6bg2ssXaJFidQMW3ryzgE pvHgEV+QVd4Ekhu/0NVa2f3huWUNb/mlXpnI/zpmmZIxjc8Sz6o3ZgmeMklxYfr0eVb/ s0MwsGhJdSwFiMjcovorPetllw1cQY2UvuI1ZHtJG2dHyqxXdNz5cOoX7pjBXaPDjRVk hhGxiVLjsra7QvF5HCaQCKBPVrcB3eARWisviLxqfvbeWa/bj+A0dbtHrg084rqaHbu5 83naeeVJEVnL7LYhuz4QYwB/Mf1WXGwOylntz66nsAe09LxcfDOFGtG7Ej8xNhsE+MCV NF8g== X-Gm-Message-State: ACrzQf1CdmW9+t2maiDN5aOyKyBnkiqJLtN855dyf1CAhtLscPhl/PXt QBuU2Wn7mLMkDrDuXYB8lZHnwQ== X-Received: by 2002:a05:620a:d55:b0:6f9:fadd:4762 with SMTP id o21-20020a05620a0d5500b006f9fadd4762mr1614437qkl.335.1666882720655; Thu, 27 Oct 2022 07:58:40 -0700 (PDT) Received: from [192.168.1.11] ([64.57.193.93]) by smtp.gmail.com with ESMTPSA id bp43-20020a05622a1bab00b00399d5d564b7sm961058qtb.56.2022.10.27.07.58.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 27 Oct 2022 07:58:40 -0700 (PDT) Message-ID: Date: Thu, 27 Oct 2022 10:58:38 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: [PATCH v1 3/4] ARM: dts: rockchip: add rk3128.dtsi Content-Language: en-US To: Johan Jonker , kever.yang@rock-chips.com, heiko@sntech.de Cc: sjg@chromium.org, philipp.tomsich@vrull.eu, zhangqing@rock-chips.com, hjc@rock-chips.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, daniel.lezcano@linaro.org, tglx@linutronix.de, arnd@arndb.de, olof@lixom.net, soc@kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org References: <674b875a-0dfa-eff2-5018-eafed851707f@gmail.com> From: Krzysztof Kozlowski In-Reply-To: <674b875a-0dfa-eff2-5018-eafed851707f@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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 On 26/10/2022 20:53, Johan Jonker wrote: > Add basic rk3128 support. > Thank you for your patch. There is something to discuss/improve. > +#include > +#include > +#include > +#include > +#include > + > +/ { > + compatible = "rockchip,rk3128"; > + interrupt-parent = <&gic>; > + #address-cells = <1>; > + #size-cells = <1>; > + > + aliases { > + gpio0 = &gpio0; > + gpio1 = &gpio1; > + gpio2 = &gpio2; > + gpio3 = &gpio3; > + i2c0 = &i2c0; > + i2c1 = &i2c1; > + i2c2 = &i2c2; > + i2c3 = &i2c3; > + spi0 = &spi0; > + serial0 = &uart0; > + serial1 = &uart1; > + serial2 = &uart2; Bus aliases are board specific and represent what is actually available on headers/pins etc. These do not belong to SoC DTSI. > + }; > + > + arm-pmu { > + compatible = "arm,cortex-a7-pmu"; > + interrupts = , > + , > + , > + ; > + interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>; > + }; > + > + cpus { > + #address-cells = <1>; > + #size-cells = <0>; > + > + cpu0: cpu@f00 { > + device_type = "cpu"; > + compatible = "arm,cortex-a7"; > + reg = <0xf00>; > + clock-latency = <40000>; > + clocks = <&cru ARMCLK>; > + operating-points = < > + /* KHz uV */ > + 816000 1000000 > + >; Why not operating-points-v2? > + #cooling-cells = <2>; /* min followed by max */ > + }; > + > + cpu1: cpu@f01 { > + device_type = "cpu"; > + compatible = "arm,cortex-a7"; > + reg = <0xf01>; > + }; > + > + cpu2: cpu@f02 { > + device_type = "cpu"; > + compatible = "arm,cortex-a7"; > + reg = <0xf02>; > + }; > + > + cpu3: cpu@f03 { > + device_type = "cpu"; > + compatible = "arm,cortex-a7"; > + reg = <0xf03>; > + }; > + }; > + > + timer { > + compatible = "arm,armv7-timer"; > + interrupts = , > + ; > + arm,cpu-registers-not-fw-configured; > + clock-frequency = <24000000>; > + }; > + > + xin24m: oscillator { > + compatible = "fixed-clock"; > + clock-frequency = <24000000>; > + clock-output-names = "xin24m"; > + #clock-cells = <0>; > + }; > + > + pmu: syscon@100a0000 { > + compatible = "rockchip,rk3128-pmu", "syscon", "simple-mfd"; > + reg = <0x100a0000 0x1000>; > + }; > + > + gic: interrupt-controller@10139000 { > + compatible = "arm,cortex-a7-gic"; > + reg = <0x10139000 0x1000>, > + <0x1013a000 0x1000>, > + <0x1013c000 0x2000>, > + <0x1013e000 0x2000>; > + interrupts = ; f04 looks like a mask, so use standard defines for it. > + interrupt-controller; > + #interrupt-cells = <3>; > + #address-cells = <0>; > + }; > + > + usb_otg: usb@10180000 { > + compatible = "rockchip,rk3128-usb", "rockchip,rk3066-usb", "snps,dwc2"; > + reg = <0x10180000 0x40000>; > + interrupts = ; > + clocks = <&cru HCLK_OTG>; > + clock-names = "otg"; > + dr_mode = "otg"; > + phys = <&usb2phy_otg>; > + phy-names = "usb2-phy"; > + status = "disabled"; > + }; > + > + usb_host_ehci: usb@101c0000 { > + compatible = "generic-ehci"; > + reg = <0x101c0000 0x20000>; > + interrupts = ; > + phys = <&usb2phy_host>; > + phy-names = "usb"; > + status = "disabled"; > + }; > + > + usb_host_ohci: usb@101e0000 { > + compatible = "generic-ohci"; > + reg = <0x101e0000 0x20000>; > + interrupts = ; > + phys = <&usb2phy_host>; > + phy-names = "usb"; > + status = "disabled"; > + }; > + > + sdmmc: mmc@10214000 { > + compatible = "rockchip,rk3128-dw-mshc", "rockchip,rk3288-dw-mshc"; > + reg = <0x10214000 0x4000>; > + interrupts = ; > + clocks = <&cru HCLK_SDMMC>, <&cru SCLK_SDMMC>, > + <&cru SCLK_SDMMC_DRV>, <&cru SCLK_SDMMC_SAMPLE>; > + clock-names = "biu", "ciu", "ciu-drive", "ciu-sample"; > + dmas = <&pdma 10>; > + dma-names = "rx-tx"; > + fifo-depth = <256>; > + max-frequency = <150000000>; > + resets = <&cru SRST_SDMMC>; > + reset-names = "reset"; > + status = "disabled"; > + }; > + > + sdio: mmc@10218000 { > + compatible = "rockchip,rk3128-dw-mshc", "rockchip,rk3288-dw-mshc"; > + reg = <0x10218000 0x4000>; > + interrupts = ; > + clocks = <&cru HCLK_SDIO>, <&cru SCLK_SDIO>, > + <&cru SCLK_SDIO_DRV>, <&cru SCLK_SDIO_SAMPLE>; > + clock-names = "biu", "ciu", "ciu-drive", "ciu-sample"; > + dmas = <&pdma 11>; > + dma-names = "rx-tx"; > + fifo-depth = <256>; > + max-frequency = <150000000>; > + resets = <&cru SRST_SDIO>; > + reset-names = "reset"; > + status = "disabled"; > + }; > + > + emmc: mmc@1021c000 { > + compatible = "rockchip,rk3128-dw-mshc", "rockchip,rk3288-dw-mshc"; > + reg = <0x1021c000 0x4000>; > + interrupts = ; > + clocks = <&cru HCLK_EMMC>, <&cru SCLK_EMMC>, > + <&cru SCLK_EMMC_DRV>, <&cru SCLK_EMMC_SAMPLE>; > + clock-names = "biu", "ciu", "ciu-drive", "ciu-sample"; > + dmas = <&pdma 12>; > + dma-names = "rx-tx"; > + fifo-depth = <256>; > + max-frequency = <150000000>; > + resets = <&cru SRST_EMMC>; > + reset-names = "reset"; > + status = "disabled"; > + }; > + > + nfc: nand-controller@10500000 { > + compatible = "rockchip,rk3128-nfc", "rockchip,rk2928-nfc"; > + reg = <0x10500000 0x4000>; > + interrupts = ; > + clocks = <&cru HCLK_NANDC>, <&cru SCLK_NANDC>; > + clock-names = "ahb", "nfc"; > + pinctrl-names = "default"; > + pinctrl-0 = <&flash_ale &flash_bus8 &flash_cle &flash_cs0 > + &flash_dqs &flash_rdn &flash_rdy &flash_wrn>; > + status = "disabled"; > + }; > + > + cru: clock-controller@20000000 { > + compatible = "rockchip,rk3128-cru"; > + reg = <0x20000000 0x1000>; > + clocks = <&xin24m>; > + clock-names = "xin24m"; > + rockchip,grf = <&grf>; > + #clock-cells = <1>; > + #reset-cells = <1>; > + assigned-clocks = <&cru PLL_GPLL>; > + assigned-clock-rates = <594000000>; > + }; > + > + grf: syscon@20008000 { > + compatible = "rockchip,rk3128-grf", "syscon", "simple-mfd"; > + reg = <0x20008000 0x1000>; > + #address-cells = <1>; > + #size-cells = <1>; > + > + usb2phy: usb2phy@17c { Node names should be generic. https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation > + compatible = "rockchip,rk3128-usb2phy"; > + reg = <0x017c 0x0c>; > + clocks = <&cru SCLK_OTGPHY0>; > + clock-names = "phyclk"; > + clock-output-names = "usb480m_phy"; > + #clock-cells = <0>; > + status = "disabled"; > + Best regards, Krzysztof