Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1817210imm; Thu, 23 Aug 2018 09:12:37 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwfpMwThFUyWcv+fxMqrRCDVwpcPMdhVLwQcI0BqVOsAuq1i9EA30wektOeOnZNzzsWj6iJ X-Received: by 2002:a62:3545:: with SMTP id c66-v6mr63044731pfa.63.1535040757849; Thu, 23 Aug 2018 09:12:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535040757; cv=none; d=google.com; s=arc-20160816; b=nvkVECDpzOvUSE9BMdz+6ZSJBTmAF5CT08cGb+Lp1jpiBy/xDXk7jsf2fGmfokDVci NyBxUziiIrFpmLSe1veQSFtvvArrdrNpFVWAsTdc9OrN7bX4i2fWAyjld0qK5P7bUtr9 ZdMcyBT08Oo0M55kNESJ4MceGCv/gZDEe21SmYh5YRfw5UIX0oYhJpQAe5VVyZpYnpLO gGU0iVaAIKcQtNVFem5YFLAgn9gQ5KSrqWGqB3FVuTeJy9JSXqaU/RyoXZURp1HsmFAU VcI0vRw6Q8bRc5QOviSyYBGqDFmK/qsYj3/VN5Sjz0jeY0sfIV9uHCxQwaPElrCIXfsa K+Uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:arc-authentication-results; bh=QXE1H2PWx8LJpMcHiRwH/L5/sCipKFkeQUhqLZxUx6A=; b=nYFfv+kIYrPJJ+vdbYQ3h7BvVvXG3k8l/NNDrFkG/MOMvrEtB1ertlP/EN6d/e7NxK W3XxM2obL+g6q4+r7UWp/gd4an/xvyPpPwRWEWaEFEu6m5av87qgAvijEBgErCB6WAsD o65PUHYATGsj9YPIR24My+ciPg0CCp2aDrkdhuVhbpGU+0GqCLsgMwLciM+iXE3hH0O6 vXTJfE+G1NWbrEYOUWSpIc8sWtoyuui7edf0RKObreXwiMqD0RPg4gwYNZvw3oEoUt73 S9peYD2mEM8kOAo8I3AjiLmpxeseSlydDiX0OJffRy8QdaAI6ypMUSuBq0Wke2RNOmlo ceLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ysoft.com header.s=selector1 header.b=LJdTJGKF; 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=NONE sp=NONE dis=NONE) header.from=ysoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u11-v6si4193228pgg.683.2018.08.23.09.12.22; Thu, 23 Aug 2018 09:12:37 -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=@ysoft.com header.s=selector1 header.b=LJdTJGKF; 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=NONE sp=NONE dis=NONE) header.from=ysoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729570AbeHWOu2 (ORCPT + 99 others); Thu, 23 Aug 2018 10:50:28 -0400 Received: from mail-eopbgr50067.outbound.protection.outlook.com ([40.107.5.67]:34183 "EHLO EUR03-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729387AbeHWOu1 (ORCPT ); Thu, 23 Aug 2018 10:50:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ysoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QXE1H2PWx8LJpMcHiRwH/L5/sCipKFkeQUhqLZxUx6A=; b=LJdTJGKFadL1GQy1ROy6E+pa5d7OfS4gQPw/FZUVxXADozDCKVxX7cZSYPYaFEDj0sAXl6e5u8QgqzegCSplUsfUW4xZ2YXjQWbnQLJ2Ej0R7zX1EskHqjsstVqS+oeibdAyFeozBGQmhLnCmfjQV3RZ4r3SHIC/a+fxsA8P4zQ= Received: from [10.1.8.111] (89.24.100.190) by AM6PR04MB4662.eurprd04.prod.outlook.com (2603:10a6:20b:1b::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1059.22; Thu, 23 Aug 2018 11:21:07 +0000 Subject: Re: [RFC PATCH 1/2] dt-bindings: pwm: imx: Allow switching PWM output between PWM and GPIO To: Lukasz Majewski Cc: Thierry Reding , Rob Herring , Mark Rutland , devicetree@vger.kernel.org, linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org, Fabio Estevam , =?UTF-8?Q?Lothar_Wa=c3=9fmann?= References: <1534862333-27950-1-git-send-email-michal.vokac@ysoft.com> <1534862333-27950-2-git-send-email-michal.vokac@ysoft.com> <20180823123759.68b78e9f@jawa> From: =?UTF-8?B?TWljaGFsIFZva8OhxI0=?= Message-ID: <0691e93d-c2e2-21e5-374f-c29e7765de93@ysoft.com> Date: Thu, 23 Aug 2018 13:21:04 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180823123759.68b78e9f@jawa> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [89.24.100.190] X-ClientProxiedBy: VI1P195CA0026.EURP195.PROD.OUTLOOK.COM (2603:10a6:802:5a::15) To AM6PR04MB4662.eurprd04.prod.outlook.com (2603:10a6:20b:1b::21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3ad3ff22-9da4-456e-5fa4-08d608ea8603 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:AM6PR04MB4662; X-Microsoft-Exchange-Diagnostics: 1;AM6PR04MB4662;3:PV4keWPEOz5lcGny5wJAQGL6jhWpf5DXAf+YaVEaofJTZ+HgrhZRq/W7BlITxQJoD1KPcitV4jxmzYrwdYhmWoShcMqSsodFDKPAQsstbhoRnfLUNW2gxpExfg3efMqgnGi+Os3VuHDZNtF0J0hzpXDgrLMXR76Jj8r6WhbyvadJqWsm02TiSFEcrDc3AExrxwQhFpLXxLYB+zajoHOO2cJvrQoSyhT4ssRK6PBB6asyzSv0cKVPEsttmS/u21VS;25:15b/LE9z2SBhugp3zlZ7INfjCx61Xnr6F/ln3jkPWk5tX8/L/nhvNfebzAwOQBieHq2RSEAQm75vFn8/73hwfUPskp0dvbENdra+RWpvgnra/OcpXH661H1QdKq+hdqlnv4f7NMVAqXvxqLrhoRmt0ZTBNDxi9G/PJY/fNfMQWNp4teT4GnJAl0hlzTKmq8KQTr3EnwuJFEBN4iUjA4cvNT+2Nhf3Qa/QETSyTTUpdfbIMIEu8pHrnIVt8xLYngAGa4CfUKBfOGfp0eo/cz1PDnUmYcTB2j1f8kbJawrePMjb+AjVpGJf88mk8XSfxK0yTDH1a5XemB3laazChFpCg==;31:6dRE+G4t7MDxSBivdFkF5NJMSyBMGxANkkNl8L1muir+FnlAVlUef8npt8RTng64M+rhzoBWaF/Wm7qtNapfnW31Vixcb4kxpvz6t8bDGsjevs9fFfRYD8wb9d+sSP1c1OeAR5AsNyB1mNTxiE3qyM6Eht+AF9inePnEJJYNk95rXKz5sS6W7EyyQVKQmxuqs2QW4Vs6z9xOe1GOCgVrrtKjE2mqSU+SJenNajU/9FU= X-MS-TrafficTypeDiagnostic: AM6PR04MB4662: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Michal.Vokac@ysoft.com; X-Microsoft-Exchange-Diagnostics: 1;AM6PR04MB4662;20:8ybpG1yaUS3Y4v3B2Lb+8FqOUCWUwXk6FVoXxUEHoCRCReRYn/SzttiI9uveravta1/HYGfc9WoHFQkIvCjHkzALTgjnxO5n7UkVe38sMJDvEKh6Ou+JO4EnXqdC0/aV22jcf0+gIO00R2DaCPq1R7Ka5FMpk9Wme/MKlVubHgBXfmVxY8SkJt/tv6/TA9bTzaB9lfxHKMiPE8jsxK7pwFGdp1gQ/qPcrJZpKL6GtEW16u0gZJQ6y4WSSfskHreC;4:pkwFfH3JEw8wWdwwVpGJXyo3YjEKGHDx2E0JuxEW5Wo0NvSXfjOj5qniLUUSz/IaqlqlxremzjqsPUpC1jd51a9TaxQhdWQmhecr0sLSqn/KDvnAwz+rMgzDUhihsolXWa9KjP3lST4nQugunxZsWyMZNNKIyJGo6C7mgXnThPCAppKmxMpjOXd4b2j3Kb0ZN5lROvzvCd6pIRvDH/57thje2NK2jP5udrzKN/CjeqJf7DwcVSjUNBL4q5Ff3rYXH1Zx7NrUnJdlWf/gCBqeRw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231311)(944501410)(52105095)(10201501046)(3002001)(149027)(150027)(6041310)(20161123562045)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(201708071742011)(7699016);SRVR:AM6PR04MB4662;BCL:0;PCL:0;RULEID:;SRVR:AM6PR04MB4662; X-Forefront-PRVS: 0773BB46AC X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6049001)(366004)(396003)(39850400004)(376002)(346002)(136003)(85664002)(189003)(199004)(51914003)(6246003)(16576012)(6916009)(305945005)(85182001)(52146003)(217873002)(54906003)(8676002)(6486002)(58126008)(31696002)(5660300001)(50466002)(65826007)(81156014)(81166006)(25786009)(65806001)(23676004)(6666003)(39060400002)(4326008)(66066001)(65956001)(47776003)(76176011)(86362001)(7736002)(52116002)(67846002)(2486003)(316002)(14444005)(478600001)(26005)(53546011)(106356001)(31686004)(64126003)(72206003)(6116002)(97736004)(186003)(53936002)(3846002)(68736007)(16526019)(956004)(2906002)(386003)(2616005)(2870700001)(105586002)(77096007)(229853002)(486006)(36756003)(446003)(476003)(8936002)(11346002);DIR:OUT;SFP:1101;SCL:1;SRVR:AM6PR04MB4662;H:[10.1.8.111];FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; Received-SPF: None (protection.outlook.com: ysoft.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtBTTZQUjA0TUI0NjYyOzIzOklRc0RsTmF5alJvdzdndHYwUzFzQUVyWHJa?= =?utf-8?B?cVFZRVBSN3RIWUxNSHVmOVQ2eFZLQ2N6eXU1OUFPeDAxdEpmcHBvZVVIQmVN?= =?utf-8?B?aXpMRzg4NkgxeE5QTU0xRlc5THZSVGdsdGhKNXFqSiswUHdPR2tWVlRUTHVn?= =?utf-8?B?aldtN0JPbXdGcUdNZGdGR3hqZWluR202S0ptN0ppR21xVUU1RzZjVmR4TjZL?= =?utf-8?B?UG1ZYkgvV296WHRMSmhhcEVtY0hucnVpcGNKZjE2ejhWejR1eXkzbCtiQkMw?= =?utf-8?B?ajBYdE00OVRxRWdFTC9sVFFxMnloZUszUWpac0tDYTUra1N2c0xRNkxSdXZh?= =?utf-8?B?M1Uzb0Vqc1ZRQlNRaWJEMFg4TVk1NTRvMGdVTW9PTGY5ZkVMSzROQlppSlZh?= =?utf-8?B?eXNJbGJRdVVWdUtFdk04UTRmTGpRRTBFampiclRtR2pTRU9YUjJnNGE3cE92?= =?utf-8?B?OFRvbjZqWXhNSGxzNUx1cTBoV1FhSE5SVmpKR0N6WFN6NzNaM000VS9LeWhP?= =?utf-8?B?ZlA2YVFBc2ZsWVR3aEx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SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: ysoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2018 11:21:07.9022 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3ad3ff22-9da4-456e-5fa4-08d608ea8603 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b5839965-430f-4be2-b282-d7a3149f2b37 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR04MB4662 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 23.8.2018 12:40, Lukasz Majewski wrote: Hi Lukasz, thanks for the reply! > Hi Michal, > >> Output of the PWM block of i.MX SoCs is always zero volts when the >> block is disabled. This can caue issues when inverted PWM polarity is >> needed. With inverted polarity a duty cycle = 0% corresponds to solid >> high level on the output. If the PWM is dissabled its output >> instantly goes to solid zero which corresponds to duty cycle = 100%. >> >> To have a trully inverted PWM output configure the PWM pad as a GPIO >> with pull-up. Then switch the pad to PWM output whenever non-zero >> duty cycle is needed. > > Just to ask - Is your display equipped with power supply enable/disable > pin? No it is not. The backlight on my display is just a bunch of serial- parallel connected LEDs with separate GND and VCC pins on a separate flex cable. And the display itself also does not have a reset or enable signal. It is a PITA to use it I must say.. > As fair as I remember the trick to avoid flickering the display > was to disable the display (enable-gpio property) and set the PWM PIN > as GPIO to high in u-boot. Yes, I know about that. I can not use this as the PWM output is the only signal I have to control the backlight. I mentioned that somewhere in the previous discussion with Lothar. I also think this could be useful not only for backlight. Any circuit that requires truly inverted PWM signal can use it. I see it as an enhancement to what you with Lothar have already done ;) >> >> Signed-off-by: Michal Vokáč >> --- >> Documentation/devicetree/bindings/pwm/imx-pwm.txt | 44 >> +++++++++++++++++++++++ 1 file changed, 44 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/pwm/imx-pwm.txt >> b/Documentation/devicetree/bindings/pwm/imx-pwm.txt index >> c61bdf8..3b1bc4c 100644 --- >> a/Documentation/devicetree/bindings/pwm/imx-pwm.txt +++ >> b/Documentation/devicetree/bindings/pwm/imx-pwm.txt @@ -14,6 +14,12 >> @@ See the clock consumer binding, >> Documentation/devicetree/bindings/clock/clock-bindings.txt >> - interrupts: The interrupt for the pwm controller >> >> +Optional properties: >> +- pinctrl: For i.MX27 and newer SoCs. Add extra pinctrl to configure >> the PWM >> + pin to gpio function. It allows control over the pin output level >> when the >> + PWM block is disabled. This is meant to be used if inverted >> polarity of the >> + PWM signal is required. See "Inverted PWM output" section bellow. >> + >> Example: >> >> pwm1: pwm@53fb4000 { >> @@ -25,3 +31,41 @@ pwm1: pwm@53fb4000 { >> clock-names = "ipg", "per"; >> interrupts = <61>; >> }; >> + >> +Inverted PWM output >> +------------------- >> + >> +The i.MX SoC has such limitation that whenever a pad is configured >> as a PWM +output, the output level is always zero volts when the PWM >> block is disabled. +The zero output level is actively driven by the >> output stage of the PWM block +and can not be overridden by pull-up. >> It also does not matter what PWM polarity +a PWM client (e.g. >> backlight) requested. + >> +To gain control of the PWM output level in disabled state two >> pinctrl states +can be used. The "default" state and the "pwm" state. >> In the default state the +PWM output is configured as a GPIO with >> pull-up. In the "pwm" state the output +is configured as a PWM >> output. This setup assures that the PWM output is at +the required >> level that corresponds to duty cycle = 0 when PWM is disabled. +E.g. >> at boot. + >> +Example: >> + >> +&pwm1 { >> + pinctrl-names = "default", "pwm"; >> + pinctrl-0 = <&pinctrl_backlight_gpio>; >> + pinctrl-1 = <&pinctrl_backlight_pwm>; >> +} >> + >> +pinctrl_backlight_gpio: pwm1grp-gpio { >> + fsl,pins = < >> + /* GPIO with 22kOhm pull-up */ >> + MX6QDL_PAD_GPIO_9__GPIO1_IO09 0xF008 >> + >; >> +}; >> + >> +pinctrl_backlight_pwm: pwm1grp-pwm { >> + fsl,pins = < >> + /* PWM output */ >> + MX6QDL_PAD_GPIO_9__PWM1_OUT 0x8 >> + >; >> +};