* [RESEND v7 17/37] dt-bindings: interrupt-controller: renesas,sh7751-intc: Add json-schema
From: Yoshinori Sato @ 2024-04-04 5:14 UTC (permalink / raw)
To: linux-sh
Cc: Yoshinori Sato, Damien Le Moal, Niklas Cassel, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
Michael Turquette, Stephen Boyd, David Airlie, Daniel Vetter,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
Thomas Gleixner, Bjorn Helgaas, Lorenzo Pieralisi,
Krzysztof Wilczyński, Greg Kroah-Hartman, Jiri Slaby,
Magnus Damm, Daniel Lezcano, Rich Felker,
John Paul Adrian Glaubitz, Lee Jones, Helge Deller,
Heiko Stuebner, Shawn Guo, Sebastian Reichel, Chris Morgan,
Linus Walleij, Arnd Bergmann, David Rientjes, Hyeonggon Yoo,
Vlastimil Babka, Baoquan He, Andrew Morton, Guenter Roeck,
Kefeng Wang, Stephen Rothwell, Javier Martinez Canillas, Guo Ren,
Azeem Shaikh, Max Filippov, Jonathan Corbet, Jacky Huang,
Herve Codina, Manikanta Guntupalli, Anup Patel, Biju Das,
Uwe Kleine-König, Sam Ravnborg, Sergey Shtylyov,
Laurent Pinchart, linux-ide, devicetree, linux-kernel,
linux-renesas-soc, linux-clk, dri-devel, linux-pci, linux-serial,
linux-fbdev
In-Reply-To: <cover.1712207606.git.ysato@users.sourceforge.jp>
Renesas SH7751 INTC json-schema.
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
---
.../renesas,sh7751-intc.yaml | 53 +++++++++++++++++++
1 file changed, 53 insertions(+)
create mode 100644 Documentation/devicetree/bindings/interrupt-controller/renesas,sh7751-intc.yaml
diff --git a/Documentation/devicetree/bindings/interrupt-controller/renesas,sh7751-intc.yaml b/Documentation/devicetree/bindings/interrupt-controller/renesas,sh7751-intc.yaml
new file mode 100644
index 000000000000..fb924eff465d
--- /dev/null
+++ b/Documentation/devicetree/bindings/interrupt-controller/renesas,sh7751-intc.yaml
@@ -0,0 +1,53 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/interrupt-controller/renesas,sh7751-intc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Renesas SH7751 Interrupt Controller
+
+maintainers:
+ - Yoshinori Sato <ysato@users.sourceforge.jp>
+
+properties:
+ compatible:
+ items:
+ - const: renesas,sh7751-intc
+
+ '#interrupt-cells':
+ const: 1
+
+ interrupt-controller: true
+
+ reg:
+ maxItems: 2
+
+ reg-names:
+ items:
+ - const: ICR
+ - const: INTPRI00
+
+ renesas,icr-irlm:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: If true four independent interrupt requests mode (ICR.IRLM is 1).
+
+required:
+ - compatible
+ - reg
+ - reg-names
+ - '#interrupt-cells'
+ - interrupt-controller
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/renesas,sh7751-intc.h>
+ shintc: interrupt-controller@ffd00000 {
+ compatible = "renesas,sh7751-intc";
+ reg = <0xffd00000 14>, <0xfe080000 128>;
+ reg-names = "ICR", "INTPRI00";
+ #interrupt-cells = <1>;
+ interrupt-controller;
+ };
+...
--
2.39.2
^ permalink raw reply related
* [RESEND v7 18/37] irqchip: SH7751 external interrupt encoder with enable gate.
From: Yoshinori Sato @ 2024-04-04 5:14 UTC (permalink / raw)
To: linux-sh
Cc: Yoshinori Sato, Damien Le Moal, Niklas Cassel, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
Michael Turquette, Stephen Boyd, David Airlie, Daniel Vetter,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
Thomas Gleixner, Bjorn Helgaas, Lorenzo Pieralisi,
Krzysztof Wilczyński, Greg Kroah-Hartman, Jiri Slaby,
Magnus Damm, Daniel Lezcano, Rich Felker,
John Paul Adrian Glaubitz, Lee Jones, Helge Deller,
Heiko Stuebner, Shawn Guo, Sebastian Reichel, Chris Morgan,
Linus Walleij, Arnd Bergmann, David Rientjes, Hyeonggon Yoo,
Vlastimil Babka, Baoquan He, Andrew Morton, Guenter Roeck,
Kefeng Wang, Stephen Rothwell, Javier Martinez Canillas, Guo Ren,
Azeem Shaikh, Max Filippov, Jonathan Corbet, Jacky Huang,
Herve Codina, Manikanta Guntupalli, Anup Patel, Biju Das,
Uwe Kleine-König, Sam Ravnborg, Sergey Shtylyov,
Laurent Pinchart, linux-ide, devicetree, linux-kernel,
linux-renesas-soc, linux-clk, dri-devel, linux-pci, linux-serial,
linux-fbdev
In-Reply-To: <cover.1712207606.git.ysato@users.sourceforge.jp>
SH7751 have 15 level external interrupt.
It is typically connected to the CPU through a priority encoder
that can suppress requests.
This driver provides a way to control those hardware with irqchip.
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
---
drivers/irqchip/Kconfig | 7 +
drivers/irqchip/Makefile | 2 +
drivers/irqchip/irq-renesas-sh7751irl.c | 221 ++++++++++++++++++++++++
3 files changed, 230 insertions(+)
create mode 100644 drivers/irqchip/irq-renesas-sh7751irl.c
diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
index 33badb5b4f00..7670fcd6757d 100644
--- a/drivers/irqchip/Kconfig
+++ b/drivers/irqchip/Kconfig
@@ -698,4 +698,11 @@ config RENESAS_SH7751_INTC
Support for the Renesas SH7751 On-chip interrupt controller.
And external interrupt encoder for some targets.
+config RENESAS_SH7751IRL_INTC
+ bool "Renesas SH7751 based target IRL encoder support."
+ depends on RENESAS_SH7751_INTC
+ help
+ Support for External Interrupt encoder
+ on the some Renesas SH7751 based target.
+
endmenu
diff --git a/drivers/irqchip/Makefile b/drivers/irqchip/Makefile
index 51855034a895..bc21d65441f2 100644
--- a/drivers/irqchip/Makefile
+++ b/drivers/irqchip/Makefile
@@ -122,3 +122,5 @@ obj-$(CONFIG_APPLE_AIC) += irq-apple-aic.o
obj-$(CONFIG_MCHP_EIC) += irq-mchp-eic.o
obj-$(CONFIG_SUNPLUS_SP7021_INTC) += irq-sp7021-intc.o
obj-$(CONFIG_RENESAS_SH7751_INTC) += irq-renesas-sh7751.o
+obj-$(CONFIG_RENESAS_SH7751IRL_INTC) += irq-renesas-sh7751irl.o
+
diff --git a/drivers/irqchip/irq-renesas-sh7751irl.c b/drivers/irqchip/irq-renesas-sh7751irl.c
new file mode 100644
index 000000000000..5990f2cd9a3d
--- /dev/null
+++ b/drivers/irqchip/irq-renesas-sh7751irl.c
@@ -0,0 +1,221 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * SH7751 based board external interrupt level encoder driver
+ * (Renesas RTS7751R2D / IO DATA DEVICE LANDISK, USL-5P)
+ *
+ * Copyright (C) 2023 Yoshinori Sato
+ */
+
+#include <linux/err.h>
+#include <linux/init.h>
+#include <linux/interrupt.h>
+#include <linux/io.h>
+#include <linux/irqdomain.h>
+#include <linux/irq.h>
+#include <linux/irqchip.h>
+#include <linux/of.h>
+#include <linux/of_irq.h>
+#include <linux/of_address.h>
+#include <linux/slab.h>
+#include <linux/bitops.h>
+
+struct sh7751irl_intc_priv {
+ struct irq_domain *irq_domain;
+ void __iomem *base;
+ unsigned int width;
+ bool invert;
+ u32 enable_bit[NR_IRL];
+};
+
+static inline unsigned long get_reg(void __iomem *addr, unsigned int w)
+{
+ switch (w) {
+ case 8:
+ return __raw_readb(addr);
+ case 16:
+ return __raw_readw(addr);
+ case 32:
+ return __raw_readl(addr);
+ default:
+ /* The size is checked when reading the properties. */
+ pr_err("%s: Invalid width %d", __FILE__, w);
+ return 0;
+ }
+}
+
+static inline void set_reg(void __iomem *addr, unsigned int w, unsigned long val)
+{
+ switch (w) {
+ case 8:
+ __raw_writeb(val, addr);
+ break;
+ case 16:
+ __raw_writew(val, addr);
+ break;
+ case 32:
+ __raw_writel(val, addr);
+ break;
+ default:
+ pr_err("%s: Invalid width %d", __FILE__, w);
+ }
+}
+
+static inline struct sh7751irl_intc_priv *irq_data_to_priv(struct irq_data *data)
+{
+ return data->domain->host_data;
+}
+
+static void irl_endisable(struct irq_data *data, unsigned int enable)
+{
+ struct sh7751irl_intc_priv *priv;
+ unsigned long val;
+ unsigned int irl;
+
+ priv = irq_data_to_priv(data);
+ irl = irqd_to_hwirq(data) - IRL_BASE_IRQ;
+
+ if (irl < NR_IRL && priv->enable_bit[irl] < priv->width) {
+ if (priv->invert)
+ enable = !enable;
+
+ val = get_reg(priv->base, priv->width);
+ if (enable)
+ set_bit(priv->enable_bit[irl], &val);
+ else
+ clear_bit(priv->enable_bit[irl], &val);
+ set_reg(priv->base, priv->width, val);
+ } else {
+ pr_err("%s: Invalid register define in IRL %u", __FILE__, irl);
+ }
+}
+
+static void sh7751irl_intc_disable_irq(struct irq_data *data)
+{
+ irl_endisable(data, 0);
+}
+
+static void sh7751irl_intc_enable_irq(struct irq_data *data)
+{
+ irl_endisable(data, 1);
+}
+
+static struct irq_chip sh7751irl_intc_chip = {
+ .name = "SH7751IRL-INTC",
+ .irq_enable = sh7751irl_intc_enable_irq,
+ .irq_disable = sh7751irl_intc_disable_irq,
+};
+
+static int sh7751irl_intc_map(struct irq_domain *h, unsigned int virq,
+ irq_hw_number_t hw_irq_num)
+{
+ irq_set_chip_and_handler(virq, &sh7751irl_intc_chip, handle_level_irq);
+ irq_get_irq_data(virq)->chip_data = h->host_data;
+ irq_modify_status(virq, IRQ_NOREQUEST, IRQ_NOPROBE);
+ return 0;
+}
+
+static int sh7751irl_intc_translate(struct irq_domain *domain,
+ struct irq_fwspec *fwspec, unsigned long *hwirq,
+ unsigned int *type)
+{
+ if (fwspec->param[0] > NR_IRL)
+ return -EINVAL;
+
+ switch (fwspec->param_count) {
+ case 2:
+ *type = fwspec->param[1];
+ fallthrough;
+ case 1:
+ *hwirq = fwspec->param[0] + IRL_BASE_IRQ;
+ break;
+ default:
+ return -EINVAL;
+ }
+ return 0;
+}
+
+static const struct irq_domain_ops sh7751irl_intc_domain_ops = {
+ .map = sh7751irl_intc_map,
+ .translate = sh7751irl_intc_translate,
+};
+
+static int __init load_irl_bit(struct device_node *node, struct sh7751irl_intc_priv *priv)
+{
+ struct property *enable_map;
+ const __be32 *p;
+ u32 nr_bits, bit;
+ u32 irl;
+ int ret;
+
+ /* Fill in unused */
+ memset(priv->enable_bit, ~0, sizeof(priv->enable_bit));
+
+ enable_map = of_find_property(node, "renesas,enable-reg", &nr_bits);
+ if (IS_ERR(enable_map))
+ return PTR_ERR(enable_map);
+
+ nr_bits /= sizeof(u32);
+ if (nr_bits > priv->width)
+ return -EINVAL;
+
+ ret = nr_bits;
+ p = NULL;
+ for (bit = nr_bits; bit > 0; bit--) {
+ p = of_prop_next_u32(enable_map, p, &irl);
+ if (p == NULL || irl > NR_IRL)
+ return -EINVAL;
+ if (irl == NR_IRL)
+ /* IRL15 is unassined bit */
+ continue;
+ priv->enable_bit[irl] = bit - 1;
+ }
+ return ret;
+}
+
+static int __init sh7751irl_init(struct device_node *node, struct device_node *parent)
+{
+ struct sh7751irl_intc_priv *priv;
+ struct resource res;
+ struct irq_domain *d;
+ void __iomem *base;
+ int ret = 0;
+
+ if (of_address_to_resource(node, 0, &res))
+ return -EINVAL;
+ if (resource_size(&res) > 4)
+ return -EINVAL;
+
+ base = ioremap(res.start, resource_size(&res));
+ if (!base)
+ return -EINVAL;
+
+ priv = kzalloc(sizeof(*priv), GFP_KERNEL);
+ if (!priv)
+ return -ENOMEM;
+
+ priv->base = base;
+ priv->width = 8 << resource_size(&res);
+
+ ret = load_irl_bit(node, priv);
+ if (ret < 0) {
+ pr_err("%pOFP: Invalid register define.\n", node);
+ goto error;
+ }
+
+ d = irq_domain_add_tree(node, &sh7751irl_intc_domain_ops, priv);
+ if (d == NULL) {
+ pr_err("%pOFP: cannot initialize irq domain\n", node);
+ ret = -ENOMEM;
+ goto error;
+ }
+
+ priv->irq_domain = d;
+ irq_domain_update_bus_token(d, DOMAIN_BUS_WIRED);
+ pr_info("%pOFP: SH7751 External Interrupt encoder (input=%d)", node, ret);
+ return 0;
+error:
+ kfree(priv);
+ return ret;
+}
+
+IRQCHIP_DECLARE(renesas_sh7751_irl, "renesas,sh7751-irl-ext", sh7751irl_init);
--
2.39.2
^ permalink raw reply related
* [RESEND v7 19/37] dt-bindings: interrupt-controller: renesas,sh7751-irl-ext: Add json-schema
From: Yoshinori Sato @ 2024-04-04 5:14 UTC (permalink / raw)
To: linux-sh
Cc: Yoshinori Sato, Damien Le Moal, Niklas Cassel, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
Michael Turquette, Stephen Boyd, David Airlie, Daniel Vetter,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
Thomas Gleixner, Bjorn Helgaas, Lorenzo Pieralisi,
Krzysztof Wilczyński, Greg Kroah-Hartman, Jiri Slaby,
Magnus Damm, Daniel Lezcano, Rich Felker,
John Paul Adrian Glaubitz, Lee Jones, Helge Deller,
Heiko Stuebner, Shawn Guo, Sebastian Reichel, Chris Morgan,
Linus Walleij, Arnd Bergmann, David Rientjes, Hyeonggon Yoo,
Vlastimil Babka, Baoquan He, Andrew Morton, Guenter Roeck,
Kefeng Wang, Stephen Rothwell, Javier Martinez Canillas, Guo Ren,
Azeem Shaikh, Max Filippov, Jonathan Corbet, Jacky Huang,
Herve Codina, Manikanta Guntupalli, Anup Patel, Biju Das,
Uwe Kleine-König, Sam Ravnborg, Sergey Shtylyov,
Laurent Pinchart, linux-ide, devicetree, linux-kernel,
linux-renesas-soc, linux-clk, dri-devel, linux-pci, linux-serial,
linux-fbdev
In-Reply-To: <cover.1712207606.git.ysato@users.sourceforge.jp>
Renesas SH7751 external interrupt encoder json-schema.
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
---
.../renesas,sh7751-irl-ext.yaml | 57 +++++++++++++++++++
1 file changed, 57 insertions(+)
create mode 100644 Documentation/devicetree/bindings/interrupt-controller/renesas,sh7751-irl-ext.yaml
diff --git a/Documentation/devicetree/bindings/interrupt-controller/renesas,sh7751-irl-ext.yaml b/Documentation/devicetree/bindings/interrupt-controller/renesas,sh7751-irl-ext.yaml
new file mode 100644
index 000000000000..fc174c0467e7
--- /dev/null
+++ b/Documentation/devicetree/bindings/interrupt-controller/renesas,sh7751-irl-ext.yaml
@@ -0,0 +1,57 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/interrupt-controller/renesas,sh7751-irl-ext.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Renesas SH7751 external interrupt encoder with enable regs.
+
+maintainers:
+ - Yoshinori Sato <ysato@users.sourceforge.jp>
+
+description:
+ This is the generally used external interrupt encoder on SH7751 based boards.
+
+properties:
+ compatible:
+ items:
+ - const: renesas,sh7751-irl-ext
+
+ reg: true
+
+ interrupt-controller: true
+
+ '#interrupt-cells':
+ const: 2
+
+ '#address-cells':
+ const: 0
+
+ renesas,set-to-disable:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: Invert enable registers. Setting the bit to 0 enables interrupts.
+
+ renesas,enable-reg:
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ description: |
+ IRQ enable register bit mapping
+
+required:
+ - compatible
+ - reg
+ - interrupt-controller
+ - '#interrupt-cells'
+ - renesas,enable-reg
+
+additionalProperties: false
+
+examples:
+ - |
+ r2dintc: interrupt-controller@a4000000 {
+ compatible = "renesas,sh7751-irl-ext";
+ reg = <0xa4000000 0x02>;
+ interrupt-controller;
+ #address-cells = <0>;
+ #interrupt-cells = <1>;
+ renesas,enable-reg = <12 9 10 3 0 4 1 2 8 5 6 7 15 15 15 11>;
+ };
--
2.39.2
^ permalink raw reply related
* [RESEND v7 20/37] serial: sh-sci: fix SH4 OF support.
From: Yoshinori Sato @ 2024-04-04 5:14 UTC (permalink / raw)
To: linux-sh
Cc: Yoshinori Sato, Damien Le Moal, Niklas Cassel, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
Michael Turquette, Stephen Boyd, David Airlie, Daniel Vetter,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
Thomas Gleixner, Bjorn Helgaas, Lorenzo Pieralisi,
Krzysztof Wilczyński, Greg Kroah-Hartman, Jiri Slaby,
Magnus Damm, Daniel Lezcano, Rich Felker,
John Paul Adrian Glaubitz, Lee Jones, Helge Deller,
Heiko Stuebner, Shawn Guo, Sebastian Reichel, Chris Morgan,
Linus Walleij, Arnd Bergmann, David Rientjes, Hyeonggon Yoo,
Vlastimil Babka, Baoquan He, Andrew Morton, Guenter Roeck,
Kefeng Wang, Stephen Rothwell, Javier Martinez Canillas, Guo Ren,
Azeem Shaikh, Max Filippov, Jonathan Corbet, Jacky Huang,
Herve Codina, Manikanta Guntupalli, Anup Patel, Biju Das,
Uwe Kleine-König, Sam Ravnborg, Sergey Shtylyov,
Laurent Pinchart, linux-ide, devicetree, linux-kernel,
linux-renesas-soc, linux-clk, dri-devel, linux-pci, linux-serial,
linux-fbdev
In-Reply-To: <cover.1712207606.git.ysato@users.sourceforge.jp>
- fix earlycon name.
- fix earlyprintk hung (NULL pointer reference).
- fix SERIAL_SH_SCI_EARLYCON enablement
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
drivers/tty/serial/Kconfig | 2 +-
drivers/tty/serial/sh-sci.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
index ffcf4882b25f..dfe5fd436816 100644
--- a/drivers/tty/serial/Kconfig
+++ b/drivers/tty/serial/Kconfig
@@ -661,7 +661,7 @@ config SERIAL_SH_SCI_EARLYCON
depends on SERIAL_SH_SCI=y
select SERIAL_CORE_CONSOLE
select SERIAL_EARLYCON
- default ARCH_RENESAS
+ default ARCH_RENESAS || SUPERH
config SERIAL_SH_SCI_DMA
bool "DMA support" if EXPERT
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index e512eaa57ed5..46466fb5a637 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -2717,7 +2717,7 @@ static int sci_remap_port(struct uart_port *port)
if (port->membase)
return 0;
- if (port->dev->of_node || (port->flags & UPF_IOREMAP)) {
+ if ((port->dev && port->dev->of_node) || (port->flags & UPF_IOREMAP)) {
port->membase = ioremap(port->mapbase, sport->reg_size);
if (unlikely(!port->membase)) {
dev_err(port->dev, "can't remap port#%d\n", port->line);
@@ -3545,8 +3545,8 @@ static int __init hscif_early_console_setup(struct earlycon_device *device,
OF_EARLYCON_DECLARE(sci, "renesas,sci", sci_early_console_setup);
OF_EARLYCON_DECLARE(scif, "renesas,scif", scif_early_console_setup);
-OF_EARLYCON_DECLARE(scif, "renesas,scif-r7s9210", rzscifa_early_console_setup);
-OF_EARLYCON_DECLARE(scif, "renesas,scif-r9a07g044", rzscifa_early_console_setup);
+OF_EARLYCON_DECLARE(rzscifa, "renesas,scif-r7s9210", rzscifa_early_console_setup);
+OF_EARLYCON_DECLARE(rzscifa, "renesas,scif-r9a07g044", rzscifa_early_console_setup);
OF_EARLYCON_DECLARE(scifa, "renesas,scifa", scifa_early_console_setup);
OF_EARLYCON_DECLARE(scifb, "renesas,scifb", scifb_early_console_setup);
OF_EARLYCON_DECLARE(hscif, "renesas,hscif", hscif_early_console_setup);
--
2.39.2
^ permalink raw reply related
* [RESEND v7 21/37] dt-bindings: serial: renesas,scif: Add scif-sh7751.
From: Yoshinori Sato @ 2024-04-04 5:14 UTC (permalink / raw)
To: linux-sh
Cc: Yoshinori Sato, Damien Le Moal, Niklas Cassel, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
Michael Turquette, Stephen Boyd, David Airlie, Daniel Vetter,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
Thomas Gleixner, Bjorn Helgaas, Lorenzo Pieralisi,
Krzysztof Wilczyński, Greg Kroah-Hartman, Jiri Slaby,
Magnus Damm, Daniel Lezcano, Rich Felker,
John Paul Adrian Glaubitz, Lee Jones, Helge Deller,
Heiko Stuebner, Shawn Guo, Sebastian Reichel, Chris Morgan,
Linus Walleij, Arnd Bergmann, David Rientjes, Hyeonggon Yoo,
Vlastimil Babka, Baoquan He, Andrew Morton, Guenter Roeck,
Kefeng Wang, Stephen Rothwell, Javier Martinez Canillas, Guo Ren,
Azeem Shaikh, Max Filippov, Jonathan Corbet, Jacky Huang,
Herve Codina, Manikanta Guntupalli, Anup Patel, Biju Das,
Uwe Kleine-König, Sam Ravnborg, Sergey Shtylyov,
Laurent Pinchart, linux-ide, devicetree, linux-kernel,
linux-renesas-soc, linux-clk, dri-devel, linux-pci, linux-serial,
linux-fbdev
In-Reply-To: <cover.1712207606.git.ysato@users.sourceforge.jp>
Add Renesas SH7751 SCIF.
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Documentation/devicetree/bindings/serial/renesas,scif.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/serial/renesas,scif.yaml b/Documentation/devicetree/bindings/serial/renesas,scif.yaml
index 4610a5bd580c..590f88e2ced9 100644
--- a/Documentation/devicetree/bindings/serial/renesas,scif.yaml
+++ b/Documentation/devicetree/bindings/serial/renesas,scif.yaml
@@ -18,6 +18,7 @@ properties:
- items:
- enum:
- renesas,scif-r7s72100 # RZ/A1H
+ - renesas,scif-sh7751 # SH7751
- const: renesas,scif # generic SCIF compatible UART
- items:
--
2.39.2
^ permalink raw reply related
* [RESEND v7 22/37] dt-bindings: display: smi,sm501: SMI SM501 binding json-schema
From: Yoshinori Sato @ 2024-04-04 5:14 UTC (permalink / raw)
To: linux-sh
Cc: Yoshinori Sato, Damien Le Moal, Niklas Cassel, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
Michael Turquette, Stephen Boyd, David Airlie, Daniel Vetter,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
Thomas Gleixner, Bjorn Helgaas, Lorenzo Pieralisi,
Krzysztof Wilczyński, Greg Kroah-Hartman, Jiri Slaby,
Magnus Damm, Daniel Lezcano, Rich Felker,
John Paul Adrian Glaubitz, Lee Jones, Helge Deller,
Heiko Stuebner, Shawn Guo, Sebastian Reichel, Chris Morgan,
Linus Walleij, Arnd Bergmann, David Rientjes, Hyeonggon Yoo,
Vlastimil Babka, Baoquan He, Andrew Morton, Guenter Roeck,
Kefeng Wang, Stephen Rothwell, Javier Martinez Canillas, Guo Ren,
Azeem Shaikh, Max Filippov, Jonathan Corbet, Jacky Huang,
Herve Codina, Manikanta Guntupalli, Anup Patel, Biju Das,
Uwe Kleine-König, Sam Ravnborg, Sergey Shtylyov,
Laurent Pinchart, linux-ide, devicetree, linux-kernel,
linux-renesas-soc, linux-clk, dri-devel, linux-pci, linux-serial,
linux-fbdev
In-Reply-To: <cover.1712207606.git.ysato@users.sourceforge.jp>
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
---
.../bindings/display/smi,sm501.yaml | 398 ++++++++++++++++++
1 file changed, 398 insertions(+)
create mode 100644 Documentation/devicetree/bindings/display/smi,sm501.yaml
diff --git a/Documentation/devicetree/bindings/display/smi,sm501.yaml b/Documentation/devicetree/bindings/display/smi,sm501.yaml
new file mode 100644
index 000000000000..06c6af4fa4a9
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/smi,sm501.yaml
@@ -0,0 +1,398 @@
+# 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 <ysato@user.sourceforge.jp>
+
+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.
+
+ 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:
+ type: object
+ description: CRT output control
+ properties:
+ edid:
+ $ref: /schemas/types.yaml#/definitions/uint8-array
+ description: |
+ verbatim EDID data block describing attached display.
+ Data from the detailed timing descriptor will be used to
+ program the display controller.
+
+ smi,flags:
+ $ref: /schemas/types.yaml#/definitions/string-array
+ description: Display control flags.
+ items:
+ anyOf:
+ - const: use-init-done
+ - const: disable-at-exit
+ - const: use-hwcursor
+ - const: use-hwaccel
+ - const: panel-no-fpen
+ - const: panel-no-vbiasen
+ - const: panel-inv-fpen
+ - const: panel-inv-vbiasen
+ maxItems: 8
+
+ bpp:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: Color depth
+
+ panel:
+ type: object
+ description: Panel output control
+ properties:
+ edid:
+ $ref: /schemas/types.yaml#/definitions/uint8-array
+ description: |
+ verbatim EDID data block describing attached display.
+ Data from the detailed timing descriptor will be used to
+ program the display controller.
+
+ smi,flags:
+ $ref: /schemas/types.yaml#/definitions/string-array
+ description: Display control flags.
+ items:
+ anyOf:
+ - const: use-init-done
+ - const: disable-at-exit
+ - const: use-hwcursor
+ - const: use-hwaccel
+ - const: panel-no-fpen
+ - const: panel-no-vbiasen
+ - const: panel-inv-fpen
+ - const: panel-inv-vbiasen
+ maxItems: 8
+
+ bpp:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: Color depth
+
+ smi,devices:
+ $ref: /schemas/types.yaml#/definitions/string-array
+ description: Select SM501 device functions.
+ items:
+ anyOf:
+ - const: usb-host
+ - const: usb-slave
+ - const: ssp0
+ - const: ssp1
+ - const: uart0
+ - const: uart1
+ - const: fbaccel
+ - const: ac97
+ - const: i2s
+ - const: gpio
+ minItems: 1
+ maxItems: 10
+
+ smi,mclk:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: mclk frequency.
+
+ smi,m1xclk:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: m1xclk frequency.
+
+ misc-timing:
+ type: object
+ description: Miscellaneous Timing register values.
+ properties:
+ ex:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: Extend bus holding time.
+
+ xc:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: Xscale clock input select.
+
+ usb-over-current-detect-disable:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: USB host current detection disable (Us=0).
+
+ usb-over-current-detect-enable:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: USB host current detection disable (Us=1).
+
+ sdram-clock-mode1-288mhz:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: SSM1 bit is clear.
+
+ sdram-clock-mode1-div:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: SSM1 bit is set.
+
+ sm1:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: SDRAM clock divider for PW mode 1.
+
+ sdram-clock-mode0-288mhz:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: SSM0 bit is clear.
+
+ sdram-clock-mode0-div:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: SSM0 bit is set.
+
+ sm0:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: SDRAM clock divider for PW mode 0.
+
+ pll-debug-input:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: 96MHz PLL debug input reference frequency (Deb=0).
+
+ pll-debug-output:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: 96MHz PLL debug output frequency (Deb=1).
+
+ no-acpi-control:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: No ACPI control (A=0).
+
+ acpi-control:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: No ACPI control (A=1).
+
+ divider:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: Second PLL output frequency.
+
+ usb-host-normal:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: USB Host normal mode.
+
+ usb-host-simulation:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: USB Host simulation mode.
+
+ delay:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: Delay time to latch read data. Set the value to 10x.
+
+ misc-control:
+ type: object
+ description: Miscellaneous Control register values.
+ properties:
+ pad:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: PCI Pad drive strength.
+
+ usbclk:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: USB Clcok Select.
+
+ uart1:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: UART1 (SSP=0)
+
+ ssp1:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: SSP1 (SSP=1)
+
+ latch-address-disable:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: 8051 Latch disable (Lat=0).
+
+ latch-address-enable:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: 8051 Latch enable (Lat=1).
+
+ panel-data-18bit:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: Flat Panel data 18bit (FP=0).
+
+ panel-data-24bit:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: Flat Panel data 24bit (FP=1).
+
+ xtal-freq-24mhz:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: Crystal frequency 24MHz (Freq=0).
+
+ xtal-freq-12mhz:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: Crystal frequency 12MHz (Freq=1).
+
+ refresh:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: Internal memory refresh timing.
+
+ hold:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: BUS Hold time.
+
+ sh-ready-low:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: SuperH ready polarity active low (SH=0).
+
+ sh-ready-high:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: SuperH ready polarity active high (SH=1).
+
+ interrupt-normal:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: Interrupt normal (II=0).
+
+ interrupt-inverted:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: Interrupt Inverting (II=1).
+
+ pll-clock-count-disable:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: PLL clock count disable.
+
+ pll-clock-count-enaable:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: PLL clock count enable.
+
+ dac-power-enable:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: DAC Power enable (DAC=0).
+
+ dac-power-disable:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: DAC Power disable (DAC=1).
+
+ usb-slave-cpu:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: USB slave controller cpu (MC=0).
+
+ usb-slave-8051:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: USB slave controller 8051MCU (MC=1).
+
+ burst-length-8:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: CPU Master burst length 8 (BL=0).
+
+ burst-length-1:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: CPU Master burst length 1 (BL=1).
+
+ usb-port-master:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: USB port master.
+
+ usb-port-slave:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: USB port slave.
+
+ vr-mmio-30mb:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: NEC VR Memory map MMIO locatedat 30MB (VR=0)
+
+ vr-mmio-62mb:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: NEC VR Memory map MMIO locatedat 62MB (VR=1)
+
+ gpio-pin-control:
+ type: object
+ description: GPIO control configuration.
+ properties:
+ pin:
+ type: object
+ properties:
+ gpio:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: pin in/out use GPIO.
+ function:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: pin in/out use function.
+
+ gpio-i2c:
+ type: object
+ description: GPIO I2C definition.
+ properties:
+ i2c:
+ type: object
+ properties:
+ bus:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: I2C bus number.
+
+ sda:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: I2C SDA pin port number.
+
+ scl:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: I2C SCL pin port number.
+
+ delay:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: bit transmission delay.
+
+ timeout:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: transmission timeout.
+
+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];
+ };
--
2.39.2
^ permalink raw reply related
* [RESEND v7 23/37] dt-bindings: display: sm501 register definition helper
From: Yoshinori Sato @ 2024-04-04 5:14 UTC (permalink / raw)
To: linux-sh
Cc: Yoshinori Sato, Damien Le Moal, Niklas Cassel, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
Michael Turquette, Stephen Boyd, David Airlie, Daniel Vetter,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
Thomas Gleixner, Bjorn Helgaas, Lorenzo Pieralisi,
Krzysztof Wilczyński, Greg Kroah-Hartman, Jiri Slaby,
Magnus Damm, Daniel Lezcano, Rich Felker,
John Paul Adrian Glaubitz, Lee Jones, Helge Deller,
Heiko Stuebner, Shawn Guo, Sebastian Reichel, Chris Morgan,
Linus Walleij, Arnd Bergmann, David Rientjes, Hyeonggon Yoo,
Vlastimil Babka, Baoquan He, Andrew Morton, Guenter Roeck,
Kefeng Wang, Stephen Rothwell, Javier Martinez Canillas, Guo Ren,
Azeem Shaikh, Max Filippov, Jonathan Corbet, Jacky Huang,
Herve Codina, Manikanta Guntupalli, Anup Patel, Biju Das,
Uwe Kleine-König, Sam Ravnborg, Sergey Shtylyov,
Laurent Pinchart, linux-ide, devicetree, linux-kernel,
linux-renesas-soc, linux-clk, dri-devel, linux-pci, linux-serial,
linux-fbdev
In-Reply-To: <cover.1712207606.git.ysato@users.sourceforge.jp>
Miscellaneous Timing and Miscellaneous Control registers definition.
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
---
include/dt-bindings/display/sm501.h | 76 +++++++++++++++++++++++++++++
1 file changed, 76 insertions(+)
create mode 100644 include/dt-bindings/display/sm501.h
diff --git a/include/dt-bindings/display/sm501.h b/include/dt-bindings/display/sm501.h
new file mode 100644
index 000000000000..a6c6943642e4
--- /dev/null
+++ b/include/dt-bindings/display/sm501.h
@@ -0,0 +1,76 @@
+/* SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause */
+#ifndef __DT_BINDING_DISPALY_SM501__
+#define __DT_BINDING_DISPALY_SM501__
+
+/* Miscellaneous Conntrol */
+#define SM501_MISC_CONTROL_PAD_24 0
+#define SM501_MISC_CONTROL_PAD_12 1
+#define SM501_MISC_CONTROL_PAD_8 2
+
+#define SM501_MISC_CONTROL_USBCLK_XTAL 0
+#define SM501_MISC_CONTROL_USBCLK_96MHZ 1
+#define SM501_MISC_CONTROL_USBCLK_48MHZ 2
+
+#define SM501_MISC_CONTROL_RFSH_8US 0
+#define SM501_MISC_CONTROL_RFSH_16US 1
+#define SM501_MISC_CONTROL_RFSH_32US 2
+#define SM501_MISC_CONTROL_RFSH_64US 3
+
+#define SM501_MISC_CONTROL_HOLD_EMPTY 0
+#define SM501_MISC_CONTROL_HOLD_8TR 1
+#define SM501_MISC_CONTROL_HOLD_16TR 2
+#define SM501_MISC_CONTROL_HOLD_24TR 3
+#define SM501_MISC_CONTROL_HOLD_32TR 4
+
+/* Miscellaneous timing */
+#define SM501_MISC_TIMING_EX_HOLD_0 0
+#define SM501_MISC_TIMING_EX_HOLD_16 1
+#define SM501_MISC_TIMING_EX_HOLD_32 2
+#define SM501_MISC_TIMING_EX_HOLD_48 3
+#define SM501_MISC_TIMING_EX_HOLD_64 4
+#define SM501_MISC_TIMING_EX_HOLD_80 5
+#define SM501_MISC_TIMING_EX_HOLD_96 6
+#define SM501_MISC_TIMING_EX_HOLD_112 7
+#define SM501_MISC_TIMING_EX_HOLD_128 8
+#define SM501_MISC_TIMING_EX_HOLD_144 9
+#define SM501_MISC_TIMING_EX_HOLD_160 10
+#define SM501_MISC_TIMING_EX_HOLD_176 11
+#define SM501_MISC_TIMING_EX_HOLD_192 12
+#define SM501_MISC_TIMING_EX_HOLD_208 13
+#define SM501_MISC_TIMING_EX_HOLD_224 14
+#define SM501_MISC_TIMING_EX_HOLD_240 15
+
+#define SM501_MISC_TIMING_XC_INTERNAL 0
+#define SM501_MISC_TIMING_XC_HCLK 1
+#define SM501_MISC_TIMING_XC_GPIO 2
+
+#define SM501_MISC_TIMING_SM_DIV1 0
+#define SM501_MISC_TIMING_SM_DIV2 1
+#define SM501_MISC_TIMING_SM_DIV4 2
+#define SM501_MISC_TIMING_SM_DIV8 3
+#define SM501_MISC_TIMING_SM_DIV16 4
+#define SM501_MISC_TIMING_SM_DIV32 5
+#define SM501_MISC_TIMING_SM_DIV64 6
+#define SM501_MISC_TIMING_SM_DIV128 7
+#define SM501_MISC_TIMING_SM_DIV3 8
+#define SM501_MISC_TIMING_SM_DIV6 9
+#define SM501_MISC_TIMING_SM_DIV12 10
+#define SM501_MISC_TIMING_SM_DIV24 11
+#define SM501_MISC_TIMING_SM_DIV48 12
+#define SM501_MISC_TIMING_SM_DIV96 13
+#define SM501_MISC_TIMING_SM_DIV192 14
+#define SM501_MISC_TIMING_SM_DIV384 15
+
+#define SM501_MISC_TIMING_DIV336MHZ 0
+#define SM501_MISC_TIMING_DIV288MHZ 1
+#define SM501_MISC_TIMING_DIV240MHZ 2
+#define SM501_MISC_TIMING_DIV192MHZ 3
+
+#define SM501_MISC_TIMING_DELAY_NONE 0
+#define SM501_MISC_TIMING_DELAY_0_5 1
+#define SM501_MISC_TIMING_DELAY_1_0 2
+#define SM501_MISC_TIMING_DELAY_1_5 3
+#define SM501_MISC_TIMING_DELAY_2_0 4
+#define SM501_MISC_TIMING_DELAY_2_5 5
+
+#endif
--
2.39.2
^ permalink raw reply related
* [RESEND v7 24/37] mfd: sm501: Convert platform_data to OF property
From: Yoshinori Sato @ 2024-04-04 5:14 UTC (permalink / raw)
To: linux-sh
Cc: Yoshinori Sato, Damien Le Moal, Niklas Cassel, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
Michael Turquette, Stephen Boyd, David Airlie, Daniel Vetter,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
Thomas Gleixner, Bjorn Helgaas, Lorenzo Pieralisi,
Krzysztof Wilczyński, Greg Kroah-Hartman, Jiri Slaby,
Magnus Damm, Daniel Lezcano, Rich Felker,
John Paul Adrian Glaubitz, Lee Jones, Helge Deller,
Heiko Stuebner, Shawn Guo, Sebastian Reichel, Chris Morgan,
Linus Walleij, Arnd Bergmann, David Rientjes, Hyeonggon Yoo,
Vlastimil Babka, Baoquan He, Andrew Morton, Guenter Roeck,
Kefeng Wang, Stephen Rothwell, Javier Martinez Canillas, Guo Ren,
Azeem Shaikh, Max Filippov, Jonathan Corbet, Jacky Huang,
Herve Codina, Manikanta Guntupalli, Anup Patel, Biju Das,
Uwe Kleine-König, Sam Ravnborg, Sergey Shtylyov,
Laurent Pinchart, linux-ide, devicetree, linux-kernel,
linux-renesas-soc, linux-clk, dri-devel, linux-pci, linux-serial,
linux-fbdev
In-Reply-To: <cover.1712207606.git.ysato@users.sourceforge.jp>
Various parameters of SM501 can be set using platform_data,
so parameters cannot be passed in the DeviceTree target.
Expands the parameters set in platform_data so that they can be
specified using DeviceTree properties.
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
---
drivers/mfd/sm501.c | 315 ++++++++++++++++++++++++++++++++++
drivers/video/fbdev/sm501fb.c | 106 ++++++++++++
2 files changed, 421 insertions(+)
diff --git a/drivers/mfd/sm501.c b/drivers/mfd/sm501.c
index b3592982a83b..98a69e254f5f 100644
--- a/drivers/mfd/sm501.c
+++ b/drivers/mfd/sm501.c
@@ -82,6 +82,16 @@ struct sm501_devdata {
unsigned int rev;
};
+struct sm501_config_props_uint {
+ char *name;
+ u32 shift;
+};
+
+struct sm501_config_props_flag {
+ char *clr_name;
+ char *set_name;
+ u32 bit;
+};
#define MHZ (1000 * 1000)
@@ -1370,6 +1380,305 @@ static int sm501_init_dev(struct sm501_devdata *sm)
return 0;
}
+static const struct sm501_config_props_uint misc_timing[] = {
+ {"delay", 0},
+ {"-", 3},
+ {"divider", 4},
+ {"-", 6},
+ {"sm0", 8},
+ {"-", 12},
+ {"sm1", 16},
+ {"-", 20},
+ {"xc", 24},
+ {"-", 26},
+ {"ex", 28},
+ {NULL, 32},
+};
+
+static const struct sm501_config_props_flag misc_timing_flag[] = {
+ {"usb-host-normal", "usb-host-simulation", 3},
+ {"no-acpi-control", "acpi-control", 6},
+ {"pll-debug-input", "pll-debug-output", 7},
+ {"sdram-clock-mode0-288mhz", "sdram-clock-mode0-div", 12},
+ {"sdram-clock-mode1-288mhz", "sdram-clock-mode1-div", 20},
+ {"usb-over-current-detect-disable",
+ "usb-over-current-detect-enable", 23},
+ {},
+};
+
+static const struct sm501_config_props_uint misc_control[] = {
+ {"hold", 18},
+ {"refresh", 21},
+ {"-", 23},
+ {"usbclk", 28},
+ {"pad", 30},
+ {NULL, 32},
+};
+
+static const struct sm501_config_props_flag misc_control_flag[] = {
+ {"vr-mmio-30mb", "vr-mmio-62mb", 4},
+ {"usb-port-master", "usb-port-slave", 9},
+ {"burst-length-8", "burst-length-1", 10},
+ {"usb-slave-cpu", "usb-slave-8051", 11},
+ {"dac-power-enable", "dac-power-disable", 12},
+ {"pll-clock-count-disable", "pll-clock-count-enable", 15},
+ {"interrupt-normal", "interrupt-invarted", 16},
+ {"sh-ready-low", "sh-ready-high", 17},
+ {"xtal-freq-24mhz", "xtal-freq-12mhz", 24},
+ {"panel-data-18bit", "panel-dtat-24bit", 25},
+ {"latch-address-disable", "latch-address-enable", 26},
+ {"uart1", "ssp1", 27},
+ {},
+};
+
+/* Read configuration values */
+static void sm501_of_read_config(struct device *dev, struct device_node *np,
+ const char *prefix,
+ const struct sm501_config_props_uint *props,
+ const struct sm501_config_props_flag *props_flag,
+ struct sm501_reg_init *ret)
+{
+ struct device_node *child;
+ char *name;
+ u32 shift;
+ u32 width;
+ u32 mask;
+ u32 val;
+
+ ret->mask = ~0;
+ ret->set = 0;
+
+ child = of_get_child_by_name(np, prefix);
+ if (!child)
+ return;
+
+ while (props->name) {
+ name = props->name;
+ shift = props->shift;
+ props++;
+
+ if (name[0] == '-' ||
+ of_property_read_u32(child, name, &val))
+ continue;
+
+ width = props->shift - shift;
+ mask = (1 << width) - 1;
+ if (mask < val) {
+ dev_warn(dev, "%s invalid value %d", name, val);
+ continue;
+ }
+ mask = ~(mask << shift);
+ ret->mask &= mask;
+ ret->set |= val << shift;
+ }
+ while (props_flag->clr_name) {
+ val = ~0;
+ if (of_property_read_bool(child, props_flag->clr_name))
+ val = 0;
+ else if (of_property_read_bool(child, props_flag->set_name))
+ val = 1;
+ if (val != ~0) {
+ val <<= (props_flag->bit & 31);
+ mask = 1 << (props_flag->bit & 31);
+ ret->mask &= ~mask;
+ ret->set |= val;
+ }
+ props_flag++;
+ }
+}
+
+/* Read GPIO control */
+/*
+ * DT example.
+ * gpio-pin-control {
+ * pin@0 {
+ * gpio-port;
+ * };
+ * pin@1 {
+ * function;
+ * };
+ * };
+ */
+static void sm501_of_read_gpio(struct device *dev, struct device_node *np,
+ struct sm501_reg_init *hi, struct sm501_reg_init *low)
+{
+ struct device_node *gpio_group, *pin;
+ const char *prop_mode;
+ unsigned int pin_no;
+ int mode;
+ u64 mask;
+ u64 set;
+
+ mask = ~0;
+ set = 0;
+ gpio_group = of_get_child_by_name(np, "gpio-pin-control");
+ if (gpio_group) {
+ for_each_child_of_node(gpio_group, pin) {
+ mode = -1;
+ if (sscanf(pin->full_name, "pin@%u", &pin_no) == 1) {
+ if (of_property_read_bool(pin, "gpio-port"))
+ mode = 0;
+ else if (of_property_read_bool(pin, "function"))
+ mode = 1;
+ }
+ /* GPIO0 - 47 and 55 -63 */
+ if (mode < 0 ||
+ (pin_no >= 64 || (pin_no >= 48 && pin_no <= 54))) {
+ dev_warn(dev,
+ "%s mode %s is invalid.", pin->name, prop_mode);
+ } else {
+ mask &= ~(1 << pin_no);
+ set |= mode << pin_no;
+ }
+ }
+ }
+ hi->set = set >> 32;
+ low->set = set & 0xffffffff;
+ hi->mask = mask >> 32;
+ low->mask = mask & 0xffffffff;
+}
+
+static inline int read_i2c_prop(struct device *dev, struct device_node *child,
+ const char *name, u32 *val)
+{
+ if (of_property_read_u32(child, name, val)) {
+ dev_warn(dev, "%s/%s not found. skip it.", of_node_full_name(child), name);
+ return -ENOENT;
+ }
+ return 0;
+}
+
+/* Read GPIO I2C configuration */
+/*
+ * DT example.
+ * gpio-i2c {
+ * i2c@0 {
+ * sda = <gpio-pin>;
+ * scl = <gpio-pin>;
+ * delay = <delay>;
+ * timeout = <timeout>;
+ * };
+ * i2c@1 {
+ * :
+ * };
+ * :
+ * };
+ */
+static int sm501_parse_dt_gpio_i2c(struct device *dev, struct sm501_platdata *plat,
+ struct device_node *np)
+{
+ struct device_node *i2c_group, *child;
+ unsigned int i;
+ u32 i2c_nr;
+ int err;
+
+ i2c_group = of_get_child_by_name(np, "gpio-i2c");
+ if (!i2c_group)
+ return 0;
+
+ i2c_nr = of_get_child_count(i2c_group);
+ plat->gpio_i2c = devm_kzalloc(dev, sizeof(*plat->gpio_i2c) * i2c_nr,
+ GFP_KERNEL);
+ if (!plat->gpio_i2c)
+ return -ENOMEM;
+
+ plat->gpio_i2c_nr = i2c_nr;
+ i = 0;
+ for_each_child_of_node(i2c_group, child) {
+ u32 bus;
+
+ if (sscanf(child->full_name, "i2c@%u", &bus) != 1) {
+ dev_warn(dev, "Unknown address %s\n", child->name);
+ continue;
+ }
+
+ err = 0;
+ plat->gpio_i2c[i].bus_num = bus;
+ err += read_i2c_prop(dev, child, "sda", &plat->gpio_i2c[i].pin_sda);
+ err += read_i2c_prop(dev, child, "scl", &plat->gpio_i2c[i].pin_scl);
+ err += read_i2c_prop(dev, child, "delay", &plat->gpio_i2c[i].udelay);
+ err += read_i2c_prop(dev, child, "timeout", &plat->gpio_i2c[i].timeout);
+ if (err == 0)
+ i++;
+ }
+
+ return 0;
+}
+
+/* Read device functions */
+static u32 sm501_read_devices(struct device *dev, struct device_node *np)
+{
+ static const char * const funcname[] = {
+ "usb-host", "usb-slave", "ssp0", "ssp1",
+ "uart0", "uart1", "fbaccel", "ac97",
+ "i2s", "gpio",
+ };
+ struct property *prop;
+ unsigned int i;
+ const char *s;
+ u32 ret = 0;
+
+ of_property_for_each_string(np, "smi,devices", prop, s) {
+ for (i = 0; i < ARRAY_SIZE(funcname); i++) {
+ if (strcmp(s, funcname[i]) == 0) {
+ ret |= 1 << i;
+ goto next;
+ }
+ }
+ dev_warn(dev, "Unknown device function '%s'", s);
+next:
+ }
+ if (!ret)
+ dev_warn(dev, "devices not defined. disable all functions.");
+ return ret;
+}
+
+/* Build platform_data from OF property */
+struct plat_dt {
+ struct sm501_platdata plat;
+ struct sm501_initdata init;
+};
+
+static int sm501_parse_dt(struct sm501_devdata *sm, struct device_node *np)
+{
+ struct sm501_platdata *plat;
+ struct plat_dt *dt_p;
+ u32 word;
+ int ret;
+
+ dt_p = devm_kzalloc(sm->dev, sizeof(*dt_p), GFP_KERNEL);
+ if (!dt_p)
+ return -ENOMEM;
+
+ plat = &dt_p->plat;
+ plat->init = &dt_p->init;
+
+ plat->init->devices = sm501_read_devices(sm->dev, np);
+ /* mclk and m1xclk are not u32, so convert between them using intermediate variables. */
+ of_property_read_u32(np, "smi,mclk", &word);
+ plat->init->mclk = word;
+ of_property_read_u32(np, "smi,m1xclk", &word);
+ plat->init->m1xclk = word;
+
+ sm501_of_read_config(sm->dev, np, "misc-timing",
+ misc_timing, misc_timing_flag,
+ &plat->init->misc_timing);
+ sm501_of_read_config(sm->dev, np, "misc-control",
+ misc_control, misc_control_flag,
+ &plat->init->misc_control);
+ sm501_of_read_gpio(sm->dev, np,
+ &plat->init->gpio_high, &plat->init->gpio_low);
+
+ if (IS_ENABLED(CONFIG_MFD_SM501_GPIO) &&
+ (plat->init->devices & SM501_USE_GPIO)) {
+ ret = sm501_parse_dt_gpio_i2c(sm->dev, plat, np);
+ if (ret)
+ return ret;
+ }
+ sm->platdata = plat;
+ return 0;
+}
+
static int sm501_plat_probe(struct platform_device *dev)
{
struct sm501_devdata *sm;
@@ -1406,6 +1715,12 @@ static int sm501_plat_probe(struct platform_device *dev)
goto err_res;
}
+ if (IS_ENABLED(CONFIG_OF) && dev->dev.of_node) {
+ ret = sm501_parse_dt(sm, dev->dev.of_node);
+ if (ret)
+ goto err_res;
+ }
+
platform_set_drvdata(dev, sm);
sm->regs = ioremap(sm->io_res->start, resource_size(sm->io_res));
diff --git a/drivers/video/fbdev/sm501fb.c b/drivers/video/fbdev/sm501fb.c
index d6fdc1737cd2..5de00f2570aa 100644
--- a/drivers/video/fbdev/sm501fb.c
+++ b/drivers/video/fbdev/sm501fb.c
@@ -1932,6 +1932,106 @@ static int sm501fb_start_one(struct sm501fb_info *info,
return 0;
}
+#if defined(CONFIG_OF)
+static u32 read_display_flags(struct device_node *np)
+{
+ static const char * const name[] = {
+ "use-init-done", "disable-at-exit", "use-hwcursor", "use-hwaccel",
+ "panel-no-fpen", "panel-no-vbiasen", "panel-inv-fpen", "panel-inv-vbiasen",
+ };
+
+ struct property *prop;
+ unsigned int i;
+ const char *s;
+ u32 ret = 0;
+
+ of_property_for_each_string(np, "smi,flags", prop, s) {
+ for (i = 0; i < ARRAY_SIZE(name); i++) {
+ if (strcmp(s, name[i]) == 0) {
+ ret |= 1 << i;
+ break;
+ }
+ }
+ }
+ return ret;
+}
+
+/* parse CRT / panel configuration */
+static struct sm501_platdata_fbsub *dt_fbsub(struct device *dev,
+ struct device_node *np,
+ const char *name)
+{
+ struct sm501_platdata_fbsub *fbsub = NULL;
+ struct fb_videomode *def_mode = NULL;
+ struct device_node *child;
+ const void *p_edid;
+ u32 flags = 0;
+ u32 bpp = 0;
+ int len;
+
+ child = of_get_child_by_name(np, name);
+ if (child == NULL)
+ return NULL;
+
+ p_edid = of_get_property(child, "edid", &len);
+ if (p_edid && len == EDID_LENGTH) {
+ struct fb_monspecs *specs;
+ u8 *edid;
+
+ edid = kmemdup(p_edid, EDID_LENGTH, GFP_KERNEL);
+ if (edid) {
+ specs = kzalloc(sizeof(*specs), GFP_KERNEL);
+ if (specs) {
+ fb_edid_to_monspecs(edid, specs);
+ def_mode = specs->modedb;
+ }
+ }
+ kfree(edid);
+ }
+
+ of_property_read_u32(child, "bpp", &bpp);
+
+ /* If flags property is obtained, fbsub is returned. */
+ flags = read_display_flags(child);
+ if (flags) {
+ fbsub = devm_kzalloc(dev, sizeof(*fbsub), GFP_KERNEL);
+ if (fbsub) {
+ fbsub->def_mode = def_mode;
+ fbsub->def_bpp = bpp;
+ fbsub->flags = flags;
+ }
+ }
+ return fbsub;
+}
+
+/* Build platform_data from OF property */
+static struct sm501_platdata_fb *pdata_from_dt(struct device *dev, struct device_node *np)
+{
+ enum sm501_fb_routing fb_route = SM501_FB_OWN;
+ struct sm501_platdata_fb *pdata = NULL;
+ struct sm501_platdata_fbsub *fb_crt;
+ struct sm501_platdata_fbsub *fb_pnl;
+ unsigned int flags = 0;
+
+ if (of_property_read_bool(np, "route-crt-panel"))
+ fb_route = SM501_FB_CRT_PANEL;
+ if (of_property_read_bool(np, "swap-fb-endian"))
+ flags = SM501_FBPD_SWAP_FB_ENDIAN;
+ fb_crt = dt_fbsub(dev, np, "crt");
+ fb_pnl = dt_fbsub(dev, np, "panel");
+ if (fb_crt || fb_pnl) {
+ pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
+ if (pdata) {
+ pdata->fb_route = fb_route;
+ pdata->flags = flags;
+ pdata->fb_crt = fb_crt;
+ pdata->fb_pnl = fb_pnl;
+ }
+ }
+ return pdata;
+}
+#endif
+
static int sm501fb_probe(struct platform_device *pdev)
{
struct sm501fb_info *info;
@@ -1974,6 +2074,12 @@ static int sm501fb_probe(struct platform_device *pdev)
if (info->edid_data)
found = 1;
}
+ /* Get platform data compatible configuration */
+ if (!found) {
+ info->pdata = pdata_from_dt(dev, np);
+ if (info->pdata)
+ found = 1;
+ }
}
#endif
if (!found) {
--
2.39.2
^ permalink raw reply related
* [RESEND v7 25/37] dt-binding: sh: cpus: Add SH CPUs json-schema
From: Yoshinori Sato @ 2024-04-04 5:14 UTC (permalink / raw)
To: linux-sh
Cc: Yoshinori Sato, Damien Le Moal, Niklas Cassel, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
Michael Turquette, Stephen Boyd, David Airlie, Daniel Vetter,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
Thomas Gleixner, Bjorn Helgaas, Lorenzo Pieralisi,
Krzysztof Wilczyński, Greg Kroah-Hartman, Jiri Slaby,
Magnus Damm, Daniel Lezcano, Rich Felker,
John Paul Adrian Glaubitz, Lee Jones, Helge Deller,
Heiko Stuebner, Shawn Guo, Sebastian Reichel, Chris Morgan,
Linus Walleij, Arnd Bergmann, David Rientjes, Hyeonggon Yoo,
Vlastimil Babka, Baoquan He, Andrew Morton, Guenter Roeck,
Kefeng Wang, Stephen Rothwell, Javier Martinez Canillas, Guo Ren,
Azeem Shaikh, Max Filippov, Jonathan Corbet, Jacky Huang,
Herve Codina, Manikanta Guntupalli, Anup Patel, Biju Das,
Uwe Kleine-König, Sam Ravnborg, Sergey Shtylyov,
Laurent Pinchart, linux-ide, devicetree, linux-kernel,
linux-renesas-soc, linux-clk, dri-devel, linux-pci, linux-serial,
linux-fbdev
In-Reply-To: <cover.1712207606.git.ysato@users.sourceforge.jp>
Renesas SH series and compatible ISA CPUs.
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
---
.../devicetree/bindings/sh/cpus.yaml | 63 +++++++++++++++++++
1 file changed, 63 insertions(+)
create mode 100644 Documentation/devicetree/bindings/sh/cpus.yaml
diff --git a/Documentation/devicetree/bindings/sh/cpus.yaml b/Documentation/devicetree/bindings/sh/cpus.yaml
new file mode 100644
index 000000000000..9e5640793d76
--- /dev/null
+++ b/Documentation/devicetree/bindings/sh/cpus.yaml
@@ -0,0 +1,63 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sh/cpus.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Renesas SuperH CPUs
+
+maintainers:
+ - Yoshinori Sato <ysato@users.sourceforge.jp>
+
+description: |+
+ Definition of CPU core with Renesas SuperH and compatible instruction set.
+
+properties:
+ compatible:
+ anyOf:
+ - items:
+ - enum:
+ - renesas,sh2a
+ - renesas,sh3
+ - renesas,sh4
+ - renesas,sh4a
+ - jcore,j2
+ - const: renesas,sh2
+ - const: renesas,sh2
+
+ clocks:
+ maxItems: 1
+
+ reg:
+ maxItems: 1
+
+ device_type:
+ const: cpu
+
+required:
+ - compatible
+ - reg
+ - device_type
+
+additionalProperties: true
+
+examples:
+ - |
+ #include <dt-bindings/clock/sh7750-cpg.h>
+ cpus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ cpu: cpu@0 {
+ compatible = "renesas,sh4", "renesas,sh2";
+ device_type = "cpu";
+ reg = <0>;
+ clocks = <&cpg SH7750_CPG_ICK>;
+ clock-names = "ick";
+ icache-size = <16384>;
+ icache-line-size = <32>;
+ dcache-size = <32768>;
+ dcache-line-size = <32>;
+ };
+ };
+...
--
2.39.2
^ permalink raw reply related
* [RESEND v7 26/37] dt-bindings: vendor-prefixes: Add iodata
From: Yoshinori Sato @ 2024-04-04 5:14 UTC (permalink / raw)
To: linux-sh
Cc: Yoshinori Sato, Damien Le Moal, Niklas Cassel, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
Michael Turquette, Stephen Boyd, David Airlie, Daniel Vetter,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
Thomas Gleixner, Bjorn Helgaas, Lorenzo Pieralisi,
Krzysztof Wilczyński, Greg Kroah-Hartman, Jiri Slaby,
Magnus Damm, Daniel Lezcano, Rich Felker,
John Paul Adrian Glaubitz, Lee Jones, Helge Deller,
Heiko Stuebner, Shawn Guo, Sebastian Reichel, Chris Morgan,
Linus Walleij, Arnd Bergmann, David Rientjes, Hyeonggon Yoo,
Vlastimil Babka, Baoquan He, Andrew Morton, Guenter Roeck,
Kefeng Wang, Stephen Rothwell, Javier Martinez Canillas, Guo Ren,
Azeem Shaikh, Max Filippov, Jonathan Corbet, Jacky Huang,
Herve Codina, Manikanta Guntupalli, Anup Patel, Biju Das,
Uwe Kleine-König, Sam Ravnborg, Sergey Shtylyov,
Laurent Pinchart, linux-ide, devicetree, linux-kernel,
linux-renesas-soc, linux-clk, dri-devel, linux-pci, linux-serial,
linux-fbdev
In-Reply-To: <cover.1712207606.git.ysato@users.sourceforge.jp>
Add IO DATA DEVICE INC.
https://www.iodata.com/
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index b97d298b3eb6..769f9b8c9bd3 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -708,6 +708,8 @@ patternProperties:
description: Inventec
"^inversepath,.*":
description: Inverse Path
+ "^iodata,.*":
+ description: IO DATA DEVICE Inc.
"^iom,.*":
description: Iomega Corporation
"^irondevice,.*":
--
2.39.2
^ permalink raw reply related
* [RESEND v7 27/37] dt-bindings: ata: ata-generic: Add new targets
From: Yoshinori Sato @ 2024-04-04 5:14 UTC (permalink / raw)
To: linux-sh
Cc: Yoshinori Sato, Damien Le Moal, Niklas Cassel, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
Michael Turquette, Stephen Boyd, David Airlie, Daniel Vetter,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
Thomas Gleixner, Bjorn Helgaas, Lorenzo Pieralisi,
Krzysztof Wilczyński, Greg Kroah-Hartman, Jiri Slaby,
Magnus Damm, Daniel Lezcano, Rich Felker,
John Paul Adrian Glaubitz, Lee Jones, Helge Deller,
Heiko Stuebner, Shawn Guo, Sebastian Reichel, Chris Morgan,
Linus Walleij, Arnd Bergmann, David Rientjes, Hyeonggon Yoo,
Vlastimil Babka, Baoquan He, Andrew Morton, Guenter Roeck,
Kefeng Wang, Stephen Rothwell, Javier Martinez Canillas, Guo Ren,
Azeem Shaikh, Max Filippov, Jonathan Corbet, Jacky Huang,
Herve Codina, Manikanta Guntupalli, Anup Patel, Biju Das,
Uwe Kleine-König, Sam Ravnborg, Sergey Shtylyov,
Laurent Pinchart, linux-ide, devicetree, linux-kernel,
linux-renesas-soc, linux-clk, dri-devel, linux-pci, linux-serial,
linux-fbdev
In-Reply-To: <cover.1712207606.git.ysato@users.sourceforge.jp>
Added new ata-generic target.
- iodata,usl-5p-ata
- renesas,rts7751r2d-ata
Each boards have simple IDE Interface. Use ATA generic driver.
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
---
Documentation/devicetree/bindings/ata/ata-generic.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/ata/ata-generic.yaml b/Documentation/devicetree/bindings/ata/ata-generic.yaml
index 0697927f3d7e..1025b3b351d0 100644
--- a/Documentation/devicetree/bindings/ata/ata-generic.yaml
+++ b/Documentation/devicetree/bindings/ata/ata-generic.yaml
@@ -18,6 +18,8 @@ properties:
- enum:
- arm,vexpress-cf
- fsl,mpc8349emitx-pata
+ - iodata,usl-5p-ata
+ - renesas,rts7751r2d-ata
- const: ata-generic
reg:
--
2.39.2
^ permalink raw reply related
* [RESEND v7 28/37] dt-bindings: soc: renesas: sh: Add SH7751 based target
From: Yoshinori Sato @ 2024-04-04 5:14 UTC (permalink / raw)
To: linux-sh
Cc: Yoshinori Sato, Damien Le Moal, Niklas Cassel, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
Michael Turquette, Stephen Boyd, David Airlie, Daniel Vetter,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
Thomas Gleixner, Bjorn Helgaas, Lorenzo Pieralisi,
Krzysztof Wilczyński, Greg Kroah-Hartman, Jiri Slaby,
Magnus Damm, Daniel Lezcano, Rich Felker,
John Paul Adrian Glaubitz, Lee Jones, Helge Deller,
Heiko Stuebner, Shawn Guo, Sebastian Reichel, Chris Morgan,
Linus Walleij, Arnd Bergmann, David Rientjes, Hyeonggon Yoo,
Vlastimil Babka, Baoquan He, Andrew Morton, Guenter Roeck,
Kefeng Wang, Stephen Rothwell, Javier Martinez Canillas, Guo Ren,
Azeem Shaikh, Max Filippov, Jonathan Corbet, Jacky Huang,
Herve Codina, Manikanta Guntupalli, Anup Patel, Biju Das,
Uwe Kleine-König, Sam Ravnborg, Sergey Shtylyov,
Laurent Pinchart, linux-ide, devicetree, linux-kernel,
linux-renesas-soc, linux-clk, dri-devel, linux-pci, linux-serial,
linux-fbdev
In-Reply-To: <cover.1712207606.git.ysato@users.sourceforge.jp>
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
---
.../devicetree/bindings/soc/renesas/sh.yaml | 27 +++++++++++++++++++
1 file changed, 27 insertions(+)
create mode 100644 Documentation/devicetree/bindings/soc/renesas/sh.yaml
diff --git a/Documentation/devicetree/bindings/soc/renesas/sh.yaml b/Documentation/devicetree/bindings/soc/renesas/sh.yaml
new file mode 100644
index 000000000000..9e0f69a8ee6a
--- /dev/null
+++ b/Documentation/devicetree/bindings/soc/renesas/sh.yaml
@@ -0,0 +1,27 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/renesas/sh.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Renesas SuperH Platform
+
+maintainers:
+ - Yoshinori Sato <ysato@users.sourceforge.jp>
+
+properties:
+ $nodename:
+ const: '/'
+ compatible:
+ oneOf:
+ - description: SH7751R based platform
+ items:
+ - enum:
+ - renesas,rts7751r2d # Renesas SH4 2D graphics board
+ - iodata,landisk # LANDISK HDL-U
+ - iodata,usl-5p # USL-5P
+ - const: renesas,sh7751r
+
+additionalProperties: true
+
+...
--
2.39.2
^ permalink raw reply related
* [RESEND v7 29/37] sh: SH7751R SoC Internal peripheral definition dtsi.
From: Yoshinori Sato @ 2024-04-04 5:14 UTC (permalink / raw)
To: linux-sh
Cc: Yoshinori Sato, Damien Le Moal, Niklas Cassel, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
Michael Turquette, Stephen Boyd, David Airlie, Daniel Vetter,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
Thomas Gleixner, Bjorn Helgaas, Lorenzo Pieralisi,
Krzysztof Wilczyński, Greg Kroah-Hartman, Jiri Slaby,
Magnus Damm, Daniel Lezcano, Rich Felker,
John Paul Adrian Glaubitz, Lee Jones, Helge Deller,
Heiko Stuebner, Shawn Guo, Sebastian Reichel, Chris Morgan,
Linus Walleij, Arnd Bergmann, David Rientjes, Hyeonggon Yoo,
Vlastimil Babka, Baoquan He, Andrew Morton, Guenter Roeck,
Kefeng Wang, Stephen Rothwell, Javier Martinez Canillas, Guo Ren,
Azeem Shaikh, Max Filippov, Jonathan Corbet, Jacky Huang,
Herve Codina, Manikanta Guntupalli, Anup Patel, Biju Das,
Uwe Kleine-König, Sam Ravnborg, Sergey Shtylyov,
Laurent Pinchart, linux-ide, devicetree, linux-kernel,
linux-renesas-soc, linux-clk, dri-devel, linux-pci, linux-serial,
linux-fbdev
In-Reply-To: <cover.1712207606.git.ysato@users.sourceforge.jp>
SH7751R internal peripherals device tree.
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
---
arch/sh/boot/dts/sh7751r.dtsi | 105 ++++++++++++++++++++++++++++++++++
1 file changed, 105 insertions(+)
create mode 100644 arch/sh/boot/dts/sh7751r.dtsi
diff --git a/arch/sh/boot/dts/sh7751r.dtsi b/arch/sh/boot/dts/sh7751r.dtsi
new file mode 100644
index 000000000000..61b2af5bebde
--- /dev/null
+++ b/arch/sh/boot/dts/sh7751r.dtsi
@@ -0,0 +1,105 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree Source for the SH7751R SoC
+ */
+
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/clock/sh7750-cpg.h>
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ cpus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ cpu@0 {
+ compatible = "renesas,sh4", "renesas,sh2";
+ device_type = "cpu";
+ reg = <0>;
+ clocks = <&cpg SH7750_CPG_ICK>;
+ clock-names = "ick";
+ icache-size = <16384>;
+ icache-line-size = <32>;
+ dcache-size = <32768>;
+ dcache-line-size = <32>;
+ };
+ };
+
+ extal: oscillator {
+ #clock-cells = <0>;
+ compatible = "fixed-clock";
+ clock-frequency = <0>;
+ clock-output-names = "extal";
+ };
+
+ soc {
+ compatible = "simple-bus";
+ interrupt-parent = <&shintc>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ cpg: clock-controller@ffc00000 {
+ #clock-cells = <1>;
+ #power-domain-cells = <0>;
+ compatible = "renesas,sh7751r-cpg";
+ clocks = <&extal>;
+ clock-names = "extal";
+ reg = <0xffc00000 20>, <0xfe0a0000 16>;
+ reg-names = "FRQCR", "CLKSTP00";
+ renesas,mode = <0>;
+ };
+
+ shintc: interrupt-controller@ffd00000 {
+ compatible = "renesas,sh7751-intc";
+ #interrupt-cells = <1>;
+ interrupt-controller;
+ reg = <0xffd00000 20>, <0xfe080000 128>;
+ reg-names = "ICR", "INTPRI00";
+ };
+
+ /* sci0 is rarely used, so it is not defined here. */
+ scif1: serial@ffe80000 {
+ compatible = "renesas,scif-sh7751", "renesas,scif";
+ reg = <0xffe80000 0x100>;
+ interrupts = <0x700>,
+ <0x720>,
+ <0x760>,
+ <0x740>;
+ interrupt-names = "eri", "rxi", "txi", "bri";
+ clocks = <&cpg SH7750_MSTP_SCIF>;
+ clock-names = "fck";
+ power-domains = <&cpg>;
+ status = "disabled";
+ };
+
+ /* Normally ch0 and ch1 are used, so we will define ch0 to ch2 here. */
+ tmu0: timer@ffd80000 {
+ compatible = "renesas,tmu-sh7750", "renesas,tmu";
+ reg = <0xffd80000 12>;
+ interrupts = <0x400>,
+ <0x420>,
+ <0x440>,
+ <0x460>;
+ interrupt-names = "tuni0", "tuni1", "tuni2", "ticpi2";
+ clocks = <&cpg SH7750_MSTP_TMU012>;
+ clock-names = "fck";
+ power-domains = <&cpg>;
+ #renesas,channels = <3>;
+ };
+
+ pcic: pci@fe200000 {
+ compatible = "renesas,sh7751-pci";
+ #address-cells = <3>;
+ #size-cells = <2>;
+ #interrupt-cells = <1>;
+ device_type = "pci";
+ bus-range = <0 0>;
+ reg = <0xfe200000 0x0400>,
+ <0xff800000 0x0100>;
+ status = "disabled";
+ };
+ };
+};
--
2.39.2
^ permalink raw reply related
* [RESEND v7 30/37] sh: add RTS7751R2D Plus DTS
From: Yoshinori Sato @ 2024-04-04 5:14 UTC (permalink / raw)
To: linux-sh
Cc: Yoshinori Sato, Damien Le Moal, Niklas Cassel, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
Michael Turquette, Stephen Boyd, David Airlie, Daniel Vetter,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
Thomas Gleixner, Bjorn Helgaas, Lorenzo Pieralisi,
Krzysztof Wilczyński, Greg Kroah-Hartman, Jiri Slaby,
Magnus Damm, Daniel Lezcano, Rich Felker,
John Paul Adrian Glaubitz, Lee Jones, Helge Deller,
Heiko Stuebner, Shawn Guo, Sebastian Reichel, Chris Morgan,
Linus Walleij, Arnd Bergmann, David Rientjes, Hyeonggon Yoo,
Vlastimil Babka, Baoquan He, Andrew Morton, Guenter Roeck,
Kefeng Wang, Stephen Rothwell, Javier Martinez Canillas, Guo Ren,
Azeem Shaikh, Max Filippov, Jonathan Corbet, Jacky Huang,
Herve Codina, Manikanta Guntupalli, Anup Patel, Biju Das,
Uwe Kleine-König, Sam Ravnborg, Sergey Shtylyov,
Laurent Pinchart, linux-ide, devicetree, linux-kernel,
linux-renesas-soc, linux-clk, dri-devel, linux-pci, linux-serial,
linux-fbdev
In-Reply-To: <cover.1712207606.git.ysato@users.sourceforge.jp>
Renesas RTS7751R2D Plus devicetree.
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
---
arch/sh/boot/dts/rts7751r2dplus.dts | 169 ++++++++++++++++++++++++++++
1 file changed, 169 insertions(+)
create mode 100644 arch/sh/boot/dts/rts7751r2dplus.dts
diff --git a/arch/sh/boot/dts/rts7751r2dplus.dts b/arch/sh/boot/dts/rts7751r2dplus.dts
new file mode 100644
index 000000000000..c3aca9316c76
--- /dev/null
+++ b/arch/sh/boot/dts/rts7751r2dplus.dts
@@ -0,0 +1,169 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree Source for the Renesas RTS7751R2D Plus
+ */
+
+/dts-v1/;
+
+#include "sh7751r.dtsi"
+#include <dt-bindings/display/sm501.h>
+
+/ {
+ model = "Renesas RTS7715R2D Plus";
+ compatible = "renesas,rts7751r2d", "renesas,sh7751r";
+
+ aliases {
+ serial0 = &scif1;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ memory@c000000 {
+ device_type = "memory";
+ reg = <0x0c000000 0x4000000>;
+ };
+
+ r2dintc: interrupt-controller@a4000000 {
+ compatible = "renesas,sh7751-irl-ext";
+ reg = <0xa4000000 0x02>;
+ interrupt-controller;
+ #address-cells = <0>;
+ #interrupt-cells = <2>;
+ /*
+ * b15: 12 - TP
+ * b14: 9 - PCI INTA
+ * b13: 10 - PCI INTB
+ * b12: 3 - PCI INTC
+ * b11: 0 - PCI INTD
+ * b10: 4 - SM501
+ * b9: 1 - CF IDE
+ * b8: 2 - CF CD
+ * b7: 8 - SDCARD
+ * b6: 5 - KEY
+ * b5: 6 - RTC ALARM
+ * b4: 7 - RTC T
+ * b3: unassigned
+ * b2: unassigned
+ * b1: unassigned
+ * b0: 11 -EXT
+ */
+ renesas,enable-reg = <12 9 10 3 0 4 1 2 8 5 6 7 15 15 15 11>;
+ };
+
+ display@0 {
+ compatible = "smi,sm501";
+ reg = <0x10000000 0x03e00000
+ 0x13e00000 0x00200000>;
+ interrupt-parent = <&r2dintc>;
+ interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
+ mode = "640x480-16@60";
+ little-endian;
+ smi,devices = "usb-host", "uart0";
+ swap-fb-endian;
+
+ crt {
+ smi,flags = "use-init-done",
+ "disable-at-exit",
+ "use-hwcursor",
+ "use-hwaccel";
+ };
+
+ panel {
+ bpp = <16>;
+ 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];
+ smi,flags = "use-init-done",
+ "disable-at-exit",
+ "use-hwcursor",
+ "use-hwaccel";
+ };
+ misc-timing {
+ ex = <SM501_MISC_TIMING_EX_HOLD_16>;
+ xc = <SM501_MISC_TIMING_XC_INTERNAL>;
+ usb-over-current-detect-disable;
+ };
+ misc-control {
+ pad = <SM501_MISC_CONTROL_PAD_24>;
+ usbclk = <SM501_MISC_CONTROL_USBCLK_XTAL>;
+ sh-ready-low;
+ };
+ };
+
+ compact-flash@b4001000 {
+ compatible = "renesas,rts7751r2d-ata", "ata-generic";
+ reg = <0xb4001000 0x0e>, <0xb400080c 2>;
+ reg-shift = <1>;
+ interrupt-parent = <&r2dintc>;
+ interrupts = <1 IRQ_TYPE_LEVEL_LOW>;
+ };
+
+ flash@0 {
+ compatible = "cfi-flash";
+ reg = <0x00000000 0x02000000>;
+ device-width = <2>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "U-Boot";
+ reg = <0x00000000 0x00040000>;
+ };
+
+ partition@1 {
+ label = "Environemt";
+ reg = <0x00040000 0x00040000>;
+ };
+
+ partition@2 {
+ label = "Kernel";
+ reg = <0x00080000 0x001c0000>;
+ };
+
+ partition@3 {
+ label = "Flash_FS";
+ reg = <0x00240000 0x00dc0000>;
+ };
+ };
+};
+
+&extal {
+ clock-frequency = <22222222>;
+};
+
+&cpg {
+ renesas,mode = <5>;
+};
+
+&scif1 {
+ status = "okay";
+};
+
+&pcic {
+ ranges = <0x02000000 0 0xfd000000 0xfd000000 0 0x01000000>,
+ <0x01000000 0 0x00000000 0xfe240000 0 0x00040000>;
+ dma-ranges = <0x01000000 0 0xab000000 0xab000000 0 0x00000001>,
+ <0x02000000 0 0x0c000000 0x0c000000 0 0x04000000>,
+ <0x02000000 0 0xd0000000 0xd0000000 0 0x00000001>;
+ interrupt-map = <0x0000 0 0 1 &r2dintc 9 IRQ_TYPE_LEVEL_LOW>,
+ <0x0000 0 0 2 &r2dintc 10 IRQ_TYPE_LEVEL_LOW>,
+ <0x0000 0 0 3 &r2dintc 3 IRQ_TYPE_LEVEL_LOW>,
+ <0x0000 0 0 4 &r2dintc 0 IRQ_TYPE_LEVEL_LOW>,
+ <0x0800 0 0 1 &r2dintc 10 IRQ_TYPE_LEVEL_LOW>,
+ <0x0800 0 0 2 &r2dintc 3 IRQ_TYPE_LEVEL_LOW>,
+ <0x0800 0 0 3 &r2dintc 0 IRQ_TYPE_LEVEL_LOW>,
+ <0x0800 0 0 4 &r2dintc 9 IRQ_TYPE_LEVEL_LOW>,
+ <0x1000 0 0 1 &r2dintc 3 IRQ_TYPE_LEVEL_LOW>,
+ <0x1000 0 0 2 &r2dintc 0 IRQ_TYPE_LEVEL_LOW>,
+ <0x1000 0 0 3 &r2dintc 9 IRQ_TYPE_LEVEL_LOW>,
+ <0x1000 0 0 4 &r2dintc 10 IRQ_TYPE_LEVEL_LOW>;
+ interrupt-map-mask = <0x1800 0 0 7>;
+ status = "okay";
+};
--
2.39.2
^ permalink raw reply related
* [RESEND v7 31/37] sh: Add IO DATA LANDISK dts
From: Yoshinori Sato @ 2024-04-04 5:14 UTC (permalink / raw)
To: linux-sh
Cc: Yoshinori Sato, Damien Le Moal, Niklas Cassel, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
Michael Turquette, Stephen Boyd, David Airlie, Daniel Vetter,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
Thomas Gleixner, Bjorn Helgaas, Lorenzo Pieralisi,
Krzysztof Wilczyński, Greg Kroah-Hartman, Jiri Slaby,
Magnus Damm, Daniel Lezcano, Rich Felker,
John Paul Adrian Glaubitz, Lee Jones, Helge Deller,
Heiko Stuebner, Shawn Guo, Sebastian Reichel, Chris Morgan,
Linus Walleij, Arnd Bergmann, David Rientjes, Hyeonggon Yoo,
Vlastimil Babka, Baoquan He, Andrew Morton, Guenter Roeck,
Kefeng Wang, Stephen Rothwell, Javier Martinez Canillas, Guo Ren,
Azeem Shaikh, Max Filippov, Jonathan Corbet, Jacky Huang,
Herve Codina, Manikanta Guntupalli, Anup Patel, Biju Das,
Uwe Kleine-König, Sam Ravnborg, Sergey Shtylyov,
Laurent Pinchart, linux-ide, devicetree, linux-kernel,
linux-renesas-soc, linux-clk, dri-devel, linux-pci, linux-serial,
linux-fbdev
In-Reply-To: <cover.1712207606.git.ysato@users.sourceforge.jp>
IO DATA DEVICE Inc. LANDISK HDL-U devicetree.
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
---
arch/sh/boot/dts/landisk.dts | 77 ++++++++++++++++++++++++++++++++++++
1 file changed, 77 insertions(+)
create mode 100644 arch/sh/boot/dts/landisk.dts
diff --git a/arch/sh/boot/dts/landisk.dts b/arch/sh/boot/dts/landisk.dts
new file mode 100644
index 000000000000..d3dc52295114
--- /dev/null
+++ b/arch/sh/boot/dts/landisk.dts
@@ -0,0 +1,77 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree Source for the IO DATA DEVICE LANDISK
+ */
+
+/dts-v1/;
+
+#include "sh7751r.dtsi"
+
+/ {
+ model = "IO DATA Device LANDISK";
+ compatible = "iodata,landisk", "renesas,sh7751r";
+
+ aliases {
+ serial0 = &scif1;
+ };
+
+ chosen {
+ stdout-path = "serial0:9600n8";
+ };
+
+ memory@c000000 {
+ device_type = "memory";
+ reg = <0x0c000000 0x4000000>;
+ };
+
+ julianintc: interrupt-controller@b0000005 {
+ compatible = "renesas,sh7751-irl-ext";
+ reg = <0xb0000005 0x01>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ /*
+ * b7: Not assigned
+ * b6: Power switch
+ * b5: Not assigned
+ * b4: Not assigned
+ * b3: PCI-INTD
+ * b2: PCI-INTC
+ * b1: PCI-INTB
+ * b0: PCI-INTA
+ */
+ renesas,enable-reg = <15 11 15 15 8 7 6 5>;
+ };
+};
+
+&extal {
+ clock-frequency = <22222222>;
+};
+
+&cpg {
+ renesas,mode = <5>;
+};
+
+&scif1 {
+ status = "okay";
+};
+
+&pcic {
+ ranges = <0x02000000 0 0xfd000000 0xfd000000 0 0x01000000>,
+ <0x01000000 0 0x00000000 0xfe240000 0 0x00040000>;
+ dma-ranges = <0x02000000 0 0x0c000000 0x0c000000 0 0x04000000>,
+ <0x02000000 0 0xd0000000 0xd0000000 0 0x00000001>;
+ interrupt-map = <0x0000 0 0 1 &julianintc 5 IRQ_TYPE_LEVEL_LOW>,
+ <0x0000 0 0 2 &julianintc 6 IRQ_TYPE_LEVEL_LOW>,
+ <0x0000 0 0 3 &julianintc 7 IRQ_TYPE_LEVEL_LOW>,
+ <0x0000 0 0 4 &julianintc 8 IRQ_TYPE_LEVEL_LOW>,
+ <0x0800 0 0 1 &julianintc 6 IRQ_TYPE_LEVEL_LOW>,
+ <0x0800 0 0 2 &julianintc 7 IRQ_TYPE_LEVEL_LOW>,
+ <0x0800 0 0 3 &julianintc 8 IRQ_TYPE_LEVEL_LOW>,
+ <0x0800 0 0 4 &julianintc 5 IRQ_TYPE_LEVEL_LOW>,
+ <0x1000 0 0 1 &julianintc 7 IRQ_TYPE_LEVEL_LOW>,
+ <0x1000 0 0 2 &julianintc 8 IRQ_TYPE_LEVEL_LOW>,
+ <0x1000 0 0 3 &julianintc 5 IRQ_TYPE_LEVEL_LOW>,
+ <0x1000 0 0 4 &julianintc 6 IRQ_TYPE_LEVEL_LOW>;
+ interrupt-map-mask = <0x1800 0 0 7>;
+ status = "okay";
+};
--
2.39.2
^ permalink raw reply related
* [RESEND v7 32/37] sh: Add IO DATA USL-5P dts
From: Yoshinori Sato @ 2024-04-04 5:14 UTC (permalink / raw)
To: linux-sh
Cc: Yoshinori Sato, Damien Le Moal, Niklas Cassel, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
Michael Turquette, Stephen Boyd, David Airlie, Daniel Vetter,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
Thomas Gleixner, Bjorn Helgaas, Lorenzo Pieralisi,
Krzysztof Wilczyński, Greg Kroah-Hartman, Jiri Slaby,
Magnus Damm, Daniel Lezcano, Rich Felker,
John Paul Adrian Glaubitz, Lee Jones, Helge Deller,
Heiko Stuebner, Shawn Guo, Sebastian Reichel, Chris Morgan,
Linus Walleij, Arnd Bergmann, David Rientjes, Hyeonggon Yoo,
Vlastimil Babka, Baoquan He, Andrew Morton, Guenter Roeck,
Kefeng Wang, Stephen Rothwell, Javier Martinez Canillas, Guo Ren,
Azeem Shaikh, Max Filippov, Jonathan Corbet, Jacky Huang,
Herve Codina, Manikanta Guntupalli, Anup Patel, Biju Das,
Uwe Kleine-König, Sam Ravnborg, Sergey Shtylyov,
Laurent Pinchart, linux-ide, devicetree, linux-kernel,
linux-renesas-soc, linux-clk, dri-devel, linux-pci, linux-serial,
linux-fbdev
In-Reply-To: <cover.1712207606.git.ysato@users.sourceforge.jp>
IO DATA DEVICE Inc. USL-5P devicetree.
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
---
arch/sh/boot/dts/usl-5p.dts | 85 +++++++++++++++++++++++++++++++++++++
1 file changed, 85 insertions(+)
create mode 100644 arch/sh/boot/dts/usl-5p.dts
diff --git a/arch/sh/boot/dts/usl-5p.dts b/arch/sh/boot/dts/usl-5p.dts
new file mode 100644
index 000000000000..b90bff50b29a
--- /dev/null
+++ b/arch/sh/boot/dts/usl-5p.dts
@@ -0,0 +1,85 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree Source for the IO DATA DEVICE USL-5P
+ */
+
+/dts-v1/;
+
+#include "sh7751r.dtsi"
+
+/ {
+ model = "IO-DATA Device USL-5P";
+ compatible = "iodata,usl-5p", "renesas,sh7751r";
+
+ aliases {
+ serial0 = &scif1;
+ };
+
+ chosen {
+ stdout-path = "serial0:9600n8";
+ };
+
+ memory@c000000 {
+ device_type = "memory";
+ reg = <0x0c000000 0x4000000>;
+ };
+
+ julianintc: interrupt-controller@b0000005 {
+ compatible = "renesas,sh7751-irl-ext";
+ reg = <0xb0000005 0x01>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ /*
+ * b7: Button
+ * b6: Power switch
+ * b5: Compact Flash
+ * b4: ATA
+ * b3: PCI-INTD
+ * b2: PCI-INTC
+ * b1: PCI-INTB
+ * b0: PCI-INTA
+ */
+ renesas,enable-reg = <12 11 10 9 8 7 6 5>;
+ };
+
+ compact-flash@b4000040 {
+ compatible = "iodata,usl-5p-ata", "ata-generic";
+ reg = <0xb4000040 0x0e>, <0xb400002c 2>;
+ reg-shift = <1>;
+ interrupt-parent = <&julianintc>;
+ interrupts = <10 IRQ_TYPE_LEVEL_LOW>;
+ };
+};
+
+&extal {
+ clock-frequency = <22222222>;
+};
+
+&cpg {
+ renesas,mode = <5>;
+};
+
+&scif1 {
+ status = "okay";
+};
+
+&pcic {
+ ranges = <0x02000000 0 0xfd000000 0xfd000000 0 0x01000000>,
+ <0x01000000 0 0x00000000 0xfe240000 0 0x00040000>;
+ dma-ranges = <0x02000000 0 0x0c000000 0x0c000000 0 0x04000000>,
+ <0x02000000 0 0xd0000000 0xd0000000 0 0x00000001>;
+ interrupt-map = <0x0000 0 0 1 &julianintc 5 IRQ_TYPE_LEVEL_LOW>,
+ <0x0000 0 0 2 &julianintc 6 IRQ_TYPE_LEVEL_LOW>,
+ <0x0000 0 0 3 &julianintc 7 IRQ_TYPE_LEVEL_LOW>,
+ <0x0000 0 0 4 &julianintc 8 IRQ_TYPE_LEVEL_LOW>,
+ <0x0800 0 0 1 &julianintc 6 IRQ_TYPE_LEVEL_LOW>,
+ <0x0800 0 0 2 &julianintc 7 IRQ_TYPE_LEVEL_LOW>,
+ <0x0800 0 0 3 &julianintc 8 IRQ_TYPE_LEVEL_LOW>,
+ <0x0800 0 0 4 &julianintc 5 IRQ_TYPE_LEVEL_LOW>,
+ <0x1000 0 0 1 &julianintc 7 IRQ_TYPE_LEVEL_LOW>,
+ <0x1000 0 0 2 &julianintc 8 IRQ_TYPE_LEVEL_LOW>,
+ <0x1000 0 0 3 &julianintc 5 IRQ_TYPE_LEVEL_LOW>,
+ <0x1000 0 0 4 &julianintc 6 IRQ_TYPE_LEVEL_LOW>;
+ interrupt-map-mask = <0x1800 0 0 7>;
+ status = "okay";
+};
--
2.39.2
^ permalink raw reply related
* [RESEND v7 33/37] sh: j2_mimas_v2.dts update
From: Yoshinori Sato @ 2024-04-04 5:14 UTC (permalink / raw)
To: linux-sh
Cc: Yoshinori Sato, Damien Le Moal, Niklas Cassel, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
Michael Turquette, Stephen Boyd, David Airlie, Daniel Vetter,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
Thomas Gleixner, Bjorn Helgaas, Lorenzo Pieralisi,
Krzysztof Wilczyński, Greg Kroah-Hartman, Jiri Slaby,
Magnus Damm, Daniel Lezcano, Rich Felker,
John Paul Adrian Glaubitz, Lee Jones, Helge Deller,
Heiko Stuebner, Shawn Guo, Sebastian Reichel, Chris Morgan,
Linus Walleij, Arnd Bergmann, David Rientjes, Hyeonggon Yoo,
Vlastimil Babka, Baoquan He, Andrew Morton, Guenter Roeck,
Kefeng Wang, Stephen Rothwell, Javier Martinez Canillas, Guo Ren,
Azeem Shaikh, Max Filippov, Jonathan Corbet, Jacky Huang,
Herve Codina, Manikanta Guntupalli, Anup Patel, Biju Das,
Uwe Kleine-König, Sam Ravnborg, Sergey Shtylyov,
Laurent Pinchart, linux-ide, devicetree, linux-kernel,
linux-renesas-soc, linux-clk, dri-devel, linux-pci, linux-serial,
linux-fbdev
In-Reply-To: <cover.1712207606.git.ysato@users.sourceforge.jp>
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
---
arch/sh/boot/dts/j2_mimas_v2.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/sh/boot/dts/j2_mimas_v2.dts b/arch/sh/boot/dts/j2_mimas_v2.dts
index fa9562f78d53..5dfe20866a1c 100644
--- a/arch/sh/boot/dts/j2_mimas_v2.dts
+++ b/arch/sh/boot/dts/j2_mimas_v2.dts
@@ -16,7 +16,7 @@ cpus {
cpu@0 {
device_type = "cpu";
- compatible = "jcore,j2";
+ compatible = "jcore,j2", "renesas,sh2";
reg = <0>;
clock-frequency = <50000000>;
d-cache-size = <8192>;
--
2.39.2
^ permalink raw reply related
* [RESEND v7 34/37] sh: Add dtbs target support.
From: Yoshinori Sato @ 2024-04-04 5:14 UTC (permalink / raw)
To: linux-sh
Cc: Yoshinori Sato, Damien Le Moal, Niklas Cassel, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
Michael Turquette, Stephen Boyd, David Airlie, Daniel Vetter,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
Thomas Gleixner, Bjorn Helgaas, Lorenzo Pieralisi,
Krzysztof Wilczyński, Greg Kroah-Hartman, Jiri Slaby,
Magnus Damm, Daniel Lezcano, Rich Felker,
John Paul Adrian Glaubitz, Lee Jones, Helge Deller,
Heiko Stuebner, Shawn Guo, Sebastian Reichel, Chris Morgan,
Linus Walleij, Arnd Bergmann, David Rientjes, Hyeonggon Yoo,
Vlastimil Babka, Baoquan He, Andrew Morton, Guenter Roeck,
Kefeng Wang, Stephen Rothwell, Javier Martinez Canillas, Guo Ren,
Azeem Shaikh, Max Filippov, Jonathan Corbet, Jacky Huang,
Herve Codina, Manikanta Guntupalli, Anup Patel, Biju Das,
Uwe Kleine-König, Sam Ravnborg, Sergey Shtylyov,
Laurent Pinchart, linux-ide, devicetree, linux-kernel,
linux-renesas-soc, linux-clk, dri-devel, linux-pci, linux-serial,
linux-fbdev
In-Reply-To: <cover.1712207606.git.ysato@users.sourceforge.jp>
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
---
arch/sh/boot/dts/Makefile | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/sh/boot/dts/Makefile b/arch/sh/boot/dts/Makefile
index 4a6dec9714a9..e6b93360c213 100644
--- a/arch/sh/boot/dts/Makefile
+++ b/arch/sh/boot/dts/Makefile
@@ -1,2 +1,7 @@
# SPDX-License-Identifier: GPL-2.0-only
obj-$(CONFIG_USE_BUILTIN_DTB) += $(addsuffix .dtb.o, $(CONFIG_BUILTIN_DTB_SOURCE))
+
+dtb-$(CONFIG_CPU_J2) += j2_mimas_v2.dtb
+dtb-$(CONFIG_CPU_SUBTYPE_SH7751R) += landisk.dtb
+dtb-$(CONFIG_CPU_SUBTYPE_SH7751R) += rts7751r2dplus.dtb
+dtb-$(CONFIG_CPU_SUBTYPE_SH7751R) += usl-5p.dtb
--
2.39.2
^ permalink raw reply related
* [RESEND v7 35/37] sh: RTS7751R2D Plus OF defconfig
From: Yoshinori Sato @ 2024-04-04 5:14 UTC (permalink / raw)
To: linux-sh
Cc: Yoshinori Sato, Damien Le Moal, Niklas Cassel, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
Michael Turquette, Stephen Boyd, David Airlie, Daniel Vetter,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
Thomas Gleixner, Bjorn Helgaas, Lorenzo Pieralisi,
Krzysztof Wilczyński, Greg Kroah-Hartman, Jiri Slaby,
Magnus Damm, Daniel Lezcano, Rich Felker,
John Paul Adrian Glaubitz, Lee Jones, Helge Deller,
Heiko Stuebner, Shawn Guo, Sebastian Reichel, Chris Morgan,
Linus Walleij, Arnd Bergmann, David Rientjes, Hyeonggon Yoo,
Vlastimil Babka, Baoquan He, Andrew Morton, Guenter Roeck,
Kefeng Wang, Stephen Rothwell, Javier Martinez Canillas, Guo Ren,
Azeem Shaikh, Max Filippov, Jonathan Corbet, Jacky Huang,
Herve Codina, Manikanta Guntupalli, Anup Patel, Biju Das,
Uwe Kleine-König, Sam Ravnborg, Sergey Shtylyov,
Laurent Pinchart, linux-ide, devicetree, linux-kernel,
linux-renesas-soc, linux-clk, dri-devel, linux-pci, linux-serial,
linux-fbdev
In-Reply-To: <cover.1712207606.git.ysato@users.sourceforge.jp>
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
---
arch/sh/configs/rts7751r2dplus-of_defconfig | 75 +++++++++++++++++++++
1 file changed, 75 insertions(+)
create mode 100644 arch/sh/configs/rts7751r2dplus-of_defconfig
diff --git a/arch/sh/configs/rts7751r2dplus-of_defconfig b/arch/sh/configs/rts7751r2dplus-of_defconfig
new file mode 100644
index 000000000000..75f3fc4fc5e6
--- /dev/null
+++ b/arch/sh/configs/rts7751r2dplus-of_defconfig
@@ -0,0 +1,75 @@
+CONFIG_SYSVIPC=y
+CONFIG_LOG_BUF_SHIFT=14
+CONFIG_PROFILING=y
+CONFIG_CPU_SUBTYPE_SH7751R=y
+CONFIG_MEMORY_START=0x0c000000
+CONFIG_SH_RTS7751R2D=y
+CONFIG_RTS7751R2D_PLUS=y
+CONFIG_HEARTBEAT=y
+CONFIG_CMDLINE="console=tty0 console=ttySC1,115200 root=/dev/sda1"
+CONFIG_CMDLINE_OVERWRITE=y
+CONFIG_MODULES=y
+CONFIG_FLATMEM_MANUAL=y
+CONFIG_NET=y
+CONFIG_PACKET=y
+CONFIG_UNIX=y
+CONFIG_INET=y
+# CONFIG_IPV6 is not set
+CONFIG_PCI=y
+CONFIG_HOTPLUG_PCI=y
+CONFIG_UEVENT_HELPER=y
+CONFIG_MTD=y
+CONFIG_MTD_CMDLINE_PARTS=y
+CONFIG_MTD_CFI=y
+CONFIG_MTD_CFI_AMDSTD=y
+CONFIG_MTD_PHYSMAP=y
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_SD=y
+# CONFIG_BLK_DEV_BSG is not set
+CONFIG_ATA=y
+CONFIG_PATA_PLATFORM=y
+CONFIG_NETDEVICES=y
+CONFIG_8139TOO=y
+# CONFIG_8139TOO_PIO is not set
+# CONFIG_INPUT_KEYBOARD is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_SERIO is not set
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_SH_SCI=y
+CONFIG_HW_RANDOM=y
+CONFIG_SPI=y
+CONFIG_SPI_SH_SCI=y
+CONFIG_MFD_SM501=y
+CONFIG_FB=y
+CONFIG_FB_SH_MOBILE_LCDC=m
+CONFIG_FB_SM501=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+# CONFIG_LOGO_LINUX_CLUT224 is not set
+# CONFIG_LOGO_SUPERH_MONO is not set
+# CONFIG_LOGO_SUPERH_VGA16 is not set
+CONFIG_SOUND=y
+CONFIG_SND=m
+CONFIG_SND_YMFPCI=m
+CONFIG_HID_GYRATION=y
+CONFIG_HID_PANTHERLORD=y
+CONFIG_HID_PETALYNX=y
+CONFIG_HID_SAMSUNG=y
+CONFIG_HID_SUNPLUS=y
+CONFIG_USB=y
+CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_STORAGE=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_DRV_R9701=y
+CONFIG_EXT2_FS=y
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
+CONFIG_PROC_KCORE=y
+CONFIG_TMPFS=y
+CONFIG_MINIX_FS=y
+CONFIG_NLS_CODEPAGE_932=y
+CONFIG_CRC_T10DIF=y
+CONFIG_DEBUG_FS=y
--
2.39.2
^ permalink raw reply related
* [RESEND v7 36/37] sh: LANDISK OF defconfig
From: Yoshinori Sato @ 2024-04-04 5:14 UTC (permalink / raw)
To: linux-sh
Cc: Yoshinori Sato, Damien Le Moal, Niklas Cassel, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
Michael Turquette, Stephen Boyd, David Airlie, Daniel Vetter,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
Thomas Gleixner, Bjorn Helgaas, Lorenzo Pieralisi,
Krzysztof Wilczyński, Greg Kroah-Hartman, Jiri Slaby,
Magnus Damm, Daniel Lezcano, Rich Felker,
John Paul Adrian Glaubitz, Lee Jones, Helge Deller,
Heiko Stuebner, Shawn Guo, Sebastian Reichel, Chris Morgan,
Linus Walleij, Arnd Bergmann, David Rientjes, Hyeonggon Yoo,
Vlastimil Babka, Baoquan He, Andrew Morton, Guenter Roeck,
Kefeng Wang, Stephen Rothwell, Javier Martinez Canillas, Guo Ren,
Azeem Shaikh, Max Filippov, Jonathan Corbet, Jacky Huang,
Herve Codina, Manikanta Guntupalli, Anup Patel, Biju Das,
Uwe Kleine-König, Sam Ravnborg, Sergey Shtylyov,
Laurent Pinchart, linux-ide, devicetree, linux-kernel,
linux-renesas-soc, linux-clk, dri-devel, linux-pci, linux-serial,
linux-fbdev
In-Reply-To: <cover.1712207606.git.ysato@users.sourceforge.jp>
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
---
arch/sh/configs/landisk-of_defconfig | 104 +++++++++++++++++++++++++++
1 file changed, 104 insertions(+)
create mode 100644 arch/sh/configs/landisk-of_defconfig
diff --git a/arch/sh/configs/landisk-of_defconfig b/arch/sh/configs/landisk-of_defconfig
new file mode 100644
index 000000000000..1a70884c675b
--- /dev/null
+++ b/arch/sh/configs/landisk-of_defconfig
@@ -0,0 +1,104 @@
+CONFIG_SYSVIPC=y
+CONFIG_LOG_BUF_SHIFT=14
+CONFIG_KEXEC=y
+CONFIG_CPU_SUBTYPE_SH7751R=y
+CONFIG_MEMORY_START=0x0c000000
+CONFIG_SH_OF_BOARD=y
+CONFIG_HEARTBEAT=y
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+CONFIG_FLATMEM_MANUAL=y
+CONFIG_NET=y
+CONFIG_PACKET=y
+CONFIG_UNIX=y
+CONFIG_INET=y
+CONFIG_IP_ADVANCED_ROUTER=y
+CONFIG_IP_PNP=y
+# CONFIG_IPV6 is not set
+CONFIG_NETFILTER=y
+CONFIG_ATALK=m
+CONFIG_PCI=y
+CONFIG_PCI_SH7751=y
+CONFIG_PCCARD=y
+CONFIG_YENTA=y
+CONFIG_UEVENT_HELPER=y
+CONFIG_BLK_DEV_LOOP=y
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_SD=y
+CONFIG_BLK_DEV_SR=y
+# CONFIG_BLK_DEV_BSG is not set
+CONFIG_ATA=y
+CONFIG_PATA_ARTOP=y
+CONFIG_PATA_OF_PLATFORM=y
+CONFIG_ATA_GENERIC=y
+CONFIG_MD=y
+CONFIG_BLK_DEV_MD=m
+CONFIG_MD_LINEAR=m
+CONFIG_MD_RAID0=m
+CONFIG_MD_RAID1=m
+CONFIG_NETDEVICES=y
+CONFIG_TUN=m
+CONFIG_8139CP=y
+CONFIG_USB_PEGASUS=m
+CONFIG_USB_RTL8150=m
+# CONFIG_INPUT_KEYBOARD is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_SERIO is not set
+CONFIG_SERIAL_SH_SCI=y
+CONFIG_HW_RANDOM=y
+CONFIG_SOUND=m
+CONFIG_HID_A4TECH=m
+CONFIG_HID_BELKIN=m
+CONFIG_HID_CHERRY=m
+CONFIG_HID_CYPRESS=m
+CONFIG_HID_EZKEY=m
+CONFIG_HID_GYRATION=m
+CONFIG_HID_MICROSOFT=m
+CONFIG_HID_MONTEREY=m
+CONFIG_HID_PANTHERLORD=m
+CONFIG_HID_PETALYNX=m
+CONFIG_HID_SAMSUNG=m
+CONFIG_HID_SUNPLUS=m
+CONFIG_USB_HID=m
+CONFIG_USB=y
+CONFIG_USB_MON=y
+CONFIG_USB_EHCI_HCD=y
+# CONFIG_USB_EHCI_TT_NEWSCHED is not set
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_PRINTER=m
+CONFIG_USB_STORAGE=m
+CONFIG_USB_STORAGE_DATAFAB=m
+CONFIG_USB_STORAGE_FREECOM=m
+CONFIG_USB_STORAGE_ISD200=m
+CONFIG_USB_STORAGE_SDDR09=m
+CONFIG_USB_STORAGE_SDDR55=m
+CONFIG_USB_STORAGE_JUMPSHOT=m
+CONFIG_USB_SERIAL=m
+CONFIG_USB_SERIAL_FTDI_SIO=m
+CONFIG_USB_SERIAL_PL2303=m
+CONFIG_USB_EMI62=m
+CONFIG_USB_EMI26=m
+CONFIG_USB_SISUSBVGA=m
+CONFIG_RENESAS_SH7751_INTC=y
+CONFIG_RENESAS_SH7751IRL_INTC=y
+CONFIG_EXT2_FS=y
+CONFIG_EXT3_FS=y
+CONFIG_REISERFS_FS=y
+CONFIG_ISO9660_FS=m
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
+CONFIG_NTFS_FS=m
+CONFIG_NTFS_RW=y
+CONFIG_TMPFS=y
+CONFIG_ROMFS_FS=y
+CONFIG_UFS_FS=m
+CONFIG_NFS_FS=m
+CONFIG_NFSD=m
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_CODEPAGE_932=y
+CONFIG_INIT_STACK_NONE=y
+CONFIG_CRC_T10DIF=y
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_FTRACE is not set
+CONFIG_SH_STANDARD_BIOS=y
--
2.39.2
^ permalink raw reply related
* [RESEND v7 37/37] sh: j2_defconfig: update
From: Yoshinori Sato @ 2024-04-04 5:14 UTC (permalink / raw)
To: linux-sh
Cc: Yoshinori Sato, Damien Le Moal, Niklas Cassel, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
Michael Turquette, Stephen Boyd, David Airlie, Daniel Vetter,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
Thomas Gleixner, Bjorn Helgaas, Lorenzo Pieralisi,
Krzysztof Wilczyński, Greg Kroah-Hartman, Jiri Slaby,
Magnus Damm, Daniel Lezcano, Rich Felker,
John Paul Adrian Glaubitz, Lee Jones, Helge Deller,
Heiko Stuebner, Shawn Guo, Sebastian Reichel, Chris Morgan,
Linus Walleij, Arnd Bergmann, David Rientjes, Hyeonggon Yoo,
Vlastimil Babka, Baoquan He, Andrew Morton, Guenter Roeck,
Kefeng Wang, Stephen Rothwell, Javier Martinez Canillas, Guo Ren,
Azeem Shaikh, Max Filippov, Jonathan Corbet, Jacky Huang,
Herve Codina, Manikanta Guntupalli, Anup Patel, Biju Das,
Uwe Kleine-König, Sam Ravnborg, Sergey Shtylyov,
Laurent Pinchart, linux-ide, devicetree, linux-kernel,
linux-renesas-soc, linux-clk, dri-devel, linux-pci, linux-serial,
linux-fbdev
In-Reply-To: <cover.1712207606.git.ysato@users.sourceforge.jp>
I've changed some symbols related to DeviceTree,
so let's take care of those changes.
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
---
arch/sh/configs/j2_defconfig | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/arch/sh/configs/j2_defconfig b/arch/sh/configs/j2_defconfig
index 2eb81ebe3888..cdc8ed244618 100644
--- a/arch/sh/configs/j2_defconfig
+++ b/arch/sh/configs/j2_defconfig
@@ -1,18 +1,15 @@
-CONFIG_SMP=y
CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_CPU_SUBTYPE_J2=y
CONFIG_MEMORY_START=0x10000000
-CONFIG_MEMORY_SIZE=0x04000000
CONFIG_CPU_BIG_ENDIAN=y
-CONFIG_SH_DEVICE_TREE=y
-CONFIG_SH_JCORE_SOC=y
+CONFIG_SH_OF_BOARD=y
CONFIG_HZ_100=y
+CONFIG_SMP=y
CONFIG_CMDLINE_OVERWRITE=y
CONFIG_CMDLINE="console=ttyUL0 earlycon"
-CONFIG_BINFMT_ELF_FDPIC=y
CONFIG_BINFMT_FLAT=y
CONFIG_NET=y
CONFIG_PACKET=y
@@ -21,7 +18,6 @@ CONFIG_INET=y
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
CONFIG_NETDEVICES=y
-CONFIG_SERIAL_EARLYCON=y
CONFIG_SERIAL_UARTLITE=y
CONFIG_SERIAL_UARTLITE_CONSOLE=y
CONFIG_I2C=y
@@ -30,8 +26,6 @@ CONFIG_SPI_JCORE=y
CONFIG_WATCHDOG=y
CONFIG_MMC=y
CONFIG_MMC_SPI=y
-CONFIG_CLKSRC_JCORE_PIT=y
-CONFIG_JCORE_AIC=y
CONFIG_EXT4_FS=y
CONFIG_VFAT_FS=y
CONFIG_FAT_DEFAULT_IOCHARSET="ascii"
@@ -40,3 +34,4 @@ CONFIG_NLS_DEFAULT="utf8"
CONFIG_NLS_CODEPAGE_437=y
CONFIG_NLS_ASCII=y
CONFIG_NLS_UTF8=y
+CONFIG_INIT_STACK_NONE=y
--
2.39.2
^ permalink raw reply related
* Re: [PATCH V2 RESEND 6/6] arm64: dts: qcom: sm8650: Add video and camera clock controllers
From: Dmitry Baryshkov @ 2024-04-04 5:30 UTC (permalink / raw)
To: Jagadeesh Kona
Cc: Bjorn Andersson, Konrad Dybcio, Michael Turquette, Stephen Boyd,
Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Vladimir Zapolskiy, linux-arm-msm, linux-clk, devicetree,
linux-kernel, Taniya Das, Satya Priya Kakitapalli, Ajit Pandey,
Imran Shaik
In-Reply-To: <fba2474e-31a6-4fef-acf9-7069933584c8@quicinc.com>
On Thu, 4 Apr 2024 at 08:13, Jagadeesh Kona <quic_jkona@quicinc.com> wrote:
>
>
>
> On 4/3/2024 9:24 PM, Dmitry Baryshkov wrote:
> > On Wed, 3 Apr 2024 at 10:16, Jagadeesh Kona <quic_jkona@quicinc.com> wrote:
> >>
> >>
> >>
> >> On 3/25/2024 11:38 AM, Jagadeesh Kona wrote:
> >>>
> >>>
> >>> On 3/21/2024 6:43 PM, Dmitry Baryshkov wrote:
> >>>> On Thu, 21 Mar 2024 at 11:27, Jagadeesh Kona <quic_jkona@quicinc.com>
> >>>> wrote:
> >>>>>
> >>>>> Add device nodes for video and camera clock controllers on Qualcomm
> >>>>> SM8650 platform.
> >>>>>
> >>>>> Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com>
> >>>>> ---
> >>>>> arch/arm64/boot/dts/qcom/sm8650.dtsi | 28 ++++++++++++++++++++++++++++
> >>>>> 1 file changed, 28 insertions(+)
> >>>>>
> >>>>> diff --git a/arch/arm64/boot/dts/qcom/sm8650.dtsi
> >>>>> b/arch/arm64/boot/dts/qcom/sm8650.dtsi
> >>>>> index 32c0a7b9aded..d862aa6be824 100644
> >>>>> --- a/arch/arm64/boot/dts/qcom/sm8650.dtsi
> >>>>> +++ b/arch/arm64/boot/dts/qcom/sm8650.dtsi
> >>>>> @@ -4,6 +4,8 @@
> >>>>> */
> >>>>>
> >>>>> #include <dt-bindings/clock/qcom,rpmh.h>
> >>>>> +#include <dt-bindings/clock/qcom,sm8450-videocc.h>
> >>>>> +#include <dt-bindings/clock/qcom,sm8650-camcc.h>
> >>>>> #include <dt-bindings/clock/qcom,sm8650-dispcc.h>
> >>>>> #include <dt-bindings/clock/qcom,sm8650-gcc.h>
> >>>>> #include <dt-bindings/clock/qcom,sm8650-gpucc.h>
> >>>>> @@ -3110,6 +3112,32 @@ opp-202000000 {
> >>>>> };
> >>>>> };
> >>>>>
> >>>>> + videocc: clock-controller@aaf0000 {
> >>>>> + compatible = "qcom,sm8650-videocc";
> >>>>> + reg = <0 0x0aaf0000 0 0x10000>;
> >>>>> + clocks = <&bi_tcxo_div2>,
> >>>>> + <&gcc GCC_VIDEO_AHB_CLK>;
> >>>>> + power-domains = <&rpmhpd RPMHPD_MMCX>;
> >>>>> + required-opps = <&rpmhpd_opp_low_svs>;
> >>>>
> >>>> The required-opps should no longer be necessary.
> >>>>
> >>>
> >>> Sure, will check and remove this if not required.
> >>
> >>
> >> I checked further on this and without required-opps, if there is no vote
> >> on the power-domain & its peer from any other consumers, when runtime
> >> get is called on device, it enables the power domain just at the minimum
> >> non-zero level. But in some cases, the minimum non-zero level of
> >> power-domain could be just retention and is not sufficient for clock
> >> controller to operate, hence required-opps property is needed to specify
> >> the minimum level required on power-domain for this clock controller.
> >
> > In which cases? If it ends up with the retention vote, it is a bug
> > which must be fixed.
> >
>
> The minimum non-zero level(configured from bootloaders) of MMCX is
> retention on few chipsets but it can vary across the chipsets. Hence to
> be on safer side from our end, it is good to have required-opps in DT to
> specify the minimum level required for this clock controller.
We are discussing sm8650, not some abstract chipset. Does it list
retention or low_svs as a minimal level for MMCX?
>
> Thanks,
> Jagadeesh
>
> >>
> >> Thanks,
> >> Jagadeesh
> >>
> >>>
> >>>>> + #clock-cells = <1>;
> >>>>> + #reset-cells = <1>;
> >>>>> + #power-domain-cells = <1>;
> >>>>> + };
> >>>>> +
> >>>>> + camcc: clock-controller@ade0000 {
> >>>>> + compatible = "qcom,sm8650-camcc";
> >>>>> + reg = <0 0x0ade0000 0 0x20000>;
> >>>>> + clocks = <&gcc GCC_CAMERA_AHB_CLK>,
> >>>>> + <&bi_tcxo_div2>,
> >>>>> + <&bi_tcxo_ao_div2>,
> >>>>> + <&sleep_clk>;
> >>>>> + power-domains = <&rpmhpd RPMHPD_MMCX>;
> >>>>> + required-opps = <&rpmhpd_opp_low_svs>;
> >>>>> + #clock-cells = <1>;
> >>>>> + #reset-cells = <1>;
> >>>>> + #power-domain-cells = <1>;
> >>>>> + };
> >>>>> +
> >>>>> mdss: display-subsystem@ae00000 {
> >>>>> compatible = "qcom,sm8650-mdss";
> >>>>> reg = <0 0x0ae00000 0 0x1000>;
> >>>>> --
> >>>>> 2.43.0
> >>>>>
> >>>>>
> >>>>
> >>>>
> >
> >
> >
--
With best wishes
Dmitry
^ permalink raw reply
* Re: [PATCH v2] arm64: dts: qcom: msm8916-samsung-fortuna: Add touchscreen
From: Nikita Travkin @ 2024-04-04 5:51 UTC (permalink / raw)
To: Bjorn Andersson
Cc: Raymond Hackley, linux-kernel, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Stephan Gerhold, linux-arm-msm,
devicetree, ~postmarketos/upstreaming, Joe Mason
In-Reply-To: <dyeqnhgvlzw44baihb257lhacei723iqoskthh2bjsfsgvxfrq@6hnk4f3ncsfl>
Bjorn Andersson писал(а) 03.04.2024 23:49:
> On Tue, Mar 12, 2024 at 07:45:42AM +0000, Raymond Hackley wrote:
>> diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-fortuna-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-fortuna-common.dtsi
> [..]
>> +&blsp_i2c5 {
>> + status = "okay";
>> +
>> + touchscreen: touchscreen@20 {
>> + compatible = "zinitix,bt541";
>> + reg = <0x20>;
>> +
>> + interrupts-extended = <&tlmm 13 IRQ_TYPE_EDGE_FALLING>;
>> +
>> + touchscreen-size-x = <540>;
>> + touchscreen-size-y = <960>;
>> +
>> + vcca-supply = <®_vdd_tsp_a>;
>> + vdd-supply = <&pm8916_l6>;
>> +
>> + pinctrl-0 = <&tsp_int_default>;
>> + pinctrl-names = "default";
>> +
>> + linux,keycodes = <KEY_APPSELECT KEY_BACK>;
>
> linux,keycodes is not a valid property of zinitix,bt541 according to the
> DeviceTree binding. Is there a binding update for this somewhere?
>
There is a series for this [1] that Dmitry seems to have no time to pick
up for a long while now, which we carry downstream. Without correct
touchkey definition the touch controller reassigns the tkey lanes to the
screen surface and display calibration breaks a bit, but since we don't
have the changes upstream for now, probably want to drop this line from
the submission so we don't introduce more dtbs_check warnings.
Nikita
[1] https://lore.kernel.org/r/20230801-zinitix-tkey-v4-0-b85526c5a474@trvn.ru/
> Regards,
> Bjorn
^ permalink raw reply
* Re: [PATCH 2/2] arm64: dts: ti: k3-am642-phyboard-electra-rdk: Increase CAN max bitrate
From: Wadim Egorov @ 2024-04-04 5:44 UTC (permalink / raw)
To: Nathan Morrisson, nm, vigneshr, kristo, robh,
krzysztof.kozlowski+dt, conor+dt
Cc: linux-arm-kernel, devicetree, linux-kernel, upstream
In-Reply-To: <20240402160825.1516036-3-nmorrisson@phytec.com>
Am 02.04.24 um 18:08 schrieb Nathan Morrisson:
> The phyBOARD-Electra has two TCAN1044VDD CAN transceivers which
> support CAN FD at 8 Mbps.
>
> Increase the maximum bitrate to 8 Mbps.
>
> Signed-off-by: Nathan Morrisson <nmorrisson@phytec.com>
For both patches
Reviewed-by: Wadim Egorov <w.egorov@phytec.de>
> ---
> arch/arm64/boot/dts/ti/k3-am642-phyboard-electra-rdk.dts | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/ti/k3-am642-phyboard-electra-rdk.dts b/arch/arm64/boot/dts/ti/k3-am642-phyboard-electra-rdk.dts
> index 8237b8c815b8..522699ec65e8 100644
> --- a/arch/arm64/boot/dts/ti/k3-am642-phyboard-electra-rdk.dts
> +++ b/arch/arm64/boot/dts/ti/k3-am642-phyboard-electra-rdk.dts
> @@ -42,7 +42,7 @@ can_tc1: can-phy0 {
> pinctrl-names = "default";
> pinctrl-0 = <&can_tc1_pins_default>;
> #phy-cells = <0>;
> - max-bitrate = <5000000>;
> + max-bitrate = <8000000>;
> standby-gpios = <&main_gpio0 32 GPIO_ACTIVE_HIGH>;
> };
>
> @@ -51,7 +51,7 @@ can_tc2: can-phy1 {
> pinctrl-names = "default";
> pinctrl-0 = <&can_tc2_pins_default>;
> #phy-cells = <0>;
> - max-bitrate = <5000000>;
> + max-bitrate = <8000000>;
> standby-gpios = <&main_gpio0 35 GPIO_ACTIVE_HIGH>;
> };
>
^ permalink raw reply
* Re: [PATCH v7 04/37] dt-bindings: interrupt-controller: Add header for Renesas SH3/4 INTC.
From: Krzysztof Kozlowski @ 2024-04-04 6:07 UTC (permalink / raw)
To: Yoshinori Sato, linux-sh
Cc: Damien Le Moal, Niklas Cassel, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Geert Uytterhoeven, Michael Turquette, Stephen Boyd,
David Airlie, Daniel Vetter, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, Thomas Gleixner, Bjorn Helgaas,
Lorenzo Pieralisi, Krzysztof Wilczyński, Greg Kroah-Hartman,
Jiri Slaby, Magnus Damm, Daniel Lezcano, Rich Felker,
John Paul Adrian Glaubitz, Lee Jones, Helge Deller,
Heiko Stuebner, Shawn Guo, Sebastian Reichel, Chris Morgan,
Linus Walleij, Arnd Bergmann, David Rientjes, Hyeonggon Yoo,
Vlastimil Babka, Baoquan He, Andrew Morton, Guenter Roeck,
Kefeng Wang, Stephen Rothwell, Javier Martinez Canillas, Guo Ren,
Azeem Shaikh, Max Filippov, Jonathan Corbet, Jacky Huang,
Herve Codina, Manikanta Guntupalli, Anup Patel, Biju Das,
Uwe Kleine-König, Sam Ravnborg, Sergey Shtylyov,
Laurent Pinchart, linux-ide, devicetree, linux-kernel,
linux-renesas-soc, linux-clk, dri-devel, linux-pci, linux-serial,
linux-fbdev
In-Reply-To: <d50827196f7e1201bb9a62656fb04223a8989f1d.1712205900.git.ysato@users.sourceforge.jp>
On 04/04/2024 06:59, Yoshinori Sato wrote:
> Renesas SH7751 Interrupt controller priority register define.
>
> Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Nothing improved, still NAK.
This is a friendly reminder during the review process.
It seems my or other reviewer's previous comments were not fully
addressed. Maybe the feedback got lost between the quotes, maybe you
just forgot to apply it. Please go back to the previous discussion and
either implement all requested changes or keep discussing them.
Thank you.
Best regards,
Krzysztof
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox