Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2161850pxb; Mon, 12 Apr 2021 16:30:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfCrelCGDtDATht7oH2WIhN0lwoj86OKKm3fBNHPza4ci8v4Mne2RZzxLYIgOFb1Q/Hryc X-Received: by 2002:a62:a215:0:b029:244:b6ae:680 with SMTP id m21-20020a62a2150000b0290244b6ae0680mr21460303pff.7.1618270220835; Mon, 12 Apr 2021 16:30:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618270220; cv=none; d=google.com; s=arc-20160816; b=bXKUTdl2yRYk9dG5I61RsdG76IPBTVhK5Lg4MLIUgUEh39YVs4NLdw+EnHhUiKRG7m UDo9gPe3yj0qSMVXsZLu7SgH5NJqDlF6yIPRFetjDOWrUhm1NFmblYABHeC4YBlTd2bj e8EIsYPtQ8lbhzEkDGMfXSYwgUe2sV5hzYRo37WY0PHJ1KBuHq7Y95Hq9E1omd4HNsA6 CrsYVwxgCNNslyEEJ5MMy9wxvIqVkd96fMPQIJBTXouvJurNx83f+MkRfuyVLo3rIZMJ pPEhEhaOy4qCmTUakNOCI0poOpxVtRo2Qgic7swnF5M/tKS0zKlNtzmuEZEGLyDzLr4Q SE3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:reply-to :in-reply-to:references:mime-version:dkim-signature; bh=SR/PxIXoVKr0sQJJrL2BdCG9aZFeEpbl6WMAwf8j2Fg=; b=0HcFmOoGd2KNebr5GJxxTfTjnAnUP0NKKYv2Kb7DNmePIX8rcwweXzK5WHo8LD9cUb d6lnnQ5vFpWQe14konCCtYxpwhJKWw6LpNAULiaHKbIdknCvxiulo3N0pGRdNDWDEkC5 TxWExNRSMLH2tSyOK3GznfX8RiqOVc74jV0tRRuEn1XkGvFzs/PTrBo+9iV0hyAXuvkd qydBDrBGksBGme+qAIrsofrtzXRHMTI8/ktvmhxFSjT4j2VeBqzBXTwWqMtxyF1B1IES PfLVFbjwThiv8bEu5s+NrIoURlj2p4XCf62Tr+9x9xXeXkYBGsTfVibAr0PKyustV0q0 zf6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=X7jWGalE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l33si15033385pgb.311.2021.04.12.16.30.08; Mon, 12 Apr 2021 16:30:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=X7jWGalE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239218AbhDLKdg (ORCPT + 99 others); Mon, 12 Apr 2021 06:33:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:47320 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238132AbhDLKdf (ORCPT ); Mon, 12 Apr 2021 06:33:35 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2F59061249; Mon, 12 Apr 2021 10:33:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618223597; bh=DI6Y5IaDG396+b13BKUebb20otLOdsYhFeHZfaDT9V4=; h=References:In-Reply-To:Reply-To:From:Date:Subject:To:Cc:From; b=X7jWGalE6o9E2WtBf29/CWgdQzpRBMTYxl+EbeZ2PjRhAHFbdbilQ48tXTFEzRnLP io3b5/xS/UQrSSGZ0uEH4LRw7+wm/iU1USYSmJbGajL71TGEg7ZO/vGl1zsgX8mj9v p6RBJDntm/0rpFYQSBjV8yGPZmEAjjt5LGIC2noL4X738OyZuH5UjSYnZ1t+174++H uPxyuHpwhH91Q2EFDsDJYeXsWsiE5yi3d81jPKLk1G6W/kU2lg0AJZhaR2Mc1w/EcU 5F3CtPzWmSDLaO4+vIUk2tHTRoJqe24m0gszc85b5Yq3vQgOBy/TXImag0KzyxLQxC yc4uEBdiwzxKA== Received: by mail-lj1-f175.google.com with SMTP id u20so14709292lja.13; Mon, 12 Apr 2021 03:33:17 -0700 (PDT) X-Gm-Message-State: AOAM531OcGEsnjf3mV2HGbiOV3FnKYDITbPa0pabk1g/Ug0W+OH69S8R bB03h8FHzAANaP3x9kIc0e3ijbnmP5d15fru+c0= X-Received: by 2002:a2e:7d04:: with SMTP id y4mr18002872ljc.94.1618223595500; Mon, 12 Apr 2021 03:33:15 -0700 (PDT) MIME-Version: 1.0 References: <20210411131007.21757-1-jbx6244@gmail.com> <20210411131007.21757-3-jbx6244@gmail.com> <31b5ff50-afe5-b446-7d3c-943d148814d8@gmail.com> In-Reply-To: <31b5ff50-afe5-b446-7d3c-943d148814d8@gmail.com> Reply-To: wens@kernel.org From: Chen-Yu Tsai Date: Mon, 12 Apr 2021 18:33:03 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 3/6] ARM: dts: rockchip: remove interrupts properties from pwm nodes rv1108.dtsi To: Johan Jonker Cc: =?UTF-8?Q?Heiko_St=C3=BCbner?= , Rob Herring , Thierry Reding , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , Lee Jones , linux-pwm@vger.kernel.org, devicetree , linux-arm-kernel , "open list:ARM/Rockchip SoC..." , linux-kernel Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 12, 2021 at 6:03 PM Johan Jonker wrote: > > On 4/12/21 5:15 AM, Chen-Yu Tsai wrote: > > On Sun, Apr 11, 2021 at 9:11 PM Johan Jonker wrote: > >> > >> A test with the command below gives this error: > >> > >> /arch/arm/boot/dts/rv1108-evb.dt.yaml: > >> pwm@10280000: 'interrupts' does not match any of the regexes: > >> 'pinctrl-[0-9]+' > >> > >> "interrupts" is an undocumented property, so remove them > >> from pwm nodes in rv1108.dtsi. > >> > >> make ARCH=arm dtbs_check > >> DT_SCHEMA_FILES=Documentation/devicetree/bindings/pwm/pwm-rockchip.yaml > >> > >> Signed-off-by: Johan Jonker > > > > Given that the interrupts were specified, meaning they are wired up in hardware, > > shouldn't the solution be to add the interrupts property to the binding instead? > > > > After all, the device tree describes the actual hardware, not just what the > > implementations need. > > > > ChenYu > > > > Hi, > > The question of what to do with it was asked in version 1, but no answer > was given, so I made a proposal. > The device tree description should be complete, but also as lean as > possible. If someone manages to sneak in undocumented properties without > reason then the ultimate consequence should be removal I think. > > Not sure about the (missing?) rv1108 TRM, but for rk3328 the interrupt > is used for: > > PWM_INTSTS 0x0040 W 0x00000000 Interrupt Status Register > Channel Interrupt Polarity Flag > This bit is used in capture mode in order to identify the > transition of the input waveform when interrupt is generated. > Channel Interrupt Status > Interrupt generated > > PWM_INT_EN 0x0044 W 0x00000000 Interrupt Enable Register > Channel Interrupt Enable > > Is there any current realistic use/setup for it to convince rob+dt this > should be added to pwm-rockchip.yaml? Well, the PWM core has capture support, and pwm-sti implements it with interrupt support, so I guess there's at least a legitimate case for adding that to the binding. Whether someone has an actual use case for it and adds code to implement it is another story. > The rk3328 interrupt rkpwm_int seems shared between channels, but only > included to pwm3. What is the proper way for that? I guess the bigger question is why was the PWM controller split into four device nodes, instead of just one encompassing the whole block. Now we'd have to introduce a new binding to support capture mode and interrupts. In that case I agree with dropping the interrupts for now, as it just won't fit. But I would add this additional information to the commit message. Regards ChenYu