Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp3200971pxb; Sun, 20 Feb 2022 12:20:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJyxRjkwrYuxSQJU88RrWK7kLZWL2rvGYEVj3TN4pUP65RDy0N3Hy/2KnzU+Wq538u3yahVG X-Received: by 2002:a17:90a:7063:b0:1bc:1243:13d7 with SMTP id f90-20020a17090a706300b001bc124313d7mr5919568pjk.221.1645388458082; Sun, 20 Feb 2022 12:20:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645388458; cv=none; d=google.com; s=arc-20160816; b=u+tVKczlKqLgMwE8ySdFl+pFthFOZloL2wPaKkKRVljvF9pBcfwCqAyvPVveq+/k+9 LnVrdR2bD4PVh0KiE1JelSPxxeeaFNs4PZ8MYmvvVa9bkrWUk1wx6RX1sP5NIxvlyuVu rDM5Ureq85mjP91pfa1PTzThRjFVLpxN0LlRibnfOuh46ThMv+ple0cEAQEQYlByXMOt 1ptohuIdG7OW3XtBXmpdPP+8OyLGPfLTDnivXD0uOjqXPTM9eA38useogdSE53OnVmrN yGOBOe6tFuYFUXtlBBr9oiIQXhR+iEXpqNeTlwmYWMplBruQIOzgzrya1BP9R1nb/+gs tg5A== 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:sender :hmm_source_type:hmm_attache_num:hmm_source_ip; bh=25wrKE5bmufSYHQYvYV3X9TZmElBDQKrQWAN6wDC4Rw=; b=UFMAiLCD3yCoK4tdt5sTTrrnT//LsJaC4Jjmbzt83qUjc3loAHb81LlYepiZRRgrTJ RTsZxwbgWowKa0KkN4BtR0ZUZUqA3ZQOxEESyK6xjzRskvidrj5u9RkXQoNy29SouviM 9bUm4Rp+SeWAwiP1MSmSkCjrVT6/rapNeo+VkGOf3OfpUCDQHaQattJtwvydeYWhdFBc ZzMHlmMYC3K7LjCV451zVgs6Kbd2nyuSHsR08QHjPkA7r+FmkESGqyvdzsBqg4+770pk ComoulNwxt0zTkLtF8aL1Ae9M50aDJ6LbKXSQ0INp3mT2gh/HhWZvRsBVMZCKcfWNk2/ kt6A== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j13si30439076plx.549.2022.02.20.12.20.43; Sun, 20 Feb 2022 12:20:58 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244060AbiBTO4f (ORCPT + 99 others); Sun, 20 Feb 2022 09:56:35 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:40840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244045AbiBTO43 (ORCPT ); Sun, 20 Feb 2022 09:56:29 -0500 Received: from 189.cn (ptr.189.cn [183.61.185.102]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 59C8845ADD; Sun, 20 Feb 2022 06:56:06 -0800 (PST) HMM_SOURCE_IP: 10.64.8.41:45934.2136022094 HMM_ATTACHE_NUM: 0000 HMM_SOURCE_TYPE: SMTP Received: from clientip-114.242.206.180 (unknown [10.64.8.41]) by 189.cn (HERMES) with SMTP id 8B60E1002AB; Sun, 20 Feb 2022 22:56:04 +0800 (CST) Received: from ([114.242.206.180]) by gateway-151646-dep-b7fbf7d79-9vctg with ESMTP id a3d8657f1f5e402daacebd602d06d102 for mripard@kernel.org; Sun, 20 Feb 2022 22:56:05 CST X-Transaction-ID: a3d8657f1f5e402daacebd602d06d102 X-Real-From: 15330273260@189.cn X-Receive-IP: 114.242.206.180 X-MEDUSA-Status: 0 Sender: 15330273260@189.cn From: Sui Jingfeng <15330273260@189.cn> To: Maxime Ripard , Thomas Zimmermann , Roland Scheidegger , Zack Rusin , Christian Gmeiner , David Airlie , Daniel Vetter , Rob Herring , Thomas Bogendoerfer , Dan Carpenter , Krzysztof Kozlowski , Andrey Zhizhikin , Sam Ravnborg , "David S . Miller" , Jiaxun Yang , Lucas Stach , Maarten Lankhorst , Ilia Mirkin , Qing Zhang , suijingfeng Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, Rob Herring Subject: [PATCH v10 2/4] Documentation/dt: Add descriptions for loongson display controller Date: Sun, 20 Feb 2022 22:55:52 +0800 Message-Id: <20220220145554.117854-3-15330273260@189.cn> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220220145554.117854-1-15330273260@189.cn> References: <20220220145554.117854-1-15330273260@189.cn> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,FROM_LOCAL_DIGITS, FROM_LOCAL_HEX,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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 From: suijingfeng Add DT documentation for loongson display controller found in LS2K1000, LS2K0500 and LS7A1000. v2: DT binding docs and includes should be a separate patch, fix a warnning because of that. v3: split dt-bindings from other changes into a separate patch. v4: fix warnings and errors when running make dt_binding_check Reported-by: Rob Herring Reported-by: Krzysztof Kozlowski Signed-off-by: suijingfeng Signed-off-by: Sui Jingfeng <15330273260@189.cn> --- .../loongson/loongson,display-controller.yaml | 122 ++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/loongson/loongson,display-controller.yaml diff --git a/Documentation/devicetree/bindings/display/loongson/loongson,display-controller.yaml b/Documentation/devicetree/bindings/display/loongson/loongson,display-controller.yaml new file mode 100644 index 000000000000..ee1a59b91943 --- /dev/null +++ b/Documentation/devicetree/bindings/display/loongson/loongson,display-controller.yaml @@ -0,0 +1,122 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/loongson/loongson,display-controller.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Loongson LS7A1000/LS2K1000/LS2K0500 Display Controller Device Tree Bindings + +maintainers: + - Sui Jingfeng + +description: |+ + + Loongson display controllers are simple which require scanout buffers + to be physically contiguous. LS2K1000/LS2K0500 is a SOC, only system + memory is available. LS7A1000/LS7A2000 is bridge chip which is equipped + with a dedicated video ram which is 64MB or more. + + For LS7A1000, there are 4 dedicated GPIOs whose control register is + located at the DC register space. They are used to emulate two way i2c, + One for DVO0, another for DVO1. + + LS2K1000 and LS2K0500 SoC grab i2c adapter from other module, either + general purpose GPIO emulated i2c or hardware i2c in the SoC. + + LSDC has two display pipes, each way has a DVO interface which provide + RGB888 signals, vertical & horizontal synchronisations, data enable and + the pixel clock. LSDC has two CRTC, each CRTC is able to scanout from + 1920x1080 resolution at 60Hz. Each CRTC has two FB address registers. + + LSDC's display pipeline have several components as below description, + + The display controller in LS7A1000: + ___________________ _________ + | -------| | | + | CRTC0 --> | DVO0 ----> Encoder0 ---> Connector0 ---> | Monitor | + | _ _ -------| ^ ^ |_________| + | | | | | -------| | | + | |_| |_| | i2c0 <--------+-------------+ + | -------| + | DC IN LS7A1000 | + | _ _ -------| + | | | | | | i2c1 <--------+-------------+ + | |_| |_| -------| | | _________ + | -------| | | | | + | CRTC1 --> | DVO1 ----> Encoder1 ---> Connector1 ---> | Panel | + | -------| |_________| + |___________________| + + Simple usage of LS7A1000 with LS3A4000 CPU: + + +------+ +-----------------------------------+ + | DDR4 | | +-------------------+ | + +------+ | | PCIe Root complex | LS7A1000 | + || MC0 | +--++---------++----+ | + +----------+ HT 3.0 | || || | + | LS3A4000 |<-------->| +---++---+ +--++--+ +---------+ +------+ + | CPU |<-------->| | GC1000 | | LSDC |<-->| DDR3 MC |<->| VRAM | + +----------+ | +--------+ +-+--+-+ +---------+ +------+ + || MC1 +---------------|--|----------------+ + +------+ | | + | DDR4 | +-------+ DVO0 | | DVO1 +------+ + +------+ VGA <--|ADV7125|<--------+ +-------->|TFP410|--> DVI/HDMI + +-------+ +------+ + + The display controller in LS2K1000/LS2K0500: + ___________________ _________ + | -------| | | + | CRTC0 --> | DVO0 ----> Encoder0 ---> Connector0 ---> | Monitor | + | _ _ -------| ^ ^ |_________| + | | | | | | | | + | |_| |_| | +------+ | + | <---->| i2c0 |<---------+ + | DC IN LS2K1000 | +------+ + | _ _ | +------+ + | | | | | <---->| i2c1 |----------+ + | |_| |_| | +------+ | _________ + | -------| | | | | + | CRTC1 --> | DVO1 ----> Encoder1 ---> Connector1 ---> | Panel | + | -------| |_________| + |___________________| + +properties: + $nodename: + pattern: "^display-controller@[0-9a-f],[0-9a-f]$" + + compatible: + enum: + - loongson,ls7a1000-dc + - loongson,ls2k1000-dc + - loongson,ls2k0500-dc + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + +required: + - compatible + - reg + - interrupts + +additionalProperties: false + +examples: + - | + #include + bus { + + #address-cells = <3>; + #size-cells = <2>; + #interrupt-cells = <2>; + + lsdc: display-controller@6,1 { + compatible = "loongson,ls7a1000-dc"; + reg = <0x3100 0x0 0x0 0x0 0x0>; + interrupts = <28 IRQ_TYPE_LEVEL_HIGH>; + interrupt-parent = <&pic>; + }; + }; +... -- 2.25.1