Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp808765rwi; Wed, 19 Oct 2022 03:17:12 -0700 (PDT) X-Google-Smtp-Source: AMsMyM51kmeYdIWE41F7DenCSXIfdqt02VRQRT6Evtni4weubc+hCwLvPopNJ4j44epeABAUYLTW X-Received: by 2002:a05:6402:550e:b0:456:f79f:2bed with SMTP id fi14-20020a056402550e00b00456f79f2bedmr6807491edb.106.1666174632203; Wed, 19 Oct 2022 03:17:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666174632; cv=none; d=google.com; s=arc-20160816; b=zhWpuJ9FwsY4IQFzylQw+DPTemQXLo9yS2lMFns2kAcUESYJpk+/QQgIlCc32+HqXe rUNfHe+LBFTvg7mQMmsCZga+2SVVI3E/BcWa6s2FhleWnwB/XPUXdNIv4ETW8ZMk9fd1 iFwv1I86veGrpWIJ00Lr4J0J4yqDjQjihcCR2jDigI4mMU+PMe4zWzGavlTi8exHUmxW KGr7We4ht+yXro34ghXEvPGTwoSDKkU9zL4RlHFxGuyJpxPEmtqfNdjWtY4bV6nb8vI4 12rG7DmP73wIbY5Uegh3dWVNgOBubUgA+uE9RJh+QvhPH5FjIVcxyzOYauwpk/CnRLzT Ki8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=KobsHyGANbFa8+8k5RVDCdAt+Nbw4Ay7kiqM3abJQZw=; b=X0f7Fm1Jf+u/eAbChHFOzouL409BQaB6nK/jlPRAic06nR8cnV9Co3v5rPyz0OJ5Vo htrOxgFdUMLk6qEjk8QSwJMW+DrNVa3AzkugpqNoW/nQN6KVhODWBohSadatYOjl4Rw5 KqN7pTJKjyRuBZ7rsSq1frke39W/jktP9wZLkshu+C05YY0kB18x4IltL3ndEPsX9fln 8Luof2dI4B10xQPsrQQ2EWs4rxAta2GjobEC8B7MKv98eKeuWP0oLCbO3LTXQWyOmk8D cBV9NxjtS/DUJZtEn5nH1kCGwv+Efg9ZDTD1IY2VS8S3ThPJ6LuV2Lypq2jS7jEo9gAB yBSw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=sntech.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d6-20020a170906c20600b0078d27c1c8f4si11299919ejz.696.2022.10.19.03.16.46; Wed, 19 Oct 2022 03:17:12 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=sntech.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234129AbiJSJpj convert rfc822-to-8bit (ORCPT + 99 others); Wed, 19 Oct 2022 05:45:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235099AbiJSJmN (ORCPT ); Wed, 19 Oct 2022 05:42:13 -0400 Received: from gloria.sntech.de (gloria.sntech.de [185.11.138.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CEFA5D7E07; Wed, 19 Oct 2022 02:19:07 -0700 (PDT) Received: from p508fdae2.dip0.t-ipconnect.de ([80.143.218.226] helo=phil.localnet) by gloria.sntech.de with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ol5C7-0004cp-PN; Wed, 19 Oct 2022 11:16:59 +0200 From: Heiko Stuebner To: Robin Murphy , Uwe =?ISO-8859-1?Q?Kleine=2DK=F6nig?= Cc: Johan Jonker , thierry.reding@gmail.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, sebastian.reichel@collabora.com, wxt@rock-chips.com, kever.yang@rock-chips.com, linux-pwm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH v1 2/2] ARM: dts: rk3288: add the interrupts property for PWM Date: Wed, 19 Oct 2022 11:16:58 +0200 Message-ID: <5883380.DvuYhMxLoT@phil> In-Reply-To: <20221019072621.lh5hcznggbcscihf@pengutronix.de> References: <6eba6c10-9c96-b40f-937a-e02d43b04cd7@gmail.com> <7ae39c9c-8424-8b65-ac09-c0e87f3b0f01@arm.com> <20221019072621.lh5hcznggbcscihf@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="iso-8859-1" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS, T_SPF_HELO_TEMPERROR 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 Am Mittwoch, 19. Oktober 2022, 09:26:21 CEST schrieb Uwe Kleine-K?nig: > On Thu, Sep 29, 2022 at 04:50:43PM +0100, Robin Murphy wrote: > > On 2022-09-29 15:04, Johan Jonker wrote: > > > The Rockchip rk3288 SoC has 4-built-in PWM channels. > > > > > > Configurable to operate in capture mode. > > > Measures the high/low polarity effective cycles of this input waveform > > > Generates a single interrupt at the transition of input waveform polarity > > > > > > Configurable to operate in continuous mode or one-shot mode. > > > One-shot operation will produce N + 1 periods of the waveform, > > > where N is the repeat counter value, and generates a single interrupt at > > > the end of operation. > > > Continuous mode generates the waveform continuously and > > > do not generates any interrupts. > > > > > > Add interrupts property to rk3288 PWM nodes. > > > > As far as I can make out from the TRM, these are only valid when > > GRF_SOC_CON2[0] = 0, otherwise it's in "new" RK_PWM mode using SPI 78 for > > all channels. Which apparently will be the case for anyone using upstream > > U-Boot: > > > > https://source.denx.de/u-boot/u-boot/-/blob/master/arch/arm/mach-rockchip/rk3288/rk3288.c#L83 > > Huh, so it depends on a (software) setting which irqs are in use? In the past when Rockchip swapped one IP block for another they often had both in a soc for one generation (as a safeguard probably) So the rk3288 has two different pwm implementations and the GRF register selects which one is active. Heiko > So the > patch isn't correct as is, but I have no idea how to make it right. > Should we rely on the bootloader to fixup the dtb correctly? > > Anyhow, I'm marking the patch as 'changes-requested' in our patchwork > instance. > > Best regards > Uwe > >