Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp178690rdb; Tue, 5 Dec 2023 02:13:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IEv8WwpJiG58kqMUJLCvdMsE45dLL9j6r4AyTNQ7SEvP3DNB4h2oGQ0E3wun1ryizWUhkC9 X-Received: by 2002:a05:6830:1287:b0:6d9:9d39:5a57 with SMTP id z7-20020a056830128700b006d99d395a57mr2659350otp.36.1701771226804; Tue, 05 Dec 2023 02:13:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701771226; cv=none; d=google.com; s=arc-20160816; b=HNv0i17q/Mx0mqozyGdQG8qhMuUH9CbP8/x5LU8V98MHP2IuFx1N6Fw5qJnYXYNRwh 7GzvblVnVhkAI7gMToPMszsDxfJ/Ak6LoovMwta6VGadQI84mkn33e/eiOKKITMwKkRQ db1G8XDaBPyGLG582MqXqdVjpHdQ78TJ+i5hroOS0PqjKyZJRkBguCjLn0aJ9u0lIiZm mm14N3qokcBdeH8mA5dd2HSTYO7jJMBB+6lVsRvaX9B0xvyidp/z++Ll3+1fYcxZBL2F eHDZF0x22guy3CIJrJ69xDRfdBA0tB3nF6m0UlwemgT2Zu+bVhd9MpswqRTGqXsiVmkR tRoA== 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=sSY6Xmim33mhZIV/z0PHyd0g4eJZkxmOKNxI+AG9ONg=; fh=S4scCjmGHuTpFNsRpx5F7zvdPnZW78Fse4yFoJp+Y6U=; b=HpnJMaliFFMWPcWe2Qo+xhiI+SSrO672Biv7WNNMtrxIIIsAAnXL+Foau9amO2Z17K xhH59fxRsR45bqSWZpskYAPaJp2bvcyIrwb2dF08B2tGB2L2+M/Qp5M8dxI3ETg9z9wc bKwLOPvzcVJcrZOedUy4W619h9d2LDLYKo6NK+Nh9Li/P4GtpHDzGyBNNKMR/5mqNOO3 GQ71B4BEsq5Ux1/EzaC/qMo4QD6D8mAYhG6irS/MDeSa7/hr+2/GKp6djZnaaSBL7FBN +083DEnUXZJMzMbXHSH8hsDbYVuxADx5c3z7JuTdEUMC+b3swC6Oh9vTXfdcyrrL33cZ +Jgw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id bs9-20020a632809000000b005c6b59c91bbsi5406pgb.654.2023.12.05.02.13.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 02:13:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 8CEBD80417F5; Tue, 5 Dec 2023 02:13:39 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344955AbjLEKM5 (ORCPT + 99 others); Tue, 5 Dec 2023 05:12:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344981AbjLEJzb (ORCPT ); Tue, 5 Dec 2023 04:55:31 -0500 Received: from sakura.ysato.name (ik1-413-38519.vs.sakura.ne.jp [153.127.30.23]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D399A116; Tue, 5 Dec 2023 01:55:36 -0800 (PST) Received: from SIOS1075.ysato.name (ZM005235.ppp.dion.ne.jp [222.8.5.235]) by sakura.ysato.name (Postfix) with ESMTPSA id 33C531C0509; Tue, 5 Dec 2023 18:46:46 +0900 (JST) From: Yoshinori Sato To: linux-sh@vger.kernel.org Cc: Yoshinori Sato , Damien Le Moal , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Michael Turquette , Stephen Boyd , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Thomas Gleixner , Lorenzo Pieralisi , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= , Bjorn Helgaas , Greg Kroah-Hartman , Jiri Slaby , Magnus Damm , Daniel Lezcano , Rich Felker , John Paul Adrian Glaubitz , Lee Jones , Helge Deller , Heiko Stuebner , Jernej Skrabec , Chris Morgan , Linus Walleij , Randy Dunlap , Arnd Bergmann , Hyeonggon Yoo <42.hyeyoo@gmail.com>, David Rientjes , Vlastimil Babka , Baoquan He , Andrew Morton , Guenter Roeck , Stephen Rothwell , Guo Ren , Javier Martinez Canillas , Azeem Shaikh , Palmer Dabbelt , Bin Meng , Max Filippov , Tom Rix , Herve Codina , Jacky Huang , Lukas Bulwahn , Jonathan Corbet , Biju Das , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Sam Ravnborg , Michael Karcher , Sergey Shtylyov , Laurent Pinchart , linux-ide@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, linux-fbdev@vger.kernel.org Subject: [DO NOT MERGE v5 22/37] dt-bindings: display: smi,sm501: SMI SM501 binding json-schema Date: Tue, 5 Dec 2023 18:45:41 +0900 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 05 Dec 2023 02:13:39 -0800 (PST) Define SM501 functions and modes. Signed-off-by: Yoshinori Sato --- .../bindings/display/smi,sm501.yaml | 134 ++++++++++++++++++ include/dt-bindings/display/sm501.h | 25 ++++ 2 files changed, 159 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/smi,sm501.yaml create mode 100644 include/dt-bindings/display/sm501.h diff --git a/Documentation/devicetree/bindings/display/smi,sm501.yaml b/Documentation/devicetree/bindings/display/smi,sm501.yaml new file mode 100644 index 000000000000..df46600b8d4a --- /dev/null +++ b/Documentation/devicetree/bindings/display/smi,sm501.yaml @@ -0,0 +1,134 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/smi,sm501.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Silicon Motion SM501 Mobile Multimedia Companion Chip + +maintainers: + - Yoshinori Sato + +description: | + These DT bindings describe the SM501. + +properties: + compatible: + const: + smi,sm501 + + reg: + maxItems: 2 + description: | + First entry: System Configuration register + Second entry: IO space (Display Controller register) + + interrupts: + description: SM501 interrupt to the cpu should be described here. + + interrupt-name: true + + mode: + $ref: /schemas/types.yaml#/definitions/string + description: select a video mode + + edid: + description: | + verbatim EDID data block describing attached display. + Data from the detailed timing descriptor will be used to + program the display controller. + + little-endian: + $ref: /schemas/types.yaml#/definitions/flag + description: available on big endian systems, to set different foreign endian. + big-endian: + $ref: /schemas/types.yaml#/definitions/flag + description: available on little endian systems, to set different foreign endian. + + swap-fb-endian: + $ref: /schemas/types.yaml#/definitions/flag + description: swap framebuffer byteorder. + + route-crt-panel: + $ref: /schemas/types.yaml#/definitions/flag + description: Panel output merge to CRT. + + crt: + description: CRT output control + + panel: + description: Panel output control + + bpp: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Color depth + + smi,flags: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Display control flags. + + smi,devices: + $ref: /schemas/types.yaml#/definitions/uint32 + description: SM501 device function select. + + smi,mclk: + $ref: /schemas/types.yaml#/definitions/uint32 + description: mclk frequency. + + smi,m1xclk: + $ref: /schemas/types.yaml#/definitions/uint32 + description: m1xclk frequency. + + smi,misc-timing: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Miscellaneous Timing reg value. + + smi,misc-control: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Miscellaneous Control reg value. + + smi,gpio-low: + $ref: /schemas/types.yaml#/definitions/uint32 + description: GPIO0 to 31 Control reg value. + + smi,gpio-high: + $ref: /schemas/types.yaml#/definitions/uint32 + description: GPIO32 to 63 Control reg value. + + smi,gpio-i2c: + $ref: /schemas/types.yaml#/definitions/uint32-array + minItems: 5 + description: | + GPIO I2C bus number + 1st field - I2C bus number + 2nd Field - GPIO SDA + 3rd Field - GPIO SCL + 4th Field - Timeout + 5th Field - udelay + +additionalProperties: false + +required: + - compatible + - reg + - interrupts + + +examples: + # MPC5200 + - | + display@1,0 { + compatible = "smi,sm501"; + reg = <0x00000000 0x00800000 + 0x03e00000 0x00200000>; + interrupts = <1 1 3>; + mode = "640x480-32@60"; + edid = [00 ff ff ff ff ff ff 00 00 00 00 00 00 00 00 00 + 00 00 01 04 00 00 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 f0 0a 80 fb 20 e0 25 10 32 60 + 02 00 00 00 00 00 00 06 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 bd]; + }; diff --git a/include/dt-bindings/display/sm501.h b/include/dt-bindings/display/sm501.h new file mode 100644 index 000000000000..1be8490d7635 --- /dev/null +++ b/include/dt-bindings/display/sm501.h @@ -0,0 +1,25 @@ +/* SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause */ + +/* Platform data definitions */ + +#define SM501FB_FLAG_USE_INIT_MODE (1<<0) +#define SM501FB_FLAG_DISABLE_AT_EXIT (1<<1) +#define SM501FB_FLAG_USE_HWCURSOR (1<<2) +#define SM501FB_FLAG_USE_HWACCEL (1<<3) +#define SM501FB_FLAG_PANEL_NO_FPEN (1<<4) +#define SM501FB_FLAG_PANEL_NO_VBIASEN (1<<5) +#define SM501FB_FLAG_PANEL_INV_FPEN (1<<6) +#define SM501FB_FLAG_PANEL_INV_VBIASEN (1<<7) + +#define SM501_USE_USB_HOST (1<<0) +#define SM501_USE_USB_SLAVE (1<<1) +#define SM501_USE_SSP0 (1<<2) +#define SM501_USE_SSP1 (1<<3) +#define SM501_USE_UART0 (1<<4) +#define SM501_USE_UART1 (1<<5) +#define SM501_USE_FBACCEL (1<<6) +#define SM501_USE_AC97 (1<<7) +#define SM501_USE_I2S (1<<8) +#define SM501_USE_GPIO (1<<9) + +#define SM501_USE_ALL (0xffffffff) -- 2.39.2