From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B7517C11F68 for ; Fri, 2 Jul 2021 13:50:27 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8A5B36142B for ; Fri, 2 Jul 2021 13:50:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8A5B36142B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:Cc:To:Subject:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=KIrhqemXftVZKCJdKPRM0yWl/phc8++NEyQ2gOxE4/s=; b=zAm0LxFbQledJwcXvHBhbFtEMe dKj3WaZFSFRzV6B4ahG2IgFUauTibnYfqcuqXtzC/39M9A6+dE9E9uGEeHqCadDUL/AzcrhGjGxhZ +WgRxw5wLCdLuiaQ8g/XEOFuXk2dfAIgqdPURvy9oKkOdH2WYZMLAbeEtivhgSqYzqMslhosRyM65 LUXRL4ey76CFfif3i+YHY6uZb++8GPySopuUrBQSHbklxJEy7XdDjLYFOkCJDkNZTBD5wF/ReEnLu yWi0PQBun1XfkHABsrBOlV6BhMZBk8pkqkOemhWEjYmV3tjHzG5TuUMOc8FtmLl0nDPGHsrejzpCk 0mOOvAXw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lzJXF-003BXA-7Y; Fri, 02 Jul 2021 13:48:49 +0000 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lzJXA-003BUt-By for linux-arm-kernel@lists.infradead.org; Fri, 02 Jul 2021 13:48:46 +0000 Received: by mail-wr1-x432.google.com with SMTP id a8so875735wrp.5 for ; Fri, 02 Jul 2021 06:48:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:organization:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=dmdV5C0TPaZh38jwc22npxunHrSD6YlmILpaclb/0ko=; b=MMaK4fWwJ0vbQk/VXI4ucI0gpZ5rMsazWB7JlYgn8qFz2g7U7vIaZoCdRMNNTmBQ+B QG/HsfLU+K0cKJNZaN16m3SRn+5WQEmPVx97e1I0ZYsGKxi0o1gjjXkDimK7/vdY6XZ4 TxMKifvdwRulh4J8UjxgaWxj0irps6/o/rmbjojsBglcy5g9eGb8eQGp2J+yPuxCzGmK 2X8bx//QFTfi+eb50djSKk54h7N6+7O+rc9LxS8PZxJNAc8R0eLi8Y22ZJ4QgYcUdTk0 AkH9WyG5cA1ATdz5aAmf0/m5rnjQIx8DRZ05vQHPQeDZJvGExrcshvMhzdtym8nnumGk hxMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=dmdV5C0TPaZh38jwc22npxunHrSD6YlmILpaclb/0ko=; b=WKynCKH+mCE5d0EwGXQyxnziLZ5XmCnkW99Aeg+se4lzarLXPyrOYKlzbdeaq2wkXn XN2X/O5WKh35bgURmnJlc8CtewFQ3hc/Tu/zXxfU/qc9g4wuvXUPRNRKR1tVD8pf+Hlj /XgW0LmqjdZj1b/YoKZGNE8RNiFo++/6e+SAWQlhSZ86rnnMScTHTp48fvxAzVtHm9Wp eov08nFOvcaOVh50dbENjIEeeWh8uXFhGHSe0hxzVIao+FVEQXgIy2Bobk+haqABT61k TYiTOZDdlptER1103TPWAV+evv4m9k/1qz0iu/pTqsDvDEZ0X2/TQfUeJ3HHZ7SWHfPz c8qQ== X-Gm-Message-State: AOAM530m8W6RqKMaLiLwTfGclhpCX3XmUb7gKQzRnZxSS29uKPhWtCXl e04qwypUUUCTCTsdHdiZDvu1IA== X-Google-Smtp-Source: ABdhPJwnfiPmpsT0TFwceB+yNPe62xHEvP1eccHb9f8GwnwPkFvep/IzIg4oQ9IT0EKqsY3+JcJqaA== X-Received: by 2002:adf:ef50:: with SMTP id c16mr5998912wrp.137.1625233721485; Fri, 02 Jul 2021 06:48:41 -0700 (PDT) Received: from ?IPv6:2001:861:44c0:66c0:b194:a11e:9f1:225b? ([2001:861:44c0:66c0:b194:a11e:9f1:225b]) by smtp.gmail.com with ESMTPSA id s5sm3363652wrn.38.2021.07.02.06.48.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 02 Jul 2021 06:48:40 -0700 (PDT) Subject: Re: [PATCH 1/2] media: rc: meson-irblaster: document device tree bindings To: Martin Blumenstingl , Viktor Prutyanov Cc: sean@mess.org, mchehab@kernel.org, robh+dt@kernel.org, khilman@baylibre.com, jbrunet@baylibre.com, linux-media , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, rockosov@gmail.com References: <20210701215132.16317-1-viktor.prutyanov@phystech.edu> <20210701215132.16317-2-viktor.prutyanov@phystech.edu> From: Neil Armstrong Organization: Baylibre Message-ID: Date: Fri, 2 Jul 2021 15:48:39 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210702_064844_451201_5FF58B98 X-CRM114-Status: GOOD ( 36.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, On 02/07/2021 15:30, Martin Blumenstingl wrote: > Hi Viktor, > > On Thu, Jul 1, 2021 at 11:51 PM Viktor Prutyanov > wrote: >> >> This patch adds binding documentation for the IR transmitter >> available in Amlogic Meson SoCs. > This is an interesting piece of hardware where I've always wondered if > there is any device out there which supports this functionality.It > turns out that there is You did beat me, I started a driver some time ago but failed to finish debugging it... https://github.com/superna9999/linux/tree/amlogic/v5.2%2Fir-blaster > > [...] >> +description: | >> + Some Amlogic SoCs such as A311D and T950D4 have IR transmitter >> + (blaster) controller onboard. It is capable of sending IR signals >> + with arbitrary carrier frequency and duty cycle. >> + >> +properties: >> + compatible: >> + const: amlogic,meson-irblaster > if you feel like some registers or register values are specific to > A311D or T950D4 then please also add a SoC-specific compatible string > (for example: amlogic,meson-g12b-irblaster). > An example can be seen in > Documentation/devicetree/bindings/iio/adc/amlogic,meson-saradc.yaml AFAIK there is 2 versions of the IP, the "old" one we can find on Meson6, 8/8b, GXBB, GXL & GXM (and maybe AXG ?), and the one we find on the latest G12A, G12B & SM1. The SEI510 and SEI610 boards we use for Yukawa android port do have the necessary HW for IR sending, so I'll eventually be able to test. So, as martin says you should add a "amlogic,g12a-ir-blaster" to be sure we support the older ir blaster version correctly with the right bindings. Neil > > [...] >> + clocks: >> + minItems: 1 >> + maxItems: 2 >> + >> + clock-names: >> + minItems: 1 >> + maxItems: 2 > from my understanding there are two clock inputs to the hardware > dt-bindings should always describe the hardware, not what the driver > may (or may not) use. > based on that I think you should drop minItems (then minItems will > have the same value as maxItems) > > [...] >> + mod-clock: >> + oneOf: >> + - const: sysclk >> + - const: xtal > Does this "mod-clock" depend on something external to the IR blaster hardware? > If not this should be handled inside the driver only. > > From how I understand the register description in the datasheet > there's two clock inputs. > XTAL is internally divided further down with fixed dividers. > Then there's a configurable divider which is then used to generate the > IR signal. > If the sysclk (I assume that this is clk81 - or at least derived from > it) is "too fast" then the driver should just ignore that clock while > the dt-bindings should still describe it (see my comment above) > > [...] >> + meson-irblaster@ff80014c { > node names should be generic, see for example > Documentation/devicetree/bindings/spi/amlogic,meson6-spifc.yaml > (spifc is the name Amlogic has given this IP, but since node names are > supposed to be generic we use spi@...) > > However, I am not sure if an IR blaster would be described as > ir-blaster@... or simply ir@... > >> + compatible = "amlogic,meson-irblaster"; >> + reg = <0xff80014c 0x10>; >> + interrupts = <0 198 IRQ_TYPE_EDGE_RISING>; >> + clocks = <&clkc CLKID_CLK81 &xtal>; > [...] >> + clocks = <&clkc CLKID_CLK81 &xtal>; > while this works I think the recommended format is: > clocks = <&clkc CLKID_CLK81>, <&xtal> > > > Best regards, > Martin > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel