Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp423222yba; Sat, 13 Apr 2019 04:35:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqxTj7XOIL9/GHS7i97VRmYicdRWUrYCI1FlS12PG2sGtWXAnUA/Hls8iZh2LD26mft4o7BM X-Received: by 2002:aa7:90ca:: with SMTP id k10mr62998821pfk.144.1555155300067; Sat, 13 Apr 2019 04:35:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555155300; cv=none; d=google.com; s=arc-20160816; b=goomJBcV7q8IF6eDCM789V+v4BiqsXt5IwbfuFgI50wA9hn3B7qLeLh34t9aoFoP8Q CL0Jez4aRorYKZ7A5k6LXhgnKepMHigBfWmdJmxymxJyimjGgGlEc3APkoSf48j7kZzn 0Q/2mpnkCDFzpkwGvDCT60cTbOFtP2WDol/mE5jxZnOEZhljr0n8EkzK5VKK1/c3Ze0t 1Oeq5pIZjurs8rPepuVJG2Cz2CzM9MhO86zDJO53FeRezRqbgMNQrlHhzx/LEptcfdJ8 bMA5XVxyG+26TGcaZS9FTn30kbQWdte2bV0tkrvT/DhigySbnNaugDi+ZmP8YpB/n0sJ derw== 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 :in-reply-to:references:mime-version:dkim-signature; bh=fNWzVu94jtQ2U8ecDCU7aYXiQ4YbXT+d1pdYft4GMaU=; b=IuZuUxajDy/Es/g23MthYQb6Dz3BHN5MXL/9ttW5+0818pCL/jQu2zRNF7a8nblSjn iWua9R/JXKXHlCZkBwFkcTqyqXuvv2AePOPdOnUmuAd/bvs+ikHPDjIzmQBPPSxWMv+L FAhGNX03Yuasaa7ebYUerJm7JMS80ukjI368vIG4yUbQIesuc8Qj6XhjVTqREvYOixFT y45pHIarAG4t56Rf/AO3rR3z3VSpkGNX3X5atrXBQuqWPjj7sP1Y5L+zxU51L+sb7Wee iAjLwCDdBrVyJwN51yaKXpmKdECriTDtlLsK/SPoQb5/zM9I9+EotmpBKDGJKQ7qWNON zE5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b=Wxm2Vrqa; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s4si37622464plp.59.2019.04.13.04.34.28; Sat, 13 Apr 2019 04:35:00 -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=pass header.i=@googlemail.com header.s=20161025 header.b=Wxm2Vrqa; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727011AbfDMLd0 (ORCPT + 99 others); Sat, 13 Apr 2019 07:33:26 -0400 Received: from mail-ot1-f65.google.com ([209.85.210.65]:41339 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726417AbfDMLd0 (ORCPT ); Sat, 13 Apr 2019 07:33:26 -0400 Received: by mail-ot1-f65.google.com with SMTP id 64so10625631otb.8; Sat, 13 Apr 2019 04:33:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fNWzVu94jtQ2U8ecDCU7aYXiQ4YbXT+d1pdYft4GMaU=; b=Wxm2Vrqa9RDezfjYu2xSEpPLuHl7g9vkTihGAQ1PNm3CA/QWErU8Dll8Z7giuMgR9Y wDjBUDN4fytU+Q7NL7GDPqVLAX6MPVKvSJGYYK6Ql0nji+AA7ArEcRp6gL9QO5FWi+OK ZfKhQG1OYyEFxf385Q97bGIUAS/wcSY7oz3Bz0TfM3R6BJhnSws5Ru+JkCajxcm8UcQ3 gEE4b5KZEWnp4LmQLzeDz4saagJ28VCzJCVFigisDmI5awDDVYOb6QHXnttwd34Au61F kq+UZ6mwiq82IzsaSr3//H5JCOUW77ikRMBxXYHkEi1RYpFVHSRM54wiJmOokW/GefkQ FE7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fNWzVu94jtQ2U8ecDCU7aYXiQ4YbXT+d1pdYft4GMaU=; b=ttbKDbaZ+MDKhMv7rDoHIkYFmeUKWvc7C+oIEPLOijuJOJiZS69GvgUWJBjtQ+X3sF ahtEVhgWEjaCL20XfAIVcbawbg2aFdW91J/FfUO2pOkEUzJ9DeteoV/1ZuCsa0SD5Vsn 5TWI2VktHhqlHj0aZMeczsMMydxpdhLCJMX2omGhEkyZn4NG5ORjWP1lsCYTUQz0YA3O UK/Zjba3ZhfNaOVteU88+nHKBH2QNTWQv+qPopZ2jnrqcL2K+ghkKgQEJ79KUaM8mT5z dZhyugS8bDtZL1Cj1MuHa1WalUwTUBLbDUbs2d+NITlLGnkl6nCv4uIOv4WDx/4HttNF G/xw== X-Gm-Message-State: APjAAAUPhsdzIua6YQQ1v1Z79oYi9BHu1/bnAeTHW/suzR7RPiYXDIzp YWFiUqwYYg+Nf21A1BjGgoHw7AJy41EVDwGoDhI= X-Received: by 2002:a9d:7856:: with SMTP id c22mr18040111otm.261.1555155205236; Sat, 13 Apr 2019 04:33:25 -0700 (PDT) MIME-Version: 1.0 References: <20190412092337.6941-1-narmstrong@baylibre.com> <20190412092337.6941-3-narmstrong@baylibre.com> In-Reply-To: <20190412092337.6941-3-narmstrong@baylibre.com> From: Martin Blumenstingl Date: Sat, 13 Apr 2019 13:33:14 +0200 Message-ID: Subject: Re: [PATCH 2/3] pwm: meson: Add clock source configuration for Meson G12A To: Neil Armstrong Cc: thierry.reding@gmail.com, linux-pwm@vger.kernel.org, baylibre-upstreaming@groups.io, linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.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 Hi Neil, On Fri, Apr 12, 2019 at 11:24 AM Neil Armstrong wrote: > > For PWM controller in the Meson G12A SoC, the EE domain and AO domain > have different clock sources. This patch tries to describe them in the > DT compatible data. > > Signed-off-by: Neil Armstrong > --- > drivers/pwm/pwm-meson.c | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) > > diff --git a/drivers/pwm/pwm-meson.c b/drivers/pwm/pwm-meson.c > index 2b03938039b6..46287cc8a0eb 100644 > --- a/drivers/pwm/pwm-meson.c > +++ b/drivers/pwm/pwm-meson.c > @@ -434,6 +434,15 @@ static const struct meson_pwm_data pwm_axg_ao_data = { > .num_parents = ARRAY_SIZE(pwm_axg_ao_parent_names), > }; > > +static const char * const pwm_g12a_ee_parent_names[] = { > + "xtal", "hdmi_pll", "fclk_div4", "fclk_div3" > +}; > + > +static const struct meson_pwm_data pwm_g12a_ee_data = { > + .parent_names = pwm_g12a_ee_parent_names, > + .num_parents = ARRAY_SIZE(pwm_g12a_ee_parent_names), > +}; > + > static const struct of_device_id meson_pwm_matches[] = { > { > .compatible = "amlogic,meson8b-pwm", > @@ -455,6 +464,14 @@ static const struct of_device_id meson_pwm_matches[] = { > .compatible = "amlogic,meson-axg-ao-pwm", > .data = &pwm_axg_ao_data > }, > + { > + .compatible = "amlogic,meson-g12a-ee-pwm", > + .data = &pwm_g12a_ee_data > + }, the PWM part is fine for me > + { > + .compatible = "amlogic,meson-g12a-ao-pwm", > + .data = &pwm_axg_ao_data > + }, > {}, but I'm not sure about "amlogic,meson-g12a-ao-pwm": the public S922X datasheet from Hardkernel [0] section 6.6.1.2 "AO Clock Tree" (page 107) mentions two different clock sources for the AO PWMs: - AO PWM A and B has parents xtal, aoclk81, fclk_div4 and fclk_div5 (pwm_axg_ao_data has the first two parents swapped) - AO PWM C and D only have xtal and aoclk81 as parents regarding the clock parents: I'm not sure whether pwm_axg_ao_data is wrong, G12A is different from G12B or the G12B datasheet is "correct". can you please list what you have tested so far and confirm that the parents you are using are "correct" regarding the compatible string "amlogic,meson-g12a-ao-pwm": if there are two different AO PWM modules, should we name it differently, for example by splitting this compatible string into: - "amlogic,meson-g12a-ao-pwm-ab" (with parents: xtal, aoclk81, fclk_div4 and fclk_div5) - "amlogic,meson-g12a-ao-pwm-cd" (with parents: xtal and aoclk81) Regards Martin [0] https://dn.odroid.com/S922X/ODROID-N2/Datasheet/S922X_Public_Datasheet_V0.2.pdf