Received: by 10.213.65.68 with SMTP id h4csp1602739imn; Mon, 19 Mar 2018 08:29:39 -0700 (PDT) X-Google-Smtp-Source: AG47ELuieiCO07BKf036L7XS1iLauVn0DPXx8xdxr7MXX0uuJqeebyEBbFppdf4JQp5/sFV4dHnz X-Received: by 10.98.178.207 with SMTP id z76mr1092765pfl.37.1521473379479; Mon, 19 Mar 2018 08:29:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521473379; cv=none; d=google.com; s=arc-20160816; b=h1Y3Mz39m/IE2jgllxLIKxO66/trBA4Yr0wIwsMBPToqQDb1QtGf6e22cb6/pOVpdb yq7E2FGpMN2/FKa5l5Md3Hqk5uQuj/3ALF79KKnEZQ0JxyZ5hwg4855jb5QnBg7ShDRT FQTmDUApMvdRC5ds1txz7QaEeWUc8U5qZNDjWIhL1BaYqip3as5FL7XOHMBAlasqs9BP 5pCKqaHuiz/RPMu0nZemE9JMiKZGF4TspvUAR8yCBCU3n1CoDO81typw59dxxTGTHpO+ U0Z81rLZILSTJEh9Li4AH6TKZSBvhKL76hE0yQaM3TE7+JhV4WVpct77AyDZ3csQQnNU J0bQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=fw8/ZZA419iHTPhVHa2muMAGVfmFvAVmnC7nj3htZ3I=; b=CQ5UJCSzmCPv6+hVtRYk+y98lYMWa9J7AHyKm0yk2owoFIY7+09FRJkUxPCK4d+LTm ucEAviyspDlHfvuBXdIIRYA+bk6ek7Koj+6ziN/WArkMt4QI0ooJ/kqOUvkCCeiCPkii Iqc95baZPtyZywluocB+V9pCtJbnkeezi6rKtDDMY3n1iv8S09rhC0BT+mZUijqo03NL MCYO4BLzutBWRwPnLXFQlkrFfNrHNOy616AbDi+/e3P9wNag0AnwzPvsP1RJzp5ubF0d nZY6R0rZSQH1JVbLkkCpi+xOmU6ySFZUijd5AvA6OIYtMuuiruo3cKCuGuyVtQcP4nD2 EK9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=Rhh0wniZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h1si141167pfn.266.2018.03.19.08.29.25; Mon, 19 Mar 2018 08:29:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=Rhh0wniZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755880AbeCSP2N (ORCPT + 99 others); Mon, 19 Mar 2018 11:28:13 -0400 Received: from mail-it0-f66.google.com ([209.85.214.66]:40502 "EHLO mail-it0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755773AbeCSP2F (ORCPT ); Mon, 19 Mar 2018 11:28:05 -0400 Received: by mail-it0-f66.google.com with SMTP id y20-v6so10782810itc.5; Mon, 19 Mar 2018 08:28:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=fw8/ZZA419iHTPhVHa2muMAGVfmFvAVmnC7nj3htZ3I=; b=Rhh0wniZVmE/NFCVZCymHUwlX6fCUxhm46JD1A+nft3pPIlkgl5PU0sOjqMwUdl9dJ wtfBdSy3jah8peR98QAlLlHmW/8vkk9fRKc6QhQ610XBXyo0fHPt3jL0RM7cpIFa4nwV aufXoR2Yg5LUT8iBcm4Q4cffWKfVJuRcHWZ1UKsk95pp95j1IJXeg9+zupZS2ap3X1nB ATSLad36Hxix4q/42fOoejKwIoDjmDFRBDsR5bE+ANUTJKX7oiKWEI5/F3Z79bgocvhU sihzGNYgxGTg1P/xwOOEhboZobiXfTxcPOuBPHml5cT6kJuBMzCrOWyKV/9ho+C3d7nl UmKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=fw8/ZZA419iHTPhVHa2muMAGVfmFvAVmnC7nj3htZ3I=; b=LW/jWZHLuOx5McfQ+6bqm7rK2sVj0ujBI0d5br0OCpt+QE53F5InDLDXnnQqXvKvbv YAXGRsYZkccqOQlbToVUutNSL59HLM/JLSDVPNT7YkB5cei3a7yNhSrvJMrqlVxM/P4N JpIEf4FKwBkaWlB1TzMHqvrcLZ4R2caYG+U0C58sdfYxebeUCyvxWyHVaCaP+AAN/w2m 39WE58fX2y6Vb9clSo/mC5CVph8a2BLB0f6OITxQFkIJ1MWTPfbbFnofKUQJ4r4GsMNm 2Q4WfPs6emU6HtMBLgRR0t4glcAt7uduRHNR5xT8bdVE0u/IU1sK3oE/miFlHfTM39zX W05g== X-Gm-Message-State: AElRT7FSeKg7fnIBHlTEZM5965k9wSTFujisuPNVQBaoFm1dsCIq4+Kz /cbLWFgmV127uQ6OmMCtH3b/UpdDIQBqj05tK8I= X-Received: by 2002:a24:30c1:: with SMTP id q184-v6mr12234638itq.54.1521473284140; Mon, 19 Mar 2018 08:28:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.79.34.71 with HTTP; Mon, 19 Mar 2018 08:28:03 -0700 (PDT) In-Reply-To: References: From: Arnd Bergmann Date: Mon, 19 Mar 2018 23:28:03 +0800 X-Google-Sender-Auth: no3h05YwrL6maGiq1U_bVcgUR7k Message-ID: Subject: Re: [PATCH 16/19] csky: Device tree To: Guo Ren Cc: linux-arch , Linux Kernel Mailing List , Thomas Gleixner , Daniel Lezcano , Jason Cooper , c-sky_gcc_upstream@c-sky.com, gnu-csky@mentor.com, thomas.petazzoni@bootlin.com, wbx@uclibc-ng.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 19, 2018 at 3:51 AM, Guo Ren wrote: > Signed-off-by: Guo Ren Please add a changelog text to each patch, and send patches that add .dts files or binding documents to the devicetree mailing list. > --- > arch/csky/boot/dts/gx6605s.dts | 159 +++++++++++++++++++++++++++++++++ > arch/csky/boot/dts/include/dt-bindings | 1 + > arch/csky/boot/dts/qemu.dts | 87 ++++++++++++++++++ > 3 files changed, 247 insertions(+) > create mode 100644 arch/csky/boot/dts/gx6605s.dts > create mode 120000 arch/csky/boot/dts/include/dt-bindings > create mode 100644 arch/csky/boot/dts/qemu.dts > > diff --git a/arch/csky/boot/dts/gx6605s.dts b/arch/csky/boot/dts/gx6605s.dts > new file mode 100644 > index 0000000..0d34d22 > --- /dev/null > +++ b/arch/csky/boot/dts/gx6605s.dts > @@ -0,0 +1,159 @@ > +/dts-v1/; > +#include > +#include It is usually better for an SoC based board to split the SoC specific into a separate .dtsi file that gets included by the board .dts file. > +/ { > + model = "Nationalchip gx6605s ck610"; > + compatible = "nationalchip,gx6605s,ck610"; Is ck610 the name of the CPU core? The general convention is to have the top-level "compatible" property list first the name of the board, then the name of the soc, but not the name of the CPU core. > + #address-cells = <1>; > + #size-cells = <1>; > + > + memory { > + device_type = "memory"; > + reg = <0x10000000 0x04000000>; > + }; > + > + cpus { > + #address-cells = <0>; > + #size-cells = <0>; > + > + cpu { > + device_type = "cpu"; > + ccr = <0x7d>; > + hint = <0x1c>; Here you should list the specific type of CPU in the compatible property and document the binding for that string in the Documentations/devicetree/bindings hierarchy. Without a binding, the 'ccr' and 'hint' properties make no sense. If there is any chance that you could have SMP systems in the future, it would be better to start with #address-cells=<1>, with appropriate reg properties. > + soc { > + #address-cells = <1>; > + #size-cells = <1>; > + compatible = "simple-bus"; > + ranges; > + > + intc: interrupt-controller { > + compatible = "nationalchip,intc-v1,ave"; > + reg = <0x00500000 0x400>; Each node with a register property also needs the address in the node name, e.g. "interrupt-controller@500000" Try building the dtb file with 'make W=1' to get warnings about when you got that wrong. > + interrupt-controller; > + #interrupt-cells = <1>; > + }; > + > + timer0 { > + compatible = "nationalchip,timer-v1"; This should be "timer@400" Also, each device node should have a binding documentation to explain the binding associated with that "compatible" string. > + reg = <0x0020a000 0x400>; > + clock-frequency = <1000000>; > + interrupts = <10>; > + interrupt-parent = <&intc>; > + }; > + > + ehci: ehci-hcd { > + compatible = "generic-ehci"; > + reg = <0x00900000 0x400>; > + interrupt-parent = <&intc>; > + interrupts = <59>; > + }; > + > + ohci0: ohci-hcd0 { The names here should be "usb@...", not "ehci-hcd" > + chosen { > + bootargs = "console=ttyS0,115200 rdinit=/sbin/init root=/dev/ram0"; > + }; The bootargs should not be in the dts file normally, they should come from the boot loader. For the console, use the "stdout-path" property. Arnd